query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
fa1cdeefb2231121d3e6e1ae6a9cbc34
Retrieve a document from ConnectWise
[ { "docid": "0624ada72e4b180f293847c59079f25b", "score": "0.0", "text": "public function getDocument($documentId)\n {\n // Throw exception if the argument is a non numeric value\n if (is_numeric($documentId) === false) {\n throw new InvalidArgumentException('Expecting numeric value.');\n }\n\n // Throw exception if the Document ID is 0 or a negative number\n if ($documentId <= 0) {\n throw new ApiException('Expecting value greater than 0.');\n }\n\n // Fire off the request to the Document API and return the result array\n return $this->client->makeRequest(\n 'GetDocument',\n array('documentId' => $documentId)\n );\n }", "title": "" } ]
[ { "docid": "ef6fde8af1a67d78c903a71f6cb70199", "score": "0.6522492", "text": "private function retrieveDoc($doc_id){\r\n\t\t#assign values to the field \r\n\t\t$this->retrieve('doc','id',$doc_id);\r\n\t}", "title": "" }, { "docid": "8b8b901f10e6131cb011692e4dd50661", "score": "0.6463141", "text": "public function getDocument($id, $type);", "title": "" }, { "docid": "829865f05c45bc010405a5aa53e7b077", "score": "0.64095056", "text": "public function getDocument($rid, $fetchPlan = null);", "title": "" }, { "docid": "89a008c5b0b1f14cd847476075200737", "score": "0.6361484", "text": "public function findDocumentById($id);", "title": "" }, { "docid": "76e528aaafdccdd3805e88e41f74ecb7", "score": "0.63386893", "text": "function get_document($did)\n {\n if ($this->db == null) {\n $this->connectDb();\n }\n try {\n $docid = $this->db->get_document($did);\n } catch (Exception $e) {\n //Display::display_error_message($e->getMessage());\n return false;\n }\n return $docid;\n }", "title": "" }, { "docid": "62fb4e2d96eebd556681c4df4db5c085", "score": "0.6201763", "text": "function getDocuments();", "title": "" }, { "docid": "a96a7f4ec0fab10ca0cf89e366b2e606", "score": "0.61459446", "text": "function getDocument()\n {\n return $this->document;\n }", "title": "" }, { "docid": "28de6a1ae1c0f30f2c5155d52df7afb7", "score": "0.6120531", "text": "private function getDoc() {\n\t\treturn $this->doc;\n\t}", "title": "" }, { "docid": "36a7ae508a1665bf5cc3107dbc26ca91", "score": "0.6116901", "text": "public function getDocument()\n {\n return $this->document;\n }", "title": "" }, { "docid": "36a7ae508a1665bf5cc3107dbc26ca91", "score": "0.6116901", "text": "public function getDocument()\n {\n return $this->document;\n }", "title": "" }, { "docid": "36a7ae508a1665bf5cc3107dbc26ca91", "score": "0.6116901", "text": "public function getDocument()\n {\n return $this->document;\n }", "title": "" }, { "docid": "36a7ae508a1665bf5cc3107dbc26ca91", "score": "0.6116901", "text": "public function getDocument()\n {\n return $this->document;\n }", "title": "" }, { "docid": "c302ee1d3436d86aa8b1f667a2d6ebcf", "score": "0.6072137", "text": "public function getDocument(Request\\GetDocument $request): Response\n\t{\n\t\treturn new Response($this->transport->sendRequest($request->getRequest()));\n\t}", "title": "" }, { "docid": "5ea4f32abeee140e669e00533e7f69f4", "score": "0.60565794", "text": "public function get_document($record, $options = array()) {\n global $CFG;\n require_once($CFG->dirroot . '/course/lib.php');\n\n // Get the context, modinfo, and section.\n try {\n $context = \\context_course::instance($record->course);\n } catch (\\moodle_exception $ex) {\n // Notify it as we run here as admin, we should see everything.\n debugging('Error retrieving ' . $this->areaid . ' ' . $record->id .\n ' document, not all required data is available: ' . $ex->getMessage(),\n DEBUG_DEVELOPER);\n return false;\n }\n\n // Title - use default if none given.\n $title = get_section_name($record->course, $record->section);\n\n // Prepare associative array with data from DB.\n $doc = \\core_search\\document_factory::instance($record->id, $this->componentname, $this->areaname);\n $doc->set('title', content_to_text($title, false));\n $doc->set('content', content_to_text($record->summary, $record->summaryformat));\n $doc->set('contextid', $context->id);\n $doc->set('courseid', $record->course);\n $doc->set('owneruserid', \\core_search\\manager::NO_OWNER_ID);\n $doc->set('modified', $record->timemodified);\n\n return $doc;\n }", "title": "" }, { "docid": "180c7e4b8fd5c56c64a09cccaea49690", "score": "0.6021852", "text": "public function getDocument($id) {\n \t\t$doc = NULL;\n \t\ttry {\n \t\t\t$doc = $this->client->getDoc($id);\n \t\t} catch (Exception $e) {\n\t\t\techo \"Something weird happened: \".$e->getMessage().\" (errcode=\".$e->getCode().\")\\n\";\n\t\t\treturn false;\n \t\t}\n \t\treturn $doc;\n \t}", "title": "" }, { "docid": "ca0d7cdac053b65570c02b3b9ed6bb5b", "score": "0.6020872", "text": "public function document($id)\n {\n return $this->hasOne('App\\ProviderDocument')->where('document_id', $id)->first();\n }", "title": "" }, { "docid": "ae93d79a395c3d7ac73b1e5b3c2bd004", "score": "0.5997997", "text": "abstract public function getSearchDocument();", "title": "" }, { "docid": "34fe60e2c5ac2fbce47ab14901ed90b9", "score": "0.5989186", "text": "public function getDocumentByPath($documentPath){// throws AlfrescoObjectNotFoundException {\n\t\treturn $this->provider->getDocumentByPath($documentPath);\n\t}", "title": "" }, { "docid": "92574f448bc939353840a6cba3cfc571", "score": "0.5987852", "text": "public function getDocument()\n\t{\n\t\treturn $this->document;\n\t}", "title": "" }, { "docid": "d0047a047d9d608c0b32cd47abebca09", "score": "0.5924468", "text": "public function getDocument() {\n return $this->belongsTo('App\\Document', 'document', 'id');\n }", "title": "" }, { "docid": "918e6f91447cf2aacfdc55e843a8725f", "score": "0.59012824", "text": "public function getDocument($documentId){//\tthrows AlfrescoObjectNotFoundException {\n\t\treturn $this->provider->getDocument($documentId);\n\t}", "title": "" }, { "docid": "f598efa2459402dc4372f967cd432f7f", "score": "0.5864056", "text": "public function getDocument($options=array()) {\r\n $defaults = array('action' => null, 'request' => null, 'find_type' => 'first', 'conditions' => array(), 'limit' => null, 'offset' => 0, 'order' => 'created.desc');\r\n $options += $defaults;\r\n extract($options);\r\n \r\n // $action=null, $request=null, $find_type='first', $conditions=array(), $limit=null, $offset=0, $order=null\r\n // 1. Determine the proper model to be using\r\n extract($this->minerva_config);\r\n // done! came from _init() ... cleaned that shit right up\r\n \r\n // if the action is read, update, or delete then the document will be able to tell us the library name - otherwise it's going to be \"minerva\"\r\n if(($request->params['action'] == 'read') || ($request->params['action'] == 'update') || ($request->params['action'] == 'delete')) {\r\n // could be using the MongoId or the pretty URL in the route. Both work, but prefer the URL if set and there's no need to use both.\r\n \r\n // removing the following because we are using passed args...\r\n //$conditions = array();\r\n // ALL models will use a 'url' field, even if it's just the _id that gets put there.\r\n /*if(isset($request->params['url'])) {\r\n $conditions = array(\r\n 'url' => $request->params['url']\r\n ); \r\n } */\r\n \r\n // this would still work but its redundant. $conditions will be passed in now from the other actions which take args and do all this.\r\n /* // If using {:args} route...\r\n if(isset($request->params['args'][0])) {\r\n $conditions = array(\r\n 'url' => $request->params['args'][0]\r\n );\r\n } else {\r\n // TODO: redirect. document not found.\r\n }\r\n */\r\n \r\n $record = $ModelClass::first(array('request_params' => $request->params, 'conditions' => $conditions, 'fields' => array('document_type')));\r\n // it should be an object...if it wasn't found that's a problem\r\n if(is_object($record)) {\r\n if($record->document_type) {\r\n // set the document_type to that of the document's from the database (still technically could be empty, that's ok)\r\n $this->minerva_config['document_type'] = $record->document_type;\r\n \r\n // ideally, the document_type should be the name of the library\r\n $MinervaModelClass = $ModelClass::getMinervaModel($model, $record->document_type);\r\n if(is_string($MinervaModelClass) && class_exists($MinervaModelClass)) {\r\n $this->minerva_config['ModelClass'] = $ModelClass = $MinervaModelClass;\r\n // but if not...we have to search for it\r\n // (minor performance penalty for the looping, but may be unavoidable)\r\n } else {\r\n // similar to the code in _init(), we're searching through all minerva models\r\n $all_minerva_models = $ModelClass::getAllMinervaModels($model);\r\n foreach($all_minerva_models as $MinervaModelClass) {\r\n if($MinervaModelClass::document_type() == $record->document_type) {\r\n $this->minerva_config['ModelClass'] = $ModelClass = $MinervaModelClass;\r\n }\r\n }\r\n }\r\n \r\n // finaly, we can set the proper $library_name (and the proper $ModelClass will be set now too)\r\n $this->minerva_config['library_name'] = $ModelClass::library_name();\r\n // also, we will need to set the display name\r\n $this->minerva_config['display_name'] = $ModelClass::display_name();\r\n }\r\n }\r\n }\r\n \r\n // 2. Authentication & Access Check for Core Minerva Controllers\r\n // (properties set in model for core controllers) ... transfer those settings to the controller\r\n $ControllerClass = '\\minerva\\controllers\\\\'.$relative_controller.'Controller';\r\n \r\n // If the class doesn't exist, this was a library that decided to make it's own controller extend this controller\r\n // So locate it. It will hold our access rules and such.\r\n if(!class_exists($ControllerClass)) {\r\n $ControllerClass = \\lithium\\core\\Libraries::locate('controllers', $this->request->params['library'] . '.' . $relative_controller);\r\n }\r\n \r\n // OK. If still not found, there's probably something wrong, but we don't want the system to fail so use this class.\r\n if(!class_exists($ControllerClass)) {\r\n $ControllerClass = __CLASS__;\r\n }\r\n \r\n // If the $controllerClass doesn't exist, it means it's a controller that Minerva doesn't have. That means it's not core and the access can be set there on that controller.\r\n if((isset($ModelClass::$access)) && (class_exists($ControllerClass))) {\r\n // Don't completely replace core Minerva controller with new access rules, but append all the rules (giving the library model's access property priority)\r\n $ControllerClass::$access = $ModelClass::$access += $ControllerClass::$access;\r\n }\r\n \r\n // Get the rules for this action\r\n $rules = (isset($ControllerClass::$access[$request->params['action']])) ? $ControllerClass::$access[$request->params['action']]:array();\r\n \r\n // There's going to be two sets of action access rules. One for non-admin actions and one for admin actions.\r\n // If there's no 'action' or 'admin_action' keys for access on the controller's properties then allow access.\r\n if(isset($this->minerva_config['admin']) && $this->minerva_config['admin'] === false) {\r\n // Check access for the action in general\r\n // default is empty, so we're going to allow access by default on non-admin actions.\r\n $action_access = array();\r\n if(isset($rules['action']) && !empty($rules['action'])) {\r\n $action_access = Access::check('minerva_access', Auth::check('minerva_user'), $request, array('rules' => $rules['action']));\r\n }\r\n } else {\r\n // Else, it has to be an action accessed with the admin flag, right? ($this->minerva_config['admin'] won't be true, it will contain a string with the admin prefix)\r\n // by default, don't allow access to any admin action\r\n if(!isset($rules['admin_action']) || empty($rules['admin_action'])) {\r\n $rules['admin_action'] = array(\r\n 'rule' => 'allowManagers',\r\n 'message' => 'Sorry, you must be an administrator to access that section.',\r\n 'redirect' => array(\r\n 'admin' => 'admin',\r\n 'library' => 'minerva',\r\n 'controller' => 'users',\r\n 'action' => 'login'\r\n )\r\n );\r\n }\r\n $action_access = Access::check('minerva_access', Auth::check('minerva_user'), $request, array('rules' => $rules['admin_action']));\r\n }\r\n \r\n if(!empty($action_access)) {\r\n FlashMessage::write($action_access['message'], array(), 'minerva_admin');\r\n $this->redirect($action_access['redirect']);\r\n /**\r\n * We need to return false at this point because we've already set a redirect,\r\n * but the rest of the code could still execute. This is mostly unnoticed, but is very\r\n * noticable for the view() actions for static pages/menus/blocks/etc.\r\n * Those view() actions call $this->render() if this getDocument() method doesn't return false.\r\n * So those pages would still be accessible.\r\n * IF access is allowed and the action wasn't requesting a document from the database, then\r\n * the $find_type will be true and as you can see below, this method will return true.\r\n * Again, if returning true, those static view() methods will render a static template.\r\n */\r\n return false;\r\n }\r\n \r\n \r\n // Before getting documents, make sure the calling method actually wanted to get documents.\r\n if($find_type === false) {\r\n return true;\r\n }\r\n \r\n /**\r\n * 3. Get Document(s)\r\n * If we're here, we now need to get the document(s) to determine any document based access\r\n * and we'll return the document(s) back to the controller too.\r\n */\r\n $options = array(\r\n 'conditions' => $conditions,\r\n 'limit' => $limit,\r\n 'order' => Util::format_dot_order($order),\r\n 'request_params' => $request->params // this is not used for Lithium's find() but gives some useful data if find() is filtered\r\n );\r\n if($offset > 0) {\r\n $options += array('offset' => $offset);\r\n }\r\n $document = $ModelClass::find($find_type, $options, array('request_params' => $request->params));\r\n \r\n // 4. Document Access Control\r\n \r\n // Get the rules for this action\r\n $rules = (isset($ControllerClass::$access[$request->params['action']])) ? $ControllerClass::$access[$request->params['action']]:array();\r\n \r\n if($document && is_object($document)) {\r\n // add the document to the document access rules so it can be checked against\r\n $i=0;\r\n foreach($rules as $rule) {\r\n $rules['document'][$i]['document'] = $document->data();\r\n $i++;\r\n }\r\n \r\n $document_access = false;\r\n if(isset($rules['document'])) {\r\n //$document_access = Access::check('minerva_access', Auth::check('minerva_user'), $request, array('rules' => $rules['document']));\r\n $document_access=array(); // TODO: PUT BACK ACCESS CHECK\r\n }\r\n if(!empty($document_access)) {\r\n FlashMessage::set($document_access['message'], array('options' => array('type' => 'growl', 'pnotify_title' => 'Error', 'pnotify_opacity' => '.8')));\r\n return $this->redirect($document_access['redirect']);\r\n // set the document to false if there's no access to it. the method may be accessible, but the document may not be. so setting it false essentially unsets it, but in a nicer way.\r\n $document = false;\r\n }\r\n }\r\n \r\n //read()\r\n // $document = $modelClass::find('first', array('conditions' => array('url' => $url), 'request_params' => $this->request->params));\r\n \r\n // modelClass will either be a core Minerva model class or the extended matching library model class\r\n return $document;\r\n }", "title": "" }, { "docid": "aec80886583393049f29513ea3516013", "score": "0.5844737", "text": "public function call_getById() {\n\t\t$document = \\Document::get_by_uuid($_REQUEST['id']);\n\t\tif ($document->classname != 'Document_Incoming_Invoice') {\n\t\t\tthrow new \\Exception('incorrect document');\n\t\t}\n\t\tif (!$document->available_for_api()) {\n\t\t\tthrow new \\Exception('Not available');\n\t\t}\n\t\treturn $document->get_info();\n\t}", "title": "" }, { "docid": "f0c39b035065ae44efd19932494b7777", "score": "0.5844716", "text": "public function getMongoDocument()\n {\n return $this->document;\n }", "title": "" }, { "docid": "20353dcb191fc393921b59f20b23a47c", "score": "0.5836242", "text": "public function getDocumentAttribute()\n {\n return $this->documents()->first();\n }", "title": "" }, { "docid": "5f093caed377d5523de9e31a0550591d", "score": "0.57831424", "text": "public function get_by_id($id = NULL)\n {\n $this->clusterpoint->connect();\n \n try\n {\n $document = $this->clusterpoint->api->retrieveSingle($id);\n }\n catch(CPS_Exception $e)\n {\n throw $e;\n }\n \n return $document;\n }", "title": "" }, { "docid": "7d2c43227e2c45683f8367baa3339b5c", "score": "0.5778629", "text": "function getDoc ($id, $module) {\n\tglobal $configuration, $mysqli;\n\n\t$query = sprintf(\n\t\t\"SELECT * FROM %s_files WHERE type='%s' AND module = '%s' AND id_ass = '%s' LIMIT %s\",\n\t\t$configuration[\"mysql-prefix\"], \"document\", $module, $id, 1\n\t);\n\t$source = $mysqli->query($query);\n\n\tif ($source->num_rows > 0) {\n\t\t$data = $source->fetch_assoc();\n\t\treturn $data;\n\t} else {\n\t\treturn FALSE;\n\t}\n}", "title": "" }, { "docid": "19b8e389ea9647fcc08e8fa66efad7b2", "score": "0.57691395", "text": "public static function get($repo_id){\r\n\t\tif(!isset($_GET['id'])){\r\n\t\t\treturn returnError('488 Missing parameter','Document id parameter expected');\r\n\t\t}\r\n\t\t$docId = $_GET['id'];\r\n\t\t$User = getSession()->get('user');\r\n\t\t//there's no user in session\r\n\t\tif($User == null){\r\n\t\t\treturn returnError('401 Unauthorized','User must be logged in');\r\n\t\t}\r\n\t\tif(!$User->isAdmin($repo_id)){\r\n\t\t\treturn returnError('401 Unauthorized','This action can only be performed by admin users');\r\n\t\t}\r\n\t\r\n\t\r\n\t\t$document = DAOFactory::getDocumentsDAO()->load($docId);\r\n\t\r\n\t\tif($document == null){\r\n\t\t\treturn returnError('404 Not Found','Document with id '.$docId.' was not found');\r\n\t\t}\r\n\t\r\n\t\treturn $document;\r\n\t}", "title": "" }, { "docid": "266aa586eedc5e693ade5344721ea761", "score": "0.5766207", "text": "public function index($document);", "title": "" }, { "docid": "1218aaae61cde723b90ad936d6c92ddc", "score": "0.5765482", "text": "public function getDocumentById($args) {\n $document = new \\Models\\Document($args[1]);\n $document->getInfoFromDatabase();\n\n // Only allow access to specific files, files owned by user, when user has all rights or when file is part of a group the user is in\n if($document->getUser()->getId() == \\Auth::getUser()->getId() || \\Auth::checkRights($this->getName(), \\Auth::ALL) || \\Auth::checkGroupFile($document->getId())) {\n return $this->getDocumentData($document, TRUE);\n } else {\n throw new \\Exception('You do not have permissions to view this document.', 7);\n }\n }", "title": "" }, { "docid": "c6262e9c16ca26e38eba12e0a67ba197", "score": "0.5751543", "text": "public function show(Doc $doc)\n {\n//\n }", "title": "" }, { "docid": "377763a318f96021cb5419518613413f", "score": "0.5746146", "text": "public function get_document($index_uid, $document_id){\n return $this->rpc('GET', '/indexes/'.$index_uid.'/documents/'.$document_id);\n }", "title": "" }, { "docid": "ed8fe437ca6e7275251c88a8e6267bc7", "score": "0.5739287", "text": "public function getDoc(): array;", "title": "" }, { "docid": "cfee2006355c9043d3bdd5c89e47f2fd", "score": "0.5729564", "text": "abstract protected function getAsDocument($entity);", "title": "" }, { "docid": "457ba5ac5f0d15ac3b37bf166db3f34d", "score": "0.5718595", "text": "public function getDocument($pnDocPk)\n {\n if(!assert('is_key($pnDocPk)'))\n return new CDbResult();\n\n $sQuery = 'SELECT d.*, dl.*, df.*,\n GROUP_CONCAT(revision.document_filepk SEPARATOR \",\") as rev_filepk\n , GROUP_CONCAT(revision.initial_name SEPARATOR \",\") as rev_file\n , GROUP_CONCAT(DATE_FORMAT(revision.date_creation, \"%Y-%m-%d\") SEPARATOR \",\") as rev_date\n , count(revision.document_filepk) as rev_count\n FROM document d\n LEFT JOIN document_link as dl ON (d.documentpk = dl.documentfk)\n LEFT JOIN document_file as df ON (d.documentpk = df.documentfk AND df.live = 1)\n LEFT JOIN document_file as revision ON (d.documentpk = revision.documentfk AND revision.live = 0)\n WHERE d.documentpk = '.$pnDocPk.'\n GROUP BY df.documentfk ';\n\n $oDbResult = $this->oDB->executeQuery($sQuery);\n $bRead = $oDbResult->readFirst();\n if(!$bRead)\n return new CDbResult();\n\n return $oDbResult;\n }", "title": "" }, { "docid": "3d1394b85fcb0d0269c29619fe5566ed", "score": "0.57064193", "text": "public function getDocument(State $state);", "title": "" }, { "docid": "0b46229add6d42b02c3b743afef70397", "score": "0.5684226", "text": "public function getDocument() {\n\t\tif (!($this->_document instanceof Tx_TwLucenesearch_Domain_Model_Document)) {\n\t\t\t$this->_document\t\t= Tx_TwLucenesearch_Domain_Model_Document::cast(parent::getDocument());\n\t\t}\n\t\treturn $this->_document;\n\t}", "title": "" }, { "docid": "1485b7b0faf8912d54ecdbdf806ecb25", "score": "0.5683541", "text": "public static function consult($cod_document)\r\n {\r\n\r\n $author_DocumentDAO = Author_DocumentDAO::getAuthor_DocumentDAO(self::$conexion);\r\n $author_document = $author_DocumentDAO->consult($cod_document);\r\n return $author_document;\r\n }", "title": "" }, { "docid": "b83bd917903b8dfbea4b2800f3d619dc", "score": "0.56805474", "text": "public function getCustomer()\n \t\t{\n $sql=\"CALL getCustomerDocument(?)\";\n $stm = $this->db->prepare($sql);\n $stm ->bindParam(1, $this->userEmail);\n $stm->execute();\n return $stm->fetch();\n }", "title": "" }, { "docid": "f325e49c264ffc2ce80f188aab257b22", "score": "0.5663616", "text": "function getWorkflowDocument($docID,$table,$status=WORKFLOWDOC_STATUS_UNKNOWN){\n\t\t\t$type=weWorkflowUtility::getTypeForTable($table);\n\t\t\treturn weWorkflowDocument::find($docID,$type,$status);\n\t\t}", "title": "" }, { "docid": "29ad2e36db23d973904b7b903fcb4d0f", "score": "0.56517106", "text": "public static function uploadDocument()\n\t{\n\t\t$dal = new \\FATS\\DAL\\DataAccessLayer();\n\n\t\t/**\n\t\t * Attach the event handler\n\t\t */\n\t\tnew \\FATS\\DAL\\DataTransactionMonitor($dal);\n\n\t\treturn $dal->createDocument();\n\t}", "title": "" }, { "docid": "179fe698e26e09ad0d17679088eda4c5", "score": "0.5629594", "text": "public function get(stdClass $confObj) {\n\n if(($xmlContent = $this->_checkError($confObj))) {\n\n return $xmlContent;\n }\n \n\t\t// build clause of query\n\t\t$this->_setSqlClause($confObj->params);\n $this->_setAddLangParam($confObj->params);\n\n\t\t// store\n\t\t$rows = array();\n\n\t\t$select = 'p.uid, p.title, p.lastUpdated AS date, p.abstract AS dAbs, p.tx_docdb_doc_descriptor AS dscr,p.tx_docdb_doc_related_pages pages,';\n\t\t$select .= 'p.tx_docdb_doc_key AS dkey, o.owner, t.type, s.status';\n // p.tx_templavoila_flex AS flex,\n\t\t$groupBy = 'p.uid';\n\t\t$limit = '20000'; // limit\n\n if($this->_debug) {\n\n\t\t\tt3lib_div::devLog('class model_document sql clause', 'doc_db', 0, array($select, $from, $this->_sqlClause['where'], $groupBy, $this->_sqlClause['order'], $limit));\n\t\t}\n\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n $select,\n $this->_sqlClause['from'],\n $this->_sqlClause['where'],\n $groupBy,\n $this->_sqlClause['order'],\n $limit\n );\n\n\n if($res) {\n\n $this->_setXmlElements($res, $this->_getDocumentStart());\n $xmlContent = $this->_getXml();\n\n $GLOBALS['TYPO3_DB']->sql_free_result($res);\n unset($this->_dom);\n\n } else {\n\n $rootNode = $this->_getDocumentStart();\n // document node\n $doc = $this->_dom->createElement('doc');\n $doc->setAttribute('id', '0');\n $rootNode->appendChild($doc);\n $xmlContent = $this->_getXml();\n unset($this->_dom);\n }\n\n\t\treturn $xmlContent;\n\t}", "title": "" }, { "docid": "b71359e65b70625b0016668ae7acb137", "score": "0.56111825", "text": "public function getContent()\n\t{\n\n\t\tif ($this->objectInfo[\"object_type\"]==\"document\")\n\t\t{\n\n\t\t\t$d = new DOCMGR_DOCUMENT($this->apidata);\n\t\t\treturn $d->get();\t\t\n\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\n\t\t\t//make sure it passes back the content of the file in the response\n\t\t\t$d = new DOCMGR_FILE($this->apidata);\n\t\t\treturn $d->get(\"contentonly\");\t\t\n\t\t\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "50b1fe54a2a348a6ca7cb9f91540b126", "score": "0.561083", "text": "public function getDocuments()\n {\n return Controllers\\Documents::getInstance();\n }", "title": "" }, { "docid": "4cd070c925b881001c272c44fe9a94be", "score": "0.56022024", "text": "public function document()\n {\n return $this->hasOne(Document::class);\n }", "title": "" }, { "docid": "de88ff7a2cb146a909fa1d940141b026", "score": "0.5552494", "text": "function getDocumentAtIndex($index){\n $utils= new Utils();\n // firma del metodo\n $signature = $utils->hexMethodSignature(\"getDocumentAtIndex(uint256)\");\n //index desplasado 32 bytes\n $indexPad =str_pad($index, 64, \"0\", STR_PAD_LEFT);\n //llamada al nodo\n $bytecode=$signature.$indexPad;\n $answer = $utils->curlRequestCall($bytecode);\n $result=$answer['result'];\n // ejemplo de resultado\n //0x\n //0000000000000000000000000000000000000000000000000000000000000020 indica donde empieza la definicion de la respuesta(a los 32 B)\n //0000000000000000000000000000000000000000000000000000000000000040 indica el tamaño de la respuesta(0x40-> 64 B -> 128 caracteres)\n //6636343436613831616566613436613165323537383535663262623935356563 la respuesta en hex\n //3037313830616439366334376263383562386661663236353662393138343539\n\n $lenghtAndArgResult = substr($result,66);// string con la longitud de la respuesta y la respuesta\n $lenghtResult= substr($lenghtAndArgResult,0,64);// logitud del resultado\n $argResult=substr($lenghtAndArgResult,64,hexdec($lenghtResult)*2); // argumento\n\n return $utils->HexToString($argResult);\n }", "title": "" }, { "docid": "48349145f1f607f7446cdee4b5ce8f73", "score": "0.5541679", "text": "public function obtener_documento($id){\n\t\t$this->db->where('IdDocumento', $id);\n\t\treturn $this->db->get('documentose4')->row();\n\t}", "title": "" }, { "docid": "5bdf9373d114de4811d89f7eec20dccc", "score": "0.5530888", "text": "public function getDocument($order, $lang)\n {\n\t\t$document = $this->core->podb->from('document')\n\t\t\t->select(array('document_description.title'))\n\t\t\t->leftJoin('document_description ON document_description.id_document = document.id_document')\n\t\t\t->where('document_description.id_language', $lang)\n ->where('document.active', 'Y')\n\t\t\t->orderBy('document.id_document '.$order.'')\n\t\t\t->fetchAll();\n return $document;\n }", "title": "" }, { "docid": "b0e95301e272db3e6c5171d9effcb3ae", "score": "0.5525893", "text": "public function document(): ?DocumentInterface;", "title": "" }, { "docid": "ec72df3fd56b2e03be66768f7786b2e2", "score": "0.5517915", "text": "function documentGet($id)\n\t{\n\t\treturn [\n\t\t\t'data'=>JbCandidateDocument::find($id)\n\t\t];\n\t}", "title": "" }, { "docid": "ddee57fb69531dca825ad9262249533b", "score": "0.5515425", "text": "public function getDocById($id_document, $lang)\n {\n\t\t$document = $this->core->podb->from('document')\n\t\t\t->select(array('document_description.title'))\n\t\t\t->leftJoin('document_description ON document_description.id_document = document.id_document')\n\t\t\t->where('document.id_document', $id_document)\n\t\t\t->where('document_description.id_language', $lang)\n\t\t\t->where('document.active', 'Y')\n\t\t\t->limit(1)\n\t\t\t->fetch();\n return $document;\n }", "title": "" }, { "docid": "c3f825216bf5c559012b5d51d8753ac1", "score": "0.55134934", "text": "public function getDocente(){\n $suscripcionDocente = $this->suscripcionDocente;\n // entrega el usuario asociado\n return User::where('codigo_usuario', '=', $suscripcionDocente->codigo_usuario)->first();\n }", "title": "" }, { "docid": "b4438e8217080c6e657ef439770f0ce2", "score": "0.5500211", "text": "public function show()\n {\n return view('admin.company.document.list');\n }", "title": "" }, { "docid": "2dabc4ed99215e92891fbac7e2fbea5d", "score": "0.5464894", "text": "public function getdocAction() {\n $this->_disableView(true);\n\n $name = $this->getRequest()->getParam('name', null);\n $pdfName = $this->getRequest()->getParam('file', null);\n if ($name === null) {\n return $this->_helper->redirector->gotoRoute(array('action' => 'documents'), 'partnerRoute', true);\n }\n\n $pdfFile = APPLICATION_PATH . '/../public' . $pdfName;\n\n //add \n $pdf = Zend_Pdf::load($pdfFile);\n $page = $pdf->pages[0];\n $font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA);\n $page->setFont($font, 15);\n $page->drawText($this->restaurant->getCustomerNr(), 55, 780);\n $page->drawText($this->restaurant->getName(), 175, 780);\n\n $tmpFile = tempnam('/tmp', 'partner');\n $pdf->save($tmpFile);\n\n $this->getResponse()\n ->setHttpResponseCode(200)\n ->setHeader('Content-Type', 'application/pdf')\n ->setHeader('Content-Disposition', 'attachment; filename=\"' . $name . '.pdf\"')\n //->setHeader('Content-Length',filesize($file))\n ->setHeader('Content-Transfer-Encoding', 'binary')\n ->setHeader('Expires', '0')\n ->setHeader('Pragma', 'no-cache');\n\n readfile($tmpFile);\n }", "title": "" }, { "docid": "61b3e0c8683e13479a5e315f50540638", "score": "0.54485947", "text": "public function findAllDocuments();", "title": "" }, { "docid": "71bcb2dddcaa4661c8cbe6e36befc1aa", "score": "0.54254293", "text": "public static function getDocente()\n {\n $consulta = \"SELECT * FROM docentes\";\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute();\n\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $e) {\n return false;\n }\n }", "title": "" }, { "docid": "72ea848b96d711a8a7c0d85826f75b5b", "score": "0.54214865", "text": "public function get($documentId)\n\t{\n\t\treturn $this->getEntity('getCustomerDocument', 'documentid', $documentId);\n\t}", "title": "" }, { "docid": "6c58b68c02fb059600c2370481d1a95a", "score": "0.54158247", "text": "public function getDocument()\n {\n if (!$document = $this->jsonApiRequest->getDocument()) {\n return null;\n }\n\n return new Document($document);\n }", "title": "" }, { "docid": "d0a23d8e03344734400ada12e84726c1", "score": "0.5409192", "text": "public function show()\n {\n $user = User::where('nisn', Auth::user()->nisn )->first();\n $document = Document::where('nisn', Auth::user()->nisn)->first();\n\n return view('user.document', compact('document', 'user'));\n }", "title": "" }, { "docid": "1f26c47014fe0a227db15c52dcd1f202", "score": "0.54026085", "text": "public function getIdDoc()\n {\n return $this->hasOne(MDocument::className(), ['IdDoc' => 'IdDoc']);\n }", "title": "" }, { "docid": "b02af7b5831cbe4df23ab97d94a234c6", "score": "0.5389613", "text": "function get_document_data($doc)\n {\n if ($this->db == null) {\n $this->connectDb();\n }\n try {\n if (!is_a($doc, 'XapianDocument')) {\n return FALSE;\n }\n $doc_data = $doc->get_data();\n return $doc_data;\n } catch (Exception $e) {\n //Display::display_error_message($e->getMessage());\n return false;\n }\n }", "title": "" }, { "docid": "b53c2b2e3cb031bdb161698719b9dcd8", "score": "0.53858495", "text": "public function retrieve($record)\n\t{\n\t\t$params['index'] = $this->getName();\n\t\t$params['type'] = $record['type'];\n\t\t$params['id'] = $record['id'];\n\n\t\tself::getClient()->get($params);\n\t}", "title": "" }, { "docid": "625cc18ecc09c625dbad62859b36457c", "score": "0.5382063", "text": "function CourseName($courseid){\n$query=array('_id'=>new MongoId($courseid));\n\n$CourseData = FindOneInCollection('Courses',$query);\nreturn $CourseData['course_name'];\n}", "title": "" }, { "docid": "523e21ae1cf6a8f4e3d9e82a13992f89", "score": "0.5365275", "text": "public function show(Document $document)\n {\n //\n }", "title": "" }, { "docid": "523e21ae1cf6a8f4e3d9e82a13992f89", "score": "0.5365275", "text": "public function show(Document $document)\n {\n //\n }", "title": "" }, { "docid": "523e21ae1cf6a8f4e3d9e82a13992f89", "score": "0.5365275", "text": "public function show(Document $document)\n {\n //\n }", "title": "" }, { "docid": "523e21ae1cf6a8f4e3d9e82a13992f89", "score": "0.5365275", "text": "public function show(Document $document)\n {\n //\n }", "title": "" }, { "docid": "523e21ae1cf6a8f4e3d9e82a13992f89", "score": "0.5365275", "text": "public function show(Document $document)\n {\n //\n }", "title": "" }, { "docid": "523e21ae1cf6a8f4e3d9e82a13992f89", "score": "0.5365275", "text": "public function show(Document $document)\n {\n //\n }", "title": "" }, { "docid": "f34dab28fd648167b00d2f79daf6e7f8", "score": "0.5363401", "text": "public function retrieveDocument($query) {\n\t\t$result = self::getCollection()->findOne($query);\n\n\t\tif (is_array($result)) {\n\t\t\tforeach($result AS $key=>$value)\n\t\t\t\t$this->$key = $value;\n\t\t\treturn true;\n\t\t} else {\n\t\t\t// No result = No document with this id!\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "7a2851a219142d48b0e514c3c9a34799", "score": "0.5323309", "text": "public function get_service_document(){\n $ClientId= $this->getCalendarIdCilentIdService();\n $drive = new Google_Client();\n $drive->setClientId($ClientId[0]);\n $drive->setClientSecret($ClientId[1]);\n $drive->setRedirectUri($ClientId[2]);\n $drive->setScopes(array($ClientId[3],$ClientId[4]));\n $drive->setAccessType('online');\n $authUrl = $drive->createAuthUrl();\n $refresh_token= $ClientId[5];\n $drive->refreshToken($refresh_token);\n $service = new Google_Service_Drive($drive);\n return $service;\n }", "title": "" }, { "docid": "a9c1bcf346c809bcbd94a26c74304ba2", "score": "0.531599", "text": "public function getDataDocuments()\n {\n\n }", "title": "" }, { "docid": "49c275d837d64c97750d4bd5a2f14c9f", "score": "0.52912694", "text": "function document($data = [])\n{\n return new Sydes\\Document($data);\n}", "title": "" }, { "docid": "c6342ea5d5c7740a40b4b85b49b10b02", "score": "0.5289273", "text": "private function getDAO()\n {\n return $this->get('doctrine_mongodb')->getManager()\n ->getRepository('ResumeBundle:ResumeDocument');\n }", "title": "" }, { "docid": "0c86d282f72f417d00ddc5782a6f3ae9", "score": "0.5287781", "text": "function getDocumentdetailsByIdent($Ident) {\n\t\t\t$strSql = \"select * from \".$this->documents.\" where id = '\".$Ident.\"'\";\n\t\t\t$documentList = $this->getSelectByQuery($strSql);\n\t\t\treturn ($documentList);\n\t\t}", "title": "" }, { "docid": "48a219ef1475c8379945b81660890cd6", "score": "0.5276735", "text": "public function show(Document $document)\n {\n $document = Document::where('id', $document->id)->with(['status', 'subject', 'source', 'documentType'])->get();\n \n $string = rtrim(trim(preg_replace( \"/\\r\\n/\", \" \", $document[0]->judul_dokumen)), '.');\n $id = $document[0]->id;\n $related = Document::select(['id', 'judul_dokumen', 'status_id', 'tanggal_penetapan'])->where('judul_dokumen', 'like', '%'.$string.'%')->where('id', '<>', $id)->with(['status']);\n \n $pattern = \"/^peraturan([\\w \\/\\.]+)tentang([\\w \\/\\.]+)/i\";\n preg_match_all($pattern, $string, $matches);\n if(count($matches[2]) > 0)\n {\n $match = trim($matches[2][0]);\n $related_match = Document::select(['id', 'judul_dokumen', 'status_id', 'tanggal_penetapan'])->where('judul_dokumen', 'like', '%'.$match.'%')->where('id', '<>', $id)->with(['status']);\n\n $related = $related->union($related_match);\n }\n $related = $related->orderBy('tanggal_penetapan', 'desc')->get();\n $document[0]->related = $related;\n return $document;\n }", "title": "" }, { "docid": "0fbd57ee475fa32415e694709f04bb4a", "score": "0.52575725", "text": "public function document() :SaveDocument\n {\n return new SaveDocument();\n }", "title": "" }, { "docid": "a7152e348248ee8cd70f6055947f0f83", "score": "0.5248636", "text": "public function getAsDocbook()\n {\n // @TODO: Implement\n }", "title": "" }, { "docid": "71cae16c670560a8f3dc30b17035a6d1", "score": "0.5234045", "text": "function select_collection($collection) {\n return (new MongoDB\\Client)->ecomerce->$collection;\n}", "title": "" }, { "docid": "8f4b8a52c3df90c8788b788b125f1b2e", "score": "0.52311975", "text": "public function getSingleDocument() {\n\t\tforeach ($this->configuration->documents as $document) {\n\t\t\techo \"\\n\" . $document->title . \"\\n\";\n\t\t\t$currentDocumentUrl = str_replace('###DOC###', $document->title, $this->ripperConfiguration->baseUrl);\n\t\t\t$targetDirectory = str_replace('###DOC###', $document->title, $this->ripperConfiguration->targetScheme);\n\t\t\t$this->createDirectory($targetDirectory);\n\n\t\t\tif (!file_exists($targetDirectory)) {\n\t\t\t\ttry {\n\t\t\t\t\t$currentContent = $this->getDocumentsContent($currentDocumentUrl);\n\t\t\t\t\t$this->writeContentsToFile($currentContent, $targetDirectory);\n\t\t\t\t\t$this->increaseCounter();\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\tLog::addError($e->getMessage());\n\t\t\t\t\t$this->increaseErrorCounter();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->getCounter();\n\t}", "title": "" }, { "docid": "8670bd85a55df2b8de0a1675563c7e0c", "score": "0.52203", "text": "public function merchantDocument()\n {\n return $this->hasOne('App\\MerchantDocument');\n }", "title": "" }, { "docid": "da0fae3de2463f292e12e5a28c63029a", "score": "0.5218583", "text": "public function getDocente()\n {\n return $this->hasOne(Docentes::className(), ['id' => 'docente_id']);\n }", "title": "" }, { "docid": "bbbf9717d1e67d35bd18a5912a3d2298", "score": "0.52149194", "text": "public function getIndexableDocument()\n\t{\t\n\t\t$doc = new Zend_Search_Lucene_Document();\n\t\t$doc->addField(Zend_Search_Lucene_Field::keyword('content_id', $this->getId()));\t\t\n\t\t$doc->addField(Zend_Search_Lucene_Field::unIndexed('content_name', $this->name));\n\t\t$doc->addField(Zend_Search_Lucene_Field::text('content_slug', $this->slug));\n\t\t$doc->addField(Zend_Search_Lucene_Field::text('content_description', $this->description));\n\t\t$doc->addField(Zend_Search_Lucene_Field::unIndexed('content_date', $this->date));\t\t\n\t\treturn $doc;\n\t}", "title": "" }, { "docid": "84248bb59fd6d8a7a9b84903526f0e8c", "score": "0.5213253", "text": "function readOneDB($database, $collectionName, $data){\n $collection = $database->CodeBook->$collectionName;\n $result = $collection->findOne($data);\n return $result;\n }", "title": "" }, { "docid": "1841f42ca20e0e6dc05b977a89bfadc8", "score": "0.5210827", "text": "function oublog_get_search_document($post,$cm) {\n // Set up 'search document' to refer to this post\n $doc=new ousearch_document();\n $doc->init_module_instance('oublog',$cm);\n if(!isset($post->userid) || !isset($post->groupid)) {\n global $CFG;\n $results=get_record_sql(\"\nSELECT\n p.groupid,i.userid\nFROM\n {$CFG->prefix}oublog_posts p \n INNER JOIN {$CFG->prefix}oublog_instances i ON p.oubloginstancesid=i.id\nWHERE\n p.id=$post->id\");\n if(!$results) {\n error(\"Can't find details for blog post $post->id\"); \n }\n $post->userid=$results->userid;\n $post->groupid=$results->groupid;\n }\n if($post->groupid) {\n $doc->set_group_id($post->groupid);\n }\n $doc->set_user_id($post->userid);\n $doc->set_int_refs($post->id);\n return $doc;\n}", "title": "" }, { "docid": "d7e78fdd0ff2f7e1d01c4dba749a41e6", "score": "0.5207329", "text": "public function documents()\n {\n $data['employee'] = $this->employee->load('documents');\n\n return view('employee.documents', $data);\n }", "title": "" }, { "docid": "73395ba10ba99b0a200fd88d246ac171", "score": "0.5203626", "text": "public function readById() {\r\n\t\t$conexion = $this->conexion->conectar();\r\n\r\n\t}", "title": "" }, { "docid": "bbadf459b6b45d3fae0d3f25a0a6fa99", "score": "0.51998323", "text": "public function documents() : \\ComplyCube\\Resources\\DocumentApi\n {\n if (empty($this->documentApi)) {\n $this->documentApi = new \\ComplyCube\\Resources\\DocumentApi($this->apiClient);\n }\n return $this->documentApi;\n }", "title": "" }, { "docid": "0fcfb91683ebeda4117bae6a65209b95", "score": "0.5193024", "text": "public function searchClient() {\n if (Server::RequestMethod(\"POST\")) {\n $documento = Server::post(\"documento\");\n echo json_encode($this->_clientes->getClienteIDByDocument($documento));\n } else {\n $this->redireccionar();\n }\n }", "title": "" }, { "docid": "6d22eebd9bd260d7bcb2bbffae149b00", "score": "0.5182613", "text": "public function getCurso()\n {\n return $this->hasOne(Docentes::className(), ['id' => 'curso_id']);\n }", "title": "" }, { "docid": "f30995ca2d7b4e42d5673c14c1ba1fa4", "score": "0.5181449", "text": "public function getDocumento(){\n\t\treturn $this->documento;\n\t}", "title": "" }, { "docid": "acd6e0a610ccab861a455018449bf408", "score": "0.5171684", "text": "public function getDocumentReference()\n {\n return $this->documentReference;\n }", "title": "" }, { "docid": "acd6e0a610ccab861a455018449bf408", "score": "0.5171684", "text": "public function getDocumentReference()\n {\n return $this->documentReference;\n }", "title": "" }, { "docid": "bc80903af721a85465724714409cfbec", "score": "0.51707035", "text": "public function actionSetDocIdToPrintDocument()\n {\n if (Yii::app()->request->isAjaxRequest && isset($_POST['docId'])) {\n $docId = intval($_POST['docId']);\n if ($docId > 0 && Documents::hasAccess($docId)) {\n $document = Documents::model()->findByAttributes(array(\n 'Document_ID' => $docId,\n 'Client_ID' => Yii::app()->user->clientID,\n ));\n\n if ($document) {\n $_SESSION['ap_to_print'] = $docId;\n } else {\n $_SESSION['ap_to_print'] = '';\n }\n }\n }\n }", "title": "" }, { "docid": "aa7c6623c443037e4effd890d4dc50e9", "score": "0.51638144", "text": "public function showAction($path){\n $em = $this->getDoctrine()->getManager();\n $document = $em->getRepository('ApplicationPlateformeBundle:Document')->findOneBy(array(\n 'path' => $path,\n ));\n\n\n\n $beneficiaire = $document->getBeneficiaire();\n\n return $this->render('ApplicationPlateformeBundle:Document:show.html.twig', array(\n 'document' => $document,\n 'beneficiaire' => $beneficiaire\n ));\n }", "title": "" }, { "docid": "e4f9c04db3b6589d6a6c9f30f6118b86", "score": "0.51556534", "text": "function documentFetch($userId)\n\t{\n\t\treturn [\n\t\t\t'list'=>JbCandidateDocument::where('user_id',$userId)->get()\n\t\t];\n\t}", "title": "" }, { "docid": "66364b0552c4ed4889f2fa80891741ea", "score": "0.5152764", "text": "private static function query()\n {\n return \\Yamw\\Lib\\Mongo\\AdvMongo::getConn()\n ->selectCollection(self::COLLECTION);\n }", "title": "" }, { "docid": "8529bb5d3cd96bc01ebc93f6a8765ded", "score": "0.5143776", "text": "public function getOne();", "title": "" }, { "docid": "3755b480176536439b4fc44e5d91adda", "score": "0.51358485", "text": "public function getMeetingDocument($meetingId)\n {\n try {\n $stmt = $this->db->prepare(\"SELECT * FROM document WHERE meeting_id=:meetingId\");\n $stmt->execute(array(\":meetingId\" => $meetingId));\n\n if($stmt->rowCount() > 0){\n $result = array();\n while($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n $result[] = $row;\n }\n }else{\n $result = \"\";\n }\n return $result;\n\n }catch(PDOException $ex){\n echo $ex->getMessage();\n return \"\";\n }\n }", "title": "" }, { "docid": "7628bb87e13501883925f3a742953757", "score": "0.5134874", "text": "public function getRecord(){ }", "title": "" }, { "docid": "d88e541016e92d2279606d18980e332a", "score": "0.51328796", "text": "public function show()\n {\n return view('documents::show');\n }", "title": "" } ]
354a3e9d918b79604b2e5b6a8dc81e25
Get the path of this REST route.
[ { "docid": "d13c493fef34db4b07e53da1c034e9da", "score": "0.0", "text": "public function get_path() {\n\t\treturn '/cart/items';\n\t}", "title": "" } ]
[ { "docid": "110c181a22515233e4837e58034702e6", "score": "0.79872483", "text": "public function path(){\n\t\t\treturn $this->routes->path;\n\t\t}", "title": "" }, { "docid": "94d5260103cd1457990e1d1df01d2852", "score": "0.76335305", "text": "public function getRoutingPath()\r\n\t{\r\n\t\treturn $this->_routing->RoutingURL;\r\n\t}", "title": "" }, { "docid": "805f055e1607803c7714eb6d98f2ee47", "score": "0.75945675", "text": "public function getPath()\n {\n /** @var Concrete\\Core\\Http\\Request $instance */\n return $instance->getPath();\n }", "title": "" }, { "docid": "294368bf74e84fd884596fca10921a83", "score": "0.75143284", "text": "public function getRoute(): string\n {\n $route = $this->getRouteAsArray();\n $route['paths'] = implode('/', $route['paths']);\n\n return implode('::', $route);\n }", "title": "" }, { "docid": "d1df92545193e852c50322597397058f", "score": "0.7495688", "text": "public function route_path() {\n return $this->directory;\n }", "title": "" }, { "docid": "67d776c8de4e562c137fef1fefb0fe17", "score": "0.7463655", "text": "public function getPath()\n\t{\n\t\treturn $this->uri;\n\t}", "title": "" }, { "docid": "d0f76bf0be06ec07bc85ca0bbcca89bd", "score": "0.7323169", "text": "protected function getRoutingPath(): string\n\t{\n\t\treturn \"{$this->app->getPath()}/routing\";\n\t}", "title": "" }, { "docid": "bbb9f62e3a3c9a591281a8c5bbcc43d3", "score": "0.7307892", "text": "public function getPath()\n {\n return $this->path ?: '/';\n }", "title": "" }, { "docid": "eefe5f0c58d9850dad1072431fb2b686", "score": "0.72945154", "text": "protected function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "64cad84e0211872755250f2098e43a46", "score": "0.7278095", "text": "public function route()\n {\n return $this->route;\n }", "title": "" }, { "docid": "64cad84e0211872755250f2098e43a46", "score": "0.7278095", "text": "public function route()\n {\n return $this->route;\n }", "title": "" }, { "docid": "64cad84e0211872755250f2098e43a46", "score": "0.7278095", "text": "public function route()\n {\n return $this->route;\n }", "title": "" }, { "docid": "a5fad42346343972fb462843502b92a5", "score": "0.726567", "text": "public function getRoutePathAttribute()\n {\n return $this->hasPermalink() ? trim(parse_url($this->route)['path'], '/') : null;\n }", "title": "" }, { "docid": "5303f4ecbac0d1ce2b75b4adea649ff8", "score": "0.7249797", "text": "public function getPath()\n {\n return $this->getRequest()->getPath();\n }", "title": "" }, { "docid": "ccee5feced03a25600d32f60e3fc75a5", "score": "0.7243207", "text": "public final function getPath() {\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "510aac315c36b176947e99d898d4f4a8", "score": "0.72394884", "text": "public function getPath() {\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "510aac315c36b176947e99d898d4f4a8", "score": "0.72394884", "text": "public function getPath() {\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "510aac315c36b176947e99d898d4f4a8", "score": "0.72394884", "text": "public function getPath() {\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "a9d7838e5d55306c0605ce0d24eff6bb", "score": "0.7228384", "text": "public function getPath() {\n return $this->path;\n }", "title": "" }, { "docid": "a9d7838e5d55306c0605ce0d24eff6bb", "score": "0.7228384", "text": "public function getPath() {\n return $this->path;\n }", "title": "" }, { "docid": "a9d7838e5d55306c0605ce0d24eff6bb", "score": "0.7228384", "text": "public function getPath() {\n return $this->path;\n }", "title": "" }, { "docid": "a9d7838e5d55306c0605ce0d24eff6bb", "score": "0.7228384", "text": "public function getPath() {\n return $this->path;\n }", "title": "" }, { "docid": "a9d7838e5d55306c0605ce0d24eff6bb", "score": "0.7228384", "text": "public function getPath() {\n return $this->path;\n }", "title": "" }, { "docid": "a9d7838e5d55306c0605ce0d24eff6bb", "score": "0.7228384", "text": "public function getPath() {\n return $this->path;\n }", "title": "" }, { "docid": "a9d7838e5d55306c0605ce0d24eff6bb", "score": "0.7228384", "text": "public function getPath() {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.72194403", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "29a6822aef4e4c9a7fb1fc8cc7fe19e5", "score": "0.7214115", "text": "public function getPath()\n {\n return isset($this->path) ? $this->path : null;\n }", "title": "" }, { "docid": "8edfc2cd3896a6ea2d1e3f20217f27c6", "score": "0.72111356", "text": "public function getPath() {\n if( null == $this->path ) {\n $this->path = '/' . static::sanitizePath(\n explode(\n '(', \n $this->getNavn()\n )[0]\n ) .'/';\n }\n return $this->path;\n }", "title": "" }, { "docid": "e188dac649b22fb343931947db7750e4", "score": "0.720631", "text": "protected function getPath() {\r\n $path = \"{$this->path}/\";\r\n return $path;\r\n }", "title": "" }, { "docid": "91be8b0836cd23aaf14ba02080dde443", "score": "0.7198711", "text": "public function getPath(): string\n {\n return isset($this->components['path']) && $this->components['path'] !== null ?\n $this->encodeUriComponent($this->components['path']) :\n \"\";\n }", "title": "" }, { "docid": "fdf037793ff01c99d48bf0e6f9e7119b", "score": "0.7197687", "text": "public function getPath()\n {\n return $this->endpointPathHistory;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.71961105", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.71961105", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.71961105", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.71961105", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.71961105", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.71961105", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.71961105", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.71961105", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "f32e6121f8956f7c53e2f36dd75d1044", "score": "0.71961105", "text": "public function getPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "b7593291828fb8308fe29a5b2ba55cec", "score": "0.7192728", "text": "public function path()\n {\n // get current uri and remove the base path form it\n $uri = substr($this->server('REQUEST_URI'), strlen($this->basePath()));\n\n // Remove the get params\n if (strstr($uri, '?')) {\n $uri = substr($uri, 0, strpos($uri, '?'));\n }\n\n return '/'.trim($uri, '/');\n }", "title": "" }, { "docid": "def423e601b4db3f1901fa26b4f8cfb9", "score": "0.71904886", "text": "public function getPath() {\n return $this->_path;\n }", "title": "" }, { "docid": "30ab2f1c00a7babf66ccaa52a97691f7", "score": "0.71870166", "text": "public function getPath()\n {\n return $this->_path;\n }", "title": "" }, { "docid": "30ab2f1c00a7babf66ccaa52a97691f7", "score": "0.71870166", "text": "public function getPath()\n {\n return $this->_path;\n }", "title": "" }, { "docid": "30ab2f1c00a7babf66ccaa52a97691f7", "score": "0.71870166", "text": "public function getPath()\n {\n return $this->_path;\n }", "title": "" }, { "docid": "18fdd5de0d3ea700fb88c21ee743d0d6", "score": "0.7178743", "text": "public function getPath() {\n return $this->path;\n }", "title": "" }, { "docid": "60045b24a7cdd5393910910993830541", "score": "0.7172885", "text": "public function getPath()\n {\n return $_SERVER['PATH_INFO'] ?? '/';\n\n }", "title": "" }, { "docid": "d7e2c7365e4d027500d6eb676d5dc54a", "score": "0.7169116", "text": "public function getPath()\n {\n if ($this->path === null) {\n $this->initPath();\n }\n return $this->path;\n }", "title": "" }, { "docid": "438170077af6913d660b5822f68168d8", "score": "0.7166859", "text": "public function getPath() {\n\t\treturn $this->_path;\n\t}", "title": "" }, { "docid": "5f58b5f62c9f5d47511006d83863eb9f", "score": "0.715756", "text": "public function getPath(): string\n {\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "9a4214d756028e349b86eaec7a50e2f0", "score": "0.71566486", "text": "public function getRoute() {\n\t\treturn $_SERVER[\"ORIG_PATH_INFO\"];\n\t}", "title": "" }, { "docid": "fe3a4f48a6f35f646ca8d9bf4cabff0c", "score": "0.71540505", "text": "public function getPath()\n {\n return isset($this->_params['options']['path']) ? $this->_params['options']['path'] : null;\n }", "title": "" }, { "docid": "625ccb3214c424f88e47c4501ef054dd", "score": "0.71529037", "text": "public function getPath()\n\t{\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "625ccb3214c424f88e47c4501ef054dd", "score": "0.71529037", "text": "public function getPath()\n\t{\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "625ccb3214c424f88e47c4501ef054dd", "score": "0.71529037", "text": "public function getPath()\n\t{\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "625ccb3214c424f88e47c4501ef054dd", "score": "0.71529037", "text": "public function getPath()\n\t{\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "625ccb3214c424f88e47c4501ef054dd", "score": "0.71529037", "text": "public function getPath()\n\t{\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "b05f9fc09c9796a9148bad3fdc84ebd8", "score": "0.71462387", "text": "public function path()\n {\n return substr($this->originalPath(), strlen(\\Rails::application()->router()->basePath()));\n }", "title": "" }, { "docid": "b2206c6ad397221a0eef0c3244fc0ad8", "score": "0.71432483", "text": "public function getRoute()\n {\n return $this->route;\n }", "title": "" }, { "docid": "b2206c6ad397221a0eef0c3244fc0ad8", "score": "0.71432483", "text": "public function getRoute()\n {\n return $this->route;\n }", "title": "" }, { "docid": "b2206c6ad397221a0eef0c3244fc0ad8", "score": "0.71432483", "text": "public function getRoute()\n {\n return $this->route;\n }", "title": "" }, { "docid": "b2206c6ad397221a0eef0c3244fc0ad8", "score": "0.71432483", "text": "public function getRoute()\n {\n return $this->route;\n }", "title": "" }, { "docid": "b2206c6ad397221a0eef0c3244fc0ad8", "score": "0.71432483", "text": "public function getRoute()\n {\n return $this->route;\n }", "title": "" }, { "docid": "b2206c6ad397221a0eef0c3244fc0ad8", "score": "0.71432483", "text": "public function getRoute()\n {\n return $this->route;\n }", "title": "" }, { "docid": "b2206c6ad397221a0eef0c3244fc0ad8", "score": "0.71432483", "text": "public function getRoute()\n {\n return $this->route;\n }", "title": "" }, { "docid": "b2206c6ad397221a0eef0c3244fc0ad8", "score": "0.71432483", "text": "public function getRoute()\n {\n return $this->route;\n }", "title": "" }, { "docid": "7a63ee205bd3c6716d471d1a4dfac580", "score": "0.7138476", "text": "public function getRoute() {\n return $this->route;\n }", "title": "" }, { "docid": "661c330ab25caef5a12dec6751dc0b22", "score": "0.7126609", "text": "public function getPath(): string\n\t{\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "661c330ab25caef5a12dec6751dc0b22", "score": "0.7126609", "text": "public function getPath(): string\n\t{\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "f795db82fa1d2a6040b3e7d6d0ea4029", "score": "0.7116682", "text": "protected function getRoute()\n\t{\n\t\treturn $this->getRouteObject()['uri'];\n\t}", "title": "" }, { "docid": "28536b4cd71c0a1aeb2648504402f3ed", "score": "0.7099019", "text": "public function getRoute(): string\n {\n return $this->configs['routing']['route'];\n }", "title": "" }, { "docid": "3a044eed4c0000d1f4171cdf190acd88", "score": "0.7089102", "text": "public function getPath()\n\t{\n\t\treturn $this->_path;\n\t}", "title": "" }, { "docid": "d07628618c628253ba9b0f11a17b903b", "score": "0.7088891", "text": "public function getRoute(): string\n {\n return rtrim(config('Workflows')->routeBase, '/ ') . '/' . $this->attributes['action_id'] . '/';\n }", "title": "" } ]
86ac16f87ff0964c1da2c53f36ebf27e
Set if modified vclock
[ { "docid": "1610d9393da21a985af2cd7dc1fc791c", "score": "0.79110026", "text": "public function setIfModifiedVClock($ifModifiedVClock) {}", "title": "" } ]
[ { "docid": "08f7b78db5f1f4a068897fd5c4c5184e", "score": "0.7263431", "text": "public function getIfModifiedVClock() {}", "title": "" }, { "docid": "98feeb79d3d24fe30d9cc91b8ba58d4a", "score": "0.6303801", "text": "public function setVclock($var)\n {\n GPBUtil::checkString($var, False);\n $this->vclock = $var;\n\n return $this;\n }", "title": "" }, { "docid": "69f83837c29c268d171dc7faa419eaa5", "score": "0.62863207", "text": "public function getVClock() {}", "title": "" }, { "docid": "7e89c14f4a7da4f75c9fbb2d396aa6ac", "score": "0.62744725", "text": "public function setVclock($value)\n {\n return $this->set(self::VCLOCK, $value);\n }", "title": "" }, { "docid": "6ce2c0ec6bb902775a3eafb85174baa9", "score": "0.6228643", "text": "public function setOldVclock($value)\n {\n return $this->set(self::OLD_VCLOCK, $value);\n }", "title": "" }, { "docid": "b0c1e438d6002f208b3f8e2945c98c16", "score": "0.6059131", "text": "public function setYoungVclock($value)\n {\n return $this->set(self::YOUNG_VCLOCK, $value);\n }", "title": "" }, { "docid": "330638263b5679c4ba73025d33b261ab", "score": "0.5967279", "text": "public function getVClock() \n {\n return $this->_vclock;\n }", "title": "" }, { "docid": "89ea36154588bad48f63d6782c3879b8", "score": "0.5632027", "text": "public function setBigVclock($value)\n {\n return $this->set(self::BIG_VCLOCK, $value);\n }", "title": "" }, { "docid": "2b9c81a63f3fd2dbc1b9762af932a014", "score": "0.562798", "text": "protected function setModified(){\n\t\t$strongcal = $this->avalanche->getModule(\"strongcal\");\n\t\t$gmtimestamp = $strongcal->gmttimestamp();\n\t\t$datetime = date(\"Y-m-d H:i:s\", $gmtimestamp);\n\t\t$this->modifiedOn($datetime);\n\t\t$this->taskman->taskEdited($this->getId());\n\t}", "title": "" }, { "docid": "8661df9fb25053fffcc3091931a256e4", "score": "0.5609588", "text": "public function setPointTime($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->point_time !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->point_time !== null && $tmpDt = new DateTime($this->point_time)) ? $tmpDt->format('H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->point_time = ($dt ? $dt->format('H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = ItineraryPeer::POINT_TIME;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "46c7f08340914e1eddf65cf6453f1a13", "score": "0.55907154", "text": "public function testSetAutreVivtime() {\n\n $obj = new AttestationAt();\n\n $obj->setAutreVivtime(true);\n $this->assertEquals(true, $obj->getAutreVivtime());\n }", "title": "" }, { "docid": "9907cf5164535209b60d680bb27313a0", "score": "0.5573552", "text": "public function setTime()\n {\n }", "title": "" }, { "docid": "f70fcf00ebeaff354473c46738c5705c", "score": "0.55160797", "text": "public function getVclock()\n {\n return isset($this->vclock) ? $this->vclock : '';\n }", "title": "" }, { "docid": "0f755461fb1da316ff5bec0821924e41", "score": "0.54905057", "text": "public function getOldVclock()\n {\n return $this->get(self::OLD_VCLOCK);\n }", "title": "" }, { "docid": "aba075994197080cdfeac27ddcb4886e", "score": "0.54889107", "text": "public function setLastSync($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->last_sync !== null || $dt !== null) {\n $currentDateAsString = ($this->last_sync !== null && $tmpDt = new DateTime($this->last_sync)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ( ($currentDateAsString !== $newDateAsString) // normalized values don't match\n || ($dt->format('Y-m-d H:i:s') === '1901-01-01 00:00:00') // or the entered value matches the default\n ) {\n $this->last_sync = $newDateAsString;\n $this->modifiedColumns[] = AktPdPeer::LAST_SYNC;\n }\n } // if either are not null\n\n\n return $this;\n }", "title": "" }, { "docid": "30ae61a32a703ee58009c84dcc9427b7", "score": "0.5460284", "text": "public function setSmallVclock($value)\n {\n return $this->set(self::SMALL_VCLOCK, $value);\n }", "title": "" }, { "docid": "ca60312d49bb03955582f0a5ce980b5c", "score": "0.5447285", "text": "public function setVat($value);", "title": "" }, { "docid": "a4b11562d52b2f29592b187ba79a51e8", "score": "0.5436827", "text": "public function setProposedNewTime(?TimeSlot $value): void {\n $this->getBackingStore()->set('proposedNewTime', $value);\n }", "title": "" }, { "docid": "8b8ac222466385e031eb102f08dbeda4", "score": "0.53952605", "text": "public function getYoungVclock()\n {\n return $this->get(self::YOUNG_VCLOCK);\n }", "title": "" }, { "docid": "7e9eb8011969efbf248df9882dd78cc4", "score": "0.53745914", "text": "public function setChanged();", "title": "" }, { "docid": "ae878b5d9bd5ad10958a9b45d6ecdf65", "score": "0.53462553", "text": "public function setClock($clock)\n {\n $this->clock = $clock;\n }", "title": "" }, { "docid": "74b632b95c2018d33d05e3e3b2bd5b57", "score": "0.53093755", "text": "public function getVclock()\n {\n return $this->get(self::VCLOCK);\n }", "title": "" }, { "docid": "abcad84be986b96eb8ceb11cdfca624b", "score": "0.52791303", "text": "public function setEffectivedate($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->effectivedate !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->effectivedate !== null && $tmpDt = new DateTime($this->effectivedate)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->effectivedate = ($dt ? $dt->format('Y-m-d H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = QcSearchPeer::EFFECTIVEDATE;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "5fefd856a50bb90de3cca046bf92bb3e", "score": "0.5269835", "text": "private function setVMScreenChangeIntervall()\n\t{\n\t\t$elem = $this->getCurElement();\n\t\t$this->vmScreenChangeIntervall = $elem[CAutoTest::SEQIDX_VMSCREENCHANGEINTERVALL];\n\t}", "title": "" }, { "docid": "048f2ecb1be1fcec628daf90fcfdf854", "score": "0.52689785", "text": "public function resetPartialParttimedetails($v = true)\n {\n $this->collParttimedetailsPartial = $v;\n }", "title": "" }, { "docid": "6885713f882f9397d09c01eb75d24652", "score": "0.5264696", "text": "public function setModifiedAtNow()\n {\n $this->modifiedAt = new \\DateTime();\n }", "title": "" }, { "docid": "25ab2b7ee2a5b7430e522c42c4409798", "score": "0.5256126", "text": "function set()\n {\n $this->thing->json->setField(\"variables\");\n $this->thing->json->readVariable(\n [\"stopwatch\", \"elapsed\"],\n $this->elapsed_time\n );\n $this->thing->json->readVariable(\n [\"stopwatch\", \"refreshed_at\"],\n $this->current_time\n );\n $this->thing->choice->save('stopwatch', $this->state);\n }", "title": "" }, { "docid": "56694edd3203c45d0a2110dbf022dbe7", "score": "0.52526325", "text": "public function touchModified() {\n $date = date('c');\n $this->getCdf()->setModified($date);\n }", "title": "" }, { "docid": "4ca35a8943dcc6fb125d2f87d5be5109", "score": "0.5234952", "text": "public function setEffectivedate($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->effectivedate !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->effectivedate !== null && $tmpDt = new DateTime($this->effectivedate)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->effectivedate = ($dt ? $dt->format('Y-m-d H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = AmendmentsubmissionqcSearchPeer::EFFECTIVEDATE;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "41b81826a94114b2fb83ef04f4aca06f", "score": "0.5223301", "text": "public function setUpdated()\n {\n $this->setUpdateTime(new \\DateTime(\"now\"));\n }", "title": "" }, { "docid": "6270e9bfab1f9072ad254d03e61a334e", "score": "0.51654494", "text": "public function setModifyTimeOf($file, $time)\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2a5b8f289789ac0814ea64e0c09b96e0", "score": "0.5140669", "text": "protected function updateSwitchTimes(){\n $sunrise = getvalue($this->ReadPropertyInteger(\"SunRise_ID\"));\n $sunset = getvalue($this->ReadPropertyInteger(\"SunSet_ID\"));\n $OffSetSR_MoFr = getvalue($this->GetIDForIdent(\"OffSetSR_MoFr\")) ;\n $OffSetSS_MoFr = getvalue($this->GetIDForIdent(\"OffSetSS_MoFr\")) ;\n $OffSetSR_SaSo = getvalue($this->GetIDForIdent(\"OffSetSR_SaSo\"));\n $OffSetSS_SaSo = getvalue($this->GetIDForIdent(\"OffSetSS_SaSo\"));\n \n $sunriseA = date('H:i', $sunrise);\n $sunsetA = date('H:i', $sunset);\n \n $UpTime = getvalue($this->GetIDForIdent(\"SZ_MoFr\"));\n $DownTime = getvalue($this->GetIDForIdent(\"SZ_SaSo\"));\n \n //falls timer leer dann mit vorgabe füllen\n if($UpTime === \"\"){\n $UpTimeMoFr = date('H:i', $sunrise);\n $UpTimeSaSo = date('H:i', $sunrise);\n }\n if($DownTime === \"\"){\n $DownTimeMoFr = date('H:i', $sunset);\n $DownTimeSaSo = date('H:i', $sunset);\n }\n \n // falls SunSet aktiv dann nächste SunSet SunRise Werte mit Offset eintragen\n if (getvalue($this->GetIDForIdent('SS'))){\n $UpTimeMoFr = date('H:i', strtotime($sunriseA) + $OffSetSR_MoFr *60); \n $DownTimeMoFr = date('H:i', strtotime($sunsetA) + $OffSetSS_MoFr *60); \n $UpTimeSaSo = date('H:i', strtotime($sunriseA) + $OffSetSR_SaSo *60); \n $DownTimeSaSo = date('H:i', strtotime($sunsetA) + $OffSetSS_SaSo *60); \n }\n else {\n $t1 = json_decode($this->ReadPropertyString(\"UpTMoFr\"), true);\n $t2 = json_decode($this->ReadPropertyString(\"DownTMoFr\"), true);\n $t3 = json_decode($this->ReadPropertyString(\"UpTSaSo\"), true);\n $t4 = json_decode($this->ReadPropertyString(\"DownTSaSo\"), true);\n\n \n $UpTimeMoFr = date('H:i', strtotime($t1['hour'].':'.$t1['minute'].':'.$t1['second'])); \n\n $DownTimeMoFr = date('H:i', strtotime($t2['hour'].':'.$t2['minute'].':'.$t2['second'])); \n $UpTimeSaSo = date('H:i', strtotime($t3['hour'].':'.$t3['minute'].':'.$t3['second'])); \n $DownTimeSaSo = date('H:i', strtotime($t4['hour'].':'.$t4['minute'].':'.$t4['second'])); \n }\n \n \n setvalue($this->GetIDForIdent(\"SZ_MoFr\"), $UpTimeMoFr.\" - \".$DownTimeMoFr);\n setvalue($this->GetIDForIdent(\"SZ_SaSo\"), $UpTimeSaSo.\" - \".$DownTimeSaSo);\n \n \n }", "title": "" }, { "docid": "01b9d3f32ae2afb376bc3e54c56821b5", "score": "0.51160187", "text": "public function setUpdated();", "title": "" }, { "docid": "aa41b354284b713146902b3404f80fea", "score": "0.5111672", "text": "public function setEndWorkTime($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->end_work_time !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->end_work_time !== null && $tmpDt = new DateTime($this->end_work_time)) ? $tmpDt->format('H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->end_work_time = ($dt ? $dt->format('H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = CourierPeer::END_WORK_TIME;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d6cb886bec37d45bc060d22e10be68c0", "score": "0.5107082", "text": "public function cacheSet() {\n if ($this->isLocked()) {\n drupal_set_message(t('Changes cannot be made to a locked view.'), 'error');\n return;\n }\n\n // Let any future object know that this view has changed.\n $this->changed = TRUE;\n\n $executable = $this->getExecutable();\n if (isset($executable->current_display)) {\n // Add the knowledge of the changed display, too.\n $this->changed_display[$executable->current_display] = TRUE;\n $executable->current_display = NULL;\n }\n\n // Unset handlers. We don't want to write these into the cache.\n $executable->display_handler = NULL;\n $executable->default_display = NULL;\n $executable->query = NULL;\n $executable->displayHandlers = NULL;\n $revId = $this->get('storage')->get('loadedRevisionId');\n $cacheId = ($revId) ? $this->id() . '-' . $revId : $this->id();\n $this->storage->entityTypeManager = NULL;\n $this->entityTypeManager = NULL;\n \\Drupal::service('tempstore.shared')->get('views')->set($cacheId, $this);\n }", "title": "" }, { "docid": "b1075adc617f8db7ff05585dec7ad956", "score": "0.50989103", "text": "public function beforeUpdate()\n {\n $this->modified_in = date('Y-m-d H:i:s');\n }", "title": "" }, { "docid": "973a9dd90dc2379e5d479b274e0b661d", "score": "0.50585914", "text": "public function setTime($time);", "title": "" }, { "docid": "cbeeb19855fd39bce5e0bde49d7c2aad", "score": "0.5006509", "text": "public function onPreUpdate(): void\n {\n $this->updated = new DateTime(\"now\", new DateTimeZone(\"UTC\"));\n }", "title": "" }, { "docid": "cbeeb19855fd39bce5e0bde49d7c2aad", "score": "0.5006509", "text": "public function onPreUpdate(): void\n {\n $this->updated = new DateTime(\"now\", new DateTimeZone(\"UTC\"));\n }", "title": "" }, { "docid": "cbeeb19855fd39bce5e0bde49d7c2aad", "score": "0.5006509", "text": "public function onPreUpdate(): void\n {\n $this->updated = new DateTime(\"now\", new DateTimeZone(\"UTC\"));\n }", "title": "" }, { "docid": "cf45493fdd7a73c2ee6e21384dd43fb6", "score": "0.5005747", "text": "public function setStartWorkTime($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->start_work_time !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->start_work_time !== null && $tmpDt = new DateTime($this->start_work_time)) ? $tmpDt->format('H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->start_work_time = ($dt ? $dt->format('H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = CourierPeer::START_WORK_TIME;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "8f0c5c3ceb2eaa1a534ba893893d1285", "score": "0.500447", "text": "public function setSysLastChanged() {}", "title": "" }, { "docid": "602cc17a9d04d39433dd01ef4e9443d1", "score": "0.50007933", "text": "public function preUpdate_date_modified()\n {\n $this->date_modified = new \\DateTime;\n }", "title": "" }, { "docid": "3e6f91fa9950437c8f28c44670374aa5", "score": "0.49833563", "text": "public function getReturnDeletedVClock() {}", "title": "" }, { "docid": "1f313a7bb594a6199a50fa2f2a09ad14", "score": "0.49701944", "text": "public function setUpdatedAtValue()\n {\n $this->updated = new \\DateTime;\n }", "title": "" }, { "docid": "c4134d05c2e4ec262a824fdfcdfe11b7", "score": "0.49658814", "text": "public function testPatchPersistentVolumeStatus()\n {\n }", "title": "" }, { "docid": "ed0fd380afa2456bf570db5824cf4cfa", "score": "0.4962132", "text": "public function edit(Clock $clock)\n {\n //\n }", "title": "" }, { "docid": "470810fdecb7a0cef82ac8f5999befdd", "score": "0.49580857", "text": "public function beforeUpdate()\r\n {\r\n $this->updated_at = time();\r\n }", "title": "" }, { "docid": "d0d5d759722007ceb81f6517dee867df", "score": "0.49541733", "text": "public function onPreUpdate()\n {\n $this->updated = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "302bc5c108635cf25ce879f503f8e709", "score": "0.4952916", "text": "public function setModifieddate($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->modifieddate !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->modifieddate !== null && $tmpDt = new DateTime($this->modifieddate)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->modifieddate = ($dt ? $dt->format('Y-m-d H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = QcSearchPeer::MODIFIEDDATE;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ebf3474b5bc8cec084999f91639f8fa4", "score": "0.4944393", "text": "public function touchCurrentSync();", "title": "" }, { "docid": "f3eb1854c11fa2a9605457593725d21a", "score": "0.49424136", "text": "function setStarted($time,$ignore_unsynch=false)\n {\n\t\t if ($ignore_unsynch)\n\t\t {\n\t\t\t\t$this->started=$time;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t\t $this->changed['started'] = $time;\n\t\t\t\t $this->unsynch = true;\n\t\t }\n\t\t return true;\n }", "title": "" }, { "docid": "15eb48f52f1f6a855d30ba47b536f2e3", "score": "0.49290213", "text": "public function update() {\n\t\t$_SESSION ['info'] ['datetime'] = $this->_datetime = time();\n\t}", "title": "" }, { "docid": "0e5ab04a6eae0c9b01db397f72a9e008", "score": "0.4919783", "text": "public function setTime($time)\n\t{\n $this->time = $time;\n\t}", "title": "" }, { "docid": "b714a5f934abaeb274822287531d6145", "score": "0.48992082", "text": "public function setTime($val)\n {\n $this->_propDict[\"time\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "1596e4fc301d474931336cc7ad3fcab7", "score": "0.48935315", "text": "private function setCompDuration($val)\n {\n $this->settings['comp_duration'] = $val;\n }", "title": "" }, { "docid": "2d98d127ca3456c7f39d07c39a57dac9", "score": "0.4890713", "text": "public function beforeUpdate()\n\t{\n\t\tif($this->timestamps)\n\t\t{\n\t\t\tif(property_exists($this, static::UPDATED_AT)) {\n\t\t\t\t$this->{static::UPDATED_AT} = gmdate('Y-m-d H:i:s');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b5f318fe913b5ba1ad9fb34ee23f21b5", "score": "0.4878184", "text": "public function testStampsCanAddVirtualStamp()\n {\n }", "title": "" }, { "docid": "3ca77c603b2e9c35d38f0b82fe39e052", "score": "0.48774797", "text": "public function setModifiedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('modifiedDateTime', $value);\n }", "title": "" }, { "docid": "8146a2f7f6139a83246e1de1239fdbf7", "score": "0.48580077", "text": "public function preUpdate()\n\t{\n\t $this->updatedAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n\t}", "title": "" }, { "docid": "765e618922794897e8c9bacecc863714", "score": "0.48569155", "text": "public function preUpdate(){\n if(method_exists($this, 'setDateUpdated')){\n $this->setDateUpdated(new \\DateTime());\n } \n }", "title": "" }, { "docid": "05b9bd194cd5d56be7c02ff56039f5e5", "score": "0.48558265", "text": "public function setTiming($timing);", "title": "" }, { "docid": "c546e6a8c50fb8d9708b975536f1be92", "score": "0.48494932", "text": "public function tstampCanBeSet()\n {\n $value = new \\DateTime('2014-03-30');\n $this->instance->setTstamp($value);\n $this->assertEquals($value, $this->instance->getTstamp());\n }", "title": "" }, { "docid": "aab353fc5f3bc7e63b1897f5976065a4", "score": "0.48480102", "text": "public static function update_clockin_setting($user_id,$clockin_value){\n $model \t\t= User_model::find($user_id);\n $model->reminder_clock_in \t= $clockin_value;\n $saved \t\t= $model->save();\n if(!$saved){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "942cab6de398ffb1a1819979cb98f3df", "score": "0.4842474", "text": "public static function update_clockout_setting($user_id,$clockout_value){\n\t\t $model \t\t= User_model::find($user_id);\n\t\t $model->reminder_clock_out \t= $clockout_value;\n\t\t $saved \t\t= $model->save();\n\t\t if(!$saved){\n\t\t\t return false;\n\t\t }\n\t\t return true;\n\t }", "title": "" }, { "docid": "c22e70954d4059b2d7d457b463809146", "score": "0.48354062", "text": "public function testReplacePersistentVolumeStatus()\n {\n }", "title": "" }, { "docid": "1957daf7bf1cdb16669c890a1f3f0b5b", "score": "0.48317683", "text": "function __set( $k, $v ) {\n\t\t\t$this->store( $k, $v );\n\t\t}", "title": "" }, { "docid": "eef5c345a1e3fe1764dfb10c603521c7", "score": "0.48305276", "text": "public function touch() {\n\t\t\t$this->updated = date('Y-m-d H:i:s');\n\t\t\t$this->_dirty = true;\n\t\t}", "title": "" }, { "docid": "8611b0276f46bbe1945abaeeb0ab49bf", "score": "0.48288992", "text": "protected function setup_date() {\n\t\t\tupdate_option( $this->key, time() );\n\t\t}", "title": "" }, { "docid": "d1c1052a2cec4325586633e3484311f1", "score": "0.48260465", "text": "public function beforeUpdate() {\n $fecha_hoy = new \\DateTime('America/Mexico_City');\n $today = $fecha_hoy->format('Y-m-d H:m:s');\n $this->modified = $today;\n $this->sanitizeAll();\n }", "title": "" }, { "docid": "84b099b51656ec91316503bf4d20fc18", "score": "0.48254743", "text": "public function refreshLastViewedAt() : void\n {\n $this->lastViewedAt = new \\DateTime();\n }", "title": "" }, { "docid": "d0e0b046b664b0f5682fbc8765cf0db8", "score": "0.4821236", "text": "public function resetPartialVldKaryaTuliss($v = true)\n {\n $this->collVldKaryaTulissPartial = $v;\n }", "title": "" }, { "docid": "d2e5ef8e1de3e72e532ecd6023787ee8", "score": "0.48152527", "text": "static function setTimeToStrDateTime($v, &$pDataHora) {\n\n $pNovo = DataHora::getDateFromStrDateTime($pDataHora) . ' ' . $v;\n $pDataHora = $pNovo;\n }", "title": "" }, { "docid": "5874e76b1a645d942aa47b0519552156", "score": "0.4805052", "text": "public function set($k,$v,$expireAfter=0)\r\n\t{\r\n\t\t$this->start();\r\n\t\t$this->changed=true;\r\n\t\tif($v===null){\r\n\t\t\tunset($this->sessionArr[$k],$this->sessionArr['__eXpIrE__'][$k]);\r\n\t\t}else{\r\n\t\t\t$this->sessionArr[$k] = $v;\r\n\t\t\tif($expireAfter){\r\n\t\t\t\t$this->sessionArr['__eXpIrE__'][$k]=$expireAfter+$this->timestamp;\r\n\t\t\t}else{\r\n\t\t\t\tunset($this->sessionArr['__eXpIrE__'][$k]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "28be02b66098438916f90203d638dcbc", "score": "0.4797288", "text": "public function updatedTimestamps()\n {\n $this->entered = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "2aa615001d2bd6786b2a6c0f1d870706", "score": "0.47965652", "text": "function __set($k, $v)\n {\n if (static::$t) {#prevents looping :: second passage\n $this->{$k} = $v;\n return $this;\n }\n return $this->set($k, $v, 0, 1);#1er passage -- afin de pouvoir l'intercepter plus haut\n }", "title": "" }, { "docid": "b3639aa2e13debd6b72046875ea9f6d7", "score": "0.4784874", "text": "function cache_set($k, $v){\n\n global $cache, $cacheConf;\n\n return $cache->set($cacheConf['$cacheConf'].$k, $v, false, $cacheConf['lifetime']);\n}", "title": "" }, { "docid": "394e3dddd759706c5cf90e78c8dfb05c", "score": "0.47810376", "text": "public function setModifiedTime($timestamp);", "title": "" }, { "docid": "20917b38562e10b566efed53d9502153", "score": "0.4780285", "text": "public function setReturnDeletedVClock($deletedVClock) {}", "title": "" }, { "docid": "ab8f71a68cce3658bf93ebfc04d56a36", "score": "0.47733474", "text": "public function preUpdate()\n {\n $this->caseUpdateAt = new \\DateTime;\n }", "title": "" }, { "docid": "a302f71904c5245ccddcb9ba943b0c46", "score": "0.47703016", "text": "public function setDateTime($value) {\r\n if ($this->dateTime != $value) {\r\n $this->dateTime = $value;\r\n $this->series->invalidate();\r\n }\r\n }", "title": "" }, { "docid": "6cedbea731563a8c6fa60b53e15e68ad", "score": "0.47682348", "text": "private function vat_line_update($accpl, $old, $fields) {\n global $_lib;\n\n $VatID = 0;\n $Vat = 0;\n $vatreason = 'Ur&oslash;rt';\n\n #print \"MVA<br>\\n\";\n $vat = $this->get_vataccount_object(array('VatID' => $accpl->VatID, 'date' => $fields['voucher_VoucherDate']));\n\n #It is always allowed to change accountplans, and when that happens the VAT gets picked up from the setup to the accountplan you change to\n #Should it be possible to change accountplan and not to change VAT in that case we should not pick up standard for this accountplan and change it after that\n if($fields['voucher_AccountPlanID'] != $old->AccountPlanID)\n {\n $_lib['sess']->debug(\"Accountplan changed - default VAT changes automatically\");\n $Vat = $vat->Percent;\n $VatID = $vat->VatID;\n # Change of accountplan\n $vatreason = \"Bytte av kontoplan\";\n }\n elseif($accpl->EnableVATOverride || $vat->EnableVatOverride)\n {\n $_lib['sess']->debug(\"Override VAT\");\n if($fields['voucher_Vat'] > 0) {\n $VatControlO = $this->vat_input_control($accpl->AccountPlanID, $fields['voucher_Vat'], $fields['voucher_VoucherDate']);\n $VatID = $VatControlO->VatID;\n $Vat = $VatControlO->Percent;\n $vatreason = $VatControlO->VatReason;;\n }\n elseif(($fields['voucher_Vat'] == 0) and (strlen($fields['voucher_Vat']) > 0) )\n {\n $query = \"select VoucherID, AutomaticVatVoucherID from voucher where VoucherID=\" . (int) $old->VoucherID . \" and JournalID=\" . (int) $fields['voucher_JournalID'] . \" and VoucherType='\" . $fields['voucher_VoucherType'] . \"' and Active=1\";\n #print \"VAT delete loop: $query<br>\\n\";\n $hovedbok = $_lib['storage']->get_row(array('query' => $query));\n $this->update_voucher_line(array('voucher_AutomaticVatVoucherID' => 0), $old->VoucherID, 'slett loop nullstiller automatic vat', $fields['voucher_VoucherPeriod']);\n while($hovedbok->AutomaticVatVoucherID > 0)\n {\n $VoucherIDtmp = $hovedbok->AutomaticVatVoucherID;\n\n $query = \"select VoucherID, AutomaticVatVoucherID from voucher where VoucherID=\" . (int) $VoucherIDtmp . \" and JournalID=\" . (int) $fields['voucher_JournalID'] . \" and VoucherType='\" . $fields['voucher_VoucherType'] . \"' and Active=1\";\n #print \"VAT inside in loop $query<br>\\n\";\n $hovedbok = $_lib['storage']->get_row(array('query' => $query));\n\n #print \"For deleting: VoucherID: $hovedbok->VoucherID, JournalID: \" . $fields['voucher_JournalID'] . \", type: \" . $fields['voucher_VoucherType'] . \"<br>\\n\";\n $this->delete_voucher_line_smart($hovedbok->VoucherID, $fields['voucher_JournalID'], $fields['voucher_VoucherType'], 'vat_line_update');\n }\n if($accpl->VatID < 40) {\n $VatID = 10; #Free Sale, no VAT\n $vatreason = 'Fritt salg ikke MVA';\n $Vat = '';\n\n } else {\n $VatID = 40; #Free purchase, no VAT\n $Vat = '';\n $vatreason = \"Fritt kj&oslash;p ikke MVA\";\n }\n }\n elseif($fields['voucher_Vat'] < 0) {\n # VAT can't be negative\n $_lib['sess']->warning(\"MVA kan ikke v&aelig;re negativ\");\n }\n else {\n #$vat = $this->get_vataccount_object(array('VatID'=>$accpl->VatID)); #Gets fetched before\n $VatID = $vat->VatID;\n $Vat = $vat->Percent;\n $vatreason = \"Ikke noe\";\n }\n\n #print \"Final VatID: \" . $_REQUEST['voucher_VatID'] . ', Vat: ' . $_REQUEST['voucher_Vat'] . \", $vatreason<br>\\n\";\n }\n #if there it is not allowed to override VAT on accountplan, use the VAT set on accountplan\n else\n {\n #$vat = $this->get_vataccount_object(array('VatID'=>$accpl->VatID)); #Gets fetched before\n #print \"Not overriden\";\n $VatID = $vat->VatID;\n $Vat = $vat->Percent;\n # Not allowed to override on this accountplan\n $vatreason = \"Ikke lov overstyre paa denne kontoen\";\n }\n\n $_lib['sess']->debug(\"MVA vat_line_update: $VatID, $Vat, $vatreason\");\n\n return array($VatID, $Vat, $vatreason);\n }", "title": "" }, { "docid": "084be7d06d99657d7478327e05f2f083", "score": "0.4766474", "text": "public function setTime($time) {\n\t\t$this->time = $time;\n\t}", "title": "" }, { "docid": "8f8c54fbf8453adba69c757d7edc60b2", "score": "0.47651953", "text": "public function isRuntimeChanged() {\n /**\n * The variable might be NULL in case It's a new\n * record being saved. In that case the runtime is\n * not being changed, but just being saved for\n * a first time, so the function returns false.\n */\n if (!$this->_instanceBeforeSave instanceof self)\n return false;\n\n return $this->_instanceBeforeSave->video_lenght != $this->video_lenght;\n }", "title": "" }, { "docid": "8028de25ecd8f14b8205fd8025949650", "score": "0.4764533", "text": "public function onPreUpdate()\n {\n $this->updated = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "8028de25ecd8f14b8205fd8025949650", "score": "0.4764533", "text": "public function onPreUpdate()\n {\n $this->updated = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "8028de25ecd8f14b8205fd8025949650", "score": "0.4764533", "text": "public function onPreUpdate()\n {\n $this->updated = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "8028de25ecd8f14b8205fd8025949650", "score": "0.4764533", "text": "public function onPreUpdate()\n {\n $this->updated = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "8028de25ecd8f14b8205fd8025949650", "score": "0.4764533", "text": "public function onPreUpdate()\n {\n $this->updated = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "8028de25ecd8f14b8205fd8025949650", "score": "0.4764533", "text": "public function onPreUpdate()\n {\n $this->updated = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "43f2ecbef9659824c211792810c2ecb0", "score": "0.4763064", "text": "protected function cacheTimestamp()\n {\n $this->timestamp = $this->dateTime->getTimestamp();\n }", "title": "" }, { "docid": "63b1ade43f57be6882d5dd73b590127e", "score": "0.476201", "text": "public function preUpdate()\n {\n \t$this->updatedAt = new \\DateTime();\n }", "title": "" }, { "docid": "f776b30743ef11a7c1580d49efbdae82", "score": "0.4760522", "text": "protected function updateModifiedTime(int $time)\n {\n }", "title": "" }, { "docid": "7b839b742e28c85728d04556e51d9a17", "score": "0.47527888", "text": "public function set_voltageAtStartUp($newval)\n {\n $rest_val = strval(round($newval * 65536.0));\n return $this->_setAttr(\"voltageAtStartUp\",$rest_val);\n }", "title": "" }, { "docid": "2d2df1aa24ba85d528a24213664c0b9a", "score": "0.47505182", "text": "public function resetPartialVldMous($v = true)\n {\n $this->collVldMousPartial = $v;\n }", "title": "" }, { "docid": "656857a6d939e056d131a2118f91cc51", "score": "0.47400224", "text": "public function doPreUpdate()\n {\n $this->updated_at = new \\DateTime('now', new \\DateTimeZone('UTC'));\n }", "title": "" }, { "docid": "25a41ee7cb1e34667b0920e2e6002da4", "score": "0.4736817", "text": "public function void() {\n $this->voided_on = \\Time::now();\n \n $this->update([\n 'voided_on' => $this->voided_on\n ]);\n }", "title": "" }, { "docid": "3c395886b381ca65ecf56202ed0fa598", "score": "0.47361088", "text": "public function setTime($time)\n\t{\n\t\t$this->time = $time;\n\t}", "title": "" }, { "docid": "266b74c72d09db3502d5882704384386", "score": "0.4730665", "text": "public function testSetMontantCrt() {\n\n $obj = new TempsPasses();\n\n $obj->setMontantCrt(10.092018);\n $this->assertEquals(10.092018, $obj->getMontantCrt());\n }", "title": "" }, { "docid": "d622491e5049df4bb9f5644bdc93ff6d", "score": "0.4726916", "text": "public function setTime($time)\n {\n $this->_time = $time;\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "a5af1808170512b425742698f6b13027", "score": "0.0", "text": "public function index()\n {\n $selection = DB::table('selection')->get();\n return view('/selection/selection', ['selection' => $selection]);\n }", "title": "" } ]
[ { "docid": "a5f21f14f06e50e6c899fc50c1823371", "score": "0.748859", "text": "public function index()\n {\n return $this->listing();\n }", "title": "" }, { "docid": "496d5d54d7c7a7947e57216e38436eaa", "score": "0.7468274", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "5aa4c5557a26f8808de23dbd0200fb1e", "score": "0.7446935", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "eca6104bc4f03f55970223ec5e260d62", "score": "0.7403906", "text": "public function index()\n {\n $per_page = !request()->filled('per_page') ? 10 : (int) request('per_page');\n $direction = request()->query('direction');\n $sortBy = request()->query('sortBy');\n\n $query = LaporanHarian::query();\n\n $lists = $query->orderBy($sortBy, $direction)->paginate($per_page);\n\n return new ListResources($lists);\n }", "title": "" }, { "docid": "3ec6f8ee193fb6eb0e96d6d5c89ac849", "score": "0.7346841", "text": "public function index()\n {\n $resources = $this->_resourceRepo->fetchResources();\n return view('travellers-inn.admin.resource.index', compact('resources'));\n }", "title": "" }, { "docid": "7573e843d1b7cfeddf14f70707821b32", "score": "0.7310731", "text": "public function actionList()\n\t{\n\t\t$this->renderPartial('list', array(), false, true);\n\t}", "title": "" }, { "docid": "cd35602f7c25a9b8e631ce80beb8ea4d", "score": "0.7295102", "text": "public function index()\n {\n $query = $this->resourceModel::query();\n\n $this->beforeIndex($query);\n\n $query->fieldsForMasterList();\n\n $this->viewData['resourceList'] = $this->afterIndex($query->get());\n\n return view(\n \"{$this->viewBaseDir}.{$this->viewFiles['index']}\",\n $this->viewData\n );\n }", "title": "" }, { "docid": "93cf9bf71a1973929a2edbc182c4df80", "score": "0.72826904", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if (! $this->data['crud']->ajaxTable()) {\n $this->data['entries'] = $this->data['crud']->getEntries();\n }\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n // $this->crud->getListView() returns 'list' by default, or 'list_ajax' if ajax was enabled\n return view('vendor.backpack.crud.list', $this->data);\n }", "title": "" }, { "docid": "813d60bea2fa858e658620b3d43f028b", "score": "0.72776103", "text": "public function index()\n {\n $fields = $this->parseFields();\n $filter = $this->parseFilters();\n $sort = $this->parseOrders();\n $paging = $this->parsePaging();\n $data = $this->listResources($fields, $filter, $sort, $paging);\n return self::getResponse()->setHeader(DefaultController::$defaultApiHeaders)->setResType('json')->setData($data)->send();\n }", "title": "" }, { "docid": "df01f7ff8d6a105850fbefd31e546f03", "score": "0.7190641", "text": "function list() {\n\n\t\t\tif($this->listJWT) $this->requireJWT();\n\n\t\t\t//Items to show, we can define the number of items via the show query param\n\t\t\t$show = $this->request->get('show', 100);\n\t\t\t$show = $show ?: 100;\n\n\t\t\t//Pages to show, we can define the page number via the page query param\n\t\t\t$page = $this->request->get('page', 1);\n\t\t\t$page = $page ?: 1;\n\n\t\t\t//Sorting defined via the sort query param\n\t\t\t$sort = $this->request->get('sort', 'asc');\n\t\t\t$sort = $sort ?: 'asc';\n\n\t\t\t//Sort by parameter defined via the by query param\n\t\t\t$by = $this->request->get('by', 'id');\n\t\t\t$by = $by ?: 'id';\n\n\t\t\t$args = [ 'show' => $show, 'page' => $page, 'sort' => $sort, 'by' => $by, 'args' => [] ];\n\n\t\t\t//Defines if we want to fetch metas or not\n\t\t\t$fetch_metas = $this->request->get('fetch_metas');\n\t\t\tif($fetch_metas) {\n\n\t\t\t\tif($fetch_metas != 1) $fetch_metas = explode(',', $fetch_metas);\n\t\t\t\t$args['args']['fetch_metas'] = $fetch_metas;\n\t\t\t}\n\n\t\t\t//Automagically add conditions based on get params\n\t\t\tforeach($_GET as $key => $value) {\n\n\t\t\t\tif(in_array($key, $this->plural::getTableFields())) {\n\t\t\t\t\t$args['conditions'][] = \"`{$key}` = '{$value}'\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Query Fields\n\t\t\t$query_fields = $this->request->get('query_fields');\n\t\t\tif($query_fields && is_string($query_fields)) $query_fields = explode(',', $query_fields);\n\t\t\tif($query_fields) $args['query_fields'] = $query_fields;\n\n\t\t\t//Fetch\n\t\t\tforeach($_GET as $key => $value) {\n\t\t\t\tif(preg_match('/fetch_(?<entity>.*)/', $key)) {\n\t\t\t\t\t$args['args'][$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Passing args via URL\n\t\t\tif($url_args = $this->request->get('args')) {\n\n\t\t\t\t$args = array_merge($args, $url_args);\n\t\t\t}\n\n\t\t\t// Specifically passing PDO Args\n\t\t\tif($pdo = $this->request->get('pdo')) {\n\n\t\t\t\t$args['args'] = array_merge($args['args'], $pdo);\n\t\t\t}\n\n\t\t\t//$args['debug'] = 1;\n\n\t\t\t// Conditions Filter\n\t\t\t$args['conditions'] = $this->filterListConditions(get_item($args, 'conditions', []));\n\n\t\t\tif(is_array($args['conditions'])) {\n\t\t\t\t$args['conditions'] = array_filter($args['conditions']);\n\t\t\t}\n\n\t\t\t$items = $this->plural::all($args);\n\t\t\t$this->data = $items;\n\n\t\t\t$count = $this->plural::count($args['conditions'] ?? []);\n\t\t\t$pages = ceil($count / $show);\n\n\t\t\t$this->properties['current_page'] = (int) $page;\n\t\t\t$this->properties['per_page'] = (int) $show;\n\t\t\t$this->properties['last_page'] = (int) $pages;\n\t\t\t$this->properties['count'] = (int) $count;\n\t\t\t$this->properties['sort'] = $sort;\n\t\t\t$this->properties['by'] = $by;\n\t\t\t$this->properties['total'] = (int) $pages;\n\n\t\t\tif(count($items)) {\n\n\t\t\t\t$this->result = 'success';\n\t\t\t}\n\n\t\t\t$this->respond();\n\t\t}", "title": "" }, { "docid": "6dbec524e0edfa12a7b39fd3954be29e", "score": "0.7157161", "text": "public function index()\n {\n $resources = Resource::paginate(15);\n \n return view('resource.index', compact('resources'));\n }", "title": "" }, { "docid": "3a75e00cbfe822ce4067afcff2f6a3d8", "score": "0.71310157", "text": "public function index()\n {\n return $this->listResponse($this->model->all());\n }", "title": "" }, { "docid": "f7a87ae6c993ad3c3f6ec9da2248552a", "score": "0.71200645", "text": "public function listAction()\n {\n if (Config::get('error')) {\n return false;\n }\n $this->_template = 'ItemsList';\n Route::factory()->setAction('list');\n // Filter parameters to array if need\n Filter::setFilterParameters();\n // Set filter elements sortable\n Filter::setSortElements();\n // Check for existance\n $group = Model::getRow(Route::param('alias'), 'alias', 1);\n if (!$group) {\n return Config::error();\n }\n // Seo\n $this->setSeoForGroup($group);\n // Add plus one to views\n Model::addView($group);\n // Get items list\n $result = Filter::getFilteredItemsList($this->limit, $this->offset, $this->sort, $this->type);\n // Generate pagination\n $pager = Pager::factory($this->page, $result['total'], $this->limit)->create();\n // Render page\n $this->_content = View::tpl(['result' => $result['items'], 'pager' => $pager], 'Catalog/ItemsList');\n }", "title": "" }, { "docid": "bf1bc30233a225c042addf1175ede637", "score": "0.71117574", "text": "public function list()\n\t\t{\n\n\t\t}", "title": "" }, { "docid": "4b74341b17d61539d4d1fc0aa8693955", "score": "0.70722556", "text": "public function index()\n {\n $resources = Resource::orderBy('description')->get();\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "7e6f0d9f30924279b300346ae37d90a7", "score": "0.7063389", "text": "public function index()\n {\n $resources = Table_resources::all();\n return view(\"admin.resource.list\",['resources'=>$resources]);\n }", "title": "" }, { "docid": "05a3a1abee5cdb637e4ecb2bed78f793", "score": "0.7044714", "text": "public function index() {\n ${$this->resources} = $this->model->orderBy('created_at', 'DESC')\n ->paginate(Variables::get('items_per_page'));\n\n return view($this->view_path . '.index', compact($this->resources));\n }", "title": "" }, { "docid": "d755a2c0bd42a2f83eb1df7236545733", "score": "0.7039909", "text": "public function index()\n {\n $request = app(Request::class);\n $listbuilder = app(ListBuilder::class);\n $args = $request->route()->parameters();\n\n $slug = (empty($this->slug)) ? substr($request->getPathInfo(), 1) : $this->slug;\n $list_slug = (empty($this->list_slug)) ? $slug : $this->list_slug;\n\n $collection = $this->getListQuery($request, $args);\n $total = $collection->total();\n $list_data = $this->getListData($request, $args);\n $list_class = $this->getListClass();\n\n $list = $listbuilder->build($list_class, $collection, [\n 'show_action' => false,\n 'slug' => $list_slug,\n 'data' => $list_data,\n ]);\n $filter = $this->list_filter;\n $show_add = $this->show_add;\n\n $heading = $this->getIndexBreadcrumb($request, $args, $total);\n $object_name = $this->object_name;\n\n if($request->ajax()) {\n return view($this->list_view, compact('list', 'heading', 'filter', 'show_add', 'args', 'object_name', 'total', 'request', 'list_data'));\n } else {\n $layout = $this->layout;\n $section = $this->section;\n $view = $this->list_view;\n return view('cms-package::default-resources.layout-extender', compact('list', 'heading', 'filter', 'show_add', 'args', 'object_name', 'layout', 'section', 'view', 'total', 'request', 'list_data'));\n }\n }", "title": "" }, { "docid": "fb3f72e030e93427b7b0611e0dd87596", "score": "0.70328826", "text": "public function actionRestList()\n {\n $this->doRestList();\n }", "title": "" }, { "docid": "0efbc638dffdcac13f3ee9915260ba01", "score": "0.70086366", "text": "public function actionIndex() {\n $items = $this->getItems();\n self::ret($items);\n }", "title": "" }, { "docid": "349599c7292a71cd03fc4c4ffdd1f19b", "score": "0.7004859", "text": "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_personModel->getPersons();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "title": "" }, { "docid": "5caa574ebf95b5ac2455613f57b23c8e", "score": "0.7001385", "text": "public function listAction(){\n\t\t$view = Zend_Registry::get('view');\n\t\t$table = new Aluno();\n\t\t$table->getCollection();\n\t\t$this->_response->setBody($view->render('default.phtml'));\n\t}", "title": "" }, { "docid": "ca1a292f025cf9b2b20d1b3eacf7ae21", "score": "0.6937133", "text": "public function index()\n {\n $this->pageTitle = 'Resources';\n $this->pageIcon = 'ti-folder';\n $this->icons = $this->icons();\n $this->resources = Resource::paginate(15);\n $this->trashCount = Resource::onlyTrashed()->count();\n\n return view('resource::member.index', $this->data);\n }", "title": "" }, { "docid": "b68550d3783cf092706159aad39af9a4", "score": "0.69189066", "text": "public function indexAction()\n {\n $request = $this->getRequest();\n $recordType = $request->getParam('api_record_type');\n $resource = $request->getParam('api_resource');\n $page = $request->getQuery('page', 1);\n\n $this->_validateRecordType($recordType);\n\n // Determine the results per page.\n $perPageMax = (int) get_option('api_per_page');\n $perPageUser = (int) $request->getQuery('per_page');\n $perPage = ($perPageUser < $perPageMax && $perPageUser > 0) ? $perPageUser : $perPageMax;\n\n // Get the records and the result count.\n $recordsTable = $this->_helper->db->getTable($recordType);\n $totalResults = $recordsTable->count($_GET);\n $records = $recordsTable->findBy($_GET, $perPage, $page);\n\n // Set the non-standard Omeka-Total-Results header.\n $this->getResponse()->setHeader('Omeka-Total-Results', $totalResults);\n\n // Set the Link header for pagination.\n $this->_setLinkHeader($perPage, $page, $totalResults, $resource);\n\n // Build the data array.\n $data = array();\n $recordAdapter = $this->_getRecordAdapter($recordType);\n foreach ($records as $record) {\n $data[] = $this->_getRepresentation($recordAdapter, $record, $resource);\n }\n\n $this->_helper->jsonApi($data);\n }", "title": "" }, { "docid": "1c09e7c92f1c21d273b8b885cd8bfa5f", "score": "0.6918077", "text": "public function listing()\n\t{\n\t\t/* Get request variables */\n\t\t$category = Request::getString('category', null);\n\t\t$sort = Request::getString('sort', BluApplication::getSetting('listingSort', 'date'));\n\t\t$page = Request::getInt('page', 1);\n\n\t\t/* Get parameters. */\n\t\t$total = true;\n\t\t$limit = BluApplication::getSetting('listingLength', 9);\n\t\tswitch($sort){\n\t\t\tcase 'owner':\n\t\t\t\t$function = 'Owned';\n\t\t\t\tbreak;\n\n\t\t\tcase 'title':\n\t\t\t\t$function = 'Alphabetical';\n\t\t\t\tbreak;\n\n\t\t\tcase 'comments':\n\t\t\t\t$function = 'MostCommented';\n\t\t\t\tbreak;\n\n\t\t\tcase 'votes':\n\t\t\t\t$function = 'MostVoted';\n\t\t\t\tbreak;\n\n\t\t\tcase 'views':\n\t\t\t\t$function = 'MostViewed';\n\t\t\t\tbreak;\n\n\t\t\tcase 'date':\n\t\t\tdefault:\n\t\t\t\t$sort = 'date';\n\t\t\t\t$function = 'Latest';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t/* Get data. */\n\t\t$itemsModel = $this->getModel('items')->set('category', $category);\n\t\t$items = $itemsModel->{'get'.$function}($this->_itemtype, ($page - 1) * $limit, $limit, $total);\n\n\t\t/* Prepare pagination */\n\t\t$pagination = Pagination::simple(array(\n\t\t\t'limit' => $limit,\n\t\t\t'total' => $total,\n\t\t\t'current' => $page,\n\t\t\t'url' => '?sort=' . urlencode($sort) . '&amp;category=' . urlencode($category) . '&amp;page='\n\t\t));\n\n\t\t/* Load template */\n\t\tinclude($this->listing_template());\n\t}", "title": "" }, { "docid": "a39f80fe6fb15777c044c4596b95aefd", "score": "0.68882495", "text": "public function index()\n {\n\t\t\t\t$Items = Resource::whereStatus(\"ACTIVE\")->get()->toArray();\n\t\t\t\t$Actions = Action::all()->toArray();\n return view('resource.index',compact(\"Items\",\"Actions\"));\n }", "title": "" }, { "docid": "4342e58d9a88e2330015685845c6b214", "score": "0.68863964", "text": "public function index()\n {\n //get all resource categories, order by name\n $categories = ResourceCategoryFacade::with('resources')->orderBy('name');\n\n PageFacade::mimic([\n 'title' => 'Resources'\n ]);\n\n return view('pilot::frontend.resources.index', compact('categories'));\n }", "title": "" }, { "docid": "e62c3e28d314d6ca7e07a98c0154e01f", "score": "0.68825537", "text": "public function index()\n {\n // get articles\n $articles= Api::paginate(10);\n\n //return collection of articles of a resource\n return ApiResource::collection($articles);\n }", "title": "" }, { "docid": "f1d6678e9ee6cd0e2aba29cc6d3a57e6", "score": "0.68781596", "text": "public function listingAction()\r\n {\r\n $oZendDbSelect = new Zend_Db_Select(Zend_Db_Table::getDefaultAdapter());\r\n $oSelect = $oZendDbSelect->from('View_Rrubrique_Listing')->order('r_rub_id asc');\r\n\r\n // Search engine on the query\r\n $oMySearchEngine = new My_Search_Engine($oSelect);\r\n $oMySearchEngine->findWordOn(array('r_rub_libelle' => array('operator' => 'like')));\r\n $oMySearchEngine->findByFields(array(\r\n 'r_rub_id' => array('operator' => 'eql'),\r\n 'actif' => array('operator' => 'eql'),\r\n 'r_rub_libelle' => array('operator' => 'like'),\r\n 'r_tva_type_id' => array('operator' => 'eql'),\r\n 'r_rub_type_id' => array('operator' => 'eql')\r\n ));\r\n $oMySearchEngine->makeOrderBy();\r\n\r\n // Downloading the filtered list in CSV\r\n if ($this->_helper->ContextSwitch()->getCurrentContext() == 'csv') {//context csv\r\n $oAdapterExport = new My_Data_Export_Source_Adapter_Select($oMySearchEngine->getSelect());\r\n $oExport = new My_Data_Export_CSV($oAdapterExport);\r\n $this->view->csv = $oExport->make();\r\n $this->view->filename = Phoenix_Data_Export_Csv::buildFileName();\r\n } // Viewing the filtered list in HTML\r\n else {\r\n // Declaration of the Paginator Adapter\r\n $oAdapter = new Zend_Paginator_Adapter_DbSelect($oMySearchEngine->getSelect());\r\n // Pagination management\r\n $oPaginator = new My_Paginator($oAdapter);\r\n $oPaginator->setCurrentPageNumber($this->_getParam('page'));\r\n $oPaginator->setItemCountPerPage(15);\r\n $this->view->paginator = $oPaginator;\r\n }\r\n }", "title": "" }, { "docid": "c04f0a07b4332dc7490328fd75b7859d", "score": "0.6874425", "text": "public function index()\n {\n // Set Pagination options\n $options = array(\n 'total_items' => {module}::count(),\n 'items_per_page' => 10,\n );\n\n $pagination = Pagination::create($options);\n\n // Get from Model\n $lists = {module}::orderBy('created_at', 'desc')\n ->take(Pagination::limit())\n ->skip(Pagination::offset())\n ->get();\n\n $this->template->title('{module} Index')\n ->set('lists', $lists)\n ->set('pagination', $pagination)\n ->view('index');\n }", "title": "" }, { "docid": "934002dc44d9e88dec4d87456bacf202", "score": "0.68599224", "text": "public function index()\n {\n //Get Cars\n $cars = Car::paginate(15);\n\n // Return Collection of cars\n return CarResource::collection($cars);\n }", "title": "" }, { "docid": "9ba180ed65da59bf2b9a95f1c09cb0ef", "score": "0.68457514", "text": "public function listAction() {\n\t\t$flexSliders = $this->flexSliderRepository->findAll();\n\n\t\t$tplObj = array(\n\t\t\t'configuration' => EmConfiguration::getConfiguration(),\n\t\t\t'data' => $this->contentObject->data,\n\t\t\t'altUid' => uniqid('alt'),\n\t\t\t'flexSliders' => $flexSliders\n\t\t);\n\t\t$this->view->assignMultiple($tplObj);\n\t}", "title": "" }, { "docid": "4b10c5eaaff873799c32bd4500119f37", "score": "0.68380994", "text": "public function index()\n {\n $inventories = Inventory::paginate();\n\n return InventoryResource::collection($inventories);\n }", "title": "" }, { "docid": "3a4c68e643acd61065e40f913519f57a", "score": "0.68314296", "text": "public function index()\n {\n $request = $this->app->request();\n $filter = Filter::fromRequest($request);\n\n $result = $this->profiles->getAll($filter);\n\n $paging = array(\n 'total_pages' => $result['totalPages'],\n 'page' => $result['page'],\n 'sort' => 'asc',\n 'direction' => $result['direction']\n );\n\n $this->_template = 'waterfall/list.twig';\n $this->set(array(\n 'runs' => $result['results'],\n 'search' => $filter->toArray(),\n 'paging' => $paging,\n 'base_url' => 'waterfall.list',\n 'show_handler_select' => true,\n ));\n }", "title": "" }, { "docid": "874f996d6d98ea380f469ff6759de504", "score": "0.6829909", "text": "public function actionList(){\r\n\t\t$contacts = Contacts::find();\t\t\r\n\t\t\r\n\t\trender('list',array(\r\n\t\t\t'title'\t\t\t=> 'Showing all Contacts on database',\r\n\t\t\t'contacts'\t=> $contacts\t\t\r\n\t\t));\t\t\r\n\t}", "title": "" }, { "docid": "e0e7982de8f7a8c918aef7f3a34c9a7d", "score": "0.6822929", "text": "public function index()\n {\n return TierlistResource::collection(Tierlist::newly()->paginate());\n }", "title": "" }, { "docid": "e662e21bf83b7498445e86cb8e8d5a50", "score": "0.68194026", "text": "public function index()\n {\n // To make sure that we only show records of current user\n $query = $this->getModel();\n\n // Allow to filter results in query string\n $query = $this->applyQueryStringFilter($query);\n\n // If this controller is sortable\n if ($this->getOlutOptions('sortable') === true) {\n $query = $query->orderBy('order');\n }\n\n // Eager loading\n if ($prefetch = $this->getOlutOptions('prefetch')) {\n $query = $query->with($prefetch);\n }\n\n $query = $this->oulutCustomIndexQuery($query);\n\n // Pagination please\n $perPage = (int) Input::get('perPage', Config::get('view.perPage'));\n $perPage = $perPage < 0 ? 0 : $perPage;\n $items = $query->paginate($perPage);\n\n return $this->renderList($items);\n }", "title": "" }, { "docid": "26f44273688d9b90c69abab35c8e4854", "score": "0.6802107", "text": "public function index()\n {\n // $this->authorize('isAdmin');\n return ItemResource::collection(Item::latest()->get());\n }", "title": "" }, { "docid": "24c960a369d6f3101a5432770f2cc5c4", "score": "0.6795378", "text": "public function listAction(){\n $this->view->role = Auth_Info::getUser()->user_type;\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';Start action');\n \n if($this->getRequest()->isGet()&&!isset($this->_input->page)){\n $this->session->removeData(self::SESSION_KEY_SEARCH);\n }\n $this->session->removeData(self::SESSION_KEY_PAGE);\n $this->session->removeData(self::SESSION_KEY_RETURN_DETAIL);\n $page = null;\n if ($this->getRequest()->isPost()) {\n $where = $this->_input->getEscaped();\n\n } else {\n $where = $this->session->getData(self::SESSION_KEY_SEARCH);\n if (is_null($where)) {\n $where = array();\n }\n $page = isset($this->_input->page) ? $this->_input->page : $this->session->getData(self::SESSION_KEY_PAGE);\n }\n $this->getRequest()->setParams($where);\n $this->session->setModuleScope(self::SESSION_KEY_SEARCH, $where);\n $this->session->setModuleScope(self::SESSION_KEY_PAGE, $page);\n\n $select = MFaqs::getInstance()->getListSelectEU($where);\n $this->view->max_display_char = Zynas_Registry::getConfig()->constants->max_display_char;\n $this->view->paginator = Zynas_Paginator::factoryWithOptions($select, $page, $this->view);\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';End action');\n }", "title": "" }, { "docid": "2bf2ec527100629f6d7d50c50d603001", "score": "0.6783082", "text": "function list() {\n /* fetches all entries in table student for listing.\n * ---------------------------------------------- */\n Debug::echo(\"GET /api/student/list\");\n \n $listAll = new ListAll();\n $listAll->main(); \n }", "title": "" }, { "docid": "ae6ac1129584c76c474a8718bca91c33", "score": "0.6780087", "text": "public function ListView() {\n $this->Render();\n }", "title": "" }, { "docid": "40e0ec86808c42433eec790a68931477", "score": "0.6770408", "text": "public function indexAction() {\n\t\t$this->view->assign('resources', $this->modelReflectionService->getResources());\n\t\t$this->view->assign('routes', $this->getRoutes());\n\t}", "title": "" }, { "docid": "c972e2ad36aea9593c2ac76cbc11b8bf", "score": "0.6767648", "text": "public function index()\n {\n return Restful::collection($this->getRepository()->all());\n }", "title": "" }, { "docid": "a611acae3e681926a6968198c5dab110", "score": "0.6765221", "text": "public function index()\n {\n $list = view('site.client.listing')->render();\n return $list;\n }", "title": "" }, { "docid": "602ed8dee2e015ea55511aa59ba3ed40", "score": "0.6761819", "text": "public function showList()\n {\n return view();\n }", "title": "" }, { "docid": "902d092c31e6544c2b9cf0edfb02ea3a", "score": "0.6750531", "text": "public function index()\n {\n return view('admin.listing.index')->withListings(Listing::all());\n }", "title": "" }, { "docid": "8eef2b9b847b9c58a5cfb5d664f2e780", "score": "0.6748404", "text": "public function listAction() {\n\t\tif ($this->request->hasArgument('selectedCategories')) {\n\t\t\t$selectedCategories = $this->request->getArgument('selectedCategories');\n\t\t\t$this->view->assign('objects', $this->exampleRepository->findByCategories($selectedCategories));\n\t\t\t$this->view->assign('selectedCategories', $this->categoriesRepository->findSelectedCategories($selectedCategories));\n\t\t} else {\n\t\t\t$this->view->assign('objects', $this->exampleRepository->findAll());\n\t\t}\n\t\t$this->view->assign('arguments', $this->request->getArguments());\n\t}", "title": "" }, { "docid": "21b5c64ea30098dcc23c030c81b33431", "score": "0.6747242", "text": "public function index()\n {\n //\n\n if (Auth::user()->hasRole('Admin')) {\n $resources = MyResource::latest()->paginate(5);\n } else {\n $resources = MyResource::where('user_id', Auth::user()->id)->latest()->paginate(5);\n }\n\n return view('resources.index', compact('resources'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6742193", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "b6c185d0aed440370b1e22ff2d401da5", "score": "0.6724648", "text": "public function index()\n {\n $this->load->library('pagination');\n\n $count = $this->model->listingCount($this->listing_config);\n\n $returns = $this->paginationCompress( $this->config['page'].\"/\", $count, 15 );\n\n $data['objects'] = $this->model->listing($returns[\"per_page\"], $returns[\"segment\"],$this->listing_config);\n $data['pageVar'] = $this->config;\n $data['columns'] = $this->listing;\n $data['config'] = $this->listing_config;\n\n $this->global['pageTitle'] = $this->config['pageName'] ;\n\n $this->loadViews(\"admin/CRUD_R\", $this->global, $data, NULL);\n }", "title": "" }, { "docid": "ce95675bc5d2c976a855abe40a22da29", "score": "0.67158294", "text": "public function index()\n {\n // Get Books\n $books = Books::orderBy('created_at', 'desc') ->paginate(5);\n\n // Return collection of books as a resource\n return BooksResource::collection($books);\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "afcbd1f71b8bf87347a3fa60719ba0be", "score": "0.67056316", "text": "public function index() {\n\t\t$datas = DAO::getAll ( $this->model );\n\t\techo $this->_getResponseFormatter ()->get ( $datas );\n\t}", "title": "" }, { "docid": "4bc4ef9abd1fba68e2b86b542b49eca2", "score": "0.67025477", "text": "public function listAction() {\n\t\t// Preload info\n\t\t$this->view->viewer = $viewer = Engine_Api::_ ()->user ()->getViewer ();\n\t\t$this->view->owner = $owner = Engine_Api::_ ()->getItem ( 'user', $this->_getParam ( 'user_id' ) );\n\t\tEngine_Api::_ ()->core ()->setSubject ( $owner );\n\n\t\tif (! $this->_helper->requireSubject ()->isValid ()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Search Params\n\t\t$form = new Ynblog_Form_Search ();\n\t\t$form->isValid ( $this->_getAllParams () );\n\t\t$params = $form->getValues ();\n\t\t$params ['date'] = $this->_getParam ( 'date' );\n\t\t$this->view->formValues = $params;\n\n\t\t$params ['user_id'] = $owner->getIdentity ();\n\t\t$params ['draft'] = 0;\n\t\t$params ['is_approved'] = 1;\n\t\t$params ['visible'] = 1;\n\n\t\t// Get paginator\n\t\t$this->view->paginator = $paginator = Engine_Api::_ ()->ynblog ()->getBlogsPaginator ( $params );\n\t\t$items_per_page = Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'ynblog.page', 10 );\n\t\t$paginator->setItemCountPerPage ( $items_per_page );\n\t\tif (isset ( $params ['page'] )) {\n\t\t\t$this->view->paginator = $paginator->setCurrentPageNumber ( $params ['page'] );\n\t\t}\n\t\t// Render\n\t\t$this->_helper->content->setEnabled ();\n\t}", "title": "" }, { "docid": "c2e0dc884bf03158662e5bf33ae92498", "score": "0.67018956", "text": "public function actionList()\n {\n if (!Parameters::hasParam('type'))\n throw new APIException('Invalid resource TYPE (parameter name: \\'type\\')', APIResponseCode::API_INVALID_METHOD_PARAMS);\n \n// if (!Parameters::hasParam('devkey'))\n// throw new APIException('Invalid application DEVELOPER KEY (parameter name: \\'devkey\\')', APIResponseCode::API_INVALID_METHOD_PARAMS);\n \n $resource_type = Parameters::get('type');\n// $devkey = Parameters::get('devkey');\n \n $finder = new YiiResourceFinder($resource_type);\n// $finder->setDevKey($devkey);\n $result = $finder->findAll();\n \n $dataSet = array();\n foreach ($result as $object) {\n $dataSet[] = $object->getAttributes();\n }\n \n $format = Parameters::hasParam('format') ? Parameters::get('format') : 'json';\n $coder = ObjectCodingFactory::factory()->createObject($format);\n if ($coder === null)\n throw new APIException('Invalid Coder for format', APIResponseCode::API_INVALID_CODER);\n \n $response = $coder->encode($dataSet);\n \n echo $response;\n }", "title": "" }, { "docid": "81277fc0f68d7bdc3634177cde0439a7", "score": "0.66943973", "text": "public function list()\n {\n $books = Book::visible();\n\n return $this->apiListingResponse($books, [\n 'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'owned_by', 'image_id',\n ]);\n }", "title": "" }, { "docid": "7c934a7b8506c7db64d5ad367d48f525", "score": "0.6692943", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Servers list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the servers.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/servers/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Servers::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "59dfb79d5d5452f4f70e9cf4eec1e070", "score": "0.66803515", "text": "public function index()\n {\n //Get Articles\n\n $articles = Articles::paginate(15);\n\n // Return collection of articles as a resource\n return ArticlesResource::collection($articles);\n \n }", "title": "" }, { "docid": "88425de2823c6c6b170f46c36cff4af3", "score": "0.6677779", "text": "public function index()\n {\n $this->callHook('beforeIndex');\n $this->crud->hasAccessOrFail('list');\n\n $this->data[ 'crud' ] = $this->crud;\n $this->data[ 'title' ] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if ( !$this->data[ 'crud' ]->ajaxTable() ) {\n $this->data[ 'entries' ] = $this->data[ 'crud' ]->getEntries();\n }\n\n $this->callHook('afterIndex');\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "345876c650e46751471c85aa681fe81d", "score": "0.6673378", "text": "public function index()\n {\n //Get employees\n $employees = Employee::Paginate(15);\n //Return Employees as collection\n return EmployeeResource::collection($employees);\n }", "title": "" }, { "docid": "637eadb6ce19bd72fb45f6d4655ad277", "score": "0.66667867", "text": "public function listAction(){\r\n $userRepository = new \\Itb\\Model\\UserRepository();\r\n $users = $userRepository->getAll();\r\n\r\n $argsArray = ['users' => $users];\r\n $templateName = 'list';\r\n return $this->app['twig']->render($templateName . '.html.twig', $argsArray);\r\n }", "title": "" }, { "docid": "f3eff99c83c1adfe50ea93c0e478d078", "score": "0.66651416", "text": "public function index()\n {\n $students = Student::all();\n return (new StudentResourceCollection($students))->response();\n }", "title": "" }, { "docid": "4cfaa693b1306205053c160e2512565f", "score": "0.66650486", "text": "public function index()\n {\n $employees = Employee::all();\n return EmployeeForListResource::collection($employees);\n }", "title": "" }, { "docid": "f7578349cae5019055b4943e15786163", "score": "0.6661141", "text": "public function index()\n {\n //Get product\n $product = Products::paginate(15);\n \n //Return collection of product as a resource\n return ProductsResource::collection($product);\n }", "title": "" }, { "docid": "6f716fb0d645620791c39e3c2af2b242", "score": "0.66564786", "text": "function index() {\n Event::run('system.404');\n if ( ! A2::instance()->allowed('recruit', 'manage'))\n Event::run('system.403');\n \n $this->title = 'Manage Recruitment Lists';\n $this->lists = ORM::factory('recruit_list')->get();\n }", "title": "" }, { "docid": "5048b1d929efd7b88543fcf092cf843a", "score": "0.66558444", "text": "public function index()\n {\n return response(\n RecipeList::all()\n );\n }", "title": "" }, { "docid": "78496e0d8128f2673df1944c04d854e7", "score": "0.6653842", "text": "public function index()\n {\n $results = $this->Paginator->paginate($this->Results->find()->order(['created' => 'DESC']));\n $this->set(compact('results'));\n }", "title": "" }, { "docid": "2947b2c8c3c02fb9550821c40f31fc67", "score": "0.6650542", "text": "function list() {\n $data = $this->handler->handleList();\n\n $page = new Page(\"Roles\", \"Roles\");\n $page->top();\n\n listView($data);\n\n $page->bottom();\n }", "title": "" }, { "docid": "a2a6ac8b209515c5bee6b4f54354fdf5", "score": "0.66499305", "text": "public function index()\n {\n return LivreResource::collection(Livre::paginate(25));\n }", "title": "" }, { "docid": "726c696b08b65fb98a73b42e4ea85b29", "score": "0.6629493", "text": "public function index()\n {\n $products = Product::paginate(10);\n\n return ProductResource::collection($products);\n\n }", "title": "" }, { "docid": "c790cdb69ca9826f2d216ed3504b7bf4", "score": "0.66200316", "text": "public function list_( $args = array(), $assoc_args = array() ) {\n\n\t\t$assoc_args['all'] = 1;\n\n\t\t$this->get( $args, $assoc_args );\n\t}", "title": "" }, { "docid": "1d411fb7a37e8af4ad44010eef0ae6f9", "score": "0.66184205", "text": "public function index()\n {\n // Get the paginator using the parent API\n $paginator = $this->api()->index();\n\n // Show collection as a paginated table\n $collection = $paginator->getCollection();\n return $this->content('index', compact('paginator', 'collection'));\n }", "title": "" }, { "docid": "7d5ab4818059473cc9dd3d9aa19144cc", "score": "0.6611835", "text": "public function index()\n {\n $layanan = Layanan::paginate('15');\n return LayananResource::collection($layanan);\n }", "title": "" }, { "docid": "5284e0e8a629d94b2c297dec365035f8", "score": "0.6611247", "text": "function index(){\n\n\t\t$this->post_listing($start=0);\n\n\t}", "title": "" }, { "docid": "0b23f3dc133820a3f769ef803e71d588", "score": "0.6609974", "text": "public function listAction()\n\t{\n\t\t$module = $this->_useModules ? $this->_moduleName.'/' : '';\n\t\t\n\t\tZend_Paginator::setDefaultScrollingStyle('Sliding');\n\n\t\tZend_View_Helper_PaginationControl::setDefaultViewPartial('list.phtml');\n\n\t\t$this->_currentPage = $this->_getParam('page',1);\n\t\t$this->_currentPage = $this->_currentPage < 1 ? 1 : $this->_currentPage;\n\n\t\t$where = isset($this->_post->key) ? ($this->_post->key.\" like '%\".$this->_post->value.\"%'\") : null;\n\n\t\tif ($where == null)\n\t\t{\n\t\t\t$select = $this->_model->select()->\n\t\t\torder($this->_model->getOrderField())->\n\t\t\tlimit($this->_itemsPerPage,($this->_currentPage-1)*$this->_itemsPerPage);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$select = $this->_model->select()->\t\t\n\t\t\twhere($where)->\n\t\t\torder($this->_model->getOrderField())->\n\t\t\tlimit($this->_itemsPerPage,($this->_currentPage-1)*$this->_itemsPerPage);\t\t\t\n\t\t}\t\t\n\t\t\n\t\t$rows = $this->_model->fetchAll($select);\t\t\n\n\t\t$profile = $this->_profiler->getLastQueryProfile();\n\n\t\t$paginator = Zend_Paginator::factory($rows);\n\n\t\t$paginator->setCurrentPageNumber($thi->_currentPage)\n\t\t\t\t\t->setItemCountPerPage($this->_itemsPerPage);\n\t\t\n\t\t/** TODO get total of records for $totalOfItems \n\t\t * @var unknown_type\n\t\t */\n\t\t$totalOfItems = $this->_itemsPerPage;\n\n\t\t$this->_lastPage = (int)(($totalOfItems/$this->_itemsPerPage));\n\n\t\t$html = new Fgsl_Html();\n\n\t\t$html->addDecorator(Fgsl_Html_Constants::HTML_DECORATOR_TABLE);\n\n\t\t$records = array();\n\n\t\t$fieldKey = $this->_model->getFieldKey();\n\n\t\t$currentItems = $paginator->getCurrentItems();\n\t\tforeach ($currentItems as $row)\n\t\t{\n\t\t\t$records[] = array();\n\t\t\t\t\n\t\t\t$id = $row->$fieldKey;\n\t\t\t$records[count($records)-1][$this->_model->getFieldLabel($fieldKey)] = '<a href=\"'.BASE_URL.$module.$this->_controllerAction.'/edit/'.$fieldKey.'/'.$id.'\">'.$id.'</a>';\n\t\t\t\t\n\t\t\tforeach ($this->_fieldNames as $fieldName)\n\t\t\t{\n\t\t\t\tif ($fieldName == $fieldKey) continue;\n\t\t\t\t$records[count($records)-1][$this->_model->getFieldLabel($fieldName)] = $row->$fieldName;\n\t\t\t}\n\t\t\t\t\n\t\t\t$records[count($records)-1]['remove'] = '<a href=\"'.BASE_URL.$module.$this->_controllerAction.'/remove/'.$fieldKey.'/'.$id.'\">X</a>';\n\t\t}\n\t\t$this->_model->setRelationships($records);\t\t\n\t\t\n\t\t$this->_table = $html->create($records,Fgsl_Html_Constants::HTML_DECORATOR_TABLE);\t\t\n\n\t\t$this->configureViewAssign();\n\t\t$this->_view->render('list.phtml');\n\t}", "title": "" }, { "docid": "25424750ec44aa26547175ff6ccff0e1", "score": "0.66043633", "text": "public function index()\n {\n $posts = Post::listAllPublished();\n\n return PostResourceListing::collection($posts)->additional(['message' => 'ok', 'success' => true]);\n }", "title": "" }, { "docid": "7848eedd65d74e3882f897e7b74ca571", "score": "0.65999943", "text": "public function apiListsAction() {\n\t\t$api = $this->_param( 'api' );\n\n\t\tif ( ! $api || ! array_key_exists( $api, Thrive_Dash_List_Manager::available() ) ) {\n\t\t\texit();\n\t\t}\n\t\t$connection = Thrive_Dash_List_Manager::connectionInstance( $api );\n\n\t\techo $this->_view( 'partials/api-lists', array(\n\t\t\t'selected_api' => $connection,\n\t\t\t'connection' => $connection,\n\t\t\t'lists' => $connection->getLists( $this->_param( 'force_fetch' ) ? false : true )\n\t\t) );\n\n\t\texit();\n\t}", "title": "" }, { "docid": "71c5dbf8452cd67d212ff39d40f0c37d", "score": "0.65966225", "text": "public function index()\n {\n $students = Student::all();\n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "15871bf4ada7393bc878944a01d437da", "score": "0.6594662", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_role->get_all();\n\t\t$this->template->set('title', 'Role List');\n\t\t$this->template->load('template', 'contents', 'role/list', $data);\n\t}", "title": "" }, { "docid": "41f78864c980c5b1e66654bd42f82083", "score": "0.65942985", "text": "public function listAction ()\n {\n $lans = new Application_Model_Mapper_LansMapper();\n $currentLans = $lans->fetchCurrent();\n $comingLans = $lans->fetchComing();\n $passedLans = $lans->fetchPassed();\n $this->view->currentLans = $currentLans;\n $this->view->comingLans = $comingLans;\n $this->view->passedLans = $passedLans;\n return;\n }", "title": "" }, { "docid": "af4f1232545bca0bcf287f1972d50981", "score": "0.6587391", "text": "public function listingAction() {\n\t\t$viewer = Engine_Api::_ ()->user ()->getViewer ();\n\t\t$params = $this -> _getAllParams();\n\t\t$ids = array ();\n\t\t// Do the show thingy\n\t\tif (isset($params ['by_authors'] ) && in_array('networks', $params['by_authors'])) \n\t\t{\n\t\t\t// Get an array of user ids\n\t\t\t\n\t\t\t$network_table = Engine_Api::_()->getDbtable('membership', 'network');\n \t\t$network_select = $network_table->select()->where('user_id = ?', $viewer -> getIdentity());\n \t\t$networks = $network_table->fetchAll($network_select);\n\t\t\tforeach($networks as $network)\n\t\t\t{\n\t\t\t\t$network_select = $network_table->select()->where('resource_id = ?', $network -> resource_id) -> where(\"active = 1\");\n \t\t\t$users = $network_table->fetchAll($network_select);\n\t\t\t\tforeach ( $users as $user ) {\n\t\t\t\t\t$ids [] = $user->user_id;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif (isset($params ['by_authors'] ) && in_array('professional', $params['by_authors'])) \n\t\t{\n\t\t\t$userIds = Engine_Api::_() -> user() -> getProfessionalUsers();\n\t\t\tforeach ($userIds as $id) {\n\t\t\t\t$ids [] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$params ['users'] = $ids;\n\t\t\n\t\t// Get blog paginator\n\t\t$paginator = Engine_Api::_ ()->ynblog ()->getBlogsPaginator ( $params );\n\t\t$items_per_page = Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'ynblog.page', 10 );\n\t\t$paginator->setItemCountPerPage ( $items_per_page );\n\n\t\tif (isset ( $params ['page'] )) {\n\t\t\t$paginator->setCurrentPageNumber ( $params ['page'] );\n\t\t}\n\t\t$this->view->paginator = $paginator;\n\t\t// Render\n\t\t$this->_helper->content->setEnabled ();\n\t}", "title": "" }, { "docid": "ca351a6c1fb5996a24802e4695371409", "score": "0.6585022", "text": "public function index()\n {\n $students = Student::all();\n \n return $this->sendResponse(StudentResource::collection($students), 'Students retrieved.');\n }", "title": "" }, { "docid": "ee362204073e5cbb647d776b2ab10940", "score": "0.6583899", "text": "public function indexAction()\n {\n $this->display();\n }", "title": "" }, { "docid": "ee0f12e894ffa19b553c5842d61bc92f", "score": "0.65838", "text": "public function list()\n {\n return view('Demo::list');\n }", "title": "" }, { "docid": "7e85268d6b01a017717a7d038d6b5c73", "score": "0.65802336", "text": "public function index()\n {\n $book = Book::paginate(2);\n return BookResource::collection($book);\n }", "title": "" }, { "docid": "8fd0dba76f9273c1033b432a513959af", "score": "0.65758175", "text": "public function doRestList()\n {\n $this->renderJson(array('success'=>true, 'message'=>'Records Retrieved Successfully', 'data'=>$this->getModel()->findAll()));\n }", "title": "" }, { "docid": "939f04db957f01973a6f0fa7f41c4007", "score": "0.657049", "text": "public function index()\n {\n $cond = Resource::where('id', '>', -1);\n $resources = $cond->get();\n\n $deviceList = [];\n foreach ($resources as $resource) {\n $data = [];\n $data['id'] = $resource->id;\n $data['name'] = $resource->name;\n $data['size'] = $resource->size;\n $data['created_at'] = $resource->created_at;\n\n array_push($deviceList, $data);\n }\n\n return view('resources', array('resources' => $deviceList));\n }", "title": "" }, { "docid": "d3d661b18964ba7ea7a108ea11a1a8a3", "score": "0.6568526", "text": "public function list ()\n {\n // Récupération de TOUS les articles avec le REPOSITORY\n // 1. Récupération du repository Article\n $articleRepository = $this->getDoctrine()\n ->getRepository(Article::class);\n\n // 2. Appel à la fonction findAll\n $liste = $articleRepository->findAll();\n\n // Renvoi de la liste à la vue\n return $this->render('article/list.html.twig', [\n 'listeArticles' => $liste\n ]);\n }", "title": "" }, { "docid": "7b5e2b301434be8bca6abbff68773c36", "score": "0.6567384", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate(10));\n }", "title": "" }, { "docid": "81cae78d81b024602d92e06f78dd089e", "score": "0.65654266", "text": "public function list() {\n $article = new article();\n echo \"<h2 class='text-center m-5 border-bottom border-dark pb-5'>la page qui affiche la liste des articles</h2>\";\n $articleManager = $this->getDoctrine()->getRepository(article::class);\n $articles = $articleManager->findById();\n return $this->render('listeView.html.twig', ['articles' => $articles]);\n }", "title": "" }, { "docid": "b06d85985f7ef908e89d4534e8f29c97", "score": "0.6552259", "text": "public function index()\n {\n\t\t\treturn $this->respond($this->model\n ->orderBy('created_at', 'asc')\n ->findAll());\n }", "title": "" }, { "docid": "4d53d7254450e0c10db064ccddb74ae9", "score": "0.6551876", "text": "public function showAction()\n {\n $list = $this->listFactory->createList($this->dataBackend, $this->configurationBuilder);\n $renderedCaptions = $this->rendererChain->renderCaptions($list->getListHeader());\n $columnSelector = $this->columnSelectorFactory->getInstance($this->configurationBuilder);\n\n $this->view->assign('columnSelector', $columnSelector);\n $this->view->assign('listHeader', $list->getListHeader());\n $this->view->assign('listCaptions', $renderedCaptions);\n }", "title": "" }, { "docid": "e6be331bf6ee794db504703782e4abe5", "score": "0.65461046", "text": "public function index()\n {\n $items = Item::all();\n return view('list',compact('items'));\n }", "title": "" }, { "docid": "e8f09968b69af986e66d5cd3f404f3ad", "score": "0.6535171", "text": "public static function list() {\n $data = [\n 'pages' => PageService::get()\n ];\n\n Twig::render('pillar/layouts/pillar-pages', $data);\n }", "title": "" }, { "docid": "497bb71da959ab5e52433887d4acf412", "score": "0.6525618", "text": "public function listAction()\r\n {\r\n $form_data = $this->request->getArguments();\r\n \r\n $settings = GeneralUtility::makeInstance(ConfigurationObject::class);\r\n $itemsPerPage = (int)$settings->getPaginateItemsPerPage();\r\n\r\n if($form_data) {\r\n $objects = $this->objectimmoRepository->getAllObjectsBySearch($form_data);\r\n } else {\r\n $objects = $this->objectimmoRepository->getAllObjects();\r\n }\r\n \r\n $GLOBALS['TSFE']->fe_user->setKey('ses', 'search', $form_data);\r\n \r\n $count_objects = count($objects);\r\n\r\n $this->view->assign('objects', $objects);\r\n $this->view->assign('count_objects', $count_objects);\r\n $this->view->assign('itemsPerPage', $itemsPerPage);\r\n }", "title": "" }, { "docid": "365ef354e23f522e48d950c7ede25035", "score": "0.65234184", "text": "public function listAction()\n {\n return $this->render('task/list.html.twig',\n ['tasks' => $this->getDoctrine()->getRepository('AppBundle:Task')->findAllTask()]\n );\n }", "title": "" }, { "docid": "50b4e9cfb2f2db278dc000419368b6b9", "score": "0.65208316", "text": "public function index()\n {\n //Using Eloquent to get all the news in latest order. This is wil expose all the data\n //return Questions::latest()->get();\n\n //Use pagination\n //return Questions::latest()->paginate(1);\n\n //Using the \"QuestionResource\" API Resource wrapper to expose only the specified data without pagination\n //return QuestionResource::collection(Questions::latest());\n\n //Using the \"QuestionResource\" API Resource wrapper to expose only the specified data with pagination - set to return 5 items per page\n return QuestionResource::collection(Questions::latest()->paginate(5));\n\n }", "title": "" }, { "docid": "889d04be26f484433ced3afeb258119e", "score": "0.6518248", "text": "public function index()\n {\n return EmployeeResource::collection(Employee::paginate(10));\n }", "title": "" }, { "docid": "4ba8a9b727755a6ba7f5d1c4a619aff0", "score": "0.65151894", "text": "public function index()\n {\n return ReadingListBookResource::collection(ReadingListBook::all());\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "4bac3188558c3acab53dd8d5175c1d4e", "score": "0.0", "text": "public function show($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "d7820004a578ddc16d57dff08d715ef0", "score": "0.70187664", "text": "public function showResource()\n\t{\n\t\treturn view('resources.list')->with('resources', Resources::all());\n\t}", "title": "" }, { "docid": "069b1d099b7ea4aa5397d961e2ee62da", "score": "0.6752789", "text": "public function show()\n {\n //find resource to display\n // $res = Resource::all();\n return view('resources/show');\n }", "title": "" }, { "docid": "426f9c78118dbbe009edc89fcf8571df", "score": "0.6748524", "text": "public function show(Resource $resource)\n {\n //\n\t\t\t\treturn response()->json($resource);\n }", "title": "" }, { "docid": "e383b8f1e186862fb82733fa719d3590", "score": "0.66141546", "text": "public function show(ResourceRetriever $listener, $resourceId);", "title": "" }, { "docid": "d9105f21226c250782ad227b6b2261e2", "score": "0.65124357", "text": "public function actionView()\n\t{ \n $id=isset($_GET['id']) ? (int) ($_GET['id']) : 0 ;\n $this->menu=array_merge($this->menu, \n array(\n array('label'=>t('cms','Update this Resource'), 'url'=>array('update','id'=>$id),'linkOptions'=>array('class'=>'button')),\n array('label'=>t('cms','View this Resource'), 'url'=>array('view','id'=>$id),'linkOptions'=>array('class'=>'button'))\n )\n );\n\t\t$this->render('resource_view');\n\t}", "title": "" }, { "docid": "7ac5c8e634cbf2fdc36370cd8ef57eee", "score": "0.6199778", "text": "function display($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t\techo \"<strong>Armored Core</strong>: ac_block:: display(): function <strong><u>ac_block::display()</u></strong> is disabled, please fetch html resource string by <strong><u>ac_block::fetch_block()</u></strong>.\";\n\t}", "title": "" }, { "docid": "33cfc48a18162e20c7127b1127d7db87", "score": "0.61841017", "text": "public function showAction()\n {\n $context = YuppContext::getInstance();\n \n $id = $this->params['id'];\n $clazz = String::firstToUpper( $context->getController() );\n\n // La clase debe estar cargada...\n eval ('$obj' . \" = $clazz::get( $id );\");\n\n $this->params['object'] = $obj;\n\n return $this->render(\"show\");\n }", "title": "" }, { "docid": "b4c5ad057e8d450658fdc27a7ae8a914", "score": "0.6173968", "text": "public function show($id)\n {\n $resource = Resource::find($id);\n\n return view('admin.resource.show', [\n 'resource' => $resource\n ]);\n }", "title": "" }, { "docid": "66ee2c88bf8fc141934fcb5cd1ba4add", "score": "0.61682713", "text": "public function output($resource) {\n\t\tprint $resource;\n\t\tif (isset(self::$_resources[$resource])) {\n\t\t\t$res =& self::$_resources[$resource];\n\n\t\t\tif ( $data = $this->getInternalResource($res['data']) ) {\n\t\t\t\t$filename = self::$embedding_file;\n\t\t\t} else {\n\t\t\t\t$filename = $res['data'];\n\t\t\t}\n\n\t\t\t// use last-modified time as etag; etag must be quoted\n\t\t\t$etag = '\"' . filemtime($filename) . '\"';\n\n\t\t\t// check headers for matching etag; if etag hasn't changed, use the cached version\n\t\t\tif (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $_SERVER['HTTP_IF_NONE_MATCH'] == $etag) {\n\t\t\t\theader('HTTP/1.0 304 Not Modified');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\theader('Etag: ' . $etag);\n\n\t\t\t// cache file for at most 30 days\n\t\t\theader('Cache-control: max-age=2592000');\n\n\t\t\t// output resource\n\t\t\theader('Content-type: ' . $res['mime']);\n\n\t\t\tif (isset($data)) {\n\t\t\t\tif (isset($res['base64'])) {\n\t\t\t\t\techo base64_decode($data);\n\t\t\t\t} else {\n\t\t\t\t\techo $data;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treadfile($filename);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "919d00fe86f81c1cf289acf24342adc1", "score": "0.61225873", "text": "public function show($id)\n {\n $resource = $this->service->find($id);\n if(empty($resource))\n {\n Flash::error('Resource não encontrado');\n return redirect(route('resources.index'));\n }\n return view('resources.show')->with('resource', $resource);\n }", "title": "" }, { "docid": "80a8e3a2ce7bc2d1abdfaec188d6155d", "score": "0.6094779", "text": "public function index(Resource $resource)\n {\n session(['resourceId' => $resource->id]);\n\n $contents = $this->getContents();\n\n $noSideBar = true;\n\n // Show the page\n return view('admin.content.index', compact('resource', 'contents', 'noSideBar'));\n }", "title": "" }, { "docid": "d1a990ee04cb4a4e2b071c7b3a0f4626", "score": "0.6077535", "text": "public function editResource($resource) {\n\n $resource = SiteImage::findOrFail($resource);\n\n return View('backoffice.pages.edit_resource', ['resource' => $resource]);\n }", "title": "" }, { "docid": "56e1414df8116772a62d14147c538ffe", "score": "0.6018325", "text": "public function displayAction()\n {\n $dummyEntity = $this->createSampleEntity();\n\n return $this->render('AppBundle:Display:display.html.twig', [\n 'entity' => $dummyEntity\n ]);\n }", "title": "" }, { "docid": "1e891653b5f4912aa409c758d50a1b98", "score": "0.5965172", "text": "function display()\n\t{\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "title": "" }, { "docid": "6e55abfe4978a80ccc782aaf6093b19f", "score": "0.59554774", "text": "public function show($id)\n {\n // return new InformationResource(Information::FindOrFail($id));\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "7b8f897ba2297696b69f6d8202444107", "score": "0.59492433", "text": "public function displayAction()\n {\n $params = $this->dispatcher->getParams();\n if (isset($params[0]) && $firewall = Firewalls::findFirst(intval($params[0]) ? $params[0] : ['name=:name:', 'bind' => ['name' => $params[0]]])) {\n echo Las::display($firewall->name);\n }\n }", "title": "" }, { "docid": "89b549ed67b4702bbd94de618931239c", "score": "0.594717", "text": "public function show()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "bb2e29f5f05ab065358c99c7225d6dc0", "score": "0.59295714", "text": "public function show(rc $rc)\n {\n //\n }", "title": "" }, { "docid": "69c007742a206b83dabf0105e287694e", "score": "0.5917445", "text": "public function show(CardType $resource)\n {\n $student = Student::find(request()->student_id);\n return view(\"card::card.\" . $resource->id, compact(\"student\"));\n }", "title": "" }, { "docid": "10dda82513aea0f93ead687a2ff8c827", "score": "0.5917097", "text": "public function show() {\n if (!$this->resource) return false;\n header(\"Content-Type: \" . $this->mime);\n switch ($this->ext) {\n case \"jpeg\":\n imagejpeg($this->resource);\n break;\n case \"png\":\n imagesavealpha($this->resource, true);\n imagepng($this->resource);\n break;\n }\n }", "title": "" }, { "docid": "d3213bec1042b484f9e7c8a52c4ef16a", "score": "0.5908313", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cfa14f41ec1e2a6c61ae783842b28ca6", "score": "0.5901304", "text": "public function display() {\n $this->doDisplay();\n }", "title": "" }, { "docid": "f67dcafa85455ea74fc8196d8e104a85", "score": "0.5866919", "text": "public function show() //$id\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "478daa75047310b25e75447625fd98fb", "score": "0.58533454", "text": "public function show($id)\n {\n $resource = Resource::find($id);\n $categories = Category::all();\n\n if ($resource) {\n return view('pages.resource_show', compact('categories', 'resource'));\n }\n\n return abort(404);\n }", "title": "" }, { "docid": "e35556f0647fa2dc1cbf13447dae6b50", "score": "0.5820258", "text": "public function show($imageResource) {\n\t\theader('Content-type: image/jpeg');\n\t\theader('Content-disposition: inline');\n\t\timagejpeg($imageResource, null, 88);\n\t}", "title": "" }, { "docid": "004f965420f85c3776edacf6c258a0a6", "score": "0.58097786", "text": "public function display()\r\n {\r\n $this->render();\r\n }", "title": "" }, { "docid": "7960ba0bf337c86c8be237145807953e", "score": "0.5806929", "text": "public function displayAction()\n {\n if (!isset($this->params['nname']))\n {\n $this->flash['message'] = 'No se encuentra la pagina solicitada';\n $page = Page::get(1);\n }\n else\n {\n $pages = Page::findBy( Condition::EQ(Page::TABLE, 'normalizedName', $this->params['nname']), $this->params );\n \n if (count($pages) == 1) $page = $pages[0];\n else\n {\n $this->flash['message'] = 'No se encuentra la pagina solicitada';\n $page = Page::get(1);\n }\n }\n\n $this->params['page'] = $page;\n //return $this->render('../cms/displayPageRO');// no funciona en linux\n return $this->render('../cms/displayPageRO');// no funciona en linux\n }", "title": "" }, { "docid": "426c72f34858b1f8fc0c2377d1350691", "score": "0.58062166", "text": "public function show()\n {\n $arguments = func_get_args()[0];\n $id = $arguments[0];\n\n echo \"Show $id\";\n // return $this->view('example.show');\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "32187e8550924a28a85e5c258d9de919", "score": "0.5793539", "text": "public function display() {\n echo $this->fetch();\n }", "title": "" }, { "docid": "2a2a886f07a7eb66210fab7478b1c2f7", "score": "0.5767577", "text": "public function display()\n {\n\n echo $this->get_display();\n\n }", "title": "" }, { "docid": "0738931a1683e5ef17e57fcbeee2ab9f", "score": "0.5763775", "text": "public function show(Standard $standard)\n {\n //\n }", "title": "" }, { "docid": "0738931a1683e5ef17e57fcbeee2ab9f", "score": "0.5763775", "text": "public function show(Standard $standard)\n {\n //\n }", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5749091", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "93802b97c6f44ae5e366b70deec744b9", "score": "0.5746085", "text": "public function show()\n {\n $results = $this->run('show');\n }", "title": "" }, { "docid": "8f15cdd2f287675d36c7b7df028043ec", "score": "0.5736634", "text": "public function show($id)\n\t{\n\t//\n\t}", "title": "" }, { "docid": "be63c4d6543bd1b7322d86668ae9ef60", "score": "0.5734784", "text": "public function show($id)\n {\n $resource = Str::singular(resourceName());\n $viewPath = collect(explode('/', request()->path()))->slice(0, -2)->implode('.') . '.'.$resource;\n return view($this->viewPrefix . $viewPath, [\"object\" => $this->getObjectFromRoute($id, $this->showWith), \"model\" => ucfirst($resource) ]);\n }", "title": "" }, { "docid": "6cf90dd8b5fe3cf8ddaee25472340d27", "score": "0.5733295", "text": "public function show(Responsable $responsable)\n {\n //\n }", "title": "" }, { "docid": "6cf90dd8b5fe3cf8ddaee25472340d27", "score": "0.5733295", "text": "public function show(Responsable $responsable)\n {\n //\n }", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "6c6591ff03468044c76e66dc3ecca033", "score": "0.57143193", "text": "public function display(): Response;", "title": "" }, { "docid": "1926665de574ded82e5d782a6ff9192f", "score": "0.57088506", "text": "public function show(Field $field){\n \treturn new FieldResource($field);\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "28c1222465a2cbce21a616ec72fbd790", "score": "0.57036674", "text": "public static function resource($resource, $controller, $options = array()){\n\t\t Illuminate\\Routing\\Router::resource($resource, $controller, $options);\n\t }", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "1708ac3bf00aa20f618f27d019302e26", "score": "0.5698314", "text": "public function show() \n {\n echo $this->get();\n }", "title": "" }, { "docid": "f434227a79e3f2ef6339c28c9de58720", "score": "0.56981796", "text": "public function show($id)\n {\n return \"display your post here\";\n }", "title": "" }, { "docid": "e9865313c984d3a82e52245c0631382c", "score": "0.56956863", "text": "public static function showResource($module ='', $model_name ='', $resource_id = 0, $resource_field = '', $relationship = [])\n\t{\n\t\t$source = \"\\App\\Modules\\\\\".$module.\"\\Models\\\\\".$model_name;\n\t\t$model = $source::find($resource_id);\n\t\tif (count($relationship)) {\n\t\t\t// $model = $source::with($relationship)->where($resource_field, '=', $resource_id)->first();\n\t\t\t$model = $source::with($relationship)->find($resource_id);\n\t\t}\n\t\tif ($model) {\n\t\t\t$response = [\n\t\t\t\t'code'\t\t=> '200',\n\t\t\t\t'status'\t=> StatusHelper::getSuccessResponseStatus(),\n\t\t\t\t'data'\t\t=> $model->toArray()\n\t\t\t];\n\t\t}\n\t\telse {\n\t\t\t$response = [\n\t\t\t\t'code'\t\t=> '404',\n\t\t\t\t'status'\t=> StatusHelper::getNotFoundResponseStatus(),\n\t\t\t\t'message'\t=> 'Resource not found.'\n\t\t\t];\n\t\t}\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "9032057600ac1cb05d858c6264b8aed1", "score": "0.5693083", "text": "public function show()\n {\n return auth()->user()->getResource();\n }", "title": "" }, { "docid": "9032057600ac1cb05d858c6264b8aed1", "score": "0.5693083", "text": "public function show()\n {\n return auth()->user()->getResource();\n }", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
2c9353ceab36985d03c90939a48cf1e0
Username standard as lowercase for comparison
[ { "docid": "25e574123ae869c4c49a0cf29768f8b1", "score": "0.63433653", "text": "public function setUsernameAttribute($value)\n\t{\n\t $this->attributes['username'] = strtolower($value);\n\t}", "title": "" } ]
[ { "docid": "3ef0fd46bc954589a435654200ea4b1c", "score": "0.6849469", "text": "function filterUsername($username)\r\n {\r\n return $username;\r\n }", "title": "" }, { "docid": "f38e08fc180dcb2894bd376eacdbdd7e", "score": "0.6767942", "text": "public function get_username();", "title": "" }, { "docid": "69b6d3e0d7b40519803afc7f56ee632f", "score": "0.6767415", "text": "public function getUsername(): string\n {\n return strtolower(str_replace(\" \",\"_\", $this->fullName));\n }", "title": "" }, { "docid": "100e46f4809ac4a67974837383e8efa9", "score": "0.6763841", "text": "private function check_username( $username ) {\n $checkUsername = explode( $this->sep, $username );\n\n if ( is_array( $checkUsername ) && ( $this->superIdentifier == $checkUsername[0] ) ) {\n $this->superUser = TRUE;\n $this->username = strtolower( $this->db->filter( $checkUsername[1] ) );\n } else {\n $this->superUser = FALSE;\n\n if ( $this->is_set( $username ) )\n $this->username = strtolower( $this->db->filter( $username ) );\n }\n }", "title": "" }, { "docid": "b1c6dcbd539fb5d892e663bf82db0de0", "score": "0.6745099", "text": "function sanitarizeUsername($username){\n $username = strip_tags($username);\n $username = str_replace(\" \",\"\", $username);\n $username = ucfirst(strtolower($username));\n return $username;\n }", "title": "" }, { "docid": "4edfa6a7e9511a14221600e766806792", "score": "0.6744638", "text": "public static function normalizeUsername(string $username): string {\n return mb_strtolower($username, 'UTF-8');\n }", "title": "" }, { "docid": "b8e1dd54ff59c1e50e6915897ed6014e", "score": "0.6675384", "text": "public function username();", "title": "" }, { "docid": "3bbd73ceb7bcc7630c16ea0c7228d1e1", "score": "0.65938646", "text": "function sanitize_username($uname) {\n\t$uname = sanitize ( $uname );\n\treturn $uname;\n}", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.65890735", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.65890735", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.65890735", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.65890735", "text": "public function getUsername();", "title": "" }, { "docid": "6a8ae0ea2ace512a4b64ca59e732ad7b", "score": "0.6575618", "text": "function vetUserName($name, $just_strip = FALSE)\n {\n\t$temp_name = trim(preg_replace('/&nbsp;|\\#|\\=|\\$/', \"\", strip_tags($name)));\n\tif (($temp_name == $name) || $just_strip) return $temp_name;\n\treturn FALSE;\n }", "title": "" }, { "docid": "8c06317686bed5c49652d1853e4f211f", "score": "0.6483523", "text": "protected function usernamevalidate() {\n\t\t$user = new User($this->db);\n\t\t\n\t\t$user->checkUsernameAvailability(); \n\t}", "title": "" }, { "docid": "9df5c28bc600c766c320a41e7211eb3e", "score": "0.6473715", "text": "protected function username()\n {\n return filter_var(request()->input('username'), FILTER_VALIDATE_EMAIL) ? 'email' : 'username';\n }", "title": "" }, { "docid": "1b935fe3f3f893bbeff64de16269d834", "score": "0.6457311", "text": "function getUsername();", "title": "" }, { "docid": "e0625f6932bbdb1aaea6f6c833606ab1", "score": "0.6452792", "text": "public function test_username_generated_in_correct_format()\n {\n $this->assertEquals('jdoe', User::generateUsername('John', 'Doe'));\n $this->assertEquals('meggerbachler', User::generateUsername('Maria', 'Egger-Bachler'));\n $this->assertEquals('eosterreicher', User::generateUsername('Edwald', 'Österreicher'));\n $this->assertEquals('hmullerwullrichschmidt', User::generateUsername('Hans-Peter', 'Müller-Wüllrich Schmidt'));\n }", "title": "" }, { "docid": "8f185b353ce30c7279f594d9592da57a", "score": "0.6439566", "text": "protected function normalizeUsername( $username ) {\n\t\t/**\n\t\t * this is a feature after updating wikis which used strtolower on usernames.\n\t\t * to use it, set this in LocalSettings.php:\n\t\t * $LDAPAuthentication2UsernameNormalizer = 'strtolower';\n\t\t */\n\t\t$config = Config::newInstance();\n\t\t$normalizer = $config->get( \"UsernameNormalizer\" );\n\t\tif ( !empty( $normalizer ) ) {\n\t\t\tif ( !is_callable( $normalizer ) ) {\n\t\t\t\tthrow new MWException(\n\t\t\t\t\t\"The UsernameNormalizer for LDAPAuthentiation2 should be callable\"\n\t\t\t\t);\n\t\t\t}\n\t\t\t$username = call_user_func( $normalizer, $username );\n\t\t}\n\t\treturn $username;\n\t}", "title": "" }, { "docid": "1d13c700b6d72bd206e8b158a3690a1f", "score": "0.6418744", "text": "public function supportsUsername()\n {\n }", "title": "" }, { "docid": "bc6f3d7eecbaebac001663fe620e5f85", "score": "0.6413058", "text": "public function username()\n\t{\n\t\tif (LaravelRequest::has('email'))\n\t\t\treturn 'email';\n\n\t\treturn filter_var(LaravelRequest::input('login'), FILTER_VALIDATE_EMAIL ) ? 'email' : 'username';\n\t}", "title": "" }, { "docid": "992897b2f69467777501b4142df91206", "score": "0.64043033", "text": "public function getUsername() {}", "title": "" }, { "docid": "aafd8139530e7174125118dfa9ceb238", "score": "0.6400894", "text": "function validate_username($username)\n{\n}", "title": "" }, { "docid": "8c6fc217b4e72190522cba642d44247f", "score": "0.63901365", "text": "public function getUsername() : string;", "title": "" }, { "docid": "7b42ba02bb3625b3982a83c164e9de09", "score": "0.6373328", "text": "function getUsername(){\n\t\t$UserName = '<username>';\n\t\treturn $UserName;\n\t}", "title": "" }, { "docid": "33ce1cd479415c9170291e9401fd4248", "score": "0.63672227", "text": "function validate_username($field){\r\n\r\n\t// Ssanitize username\r\n\t$field = filter_var(trim($field),FILTER_SANITIZE_STRING);\r\n\r\n\t// validate username\r\n\t// check if username contains letters and namespace\r\n\tif(filter_var($field, FILTER_VALIDATE_REGEXP, \r\n\t\tarray(\"options\"=>array(\"regexp\"=>\"/^[a-zA-Z\\s]+/\")))){\r\n\t return $field;\r\n\t }else{\r\n\t return false;\r\n\t }\r\n\t\r\n}", "title": "" }, { "docid": "21be3fb695ca11578a9372153e9a0810", "score": "0.63487136", "text": "public function getUsername() :string;", "title": "" }, { "docid": "0cafc8edca9c108cfddfb92a0439f7ba", "score": "0.63434017", "text": "function validateUserName($username)\n {\n $flag = false;\n $column = \"username\";\n $arr = selectColumn($column);\n foreach ($arr as $key=> $value)\n {\n if($username == $value)\n {$flag =true;}\n }\n return $flag;\n }", "title": "" }, { "docid": "327a4ee766695597682bc7c12dde0a61", "score": "0.6328078", "text": "function is_valid_username($value) {\n return preg_match('/\\A[A-Za-z0-9\\_]+\\Z/', $value);\n }", "title": "" }, { "docid": "8f2916d2243193801c1c5c222c7fa1ff", "score": "0.6312226", "text": "private function make_username($title)\n {\n return sanitize_user(strtolower(str_replace(' ', '', $title)), TRUE);\n }", "title": "" }, { "docid": "a194ec046781b745a3e6a110961533a5", "score": "0.6296032", "text": "public function username()\n { \n $username = 'username';\n\n if (filter_var(request('email'), FILTER_VALIDATE_EMAIL)){\n $username = 'email';\n }\n\n return $username;\n }", "title": "" }, { "docid": "a9fecd026643695247346a46fea47047", "score": "0.62850964", "text": "public static function lower()\n\t{\n\t}", "title": "" }, { "docid": "9a7a19c57a4aadc9e6524f92dbc11442", "score": "0.6282111", "text": "public function getUsernameCanonical(): string\n {\n return (string) $this->usernameCanonical;\n }", "title": "" }, { "docid": "fc1177425a169793458becf226e781e1", "score": "0.627943", "text": "public function getUsername()\n {\n }", "title": "" }, { "docid": "fc1177425a169793458becf226e781e1", "score": "0.627943", "text": "public function getUsername()\n {\n }", "title": "" }, { "docid": "fc1177425a169793458becf226e781e1", "score": "0.627943", "text": "public function getUsername()\n {\n }", "title": "" }, { "docid": "fc1177425a169793458becf226e781e1", "score": "0.627943", "text": "public function getUsername()\n {\n }", "title": "" }, { "docid": "fc1177425a169793458becf226e781e1", "score": "0.627943", "text": "public function getUsername()\n {\n }", "title": "" }, { "docid": "fc1177425a169793458becf226e781e1", "score": "0.627943", "text": "public function getUsername()\n {\n }", "title": "" }, { "docid": "fc1177425a169793458becf226e781e1", "score": "0.627943", "text": "public function getUsername()\n {\n }", "title": "" }, { "docid": "5f7ed1fb4f8d96a5cdad15bcefcbea5d", "score": "0.62644327", "text": "public function getUsername(): string;", "title": "" }, { "docid": "5f7ed1fb4f8d96a5cdad15bcefcbea5d", "score": "0.62644327", "text": "public function getUsername(): string;", "title": "" }, { "docid": "a820bc3b2af029451a52438e7814e376", "score": "0.6260513", "text": "function username_check($username) {\r\n return $this->account_model->get_by_username($username) ? TRUE : FALSE;\r\n }", "title": "" }, { "docid": "6149e54f87f609e80d26f143c3faaa9a", "score": "0.6258985", "text": "public function username()\n\t{\n\n\t\treturn 'username';\n\t}", "title": "" }, { "docid": "c4c5b97988efa829cf105da6dabce575", "score": "0.6251461", "text": "public function validateUserName($record, $index, $params) {\n\t\t\t// Make sure the encoding uses the proper code\n\t\t$encoding = $GLOBALS['LANG']->csConvObj->parse_charset($params['encoding']);\n\t\t$baseName = $record['from_user'];\n\t\t$userNameBase = $GLOBALS['LANG']->csConvObj->conv_case($encoding, $baseName, 'toLower');\n\t\t\t// We must make sure this doesn't contain non-ASCII characters\n\t\t$userName = $GLOBALS['LANG']->csConvObj->specCharsToASCII($encoding, $userNameBase);\n\t\t\t// Lastly remove single quotes and double quotes, and replace spaces by underscores\n\t\t\t// Other special characters are acceptable\n\t\t$userNameClean = preg_replace('/[\\'\"]/', '', trim($userName));\n\t\t$userNameClean = preg_replace('/[\\s]/', '_', trim($userName));\n\t\treturn $userNameClean;\n\t}", "title": "" }, { "docid": "bbf76c1dae1e23775b654e6b3140f586", "score": "0.6245955", "text": "private function has_lower($args){\n if(preg_match(\"/[a-z]/\", $args['value'])){\n return true;\n } else {\n $this->_warnings .= ucfirst($args['var']) . \" must contain at least one lowercase letter.<br/>\\r\\n\";\n return false;\n }\n }", "title": "" }, { "docid": "669728c0e0cd57ee3abc2d1c4e136a61", "score": "0.6238573", "text": "function valid_uname($username){\r\n\treturn preg_match(\"/^[a-z_][a-z0-9_]*$/i\",$username);\r\n}", "title": "" }, { "docid": "08ff6cd6ce77f06dfa820878e1d9e51c", "score": "0.6237738", "text": "function mf_validate_username($value){\r\n\t\tglobal $mf_lang;\r\n\r\n\t\t$error_message = $mf_lang['val_username'];\r\n\t\t\r\n\t\tif(!preg_match(\"/^[a-z0-9][\\w]*$/i\",$value[0])){\r\n\t\t\treturn sprintf($error_message,'%s',$value[0]);\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "018809ba436b6ae6fe27d2d97a91c8a7", "score": "0.62314737", "text": "public static function getUsername() {\n\n }", "title": "" }, { "docid": "edd3c6bf54c244ace12cf9c098ce6fb6", "score": "0.6221685", "text": "private function checkUserName()\r\n {\r\n if(!isset($this->m_arrInputFields['username']))\r\n return 0;\r\n\r\n if($this->m_arrInputFields['username'] == \"\")\r\n return 0;\r\n\r\n $username = $this->m_arrInputFields['username'];\r\n $pUser = new CDataUser(0, false, $this->m_envs);\r\n $bFound = $pUser->getIDByUsername($username);\r\n\r\n if($bFound)\r\n return 1;\r\n\r\n return 2;\r\n }", "title": "" }, { "docid": "b8dfb5bd9b05f8d4b825fdd509668b23", "score": "0.6219149", "text": "function getUserByName($username);", "title": "" }, { "docid": "1b85a5e448dfe23f842eb33721f0252d", "score": "0.62127316", "text": "private function CheckUsername() {\n\n\t\ttry {\n\t\t\t\n\t\t\tVarTest::Length(3, 255, $this->username, \"\", 2);\n\t\t\t\t\t\n\t\t} catch(Exception $e)\n\t\t{\n\n\t\t\t$this->Fill($e->getCode());\n\t\t}\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "22175f41cd503a3b6cbf85897838f1b7", "score": "0.6210069", "text": "public function checkUsername() {\n if (strlen($this->name) <= 0 || strlen($this->name) > 30) {\n return false;\n }\n return preg_match('/^[a-zA-Z0-9]*$/', $str);\n }", "title": "" }, { "docid": "1d410321bf47bd73ca55d1b79288a0ab", "score": "0.62015766", "text": "function validUsername($username)\n {\n return ctype_alnum(str_replace(['_', '-'], '', $username));\n }", "title": "" }, { "docid": "59275d08ce58cf5f5607dedbf848bbda", "score": "0.61760163", "text": "public function testLower()\r\n {\r\n self::assertEquals('foo bar baz', Str::lower('FOO BAR BAZ'));\r\n self::assertEquals('foo bar baz', Str::lower('fOo Bar bAz'));\r\n }", "title": "" }, { "docid": "8d5b78da1218d9ac97c757d02af1f619", "score": "0.6175022", "text": "public function getUserName();", "title": "" }, { "docid": "8d5b78da1218d9ac97c757d02af1f619", "score": "0.6175022", "text": "public function getUserName();", "title": "" }, { "docid": "7aa9a362e2662737afaccdd45140bc58", "score": "0.616657", "text": "public function getUsername(): string\n {\n return (string) $this->Login;\n }", "title": "" }, { "docid": "4ca6804674d6c1916265b44235d3c424", "score": "0.6160975", "text": "public function setUsername($username)\n {\n /* a->z A->Z 0->9 between 6-12 */\n $userName = trim($username);\n if(preg_match('/^[a-zA-Z0-9]{6,12}$/', $userName))\n {\n $this->username = $username; \n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "8cca83587f5fa1d1ffeeb00910df6727", "score": "0.6151029", "text": "public function getUsername(): string\n {\n return (string) $this->loginname;\n }", "title": "" }, { "docid": "bc4f0e9f9bd2b30b10197d5dd93c5be2", "score": "0.6145344", "text": "public function obtenerPorUsername($username);", "title": "" }, { "docid": "e746558ac5873d543f51f18d0071f118", "score": "0.61381096", "text": "function checkUsername($string2Check) {\n\t// configurazione dei controlli ed errori\n\trequire(\t$_SERVER['DOCUMENT_ROOT'].\n\t\t\t\t\t\t\"Library/Isp/Inc/Security/authConf.php\");\n\tif(!class_exists(\"ErrorType\")){\n\trequire_once(\t$_SERVER['DOCUMENT_ROOT']\n\t\t\t\t\t\t.'Components/Error/Models/ErrorType.php');\n\t}\n\tif (isset($CONFusername)) {\n\t\tif(!check_lenght_between(\t$string2Check,\n\t\t\t\t\t\t\t\t\t\t\t$CONFusername[\"minLength\"],\n\t\t\t\t\t\t\t\t\t\t\t$CONFusername[\"maxLength\"])){\n\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t}\n\t\telseif(\t!check_no_spaces($string2Check) ||\n\t\t\t\t\t!check_is_not_censured($string2Check) ||\n\t\t\t\t\t!check_alfabetic_char_present($string2Check) ||\n\t\t\t\t\t!check_contains_legal_char($string2Check)\n\t\t\t\t\t){\n\t\t\treturn false;\n\t\t}\n\t\telse return true;\n\t}\n}", "title": "" }, { "docid": "92559a0c51b89eb777984f0a9f66669e", "score": "0.61204046", "text": "protected function username()\n {\n return 'username';\n }", "title": "" }, { "docid": "c6b65e222866e30759ba3c488276a1b2", "score": "0.6113908", "text": "function filterUserName($name)\n{\n return preg_replace(\"/[^a-z0-9]/i\", '', $name);\n}", "title": "" }, { "docid": "8db868872b52e919e1280fb8aa09da93", "score": "0.61026496", "text": "function validate_username($input) {\n\t\tif (preg_match($this->qls->config['user_regex'], $input)) {\n\t\t\tif (strlen($input) <= $this->qls->config['max_username'] &&\n\t\t\t\tstrlen($input) >= $this->qls->config['min_username']) {\n\t\t\t return true;\n\t\t\t}\n\t\t\telse {\n\t\t\t return false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t return false;\n\t\t}\n\t}", "title": "" }, { "docid": "e1182a1804cac1cdc54fb12be3a46bcf", "score": "0.60982984", "text": "function userNameIsCorrect() {\n return ($this->submitUsername == $this->correctUserName) == true;\n }", "title": "" }, { "docid": "89310f055316d1cf8feb42313206da3b", "score": "0.6094112", "text": "public function testUsername()\n {\n $expected = 'username';\n self::assertEquals($this->log, $this->log->setUsername($expected));\n self::assertEquals($expected, $this->log->getUsername());\n\n $expected = '';\n self::assertEquals($this->log, $this->log->setUsername(null));\n self::assertEquals($expected, $this->log->getUsername());\n }", "title": "" }, { "docid": "a87b66bb8a178785333c1a4591ff7628", "score": "0.6092372", "text": "function VerifyUsername($username_to_verify, $minimal_username_length){\n if(preg_match('/^[a-zA-Z0-9_-]+/', $username_to_verify) && strlen($username_to_verify) > $minimal_username_length){\n return TRUE;\n }\n else{\n return FALSE;\n }\n }", "title": "" }, { "docid": "1f452630e312d6ab40efa42e6136c47c", "score": "0.6091185", "text": "public function username()\n {\n //\n return 'username';\n }", "title": "" }, { "docid": "dd99e87a84860082d5dfa66af6de0069", "score": "0.60854954", "text": "public function getUsername(): string\n {\n return (string) $this->login;\n }", "title": "" }, { "docid": "dd99e87a84860082d5dfa66af6de0069", "score": "0.60854954", "text": "public function getUsername(): string\n {\n return (string) $this->login;\n }", "title": "" }, { "docid": "dd99e87a84860082d5dfa66af6de0069", "score": "0.60854954", "text": "public function getUsername(): string\n {\n return (string) $this->login;\n }", "title": "" }, { "docid": "dd99e87a84860082d5dfa66af6de0069", "score": "0.60854954", "text": "public function getUsername(): string\n {\n return (string) $this->login;\n }", "title": "" }, { "docid": "869012fe4ee25467974e8cc848d68f6c", "score": "0.6082992", "text": "function match_username($uname){\n return preg_match('/^[a-zöüóőúéáűíäA-ZÖÜÓŐÚÉÁŰÍÄ0-9]+$/', $uname);\n}", "title": "" }, { "docid": "245f5862bb0c53c8d375c783d4ed6553", "score": "0.60829717", "text": "public function getUsername(): string\n {\n return (string) $this->username;\n }", "title": "" }, { "docid": "56d6f5a6c50fcbc7eb69f0aa3e9a764e", "score": "0.60805345", "text": "public function username()\r\n {\r\n return 'username';\r\n }", "title": "" }, { "docid": "b5de2519521af37684816f36d12bc117", "score": "0.60770124", "text": "public function username()\n {\n $request = request();\n if ($request->input('type') == 'admin') {\n return 'login-name';\n }\n return 'email';\n }", "title": "" }, { "docid": "e4f33d3d5495ac4cfbb643de6ccbbef9", "score": "0.6076357", "text": "public function getUsername(): string\r\n {\r\n return (string) $this->login_user;\r\n }", "title": "" }, { "docid": "442369226f46ef3ceefcf8d03a9464e1", "score": "0.60714763", "text": "public function toLower(): self;", "title": "" }, { "docid": "57265a6a0e7ffdbe76337b08279776c9", "score": "0.6070924", "text": "public function getCanonicalName( $username ) {\n\t\treturn $username;\n\t}", "title": "" }, { "docid": "5f79d15812c4ebd283397d93c9be55d3", "score": "0.60649097", "text": "public function getUsername(): string\n {\n return (string)$this->username;\n }", "title": "" }, { "docid": "5f79d15812c4ebd283397d93c9be55d3", "score": "0.60649097", "text": "public function getUsername(): string\n {\n return (string)$this->username;\n }", "title": "" }, { "docid": "5f79d15812c4ebd283397d93c9be55d3", "score": "0.60649097", "text": "public function getUsername(): string\n {\n return (string)$this->username;\n }", "title": "" }, { "docid": "5f79d15812c4ebd283397d93c9be55d3", "score": "0.60649097", "text": "public function getUsername(): string\n {\n return (string)$this->username;\n }", "title": "" }, { "docid": "d7e0458de653fac3a70f7fd284efb0a2", "score": "0.60625404", "text": "function validateUsername()\n {\n if(!containsNonAlphanumeric(htmlspecialchars($_POST['f_newUsernameInput'])))#username contains purely alphanumeric characters\n {\n return true;\n }\n else #username contains invalid characters\n {\n return false;\n } \n }", "title": "" }, { "docid": "367d67d404f4e3f45161fb3a3b1b0e68", "score": "0.60590696", "text": "public static function ucase()\n\t{\n\t}", "title": "" }, { "docid": "380624911fc7dda7db72a81e8c11cd0a", "score": "0.6058996", "text": "public function username(): string\n {\n\n return 'username';\n }", "title": "" }, { "docid": "4ae2ec8a44838f3cbd7d834f3390f7da", "score": "0.60457516", "text": "public function username() : string{\n\t\treturn $this->username;\n\t}", "title": "" }, { "docid": "ae66b562afd893da69f1d8f662967354", "score": "0.6043267", "text": "public function setUsername($username) {\n // utilizzo la funzione filter var specificando un'espressione regolare\n // che implementa la validazione personalizzata\n if (!filter_var($username, FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => '/[a-zA-Z]{5,}/')))) {\n return false;\n }\n $this->username = $username;\n return true;\n }", "title": "" }, { "docid": "e4b45a07b78c16ddbe0c841f6b3666e3", "score": "0.6042583", "text": "public function username()\n {\n }", "title": "" }, { "docid": "868903505994cc7c43f9aa44205c6701", "score": "0.6041339", "text": "public function username($value)\n {\n return $this->regex($value, '/^[a-zA-Z0-9-_.]+$/');\n }", "title": "" }, { "docid": "ab9309cdd1ea5de858068f8840e709d8", "score": "0.60359055", "text": "public function getUsername(): string\n {\n return $this->first_name . ' ' . strtoupper($this->last_name);\n }", "title": "" }, { "docid": "1c9ae5ffe839a62ee253ec44cd21763d", "score": "0.60233617", "text": "function suggestUsername() {\n\t\tparent::validate();\n\t\t$suggestion = Validation::suggestUsername(\n\t\t\tRequest::getUserVar('firstName'),\n\t\t\tRequest::getUserVar('lastName')\n\t\t);\n\t\techo $suggestion;\n\t}", "title": "" }, { "docid": "996eaeae48edea532e9f0410d587f2d2", "score": "0.6022911", "text": "public static function checkUserName()\n\t{\n\t\t$customer = DB::table('customers')\n\t\t\t\t->select('*')\n\t\t\t\t->where('user_name','=',Input::get('user_name'))\n\t\t\t\t->get();\n\n\t\tif($customer)\n\t\t\treturn 'exist';\n\t\telse\n\t\t\treturn 'do not exist';\n\t}", "title": "" }, { "docid": "946fc9ff3f2c2ac3deb2221acff8fdf2", "score": "0.60184216", "text": "public function username()\n {\n $login = request()->input('user');\n\n $field = filter_var($login, FILTER_VALIDATE_EMAIL) ? 'email' : 'username';\n request()->merge([$field => $login]);\n\n return $field;\n }", "title": "" }, { "docid": "3100495653c4ec4d9da32dae1cf5829c", "score": "0.60045", "text": "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "title": "" }, { "docid": "3100495653c4ec4d9da32dae1cf5829c", "score": "0.60045", "text": "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "title": "" }, { "docid": "3100495653c4ec4d9da32dae1cf5829c", "score": "0.60045", "text": "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "title": "" }, { "docid": "3100495653c4ec4d9da32dae1cf5829c", "score": "0.60045", "text": "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "title": "" }, { "docid": "3100495653c4ec4d9da32dae1cf5829c", "score": "0.60045", "text": "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "title": "" }, { "docid": "3100495653c4ec4d9da32dae1cf5829c", "score": "0.60045", "text": "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "title": "" } ]
40a9270228b9b81efe0b6c01956356f1
See's if the route provided has a cached version, if it does it returns a file object representing the cache. If no file is present it returns false
[ { "docid": "89ffe7877d8e2cee6f0e2712c72184fa", "score": "0.6280346", "text": "public function read ($name){\n $name=forceMD5($name);\n $routePath=$this->getNameCachePath($name);\n if(!file_exists($routePath)){\n return FALSE;\n }\n try{\n return FileStructure::fromString(file_get_contents($routePath));\n }catch(\\Exception $e){\n //Delete the cache file\n unlink($routePath);\n return FALSE;\n }\n }", "title": "" } ]
[ { "docid": "8ca25508ca0ee377e6cffa234b7141b4", "score": "0.74061435", "text": "public static function cache(): bool|int\n {\n self::prepareRoute();\n $content = self::parseResource(self::$routeResource);\n return file_put_contents(\n Settings::$cachePath,\n '<?php return ' . var_export($content, true) . ';' . PHP_EOL,\n LOCK_EX\n );\n }", "title": "" }, { "docid": "955eca92bcd144ef7e3c7e9b29983b43", "score": "0.70809776", "text": "public function hasCached(){\r\n\t\treturn !$this->disabled ? is_readable($this->cacheDir.$this->requestId.$this->fileSuffix) : false;\r\n\t}", "title": "" }, { "docid": "4a66a249dc7a943f5f98cef6dd1ca3e2", "score": "0.68644476", "text": "function isCached(){\n\t\treturn file_exists( $this->options['cache'] ) && time() - filemtime( $this->options['cache'] ) < $this->options['cache_timer'] && filesize( $this->options['cache'] ) > 0;\n\t}", "title": "" }, { "docid": "ca905300147f9e3d0489eaeeb45934ee", "score": "0.68262255", "text": "function _check_cache($url)\n\t{\t\n\t\tglobal $TMPL;\n\t\t\t\n\t\t/** ---------------------------------------\n\t\t/** Check for cache directory\n\t\t/** ---------------------------------------*/\n\t\t\n\t\t$dir = PATH_CACHE.$this->cache_name.'/';\n\t\t\n\t\tif ( ! @is_dir($dir))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n $file = $dir.md5($url);\n\t\t\n\t\tif ( ! file_exists($file) OR ! ($fp = @fopen($file, 'rb')))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t \n\t\tflock($fp, LOCK_SH);\n \n\t\t$cache = @fread($fp, filesize($file));\n \n\t\tflock($fp, LOCK_UN);\n \n\t\tfclose($fp);\n \n\t\t$eol = strpos($cache, \"\\n\");\n\t\t\n\t\t$timestamp = substr($cache, 0, $eol);\n\t\t$cache = trim((substr($cache, $eol)));\n\t\t\n\t\tif (time() > ($timestamp + ($this->refresh * 60 * 60 * 24)))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t$TMPL->log_item(\"Directions retrieved from cache\");\n\t\t\n return $cache;\n\t}", "title": "" }, { "docid": "25dda52c07c05a3dc467e2f189490665", "score": "0.67957217", "text": "public function routesAreCached()\n {\n return $this['files']->exists($this->getCachedRoutesPath());\n }", "title": "" }, { "docid": "07b543565d2a7690446804952c23708e", "score": "0.67755276", "text": "private function cache_exists() {\r\n\r\n if (@file_exists($this->cache_filename()) && time() - $this->cache_time < @filemtime($this->cache_filename())) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "38965990c78560dab0a71bc35fabcfb8", "score": "0.6770359", "text": "function opcache_is_script_cached($file)\n{\n}", "title": "" }, { "docid": "079d8cf40f82cdaede2bc3e66766d90d", "score": "0.6736456", "text": "public function cache_file_exist() {\n\n\t\tif ( ( $filname = beans_get( 'filename', $this->compiler ) ) && file_exists( $this->cache_dir . '/' . $filname ) )\n\t\t\treturn true;\n\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "b54dd0b69aef33c5a1e44f76946cf20a", "score": "0.6644052", "text": "public function existCache()\r\n\t{\r\n\t\treturn is_readable($this->_filename);\r\n\t}", "title": "" }, { "docid": "e9653eede4cffca78c31ef8d42e6b4b9", "score": "0.6574913", "text": "private function cacheFile() \r\n { \r\n $cacheFilename = $this->getCacheFilename(); \r\n $folderCache = dirname($cacheFilename); \r\n if(is_dir($folderCache) || mkdir($folderCache, 0777, true))\r\n { \r\n $script=\"\";\r\n foreach($this->headers['script'] as $s) \r\n $script = \"$script<script type='text/javascript' src='$s'></script>\"; \r\n $content = sprintf(\"<!DOCTYPE html>\\n<html>\\n\\t<head>\\n\\t%s%s</head>\\n<body>\\n\\t%s%s%s%s</body>\\n</html>\\r\\n\", \r\n $this->head_content, \r\n $this->generateMetaHeaders(),\r\n $this->debugMsg, \r\n $this->body_content,\r\n $script,\r\n $this->script_body\r\n ); \r\n if($this->minimizeHTML) $content = preg_replace(\"/>\\s+</\", \"><\", $content); //retirar espaços entre tags \r\n return strlen($content) == file_put_contents($cacheFilename, $content, LOCK_EX); //guarda vista gerada e verifica se escreveu bem o ficheiro \r\n }\r\n return false; \r\n }", "title": "" }, { "docid": "4b25aece1e1f5cfdb66be09d90ae1a1d", "score": "0.6574506", "text": "function cache_file($orig, $cache)\n{\n\tif (cache_valid($orig, $cache))\n\t\treturn $cache;\n\n\tif (!file_exists($orig))\n\t\treturn false;\n\n\t$content = cache_parse($orig);\n\n\t$fh = fopen($cache, 'w');\n\n\tif ($fh !== false) {\n\t\tfwrite($fh, $content);\n\t\tfclose($fh);\n\t\tchmod($cache, 0666);\n\t\ttouch($cache, filemtime($orig));\n\t\treturn $cache;\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "ce49214a7851c7b4941a722e2ab83fdc", "score": "0.65620697", "text": "public function get() {\n\n\t\t$filename = $this->buildFilename();\n\t\tif(self::isCacheFile($filename) && $this->isCacheFileExpired($filename)) {\n\t\t\t$this->removeFilename($filename); \n\t\t\treturn false;\n\t\t}\n\n\t\t// note file_get_contents returns boolean false if file can't be opened (i.e. if it's locked from a write)\n\t\treturn @file_get_contents($filename); \n\t}", "title": "" }, { "docid": "d80b919ed131154db99cc702d8971dd3", "score": "0.65577745", "text": "public function isCached();", "title": "" }, { "docid": "941e8c7f963cb34d58920fc5ad009915", "score": "0.6479911", "text": "public function isCached(): bool;", "title": "" }, { "docid": "941e8c7f963cb34d58920fc5ad009915", "score": "0.6479911", "text": "public function isCached(): bool;", "title": "" }, { "docid": "4e07d0e1dcadae6f46d3e821453acda0", "score": "0.64561546", "text": "function _check_cache($url)\n\t{\t\n\t\t$cache_directory = APPPATH . 'cache/' . $this->_cache_name . '/';\n\t\t\n\t\t//check to make sure the file exists\n\t\tif (!@is_dir($cache_directory))\n\t\t{\n\t\t\t$this->_log_error('Cache directory does not exist');\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n $file = $cache_directory . sha1($url);\n\t\tif (!file_exists($file) || !($filestream = @fopen($file, 'rb')))\n\t\t{\n\t\t\t$this->_log_error('Unable to open cache file ' . sha1($url));\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t//read in the file\n\t\tflock($filestream, LOCK_SH);\n\t\t$cache = @fread($filestream, filesize($file));\n\t\t$timestamp = filemtime($file);\n\t\tflock($filestream, LOCK_UN);\n\t\tfclose($filestream);\n \t\t\n\t\tif (time() > ($timestamp + ($this->_refresh * 60)))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\t\t\n return $cache;\n\t}", "title": "" }, { "docid": "4bdad9504ea421bfe9929687448ebf26", "score": "0.64329463", "text": "protected static function getCache()\n {\n // el contenido permanece nulo si no hay nada cacheado o la cache expiro\n self::$_content = Cache::driver()->get(Router::get('route'), self::$_cache['group']);\n\n return self::$_content !== null;\n }", "title": "" }, { "docid": "57f09daf30421af5c48d213ff053c168", "score": "0.63978773", "text": "public function isCaching();", "title": "" }, { "docid": "57f09daf30421af5c48d213ff053c168", "score": "0.63978773", "text": "public function isCaching();", "title": "" }, { "docid": "367654875d9776bc5a26d1c22ed0fa7d", "score": "0.63911366", "text": "public function get($file='') { \n //Define the path for the cache file\n $cacheFile = $this->mono['cacheDir']. $file. '.php';\n \n if(file_exists($cacheFile) AND ((time() - filemtime($cacheFile)) < $this->mono['cacheTime'])) {\n //Echo the content if the file exists and isn't expired\n echo(file_get_contents($cacheFile));\n return true;\n }else{\n //File doesn't exist or is expired\n return false;\n }\n }", "title": "" }, { "docid": "bf53b5f97b193f7ae2b8ddc9cef18556", "score": "0.63775235", "text": "public function isCacheOk() {\n\t\treturn file_exists($this->getCacheFile()) && filemtime($this->getFilePath()) < filemtime($this->getCacheFile());\n\t}", "title": "" }, { "docid": "068f18ac944dca62c997be2ce0a8a7bd", "score": "0.634142", "text": "function getCacheIfFresh($caching_time, $fileName) {\t\n\t\t\t\n\t\t//no cache exist\n\t\t//\tThis may raise a warning on first launch(cachefile does not exist), but everything's ok\n\t\t//\tJust set your PHP error level to something more secure than E_WARNING\n\t\t// v 3.1 :: corrected this warning\n\t\tif(!($cacheModified = @filemtime($fileName))) return false;\n\n\t\t//cache is up-to-date\n\t\tif( (time() - $cacheModified) < $caching_time ) return file_get_contents($fileName);\n\t\telse return false;\n\t}", "title": "" }, { "docid": "7b7bb144a40f9296a828e7342771da41", "score": "0.63098717", "text": "public function isCached($key = null) {\n\t\t$this->prepareFile ();\n\t\treturn (($key === null) ? $this->_smarty->is_cached ( $this->_fileTemplate ) : $this->_smarty->is_cached ( $this->_fileTemplate, $key ));\n\t}", "title": "" }, { "docid": "68f829ac475cff2b867252917abd7e2f", "score": "0.62948704", "text": "public static function routesAreCached()\n {\n }", "title": "" }, { "docid": "c3d78aaed506ff55a93fe548bc309819", "score": "0.6262286", "text": "protected function getFromCache(){\n\t\tif($this->cacheActive && !$this->pragma){\n\t\t\t$render = $this->smallyCache->getKey($this->cacheKeyRender); // render must be differnt from false or null to be considered as valid cache entry\n\t\t\tif( $render!==false && $render!==null ){\n\t\t\t\t$this->cacheRender = $render;\n\t\t\t\tif( is_array($assets = $this->smallyCache->getKey($this->cacheKeyAssets)) ){\n\t\t\t\t\t$this->cacheAssets = $assets;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "510edb42129b90846543b2746f240b99", "score": "0.62176055", "text": "public function isCached()\n {\n return $this->entry->hasCacheKey() && $this->existsInCache($this->getFilename($this->entry->getCacheKey()));\n }", "title": "" }, { "docid": "bfb02d23703dfbae73486fab1e0f12b2", "score": "0.61970586", "text": "public function __construct($request)\n\t{\n\t\t$this->config = Config::getInstance();\n\t\t$this->cacheDir = $this->config->getCacheDir();\n\n\t\tif ($request === null) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->request = $request;\n\t\t$this->identifier = $this->request->getURI();\n\n\t\t// FIXME: Quite crude identification of images.\n\t\tif (strpos($this->identifier, 'thumbnail') !== false) {\n\t\t\t// FIXME: Configuration setting?\n\t\t\t// The timespan a cached file is considered valid. (30 days).\n\t\t\t$time = round(time() / (60 * 60 * 24 * 30));\n\t\t} else {\n\t\t\tif (!$this->config->useCache()) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// FIXME: Configuration setting?\n\t\t\t// The timespan a cached file is considered valid.\n\t\t\t$time = round(time() / (60 * 60));\n\t\t}\n\n\t\t// Generate an identifier that can be used as a file descriptor.\n\t\t// $this->identifier = sha1($this->identifier . $time);\n\t\t$this->identifier = $this->getIdentifier($this->identifier);\n\n\t\t// Check if the client already have the file in it's local cache. If it\n\t\t// does and the cache file is up-to-date we can send a 304 Not Modified\n\t\t// reply (which is nice).\n\t\tif ($request->getHeader('If-None-Match') == $this->identifier) {\n\t\t\theader(\"HTTP/1.1 304 Not Modified\");\n\t\t\theader('ETag: '.$this->identifier);\n\t\t\t$this->served = true;\n\t\t\treturn true;\n\t\t}\n\n\t\t$this->cacheFile = $this->cacheDir.'/'.$this->identifier;\n\n\t\t// If we've the file in our cache just serve that and be done with it.\n\t\tif (is_file($this->cacheFile) && is_readable($this->cacheFile)) {\n\t\t\t$this->serveCache();\n\t\t\t$this->served = true;\n\t\t\treturn true;\n\t\t}\n\n\t\telse if (is_writable($this->cacheDir)) {\n\t\t\t$this->active = true;\n\t\t\tob_start();\n\t\t\t// Tag the file so we can serve cache next time.\n\t\t\theader('ETag: '.$this->identifier);\n\t\t\treturn true;\n\t\t}\n\t\t// We couldn't write to the cache directory, we need to make someone\n\t\t// aware of this since it effectively disables the whole caching\n\t\t// mechanism.\n\t\telse {\n\t\t\tthrow new FrameworkException(FrameworkException::CACHE_DIR_NOT_WRITEABLE,\n\t\t\t\t\"Kunde inte skriva till cache katalogen, kontrollera rättigheterna.\");\n\t\t}\n\t}", "title": "" }, { "docid": "11b4a41596bf6c31436d49b753a89d5f", "score": "0.6190041", "text": "public function is_cached();", "title": "" }, { "docid": "cd8b61d9b4bf8e3d53cdc34b0c57613b", "score": "0.6184866", "text": "function cache_valid($orig, $cache)\n{\n\treturn (file_exists($cache) && (!file_exists($orig) || filemtime($orig) == filemtime($cache)));\n}", "title": "" }, { "docid": "942f2a984dc35ca33f3e6a0c4715ed77", "score": "0.6169194", "text": "protected function isImageCached()\n {\n // if there is no cached image return false\n if (!is_file($cached_img = $this->getCachedImagePath())) {\n return false;\n }\n\n // if cached image mtime match, the image is already cached\n if (filemtime($this->filePath) === filemtime($cached_img)) {\n return true;\n }\n\n // delete older cached file\n unlink($cached_img);\n\n // generate new cache file\n return false;\n }", "title": "" }, { "docid": "472ecbd19ca5f8fe95a0124e9de8e141", "score": "0.6154517", "text": "abstract public function hasCached();", "title": "" }, { "docid": "1833fdfea072778c316c2a98ccf18323", "score": "0.6131723", "text": "public function getOnlyIfCached()\n {\n if ($this->isCached()) {\n // not calling parent::get() because want to read cache\n $filename = $this->getFilename($this->entry->getCacheKey());\n $imgdata = FileReader::protectFileGetContents($filename);\n if ($this->fileCanHoldMetadata()) {\n // pull metadata manually for cached image\n $this->readImageMetadata($imgdata);\n } else {\n // pull from cached .meta file\n $metaname = $this->getMetaFilename($filename);\n if (FileReader::protectFileExists($metaname)) {\n $md = unserialize(FileReader::protectFileGetContents($metaname));\n $this->entry->setMetadata($md);\n }\n }\n return $imgdata;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "064a0285a7372f3717ebf23121c1338c", "score": "0.6129973", "text": "protected function findByCache(): File|null\n\t{\n\t\t// get mixed Uri from cache\n\t\t$key = $this->key();\n\t\t$value = Uuids::cache()->get($key);\n\n\t\tif ($value === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// value is an array containing\n\t\t// the UUID for the parent and the filename\n\t\t$parent = Uuid::for($value['parent'])->model();\n\t\treturn $parent?->file($value['filename']);\n\t}", "title": "" }, { "docid": "765de82802fe3c59a1ce4fda157e9c96", "score": "0.6117939", "text": "protected function _cached()\n {\n $sum = null;\n foreach ($this->_list as $k => &$v) {\n // replacing \"j.\" to \"jquery.\" and \"ju.\" to \"jquery.ui-\"\n $v = str_replace(\n array('j.', 'jui.'), array('jquery.', 'jquery.ui-'), $v\n );\n\n if (!preg_match(\"~\\.{$this->_type}$~\", $v)) {\n $v .= \".{$this->_type}\";\n }\n\n $v = CMS_HTDOCS . ($this->_type == 'js' ? 'scripts' : 'styles') . \"/{$v}\";\n if (!Cms_Filemanager::fileExists($v)) {\n unset($this->_list[$k]);\n continue;\n }\n $sum .= hash_file('crc32', $v);\n }\n\n $this->_cachePath = CMS_TMP . \"cache/{$this->_type}-\" . hash('crc32', $sum);\n if ($this->_gziped || $this->_deflated) {\n $this->_cachePath .= '.' . ($this->_deflated ? 'df' : 'gz');\n }\n return Cms_Filemanager::fileExists($this->_cachePath, true);\n }", "title": "" }, { "docid": "b1c6d02706226832a04cd722694d0b4f", "score": "0.61166626", "text": "private function loadCache()\r\n\t{\r\n\t\tif(!empty($this->_cacheFile))\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif($this->existCache() === false\r\n\t\t|| ($fileContent = file_get_contents($this->_filename)) === false)\r\n\t\t{\r\n\t\t\t$this->_cacheFile = '';\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$this->_cacheFile = $fileContent;\r\n\t}", "title": "" }, { "docid": "4d53bd17c9580f9bea8d3941e83e0d08", "score": "0.61129403", "text": "static protected function isCacheFile($filename) {\n\t\t$ext = self::cacheFileExtension; \n\t\tif(is_file($filename) && substr($filename, -1 * strlen($ext)) == $ext) return true; \n\t\treturn false;\n\t}", "title": "" }, { "docid": "c76ff75803d7d0285386b82903551085", "score": "0.60737365", "text": "public function canCreateCacheFile()\r\n {\r\n if (craft()->config->get('devMode') === true) {\r\n return false;\r\n }\r\n // Skip if system is not on\r\n if (!craft()->isSystemOn()) {\r\n return false;\r\n }\r\n // Skip if it's a CP Request\r\n if (craft()->request->isCpRequest()) {\r\n return false;\r\n }\r\n\r\n // Skip if it's an action Request\r\n if (craft()->request->isActionRequest()) {\r\n return false;\r\n }\r\n\r\n // Skip if it's a preview request\r\n if (craft()->request->isLivePreview()) {\r\n return false;\r\n }\r\n \r\n // Skip if it's a post/ajax request\r\n if (!craft()->request->isGetRequest()) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "3117285a7ea8e155554424e93fe8cad4", "score": "0.60643846", "text": "public function get(&$cached): bool {\n\t\ttry {\n\t\t\tif( !is_readable($this->path) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t[$editTime, $data] = explodeList(static::$delim, file_get_contents($this->path), 2);\n\t\t\tif( isset($this->editTime) && $editTime != $this->editTime ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$cached = unserialize($data);\n\t\t} catch( Exception $e ) {\n\t\t\t// If error opening file or un-serializing occurred, it's a fail\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1112ef341778505f5b20f8a349e641ac", "score": "0.60554224", "text": "public function checkClientCacheForImage()\n {\n if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) and\n filemtime($this->getImageFullPath()) == strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']))\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "358e8c786e5689eced9e3382dc027dcc", "score": "0.6036734", "text": "public function returnCache()\r\n\t{\r\n\t\t$this->loadCache();\r\n\t\treturn $this->_cacheFile;\r\n\t}", "title": "" }, { "docid": "992c48f9605319ae2a25878701b1151b", "score": "0.60315144", "text": "public function readFromCache() {\n //if cache file does not exists return false\n if (!file_exists(TPWRatings_Config::CACHE_PATH)){\n return false;\n }\n\n //if cache expired return false\n if ((time() - filemtime(TPWRatings_Config::CACHE_PATH)) > TPWRatings_Config::CACHING_TIME){\n return false;\n }\n\n //return cache data\n return json_decode(file_get_contents(TPWRatings_Config::CACHE_PATH));\n }", "title": "" }, { "docid": "9ec614cf65f8c19afce75da69767d4d7", "score": "0.60150796", "text": "protected function from_cache($cache_id) {\n\t\t$cache_id = md5 ( $cache_id );\n\t\tif (array_key_exists ( $cache_id, $this->cached_paths )) {\n\t\t\treturn $this->cached_paths [$cache_id];\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2f3c247e0f42e9c8f27c7ba7cbc41b8a", "score": "0.5999628", "text": "protected function getResponseFromCache() {\n //see if we can grab it from the cache\n if ($this->cacheEnabled && $this->cacheLength !== false) {\n return $this->dic->cache->get($this->request->hash());\n }\n return false;\n }", "title": "" }, { "docid": "cf92b322ba7c3577c8173f5dacec3745", "score": "0.59960973", "text": "function check_cache()\r\n\t{\r\n\r\n\t\t// check if we got a cache directory\r\n\t\t$cache_dir = dirname(__FILE__) . \"/cache\";\r\n\t\t\r\n\t\tif (file_exists($cache_dir))\r\n\t\t{\r\n\t\t\treturn True;\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\tif (@mkdir($cache_dir))\r\n\t\t\t\treturn True;\r\n\t\t\telse \r\n\t\t\t\treturn False;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "842565a303133b2305b9dcff5a0dee69", "score": "0.59957224", "text": "function readcache() {\n\t\t$content=@file_get_contents($this->filename);\n\t\tif ($content==false) return false;\n\t\t$intweather = unserialize($content);\n\t\tif ($intweather->cache_expires < time()) return false;\n\t\t\n\t\t$this->source = 'cache';\n\t\t$this->forecast = $intweather->forecast;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "b2e2527280b2fe8ba49448692271b6c7", "score": "0.5985971", "text": "public function is_cached($template, $cache_hash = '')\n {\n return false;\n }", "title": "" }, { "docid": "4656b567534009b30be95fc0e8dd24a9", "score": "0.59844553", "text": "function checkCacheFile(){\n if(!file_exists($this->cacheFile)) $this->createCacheFile();\n \n if ( (@filemtime($this->cacheFile) < (mktime() - $this->cachExpire) ) || (!is_file($this->cacheFile)) ){\n $this->debugMsg('Cache file outdated');\n $this->updateCache();\n } else {\n $this->debugMsg('Cache file still valid');\n }\n }", "title": "" }, { "docid": "75c313c6b7a7183c0173ed1f54289966", "score": "0.5974294", "text": "private function _isCached($sName)\n {\n if (defined('NO_TEMPLATE_CACHE') && NO_TEMPLATE_CACHE)\n {\n return false;\n }\n if (!file_exists($this->_getCachedName($sName)))\n {\n return false;\n }\n\n if (file_exists($sName))\n {\n $iTime = filemtime($sName);\n\n // Check if a file has been updated recently, if it has make sure we return false to we recache it.\n if (($iTime + $this->_iCacheTime) > time())\n {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "70185742948d37e6c3d108410067c40e", "score": "0.59686977", "text": "protected function _isCached($key) {\n\t\t$path = $this->_cachePath . $key;\n\n\t\tif (file_exists($path)) {\n\t\t\tlist($timestamp, $content) = explode(\"\\n\", file_get_contents($path));\n\n\t\t\tif ($timestamp >= time()) {\n\t\t\t\treturn unserialize(trim($content));\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "941221f94e83c88663cab68f5d479462", "score": "0.593811", "text": "public function checkMapCache(){\n if ($this->doNotReadMapCache) return false;\n $this->mapCacheID = md5($this->serializeParams());\n $filename = $this->mapCacheIDToFilename();\n if(file_exists($filename)) return true;\n return false;\n }", "title": "" }, { "docid": "2de6d901f3ce699cac651a8a3b5624a1", "score": "0.5937255", "text": "function checkCacheFreshness() {\n global $cacheFile, $hoursFresh;\n\n $expires = strtotime($hoursFresh . ' hours ago');\n\n // If cache file does not already exist, create it\n if (!file_exists($cacheFile)) {\n $cf = fopen($cacheFile, 'w') or die('Can\\'t open file.');\n fclose($cf);\n // echo \"Creating cache file.\";\n return false;\n }\n\n // Get the time the cache file was last modified\n $shelfDate = filemtime($cacheFile);\n\n // Return true if cache file is fresh, false if not\n return (($shelfDate - $expires) > 0);\n}", "title": "" }, { "docid": "db1fa608240c1b99549090a14865cb30", "score": "0.59294915", "text": "function found() {\n\t\tif (Cache::_disabled()) return false;\n\t\tif (file_exists($this->_filename)) {\n\t\t\t// Abro el archivo para ver cuando expira\n\t\t\t$a = file($this->_filename);\n\t\t\t// Si es una x, no expira nunca\n\t\t\tif (trim($a[0]) == 'x') {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t$expiration = (int) $a[0];\n\t\t\t\treturn $expiration > time();\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "71f405e82dde1656e38ca0a01c879d59", "score": "0.5926977", "text": "function hasCacheStatic($hash) {\n\treturn file_exists(pathCacheStatic($hash));\n}", "title": "" }, { "docid": "82a460d0515ea9a84ca29a3209410f76", "score": "0.5919554", "text": "public function get($url, $expires)\n {\n $file = $this->_dir . '/' . $this->_urlToFile($url);\n\n if (!file_exists($file)) return false;\n\n if (filemtime($file) < (time() - $expires)) return false;\n\n if (!$fp = fopen($file, 'rb'))\n throw new CacheUnableToOpenFileException('Cache ' . $file . ' can not be opened.');\n\n flock($fp, LOCK_SH);\n\n if (!filesize($file) > 0) throw new CacheEmptyFileException('Cache ' . $file . ' is empty.');\n\n $cache = unserialize(fread($fp, filesize($file)));\n\n flock($fp, LOCK_UN);\n fclose($fp);\n\n return $cache;\n }", "title": "" }, { "docid": "25f905818cec02ffbee2d3ea3d6926eb", "score": "0.5918491", "text": "function isValid() {\n\t\t\n\t\t$cacheFilename = weGlossaryCache::cacheIdToFilename($this->_cacheId);\n\t\t\n\t\treturn file_exists($cacheFilename) && is_file($cacheFilename);\n\t\t\n\t}", "title": "" }, { "docid": "ef067d6d63e2012b1fb5580129ff57be", "score": "0.59149736", "text": "public function getCache()\n {\n $string = file(dirname(__FILE__) . DIRECTORY_SEPARATOR . self::CACHE);\n $lastEntry = array_shift($string);\n \n $lastEntryParts = split('###', $lastEntry);\n\n $parts = new stdClass();\n $parts->LastFetch = $lastEntryParts[1];\n \n $dateFrom = $parts->LastFetch;\n $dateTo = strtotime(date('Y-m-d H:i:s'), 0);;\n \n $difference = $dateTo - $dateFrom;\n \n // If difference is smaller than 10\n if (($difference / 60) < 10) {\n return true;\n }\n \n return false;\n }", "title": "" }, { "docid": "432ce281bbc6218230161f7d0a0eb9e9", "score": "0.58777016", "text": "public function canCache();", "title": "" }, { "docid": "46506519a8775dc59e6d0e62f4c7d753", "score": "0.58655155", "text": "public function canCache()\r\r\n {\r\r\n // Check if the response is cacheable based on the code\r\r\n if (!in_array((int) $this->getStatusCode(), self::$cacheResponseCodes)) {\r\r\n return false;\r\r\n }\r\r\n\r\r\n // Make sure a valid body was returned and can be cached\r\r\n if ((!$this->getBody()->isReadable() || !$this->getBody()->isSeekable())\r\r\n && ($this->getContentLength() > 0 || $this->getTransferEncoding() == 'chunked')) {\r\r\n return false;\r\r\n }\r\r\n\r\r\n // Never cache no-store resources (this is a private cache, so private\r\r\n // can be cached)\r\r\n if ($this->getHeader('Cache-Control') && $this->getHeader('Cache-Control')->hasDirective('no-store')) {\r\r\n return false;\r\r\n }\r\r\n\r\r\n return $this->isFresh() || $this->getFreshness() === null || $this->canValidate();\r\r\n }", "title": "" }, { "docid": "80cd871f65f661c6f3a4370ccddcf5b1", "score": "0.5857169", "text": "public function resourceIsCached($resource){\n\t\t$cache = Zend_Registry::get('cache');\n\t\treturn $cache->test($resource);\n\t}", "title": "" }, { "docid": "bcb07d602a44c342264f336a24792b92", "score": "0.58563465", "text": "function get( $name )\n {\n \n if( !$get = @file_get_contents( $this->cacheDir . \n md5( $name . $this->salt ) . \".dat\" ) )\n {\n \n return false;\n \n }\n else\n {\n \n return $get;\n \n }\n \n \n }", "title": "" }, { "docid": "b18f28de93963721f1d9447693afd43f", "score": "0.58411145", "text": "public function isValid()\n\t{\n\n\t\t$strFilePath = $this->GetFilePath();\n\n\t\t// First, ensure that the cache file exits\n\t\tif (file_exists($strFilePath)) {\n\t\t\tif (self::$Debug) self::$Debug->Log(__CLASS__ . '| Cache file found');\n\n\t\t\t// check if we're in context of a cached page or not\n\t\t\tif ($this->strValidateArray['ValidOnCachedPages'] AND $GLOBALS['TSFE'] AND $GLOBALS['TSFE']->isGeneratePage()) {\n\t\t\t\t$this->Flush();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t# TODO $this->strValidateArray['ValidLifetime']\n\n\t\t\t// flushes the cache when cache entry is older than given timestamp\n\t\t\tif ($this->strValidateArray['ValidWhenOlderThan'] AND filemtime($strFilePath) > $this->strValidateArray['ValidWhenOlderThan']) {\n\t\t\t\tif (self::$Debug) self::$Debug->Log(__CLASS__ . '| ValidWhenOlderThan is NOT valid');\n\t\t\t\t$this->Flush();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// flushes the cache when cache entry is new than given timestamp\n\t\t\tif ($this->strValidateArray['ValidWhenNewerThan'] AND filemtime($strFilePath) < $this->strValidateArray['ValidWhenNewerThan']) {\n\t\t\t\tif (self::$Debug) self::$Debug->Log(__CLASS__ . '| ValidWhenNewerThan is NOT valid: ' . date(\"H:i:s\", filemtime($strFilePath)) . ' < ' . date(\"H:i:s\", $this->strValidateArray['ValidWhenNewerThan']));\n\t\t\t\t$this->Flush();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// check hash if it's valid\n\t\t\tif (!$this->CompareHashFromFile()) {\n\t\t\t\tif (self::$Debug) self::$Debug->Log(__CLASS__ . '| CompareHashFromFile is NOT valid');\n\t\t\t\t$this->Flush();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (self::$Debug) self::$Debug->Log(__CLASS__ . '| Cache file not found: ' . $strFilePath);\n\t\t\treturn false;\n\t\t}\n\n\t\tif (self::$Debug AND $cache) self::$Debug->Log(__CLASS__ . '| Has cache');\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "389087dc8f2dffd7ebe5eb453732a23e", "score": "0.58177197", "text": "private function _isFileCached($filePath) {\n\n if (file_exists($filePath) && (($this->_now - filemtime($filePath)) / 60 <= $this->_config['cache_expire'] || $this->_config['cache_expire'] < 0 )) {\n return true;\n }\n\n return false;\n\n }", "title": "" }, { "docid": "7e20e762545e8d7b88237777e7cd5c24", "score": "0.5798159", "text": "private static function cached($actionContext) {\n $httpContext = $actionContext->getHttpContext();\n $request = $httpContext->getRequest();\n\n // TODO: support POST\n if ($request->isPost()) {\n return false;\n }\n\n $cacheSettings = InternalHelper::getStaticPropertyValue('\\\\PhpMvc\\\\OutputCache', 'settings');\n $actionName = $actionContext->getActionName();\n\n if (!isset($cacheSettings[$actionName])) {\n $cacheSettings[$actionName] = array();\n }\n\n if (!isset($cacheSettings['.'])) {\n $cacheSettings['.'] = array();\n }\n\n if (empty($cacheSettings[$actionName]) && empty($cacheSettings['.'])) {\n return false;\n }\n\n // location\n if (!empty($cacheSettings[$actionName]['location'])) {\n $location = intval($cacheSettings[$actionName]['location']);\n }\n elseif (!empty($cacheSettings['.']['location'])) {\n $location = intval($cacheSettings['.']['location']);\n }\n else {\n $location = OutputCacheLocation::ANY;\n }\n\n if (array_search($location, array(OutputCacheLocation::ANY, OutputCacheLocation::SERVER, OutputCacheLocation::SERVER_AND_CLIENT)) === false) {\n return false;\n }\n\n // vary by parameters\n $params = self::getCacheParams($actionContext, $cacheSettings, 'varyByParam', array_merge($request->get(), $actionContext->getArguments()));\n\n // vary by headers\n $headers = self::getCacheParams($actionContext, $cacheSettings, 'varyByHeader', $request->headers());\n\n // vary by custom handlers\n $custom = self::getCacheParams($actionContext, $cacheSettings, 'varyByCustom');\n\n // check cache\n $response = $httpContext->getResponse();\n $cache = $httpContext->getCache();\n\n $cacheKey = 'output_' . $request->path() . '_params=' . implode('&', $params) . '_http=' . implode('&', $headers) . '_custom=' . implode('&', $custom);\n\n if (($cachedResponse = $cache->get($cacheKey)) !== null) {\n $response->setHeaders($cachedResponse['headers']);\n $response->setCookies($cachedResponse['cookies']);\n $response->setStatusCode($cachedResponse['statusCode']);\n $response->setStatusDescription($cachedResponse['statusDescription']);\n $response->writeFile($cachedResponse['files']);\n $response->write($cachedResponse['output']);\n $response->end();\n return true;\n }\n\n InternalHelper::setPropertyValue($actionContext, 'cacheKey', $cacheKey);\n\n return false;\n }", "title": "" }, { "docid": "d19f4c2fcc7ee674702a609f71fd59ff", "score": "0.5790539", "text": "public function local_cache_filename_from_url()\n {\n $url = $this->get_maestro()->get_request()->getUri()->__toString();\n\n Assertion::string($url);\n Assertion::notEmpty($url);\n\n //See if we've previously determined the file for this URL\n if (\\array_key_exists($url, $this->_urls_to_files)) {\n //Increment a shared global counter, used for testing\n $this->_urls_to_files_cache_lookups[ $url ] += 1;\n\n $ret = $this->_urls_to_files[ $url ];\n\n Assertion::string($ret);\n Assertion::notEmpty($ret);\n\n return $ret;\n }\n\n $parts = \\parse_url($url);\n\n $host = $this->sanitize_host_for_cache_filename();\n $path = $this->sanitize_path_for_cache_filename();\n $ext = '';\n if ('HTTPS' === \\mb_strtoupper($this->get_maestro()->get_request()->getUri()->getScheme())) {\n $ext = '_https';\n }\n\n $file = \\sprintf(\n '%1$s%2$s%3$s%4$s.html',\n $host,\n $path,\n 'index',\n $ext\n );\n\n //Cache this url and file for future use\n $this->_urls_to_files[ $url ] = $file;\n\n //Create an entry in the global counters for this URL\n $this->_urls_to_files_cache_lookups[ $url ] = 0;\n\n return $file;\n }", "title": "" }, { "docid": "70b5f6ae645429b70b3e8fac31d9b6e0", "score": "0.57807964", "text": "public function get_cached($url) {\n $simplified_url = str_replace([\"http://\", \"https://\", \"?\", \"&\", \"=\"], [\"\", \"\", \"/\", \"/\", \"/\"], $url);\n\t\t// TODO build this from the variable given to Cache\n\t\t$pageCacheDir = __DIR__ . '/../cache/'.\"pages/\";\n $filename = $pageCacheDir.$simplified_url;\n if (substr($filename, -1) == '/') {\n $filename = $filename.\"index.html\";\n }\n if(file_exists($filename)) {\n// $this->message(\"loading cached file from \".$filename.\" for page at url \".$url);\n\t\t\t// TODO touch file and its parent, and try to do neighbour deletion\n $this->refresh_in_cache($pageCacheDir, $filename);\n\t\t} else {\n// $this->message(\"we have no local copy of \".$url.\" Downloading to \".$filename);\n $dir = substr($filename, 0, strrpos($filename, '/'));\n if(!is_dir($dir)) {\n//\t\t\t\t$this->message(\"creating directories for \".$dir);\n mkdir($dir, 0777, true);\n }\n $this->download_remote($url, $filename);\n }\n return file_get_contents($filename);\n }", "title": "" }, { "docid": "f966a4d9a8e7f4a4da7f7aea23649d80", "score": "0.5777676", "text": "public function use_cache() {\n\n\t\t// get the settings that we need\n\t\t$settings = apply_filters( 'toolbox_customizer_css_' . $this->file_prefix , array() );\n\t\t\n\t\t// build the cache file path\n\t\t$cache_path = $this->dir_settings( $this->directory )['cache_dir'] . '/' . $this->file_prefix . '.cache';\n\n\t\t// check if cache already exists\n\t\tif ( \\file_exists( $cache_path ) ) {\n\n\t\t\t$cache = \\file_get_contents( $cache_path );\n\t\t\t\n\t\t\t$cache_data = \\json_decode( $cache , true );\n\t\t\t// return if the data is identical. Of so, we don't need to recompile, return false\n\t\t\treturn ( $this->arrayRecursiveDiff( $settings , $cache_data ) == [] );\n\n\t\t}\n\t\t// don't use cache\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9cc11ef3e39af6e1c1bfa390ce48a645", "score": "0.57776755", "text": "private function loadFromCache() {\n\t\t$this->dataLoaded = false;\n\n\t\t$key = $this->getCacheKey();\n\t\t$data = MediaWikiServices::getInstance()->getMainWANObjectCache()->get( $key );\n\n\t\tif ( !empty( $data ) && is_array( $data ) ) {\n\t\t\t$this->url = $data['url'];\n\t\t\t$this->type = $data['type'];\n\t\t\t$this->submitter_actor = $data['actor'];\n\t\t\t$this->create_date = $data['create_date'];\n\t\t\t$this->dataLoaded = true;\n\t\t\t$this->exists = true;\n\t\t}\n\n\t\t$stats = MediaWikiServices::getInstance()->getStatsdDataFactory();\n\t\tif ( $this->dataLoaded ) {\n\t\t\twfDebug( \"Loaded Video:{$this->name} from cache\\n\" );\n\t\t\t$stats->increment( 'video_cache_hit' );\n\t\t} else {\n\t\t\t$stats->increment( 'video_cache_miss' );\n\t\t}\n\n\t\treturn $this->dataLoaded;\n\t}", "title": "" }, { "docid": "d57ce1bef5bf6c266f761eee369318ea", "score": "0.5749131", "text": "private function serveCache()\n\t{\n\t\theader('ETag: '.$this->identifier);\n\t\treadfile($this->cacheFile);\n\t\treturn;\n\t}", "title": "" }, { "docid": "19363c7ccf75712cd0b06f0743424812", "score": "0.5748859", "text": "public function isCached()\n {\n\n if (Cache::has($this->cacheKey))\n {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "ffef57053a7066db724d7044f5470d56", "score": "0.57468826", "text": "function cachedDownload($file) {\n $date = date('Y-m-d\\TH:i', strtotime($file->created));\n // 'repo' is actually the branch, that's just the way bintray is organised.\n $download_dir = \"{$this->cache->path}/{$file->repo}/{$date}/{$file->sha1}\";\n $download_path = \"{$download_dir}/{$file->name}\";\n $meta_path = \"{$download_path}.meta\";\n\n if (!is_file($meta_path)) {\n if (!is_dir($download_dir)) {\n mkdir($download_dir, 0777, true);\n }\n\n if (is_file($download_path) && hash_file('sha256', $download_path) != $file->sha256) {\n unlink($download_path);\n }\n\n if (!is_file($download_path)) {\n $this->downloadFile($this->getFileUrl($file), $download_path);\n }\n\n file_put_contents($meta_path, json_encode($file));\n }\n\n if (hash_file('sha256', $download_path) != $file->sha256) {\n unlink($download_path);\n throw new RuntimeException(\"File signature doesn't match: {$this->getFileUrl($file)}\");\n }\n\n return $download_path;\n }", "title": "" }, { "docid": "8c2128142dae75d78a130b4c847282da", "score": "0.57465905", "text": "private function checkCaches(string $cached_template_file) {\n\t\t$cache = AppCache::fromCacheSystem();\n\n\t\tif ( $cache->isTokenExpired() ) {\n\t\t\t$cache->updateToken();\n\t\t}\n\n\t\t$this->checkIfHttpCacheCanBeUsed( $cache->getHttpCache( $this->request ) );\n\n\t\t$this->checkIfTemplateCacheNeedBeGenerated($cache->getTemplateCache( $cached_template_file ) );\n\n\t\treturn ;\n\t}", "title": "" }, { "docid": "4855231aceda6fbca3fcc9eec4a65f50", "score": "0.57423353", "text": "function check_cache_path()\n\t{\n\t\t$path = APPPATH.'cache/';\n\n\t\t// Add a trailing slash to the path if needed\n\t\t$path = preg_replace(\"/(.+?)\\/*$/\", \"\\\\1/\", $path);\n\n\t\tif ( ! is_dir($path) OR ! is_really_writable($path))\n\t\t{\n\t\t\t// If the path is wrong we'll turn off caching\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "4490c4d9d8fa75b2db1966be061dc29d", "score": "0.5738691", "text": "protected function getContentUsingCache()\n {\n if ($this->lastModifiedTime === null || config('site.cache_enable') !== true) {\n return $this->renderLayout();\n }\n\n $key = $this->route;\n $cachedTimestamp = Cache::get($key . '_time');\n $lastModifiedTime = $this->lastModifiedTime->toIso8601String();\n\n // try to return cached content\n if (!empty($cachedTimestamp) && ($cachedTimestamp === $lastModifiedTime)) {\n $content = Cache::get($key);\n if (!empty($content)) {\n\n return $content;\n }\n }\n\n // if no cached content or cache expired\n // make new cache\n $content = $this->renderLayout();\n\n Cache::forever($key . '_time', $lastModifiedTime);\n Cache::forever($key, $content);\n\n return $content;\n }", "title": "" }, { "docid": "2cfe3ecaf42a06c95e5902e4124e26da", "score": "0.57340884", "text": "function exists($id=FALSE,$timeout=FALSE,$return_data=FALSE)\n{\n if($timeout===FALSE)\n $timeout=\\ui\\config('cache_timeout',3600);\n if($id===FALSE)\n $id=make_id();\n $fname=\\ui\\config('cache_path').$id.\\ui\\config('cache_file_suffix');\n $fs=@fopen($fname,'rb',FASLE);\n if($fs===FALSE)\n return false;\n flock($fs,LOCK_SH);\n $time=fread($fs,4);\n if(!isset($time[3])){\n flock($fs,LOCK_UN);\n @unlink($fname);//Dele\n return FALSE;\n }\n $time=unpack('N',$time);\n $time=array_pop($time);\n if(time()-$time>=$timeout){\n flock($fs,LOCK_UN);\n @unlink($fname);//Dele\n return FALSE;\n }\n if($return_data){\n $data='';\n while(!feof($fs))\n $data.=fread($fs,1024*512);//read in 512 KB blocks\n flock($fs,LOCK_UN);\n fclose($fs);\n return $data; \n }\n flock($fs,LOCK_UN);\n fclose($fs);\n return TRUE;\n}", "title": "" }, { "docid": "4b424a03251a2d7efd650c694101a4b1", "score": "0.5733087", "text": "function getCached($url, $expires = 3600) {\n if (!isset($kirby)) $kirby = kirby();\n\n // Define path to cached file\n $cachePath = $kirby->roots()->cache() . DS . str::slug($url) . '.txt';\n\n // Check for valid cached file\n if (f::isReadable($cachePath) and ((time() - f::modified($cachePath)) < $expires)) {\n return f::read($cachePath);\n }\n\n // Cached file is expired or doesn't exist; pull content from original source and save a new cache\n $content = f::read($url);\n f::write($cachePath, $content);\n return $content;\n}", "title": "" }, { "docid": "683d17a241fb05a1a3aca957533c55db", "score": "0.5721029", "text": "static function cacheFile($file, $cacheFile, $flags = 0){\n if (!is_dir(dirname($cacheFile))){\n mkdir(dirname($cacheFile), 0755, true);}\n if (!is_file($cacheFile) || filemtime($cacheFile) <= filemtime($file) || $flags & self::NOCACHE){\n file_put_contents($cacheFile, self::parseFile($file, null, $flags));}\n return $cacheFile;}", "title": "" }, { "docid": "9a6ddee486f7b88af6047055b7190f20", "score": "0.57112604", "text": "public function isCached(): bool\n {\n return $this->tplObj->isCached($this->templateFile, $this->cacheId, $this->compileId);\n }", "title": "" }, { "docid": "968a479069886ee121bfbcfeae02e648", "score": "0.57106644", "text": "function bm_cacheGet ($id = '', $expires = 0) {\n\n\tif ($expires == 0) {\n\t\t$expires = BM_CACHE_TIME;\n\t}\n\t\n\t// add on random 10 percent of the expire time to add some randomness\n\t// will mean all caches on one page for same time frame do not expire at the same time\n\t$expires = $expires + ceil (rand (1, ($expires / 10)));\n\n\t$filename = bm_cacheName ($id);\n\t$filenameExists = file_exists ($filename);\n\t\n\tif ($filenameExists) {\n\t\t$age = (time () - filemtime ($filename));\n\t\tif ($age < $expires) {\n\t\t\t$data = file_get_contents ($filename);\n\t\t\treturn unserialize ($data);\n\t\t}\n\t}\n\t\n\treturn FALSE;\n\t\n}", "title": "" }, { "docid": "2558188125a81ccb04f0b92234dab8ba", "score": "0.57012606", "text": "protected function _get_cache($key)\n {\n if (empty($key)) {\n\n return false;\n }\n\n // --------------------------------------------------------------------------\n\n // Prep the key, the key should have a prefix unique to this model\n $prefix = $this->_cache_prefix();\n\n // --------------------------------------------------------------------------\n\n switch ($this->_cache_method) {\n\n case 'MEMCACHED':\n\n // @TODO\n $return = false;\n break;\n\n case 'LOCAL':\n default:\n\n if (isset($this->_cache_values[md5($prefix . $key)])) {\n\n $return = unserialize($this->_cache_values[md5($prefix . $key)]);\n\n } else {\n\n $return = false;\n\n }\n break;\n }\n\n return $return;\n }", "title": "" }, { "docid": "35b7985eb778542bd7f921e3fa957c6c", "score": "0.56962234", "text": "public function isCached($identifier);", "title": "" }, { "docid": "28bb1105d158e92388b7dfe129359813", "score": "0.56880456", "text": "public function getCacheFile()\n {\n return $this->cache_file;\n }", "title": "" }, { "docid": "866ba42e013d21bfb10b90fcda56f689", "score": "0.56795037", "text": "protected function _checkFileCache(Zefir_Form $form, $field)\n\t{\n\t\t$request = $this->getRequest();\n\t\t$options = Zend_Registry::get('options');\n\t\t \n\t\t$fileCache = $request->getParam($field.'Cache', '');\n\t\t$filePath = APPLICATION_PATH.'/../public/assets/'.$fileCache;\n\n\t\tif ($fileCache != null\t&& file_exists($filePath))\n\t\t$form->getElement($field)->setRequired(FALSE);\n\t\telse\n\t\t$form->getElement($field.'Cache')->setValue(null);\n\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "fd768c449e91c4f6f9dcda95007e05ca", "score": "0.5673805", "text": "function retrieveFile($getFileCallback, $cacheKey, $forceUseCache = false) {\n //change to root path . storage_path\n\n $cacheIndex = ROOT_PATH . \"/\" . EnvLoader::get(\"storage.directory\") .\"/\". \"file-cache-index.json\";\n\n $useCache = false;\n $refreshFile = true;\n $cachedFileName = null;\n\n if(file_exists($cacheIndex)) {\n $indexData = fileGetJson($cacheIndex);\n } else {\n $indexData = [];\n }\n\n // old: defined(\"FILE_CACHE_ENABLED\")\n if(EnvLoader::get(\"file-cache.enabled\") || $forceUseCache) {\n // old: defined(\"FILE_CACHE_STALENESS_AGE_IN_MINUTES\")\n $tmpFileCacheStaleness = EnvLoader::get(\"file-cache.staleness\");\n if($tmpFileCacheStaleness) {\n if(array_key_exists($cacheKey, $indexData)) {\n $cacheData = $indexData[$cacheKey];\n $lastModified = $cacheData['modified'];\n $cachedFileName = $cacheData['filename'];\n $isLive = isset($cacheData['live']) ? $cacheData['live'] : true;\n\n if($forceUseCache) {\n $useCache = true;\n $refreshFile = false;\n } else if(!$isLive) {\n $useCache = false;\n $refreshFile = false;\n } else if(!file_exists($cachedFileName)) {\n $useCache = false;\n $refreshFile = true;\n } elseif ($tmpFileCacheStaleness == -1) {\n $useCache = false;\n $refreshFile = false;\n }\n else {\n $useCache = true;\n $expireTime = $lastModified + (60 * $tmpFileCacheStaleness);\n $refreshFile = (time() > $expireTime);\n }\n\n }\n }\n }\n\n if(!$useCache) {\n try {\n $filename = $getFileCallback();\n } catch(\\Exception $e) {\n var_dump($getFileCallback);\n throw $e;\n }\n if($refreshFile) {\n $indexData[$cacheKey] = [\n \"modified\" => time(),\n \"filename\" => $filename\n ];\n filePutJson($cacheIndex, $indexData);\n }\n printMsg(\"Retrieved file from SOURCE: \" . $filename);\n } else {\n if($cachedFileName === null) {\n throw new \\Exception(\"Code error\");\n }\n $filename = $cachedFileName;\n printMsg(\"Retrieved file from CACHE: \" . $filename);\n return $filename;\n }\n\n return $filename;\n}", "title": "" }, { "docid": "3f56c263aa29a1bb46d2ad08d1cda994", "score": "0.5673378", "text": "public function get(string $key) \n {\n if ( file_exists('cachedata/'.$key) ) {\n $timestamp = filemtime('cachedata/'.$key) + $this->duration ;\n echo \"data exist on file $key last modified: \". date (\"F d Y H:i:s.\", filemtime('cachedata/'.$key) ); \n if ($timestamp > time() ) {\n $fileContents = file_get_contents('cachedata/'.$key);\n $output = @serialize($fileContents ); \n var_dump($output) ;\n return $output;\n }else{\n echo ' <br>but this cache expired !duration is big then: '.$this->duration.'s';\n return null ;\n }\n } else { //else return null\n echo 'cache expired !';\n return null;\n }\n }", "title": "" }, { "docid": "df5e4f496c12c179c615e358a5bb72a9", "score": "0.56717896", "text": "public function isCached()\n {\n return $this->tplObj->isCached($this->templateName . self::TPL_NAME_SUFIX, $this->templateCacheId, $this->templateCompileId);\n }", "title": "" }, { "docid": "dbd86f344a8120cef544bd0999a90a3e", "score": "0.5667469", "text": "function cache($file,$func,$time=null,$type=null,$params=null){if(isset($_GET['refresh']))@unlink($this->root.'tmp/'.$file);$this->tmp();return parent::cache('tmp/'.$file,$func,$time,$type,$params);}", "title": "" }, { "docid": "48821637464be85226b0bf0aacc955fc", "score": "0.5665692", "text": "function getCache ($cacheName, $doInitialize, $maxsize=0, $expirationTime=0)\n {\n global $v4bConfig;\n if ($v4bConfig['V4B_USE_CACHING'] === false)\n return false;\n\n // see if we have read & unserialized the cache file already\n $cache = $GLOBALS['Cache'][$cacheName];\n if ($cache)\n return $cache;\n\n // nothing in $GLOBALS -> look for cache file\n $cache = false;\n global $v4bConfig;\n $tmpdir = $v4bConfig['V4B_FILE_TMP_PATH'];\n $fname = $tmpdir.'/v4bcache_'.$cacheName;\n $isInitialized = file_exists($fname);\n\n if ($isInitialized)\n $cache = FileUtil::readSerializedFile ($fname);\n else\n if (!$isInitialized && $doInitialize)\n $cache = CacheUtil::initCache ($cacheName, $maxsize, $expirationTime);\n\n if ($cache)\n $GLOBALS['V4BCache'][$cacheName] = &$cache;\n\n return $cache;\n }", "title": "" }, { "docid": "6a0ab622b1c19285cd338614c65ebb68", "score": "0.5665012", "text": "public function get($key)\n {\n if (array_key_exists($key, $this->_caches)) {\n return $this->_caches[$key];\n }\n\n $path = $this->_pathForKey($key);\n if (!file_exists($path)) {\n return false;\n }\n\n $contents = unserialize(file_get_contents($path));\n $time = $_SERVER['REQUEST_TIME'];\n\n if ($time >= $contents['expiration']) {\n unlink($path);\n return false;\n }\n\n $this->_caches[$key] = $contents['value'];\n\n return $contents['value'];\n }", "title": "" }, { "docid": "7e8a17ce63446ce22522f3feb37ec7ad", "score": "0.5660063", "text": "protected function should_cache() {\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "20978f46219e965864d77a24dbfbfad0", "score": "0.5651112", "text": "public function get($hash)\n // Get the file path of an item in the cache, marking it as used\n {\n if(!isset($this->items_by_hash[$hash]))\n return FALSE;\n\n $item = $this->items_by_hash[$hash];\n\n // First, update the timestamp in the memory cache: it's an access\n // time, not just modified time. The calling routine should at\n // least open the file to update the access time on the file\n // itself. This method should do it too, but it's a waste if the\n // caller's likely to do it anyway.\n $item->time = time();\n\n // Get the file path: we'll need it to return at the end, but we\n // also want to check for cache consistency\n $cache_path = $this->cachePath($hash);\n\n // Check it exists. It should. If not, this is exceptional.\n if(!file_exists($cache_path))\n throw new Exception(\"Inconsistent cache: $hash not found\");\n #return FALSE;\n\n // If it's the newest item, we can just continue.\n if($item !== $this->newest_item)\n return $cache_path;\n\n // Else it's not the newest, so let's promote it by rewiring its\n // neighbours.\n\n // First, we wire the two neighbours together, removing\n // the item from the double-linked list.\n $oprev = $item->prev;\n $onext = $item->next;\n\n if($oprev) {\n $oprev->next = $onext;\n }\n\n if($onext) {\n $onext->prev = $oprev;\n }\n\n // Then we put it at the top of the list\n $item->prev = $this->newest_item;\n $item->next = null;\n\n // And set the old newest item to the next newest.\n if($this->newest_item) {\n $this->newest_item->next = $item;\n }\n\n // Finally, bung it at the top.\n $this->newest_item = $item;\n\n // And schedule a future (well, very near future)\n // asynchronous cache expiry check.\n $this->_checkCacheSize_async();\n\n // Return the file path in the cache.\n return $cache_path;\n }", "title": "" }, { "docid": "59f7971d9ee5df71737221173331a39b", "score": "0.5638624", "text": "public function hasCached(){\r\n\t\treturn !$this->disabled ? apc_exists($this->varPrefix.$this->requestId) : false;\r\n\t}", "title": "" }, { "docid": "971f8a9f165169bf5b2e369c8f88c1f9", "score": "0.5638484", "text": "private function _checkCacheAvailable($name){\n if($this->enableCache){\n $cachefile = $this->cacheLocation . $name;\n $cachetime = 5 * 60; //5 min\n if (file_exists($cachefile) && (time() - $cachetime < filemtime($cachefile))) {\n return true;\n } else {\n return false;\n } \n } else {\n return false;\n }\n }", "title": "" }, { "docid": "3da60ed163d0f49b09c08e85d31b277e", "score": "0.56352806", "text": "public function useCacheFile(): static\n {\n $this->useCacheFile = true;\n\n return $this;\n }", "title": "" }, { "docid": "e6e2f59340911a5d9d71d48b13abb90d", "score": "0.56297654", "text": "public function checkCache()\n {\n $templates = Template::all();\n\n foreach ($templates as $template) {\n $_file = $this->getPath($template->slug);\n\n if (!File::exists($_file)) {\n File::put($_file, $template->view);\n }\n }\n }", "title": "" }, { "docid": "6b197b1d6ddab5a02796d6c66779f750", "score": "0.5627151", "text": "private static function _getFromCache(){\n $cacheHandler = App_DI_Container::get('CacheManager')->getCache('default');\n\n if($acl = $cacheHandler->load(App_FlagFlippers_Manager::$indexKey)){\n return $acl;\n }\n\n return FALSE;\n }", "title": "" }, { "docid": "5b7cdaea1aa6d56cfab03da29baf760a", "score": "0.56234014", "text": "private function read_cache() {\r\n return file_get_contents($this->cache_filename());\r\n }", "title": "" }, { "docid": "45f1edc20d7bdf97baf84b7949fcd7f5", "score": "0.5619115", "text": "private function isCacheUpToDate($cachedFile, $templateFile)\n {\n if (!file_exists($cachedFile)) {\n return false;\n }\n\n $cacheTime = filemtime($cachedFile);\n $templTime = filemtime($templateFile);\n\n return $cacheTime == $templTime;\n }", "title": "" }, { "docid": "067a0129295a5675d6e22a5e7bd763d1", "score": "0.55929106", "text": "public function isCacheable();", "title": "" }, { "docid": "02edd96c9bde01dcd3b78ac6297deeca", "score": "0.55909276", "text": "function breeze_serve_cache( $filename, $url_path, $X1, $opts ) {\n\tif ( strpos( $filename, '_breeze_cache_' ) === false ) {\n\t\treturn;\n\t}\n\n\tif ( function_exists( 'gzencode' ) && ! empty( $GLOBALS['breeze_config']['cache_options']['breeze-gzip-compression'] ) ) {\n\t\t$file_name = md5( $filename . '/index.gzip.html' ) . '.php';\n\t} else {\n\t\t$file_name = md5( $filename . '/index.html' ) . '.php';\n\t}\n\n\t$blog_id_requested = isset( $GLOBALS['breeze_config']['blog_id'] ) ? $GLOBALS['breeze_config']['blog_id'] : 0;\n\t$path = breeze_get_cache_base_path( false, $blog_id_requested ) . md5( $url_path ) . '/' . $file_name;\n\n\t$modified_time = 0;\n\tif ( file_exists( $path ) ) {\n\t\t$modified_time = (int) @filemtime( $path );\n\t}\n\n\tif ( ! empty( $opts['breeze-browser-cache'] ) && ! empty( $modified_time ) && ! empty( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) && strtotime( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) === $modified_time ) {\n\t\theader( $_SERVER['SERVER_PROTOCOL'] . ' 304 Not Modified', true, 304 );\n\t\texit;\n\t}\n\n\tif ( @file_exists( $path ) ) {\n\n\t\t$cacheFile = file_get_contents( $path );\n\n\t\tif ( $cacheFile != false ) {\n\t\t\t$datas = unserialize( $cacheFile );\n\t\t\tforeach ( $datas['headers'] as $data ) {\n\t\t\t\theader( $data['name'] . ': ' . $data['value'] );\n\t\t\t}\n\t\t\t//set cache provider header\n\t\t\theader( 'Cache-Provider:CLOUDWAYS-CACHE-' . $X1 . 'E' );\n\n\t\t\t$client_support_gzip = true;\n\n\t\t\t//check gzip request from client\n\t\t\tif ( isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) && ( strpos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) === false || strpos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate' ) === false ) ) {\n\t\t\t\t$client_support_gzip = false;\n\t\t\t}\n\n\t\t\tif ( $client_support_gzip && function_exists( 'gzdecode' ) && ! empty( $GLOBALS['breeze_config']['cache_options']['breeze-gzip-compression'] ) ) {\n\t\t\t\t//if file is zip\n\n\t\t\t\t$content = gzencode( $datas['body'], 9 );\n\t\t\t\theader( 'Content-Encoding: gzip' );\n\t\t\t\theader( 'cache-control: must-revalidate' );\n\t\t\t\theader( 'Content-Length: ' . strlen( $content ) );\n\t\t\t\theader( 'Vary: Accept-Encoding' );\n\t\t\t\techo $content;\n\t\t\t} else {\n\t\t\t\t//render page cache\n\t\t\t\techo $datas['body'];\n\t\t\t}\n\t\t\texit;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "c3d5fe06d9b4561811cba18f3647db6b", "score": "0.55820197", "text": "public function shouldCache()\n\t{\t\n\t\tif(XLII_Cache_Manager::getInstance()->getStatuscode() !== 200)\n\t\t\treturn false;\n\t\t\t\n\t\tif(!$headers = headers_list())\n\t\t\treturn true;\n\t\t\n\t\tforeach($headers as $header)\n\t\t{\n\t\t\t$header = explode(':', strtolower($header), 2);\n\t\t\t\n\t\t\tswitch($header[0])\n\t\t\t{\n\t\t\t\tcase 'cache-control':\n\t\t\t\t\tif(strpos($header[1], 'no-cache') !== false)\n\t\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'expires':\n\t\t\t\t\t$date = gmdate('Y-m-d H:i:s', strtotime(trim($header[1])));\n\t\t\t\t\t\n\t\t\t\t\tif(!$date || $date <= gmdate('Y-m-d H:i:s'))\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" } ]
0d098143318b890e6623c13ffea63c21
globalising of the needed variables, objects and arrays
[ { "docid": "68304998707ee703cbd06f647716aac0", "score": "0.0", "text": "function APCms_Plugin_Example($test=false) {\n\t\tglobal $db, $apcms, $hook;\n\t\t\n\t\t\n\t\t/*\n\t\t ////////////////////////////////////////////////////////////////////////\n\t\t\t\t\t\t\tStart of plugin-configuration\n\t\t ////////////////////////////////////////////////////////////////////////\n\t\t*/\n\t\t\n\t\t/** The directoryname of this plugin */\n\t\t$this->dirname\t\t\t\t=\t'apcms_plugin_example';\n\t\t\n\t\t/** The name of this plugin */\n\t\t$this->plugin\t\t\t\t=\t'Example plugin';\n\t\t\n\t\t/** The description of this plugin */\n\t\t$this->description\t\t\t=\t'This is an example plugin to show how it must look like';\n\t\t\n\t\t/** The name of the author of this plugin */\n\t\t$this->author_name\t\t\t=\t'Alexander \\'dma147\\' Mieland';\n\t\t\n\t\t/** The email adress of the author */\n\t\t$this->author_email\t\t\t=\t'[email protected]';\n\t\t\n\t\t/** The homepage of the author or of this plugin */\n\t\t$this->author_homepage\t\t=\t'http://www.php-programs.de/apcms_plugin_example.html';\n\t\t\n\t\t/** The version of this plugin */\n\t\t$this->version\t\t\t\t=\t'0.0.1';\n\t\t\n\t\t/** the minimum required version of APCms */\n\t\t$this->apcms_version\t\t=\t'0.0.1_pre1';\n\t\t\n\t\t/** The configuration items for the administration interface */\n\t\t$this->config_items\t\t\t=\tarray(\n\t\t\t\n\t\t\t\n\t\t\t/** name of the formfield */\n\t\t\t'title'\t\t\t\t\t=>\t\tarray(\n\t\t\t\t\n\t\t\t\t/** Type of the data in the formfield \n\t\t\t\t\tcan be one of: integer, string, text, bool */\n\t\t\t\t'type' \t\t\t\t\t=>\t'string',\n\t\t\t\t\n\t\t\t\t/** Title of the formfield */\n\t\t\t\t'name'\t\t\t\t\t=>\t$apcms['LANGUAGE']['apcms_plugin_example']['CONFIG_NAME'],\n\t\t\t\t\n\t\t\t\t/** description of the formfield */\n\t\t\t\t'description'\t\t\t=>\t$apcms['LANGUAGE']['apcms_plugin_example']['CONFIG_NAME_DESC'],\n\t\t\t\t\n\t\t\t\t/** default value of the formfield */\n\t\t\t\t'default'\t\t\t\t=>\t'Example plugin'\n\t\t\t),\n\t\t\t\n\t\t\t\n\t\t\t'foofield'\t\t\t\t=>\t\tarray(\n\t\t\t\t'type' \t\t\t\t\t=>\t'string',\n\t\t\t\t'name'\t\t\t\t\t=>\t$apcms['LANGUAGE']['apcms_plugin_example']['CONFIG_FOO'],\n\t\t\t\t'description'\t\t\t=>\t$apcms['LANGUAGE']['apcms_plugin_example']['CONFIG_FOO_DESC'],\n\t\t\t\t'default'\t\t\t\t=>\t'content of foo'\n\t\t\t),\n\t\t\t\n\t\t\t\n\t\t\t'barfield'\t\t\t\t=>\t\tarray(\n\t\t\t\t'type' \t\t\t\t\t=>\t'integer',\n\t\t\t\t'name'\t\t\t\t\t=>\t$apcms['LANGUAGE']['apcms_plugin_example']['CONFIG_BAR'],\n\t\t\t\t'description'\t\t\t=>\t$apcms['LANGUAGE']['apcms_plugin_example']['CONFIG_BAR_DESC'],\n\t\t\t\t'default'\t\t\t\t=>\t1234\n\t\t\t),\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t);\n\t\t\n\t\t/*\n\t\t ////////////////////////////////////////////////////////////////////////\n\t\t\t\t\t\t\tEnd of plugin-configuration\n\t\t ////////////////////////////////////////////////////////////////////////\n\t\t*/\n\t\t\n\t\t/** Sets the path to the plugin directory */\n\t\t$this->pluginpath = @realpath(@dirname(__FILE__));\n\t\t\n\t\t/** Loads the configuration from the database */\n\t\t$retconf = $db->unbuffered_query_first(\"SELECT `config` FROM `\".$apcms['table']['global']['plugins'].\"` WHERE `name`='\".$this->dirname.\"'\");\n\t\tif (isset($retconf) && count($retconf) >= 1) {\n\t\t\t$this->config = unserialize(stripslashes(trim($retconf[0])));\n\t\t}\n\t\t\n\t\t/** Only if $test = False, then run the _init_plugin method to initialise the plugin */\n\t\tif ($test === false) {\n\t\t\t$this->_init_plugin();\n\t\t}\n\t\t\n\t}", "title": "" } ]
[ { "docid": "b0feb88135139369668b4cb22c54d540", "score": "0.6867586", "text": "abstract public function fromGlobals();", "title": "" }, { "docid": "97e5b094f47f93c98df6805ed1c0fc19", "score": "0.68100166", "text": "protected abstract function globals();", "title": "" }, { "docid": "a447a0bbbe25e0847485393c17224a26", "score": "0.6785063", "text": "protected function initVariables() {}", "title": "" }, { "docid": "a447a0bbbe25e0847485393c17224a26", "score": "0.6785063", "text": "protected function initVariables() {}", "title": "" }, { "docid": "8ea48dd8239aabe93fefd6b2df3a152c", "score": "0.67446816", "text": "protected static function initializeGlobalVariables() {}", "title": "" }, { "docid": "211d252509a604166da618f8a17c8624", "score": "0.66252434", "text": "function init_global(){\r\n\t\r\n\tglobal $CFG;\r\n\tglobal $DATA;\r\n\t\r\n\t$CFG = new StdClass();\r\n\t$DATA = new StdClass();\r\n}", "title": "" }, { "docid": "6a63ec8086f716e19627b17ffa98eb9b", "score": "0.6527933", "text": "public static function fromGlobals() {}", "title": "" }, { "docid": "77aeb55c91825defe07b175d0cd914e8", "score": "0.65258086", "text": "function setupCommonVars() {\n $objConstructor = new JSPHP_Runtime_FunctionHeader();\n $this->vars['Object'] = $objConstructor;\n $objConstructor['prototype'] = $this->createObjectWrapper(new JSPHP_Runtime_Common_ObjectPrototype(), $objConstructor);\n \n $functionConstructor = new JSPHP_Runtime_FunctionHeader();\n $objConstructor->setConstructor($functionConstructor);\n $functionConstructor->setConstructor($functionConstructor);\n $functionConstructor->setPrototype($this->createObject());\n $this->vars['Function'] = $functionConstructor;\n $functionPrototype = $functionConstructor['prototype'] = $this->createObject();\n \n /**\n * Set up all the other machinery\n */\n $functionConstructor['prototype']['call'] = $this->createPHPFunction(array ($this, 'runtimeFunctionCall'));\n $functionConstructor['prototype']['apply'] = $this->createPHPFunction(array ($this, 'runtimeFunctionApply'));\n \n $this->vars['Array'] = $this->createFunction();\n $this->vars['String'] = $this->createPHPFunction(array ($this, 'createString'));\n $this->vars['String']['fromCharCode'] = $this->createPHPFunction(array ('JSPHP_Runtime_Common_StringPrototype', 'fromCharCode'));\n $this->vars['String']['prototype'] = $this->createObjectWrapper(new JSPHP_Runtime_Common_StringPrototype(), $objConstructor);\n \n $this->vars['Number'] = $this->createPHPFunction(array ($this, 'createNumber'));\n $this->vars['Number']['prototype'] = $this->createObject();\n $this->vars['Boolean'] = $this->createPHPFunction(array ($this, 'createBoolean'));\n $this->vars['Boolean']['prototype'] = $this->createObject();\n $this->vars['RegExp'] = $this->createPHPFunction(array ('JSPHP_Runtime_Common_RegExpPrototype', 'construct'));\n $this->vars['RegExp']['prototype'] = $this->createObjectWrapper(new JSPHP_Runtime_Common_RegExpPrototype(), $objConstructor);\n \n $this->vars['Math'] = $this->createObjectWrapper(new JSPHP_Runtime_Common_MathObject(), $objConstructor);\n \n $this->vars['eval'] = $this->createPHPFunction(array ($this, 'runtimeEval'));\n }", "title": "" }, { "docid": "cf211c095a1eaa33519aef653ea35073", "score": "0.6270589", "text": "public function getGlobals()\n {\n }", "title": "" }, { "docid": "e82b1eae0079ad865f5e880d6052a613", "score": "0.6163316", "text": "public function global_setup()\n {\n }", "title": "" }, { "docid": "c5358a3017c34fe82252fdd1d63d1089", "score": "0.61116606", "text": "public function getGlobals() {\n return array(\n 'Configure' => new Configure(),\n 'Sanitize' => new Sanitize()\n );\n }", "title": "" }, { "docid": "6f3d2f7b98137611637cd066c6258bd9", "score": "0.6079704", "text": "function initVars() {\n\t\tparent::initVars();\n\n\t\t$this->oid = null;\n\t\t$this->name = null;\n\t\t$this->description = null;\n\t\t$this->sup_classes = array();\n\t\t$this->type = null;\n\t\t$this->must_attrs = array();\n\t\t$this->may_attrs = array();\n\t\t$this->is_obsolete = false;\n\t\t$this->children_objectclasses = array();\n\t}", "title": "" }, { "docid": "9ebf96f2a778dba65df38a7234882d5e", "score": "0.60619307", "text": "function initVars() {\n\t\tparent::initVars();\n\n\t\t$this->oid = null;\n\t\t$this->name = null;\n\t\t$this->description = null;\n\t\t$this->is_obsolete = false;\n\t\t$this->sup_attribute = null;\n\t\t$this->equality = null;\n\t\t$this->ordering = null;\n\t\t$this->sub_str = null;\n\t\t$this->syntax_oid = null;\n\t\t$this->syntax = null;\n\t\t$this->max_length = null;\n\t\t$this->is_single_value= null;\n\t\t$this->is_collective = false;\n\t\t$this->is_no_user_modification = false;\n\t\t$this->usage = null;\n\t\t$this->aliases = array();\n\t\t$this->type = null;\n\t\t$this->used_in_object_classes = array();\n\t\t$this->required_by_object_classes = array();\n\t}", "title": "" }, { "docid": "1be8619f3e3873352f042cdab5337447", "score": "0.6058711", "text": "public function global_variables($ar = array())\n\t{\n\t\t/* Functions class */\n\t\t$this->oFunc =& $this->_init_functions();\n\n\t\t/* HTML-tags (Requires site settings) */\n\t\t$this->oHtml =& $this->_init_html_tags();\n\t\t$this->oHtmlAdm =& $this->_init_html_tags_admin();\n\n\t\t/* Set Headers class */\n\t\t$this->oHdr =& $this->_init_headers();\n\n\t\t/* */\n\t\tinclude_once( $this->V->path_includes.'/class.register_globals.php' );\n\t\t$oGlobals = new site_register_globals();\n\t\t$this->gv = $oGlobals->register( $ar );\n\n\t\t/* $this->gv['arg']['var'] => $this->gv['var'] */\n\t\tif ( is_array( $this->gv['arg'] ) )\n\t\t{\n\t\t\tforeach( $this->gv['arg'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->gv[$k] = $this->oHtml->urldecode( $v );\n\t\t\t\tunset( $this->gv['arg'][$k] );\n\t\t\t}\n\t\t}\n\n\t\t/* Default values */\n\t\t$oGlobals->do_default( $this->gv['action'] );\n\t\t$oGlobals->do_default( $this->gv['target'], 'notarget' );\n\t\t$oGlobals->do_default( $this->gv['visualtheme'], $this->V->visualtheme );\n\t\t$oGlobals->do_default( $this->gv['il'] );\n\t\t$oGlobals->do_default( $this->gv['id'] );\n\t\t$oGlobals->do_default( $this->gv['id_item'] );\n\t\t$oGlobals->do_default( $this->gv['area'] );\n\t\t$oGlobals->do_default( $this->gv['uri'] );\n\t\t$oGlobals->do_default( $this->gv['page'], 1);\n\t\t$oGlobals->do_default( $this->gv['sef_output'], $this->V->sef_output );\n\n\t\tif ( strpos($this->V->REQUEST_URI, 'cmsrouter' ) !== false )\n\t\t{\n\t\t\t$this->V->is_sef = 0;\n\t\t}\n\n\t\t/* Decode URL parameters and merge */\n\t\tif ( $this->V->is_sef )\n\t\t{\n\t\t\t/* Redirect from old URLs */\n\t\t\tif ( !in_array( $this->gv['sef_output'], array('ajax','css','js') )\n\t\t\t\t&& strpos ( $this->V->REQUEST_URI, $this->V->file_index.'?' ) !== false\n\t\t\t)\n\t\t\t{\n\t\t\t\tif ( isset($this->gv['target']) || isset($this->gv['s']))\n\t\t\t\t{\n\t\t\t\t\t/* */\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t#$this->redirect( $this->V->server_url.'/'.$this->V->file_index, 1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->gv = array_merge_clobber( $this->gv, $this->oHtml->url_undo_sef( $this->V->REQUEST_URI ) );\n\t\t}\n\n\t\t/* Parsing arg[area] */\n\t\t$this->gv['_area'] = $this->gv['area'];\n\t\t$this->gv['area'] = $oGlobals->subparam( $this->gv['_area'] );\n\t\t\n\t#\tprn_r( $this->gv );\n\t\t\n\t\t/* 22 Jan 2010: assign variables from Area */\n\t\t$this->gv['action'] = isset( $this->gv['area']['a'] ) ? $this->gv['area']['a'] : $this->gv['action'];\n\t\t$this->gv['target'] = isset( $this->gv['area']['t'] ) ? $this->gv['area']['t'] : $this->gv['target'];\n\t\t$this->gv['page'] = isset( $this->gv['area']['page'] ) ? $this->gv['area']['page'] : $this->gv['page'];\n\t\t$this->gv['id'] = isset( $this->gv['area']['id'] ) ? $this->gv['area']['id'] : $this->gv['id'];\n\t\t$this->gv['id_item'] = isset( $this->gv['area']['id_item'] ) ? $this->gv['area']['id_item'] : $this->gv['id_item'];\n\t\t#$this->gv['id_user'] = isset( $this->gv['area']['id_user'] ) ? $this->gv['area']['id_user'] : $this->gv['id_user'];\n\t\t\n\t\t/* Filter incoming data */\n\t\t$oGlobals->do_alphanum( $this->gv['target'] );\n\t\t$oGlobals->do_alphanum( $this->gv['action'] );\n\t\t$oGlobals->do_numeric_one( $this->gv['page'] );\n\n\t\t/**\n\t\t * A special rule:\n\t\t * arg[sef_output]=css&arg[files]=tkit_css,122c => tkit_css.css, 122c.css \n\t\t * arg[sef_output]=js&arg[files]=lib,func => lib.js, func.js\n\t\t */\n\t\tif ( isset( $this->gv['files'] ) )\n\t\t{\n\t\t\t$ar = explode( ',', $this->gv['files'] );\n\t\t\t$this->gv['files'] = array();\n\t\t\tforeach( $ar as $v )\n\t\t\t{\n\t\t\t\t$this->gv['files'][] = trim( $v ).'.'.$this->gv['sef_output'];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "bb6da933b81cf835c4f4051b1365237e", "score": "0.605282", "text": "function initVars() {\n\t\tparent::initVars();\n\n\t\t$this->oid = null;\n\t\t$this->name = null;\n\t\t$this->used_by_attrs = array();\n\t}", "title": "" }, { "docid": "a3583097fe0803d190be2d40bcf7c47f", "score": "0.6039999", "text": "function module() {\n \t\t$this->sql \t\t= &$GLOBALS['sql'];\n\t\t$this->conf \t= &$GLOBALS['conf'];\n\t\t$this->func \t= &$GLOBALS['func'];\n\t\t$this->user \t= &$GLOBALS['user'];\n \t}", "title": "" }, { "docid": "f7b73443fb0e6019c4ec86c35310f080", "score": "0.60217935", "text": "function init(){\n\t\t$this->alldata = $this->initdata;\n\t}", "title": "" }, { "docid": "8a95a1bba1f14435d4ba3e4f0f930ee7", "score": "0.5999285", "text": "function loadGlobals () {\r\n global $db, $eqdkp, $user, $tpl, $pm, $in;\r\n\r\n $this->_db \t= &$db;\r\n $this->_eqdkp \t= &$eqdkp;\r\n $this->_user \t= &$user;\r\n $this->_tpl \t= &$tpl;\r\n $this->_pm \t= &$pm;\r\n\t\t$this->_in\t\t= &$in;\r\n }", "title": "" }, { "docid": "726cbbaa001256554f5d7c9747ffcb06", "score": "0.5958943", "text": "protected function autoGlobals()\n {\n $this->addGlobals([\n '_pageTitle' => $this->getTitle(),\n '_ERRORS' => $this->errors,\n '_CSS' => $this->getCss(),\n '_JS' => $this->getJs(),\n ]);\n }", "title": "" }, { "docid": "9600de4db8b4bbb53753fe7acf46d1f6", "score": "0.5955057", "text": "public static function commonData()\n {\n\n }", "title": "" }, { "docid": "0dea84b8f19919a4448408131b10a098", "score": "0.5918908", "text": "function init() {\n global $DB, $data;\n $sql = \"SELECT * FROM general\";\n $result = $DB->query($sql)->fetchAll();\n foreach ($result as $row) {\n $name = $row[\"data_name\"];\n $value = $row[\"data_value\"];\n $data[$name] = $value;\n }\n}", "title": "" }, { "docid": "4c4126b0c99d192e0a2b80730a560a63", "score": "0.59135675", "text": "private function loadVars()\n {\n $composers = new composers();\n $this->vars[\"composers\"] = $composers->fetch();\n }", "title": "" }, { "docid": "40f53d2f82064166797cf9b0cd62dda5", "score": "0.5850507", "text": "public function initAllParameters()\n {\n $this->_initExtParams();\n $this->_initConfig();\n $this->_initGroups();\n $this->_initQuery();\n $this->_initLegend();\n $this->_initDataPath();\n $this->jsReference = $this->initJSReference();\n $this->cssReference = $this->initCSSReference(); \n $this->jsInitFunctions = $this->_initPlugins();\n }", "title": "" }, { "docid": "39e106a86965e2a5f9a10cc4da490535", "score": "0.58245695", "text": "private function setup_globals() {\n\t\t/** BP Reshare globals ********************************************/\n\t\t$this->version = '2.0.1';\n\t\t$this->db_version = bp_get_option( 'bp-reshare-version', 0 );\n\t\t$this->domain = 'bp-reshare';\n\t\t$this->file = __FILE__;\n\t\t$this->basename = plugin_basename( $this->file );\n\t\t$this->plugin_dir = plugin_dir_path( $this->file );\n\t\t$this->plugin_url = plugin_dir_url( $this->file );\n\t\t$this->lang_dir = trailingslashit( $this->plugin_dir . 'languages' );\n\t\t$this->includes_dir = trailingslashit( $this->plugin_dir . 'includes' );\n\t\t$this->js_url = trailingslashit( $this->plugin_url . 'js' );\n\t\t$this->css_url = trailingslashit( $this->plugin_url . 'css' );\n\n\t\t/** Component specific globals ********************************************/\n\t\t$this->component_id = 'bp_reshare';\n\t\t$this->component_slug = 'reshare';\n\t\t$this->component_name = 'Reshares';\n\n\t\t// Rest namespace and version.\n\t\t$this->rest = (object) array(\n\t\t\t'namespace' => 'bp-reshare',\n\t\t\t'version' => 'v1',\n\t\t);\n\n\t\t// Set Cache Global groups.\n\t\twp_cache_add_global_groups( array(\n\t\t\t'user_reshares',\n\t\t\t'user_reshared',\n\t\t\t'user_favorites',\n\t\t\t'reshares_count',\n\t\t\t'reshared_notifications',\n\t\t) );\n\t}", "title": "" }, { "docid": "35e45bbc00dcd977e5485aa1fe6f8665", "score": "0.58208376", "text": "public function assignVariables();", "title": "" }, { "docid": "b4696fd07f0894d5ad6d30bc3aac1c82", "score": "0.581972", "text": "private function init_parameters()\n\t{\n\t\t$this->stylesheets = array();\n\t\t$this->headscripts = array();\n\t\t$this->bodyscripts = array();\n\t\t$this->handlebars_templates = array();\n\t\t$this->subcontrollers = array();\n\t\t$this->template = $this->action.\".html\";\n\t}", "title": "" }, { "docid": "a3552ad99a889a440133c626dfa6d56f", "score": "0.5817779", "text": "function c_base($m_array) {\n \t\t$this->sql \t\t= &$GLOBALS['sql'];\n\t\t$this->conf \t= &$GLOBALS['conf'];\n\t\t$this->func \t= &$GLOBALS['func'];\n\t\t$this->user \t= &$GLOBALS['user'];\n\t\t\n\t\t//Load values\n\t\t\n\t\t\n\t\t\n \t}", "title": "" }, { "docid": "530b0d921eee2f5fea2c7b109209c994", "score": "0.57950276", "text": "public function setVariables()\n {\n \t// Initial sample storage data\n\t\t$this->userData = array(\n\t\t\t'username' => 'dotmatrix',\n\t\t\t'email' => '[email protected]',\n\t\t\t'name' => 'John Dot',\n 'designation' => 'LabTechnikan',\n\t\t\t'gender' => User::FEMALE,\n 'password' => \"goodpassword\",\n 'password_confirmation' => \"goodpassword\",\n );\n\n // Edition sample data\n $this->userDataUpdate = array(\n 'email' => '[email protected]',\n 'name' => 'John Doe',\n 'gender' => User::MALE,\n 'designation' => 'LabTechnician',\n 'current_password' => 'goodpassword',\n 'new_password' => 'newpassword',\n 'new_password_confirmation' => 'newpassword',\n );\n\n // sample login data\n $this->userDataLoginBad = array(\n 'username' => 'dotmatrix',\n 'password' => 'wrongpassword',\n );\n\n // sample login data\n $this->userDataLoginGood = array(\n 'username' => 'dotmatrix',\n 'password' => 'goodpassword',\n );\n\n // sample login data\n $this->userDataLoginFailsVerification = array(\n 'username' => 'dot',\n 'password' => 'goo',\n );\n\n }", "title": "" }, { "docid": "5c7a1fed736e0dbfbad3ab8ce700796b", "score": "0.57593423", "text": "function initVars() {\n\t\t$this->oid = null;\n\t\t$this->description = null;\n\t}", "title": "" }, { "docid": "f1d246fe4f321b7f219892cea9a9c43c", "score": "0.5742869", "text": "function initVars() {\n\t\tparent::initVars();\n\n\t\t$this->oid = null;\n\t\t$this->name = null;\n\t\t$this->description = null;\n\t\t$this->is_obsolete = false;\n\t\t$this->syntax = null;\n\t\t$this->used_by_attrs = array();\n\t}", "title": "" }, { "docid": "3c00548527161874f141d8a4094eb436", "score": "0.57391524", "text": "private function setup_objects() {\n\t\t$this->auth = new REST\\Authentication;\n\t\t$this->consumers = new REST\\Consumer\\Database;\n\t}", "title": "" }, { "docid": "ac32463b17eac1c665c4dcaf9d49f95b", "score": "0.5731233", "text": "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->tasks = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n\n\t\t$this->persons = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n\t}", "title": "" }, { "docid": "5ff54de0733b99d92049ac61d404447d", "score": "0.57273567", "text": "function __loadvars() {\r\n\r\n\t\t\r\n\t\tif (is_object($this->private->messages)) {\r\n\t\t\t$this->tpl_vars = array_merge((array)$this->tplvars , $this->private->messages->LoadVars($this->name));\r\n\t\t}\r\n\r\n\t\t//check to see if the config has anything in it\r\n\t\tif (is_array($this->_CONF[\"conf\"])) {\r\n\t\t\tforeach ($this->_CONF[\"conf\"] as $key => $val)\r\n\t\t\t\t$this->tpl_vars[\"MODULE::\" . strtoupper($this->name) . \"::CONF.\" . strtoupper($key)] = $val;\r\n\t\t}\t\t\t\r\n\t}", "title": "" }, { "docid": "9e0b3967ea256d7367fbd4421ff588ca", "score": "0.5725245", "text": "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->orderProduct = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->orderTax = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->orderTotalTax = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "title": "" }, { "docid": "078012e2d4727359340a1a22bb11a536", "score": "0.5714997", "text": "function fill_arrays() {\r\n\t\tglobal $arr_hersteller, $arr_raum, $arr_kaufdatum, \r\n\t\t\t\t$arr_gewaehrdauer, $arr_lieferant, $arr_notiz;\r\n\t\t\r\n\t\t$arr_hersteller = select_statement(\"components_producer\");\r\n\t\t$arr_raum = select_statement(\"room_name\");\r\n \t\t$arr_kaufdatum = select_statement(\"components_date\");\r\n \t\t$arr_gewaehrdauer = select_statement(\"components_guarantee\");\r\n \t\t$arr_lieferant = select_statement(\"suppliers_name\");\r\n \t\t$arr_notiz = select_statement(\"components_note\");\r\n\t}", "title": "" }, { "docid": "f72020cd61d4ae5c37e67044699c19f9", "score": "0.5705146", "text": "protected function initStorageObjects()\n {\n $this->questions = GeneralUtility::makeInstance(ObjectStorage::class);\n $this->results = GeneralUtility::makeInstance(ObjectStorage::class);\n }", "title": "" }, { "docid": "be8cd219a6771e1db188bbfd583e6bab", "score": "0.5683288", "text": "function _register_globals(): void {\n\t$inst = _get_instance();\n\tforeach ( $inst->structures as $st ) {\n\t\tif ( $st['global'] ) {\n\t\t\t$GLOBALS[ $st['var'] ] = $inst->vars[ $st['var'] ];\n\t\t}\n\t}\n}", "title": "" }, { "docid": "e33a7deb7b5fe8713ba9a447624baec2", "score": "0.5679716", "text": "private function setup_globals() {\n\t\t$this->file = __FILE__;\n\n\t\t$this->basename = plugin_basename( $this->file );\n\t\t$this->plugin_dir = plugin_dir_path( $this->file );\n\t\t$this->plugin_url = plugin_dir_url ( $this->file );\n\n\t\t$this->lang_dir = trailingslashit( $this->plugin_dir . 'languages' );\n\t\t$this->domain = 'wp-job-contact-listing';\n\t}", "title": "" }, { "docid": "23ddd1ed4340a6304cfa426427a042f1", "score": "0.5666866", "text": "function loadGlobals() {\n $GLOBALS = unserialize($this->globals);\n }", "title": "" }, { "docid": "02c490219665f459b0375a7bb208a2f4", "score": "0.5652755", "text": "protected function setUp()\n {\n $this->og = array('a', 'b', 'c', 'd', 'e', 'f');\n $this->a = new CArray($this->og);\n }", "title": "" }, { "docid": "bad07d4e8124ea0b3ba6280b61ad1af5", "score": "0.5640094", "text": "function storeGlobals() {\n $this->globals = serialize($GLOBALS);\n }", "title": "" }, { "docid": "81f917e90930995833e8dd92cf3441b4", "score": "0.56341106", "text": "function catch_globals()\n\t{\n\t\twhile (list($key, $val) = @each($_GET)) $this -> globals[$key] = $val;\n\t\twhile (list($key, $val) = @each($_POST)) $this -> globals[$key] = $val;\n\t\twhile (list($key, $val) = @each($_SERVER)) $this -> globals[$key] = $val;\n\t}", "title": "" }, { "docid": "1a0dada818ea8f12ff442e34e519c055", "score": "0.5632369", "text": "protected function setUp()\n {\n $this->_object = new \\Yana\\Core\\MyCountableArray();\n }", "title": "" }, { "docid": "ef501b1c1ee3a40e11763f30523329f9", "score": "0.5612483", "text": "function RegisterGlobals($o='GPC') \n {\n $o = str_split(strtolower($o));\n array_map('RegisterArray',$o);\n }", "title": "" }, { "docid": "a887781f73ce867275411e1a87fb5cff", "score": "0.56123215", "text": "function initVars() {\n\t\tparent::initVars();\n\n\t\t$this->oid = null;\n\t\t$this->description = null;\n\t}", "title": "" }, { "docid": "74c9a8fac0a318f50de987b269959e6f", "score": "0.5611223", "text": "protected function initHookObjects() {}", "title": "" }, { "docid": "74c9a8fac0a318f50de987b269959e6f", "score": "0.5610608", "text": "protected function initHookObjects() {}", "title": "" }, { "docid": "d25f33fd32864e446709826d74008b4e", "score": "0.56076777", "text": "function new_barren_acres()\n{\n global $objTrgUser, $intSrcBarren, $intTrgBarren;\n\n $objSrcUser = &$GLOBALS[\"objSrcUser\"];\n $arrSrcBuilds = $objSrcUser->get_builds();\n $arrTrgBuilds = $objTrgUser->get_builds();\n $intSrcBarren = $objSrcUser->get_barren();\n $intTrgBarren = $objTrgUser->get_barren();\n}", "title": "" }, { "docid": "ebb8cfe7a93dff2ae3d8c5090516b491", "score": "0.560224", "text": "protected function setUp() {\n $this->object = new Variables;\n }", "title": "" }, { "docid": "15a22e2d647e0853c2aac749bdf7aee9", "score": "0.55855626", "text": "public function setup_globals() {\n\t\t\tglobal $bpfitness;\n\t\t\t$settings = get_option( 'bpfit_general_settings', true );\n\t\t\t$this->video_type = $this->video_url = $this->past_dates = '';\n\t\t\tif( isset( $settings['video_settings'] ) ) {\n\t\t\t\t$this->video_type = $settings['video_settings']['video_type'];\n\t\t\t\t$this->video_url = $settings['video_settings']['video_url'];\n\t\t\t}\n\n\t\t\tif( isset( $settings['past_dates_settings'] ) ) {\n\t\t\t\t$this->past_dates = $settings['past_dates_settings'];\n\t\t\t}\n\n\t\t\tif( isset( $settings['badgeos_points_settings'] ) ) {\n\t\t\t\t$this->badgeos_points = $settings['badgeos_points_settings'];\n\t\t\t}\n\n\t\t\tif( isset( $settings['steps_walked_settings'] ) ) {\n\t\t\t\t$this->steps_walked = $settings['steps_walked_settings'];\n\t\t\t}\n\n\t\t\t//Profile menu label\n\t\t\t$this->profile_menu_label = 'Fitness';\n\t\t\tif( isset( $settings['profile_menu_label'] ) ) {\n\t\t\t\t$this->profile_menu_label = $settings['profile_menu_label'];\n\t\t\t}\n\t\t\t$this->profile_menu_slug = str_replace( ' ', '-', strtolower( $this->profile_menu_label ) );\n\t\t}", "title": "" }, { "docid": "00fe9475c5b52bf922337eed26d4ce35", "score": "0.5583568", "text": "function __construct()\n { \n $this->db =\t$GLOBALS['db']; //Assign the global variable to class variable of DB Class\n $this->functions =\t$GLOBALS['functions']; //Assign the global variable to class variable of Function Class\n }", "title": "" }, { "docid": "917c028b7c65c9777795cda3ecdc2192", "score": "0.557235", "text": "private function init() {\n\t\t// fetch the config vars from the database\n\t\t$query = \"SELECT config_key, config_value FROM config ORDER BY config_key\";\n\t\t$result = $this->db->getAssoc($query);\n\t\t// if theres a result\n\t\tif(is_array($result)) {\n\t\t\t// store result in class var\n\t\t\t$this->config_vars = $result;\n\t\t}\n\t}", "title": "" }, { "docid": "d4e9e5d1411cb1f3f92491f9db0d2538", "score": "0.5572246", "text": "function okfn_global_vars() {\n\tglobal $okf_rendered_posts_ids;\n\t$okf_rendered_posts_ids = array();\n}", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.55719393", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.55719393", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.55719393", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.55719393", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.55719393", "text": "abstract protected function init();", "title": "" }, { "docid": "2f0793abdb4250aee5a5db6130c3a927", "score": "0.55713254", "text": "abstract protected function setupObject();", "title": "" }, { "docid": "1373824fdb8992c43c5ffc8adb20c02e", "score": "0.5569732", "text": "function initializeGlobalState()\r\n {\r\n $base_xml_xpath = $this->loadBaseXML();\r\n \r\n $this->simulateMissingFunctions();\r\n \r\n if (!$settings = $this->loadConfiguration()) {\r\n // ini files are not set..\r\n // launch repair program!!\r\n die('STOP');\r\n }\r\n \r\n $this->initSession($settings);\r\n \r\n \r\n \r\n // initialize classes autoloading\r\n require_once SCRIPT_BASE.'roxlauncher/autoload.plug.php';\r\n require_once SCRIPT_BASE.'roxlauncher/classloader.php';\r\n $class_loader = new ClassLoader;\r\n \r\n AutoloadPlug::setCallback(array($class_loader, 'autoload'));\r\n \r\n $this->loadRoxClasses($class_loader);\r\n $this->loadPTClasses($class_loader);\r\n \r\n require_once SCRIPT_BASE.'pthacks/classes.php';\r\n Classes::set($class_loader); // ???\r\n \r\n PSurveillance::get();\r\n \r\n // $this->loadRoxClasses($class_loader);\r\n $this->loadPModules($class_loader);\r\n $this->loadPApps($class_loader);\r\n \r\n // TODO: fill with class names..\r\n $this->classes = array();\r\n \r\n \r\n // these two may actually kill the process\r\n $this->loadDefaults($base_xml_xpath, $settings);\r\n $this->checkEnvironment();\r\n \r\n // initialize global vars and global registry\r\n $this->_initPVars($settings);\r\n $this->_initBWGlobals($settings);\r\n \r\n \r\n PSurveillance::setPoint('base_loaded');\r\n \r\n // print_r($class_loader);\r\n }", "title": "" }, { "docid": "657896f3777a336cf96d04277e2dde33", "score": "0.5567431", "text": "function korrio_customfields_setup_globals() {\n\tglobal $bp, $wpdb;\n\n\t/* For internal identification */\n\t$bp->korrio_custom_fields->custom_fields = $wpdb->base_prefix . 'korrio_custom_fields';\n\t$bp->korrio_custom_fields->group_custom_fields = $wpdb->base_prefix . 'korrio_group_custom_fields';\n\n\t/**************************************************************************\n\t * Register all the cache groups that should be setup as globals\n\t **************************************************************************/\n\tif (function_exists('wp_cache_add_global_groups')) {\n\t\t//wp_cache_add_global_groups(array('names_of_caches_here'));\n\t}\n}", "title": "" }, { "docid": "d0b1b828f826fbb747d2aa62e016a63a", "score": "0.55640024", "text": "protected function _setArgs() {\n\t\t/**\n\t\t * Create a mock global array here for looping and setting from next\n\t\t * \n\t\t * For some reason PHP is being a twit and not letting me set this array\n\t\t * in the call to each. But it will let me make an array then send the \n\t\t * array as a variable to each, so we are going to do that.\n\t\t */\n\t\t$globs = array('get', 'post', 'cookie', 'files');\n\t\t\n\t\t/**\n\t\t * Loop through a mock global array (without getting SERVER or ENV vars)\n\t\t * and check to see if there is anything that needs fetching from them.\n\t\t */\n\t\twhile (list(,$prop) = each($globs)) {\n\t\t\t// Makes a \"get\" into a \"_GET\"\n\t\t\t$var = '_' . strtoupper($prop);\n\t\t\t\n\t\t\t/**\n\t\t\t * Is this var in the GLOBAL array (ex. $GLOBALS[\"_GET\"])?\n\t\t\t * \n\t\t\t * This will work on POST, GET, COOKIE and FILES all the time. If \n\t\t\t * there is no known reference to $_ENV or $_SERVER, they will not \n\t\t\t * be in the GLOBAL array. \n\t\t\t */\n\t\t\tif (isset($GLOBALS[$var])) {\n\t\t\t\t// Add it to the object property arrays (ex. $this->get = $GLOBALS[\"_GET\"])\n\t\t\t\t$this->$prop = $GLOBALS[$var];\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Now get $_SERVER and $_ENV vars\n\t\tforeach ($_SERVER as $k => $v) {\n\t\t\t$this->server[$k] = $v;\n\t\t}\n\t\t\n\t\tforeach ($_ENV as $k => $v) {\n\t\t\t$this->env[$k] = $v;\n\t\t}\n\t\t// Undo magic quotes if they are enabled.\n\t\t// More information can be found:\n\t\t// http://talks.php.net/show/php-best-practices/26\n\t\tif (get_magic_quotes_gpc()) {\n\t\t\t$in = array(&$_GET, &$_POST, &$_COOKIE);\n\t\t\twhile (list($k, $v) = each($in)) {\n\t\t\t\tforeach ($v as $key => $val) {\n\t\t\t\t\tif (! is_array($val)) {\n\t\t\t\t\t\t$in[$k][$key] = stripslashes($val);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$in[] =& $in[$k][$key];\n\t\t\t\t}\n\t\t\t}\n\t\t\tunset($in);\n\t\t}\n\t\t\n\t\t// load the object argv request var\n\t\t$this->argv = (array) $this->server('argv');\n\t\t\n\t\t// load the object http request var\n\t\tforeach ($this->server as $key => $val) {\n\t\t\t\n\t\t\t// We are only interested in the HTTP_* family \n\t\t\tif (substr($key, 0, 5) == 'HTTP_') {\n\t\t\t\t// normalize the header key to lower-case\n\t\t\t\t$nicekey = strtolower(\n\t\t\t\t\tstr_replace('_', '-', substr($key, 5))\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t// strip control characters from keys and values\n\t\t\t\t$nicekey = preg_replace('/[\\x00-\\x1F]/', '', $nicekey);\n\t\t\t\t$this->http[$nicekey] = preg_replace('/[\\x00-\\x1F]/', '', $val);\n\t\t\t\t\n\t\t\t\t// no control characters wanted in $this->server for these\n\t\t\t\t$this->server[$key] = $this->http[$nicekey];\n\t\t\t\t\n\t\t\t\t// disallow external setting of X-JSON headers.\n\t\t\t\tif ($nicekey == 'x-json') {\n\t\t\t\t\tunset($this->http[$nicekey]);\n\t\t\t\t\tunset($this->server[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t/**\n\t\t * Handle the URI bits now\n\t\t * \n\t\t * I am doing this as part of the request so I don't have to weigh the\n\t\t * library down with a URI object. \n\t\t */\n\t\t// build a default scheme (with '://' in it)\n\t\t$ssl = $this->server('HTTPS', 'off');\n\t\t$scheme = (($ssl == 'on') ? 'https' : 'http') . '://';\n\t\t\n\t\t// get the current host\n\t\t$host = $this->server('HTTP_HOST');\n\t\t\n\t\t// Make a URL of this site for use throughout\n\t\t$url = $scheme . $host;\n\t\t\n\t\t// Make a URL for this request for use throughout\n\t\t$uri = $url . $_SERVER['REQUEST_URI'];\n\t\t\n\t\t// Set up the parse_url parts\n\t\t$parts = array(\n\t\t\t'scheme' => null,\n\t\t\t'host' => null,\n\t\t\t'port' => null,\n\t\t\t'user' => null,\n\t\t\t'pass'=> null,\n\t\t\t'path' => null,\n\t\t\t'query' => null,\n\t\t\t'fragment' => null,\n\t\t);\n\t\t\n\t\t// And put them together\n\t\t$this->uri = array_merge($parts, parse_url($uri));\n\t\t\n\t\t// Add our own two cents, starting with the base uri \n\t\t$this->uri['base'] = $url;\n\t\t\n\t\t// Now add the full, requested uri\n\t\t$this->uri['full'] = $uri;\n\t\t\n\t\t/**\n\t\t * Now set some basics of the request, like the page name, action and \n\t\t * param list\n\t\t */\n\t\t$request = explode('/', trim($this->server('REQUEST_URI'), '/'));\n\t\t\n\t\t// Get the registry and config objects\n\t\t$registry = Lib_Registry::getInstance();\n\t\t$config = $registry->get('libconfig');\n\t\t\n\t\t// Initialize our request vars\n\t\t$page = $config->default->page;\n\t\t$action = $config->default->action;\n\t\t$params = array();\n\t\t\n\t\t// If we have a requested page set it\n\t\tif (!empty($request[0])) {\n\t\t\t$page = strtolower($request[0]);\n\t\t\t\n\t\t\t// If we have a requested action, set that too$class, \n\t\t\tif (!empty($request[1])) {\n\t\t\t\t$action = strtolower($request[1]);\n\t\t\t\t\n\t\t\t\t// Lastly if we have any params, handle those\n\t\t\t\tif (!empty($request[2])) {\n\t\t\t\t\tfor ($i = 2, $j = 3, $max = count($request); $i < $max; $i += 2, $j += 2) {\n\t\t\t\t\t\t$params[$request[$i]] = array_key_exists($j, $request) ? $request[$j] : null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set them into the uri property\n\t\t$this->uri['page'] = $page;\n\t\t$this->uri['action'] = $action;\n\t\t$this->uri['params'] = $params;\n\t\t\n\t\t// Read the page, action and params into the registry and be done\n\t\t$registry->set('page', $page);\n\t\t$registry->set('action', $action);\n\t\t$registry->set('params', $params);\n\t}", "title": "" }, { "docid": "758567757f3f05d978a5a50dec4de29b", "score": "0.556086", "text": "function global_init()\n\t{\n\t\t//-------------------------------\n\t\t// Remap font sizes\n\t\t//-------------------------------\n\t\t\n\t\tforeach( $this->font_sizes as $bbcode => $real )\n\t\t{\n\t\t\t$this->rev_font_sizes[ $bbcode ] = $real;\n\t\t}\n\t}", "title": "" }, { "docid": "676da8c1ff8deb8314b4ce00b6a6e05d", "score": "0.5560575", "text": "protected function initializePackageObjects() {}", "title": "" }, { "docid": "fabf2c5de5984269f2a0de0f0cdb356a", "score": "0.55476576", "text": "public function getVariables();", "title": "" }, { "docid": "fabf2c5de5984269f2a0de0f0cdb356a", "score": "0.55476576", "text": "public function getVariables();", "title": "" }, { "docid": "9bd089cbd53a0c44af08d90bd034e9c9", "score": "0.55452466", "text": "private function init()\n {\n // Overwrite global general_stdWrap\n // #12471, 110123, dwildt+\n if ( is_array( $this->conf_view[ 'general_stdWrap.' ] ) )\n {\n $this->pObj->conf[ 'general_stdWrap.' ] = $this->conf_view[ 'general_stdWrap.' ];\n $this->conf[ 'general_stdWrap.' ] = $this->pObj->conf[ 'general_stdWrap.' ];\n }\n // Overwrite global general_stdWrap\n // Get the local or global displayList\n if ( is_array( $this->conf_view[ 'displayList.' ] ) )\n {\n $this->pObj->lDisplayList = $this->conf_view[ 'displayList.' ];\n }\n if ( !is_array( $this->conf_view[ 'displayList.' ] ) )\n {\n $this->pObj->lDisplayList = $this->conf[ 'displayList.' ];\n }\n // Get the local or global displayList\n // Get the local or global displayList.display\n if ( is_array( $this->conf_view[ 'displayList.' ][ 'display.' ] ) )\n {\n $this->pObj->lDisplay = $this->conf_view[ 'displayList.' ][ 'display.' ];\n }\n if ( !is_array( $this->conf_view[ 'displayList.' ][ 'display.' ] ) )\n {\n $this->pObj->lDisplay = $this->conf[ 'displayList.' ][ 'display.' ];\n }\n // Get the local or global displayList.display\n\n // #61594, 140915, 1+\n $this->initSearch();\n }", "title": "" }, { "docid": "20a997f60f3086611e9b7f0b4088ff8f", "score": "0.5543224", "text": "abstract protected function initialize();", "title": "" }, { "docid": "eae83ec2e8b84ea26c211013c6ce0167", "score": "0.55421066", "text": "public function initializeObject() {}", "title": "" }, { "docid": "eae83ec2e8b84ea26c211013c6ce0167", "score": "0.5542055", "text": "public function initializeObject() {}", "title": "" }, { "docid": "eae83ec2e8b84ea26c211013c6ce0167", "score": "0.5542055", "text": "public function initializeObject() {}", "title": "" }, { "docid": "eae83ec2e8b84ea26c211013c6ce0167", "score": "0.5542055", "text": "public function initializeObject() {}", "title": "" }, { "docid": "eae83ec2e8b84ea26c211013c6ce0167", "score": "0.5542055", "text": "public function initializeObject() {}", "title": "" }, { "docid": "eae83ec2e8b84ea26c211013c6ce0167", "score": "0.5542055", "text": "public function initializeObject() {}", "title": "" }, { "docid": "eae83ec2e8b84ea26c211013c6ce0167", "score": "0.5542055", "text": "public function initializeObject() {}", "title": "" }, { "docid": "eae83ec2e8b84ea26c211013c6ce0167", "score": "0.5542055", "text": "public function initializeObject() {}", "title": "" }, { "docid": "eae83ec2e8b84ea26c211013c6ce0167", "score": "0.5542055", "text": "public function initializeObject() {}", "title": "" }, { "docid": "eae83ec2e8b84ea26c211013c6ce0167", "score": "0.5542055", "text": "public function initializeObject() {}", "title": "" }, { "docid": "eae83ec2e8b84ea26c211013c6ce0167", "score": "0.5541999", "text": "public function initializeObject() {}", "title": "" }, { "docid": "eae83ec2e8b84ea26c211013c6ce0167", "score": "0.5541999", "text": "public function initializeObject() {}", "title": "" }, { "docid": "eae83ec2e8b84ea26c211013c6ce0167", "score": "0.5541999", "text": "public function initializeObject() {}", "title": "" }, { "docid": "eae83ec2e8b84ea26c211013c6ce0167", "score": "0.5541464", "text": "public function initializeObject() {}", "title": "" }, { "docid": "eae83ec2e8b84ea26c211013c6ce0167", "score": "0.5541464", "text": "public function initializeObject() {}", "title": "" }, { "docid": "b2238f66b65a8c1d9cafd97d232fc6e7", "score": "0.5539911", "text": "function set_vars($arr)\n{\n\tif ( isset($arr['control']) )\n\t{\n\t\t$this->set_control( $arr['control'] );\n\t}\n\n\tif ( isset($arr['channel']) )\n\t{\n\t\t$this->set_channel( $arr['channel'] );\n\t}\n\n\tif ( isset($arr['image']) )\n\t{\n\t\t$this->set_image( $arr['image'] );\n\t}\n\n\tif ( isset($arr['textinput']) )\n\t{\n\t\t$this->set_textinput( $arr['textinput'] );\n\t}\n\n\tif ( isset($arr['items']) )\n\t{\n\t\t$this->set_items( $arr['items'] );\n\t}\n}", "title": "" }, { "docid": "fa09da560eec8beb50f07ba986362224", "score": "0.553889", "text": "public function getDataWithTypeGlobal() : void {}", "title": "" }, { "docid": "ca0e441b25fb14ab90db56cf049ae0a2", "score": "0.5537285", "text": "public function createFromGlobals() \n\t{\n\t\t$this->setAttributes(['get' => $_GET, 'post' => $_POST, 'cookie' => $_COOKIE, 'files' => $_FILES, 'server' => $_SERVER]);\n\t}", "title": "" }, { "docid": "3e7c3599fa39ecdd9bcf354479480fb3", "score": "0.5532394", "text": "function initialize() ;", "title": "" }, { "docid": "2db4f9460c20ab7ec4a2e7926e1b4e8c", "score": "0.5532126", "text": "function defineAppData() {\n $this->products = array(new Product('T-shirt', '10.99'),\n new Product('Pants', '14.99'),\n new Product('Jacket', '19.99'),\n new Product('Shoes', '24.99'));\n\n // Set Discounts\n $this->products[3]->discount_percent = 10;\n $this->products[2]->discount_percent = 50;\n $this->products[2]->discount_condition = array('T-shirt' => 2);\n\n $this->currencies = array(new Currency('USD', '1', '$'),\n new Currency('EGP', '15.67', 'e£'),\n new Currency('EUR', '0.85', '€'));\n }", "title": "" }, { "docid": "006ccacc3b1e4f5cebee44193932dcb0", "score": "0.55320126", "text": "protected function initStorageObjects() {\n\t\t$this->parts = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->activeParts = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->dependentNotes = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->dependentNotesFluidParsedMessages = new \\ArrayObject();\n\t}", "title": "" }, { "docid": "51d3dfb611b53c74de4baed745e21c74", "score": "0.55275327", "text": "protected function initStorageObjects()\n {\n /**\n * Do not modify this method!\n * It will be rewritten on each save in the extension builder\n * You may modify the constructor of this class instead\n */\n $this->infoWindowImages = new ObjectStorage();\n $this->categories = new ObjectStorage();\n $this->map = new ObjectStorage();\n }", "title": "" }, { "docid": "ab1079b9938ce6d67b10b0983acffc11", "score": "0.5527034", "text": "abstract function init();", "title": "" }, { "docid": "8dc243fa8ecbe8b5867e8370bf3ba0ed", "score": "0.5510397", "text": "private static function _init(){\n\t define(\"DS\", DIRECTORY_SEPARATOR);\t \n\n\t // 根路径\n\t define(\"__ROOT__\", dirname( getcwd() ).DS );\n\n\t // 静态文件目录\n\t define(\"__PUBLIC__\",__HOST__.dirname( _PHP_FILE_ ).DS);\n\n\t // 框架目录\n\t define(\"__FRAMEWORK__\", __ROOT__ . \"dagger\" . DS);\t \n\n\t define(\"__LIB__\", __FRAMEWORK__ . \"library\" . DS);\n\n\n\t // // 配置目录\n\t define(\"__CONFIG__\", __ROOT__ . \"config\" . DS);\n\t $GLOBALS['config'] = include __CONFIG__ . \"config.php\";\n\n\t // // 应用目录\n\t define(\"__APP__\", __ROOT__ . $GLOBALS['config']['appName'] . DS);\n\n\t // // 核心库\n\t // define(\"__CORE__\", __FRAMEWORK__ . \"core\" . DS);\n\n\t // //帮助函数\n\t // define(\"__HELPER__\", __FRAMEWORK__ . \"helper\" . DS);\t\t\n\t}", "title": "" }, { "docid": "bf14095236a1885b30a3e95e0632dde9", "score": "0.55090433", "text": "protected function _init() {}", "title": "" }, { "docid": "b72f1a06dbae881d50ebff3d621da090", "score": "0.55046767", "text": "abstract protected function _init();", "title": "" }, { "docid": "80a281e06e8905abaff0ac3db7c09b8e", "score": "0.5502642", "text": "protected function init(){}", "title": "" }, { "docid": "80a281e06e8905abaff0ac3db7c09b8e", "score": "0.5502642", "text": "protected function init(){}", "title": "" }, { "docid": "ce79971cdcf10f7a04d8a708f804dcb2", "score": "0.5496457", "text": "public function __construct()\n {\n\t // Assign user data to global array\n\t echo \"\"; \n }", "title": "" }, { "docid": "2cab6fd76893434e657f5be97bb6097f", "score": "0.5482957", "text": "public function init_framework()\r\n {\r\n /* ===\r\n * Object Sorting\r\n *\r\n * based on config varbiable $objectOrder\r\n * === */\r\n\r\n function cmpASC($a, $b)\r\n {\r\n $aconfig = $a->config();\r\n $bconfig = $b->config();\r\n return $aconfig['order'] > $bconfig['order'];\r\n }\r\n\r\n function cmpDESC($a, $b)\r\n {\r\n $aconfig = $a->config();\r\n $bconfig = $b->config();\r\n return $aconfig['order'] < $bconfig['order'];\r\n }\r\n\r\n if (self::$objectOrder == 'ASC')\r\n usort(self::$objects, \"cmpASC\");\r\n else if (self::$objectOrder == 'DESC')\r\n usort(self::$objects, \"cmpDESC\");\r\n\r\n /* ===\r\n * Object and Input Enqueue\r\n * === */\r\n self::enqueue_inputs();\r\n self::enqueue_objects();\r\n }", "title": "" }, { "docid": "d164de5fe77e5cb5e3cfd0a4f1e4d756", "score": "0.5478096", "text": "protected function initStorageObjects() {\n\t\t/**\n\t\t * Do not modify this method!\n\t\t * It will be rewritten on each save in the extension builder\n\t\t * You may modify the constructor of this class instead\n\t\t */\n\t\t$this->primaryCalendar = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->primaryCategory = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->secondaryCalendar = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t\t$this->secondaryCategory = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "title": "" }, { "docid": "cde3adb34cd0bedf2f4185398987ae3e", "score": "0.54761857", "text": "function _Cache_Application()\n {\n // Get contents of all registered variables\n if (is_array($this->registered_vars) && !empty($this->registered_vars)) {\n foreach ($this->registered_vars as $varname) {\n global $$varname;\n $this->data[$varname] = $$varname;\n }\n }\n\n // Save the data\n $this->save($this->id, serialize($this->data), 0, $this->group);\n }", "title": "" }, { "docid": "a9a90b9a3fe28da680e42693ceab4832", "score": "0.5470745", "text": "private function init() {\n $this->where = array();\n $this->select = array();\n $this->order = array();\n $this->group = array();\n $this->ignore = array();\n $this->raw = array();\n $this->includeDeleted = false;\n }", "title": "" } ]
39d0a5757a2f8e6f2888557a18565968
Removes hold from the appointment.
[ { "docid": "417c96052af34c70d7dee41cd6b727f7", "score": "0.6121885", "text": "public function appointmentsRemoveHold(int $id, int $tenant, string $fetch = self::FETCH_OBJECT)\n {\n return $this->executeEndpoint(new \\CompWright\\ServiceTitan\\Endpoint\\AppointmentsRemoveHold($id, $tenant), $fetch);\n }", "title": "" } ]
[ { "docid": "70c96904cf765b4ce922e9d93a302bfa", "score": "0.6110522", "text": "public function DeleteAppointment() {\n\t\t\t$this->objAppointment->Delete();\n\t\t}", "title": "" }, { "docid": "0d433c347785220082eed398d1c8e3d1", "score": "0.60203075", "text": "public function unhold()\n {\n if (!$this->canUnhold()) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__('You cannot remove the hold.'));\n }\n\n $this->setState($this->getHoldBeforeState())\n ->setStatus($this->getHoldBeforeStatus());\n $this->setHoldBeforeState(null);\n $this->setHoldBeforeStatus(null);\n return $this;\n }", "title": "" }, { "docid": "57a33a513e7c7e0a3b57a21cd9723862", "score": "0.56135535", "text": "public function destroy(Appointment $appointment)\n {\n //\n }", "title": "" }, { "docid": "57a33a513e7c7e0a3b57a21cd9723862", "score": "0.56135535", "text": "public function destroy(Appointment $appointment)\n {\n //\n }", "title": "" }, { "docid": "57a33a513e7c7e0a3b57a21cd9723862", "score": "0.56135535", "text": "public function destroy(Appointment $appointment)\n {\n //\n }", "title": "" }, { "docid": "57a33a513e7c7e0a3b57a21cd9723862", "score": "0.56135535", "text": "public function destroy(Appointment $appointment)\n {\n //\n }", "title": "" }, { "docid": "57a33a513e7c7e0a3b57a21cd9723862", "score": "0.56135535", "text": "public function destroy(Appointment $appointment)\n {\n //\n }", "title": "" }, { "docid": "57a33a513e7c7e0a3b57a21cd9723862", "score": "0.56135535", "text": "public function destroy(Appointment $appointment)\n {\n //\n }", "title": "" }, { "docid": "9de413d8f8845f18721f4629d045d227", "score": "0.5487809", "text": "private function removeShow()\n {\n $calendar = resolve('Google_Service_Calendar');\n $calendar->events->delete('primary', $this->show->gc_show_id);\n $this->show->gc_show_id = null;\n $this->syncShowTimes();\n }", "title": "" }, { "docid": "b36b73bad180c6f5ef7de782a03811dd", "score": "0.5444082", "text": "public function hold(bool $hold) {\n $this->hold = $hold;\n }", "title": "" }, { "docid": "4f160b75960521735a2f5afed59b9359", "score": "0.5419993", "text": "public function removePaper(Paper $paper)\r\n {\r\n }", "title": "" }, { "docid": "c0b95a82a1bc1eeb4f2d33e56d5806ce", "score": "0.53893626", "text": "public function removeReminder()\n {\n }", "title": "" }, { "docid": "bdcf25b3666cc1a642adc9b459a0cdd2", "score": "0.5317903", "text": "public function removeAnswer(Answer $answer);", "title": "" }, { "docid": "7adb726c0148cbf9f03c6328cd6fda6b", "score": "0.5286363", "text": "public function un_hold($id)\n {\n $ticket=Ticket::find($id);\n abort_if($ticket==null,404,'Ticket could not be found!');\n\n # Apply condition\n $this->condition_un_hold($ticket);\n \n TicketActionHelper::un_hold($ticket,auth()->user());\n\n return response()->json(['message'=>'Ticket has been successfully un-hold!']);\n }", "title": "" }, { "docid": "a8f6d1c83b90697d654852dfa2d8521f", "score": "0.52663505", "text": "public function testing_reset_purpose_oppose_booking($id){\n\t\t\t$this->db->where('id', $id)\n\t\t\t\t\t ->delete('booking');\n\t\t}", "title": "" }, { "docid": "be554aef3b009784b26129b15fa599cc", "score": "0.5218304", "text": "public function test_cancelHold_cannotBeCancelHold_returnFalse()\r\n\t{\r\n\t\t$result = \"aDummyValueDiferentThan200\";\r\n\t\t$this->prepareWrapperCallWithItemIdAndPatronId(\"cancelHold\", $result);\r\n\t\t\r\n\t\t$actual = $this->service->cancelHold(self::itemId, self::patronId);\r\n\t\t$this->assertFalse($actual);\r\n\t}", "title": "" }, { "docid": "16a066542bc6ec9bf4d68039d5238446", "score": "0.51609087", "text": "public function dismiss() {\n\t\t$this->storage->set( $this->currentTime );\n\t}", "title": "" }, { "docid": "443a8b094f5a9d94ca2524ebb78df21c", "score": "0.51567066", "text": "public function unpick(){\n\t\tif($this->isPicked()){\n\t\t\t$holdsIn = $this->_holdsIn;\n\t\t\t$this->_holdsIn = null;\n\t\t\tforeach($holdsIn as $holder){\n\t\t\t\t$this->detachFromHolder($holder);\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "c93a458f14ba7af0c6c71ec1d0a2a895", "score": "0.5020402", "text": "function remove_appointment_list($appointment_id,$patient_id){\n\t\t$query = \"DELETE FROM appoint_list WHERE appointment_id = $appointment_id AND \n\t\tpatients_id = $patient_id\";\n\t\treturn mysqli_query(get_db_connection(), $query);\n\t}", "title": "" }, { "docid": "f9fb3544a7d538b1a898431739872e23", "score": "0.501802", "text": "public function removeExpired(): void\n {\n foreach ($this->storage as $key => $item) {\n if ($item->checkExpired($this->currentTime)) {\n unset($this->storage[$key]);\n }\n }\n }", "title": "" }, { "docid": "7b6c0d4b4a4408fa83ba62592a9ce4b7", "score": "0.5012809", "text": "function delete_appointment($id) {\r\n\t\t\r\n\t\t// connection to database\r\n\t\tglobal $db;\r\n\t\t\r\n\t\t// Execute query\r\n\t\t$sql = \"DELETE FROM `Appointments` WHERE id=:id\";\r\n\t\t$stmt = $db->prepare($sql);\r\n\t\t$stmt->bindParam(':id', $id);\r\n\t\t$result = $stmt->execute();\r\n\t\t\r\n\t}", "title": "" }, { "docid": "3efb4e7d01d53fcd85a29779b8a9e415", "score": "0.50039923", "text": "public function remove(): void\n\t{\n\t\t$this->start();\n\t\t$this->data = null;\n\t\t$this->meta = null;\n\t}", "title": "" }, { "docid": "e1e80b868468fdde56f2d872d23b1103", "score": "0.49998355", "text": "public function release()\n {\n $this->update(['reserved_at' => null]);\n }", "title": "" }, { "docid": "dc468cf9850d3b272d43fccf9efcf7aa", "score": "0.49889374", "text": "public function appointmentsHold(int $id, int $tenant, ?Model\\CrmV2HoldAppointmentRequest $requestBody = null, string $fetch = self::FETCH_OBJECT)\n {\n return $this->executeEndpoint(new \\CompWright\\ServiceTitan\\Endpoint\\AppointmentsHold($id, $tenant, $requestBody), $fetch);\n }", "title": "" }, { "docid": "3c73cdb2122baa5b3ce92640b84fbc94", "score": "0.4979546", "text": "public function destroy(Appartment $appartment)\n {\n //\n }", "title": "" }, { "docid": "7a7906024d278e78e4ef1530642e0816", "score": "0.49618667", "text": "public function unsetReminders(): void\n {\n $this->reminders = [];\n }", "title": "" }, { "docid": "221de0333cec1309efddd33a75bcb64c", "score": "0.49613148", "text": "public function remove() {\r\n self::removeById($this->id);\r\n }", "title": "" }, { "docid": "8cfca6be835abbda3fe0c374ec209557", "score": "0.49432543", "text": "public function reset() {\n if ($this->sequence) {\n $this->Locker->unregister($this);\n }\n\n $this->sequence = false;\n $this->acquired = false;\n }", "title": "" }, { "docid": "600f5ccd2a01f5f856e1022b8498dbef", "score": "0.4937212", "text": "public function destroy()\n {\n $praktikum = Current_Praktikum::all()->first();\n $praktikum->status = 777; //lucky but nooo, cause praktikum just deleted :v\n $praktikum->save();\n broadcast(new praktikumStatusUpdated($praktikum));\n\n DB::table('current__praktikums')->truncate();\n }", "title": "" }, { "docid": "5a5f408791755d4d2a3ed6e0593b065c", "score": "0.49363753", "text": "function unblock_appointment($db){\n\t\n\t$removeslot = $_POST['removeslot'];\n\t$teacher = $_GET['teacher'];\n\t$statement = $db->prepare(\"DELETE FROM parentteachernight WHERE teacher=:teacher AND slot=:removeslot\");\n\t$statement->bindValue(\":teacher\", $teacher);\n\t$statement->bindValue(\":removeslot\", $removeslot);\n\t$statement->execute();\n\n}", "title": "" }, { "docid": "e90706d8c6a9f40a900a21f46ad5b1a1", "score": "0.49334502", "text": "public function remove() {\n\t\t\tif ( isset($this->id) ) {\n\t\t\t\t$this->eventStack->removeListener( $this->eventName, $this->id, $this->capture );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "cdb094bf8024ee2455bf239ba2bc5734", "score": "0.4913988", "text": "public function eraseEvents()\n {\n $this->collectedEvents = [];\n }", "title": "" }, { "docid": "c350d92b55c46ce9b8a94243263859fd", "score": "0.48985356", "text": "public function unsetDueDate(): void\n {\n $this->dueDate = [];\n }", "title": "" }, { "docid": "027e6e687bb5039c02c54d1f6c16daa8", "score": "0.48831797", "text": "public function removeExpired()\n {\n $cleaner = new Oai_resumption();\n $now = date('Y-m-d H:i:s');\n $cleaner->whereAdd(\"\\\"expires\\\" <= '$now'\");\n $cleaner->delete(true);\n }", "title": "" }, { "docid": "a026f3ede198f3fb93bcad88386d926d", "score": "0.4863111", "text": "public function remove()\r\n\t{\r\n\t\tif ($this->id)\r\n\t\t{\r\n\t\t\t// TODO: delete\r\n\t\t\t$this->id = null;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c329a6af29725d1c2ec47261272a9522", "score": "0.48441386", "text": "public function releaseLock(LockKey $key): void\n {\n // If an item exists for the key, remove it.\n $item = $this->dataStore->getValueForKey($key);\n if ($item) {\n $this->dataStore->removeKey($key);\n }\n }", "title": "" }, { "docid": "aee60f732d5e0bbb1c3871501f19f5ae", "score": "0.4831245", "text": "public function releaseSlot(): bool\n {\n return $this->store->forget(\n $this->key($this->instance->getSlot())\n );\n }", "title": "" }, { "docid": "1192c16e06f3182c0c31cd7d2437b192", "score": "0.48249066", "text": "public function delShipNotes() {\n $this->Notes = NULL;\n }", "title": "" }, { "docid": "33a62cdee5273a7370a614f699aaf575", "score": "0.48230937", "text": "public function canUnhold()\n {\n if ($this->getActionFlag(self::ACTION_FLAG_UNHOLD) === false || $this->isPaymentReview()) {\n return false;\n }\n return $this->getState() === self::STATE_HOLDED;\n }", "title": "" }, { "docid": "84ec7baaad9b7f4bcbb88da481fbeff6", "score": "0.48229733", "text": "public function undo()\n {\n $this->ceilingFan->off();\n }", "title": "" }, { "docid": "678b835bbc0a92bb9a89a46abfd2e624", "score": "0.4816898", "text": "public function unPublish(): self\n {\n return tap($this)->update(['publish_at' => null]);\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.48154384", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.48154384", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.48154384", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.48154384", "text": "public function remove();", "title": "" }, { "docid": "5cce61b0d92807e1c88ff342dbe6fad5", "score": "0.4809", "text": "public function cancelAppointment ($id, $time) {\n\n $query = \"SELECT message_id FROM appointments WHERE id = :id\";\n\n $stmt = $this->dbh->prepare($query);\n\n $stmt->execute(['id'=>$id]);\n\n $msgId = $stmt->fetch(PDO::FETCH_NUM);\n $msgId = $msgId[0];\n\n // Delete appointment entry\n\n $query = \"DELETE FROM appointments WHERE id = :id AND time = :time\";\n\n $stmt = $this->dbh->prepare($query);\n\n $stmt->execute(['id'=>$id, 'time'=>$time]);\n\n // Add cancellation note to the associated message\n\n $query = \"UPDATE messages SET message = concat(ifnull(message, ''), ' [Appointment cancelled by patient]') WHERE message_id = $msgId\";\n\n $stmt = $this->dbh->prepare($query);\n\n $stmt->execute();\n }", "title": "" }, { "docid": "f1dd3df93d82efcad9efdfa00088a30d", "score": "0.4799006", "text": "function wpsc_clear_stock_claims() {\n\tglobal $wpdb;\n\n\t$time = (float) get_option( 'wpsc_stock_keeping_time', 1 );\n\t$interval = get_option( 'wpsc_stock_keeping_interval', 'day' );\n\n\t// we need to convert into seconds because we're allowing decimal intervals like 1.5 days\n\t$convert = array(\n\t\t'hour' => 3600,\n\t\t'day' => 86400,\n\t\t'week' => 604800,\n\t);\n\n\t$seconds = floor( $time * $convert[ $interval ] );\n\n\t$sql = $wpdb->prepare( 'DELETE FROM ' . WPSC_TABLE_CLAIMED_STOCK . ' WHERE last_activity < UTC_TIMESTAMP() - INTERVAL %d SECOND', $seconds );\n\t$wpdb->query( $sql );\n}", "title": "" }, { "docid": "d79e263539afb6f770b5556655db3cc5", "score": "0.4791029", "text": "public function delete() {\r\n\tunset(Item::$rawItems[$this->idItem]);\r\n}", "title": "" }, { "docid": "3cab42f6fdb1238d8eb53632d740d329", "score": "0.47848445", "text": "public function removeFromCalendar(AppointmentEvent $event, ImportableUserInterface $user): bool;", "title": "" }, { "docid": "6bfae7f35ed51b41fc03d8f233d72202", "score": "0.47750252", "text": "public function forget()\r\n\t{\r\n\t\t$this->put(null, -2628000);\r\n\t}", "title": "" }, { "docid": "a839d59dc9b4d339c73ec46ff4cc8202", "score": "0.47613758", "text": "public function delete() {\n $this->redis->del($this->goals_key);\n }", "title": "" }, { "docid": "a64fd2db35ff175cad3f776e51e78aa3", "score": "0.4755163", "text": "public function destroy($id)\n {\n $appointment = Appointment::findOrFail($id);\n\n $appointment->delete();\n }", "title": "" }, { "docid": "5a46704225f86e579576f05a23be3384", "score": "0.47531587", "text": "public function delete($matterId, $holdId, $optParams = [])\n {\n $params = ['matterId' => $matterId, 'holdId' => $holdId];\n $params = array_merge($params, $optParams);\n return $this->call('delete', [$params], VaultEmpty::class);\n }", "title": "" }, { "docid": "44a9c96f3f50ad094cc6d19cf06b3b4f", "score": "0.47507393", "text": "public function releaseHoldTasks(){\n foreach ($this->_holdTasks as $task) {\n parent::enqueue($task);\n }\n }", "title": "" }, { "docid": "4549d3a5ea3818224f7597682e56fb91", "score": "0.47468597", "text": "public function destroy()\n {\n lead::truncate();\n\n }", "title": "" }, { "docid": "0b837af7b8a40568123406fec2d06d86", "score": "0.47293973", "text": "public function deleteBooking() {\n $this->printMovieWelcomeScreen('Booking List');\n $booking = new bookings($this);\n $booking->getBookingList();\n output::message('What booking ID would you like to remove?', 5);\n $bookingId = (new input())->getIntResponse(0,99,true)->getInputData();\n\n if( $bookingId ) {\n $booking->setBookingId($bookingId);\n $booking->loadBookingData();\n\n $booking->printBookingDetails(false);\n output::blankRow();\n output::message('To confirm type: Y',5);\n $response = (new input())->getStringResponse()->getInputData();\n\n if( strtolower($response) == 'y' ) {\n $booking->deleteBookingFromDatabase();\n\n $this->printMovieWelcomeScreen('The following booking has been removed:');\n\n output::message('Booking ID: ' . $booking->getBookingId(), 5 );\n output::message('Customer Name: ' . $booking->getCustomerName(), 5 );\n\n $this->waitForReturnToMenu();\n\n }\n $this->printInit();\n } else {\n $this->printInit();\n }\n }", "title": "" }, { "docid": "7f17f2af9880564c240ba6c4cdc2c774", "score": "0.4698325", "text": "public function unsetNote(): void\n {\n $this->note = [];\n }", "title": "" }, { "docid": "e7a235a249b50c9d95081bd2d6d14160", "score": "0.46963254", "text": "function removeAssoc()\n {\n $this->lAss = '00';\n }", "title": "" }, { "docid": "fcdab9ebdabb101bf5dec2b70395c78b", "score": "0.46961355", "text": "public function destroy(Admission $admission)\n {\n //\n }", "title": "" }, { "docid": "0fb04a3c5de71c8c219e3267aa4a4092", "score": "0.4688949", "text": "public function rem() {\n return $this->remove();\n }", "title": "" }, { "docid": "fb1938e88d380136ca8dbb39a2951585", "score": "0.46802637", "text": "public function test_cancelHold_canBeCanCancelHold_returnTrue()\r\n\t{\r\n\t\t$result = \"200\";\r\n\t\t$this->prepareWrapperCallWithItemIdAndPatronId(\"cancelHold\", $result);\r\n\t\t\r\n\t\t$actual = $this->service->cancelHold(self::itemId, self::patronId);\r\n\t\t$this->assertTrue($actual);\r\n\t}", "title": "" }, { "docid": "b387b638a49fda3d7a377cbe947fe8a6", "score": "0.4672305", "text": "public function delete($lunch) { ; }", "title": "" }, { "docid": "5e764c50265ac948c2786ac4438789f3", "score": "0.46722355", "text": "public function destroy(Lease $lease)\n {\n //\n }", "title": "" }, { "docid": "b6b3631b7fd8ef48e82c187430749c9b", "score": "0.4668441", "text": "public function remove(): int {\n $where = 'job_id = ? AND appointment_id = ?';\n $values = [$this->jobId, $this->appointment->appId];\n return $this->delete($where, $values);\n }", "title": "" }, { "docid": "7dddc5483e11516b16f119a7f147efda", "score": "0.46672103", "text": "public function destroy(EvacuationPoint $evacuationPoint)\n {\n //\n }", "title": "" }, { "docid": "212c64dcfb69a57547fad1a6888b240d", "score": "0.46646672", "text": "function purge()\r\n\t{\r\n\t\tunset($this->c);\r\n\t}", "title": "" }, { "docid": "699ab1cf97e3f8bea330f58b9fb94691", "score": "0.4664207", "text": "public function unsetReminderPeriod($index)\n {\n unset($this->reminderPeriod[$index]);\n }", "title": "" }, { "docid": "97d867be246a2b2a6c670652eec39c4e", "score": "0.46626857", "text": "function declineAppointment($id, $motiv){\r\n global $conn;\r\n $mesaj = false;\r\n sendMail($id, $mesaj, $motiv);\r\n //send MAIL to client\r\n $getAppointmentsStmt = $conn->prepare('DELETE FROM appointments WHERE id = ?');\r\n $getAppointmentsStmt->bind_param('i', $id);\r\n\r\n $getAppointmentsStmt->execute();\r\n $results = $getAppointmentsStmt->get_result();\r\n $getAppointmentsStmt->close();\r\n}", "title": "" }, { "docid": "7d18e34dc05adbcebd91a5d1849b6b7b", "score": "0.46596378", "text": "public function Remove()\n {\n $appId = Request::GetPost(\"appId\");\n\n AppHelper::Remove($this->Core, $appId);\n }", "title": "" }, { "docid": "8eeaf761466cec97d1348eb95f4c643a", "score": "0.4653276", "text": "public function destroy($refNumber)\n {\n\n// DB::table('appointments')->where('refNumber', '=', $refNumber)->delete();\n }", "title": "" }, { "docid": "127f0f10524c7208a63e47631fb7d394", "score": "0.46463457", "text": "public function unlock() {\n\t\ttry {\n\t\t\t$this->_locked = false;\n\t\t}\n\t\tcatch(\\Exception $ex) {\n\t\t\t\\Bedrock\\Common\\Logger::exception($ex);\n\t\t}\n\t}", "title": "" }, { "docid": "66c9b1f64ee5941fd457e60b1669279d", "score": "0.46449998", "text": "public function unpause(): void\n {\n if (! $this->speaking) {\n throw new \\RuntimeException('Audio must be playing to unpause it.');\n }\n\n if (! $this->paused) {\n throw new \\RuntimeException('Audio is already playing.');\n }\n\n $this->paused = false;\n $this->timestamp = microtime(true) * 1000;\n }", "title": "" }, { "docid": "629bb0eca528ffe1fbcaaef9de19d04d", "score": "0.46448424", "text": "public function deletePulse ()\n {\n $this->checkInvalid();\n\n $deleteURL = sprintf(\"%s/%d.json\", self::apiEndpoint(), $this->getId());\n $this->jsonResponse = self::sendDelete($deleteURL);\n $this->assignResults();\n\n $this->deletedObject = true;\n }", "title": "" }, { "docid": "4513ddbc471235483fef6121ee2a72c4", "score": "0.46443817", "text": "public function delItem($chave) {\n\t\tunset($this->lista[$chave]);\n\t}", "title": "" }, { "docid": "5c8e7f0a84c1b62439ff1ca4c14af2ae", "score": "0.46430632", "text": "function removeAppointmentFromGoogle($appointment_id)\n\t{\n\t\tJLog::add(\"inside remove Appt from Google for appointment_id \" . $appointment_id);\n\t\t\n\t\t// look up the calendar info for this appointment\n\t\tJLoader::register('SalonBookModelAppointments', JPATH_COMPONENT_SITE.DS.'models'.DS.'appointments.php');\n\t\t$appointmentModel = new SalonBookModelAppointments();\n\t\t$appointmentData = $appointmentModel->getAppointmentDetailsForID($appointment_id);\n\t\t\n\t\tJLog::add(\"details: \" . var_export($appointmentData, true));\n\t\t\n\t\t$calendarEventURL = $appointmentData[0]['calendarEventURL']; \n\t\tif ( $calendarEventURL != NULL )\n\t\t{\n\t\t\t$calendarLogin = $appointmentData[0]['calendarLogin'];\n\t\t\t$calendarPassword = $appointmentData[0]['calendarPassword'];\n\t\t\t\n\t\t\t// use the stylist data to figure out the correct calendar to post to\n\t\t\t$calendar = $this->setupCalendarConnection($calendarLogin, $calendarPassword);\n\t\t\t\n\t\t\treturn $this->deleteCalendarEntry($calendar, $calendarEventURL);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tJLog::add(\"we couldn't find a Google calendar to delete\");\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "8b517a5db5cf2d602dacd35ed934b9cd", "score": "0.4642433", "text": "function deleteEvent($day, $month, $year, $time, $buffertime, $userID){\n\tfoundAppointment($day, $month, $year, $userID);\n\t\t$q = \"DELETE FROM `UCPM_appointments` WHERE (TIME(starttime) > '$time') AND (TIME(starttime) < '$buffertime') AND (DATE(starttime) = '$year-$month-$day') AND (userID='$userID') \";\n\t$result = mysql_query($q) or die(mysql_error());\n\tcheckDeleted($day, $month, $year, $userID);\n\n}", "title": "" }, { "docid": "ba7353266c8bf0058958bcd2fb820bfd", "score": "0.4641877", "text": "public function removeItem(LayoutItem $item);", "title": "" }, { "docid": "56ef86723a3ce311a8ed60a2c434aaba", "score": "0.4634021", "text": "private function destroyResource()\n {\n foreach ($this->events as $event) {\n $this->removeEvent($event);\n }\n\n if ($this->handle) {\n event_base_loopexit($this->handle, 1);\n event_base_free($this->handle);\n $this->handle = null;\n }\n }", "title": "" }, { "docid": "b3e00318049f1d2c1bb415c7b278d7fb", "score": "0.46312407", "text": "public function clear() {\n\n unset($this->collection);\n $this->collection = array();\n }", "title": "" }, { "docid": "edd79dbf8b91a43b46855b3a9a290855", "score": "0.46295646", "text": "public function microsoftGraphSecurityRemoveHold(): MicrosoftGraphSecurityRemoveHoldRequestBuilder {\n return new MicrosoftGraphSecurityRemoveHoldRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "title": "" }, { "docid": "edd79dbf8b91a43b46855b3a9a290855", "score": "0.46295646", "text": "public function microsoftGraphSecurityRemoveHold(): MicrosoftGraphSecurityRemoveHoldRequestBuilder {\n return new MicrosoftGraphSecurityRemoveHoldRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "title": "" }, { "docid": "2538ed9b1ec6fa27df34e88f704550e0", "score": "0.462695", "text": "public function unfreeze()\n {\n $this->_element->unfreeze();\n }", "title": "" }, { "docid": "4e8d712c018b476537a743afd79f9ace", "score": "0.46269313", "text": "public function test_placeHold_canPlaceHold_returnFalse()\r\n\t{\r\n\t\t$expected = $this->threeMMother->placeHoldSuccessfull();\r\n\t\t$this->prepareWrapperCallWithItemIdAndPatronId(\"placeHold\", $expected);\r\n\t\t\t\r\n\t\t$actual = $this->service->placeHold(self::itemId, self::patronId);\r\n\t\t$this->assertEquals($expected, $actual);\r\n\t}", "title": "" }, { "docid": "2fb115027fdd9e2f5fddbf7990265dc8", "score": "0.4621884", "text": "public function endPaper(Paper $paper)\r\n {\r\n }", "title": "" }, { "docid": "ed7546f0b845fa3c3353ea35a4a20a99", "score": "0.46163064", "text": "public function remove() {\n\t\t$this->read();\n\t\t$this->clearBlock();\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "d53f603033599fe82c8fdbe22c9056e3", "score": "0.46154922", "text": "public function removeBook($entry)\n {\n print \"Deleting \".$entry->getId()->getText().\"\\n\\n\";\n $this->gdClient->deleteVolume($entry);\n }", "title": "" }, { "docid": "5bf9815fe66db22b85c026ab7ca346a5", "score": "0.461441", "text": "public function removeExchangeByKey($key);", "title": "" }, { "docid": "434204814d975f5124daadc761b9872a", "score": "0.46120748", "text": "public function forget($key);", "title": "" }, { "docid": "011b804b1b86203fa70255417c635cea", "score": "0.46108028", "text": "public function removeTypePaper(TypePaper $type)\r\n {\r\n }", "title": "" }, { "docid": "125f031f65cd086d6c0ce19566805b06", "score": "0.45980126", "text": "public function unLock() {\n return $this->_lock(LOCK_UN);\n }", "title": "" }, { "docid": "08a492fa75622eda05e5daafeff99208", "score": "0.45958883", "text": "public function forget($key)\n {\n unset($this->timeToLive[$key]);\n return parent::forget($key);\n }", "title": "" }, { "docid": "67068a22c3aac11b911c82548aa42339", "score": "0.45924821", "text": "public function remove ();", "title": "" }, { "docid": "6243e89480de069af3c88dedd71ac3ee", "score": "0.45917916", "text": "public static function emptyCart( )\n\t{\n\t\tforeach ( self::getCartItems() AS $cart_item )\n\t\t{\n\t\t\tif ( isset( $cart_item['booknetic_appointment_id'] ) && self::appointmentExist( $cart_item['booknetic_appointment_id'] ) && !self::appointmentIsApproved( $cart_item['booknetic_appointment_id'] ) )\n\t\t\t{\n\t\t\t\tself::removeAppointment( $cart_item );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "bf7b55674143d85cd68630925d9c05d0", "score": "0.45901248", "text": "public function removeEvent(LeEvent $event)\n {\n $key = $this->getEventKey($event);\n if (isset($this->events[$key])) {\n unset($this->events[$key]);\n }\n }", "title": "" }, { "docid": "6611fd279697782fb56697d6cf96eae5", "score": "0.45803154", "text": "public function clearVictims()\n {\n $this->collVictims = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "853fdc61ae40a8a11c51d5aa16f42931", "score": "0.45768315", "text": "public function delete_appointments(){\r\t\t$query=\"delete `d4mbookings`.*,`d4mpayments`.*,`d4morder_client_info`.* from `d4mbookings` INNER JOIN `d4mpayments`,`d4morder_client_info` where `d4mbookings`.`order_id`=`d4mpayments`.`order_id` and `d4mbookings`.`order_id`=`d4morder_client_info`.`order_id` and `d4mbookings`.`order_id`='\".$this->order_id.\"' \";\r\t\t$result=mysqli_query($this->conn,$query);\r\t\treturn $result;\r\t}", "title": "" }, { "docid": "1c4f33d0187886d15ff7dda6282a6599", "score": "0.45732945", "text": "public function removeFromBag() {\n\n\t}", "title": "" }, { "docid": "46f0837a3d98f2cd572db6fdc3ec37d1", "score": "0.45717663", "text": "public function removed();", "title": "" }, { "docid": "1fed890a07b28a16a5fa62b83ed2705f", "score": "0.45629606", "text": "public function deactivate($lunch) { ; }", "title": "" }, { "docid": "e75abe3bd1d6fb42f30ce0295c5be35d", "score": "0.4560989", "text": "public function unCheck() {\n $listItem = $this->getTask();\n // Update task\n Item::find($listItem)->unCheck();\n\n return redirect()->back();\n }", "title": "" } ]
f751ac69812c9707f9ba814ea00694dd
Deletes a channel feed post. Authentication is required. Required scope: channel_feed_edit
[ { "docid": "388a7ec18f3c0abc326c680979c69b66", "score": "0.76780224", "text": "public function deletePost($channel, $id) { \r\n return $this->makeRequest('delete', \"/feed/{$channel}/posts/{$id}\");\r\n }", "title": "" } ]
[ { "docid": "2ebcc62694fa61a3ce8409bdaf2fcfda", "score": "0.6858805", "text": "public function delete() {\n\t\tif ($this->post == null) {\n\t\t\tthrow new IllegalLinkException();\n\t\t}\n\t\t\n\t\t// check permission\n\t\t$this->board->checkModeratorPermission('canDeletePostCompletely');\n\t\t\n\t\t// remove user stats\n\t\tThreadEditor::updateUserStats($this->thread->threadID, 'delete');\n\t\tPostEditor::updateUserStats(ThreadEditor::getAllPostIDs($this->thread->threadID), 'delete');\n\t\t\n\t\t$this->post->unmark();\n\t\t$this->post->delete(false);\n\t\n\t\tif ($this->thread->hasPosts()) {\n\t\t\t// delete only post\n\t\t\t$this->thread->checkVisibility();\n\t\t\tif (!$this->post->isDeleted || !THREAD_ENABLE_RECYCLE_BIN) {\n\t\t\t\t$this->removePost();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tThreadEditor::refreshFirstPostIDAll($this->thread->threadID);\n\t\t\t}\n\t\t\t\n\t\t\t// re-add user stats\n\t\t\tThreadEditor::updateUserStats($this->thread->threadID, 'enable');\n\t\t\tPostEditor::updateUserStats(ThreadEditor::getAllPostIDs($this->thread->threadID), 'enable');\n\t\t\n\t\t\t// forward\n\t\t\tHeaderUtil::redirect($this->url);\n\t\t\texit;\n\t\t}\n\t\telse {\n\t\t\t// delete complete thread\n\t\t\t$this->thread->delete(false, false);\n\t\t\tif (!$this->post->isDeleted || !THREAD_ENABLE_RECYCLE_BIN) {\n\t\t\t\t$this->board->refresh();\n\t\t\t\tif ($this->post->time >= $this->board->getLastPostTime($this->thread->languageID)) {\n\t\t\t\t\t$this->board->setLastPosts();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// reset cache\n\t\t\t\tThreadAction::resetCache();\n\t\t\t}\n\t\t\t\n\t\t\tHeaderUtil::redirect('index.php?page=Board&boardID='.$this->board->boardID.SID_ARG_2ND_NOT_ENCODED);\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "ebacddc13a3677b0023227d28504e7ca", "score": "0.68183666", "text": "public function deletePost(Post $post);", "title": "" }, { "docid": "d9b7a49d6fd97d13d3efc07ec3adbbec", "score": "0.6662452", "text": "public function delete() {\n\t\tif (!$this->user->loggedIn) {\n\t\t\tself::redirect_to('user#login');\n\t\t}\n\n\t\tif (isset($this->params[0])) {\n\t\t\t$post = Post::find($this->params[0]);\n\n\t\t\t// make sure the user owns this post\n\t\t\tif ($post->get('author') == $this->user->get('id')) {\n\t\t\t\t$post->destroy();\n\t\t\t\tself::redirect_to('user#posts', array('deleted'));\n\t\t\t}\n\t\t}\n\t\tself::redirect_to('user#posts');\n\t}", "title": "" }, { "docid": "b8a057e10c0df1ed1e0b7d3c5303e694", "score": "0.6645782", "text": "public function destroy(ForumPost $post)\n {\n $post->delete();\n\n return redirect('/forum');\n }", "title": "" }, { "docid": "d337344099c1a79e5b7566a077920b25", "score": "0.64952695", "text": "public function deleteAction() {\n\t\t// if($post->delete()) {\n\t\t// \tSession::message([\"Post <strong>$post->name</strong> deleted!\" , \"success\"]);\n\t\t// \tredirect_to('/posts/index');\n\t\t// } else {\n\t\t// \tSession::message([\"Error saving! \" . $error->get_errors() , \"success\"]);\n\t\t// }\n\t}", "title": "" }, { "docid": "72723b5309177643c5d2832d97657645", "score": "0.64714783", "text": "public function deletePost($post)\n {\n if (!($post instanceof Services_Blogging_Post)) {\n $nPostId = $post;\n $post = new Services_Blogging_Post();\n $post->setId($nPostId);\n }\n /**\n * In LiveJournal, posts are deleted by emptying\n * some fields\n */\n $post->{Services_Blogging_Post::CONTENT} = '';\n $post->{Services_Blogging_Post::TITLE} = '';\n $post->{Services_Blogging_Post::DATE} = 0;\n\n return $this->savePost($post);\n }", "title": "" }, { "docid": "40b1c341b0b4cef2056144077eddda3f", "score": "0.64147985", "text": "public function deletePost(Post $post)\n {\n $post->delete();\n\n return Redirect::route('admin.dash')->with('message', 'Post deleted.');\n }", "title": "" }, { "docid": "99528f875dbacc814af9afe1658189d3", "score": "0.6389159", "text": "public function delete(){\n\t\tif (!Auth::check('blogger',$this->request)){\n\t\t\treturn $this->redirect('/login');\n\t\t}\n\t\t$post = Post::find('first', array('conditions' => array( '_id' => $this->request->id)));\n\t\tif (!$post){\n\t\t\t$this->redirect('Posts::index');\n\t\t}\n\t\tif ($post->delete()){\n\t\t\t$this->redirect('Posts::index');\n\t\t}\n\t}", "title": "" }, { "docid": "04b785c5b886fd875c39ad33e7c848b0", "score": "0.63883114", "text": "public function action_entry_delete_do()\r\n\t{\r\n\t\t$id = Input::get('post_id');\r\n\t\t$post = Post::find($id);\r\n\r\n\t\t// Delete all comments associated with the post\r\n\t\t// as well as the post itself.\r\n\t\t$post->comments()->delete();\r\n\t\t$post->delete();\r\n\r\n\t\treturn Redirect::to('admin/entry_manage')\r\n\t\t\t->with('message', 'Deleted blog entry');\r\n\t}", "title": "" }, { "docid": "47f8b4bfd5f29e43e93726d66259f1a0", "score": "0.63628584", "text": "public function destroy(Post $post)\n {\n if ($post['user_id'] != Auth::id()) {\n Toastr::error('Only Admin Access this Post', 'Error');\n return redirect('author/post');\n }\n $post -> categories()->detach();\n $post -> tags()->detach();\n $post -> delete();\n \n Toastr::success('Post Successfully Deleted', 'success');\n return redirect('author/post/');\n }", "title": "" }, { "docid": "9b3c98a9b8150db5b16abe8120891dad", "score": "0.6331774", "text": "public function destroy(Post $post)\n {\n //delete image\n if(Storage::disk('public')->exists('post/'.$post->image))\n {\n Storage::disk('public')->delete('post/'.$post->image);\n }\n $post->categories()->detach();\n $post->tags()->detach();\n\n $post->delete();\n Toastr::success(\"L'article a ete supprime avec succes\", 'Succes');\n return redirect()->route('admin.post.index');\n }", "title": "" }, { "docid": "5e34ad946beab8c979f9487eab86fe2c", "score": "0.6321452", "text": "public function destroy(Post $post)\n {\n $status = $post->status;\n $category = $post->category_name;\n $post->delete();\n Session::flash(\"success\", 'Post deleted successfully.');\n return redirect(route('posts', [$status, $category]));\n }", "title": "" }, { "docid": "69e83ba0250fdf827824b012fa4aef4a", "score": "0.62861484", "text": "public function deleted(Post $post)\r\n {\r\n //\r\n }", "title": "" }, { "docid": "b873993de4721ba0e273234b8e44edbb", "score": "0.6279992", "text": "public function destroy(Posts $post)\n {\n //\n $this->authorize('delete',$post);\n $post->delete();\n return redirect()->back()\n ->with('success','Post deleted.');\n }", "title": "" }, { "docid": "9f555ec148dfaf1457de9ccf3c2ce309", "score": "0.6274666", "text": "public function destroy(Post $post): RedirectResponse\n {\n $id = $post->thread_id;\n $thread = $post->thread;\n\n if ($this->user->cannot('destroy', $post)) {\n flash('Error', 'Your are not authorized to delete the post.');\n\n return redirect()->route('threads.show', ['thread' => $id]);\n }\n\n // add to activity log\n Activity::log($post, $this->user, 3);\n\n $post->delete();\n\n flash()->success('Success', 'Your post has been deleted!');\n\n return redirect()->route('threads.show', ['thread' => $id]);\n }", "title": "" }, { "docid": "b2d6ebf14ef624e17fffb31cf89540e9", "score": "0.627139", "text": "public function deleted(Post $post)\n {\n if (auth()->guard('admin')->check() && isset(auth()->guard('admin')->user()->id) && isset($post->id)) {\n ActivityLog::create([\n 'admin_id' => auth()->guard('admin')->user()->id,\n 'menu' => array_search('DUM', config('constants.activity_log.menu')),\n 'action_type' => array_search('Delete', config('constants.activity_log.action_type')),\n 'ref_id' => $post->id\n ]);\n }\n \n }", "title": "" }, { "docid": "aa513127b1a4c93ae20e490e14b4033b", "score": "0.6264471", "text": "public function delete()\n {\n $post = Post::find(1);\n $post->delete();\n }", "title": "" }, { "docid": "37b0b073e723905ffe9dcfbe21bc6553", "score": "0.62610036", "text": "public function delete()\n {\n $user = Auth::user();\n\n // load post\n $perm = Permission::find(1);\n\n if ($user->can('delete', $perm)) {\n echo \"Current logged in user is allowed to delete the Post: {$perm->id}\";\n } else {\n echo 'Not Authorized.';\n }\n }", "title": "" }, { "docid": "8aca2342b121d4df84b38a97918fd0f4", "score": "0.62607205", "text": "public function destroy(Post $post)\n {\n $this->authorize('delete', $post);\n \n $post->delete();\n\n return redirect()\n ->route('welcome')\n ->with('success', 'Du raderade en post');\n }", "title": "" }, { "docid": "72dfc8970091f8ad0159660ae97452f8", "score": "0.6240456", "text": "public function destroy(Post $post)\n {\n Gate::authorize('delete', $post);\n\n $post->delete();\n\n return redirect(route('posts.index'))->with('message','Posts deleted succesfully');\n }", "title": "" }, { "docid": "f60471f96854885dc6a8488ad87d6d31", "score": "0.62348425", "text": "public function deleteAction()\n {\n if( !(isset($_REQUEST['id'])) )\n throw new \\Exception('Id param is required');\n\n $post = Post::get($_REQUEST['id']);\n\n if( isset($_REQUEST['confirm']) )\n {\n $post->delete();\n header(\"Location: /post/list\");\n }\n\n return View::renderTemplate('Post/delete', [\n 'post' => $post,\n 'title' => 'Delete post'\n ]);\n }", "title": "" }, { "docid": "9c3b2cd65f88bc571d33d4e4565e60d9", "score": "0.62305677", "text": "public function destroy(Request $request, Post $post)\n {\n $this->authorize('destroy', $post);\n\n $post->delete();\n\n return redirect('/blog/my_posts');\n }", "title": "" }, { "docid": "f321568ec662eb5ed16f1535b0520187", "score": "0.6227456", "text": "public function destroy(Post $post)\n {\n $this->authorize('delete', $post); //throws excpetion if trying to delete someone elses post\n\n $post->delete();\n\n return back();\n }", "title": "" }, { "docid": "3d6c9616eafbe44c43b6117710b93372", "score": "0.6220969", "text": "public function destroy($id)\n {\n $post = Newsfeed::find($id);\n $post->delete();\n return redirect ('/newsfeed')->with('success', \"Post Deleted!\");\n }", "title": "" }, { "docid": "582b226972f1acbf2432818680451162", "score": "0.6209309", "text": "public function destroy(Post $post)\n {\n // if(!$post->ownedBy(auth()->user())){\n // dd('no');\n // }\n $this->authorize('delete', $post); //can we delete (method named defined in policy) this post\n\n $post->delete();\n\n return back();\n }", "title": "" }, { "docid": "b201f0e7bd0538ea74a405bc8f288306", "score": "0.6207613", "text": "public function onPostDelete(Thread $thread, Post $post)\n\t{\n\t}", "title": "" }, { "docid": "c2567f97c509a8c509c9496ec580196a", "score": "0.62049264", "text": "public function deletePost(PostInterface $post);", "title": "" }, { "docid": "da089ead1364f32ad17e298ed999f378", "score": "0.61678493", "text": "public function destroy(Post $post)\n {\n $post->delete();\n \n return redirect('/posts')->with('message', 'Your post has been deleted');\n }", "title": "" }, { "docid": "6e36e26d80d80ed7e921d40b1bdcd777", "score": "0.6154715", "text": "public function destroy(Post $post)\n {\n $this->authorize('delete', $post);\n $post_user = $post->user->id;\n\n // deleting image when image exist\n if(isset($post->image)){\n $storage_path = storage_path();\n $old_image_path = \"$storage_path/app/public/$post->image\";\n if(File::exists($old_image_path)){\n File::delete($old_image_path);\n }\n }\n $post->delete();\n return redirect(\"/user/$post_user\")->with('success', 'Post Deleted.');\n }", "title": "" }, { "docid": "a195a77302c6a48f693e9ec504b795db", "score": "0.61501145", "text": "public function destroy(Post $post): \\Illuminate\\Http\\RedirectResponse\n {\n $post->delete();\n return redirect(\"/posts\");\n }", "title": "" }, { "docid": "8f19c2424dc4e56711ea62597b8de07f", "score": "0.6145799", "text": "public function destroy(Post $post)\n {\n if($post->user_id != \\Auth::user()->id){\n session()->flash('message-error', 'You don\\'t have permission');\n return redirect(url('posts'));\n }\n $post->delete();\n session()->flash('message-error', 'Post Deleted');\n return redirect(url('posts'));\n }", "title": "" }, { "docid": "34a8a609cb26c0d0867e1adbe0a776fa", "score": "0.6143251", "text": "public function destroy(Post $post)\n {\n $this->authorize('delete', $post);\n $deletedPost = $post;\n \\Mail::to(config('mail.admin_email'))->queue(new PostDeleted($deletedPost));\n $post->delete();\n flash(\"Статья удалена\", 'warning');\n\n return redirect('/');\n }", "title": "" }, { "docid": "b1a3b01a86946c04f027e7db86522d29", "score": "0.61426866", "text": "public function delete_post($postid)\r\n {\r\n do_action('before_delete_post', $postid);\r\n echo json_encode(array(\r\n 'success' => $this->newsfeed_model->delete_post($postid)\r\n ));\r\n }", "title": "" }, { "docid": "42785ca8624b51aae2335313471c074a", "score": "0.6141337", "text": "public function deletePost(){\n\t\t$PostID = $this->uri->segment(3);\n\t\t$data = $this->Common_model->DeletePosts($PostID);\n\t\tredirect('Dashboard/posts');\n\t\t// if ($row > 0){\n\t\t// }\n\t}", "title": "" }, { "docid": "3efda491821e12dd709dea88a2bb331b", "score": "0.614113", "text": "public function destroy(Post $post)\n {\n $post->deletePost();\n return redirect('posts');\n }", "title": "" }, { "docid": "7ac2dd4daa4e540915ff899bd3c0717b", "score": "0.61338544", "text": "public function deleteAction() {\n\n // Only allow this for logged in users who own this content.\n $results = $this->authBlog($this->getID());\n\n // If not found, show warning.\n if (!$results) {\n Flash::addMessage('Could not delete project item(s)', Flash::WARNING);\n }\n\n Flash::addMessage('Are you sure you want to delete this project?', Flash::WARNING);\n\n View::renderTemplate('Post/delete.html', [\n 'project' => $results\n ]);\n }", "title": "" }, { "docid": "b9ff0353111e91ce9bb5b7792abddaa2", "score": "0.6118099", "text": "public function postDelete(Request $request)\n {\n // validate request\n $this->validate($request, [\n 'post_id' => 'required|numeric|min:1',\n ]);\n\n // parse request\n $post_id = $request->post_id;\n\n // get the post\n $post = Post::find($post_id);\n\n // if the post is found, remove its association with the current user\n if (isset($post)) {\n $post->users()->detach(\\Auth::id());\n\n // if the post has no more user associations, then delete it\n if ($post->users->isEmpty()) {\n $post->delete();\n }\n\n // indicate unsaving of post\n \\Session::flash('flash_message', 'Unsaved post <a href=\\''.\n $post->uri.'\\' target=\\'_blank\\'>'.$post->uri.'</a>.');\n } else {\n // indicate post is not found\n \\Session::flash('flash_message', 'Could not find Post ID = '.\n $post_id.'.');\n }\n\n // redirect to the previous page\n $view = back();\n\n return $view;\n }", "title": "" }, { "docid": "2908cfba3c092f58370e98ec7c4071e6", "score": "0.61142194", "text": "public function destroy(Post $post)\n {\n $this->authorize('delete', $post);\n\n $post->delete();\n\n $route = 'posts.index';\n\n if (str_contains(URL::previous(), 'dashboard')) {\n $route = 'dashboard.post';\n }\n\n return redirect()->route($route);\n }", "title": "" }, { "docid": "25d1f62e9dcab73a68816d79088f435d", "score": "0.611182", "text": "public function delete()\r\n\t{\r\n\t\t$url = $this->prepareUri();\r\n\t\t$data = $this->posts;\r\n\r\n\t\treturn $this->sendRequest(self::DELETE, $url, $data);\r\n\t}", "title": "" }, { "docid": "cc89fb020df6c10c6be85bdf0f0b01c9", "score": "0.6109907", "text": "public function removeAction() {\n\n // Only allow this for logged in users who own this content.\n $results_auth_blog = $this->authBlog($this->getID());\n\n $blog = new Blog();\n // Delete post at ID\n $delete_results = $blog->delete($this->getID());\n\n if ($delete_results) {\n Flash::addMessage('Blog post deleted', Flash::INFO);\n $this->redirect('/post/index');\n }\n\n // If not found, show warning.\n Flash::addMessage('Could not delete that post', Flash::INFO);\n $this->redirect('/post/show/' . $this->getID());\n }", "title": "" }, { "docid": "b2cf1453f46ba065f9a6ef798e45d749", "score": "0.61056614", "text": "public function destroy(Post $post)\n {\n $post->delete();\n return redirect('/posts');\n }", "title": "" }, { "docid": "3bd784618be26a6bdfe5c8e28703f809", "score": "0.6102591", "text": "public function destroy(Feed $feed)\n {\n\t Gate::authorize('app.feed.destroy');\n\n\t $feed->delete();\n\t alert()->success('Deleted!', 'The item is deleted successfully');\n\t return back();\n }", "title": "" }, { "docid": "91cb3c6079083416e44e4feedea363b6", "score": "0.6095188", "text": "public function destroy($post)\n {\n $post->delete();\n return redirect(action('PostController@index'));\n }", "title": "" }, { "docid": "d7ebe5dc9065fd1aa264f270128ebcda", "score": "0.6094266", "text": "public function destroy(Post $post)\n {\n $comments = $post->comments;\n foreach ($comments as $comment) {\n $comment->delete();\n }\n $old_file = public_path() . '/documents/' . $post->user_id . '_' . $post->subject_id . '_' . $post->doc_original_name;\n unlink($old_file);\n $post->delete();\n return redirect('/posts')->with('success', 'Bài viết của bạn đã được xóa thành công!');;\n }", "title": "" }, { "docid": "7d894ac1f36dfeb781e31a56f13c2593", "score": "0.60731477", "text": "public function deletePost($request){\n\n $post = POST::find($request->get('post_id'));\n\n if($post == null) return false;\n\n $user = Auth::guard('api')->user();\n\n if($user->id == $post->user_id || $user->role == CONSTANT::ROLE_SUPER_ADMIN){\n \n $result = $post->delete();\n\n return $result;\n }\n else return false;\n }", "title": "" }, { "docid": "4f8b28d02147381477cd2d2e59664bb0", "score": "0.60677785", "text": "public function destroy(Post $post)\n {\n $post->delete();\n\n return redirect($this->base)->with('success', 'Post deleted!');\n }", "title": "" }, { "docid": "56bef5908d7b2a194ec54a47fe94427b", "score": "0.60666645", "text": "public function deletePost()\n\t{\n\t\tif ($this->post_id !== \"\")\n\t\t{\t\t\n\t\t\tmysql_query(\"DELETE FROM `posts` WHERE `post_id` = \\\"{$this->post_id}\\\"\");\n\t\t}\n\t\t//\n\t}", "title": "" }, { "docid": "c55ccc11161677a38aa64319ae01235e", "score": "0.60649234", "text": "public function destroy(Post $post)\n {\n return $this->postService->delete($post);\n }", "title": "" }, { "docid": "20f432e97fa9c69574f95f26fc7279a2", "score": "0.60589933", "text": "public function destroy(Post $post)\n {\n $user = Auth::user();\n \n if ($user->can('delete', $post)) {\n $post->tags()->detach();\n $post->delete();\n return redirect()->route('posts.index')->with('success','Post deleted successfully');\n } else {\n return redirect()->route('posts.index')->with('warning','Пользователь '.$user->name.' не может удалять статью...');\n }\n \n // if (Gate::forUser($user)->denies('destroy-post', $post)) {\n // // Пользователь не может удалять статью...\n // // dd('Пользователь '.$user->name.' не может удалять статью...');\n // return redirect()->route('posts.index')->with('warning','Пользователь '.$user->name.' не может удалять статью...');\n // } else {\n // $post->tags()->detach();\n // $post->delete();\n // return redirect()->route('posts.index')->with('type','success')->with('message','Post deleted successfully');\n // }\n }", "title": "" }, { "docid": "c2c4508ae551fcaac2fe27bf7b6b2d64", "score": "0.60509783", "text": "public function destroy(Post $post)\n {\n $post -> delete();\n\n\n return redirect() -> route('posts.index');\n }", "title": "" }, { "docid": "b3bbfe2ad29aa7b917344d5a821de3cc", "score": "0.6047465", "text": "public function destroy(Post $post)\n {\n $post->delete();\n return redirect()->route('admin.posts.index'); \n }", "title": "" }, { "docid": "8dcbccf4d4de3e72ab2f654288ce66fd", "score": "0.6045926", "text": "public function index($post, Request $request, Dispatcher $dispatcher)\n {\n // it must be like that. only if reason has been chosen, we need to validate it.\n if ($request->get('reason')) {\n $this->validate($request, ['reason' => 'int|exists:forum_reasons,id']);\n }\n\n // Step 1. Get post category\n $forum = &$post->forum;\n\n // Step 2. Does user really have permission to delete this post? Maybe topic or forum is locked\n $this->authorize('delete', [$post]);\n\n // Step 3. Maybe user does not have an access to this category?\n $this->authorize('access', [$forum]);\n\n $topic = &$post->topic;\n\n $this->transaction(function () use ($post, $topic, $forum, $request, $dispatcher) {\n $url = UrlBuilder::topic($topic);\n\n $reason = new Reason();\n\n if ($request->get('reason')) {\n $reason = Reason::find($request->get('reason'));\n }\n\n // if this is the first post in topic... we must delete whole thread\n if ($post->id === $topic->first_post_id) {\n $subscribers = $topic->subscribers()->with('user')->get()->pluck('user');\n\n if ($post->user_id !== null) {\n $subscribers = $subscribers->push($post->user)->unique('id'); // add post's author to notification subscribers\n }\n\n $topic->delete();\n\n $dispatcher->send(\n $subscribers->exceptUser($this->auth),\n (new TopicDeletedNotification($this->auth, $topic))\n ->setReasonText($reason->description)\n ->setReasonName($reason->name)\n );\n\n // fire the event. it can be used to delete row from \"pages\" table or from search index\n event(new TopicDeleted($topic));\n\n $object = (new Stream_Topic())->map($topic);\n $target = (new Stream_Forum())->map($forum);\n } else {\n $subscribers = $post->subscribers()->with('user')->get()->pluck('user');\n\n if ($post->user_id !== null) {\n $subscribers = $subscribers->push($post->user)->unique('id');\n }\n\n $post->deleteWithReason($this->userId, $reason->name);\n\n $dispatcher->send(\n $subscribers->exceptUser($this->auth),\n (new PostDeletedNotification($this->auth, $post))\n ->setReasonName($reason->name)\n ->setReasonText($reason->description)\n );\n\n $url .= '?p=' . $post->id . '#id' . $post->id;\n\n // fire the event. delete from search index\n event(new PostWasDeleted($post));\n\n $object = (new Stream_Post(['url' => $url]))->map($post);\n $target = (new Stream_Topic())->map($topic);\n }\n\n if (!empty($reason)) {\n $object->reasonName = $reason->name;\n }\n\n stream(Stream_Delete::class, $object, $target);\n });\n }", "title": "" }, { "docid": "6cbbafcbcfe88d6b73a907888d0693a8", "score": "0.6044132", "text": "public function destroy(Post $post)\n {\n //\n $post->delete();\n \n return redirect()->route('posts.index')\n ->with('success','l article c est éffacé avec succé');\n }", "title": "" }, { "docid": "05ede8c44de442294f3c8ed1e551054b", "score": "0.60440457", "text": "public function deletePost($id);", "title": "" }, { "docid": "6a3841947c24098dfd2d18f2d3924070", "score": "0.6028569", "text": "public function destroy(Post $post)\n {\n $this->authorize('delete',$post);\n $post->delete();\n return redirect()->back()->with('success','删除成功!');\n }", "title": "" }, { "docid": "9612a677c1327793253dee43fa9dc236", "score": "0.6028198", "text": "public function destroy(Post $post)\n {\n// sudah di alihkan menggunakan postpolicy\n// if(!$post->ownedBy(auth()->user())){\n// dd('no');\n// }\n// dd($post);\n\n// menggunakan postpolicy\n $this->authorize('delete', $post);\n $post->delete();\n return back();\n }", "title": "" }, { "docid": "6ce3609998842b5f7a9e33da6604b698", "score": "0.6027533", "text": "public function destroy(Post $post)\n {\n $post = Post::find($post->id);\n if(auth()->user()->id != $post->user_id){\n return redirect('dashboard')->with('danger', 'Access Denied');\n }\n\n if($post->cover_image != 'noimage.jpg'){\n Storage::delete('public/cover_images/'.$post->cover_image);\n }\n $post->delete();\n return redirect('/dashboard')->with('success', \"Post Deleted\");\n }", "title": "" }, { "docid": "ac7a7d55fd6fbac4947a0aca4dfd3be4", "score": "0.60218716", "text": "public function destroy(post $post)\n {\n //\n }", "title": "" }, { "docid": "ac7a7d55fd6fbac4947a0aca4dfd3be4", "score": "0.60218716", "text": "public function destroy(post $post)\n {\n //\n }", "title": "" }, { "docid": "ac7a7d55fd6fbac4947a0aca4dfd3be4", "score": "0.60218716", "text": "public function destroy(post $post)\n {\n //\n }", "title": "" }, { "docid": "13ef93ba76ccad8d13f1f191919c513b", "score": "0.6018139", "text": "public function destroy(Post $post)\n {\n $post->delete();\n\n return redirect()->route('larablog.backend.posts.index');\n }", "title": "" }, { "docid": "75ee4857a223ba2453a0eadeedc5f7f8", "score": "0.60166067", "text": "public function delete($id){\n $post = $this->postModel->getPost($id);\n\n // Check for owner -- If not owner redirect...\n if ($post->user_id != $_SESSION['user_id']) {\n redirect ('posts');\n } \n // Delete should always be a POST request\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n if ($this->postModel->deletePost($id)) :\n flash('post_message', 'Post Deleted');\n redirect('posts'); \n endif;\n } else { // Just a GET request\n die ('Something went wrong: Posts.php Line 180');\n }\n \n }", "title": "" }, { "docid": "adcb5934ae9236efd221e688dae63d97", "score": "0.6014084", "text": "public function destroy(Post $post, Request $request){\n $post->delete();\n flash('Статья удалена')->success();\n return redirect('/admin/posts');\n }", "title": "" }, { "docid": "14e5eeb03f7624f2b1479308b7ff66a7", "score": "0.60113525", "text": "public function destroy(Post $post)\n {\n Gate::authorize('forceDelete', $post);\n $post->forceDelete();\n return redirect(route('home'));\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "5b57345dd5aac8d6d822a49aedd94e71", "score": "0.60079974", "text": "public function destroy(Post $post)\n {\n //\n }", "title": "" }, { "docid": "99416a2f6d1fb77328a9748b6ca02609", "score": "0.6006083", "text": "public function destroy(Post $post)\n {\n // dd($post);\n $post->delete();\n return redirect()->route('admin.posts.index');\n }", "title": "" }, { "docid": "57aa45c7a4b94e951afd24f194c166a9", "score": "0.600348", "text": "public function destroy(post $post)\n {\n $post->delete();\n return redirect('admin/post')->with('success', 'The Post Has Been Successfully Deleted');\n }", "title": "" }, { "docid": "3f653fb6c08e24902461d32977530f3b", "score": "0.6001501", "text": "public function destroy(Post $post)\n {\n $post->delete();\n return redirect()->route('posts.index')->with('success', 'Статья удалена');\n }", "title": "" }, { "docid": "d4345f5e2f73f689c8e96b9bc470e9a4", "score": "0.6000933", "text": "public function destroy(Post $post)\n {\n $post->delete();\n return redirect()->route('posts.index')\n ->with('success','Post deleted successfully');\n }", "title": "" }, { "docid": "1a55aab71550da452d36431ed76b39f3", "score": "0.5999453", "text": "public function destroy(Post $post, Request $request){\n // check if user authorized to delete this post\n $this->authorize('delete', $post);\n\n // delete this post\n $post->delete();\n\n // set flash message\n $request->session()->flash('message', 'Post was deleted');\n\n // return to the pervious route\n return back();\n }", "title": "" }, { "docid": "a64998aceb62b1bbf92e5e1948ce9923", "score": "0.5998734", "text": "public function deletePost()\n {\n $id = isset($_GET['id']) ? $_GET['id'] : null;\n\n if(!$id || 0 >= $id)\n {\n header(\"Location: index.php?route=admin\");\n } else {\n $postManager = new PostManager();\n $postManager->deletePost($id);\n header('Location: index.php?route=posts');\n }\n }", "title": "" }, { "docid": "1e70ea077a39b56a69a8eb4c2536a65f", "score": "0.5997769", "text": "public function destroy(Post $post)\n { \n\n $postStatus = $post->delete();\n\n if($postStatus)\n {\n \\Session::flash('flash_message_destroyed', 'Tu post ha sido borrado');\n \n return redirect('posts');\n }\n\n \\Session::flash('flash_message_destroyFailed', 'Tu post no ha podido ser eliminado');\n\n return redirect('posts');\n }", "title": "" }, { "docid": "f8ecc8ffecf69a52f8bca548bfcbbb05", "score": "0.59953797", "text": "public function delete() {\r\n $post = Post::find($_GET['id']);\r\n $db = Db::getInstance();\r\n $query = $db->prepare(\"DELETE FROM posts WHERE id = ?\");\r\n $query->bindParam(1, $post->id);\r\n $query->execute();\r\n }", "title": "" }, { "docid": "92b85467dcaf3de9542db6c4de953094", "score": "0.59875095", "text": "public function destroy(Post $post){\n $this->authorize('delete', $post); // this the permission method, \n // where other is are not allowed to delete the someones else psots\n // php artisan make: Policy PostPolicy, is our policy name\n $post->delete();\n return back();\n }", "title": "" }, { "docid": "5b47ff1b9adb42f5a6ad3b3b7a09f217", "score": "0.5973139", "text": "public function destroy(Post $post)\n {\n }", "title": "" }, { "docid": "d8198dbc0249043cf2f38df7201aeaac", "score": "0.59672123", "text": "public function destroy(Post $post)\n {\n $post->delete();\n return redirect('/')\n ->with('message', 'Post wurde gelöscht!');\n }", "title": "" }, { "docid": "1a47a4627a0c0e725fe07524a0ada18c", "score": "0.59601974", "text": "public function destroy(Post $post)\n {\n $post->delete();\n return redirect()->route('admin.posts.index')->with('success', 'Post destroyed successfully');\n }", "title": "" }, { "docid": "c913bd6915529cfa5f9ca93d3b4a00a0", "score": "0.59521645", "text": "public function destroy(Post $post)\n {\n $post->delete();\n\n return redirect(route('posts.index'));\n }", "title": "" }, { "docid": "c451a52295b6202597a8c43b121ffb8f", "score": "0.59486157", "text": "public function destroy(Post $post)\n {\n Mail::to($post->user->email)->send(new SendMailEliminated($post));\n\n $post->delete();\n\n return redirect()->route('admin.posts.index');\n }", "title": "" }, { "docid": "2c80298804b7c148325c7c5c8ed3bae7", "score": "0.5947925", "text": "public function delete_post($postID)\n\t{\t \n\t\t$this->session->set_userdata('refered_from', $_SERVER['HTTP_REFERER']);\n\t\t\n\t\t// Check and see if the user is logged in\n\t\tif(!$this->ion_auth->logged_in())\n\t\t{\n\t\t\t// User is not logged in, redirect\n\t\t\t$this->session->set_flashdata('error', $this->lang->line('errorLoginRequired'));\n\t\t\tredirect($this->session->userdata('refered_from'));\n\t\t}\n\t\telse\n\t\t{\n //The user is a admin and logged in, remove the post \n\t\t\t$this->db->where('CommentID', $postID);\n\t\t\t$this->db->delete('comments');\n\t\t\t\t\n\t\t\tif($this->db->affected_rows() >= 1)\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('message', $this->lang->line('messagePostDeleted'));\n\t\t\t\tredirect($this->session->userdata('refered_from'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('error', $this->lang->line('errorPostDeleteFailed'));\n\t\t\t\tredirect($this->session->userdata('refered_from'));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "27aa4191852de6c3b7796a543c756b7c", "score": "0.59465283", "text": "public function destroy(Post $post)\n {\n $currentUser = Auth::user();\n if($post->user_id == $currentUser->id) {\n $post->delete();\n }\n\n return redirect(route('posts.index'));\n }", "title": "" }, { "docid": "fdcdfdec2d3dd6121ba2d8de72e40aaf", "score": "0.5943301", "text": "public function destroy(Post $post)\n {\n $post->delete();\n return redirect()->route('posts.index');\n }", "title": "" } ]
a1da8899276761f3b1c4eb6c3a869778
Finds user by password reset token
[ { "docid": "4e2d940f267a761e728932793ea47466", "score": "0.65363836", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne(\n [\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]\n );\n }", "title": "" } ]
[ { "docid": "1cbe78966a18f33bda54259f96597e6a", "score": "0.82472956", "text": "public static function findForPasswordReset($token)\n {\n $hashed_token = sha1($token);\n\n try {\n\n $db = Database::getInstance();\n\n $stmt = $db->prepare('SELECT * FROM users WHERE password_reset_token = :token LIMIT 1');\n $stmt->execute([':token' => $hashed_token]);\n $user = $stmt->fetchObject('User');\n\n if ($user !== false) {\n\n // Check the token hasn't expired\n $expiry = DateTime::createFromFormat('Y-m-d H:i:s', $user->password_reset_expires_at);\n\n if ($expiry !== false) {\n if ($expiry->getTimestamp() > time()) {\n return $user;\n }\n }\n }\n\n } catch (PDOException $exception) {\n\n error_log($exception->getMessage());\n }\n }", "title": "" }, { "docid": "b6e29470a308b9769c2978a053286c81", "score": "0.79322934", "text": "public static function findByPasswordResetToken($token)\n {\n\n $token = new Token($token); // create a token object based on existing token value\n $token_hash = $token->getTokenHash(); // and get its hash\n\n $sql = 'SELECT * FROM ' . static::$db_table . ' WHERE password_reset_hash = :token_hash';\n $db = static::getDB();\n\n $statement = $db->prepare($sql);\n $statement->bindValue(':token_hash', $token_hash, PDO::PARAM_STR);\n $statement->setFetchMode(PDO::FETCH_CLASS, get_called_class());\n\n $statement->execute();\n\n $user = $statement->fetch(); // only this fetch() function returns object, not execute()\n\n // here we check whether token expired or not\n if ($user) {\n if (strtotime($user->password_reset_expiry) > time()) {\n return $user; // return user model only if token hasn't expired\n } else {\n Flash::addMessage('Sorry, but your link has expired', Flash::DANGER);\n }\n }\n }", "title": "" }, { "docid": "865100a4f857b6201a29286cec303802", "score": "0.7428905", "text": "public static function findByToken($token)\n {\n return static::findOne([static::tableName().'.password_reset_token'=>$token,static::tableName().'.status'=>static::ACTIVE]);\n }", "title": "" }, { "docid": "0606d7815e0358cfc3cce34322b31df8", "score": "0.7326853", "text": "public function findByResetToken($token);", "title": "" }, { "docid": "07fbc9ebab344b00182295f8ccf15234", "score": "0.7157826", "text": "public static function findByPasswordResetToken($token)\n {\n $expire = Yii::$app->params['user.passwordResetTokenExpire'];\n $parts = explode('_', $token);\n $timestamp = (int)end($parts);\n if ($timestamp + $expire < time()) {\n // token expired\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n //'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "f9490485529d1ffef0eedd2adc123a38", "score": "0.7103383", "text": "public static function findByPasswordResetToken($token)\n\t{\n\t\t$expire = Yii::$app->params['user.passwordResetTokenExpire'];\n\t\t$parts = explode('_', $token);\n\t\t$timestamp = (int) end($parts);\n\t\tif ($timestamp + $expire < time()) {\n\t\t// token expired\n\t\t\treturn null;\n\t\t}\n\t\treturn static::findOne([\n\t\t\t'password_reset_token' => $token,\n\t\t\t'status_id' => self::STATUS_ACTIVE,\n\t\t]);\n\t}", "title": "" }, { "docid": "ef4bc04b7841be5581f9558f7af6d887", "score": "0.70855", "text": "public function getUserByResetPasswordToken($token)\n {\n return false;\n }", "title": "" }, { "docid": "fe5f824e98f608e9a10131b790b0eee9", "score": "0.70615494", "text": "public static function findByPasswordResetToken($token) {\n return static::findOne([\n 'email_validation_token' => $token,\n 'status' => 1,\n ]);\n }", "title": "" }, { "docid": "26155f2d7b20df5c2dea0781d34e66de", "score": "0.6963976", "text": "public function findUserByToken($token)\n {\n $qb = $this->createQueryBuilder('user')\n ->where('user.passwordResetToken=:token');\n\n $query = $qb->getQuery();\n $query->setParameter('token', $token);\n\n return $query->getSingleResult();\n }", "title": "" }, { "docid": "8daf67fc700019d66671f5354468a5c2", "score": "0.68936694", "text": "public static function findByPasswordResetToken($token){\n if (!static::isPasswordResetTokenValid($token)){\n return null;\n }\n \n return static::findOne([\n 'password_reset_token' => $token,\n 'status' =>self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "bda4e8dc99e5b898708ffc85dc32cea9", "score": "0.6868948", "text": "public static function findByPasswordResetToken($token)\n {\n $expire = \\Yii::$app->params['user.passwordResetTokenExpire'];\n $parts = explode('_', $token);\n $timestamp = (int) end($parts);\n if ($timestamp + $expire < time()) {\n // token expired\n return null;\n }\n return static::findOne([\n 'password_reset_token' => $token\n ]);\n }", "title": "" }, { "docid": "2861840c5b36caf30b6168fa04d4d0f4", "score": "0.68272203", "text": "public static function findByPasswordResetToken($token)\n {\n $expire = Yii::$app->params['user.passwordResetTokenExpire'];\n $parts = explode('_', $token);\n $timestamp = (int) end($parts);\n if ($timestamp + $expire < time()) {\n // token expired\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "afe4a62f9692ba24a8639b6aea974052", "score": "0.68125683", "text": "public static function findByPasswordResetToken($token) {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'actived' => Constant::ACTIVE,\n ]);\n }", "title": "" }, { "docid": "c41a20da7e53be7718cf164672b2e0d7", "score": "0.68024266", "text": "public static function findByPasswordResetToken($token)\n {\n $expire = \\Yii::$app->params['user.passwordResetTokenExpire'];\n $parts = explode('_', $token);\n $timestamp = (int) end($parts);\n if ($timestamp + $expire < time()) {\n // token expired\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token\n ]);\n }", "title": "" }, { "docid": "c41a20da7e53be7718cf164672b2e0d7", "score": "0.68024266", "text": "public static function findByPasswordResetToken($token)\n {\n $expire = \\Yii::$app->params['user.passwordResetTokenExpire'];\n $parts = explode('_', $token);\n $timestamp = (int) end($parts);\n if ($timestamp + $expire < time()) {\n // token expired\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token\n ]);\n }", "title": "" }, { "docid": "e5f70d15d85e6cffaa68d587d4a4641f", "score": "0.6784902", "text": "public static function findByPasswordResetToken($token)\n {\n $expire = \\Yii::$app->params['user.passwordResetTokenExpire'];\n $parts = explode('_', $token);\n $timestamp = (int) end($parts);\n if ($timestamp + $expire < time()) {\n // token expired\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "fc00542e03367740a0bc521e04e74f05", "score": "0.6782333", "text": "public static function findByRememberToken($token)\n {\n try {\n $dbconn = Database::getInstance();\n $stmt = $dbconn->prepare('SELECT u.* FROM users u JOIN remembered_logins r ON u.id=r.user_id WHERE token = :token');\n $stmt->execute(array(':token' => $token));\n $user = $stmt->fetchObject('User');\n\n if ($user !== false) {\n return $user;\n }\n } catch (PDOException $e) {\n error_log($e-getMessage());\n }\n }", "title": "" }, { "docid": "6de98a9cdb86683461433f6aa7fae332", "score": "0.67822176", "text": "function getByResetToken($resetToken)\n {\n $this->db->where('resetToken', $resetToken);\n $query = $this->db->get('gebruiker');\n return $query->row();\n }", "title": "" }, { "docid": "ff138f73f3b4bbdcac8e2d6ab18c5c08", "score": "0.67739207", "text": "public function findUserByConfirmationToken($token);", "title": "" }, { "docid": "a280803f5e3271aafab5fed2968f8125", "score": "0.6741084", "text": "public function find_from_reset_password($email, $token)\n {\n $conditions = [\n 'where' => [\n 'token' => !(null),\n 'token' => $token,\n 'deleted' => !1,\n 'email' => $email\n ],\n 'return_mode' => 'class',\n 'return_type' => 'single'\n ];\n $row = $this->getAllItem($conditions);\n return $row;\n }", "title": "" }, { "docid": "bfc3b1d0ed4b7d2535db14dcece3848f", "score": "0.67304313", "text": "public function exists(CanResetPasswordContract $user, $token);", "title": "" }, { "docid": "589208d3033bfb3cfa2f31ee304be118", "score": "0.6714323", "text": "public static function findByPasswordResetToken($token) {\r\n if (!static::isPasswordResetTokenValid($token)) {\r\n return null;\r\n }\r\n\r\n return static::findOne([\r\n 'password_reset_token' => $token,\r\n 'status' => self::STATUS_ACTIVE,\r\n ]);\r\n }", "title": "" }, { "docid": "4cf28f197bb347f724711a00a9eb8cf8", "score": "0.67075485", "text": "public function get_user_by_reset_key(string $reset_key) {\n $query = $this->db->where('reset',$reset_key)->get('user');\n if ($query->num_rows()===0)\n return null;\n else {\n $row = $query->row();\n if (time()-$row->reset_time > 48*3600) // Reset key has expired\n return null;\n return $row;\n }\n }", "title": "" }, { "docid": "01790913c58a26c1569e0b37f3835d98", "score": "0.66535234", "text": "public function find($token)\n {\n $passwordReset = ModelsPasswordReset::Where('token', $token)\n ->first();\n if (!$passwordReset)\n return response()->json([\n 'message' => 'Este token de restablecimiento de contraseña no es válido.'\n ], 404);\n if (Carbon::parse($passwordReset->updated_at)->addMinutes(720)->isPast()) {\n $passwordReset->delete();\n return response()->json([\n 'message' => 'Este token de restablecimiento de contraseña no es válido.'\n ], 404);\n }\n \n return response()->json($passwordReset);\n }", "title": "" }, { "docid": "6606f600f74f9836dcb928068a8ebc3d", "score": "0.6644064", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n return static::findOne([\n 'password_reset_token' => $token,\n ]);\n }", "title": "" }, { "docid": "ab8e584e4a00e5bc455d580cf0abd3b5", "score": "0.6633808", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n return static::findOne(\n [\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]\n );\n }", "title": "" }, { "docid": "3008cae468c46befe823b2580d2ab5f7", "score": "0.6602545", "text": "public function getResetToken(String $token)\n {\n $sql = \"SELECT * FROM `reset_password_token` WHERE token = '$token'\";\n return $this->dbConnect()->query($sql)->fetch();\n }", "title": "" }, { "docid": "11aaf611a9959284ec315c93243880c8", "score": "0.65809155", "text": "public function findByRememberToken($token);", "title": "" }, { "docid": "2d88fbd56014281b804e8df592eec7fc", "score": "0.65627116", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => [self::STATUS_NOT_ACTIVATED, self::STATUS_ACTIVATED],\n ]);\n }", "title": "" }, { "docid": "ac07e3b70bb3d94a19a216ec4059461a", "score": "0.65593404", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token\n ]);\n }", "title": "" }, { "docid": "1cf1f31db16f37d7d09e0f31ab43a2e2", "score": "0.6558046", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "43e88de0052e4ba326f46473af863b74", "score": "0.6553618", "text": "public function testCanFindValidForgetPasswordToken()\n {\n $user = $this->userService->findUserByForgetPasswordToken('token_1');\n\n Assert::assertInstanceOf(User::class, $user);\n Assert::assertEquals('[email protected]', $user->getEmail());\n }", "title": "" }, { "docid": "e0b134c27ad6ffbf7ca37b8df7b30f3c", "score": "0.65444195", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n return static::find()->andWhere(['password_reset_token' => $token ])->notDeleted()->one();\n }", "title": "" }, { "docid": "faf321231cb5835ccb8be74e9f9f4331", "score": "0.65384585", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::find()->where([\n 'and',\n ['password_reset_token' => $token],\n ['in', 'status', [self::STATUS_ACTIVE, self::STATUS_NEW]]\n ])->one();\n }", "title": "" }, { "docid": "7efc674a642fa20ac1c5bda560934618", "score": "0.6534616", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n ]);\n }", "title": "" }, { "docid": "7efc674a642fa20ac1c5bda560934618", "score": "0.6534616", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n ]);\n }", "title": "" }, { "docid": "e4857851e6d7ffc84d09f2eef2fee9c9", "score": "0.65150094", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n return static::findOne([\n 'passwordResetToken' => $token,\n 'estado_id' => self::ESTADO_ACTIVO,\n ]);\n }", "title": "" }, { "docid": "d6e750186de8b20a115b7f1822cf2283", "score": "0.64986235", "text": "public static function findByPasswordResetToken($token): ?User {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne(['password_reset_token' => $token, 'status' => self::STATUS_ACTIVE]);\n }", "title": "" }, { "docid": "1f0f923e8a5d96a846af470bad9c0107", "score": "0.6498411", "text": "public function find($token)\n {\n try {\n $passwordReset = PasswordReset::where('token', $token)\n ->first();\n\n if (!$passwordReset) {\n $toLogs = [\n \"class\" => \"AuthController\",\n \"message\" => trans('auth.password_reset.token.404'),\n \"module\" => \"API_ERROR\",\n \"status_code\" => 404,\n ];\n monitorLog('monitor_api', 'error', $toLogs);\n\n return response()->json([\n 'status' => false,\n 'status_code' => 404,\n 'message' => trans('auth.password_reset.token.404'),\n ], 404);\n }\n\n if (User::where('email', $passwordReset->email)->first()->status == 0) {\n $toLogs = [\n \"class\" => \"AuthController\",\n \"message\" => trans('auth.login.451'),\n \"module\" => \"API_ERROR\",\n \"status_code\" => 451,\n ];\n monitorLog('monitor_api', 'error', $toLogs);\n\n return response()->json([\n 'status' => false,\n 'status_code' => 451,\n 'message' => trans('auth.login.451')\n ], 451);\n }\n\n if (Carbon::parse($passwordReset->updated_at)->addMinutes(30)->isPast()) {\n $passwordReset->delete();\n\n $toLogs = [\n \"class\" => \"AuthController\",\n \"message\" => trans('auth.password_reset.token.404'),\n \"module\" => \"API_ERROR\",\n \"status_code\" => 404,\n ];\n monitorLog('monitor_api', 'error', $toLogs);\n\n return response()->json([\n 'status' => false,\n 'status_code' => 404,\n 'message' => trans('auth.password_reset.token.404'),\n ], 404);\n }\n\n return response()->json([\n 'status' => true,\n 'status_code' => 200,\n 'message' => $passwordReset,\n ], 200);\n } catch (Exception $e) {\n $toLogs = [\n \"class\" => \"AuthController\",\n \"message\" => \"Line \" . $e->getLine() . \" | \" . $e->getMessage(),\n \"module\" => \"API_ERROR\",\n \"status_code\" => $e->getCode(),\n ];\n monitorLog('monitor_api', 'error', $toLogs);\n }\n }", "title": "" }, { "docid": "0ba3a0d8777999f2615ed468fea22255", "score": "0.6487359", "text": "public static function findUserByToken($token){\n\n $token = new Token($token); // first generate a new token object using existing token value from url\n $token_hash = $token->getTokenHash();\n\n $sql = 'SELECT * FROM ' . static::$db_table . ' WHERE activation_hash = :token_hash';\n $db = static::getDB();\n\n $stm = $db->prepare($sql);\n $stm->bindValue(':token_hash', $token_hash, PDO::PARAM_STR);\n $stm->setFetchMode(PDO::FETCH_CLASS, get_called_class());\n\n $stm->execute();\n\n return $stm->fetch();\n\n }", "title": "" }, { "docid": "b4994d588c2cf9bd6634b2f33a99163b", "score": "0.64539355", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "b4994d588c2cf9bd6634b2f33a99163b", "score": "0.64539355", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "b4994d588c2cf9bd6634b2f33a99163b", "score": "0.64539355", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "b4994d588c2cf9bd6634b2f33a99163b", "score": "0.64539355", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "b4994d588c2cf9bd6634b2f33a99163b", "score": "0.64539355", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "b4994d588c2cf9bd6634b2f33a99163b", "score": "0.64539355", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "b4994d588c2cf9bd6634b2f33a99163b", "score": "0.64539355", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "b4994d588c2cf9bd6634b2f33a99163b", "score": "0.64539355", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "b4994d588c2cf9bd6634b2f33a99163b", "score": "0.64539355", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "b4994d588c2cf9bd6634b2f33a99163b", "score": "0.64539355", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "b4994d588c2cf9bd6634b2f33a99163b", "score": "0.64539355", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "b4994d588c2cf9bd6634b2f33a99163b", "score": "0.64539355", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "b4994d588c2cf9bd6634b2f33a99163b", "score": "0.64539355", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "b4994d588c2cf9bd6634b2f33a99163b", "score": "0.64539355", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "b4994d588c2cf9bd6634b2f33a99163b", "score": "0.64539355", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "b4994d588c2cf9bd6634b2f33a99163b", "score": "0.64539355", "text": "public static function findByPasswordResetToken($token)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "38ab4fff837cd79d702bd746675a3099", "score": "0.6435975", "text": "public function checkToken($token)\n {\n $user = user::where('remember_token',$token);\n if($user!=null)\n return $user;\n }", "title": "" }, { "docid": "74f156ead0045da832da259737109e61", "score": "0.6408821", "text": "public function checkToken($token)\n {\n return User::where(['verify_token' => $token])->first();\n }", "title": "" }, { "docid": "74d1f4007f20020f6d847977c754cadc", "score": "0.6393363", "text": "public function findByPasswordResetToken(string $tokenHash = null): ?Object\n {\n $token = new Token($tokenHash);\n $_tokenHash = $token->getHash();\n $findBy = $this->getRepo()->findObjectBy(['password_reset_hash' => $_tokenHash], ['*']);\n if (null !== $findBy) {\n if (strtotime($findBy->password_reset_expires_at) > time()) {\n return $findBy;\n }\n }\n return null;\n }", "title": "" }, { "docid": "d5eeadb6594574bf8db6321aae75cc42", "score": "0.6365384", "text": "public function findUserIdByToken($token);", "title": "" }, { "docid": "e45a842e481ffc74f36c9b5985a6839f", "score": "0.6330877", "text": "public function getTokenByToken($token){\n return Db::getOne(\"\n SELECT *\n FROM password_recovery\n WHERE token = ?\",\n array($token));\n }", "title": "" }, { "docid": "19bf4b060c24a8d92e230dbacd9454d8", "score": "0.62741566", "text": "public function findFromEmail($email) {\n return PasswordReset::where('email', $email)->first();\n }", "title": "" }, { "docid": "32abdf06b23e1894b2ecba28078793f6", "score": "0.62456524", "text": "public function getByEmailAndResetToken(string $email, string $token)\n {\n $user = $this->model->where('email', $email)->where('reset_password', $token)->first();\n\n return $this->returnUserInstanceOrNull($user);\n }", "title": "" }, { "docid": "36be6939b1d14cb1e2c4523ed1c5b86b", "score": "0.6194505", "text": "public static function findByToken($token)\n\t{\n\t\t$token = new Token($token);\n\t\t$token_hash = $token->getHash();\n\t\t\n\t\t$sql = \"SELECT * FROM remembered_logins WHERE token_hash = :token_hash\";\n\t\t\n\t\t$db = static::getDB();\n\t\t\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bindValue(':token_hash', $token_hash, PDO::PARAM_STR);\n\t\t\n\t\t$stmt->setFetchMode(PDO::FETCH_CLASS, get_called_class());\n\t\t\n\t\t$stmt->execute();\n\t\treturn $stmt->fetch();\n\t}", "title": "" }, { "docid": "439bcbcfebd6d3c5a69b7a1e55828e81", "score": "0.61832273", "text": "public function getResetPassword($id = 0, $user = 0);", "title": "" }, { "docid": "d61e5b9cc9ec1c3be0daa704e5511cde", "score": "0.6183019", "text": "public static function findByToken($token) {\n $token = new Token($token);\n $token_hash = $token->getHash();\n\n $sql = \"SELECT * FROM remembered_logins WHERE token_hash = :token_hash\";\n\n $db = static::getDB();\n\n $stmt = $db->prepare($sql);\n $stmt->bindValue(\"token_hash\", $token_hash, PDO::PARAM_STR);\n $stmt->setFetchMode(PDO::FETCH_CLASS, get_called_class());\n $stmt->execute();\n\n return $stmt->fetch();\n }", "title": "" }, { "docid": "35e2aaaf95e5f5cd9cde194f28e0fd7c", "score": "0.61525065", "text": "function searchEmailByUnExpiredToken($userIn,$tokenIn){\n\t\t$conn = mySqlConnection('localhost', $_SERVER['DB_USER'], $_SERVER['DB_PASSWORD'], $_SERVER['DB_COMMON']);\t\n\t\t//Can resend every 30 minutes\n\t\t$stmt = mysqli_prepare($conn,\"SELECT `email` FROM `verification` WHERE (STRCMP(`username`,?)=0) AND TIMESTAMPDIFF(HOUR,`date`,NOW())<=24 AND STRCMP(`verificationtoken`,?)=0\");\n\t\tmysqli_stmt_bind_param ($stmt,\"ss\",$username,$token);\n\t\t$username = $userIn;\n\t\t$token = $tokenIn;\n\t\tmysqli_stmt_execute($stmt);\n\t\t//mysqli_stmt_store_result($stmt);\n\t\t//$num = mysqli_stmt_num_rows($stmt);\t\n\t\t//return $num;\n\t\t\n\t\t//Get only the first\n\t\tmysqli_stmt_bind_result($stmt,$email);\n\t\tmysqli_stmt_fetch($stmt);\n\t\treturn $email;\n}", "title": "" }, { "docid": "a87cd405dc1028933650ece237d6493d", "score": "0.6128062", "text": "public function checkToken(Request $request)\n {\n $this->validate($request, [\n 'token' => 'required|exists:password_resets,token',\n ]);\n if (DB::table('password_resets')->where('token', $request->input('token'))->first())\n return response([\n 'status' => true,\n 'email' => DB::table('password_resets')->where('token', $request->input('token'))->first()->email\n ]);\n else\n return response(['status' => false]);\n\n }", "title": "" }, { "docid": "d9116500a52304d596273765c8afaa0b", "score": "0.6127515", "text": "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = User::findByPasswordResetToken($this->token);\n }\n return $this->_user;\n }", "title": "" }, { "docid": "effff1148c5dc3409775c7e53dbddc15", "score": "0.61160785", "text": "public static function findByPasswordResetToken($token, $status = self::STATUS_ACTIVE)\n {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n if ($status == null) {\n return static::findOne(['password_reset_token' => $token]);\n }\n return static::findOne(['password_reset_token' => $token, 'status' => $status]);\n }", "title": "" }, { "docid": "76c1ea7b77dfca2b4aa6a70217a69b9d", "score": "0.6099668", "text": "public function findUserByConfirmationToken($token)\n {\n return $this->userGateway->findByProperty('token', $token);\n }", "title": "" }, { "docid": "b82f2edbfc3197ba48209bb8205c72ad", "score": "0.60778487", "text": "public function retrieveByToken($identifier, $token)\n {\n// $user = $this->getGenericUser(\n// $this->conn->table($this->table)->find($identifier)\n// );\n////\n// return $user && $user->getRememberToken() && hash_equals($user->getRememberToken(), $token)\n// ? $user : null;\n }", "title": "" }, { "docid": "b3b9cc536a2c1d9db3f87d612b618fa6", "score": "0.6069299", "text": "public static function findByPasswordResetToken($key)\n {\n if (!static::isPasswordResetTokenValid($key)) {\n return null;\n }\n return static::findOne([\n 'password_reset_token' => $key,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }", "title": "" }, { "docid": "10460b81e46fb09f13bdd53378f73993", "score": "0.6032993", "text": "public function reset(){\n /*This function takes the user to the Reset Page in case of Forgot Password*/\n $user_email = $_GET['XSRS']; //A KEYWORD USED FOR EMAIL FOR SECURITY PURPOSE\n $token = $_GET['token'];\n $user_email = str_replace(\" \",\"+\",$user_email);\n $decrypted_email = $this->encryption->decrypt($user_email);\n\n $result_array = $this->Register_model->getUserByEmail($decrypted_email);\n if($row = $result_array->row_array()) { //User Exists\n $user_db_token = $row['user_token'];\n $user_db_id = $row['user_id'];\n\n $data = array(\n 'title' => \"Reset Password| NameOfProject\",\n 'page' => \"Reset\",\n 'user_email' => $decrypted_email,\n 'user_token' => $token,\n 'user_db_id' => $user_db_id,\n );\n if($user_db_token === $data['user_token']){ //Wen the token Matches\n $this->load->view('template/header', $data);\n $this->load->view('reset_page', $data);\n $this->load->view('template/footer', $data);\n }else{\n echo \"TOKEN DOESN'T MATCHES\";\n }\n\n }//end of if\n\n }", "title": "" }, { "docid": "c2fec0086daae8175e7888f26f5f636f", "score": "0.6023519", "text": "protected function getUserByToken($token)\n {\n }", "title": "" }, { "docid": "fb253477813a934e6609b1d4b3422610", "score": "0.6002388", "text": "public static function findByToken($token)\n {\n $token = new Token($token);\n $token_hash = $token->getHash();\n $sql = 'SELECT * FROM remember_tokens\n WHERE token_hash = :token_hash';\n $db = static::getDB();\n $stm = $db->prepare($sql);\n $stm->bindValue(':token_hash', $token_hash, PDO::PARAM_STR);\n $stm->setFetchMode(PDO::FETCH_CLASS, get_called_class());\n $stm->execute();\n return $stm->fetch();\n }", "title": "" }, { "docid": "ea26cfd490961391dff7707d29c615a7", "score": "0.59893936", "text": "public function findUserBotAuthToken(string $token)\n {\n return $this->userBotAuthToken()->where('token', $token)->first();\n }", "title": "" }, { "docid": "a96e1cae500f79f22246031dfdadb407", "score": "0.59824204", "text": "function search_user($usuarios, $email, $password) {\r\n foreach ($usuarios as $usuario) {\r\n // Verifica si el email ingresado coincide con la base de datos de usuarios y el password verifica correctamente.\r\n if ($usuario['email1'] === $email && password_verify($password, $usuario['password'])) {\r\n return $usuario;\r\n }\r\n }\r\n // Si no encuentra, retorna falso\r\n return false;\r\n}", "title": "" }, { "docid": "6d42640afe4f468f59b975ed34c58f23", "score": "0.5978188", "text": "public function setPasswordRecoveryToken() {\r\n $token = md5(uniqid(rand()));\r\n $dao = DAOFactory::getDAO('UserDAO');\r\n $dao->updatePasswordToken($this->email, $token . '_' . time());\r\n return $token;\r\n }", "title": "" }, { "docid": "bb4149fb8c44b07f410ac3674f521fd5", "score": "0.5964382", "text": "public function find(Request $request)\n {\n\t\t$input = $request->input();\n $validator = Validator::make($input, ['token' => 'required|string|min:6|max:6']);\n if ($validator->fails()) {\n return response()->json(['success' => false, 'message' => 'Please input the correct verification code.'], 200);\n }\n\n $passwordReset = PasswordReset::where('token', $input['token'])->first();\n if (!$passwordReset) {\n return response()->json(['success' => false, 'message' => 'This password reset token is invalid.'], 200);\n }\n\n return response()->json(['success' => true, 'message' => ''], 200);\n }", "title": "" }, { "docid": "bb9335b72b3a478dedf8f5c05fac17d7", "score": "0.59641266", "text": "public function reset_password(Request $request){\n $token = $request->session()->get('token');\n $user_email = $request->input('email');\n\n //get the token from the DB::\n $get_token = DB::table('password_resets')->where('email', $user_email)->get();\n\n if(!$get_token->isEmpty()){\n foreach($get_token as $code){\n $correct_token = $code->token;\n }\n\n //get the data from the user\n $user_token = $request->input('code');\n\n if($correct_token == $user_token){\n return view('updatePassword', ['user_email'=>$user_email]);\n } else {\n\n return view('inputToken', ['invalid_token'=>\"You entered invalid code!!\", 'user_email'=>$user_email]);\n }\n\n } else{\n return view('inputToken', ['invalid_token'=>\"User does not exist! contact admin for more information!\", 'user_email'=>$user_email]);\n\n }\n \n\n }", "title": "" }, { "docid": "4b7eb94a8e59627ec9ed151a148e43a3", "score": "0.59590006", "text": "private function getResetPasswordToken(string $token): ?ResetPasswordToken\n {\n $selector = substr($token, 0, self::SELECTOR_LENGTH);\n\n return $this->tokenDAO->getOneBySelector($selector);\n }", "title": "" }, { "docid": "c53a07501e028b3195f00b3ea177586b", "score": "0.5950183", "text": "public function findUserByConfirmationToken($token)\n {\n return $this->findUserBy(['confirmationToken' => $token]);\n }", "title": "" }, { "docid": "d945cfbe1bad1b663a0c3bdf27fab7c6", "score": "0.5912644", "text": "public function verifyToken(){\n $email = $_POST['email'];\n $tokenUser = $_POST['token'];\n $password = $_POST['password'];\n if(isset($email) && isset($tokenUser) && isset($password)){\n $user = $this->model->getUser($email);\n if($user){\n $idUser = $user->id_user;\n $token = $this->model->getToken($idUser)->token;\n if($token == $tokenUser){\n $hash = password_hash($password, PASSWORD_DEFAULT);\n $this->model->updatePassword($idUser, $hash);\n $this->view->showFormLogin(\"La contraseña se ha restaurado exitosamente. Ingrese nuevamente\");\n }else{\n $this->view->confirmToken(\"Token inválido\");\n }\n }\n }\n }", "title": "" }, { "docid": "7a16fc799fc3d460026be047cbd9f8d9", "score": "0.59087783", "text": "function updateUserToken($uemail, $utoken) {\n return $this->connection->runPreparedQuery(\"UPDATE users\n SET rem_me_token = ?\n WHERE email = ? \n LIMIT 1\", array($utoken, $uemail));\n }", "title": "" }, { "docid": "37f5a54654e8afd574dbaff1e0aefce5", "score": "0.5900483", "text": "public final function resetPasswordForgottonPassword($data){\n\n //check data\n if(isset($data) && !empty($data)){\n\n //detstructure user data\n $this->email = $data['email'];\n $this->emailAuthToken = $data['emailAuthToken'];\n $this->password = $data['password'];\n $this->updatedAt = $data['timestamp'];\n $this->deletedFlag = 1;\n\n //encrypt password.. bcrypt algorithm\n $this->password = password_hash($this->password, PASSWORD_DEFAULT);\n\n //prepare query\n $stmt = $this->db->prepare(\"UPDATE users, resetpassword SET users.password = :password, users.updatedAt=:updatedAt, users.updatedBy=users.id, resetpassword.updatedBy=users.id, resetpassword.updatedAt=:updatedAt, resetpassword.deletedFlag=:deletedFlag \n WHERE users.email=:email AND resetpassword.email=:email AND resetpassword.token=:emailAuthToken\");\n\n //bind param\n $stmt->bindParam(':email', $this->email);\n $stmt->bindParam(':emailAuthToken', $this->emailAuthToken);\n $stmt->bindParam(':password', $this->password);\n $stmt->bindParam(':updatedAt', $this->updatedAt);\n $stmt->bindParam(':deletedFlag', $this->deletedFlag);\n\n //execute query\n $stmt->execute();\n\n if($stmt->rowCount()){\n return $this->email;\n }\n\n return false;\n }\n }", "title": "" }, { "docid": "08e70c9161998453d5df7b5851c90410", "score": "0.58705944", "text": "public function resetPassword($token, $password)\n {\n // does the token exist, and whose is it?\n $select_sql = \"select user_id from password_reset_tokens \"\n . \"where token = :token\";\n\n $select_stmt = $this->_db->prepare($select_sql);\n $data = [\"token\" => $token];\n\n $response = $select_stmt->execute($data);\n\n if ($response) {\n $row = $select_stmt->fetch(PDO::FETCH_ASSOC);\n\n if ($row && is_array($row)) {\n $user_id = $row['user_id'];\n\n // save the new password\n $update_sql = \"update user set password = :password \"\n . \"where ID = :user_id\";\n\n $update_stmt = $this->_db->prepare($update_sql);\n $update_data = [\n \"password\" => password_hash(md5($password), PASSWORD_DEFAULT),\n \"user_id\" => $user_id\n ];\n $update_response = $update_stmt->execute($update_data);\n\n if ($update_response) {\n // delete all the user's tokens; they don't need them now\n $delete_sql = \"delete from password_reset_tokens \"\n . \"where user_id = :user_id\";\n\n $stmt = $this->_db->prepare($delete_sql);\n $stmt->execute([\"user_id\" => $user_id]);\n\n // all good\n return true;\n }\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "a19db6e4ee46176dfde6621f9b07f3a0", "score": "0.58598155", "text": "function forgotPassword($data){ $user = User::where(\"email\", $data['email'])->first();\n if(!$user){\n return \"NotFoundEmail\";\n }\n //save token in db\n $user->token = $data['token'];\n $user->save();\n return [\n 'token' => $data['token'],\n ];\n }", "title": "" }, { "docid": "a8a69a998120533bbea067aa25a89d99", "score": "0.585638", "text": "public function getResetpassword(Request $request, $token = null)\n { \n return $this->showResetForm($request, $token);\n }", "title": "" }, { "docid": "fff330e3ef5e2b69c812733963cff008", "score": "0.58455944", "text": "public function index(Request $request)\n {\n $token = $request->token;\n $resetPassword = PasswordResets::where('token', $token)->first();\n if ($resetPassword) {\n $person = User::where(\"username\", $resetPassword->username)->first();\n Session()->put('user_id', $person->id);\n Session()->put('token', $token);\n return view('auth.reset');\n } else {\n return redirect()->route('login');\n }\n }", "title": "" }, { "docid": "6c7bebb09a7c19980734ea4b9418ff25", "score": "0.5839538", "text": "public function recentlyCreatedToken(CanResetPasswordContract $user);", "title": "" }, { "docid": "bd3f12b97084d3aabca59afeea9fb822", "score": "0.5838519", "text": "function verify($token_str = null) {\n if ($this->Auth->user()) {\n $this->redirect(array('controller' => 'users', 'action' => 'account'));\n }\n\n $Token = ClassRegistry::init('Token');\n\n $res = $Token->get($token_str);\n if ($res) {\n // Update the users password\n $password = $this->User->generatePassword();\n $this->User->id = $res['User']['id'];\n $this->User->saveField('password', $this->Auth->password($password));\n $this->set('success', true);\n\n // Send email with new password\n $this->Email->to = $res['User']['email'];\n $this->Email->subject = 'Password changed';\n $this->Email->from = '[email protected]';\n $this->Email->template = 'verify';\n $this->set('user', $res);\n $this->set('password', $password);\n $this->Email->send();\n }\n }", "title": "" }, { "docid": "0b4b4bb2504c0525f99ed5f8ce7743c7", "score": "0.5825233", "text": "protected function userFromPasswordToken($credentials)\n\t{\n\t\t$this->user = User::where('email', $credentials['email'])\n\t\t\t->where('reset_password_token', $credentials['token'])\n\t\t\t->first();\n\t}", "title": "" }, { "docid": "84d621991ffe35e40ec86ef1eedde354", "score": "0.5793663", "text": "public function parsedUrlToken($tokenHash)\n {\n $user = $this->findByPasswordResetToken($tokenHash);\n if ($user != null) {\n return $user;\n }\n }", "title": "" }, { "docid": "27b632a4ec42de8c4eb5e3e9de8ed5eb", "score": "0.5791659", "text": "static function forgotpassword($app){\n $post = $app->request->post();\n // Validate input parameters\n if(!v::key('email', v::email())->validate($post)) {\n return array('frgtauthenticated' => false, 'msg' => 'Forgot password failed. Check your parameters and try again.');\n }\n // Validate the user email and password\n $found = self::forgotpassword_validateFoundUser($post,$app);\n return $found;\n }", "title": "" }, { "docid": "017732c45bbcbf77674ca3489a33651d", "score": "0.5791412", "text": "public function findOne($where =[])\n {\n return $this->resetpassword::where($where)->first();\n }", "title": "" }, { "docid": "ced0cb52e436660ead842401bd2c1757", "score": "0.578509", "text": "static function checkToken($token,$email)\n {\n $call = DB::table('password_resets')\n ->where([\n 'email' => $email \n ])->select(['token','created_at'])->get()->first();\n if(!empty($call)) {\n if(password_verify($token,$call->token)) {\n $now = \\strtotime(time());\n if(round((strtotime('now') - strtotime(date($call->created_at),2)) / 3600) < 4)\n {\n return result::repsonse(true,'Verified Token');\n } else {\n return result::repsonse(false,'Expired Token');\n }\n } else {\n return result::repsonse(false,'Expired Token');\n }\n } else {\n return result::repsonse(false,'Bad Token');\n }\n }", "title": "" }, { "docid": "7e5c2974813b1247b5a8e76b48314b08", "score": "0.57682145", "text": "abstract protected function retrieveUser($username, UsernamePasswordToken $token);", "title": "" }, { "docid": "f4075218d781d4ae85fc3b9da1b766b5", "score": "0.5755458", "text": "public function checkPasswordResetToken(string $token)\n {\n $password_reset = PasswordReset::findOne(['token' => $token], []);\n if (empty($password_reset)) {\n return [\n 'success' => false,\n 'message' => 'Token is invalid'\n ];\n } else {\n $expire_time = $password_reset->updated_at->add(new \\DateInterval('PT1H'));\n $now = new \\DateTimeImmutable();\n if ($expire_time < $now ) {\n return [\n 'success' => false,\n 'message' => 'Token is expired'\n ];\n }\n return [\n 'success' => true,\n ];\n }\n }", "title": "" }, { "docid": "74c5359d3226c630894f2969dd6f16f7", "score": "0.5753206", "text": "public function getMe(string $token): User;", "title": "" } ]
9cc2adba334903e15f43ae7fc75f67e8
Save the cast and crew metabox fields
[ { "docid": "75945da2b396ce5fbb7141e2866a723e", "score": "0.5937837", "text": "public function saveCastAndCrewPostDetails(int $postId, WP_Post $post, bool $update): void\n {\n if ( # Verify meta box nonce\n !isset($_POST['ccwp_cast_and_crew_details_box_nonce'])\n || !wp_verify_nonce($_POST['ccwp_cast_and_crew_details_box_nonce'], basename(__FILE__))\n ) {\n return;\n }\n\n // Don't auto save these fields\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return;\n }\n\n // Check the user's permissions.\n if (!current_user_can('edit_post', $postId)) {\n return;\n }\n\n // Store custom field values\n\n if (!empty($_POST['ccwp_name_first'])) {\n update_post_meta($postId, '_ccwp_cast_crew_name_first', sanitize_text_field($_POST['ccwp_name_first']));\n } else {\n delete_post_meta($postId, '_ccwp_cast_crew_name_first');\n }\n\n if (!empty($_POST['ccwp_name_last'])) {\n update_post_meta($postId, '_ccwp_cast_crew_name_last', sanitize_text_field($_POST['ccwp_name_last']));\n } else {\n delete_post_meta($postId, '_ccwp_cast_crew_name_last');\n }\n\n if (!empty($_POST['ccwp_self_title'])) {\n update_post_meta($postId, '_ccwp_cast_crew_self_title', sanitize_text_field($_POST['ccwp_self_title']));\n } else {\n delete_post_meta($postId, '_ccwp_cast_crew_self_title');\n }\n\n if (!empty($_POST['ccwp_birthday'])) {\n $ccwp_birthday = sanitize_text_field($_POST['ccwp_birthday']);\n $ccwp_birthday = Date::reformat($ccwp_birthday, 'Y-m-d');\n update_post_meta($postId, '_ccwp_cast_crew_birthday', $ccwp_birthday);\n } else {\n delete_post_meta($postId, '_ccwp_cast_crew_birthday');\n }\n\n if (!empty($_POST['ccwp_hometown'])) {\n update_post_meta($postId, '_ccwp_cast_crew_hometown', sanitize_text_field($_POST['ccwp_hometown']));\n } else {\n delete_post_meta($postId, '_ccwp_cast_crew_hometown');\n }\n\n if (!empty($_POST['ccwp_website_link'])) {\n update_post_meta(\n $postId,\n '_ccwp_cast_crew_website_link',\n esc_url_raw($_POST['ccwp_website_link'], ['http', 'https'])\n );\n } else {\n delete_post_meta($postId, '_ccwp_cast_crew_website_link');\n }\n\n if (!empty($_POST['ccwp_facebook_link'])) {\n update_post_meta(\n $postId,\n '_ccwp_cast_crew_facebook_link',\n esc_url_raw($_POST['ccwp_facebook_link'], ['http', 'https'])\n );\n } else {\n delete_post_meta($postId, '_ccwp_cast_crew_facebook_link');\n }\n\n if (!empty($_POST['ccwp_twitter_link'])) {\n update_post_meta(\n $postId,\n '_ccwp_cast_crew_twitter_link',\n esc_url_raw($_POST['ccwp_twitter_link'], ['http', 'https'])\n );\n } else {\n delete_post_meta($postId, '_ccwp_cast_crew_twitter_link');\n }\n\n if (!empty($_POST['ccwp_instagram_link'])) {\n update_post_meta(\n $postId,\n '_ccwp_cast_crew_instagram_link',\n esc_url_raw($_POST['ccwp_instagram_link'], ['http', 'https'])\n );\n } else {\n delete_post_meta($postId, '_ccwp_cast_crew_instagram_link');\n }\n\n if (!empty($_POST['ccwp_fun_fact'])) {\n update_post_meta($postId, '_ccwp_cast_crew_fun_fact', sanitize_text_field($_POST['ccwp_fun_fact']));\n } else {\n delete_post_meta($postId, '_ccwp_cast_crew_fun_fact');\n }\n }", "title": "" } ]
[ { "docid": "3a5ca18b1a53938bd7c505017c40f6af", "score": "0.6152941", "text": "public function save()\r\n\t{\r\n\t\t// Base logic\r\n\t\tparent::save();\r\n\t\t\r\n\t\t// Perform request for additional field metadata\r\n\t\t/*if( dbQuery('materialfield')->join('field')->exec( $db_fields ))\r\n\t\t{\r\n\t\t\t// Iterate fields and if field metadata has been found\r\n\t\t\tforeach ( $db_fields as & $db_field ) if( isset( $db_field->onetoone['_field'] ) )\r\n\t\t\t{\r\n\t\t\t\t// Save field value to db\t\t\t\t\t\r\n\t\t\t\t$db_field->Value = $this[ $db_field->onetoone['_field']->Name ];\t\t\t\r\n\t\t\t\t$db_field->save();\r\n\t\t\t}\t\t\t\r\n\t\t}*/\t\t\t\r\n\t\t// TODO: Add logic for gallery saving\r\n\t}", "title": "" }, { "docid": "f8374857988ec63d2284182cbfadaccc", "score": "0.6093051", "text": "function mwp_wm_save_meta_box_data( $post_id ){\n\t\t\tif ( !isset( $_POST['mwp_wm_metabox_nonce'] ) || !wp_verify_nonce( $_POST['mwp_wm_metabox_nonce'], basename( __FILE__ ) ) ){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// return if autosave\n\t\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ){\n\t\t\t\treturn;\n\t\t\t}\n\t\t // Check the user's permissions.\n\t\t\tif ( ! current_user_can( 'edit_post', $post_id ) ){\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isset( $_REQUEST['mcoor_x'] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'mcoor_x', sanitize_text_field( $_POST['mcoor_x'] ) );\n\t\t\t}\n\n\t\t\tif ( isset( $_REQUEST['mcoor_y'] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'mcoor_y', sanitize_text_field( $_POST['mcoor_y'] ) );\n\t\t\t}\n\n\t\t\tif ( isset( $_REQUEST['mcoor_country'] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, 'mcoor_country', sanitize_text_field( $_POST['mcoor_country'] ) );\n\t\t\t}\n\n\t\t\t$mwpWorldMapDetails = $_POST['mwpWorldMapDetails'];\n\t\t update_post_meta($post_id,'mwpWorldMapDetails',$mwpWorldMapDetails);\n\t\t}", "title": "" }, { "docid": "82bf0a44eca51f9a104e3ca347177792", "score": "0.60910755", "text": "public function addCastAndCrewPostMetaBoxes(): void\n {\n add_meta_box(\n 'ccwp_cast_and_cast_details', // Unique ID\n __('Cast and Crew Details', CCWP_TEXT_DOMAIN), // Box title\n [$this, 'renderCastAndCrewDetailsMetabox'], // Content callback\n CastAndCrew::POST_TYPE, // Post type\n 'normal', // Context: (normal, side, advanced)\n 'high' // Priority: (high, low)\n );\n }", "title": "" }, { "docid": "1638d90c58c1235a801428f4d35faa35", "score": "0.605242", "text": "function meta_boxes_save( $fields ) {\r\n\t\t$fields[] = '_campaign_featured';\r\n\t\t$fields[] = '_campaign_physical';\r\n\t\t$fields[] = 'campaign_goal';\r\n\t\t$fields[] = 'campaign_contact_email';\r\n\t\t$fields[] = 'campaign_end_date';\r\n\t\t$fields[] = 'campaign_video';\r\n\t\t$fields[] = 'campaign_location';\r\n\t\t$fields[] = 'campaign_author';\r\n\t\t$fields[] = 'campaign_type';\r\n\t\t$fields[] = 'campaign_updates';\r\n\r\n\t\treturn $fields;\r\n\t}", "title": "" }, { "docid": "d4aaa53eed55746902a772f509312cdf", "score": "0.59003294", "text": "function wptm_save_meta_box_data( $post_id ) {\r\n\r\n /*\r\n * We need to verify this came from our screen and with proper authorization,\r\n * because the save_post action can be triggered at other times.\r\n */\r\n\r\n // Check if our nonce is set.\r\n if ( ! isset( $_POST['wptm_meta_box_nonce'] ) ) {\r\n return;\r\n }\r\n\r\n // Verify that the nonce is valid.\r\n if ( ! wp_verify_nonce( $_POST['wptm_meta_box_nonce'], 'wptm_meta_box' ) ) {\r\n return;\r\n }\r\n\r\n // If this is an autosave, our form has not been submitted, so we don't want to do anything.\r\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\r\n return;\r\n }\r\n\r\n // Check the user's permissions.\r\n if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\r\n\r\n if ( ! current_user_can( 'edit_page', $post_id ) ) {\r\n return;\r\n }\r\n\r\n } else {\r\n\r\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\r\n return;\r\n }\r\n }\r\n\r\n /* OK, it's safe for us to save the data now. */\r\n\r\n if( isset( $_POST['wptm'] ) ){\r\n\r\n $data = $_POST['wptm'];\r\n $data = wp_parse_args( $data, array(\r\n 'type' =>'image',\r\n 'image_id' => 0 ,\r\n 'gallery' => array() ,\r\n 'gallery_display' => 'gird',\r\n 'gallery_settings' => array(),\r\n 'video' => array() ,\r\n ) );\r\n\r\n $gallery = $data['gallery'];\r\n\r\n $tpl_gallery = array();\r\n if( !empty( $gallery ) ){\r\n foreach( $gallery['image_id'] as $i => $v ){\r\n $tpl_gallery[ $i ]['image_id'] = $v;\r\n $tpl_gallery[ $i ]['title'] = $gallery[ 'title' ] [$i ];\r\n $tpl_gallery[ $i ]['caption'] = $gallery[ 'caption' ] [$i ];\r\n $tpl_gallery[ $i ]['url'] = $gallery[ 'url' ] [$i ];\r\n }\r\n }\r\n $data['gallery'] = $tpl_gallery;\r\n $data['gallery_settings'] = wp_parse_args( $data['gallery_settings'] , array(\r\n 'display'=>'gird',\r\n 'numcol' => 3,\r\n 'highlight' => ''\r\n ) );\r\n\r\n update_post_meta( $post_id, '_wptm_data', $data );\r\n if( count($tpl_gallery) ){\r\n update_post_meta( $post_id , '_thumbnail_id' , $tpl_gallery[0]['image_id'] );\r\n }else{\r\n update_post_meta( $post_id , '_thumbnail_id' , $data['image_id'] );\r\n }\r\n update_post_meta( $post_id, '_wptm_thumb_type', $data['type'] );\r\n }else{\r\n update_post_meta( $post_id, '_wptm_data', '' );\r\n update_post_meta( $post_id, '_wptm_thumb_type', '' );\r\n }\r\n\r\n}", "title": "" }, { "docid": "1ed3890890255554cf78b437432eb89f", "score": "0.5889863", "text": "function save_post()\n\t\t{\n\t\t\tif(isset($_POST['post_ID']))\n\t\t\t{\n\t\t\t\t$must_check = false;\n\t\t\t\t\n\t\t\t\tif(!is_array($this->default_boxes) || !isset($_POST['post_ID']) || !isset($_POST['post_type']) || $this->saved) return;\n\t\t\t\t\n\t\t\t\t//check if a metabox was attached to this post type\n\t\t\t\tforeach($this->default_boxes as $default_box)\n\t\t\t\t{\n\t\t\t\t\tif(in_array( $_POST['post_type'] ,$default_box['page']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$must_check = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\tif(!$must_check) return;\n\t\t\t\t\n\t\t\t\tif(function_exists('check_ajax_referer')) { check_ajax_referer('avia_nonce_save_metabox','avia-nonce'); }\n\t\n\t\t\t\t//check if we got an options array and a post id or if it was already saved: if wordpress does an ajax save or creates a new page one of them might be unavailable\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//check which capability is needed to edit the current post/page\n\t\t\t\t$post_id = $_POST['post_ID'];\n\t\t\t\t$capability = \"edit_post\";\n\t\t\t\t\n\t\t\t\tif ( 'page' == $_POST['post_type'] ) { $capability = \"edit_page\"; }\n\t\t\t\t\n\t\t\t\t//does the user have the capability?\n\t\t\t\tif ( !current_user_can( $capability, $post_id )) return $post_id ;\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t$this->saved = true;\n\t\t\t\t$meta_array = array();\n\t\t\t\t\n\t\t\t\tforeach($this->box_elements as $box)\n\t\t\t\t{\n\t\t\t\t\tforeach($_POST as $key=>$value)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(strpos($key, $box['id']) !== false)\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(strpos($key, 'on_save_') !== false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$function = str_replace('on_save_', \"\", $key);\n\t\t\t\t\t\t\t\t$meta_array = apply_filters('avia_filter_save_meta_box_'.$function, $meta_array, $_POST);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$meta_array[$key] = $value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$result = avia_ajax_save_options_create_array($meta_array, true);\n\t\t\t\tupdate_post_meta($post_id , '_avia_elements_'.$this->superobject->option_prefix, $result);\n\t\t\t\t\n\t\t\t\t//also save the data to a neutral field that can be used for compatibility with other themes\n\t\t\t\tupdate_post_meta($post_id , '_avia_elements_theme_compatibility_mode', $result);\n\t\t\t\t\n\t\t\t\t//hook in case the value should be processed otherwise by an external function (example: slideshow first entry should be saved as post thumb)\n\t\t\t\tdo_action('avia_meta_box_save_post', $post_id, $result);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0465e0d0e21a594da8e0ad6e2b1b5a2d", "score": "0.5881346", "text": "public function save() {\n drupal_write_record('voicemail_box_settings', $this, 'eid');\n }", "title": "" }, { "docid": "e55ec7b45de352cb1d89313046f0add4", "score": "0.5872148", "text": "public function save_meta_box_info( $post_id ) {\n\t\t$this->save_category_selection_meta_box_info( $post_id );\n\t\t$this->save_tag_selection_meta_box_info( $post_id );\n\t}", "title": "" }, { "docid": "ccf05907f475de39471921ac6878dc23", "score": "0.5850307", "text": "function offshore_meta_box_save( $post_id )\n\t\t{\n\t\t\tif( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n\t\t\t\n\t\t\t// if our nonce isn't there, or we can't verify it, bail\n\t\t\tif( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\n\t\t\t\n\t\t\t// if our current user can't edit this post, bail\n\t\t\tif( !current_user_can( 'edit_post' ) ) return;\n\t\t\t\n\t\t\t// now we can actually save the data\n\t\t\t$allowed = array( \n\t\t\t\t'a' => array( // on allow a tags\n\t\t\t\t\t'href' => array() // and those anchords can only have href attribute\n\t\t\t\t),\n\t\t\t\t'img' => array(\n\t\t\t\t\t'src' => array(),\n\t\t\t\t\t'alt' => array(),\n\t\t\t\t\t'title' => array(),\n\t\t\t\t\t'class' => array()\n\t\t\t\t),\n\t\t\t\t'span' => array(\n\t\t\t\t\t'class' => array()\n\t\t\t\t),\n\t\t\t\t'div' => array(\n\t\t\t\t\t'class' => array()\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t// Probably a good idea to make sure your data is set\t\t\t\n\t\t\tif( isset( $_POST['idMovie'] ) && !empty( $_POST['idMovie'] ) )\n\t\t\t\tupdate_post_meta( $post_id, 'idMovie', wp_kses( $_POST['idMovie'], $allowed ) );\t\t\n\n\t\t\tif( isset( $_POST['trailer'] ) && !empty( $_POST['trailer'] ) )\n\t\t\t\tupdate_post_meta( $post_id, 'trailer', wp_kses( $_POST['trailer'], $allowed ) );\t\t\t\t\t\n\t\t\t\t\n\t\t\tif( isset( $_POST['overview'] ) && !empty( $_POST['overview'] ) )\n\t\t\t\tupdate_post_meta( $post_id, 'overview', wp_kses( $_POST['overview'], $allowed ) );\n\t\t\t\n\t\t\tif( isset( $_POST['genres'] ) && !empty( $_POST['genres'] ) )\n\t\t\t\tupdate_post_meta( $post_id, 'genres', wp_kses( $_POST['genres'], $allowed ) );\t\n\t\t\t\t\n\t\t\tif( isset( $_POST['poster_path'] ) && !empty( $_POST['poster_path'] ) )\n\t\t\t\tupdate_post_meta( $post_id, 'poster_path', wp_kses( $_POST['poster_path'], $allowed ) );\t\n\n\t\t\tif( isset( $_POST['backdrop_path'] ) && !empty( $_POST['backdrop_path'] ) )\n\t\t\t\tupdate_post_meta( $post_id, 'backdrop_path', wp_kses( $_POST['backdrop_path'], $allowed ) );\t\t\t\t\n\n\t\t\tif( isset( $_POST['backdrops_path'] ) && !empty( $_POST['backdrops_path'] ) )\n\t\t\t\tupdate_post_meta( $post_id, 'backdrops_path', wp_kses( $_POST['backdrops_path'], $allowed ) );\t\t\t\t\n\t\t\t\n\t\t\tif( isset( $_POST['cast'] ) && !empty( $_POST['cast'] ) )\n\t\t\t\tupdate_post_meta( $post_id, 'cast', wp_kses( stripslashes($_POST['cast']), $allowed ) );\t\t\n\t\t\t\n\t\t\tif( isset( $_POST['imdb_rating'] ) && !empty( $_POST['imdb_rating'] ) )\n\t\t\t\tupdate_post_meta( $post_id, 'imdb_rating', wp_kses( $_POST['imdb_rating'], $allowed ) );\n\t\t\t\n\t\t\tif( isset( $_POST['imdb_link'] ) && !empty( $_POST['imdb_link'] ) )\n\t\t\t\tupdate_post_meta( $post_id, 'imdb_link', wp_kses( $_POST['imdb_link'], $allowed ) );\n\n\t\t\tif( isset( $_POST['bilgi_ulke'] ) && !empty( $_POST['bilgi_ulke'] ) )\n\t\t\t\tupdate_post_meta( $post_id, 'bilgi_ulke', wp_kses( $_POST['bilgi_ulke'], $allowed ) );\t\n\n\t\t\tif( isset( $_POST['bilgi_sure'] ) && !empty( $_POST['bilgi_sure'] ) )\n\t\t\t\tupdate_post_meta( $post_id, 'bilgi_sure', wp_kses( $_POST['bilgi_sure'], $allowed ) );\t\n\n\t\t\tif( isset( $_POST['bilgi_vizyon'] ) && !empty( $_POST['bilgi_vizyon'] ) )\n\t\t\t\tupdate_post_meta( $post_id, 'bilgi_vizyon', wp_kses( $_POST['bilgi_vizyon'], $allowed ) );\t\n\n\t\t\tif( isset( $_POST['bilgi_butce'] ) && !empty( $_POST['bilgi_butce'] ) )\n\t\t\t\tupdate_post_meta( $post_id, 'bilgi_butce', wp_kses( $_POST['bilgi_butce'], $allowed ) );\t\n\n\t\t\tif( isset( $_POST['bilgi_hasilat'] ) && !empty( $_POST['bilgi_hasilat'] ) )\n\t\t\t\tupdate_post_meta( $post_id, 'bilgi_hasilat', wp_kses( $_POST['bilgi_hasilat'], $allowed ) );\n\t\t}", "title": "" }, { "docid": "3595348de635bc4aa50b1a302347a1f3", "score": "0.5849804", "text": "function rsjp_meta_box_create() {\n\tadd_action( 'add_meta_boxes', 'rsjp_meta_boxes' );\n\tadd_action( 'save_post', 'rsjp_posting_save_meta', 10, 2 );\n}", "title": "" }, { "docid": "d9353479f579e4b335bfdd6c3869dce6", "score": "0.58213013", "text": "function meta_boxes_save() {\n\n\t\tif ( empty( $_POST['_wpnonce'] ) || empty( $_POST['post_ID'] ) )\n\t\t\treturn;\n\n\t\twp_verify_nonce( '_wpnonce', $_POST['_wpnonce'] );\n\n\t\t$post_ID = (int) $_POST['post_ID'];\n\n\t\t$start_day = (int) $_POST['start_day'];\n\t\tupdate_post_meta( $post_ID, 'start_day', $start_day );\n\t\t\n\t\t$end_day = (int) $_POST['end_day'];\n\t\tupdate_post_meta( $post_ID, 'end_day', $end_day );\n\t}", "title": "" }, { "docid": "b1e4dc4e546db8d51a9f81f6e65438f1", "score": "0.5793823", "text": "public static function update_meta_boxes_write()\n\t{\n\t}", "title": "" }, { "docid": "5bb83bb7c99d237804fd549a4c541b70", "score": "0.5779131", "text": "public function item_custom_fields_to_form() {\n // 1. special management for fields equipped with \"free\" checkbox\n // nothing to do: they don't exist in this plugin\n\n // 2. special management for composite fields\n $fieldlist = $this->item_composite_fields();\n foreach ($fieldlist as $field) {\n $agearray = $this->item_split_unix_time($this->{$field});\n $this->{$field.'_year'} = $agearray['year'];\n $this->{$field.'_month'} = $agearray['mon'];\n }\n\n // 3. special management for defaultvalue\n if (!isset($this->defaultvalue)) {\n $this->defaultoption = SURVEY_NOANSWERDEFAULT;\n } else {\n if ($this->defaultvalue == SURVEY_INVITATIONDBVALUE) {\n $this->defaultoption = SURVEY_INVITATIONDEFAULT;\n } else {\n $this->defaultoption = SURVEY_CUSTOMDEFAULT;\n }\n }\n }", "title": "" }, { "docid": "2ac91096705aa7482de6e4c1511763e3", "score": "0.5767605", "text": "function dt_catalog_mbox_goods_options_save( $post_id ) {\r\n $box_name = 'dt_catalog-goods_options';\r\n // verify if this is an auto save routine. \r\n // If it is our form has not been submitted, so we dont want to do anything\r\n \r\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \r\n return;\r\n\r\n // verify this came from the our screen and with proper authorization,\r\n // because save_post can be triggered at other times\r\n\r\n if ( !isset( $_POST[$box_name. '_nonce'] ) || !wp_verify_nonce( $_POST[$box_name. '_nonce'], plugin_basename( __FILE__ ) ) )\r\n return;\r\n\r\n \r\n // Check permissions\r\n if ( !current_user_can( 'edit_page', $post_id ) )\r\n return;\r\n \r\n $mydata = null;\r\n\r\n if( isset($_POST[$box_name. '_price']) ) {\r\n $mydata['price'] = esc_attr(trim($_POST[$box_name. '_price']));\r\n }\r\n \r\n if( isset($_POST[$box_name. '_link']) ) {\r\n $mydata['p_link'] = esc_html($_POST[$box_name. '_link']);\r\n }\r\n \r\n update_post_meta( $post_id, '_' . $box_name, $mydata );\r\n}", "title": "" }, { "docid": "7937a2d6f55c8601bc4c68344a90f7d6", "score": "0.5758097", "text": "function wp_book_mb_save_meta_box( $post_id ) \r\n{\r\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\r\n if ( $parent_id = wp_is_post_revision( $post_id ) ) \r\n\t{\r\n $post_id = $parent_id;\r\n }\r\n $fields = array('wp_book_mb_author','wp_book_mb_published_year','wp_book_mb_price','wp_book_mb_publisher','wp_book_mb_edition');\r\n\t\t\r\n\t\t\r\n foreach($fields as $value ) \r\n\t {\r\n if ( array_key_exists($value, $_POST ) )\r\n\t\t\t{\r\n update_post_meta( $post_id, $value, sanitize_text_field( $_POST[$value] ) );\r\n }\r\n }\r\n}", "title": "" }, { "docid": "c5fd4bafc7b8f00bfae4d6f94eab08ce", "score": "0.5749217", "text": "function log_favourites_metaboxes_setup() {\n\t // add metaboxes\n\t add_action( 'add_meta_boxes', array( $this, 'log_favourites_add_post_metaboxes' ) );\n\n\t // save the data on the save_post hook\n\t add_action( 'save_post', array( $this , 'log_favourites_save_post_metabox' ), 10, 2 );\n\t}", "title": "" }, { "docid": "ecf2b0252e6676a2aaa65b36fb770315", "score": "0.5747092", "text": "function custom_save_meta_box_data( $post_id ) {\n\tglobal $custom_meta_fields;\n\t/*\n\t * We need to verify this came from our screen and with proper authorization,\n\t * because the save_post action can be triggered at other times.\n\t */\n\n\t// Check if our nonce is set.\n\tif ( ! isset( $_POST['custom_meta_box_nonce'] ) ) {\n\t\treturn;\n\t}\n\n\t// Verify that the nonce is valid.\n\tif ( ! wp_verify_nonce( $_POST['custom_meta_box_nonce'], 'custom_meta_box' ) ) {\n\t\treturn;\n\t}\n\n\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\treturn;\n\t}\n\n\t// Check the user's permissions.\n\tif ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\n\t\tif ( ! current_user_can( 'edit_page', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t} else {\n\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t/* OK, its safe for us to save the data now. */\n\n\t// Make sure that it is set.\n\t// if ( ! isset( $_POST['custom'] ) ) {\n\t// \treturn;\n\t// }\n\n\tforeach ($custom_meta_fields as $field) {\n\t\tif($field['type'] == 'tax_select') continue;\n\n\t\tif( ! isset( $_POST[$field['id']] ) )\n\t\t\tcontinue;\n\n\t\t$old = get_post_meta($post_id, $field['id'], true);\n\t\t$new = $_POST[$field['id']];\n\t\tif ($new && $new != $old) {\n\t\t\tupdate_post_meta($post_id, $field['id'], $new);\n\t\t} elseif ('' == $new && $old) {\n\t\t\tdelete_post_meta($post_id, $field['id'], $old);\n\t\t}\n\t} // enf foreach\n\n\t// Sanitize user input.\n\t//$my_data = sanitize_text_field( $_POST['custom'] );\n\n\t// Update the meta field in the database.\n\t//update_post_meta( $post_id, 'custom', $my_data );\n}", "title": "" }, { "docid": "d0a71acb56de629c7a6e58420efe3141", "score": "0.5742224", "text": "function silp_meta_box_save( $post_id )\n{\n\tif( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n\t\n\t// if our nonce isn't there, or we can't verify it, bail\n\tif( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'silp_meta_box_nonce' ) ) return;\n\t\n\t// if our current user can't edit this post, bail\n\tif( !current_user_can( 'edit_post' ) ) return;\n\t\n\t// now we can actually save the data\n\t$allowed = array( \n\t\t'a' => array( // on allow a tags\n\t\t\t'href' => array() // and those anchords can only have href attribute\n\t\t)\n\t);\n\t\n\t// Probably a good idea to make sure your data is set\n\tif( isset( $_POST['silp_meta_box_text'] ) )\n\t\tupdate_post_meta( $post_id, 'silp_meta_box_text', wp_kses( $_POST['silp_meta_box_text'], $allowed ) );\n\t\t\n\tif( isset( $_POST['silp_meta_box_select'] ) )\n\t\tupdate_post_meta( $post_id, 'silp_meta_box_select', esc_attr( $_POST['silp_meta_box_select'] ) );\n\t\t\n\t// This is purely my personal preference for saving checkboxes\n\t$chk = ( isset( $_POST['silp_meta_box_check'] ) && $_POST['silp_meta_box_check'] ) ? 'on' : 'off';\n\tupdate_post_meta( $post_id, 'silp_meta_box_check', $chk );\n}", "title": "" }, { "docid": "371f178d868ccdd7cde501e9f4335b7f", "score": "0.57382727", "text": "public function metabox() {\n\n\t\t$metabox = new_cmb2_box( [\n\t\t\t'id' => 'hotel-pageformat',\n\t\t\t'title' => __( 'Page Format', 'cmb2' ),\n\t\t\t'object_types' => [ 'hawaii-hotels' ], // Post type\n\t\t\t'context' => 'side',\n\t\t\t'priority' => 'low',\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t] );\n\n\t\t$metabox->add_field( array(\n\t\t\t'name' => 'Hotel Page Format',\n\t\t\t'id' => '_hotel-pageformat',\n\t\t\t'type' => 'radio_inline',\n\t\t\t'options' => array(\n\t\t\t\t'none' => __( 'Hotel', 'cmb2' ),\n\t\t\t\t'island' => __( 'Island', 'cmb2' ),\n\t\t\t),\n\t\t\t'default' => 'none',\n\t\t\t'render_row_cb' => [ 'HawaiiAloha\\CMB2\\RenderCB', 'withoutRow' ],\n\t\t) );\n\t}", "title": "" }, { "docid": "917e28292c3f0fc1da60965383b06ae7", "score": "0.5728976", "text": "function cd_meta_box_save( $post_id )\n\t{\n\t\tif( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n\n\t\t// if our nonce isn't there, or we can't verify it, bail\n\t\tif( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\n\n\t\t// if our current user can't edit this post, bail\n\t\tif( !current_user_can( 'edit_post' ) ) return;\n\n\t\t// now we can actually save the data\n\t\t$allowed = array( \n\t\t\t'a' => array( // on allow a tags\n\t\t\t\t'href' => array() // and those anchors can only have href attribute\n\t\t\t)\n\t\t);\n\n\t\t// Probably a good idea to make sure your data is set\n\t\tif( isset( $_POST['url'] ) )\n\t\t\tupdate_post_meta( $post_id, 'url', wp_kses( $_POST['url'], $allowed ) );\n\n\t\t// Probably a good idea to make sure your data is set\n\t\tif( isset( $_POST['texto_slider'] ) )\n\t\t\tupdate_post_meta( $post_id, 'texto_slider', wp_kses( $_POST['texto_slider'], $allowed ) );\n\t}", "title": "" }, { "docid": "eed5e14a8d29ae9056dbd395daf9e94b", "score": "0.57189614", "text": "function zcraft_save_metaboxes($post_id, $post, $update)\n{\n\n if (!current_user_can('edit_post', $post_id) || !wp_verify_nonce($_REQUEST['zcraft_content_nonce'], 'zcraft_content_properties')) return;\n\n if (isset($_REQUEST['zcraft-content-subtitle'])) update_post_meta($post_id, 'subtitle', $_REQUEST['zcraft-content-subtitle']);\n if (isset($_REQUEST['zcraft-content-shortlink'])) update_post_meta($post_id, 'short_link', $_REQUEST['zcraft-content-shortlink']);\n\n // Removes old values from Weaver II\n delete_post_meta($post_id, 'wvr_raw_html');\n\n if (isset($_REQUEST['zcraft-content-raw']))\n {\n update_post_meta($post_id, 'raw_html', 'on');\n }\n else\n {\n delete_post_meta($post_id, 'raw_html');\n }\n\n if (isset($_REQUEST['zcraft-content-novisual']))\n {\n update_post_meta($post_id, 'hide_visual_editor', 'on');\n }\n else\n {\n delete_post_meta($post_id, 'hide_visual_editor');\n }\n\n /* Homepage metabox */\n\n if (!isset($_REQUEST['zcraft_homepage_nonce']) || !wp_verify_nonce($_REQUEST['zcraft_homepage_nonce'], 'zcraft_homepage_properties')) return;\n\n foreach (['title', 'subtitle', 'tagline', 'button', 'button_href', 'servers'] AS $meta)\n {\n $full_meta = 'zcraft_homepage_' . $meta;\n if (isset($_REQUEST[$full_meta]))\n {\n update_post_meta($post_id, $full_meta, $_REQUEST[$full_meta]);\n }\n }\n}", "title": "" }, { "docid": "d24a3c10e6d38ac6929d64e277337a2a", "score": "0.5694127", "text": "public function metabox( $post, $box ) {\n $organizer_term_id = $this->get_organizer_term_id( $post->ID );\n $organizer_data = array();\n $table_class = 'form-table';\n if( $organizer_term_id > 0 ) {\n $table_class .= ' hide-new-organizer-fields show-organizer-details';\n $organizer_data = $this->get_term_meta( $organizer_term_id );\n }\n ?>\n <style>\n /* Forgive me father, for I have sinned... */\n .organizer-details,\n .hide-new-organizer-fields .new-organizer-field {\n display: none;\n }\n .show-organizer-details .organizer-details {\n display: block;\n }\n </style>\n <table class=\"<?php echo $table_class; ?>\">\n <tbody>\n <tr>\n <td colspan=\"2\">\n <select name=\"sc_event_saved_organizer\" id=\"sc_event_saved_organizer\">\n <?php echo $this->get_terms_dropdown( $post->ID ); ?>\n </select>\n </td>\n </tr>\n <tr class=\"organizer-details\">\n <td colspan=\"2\"><?php echo $this->the_organizer_details( $post->ID ); ?></td>\n </tr>\n <tr class=\"new-organizer-field\">\n <td>\n <label for=\"sc_event_organizer_name\">Organizer Name</label>\n </td>\n <td>\n <input type=\"text\" name=\"sc_event_organizer_name\" id=\"sc_event_organizer_name\">\n </td>\n </tr>\n <tr class=\"new-organizer-field\">\n <td>\n <label for=\"sc_event_organizer_phone\">Phone</label>\n </td>\n <td>\n <input type=\"tel\" name=\"sc_event_organizer_phone\" id=\"sc_event_organizer_phone\">\n </td>\n </tr>\n <tr class=\"new-organizer-field\">\n <td>\n <label for=\"sc_event_organizer_website\">Website</label>\n </td>\n <td>\n <input type=\"url\" name=\"sc_event_organizer_website\" id=\"sc_event_organizer_website\">\n </td>\n </tr>\n <tr class=\"new-organizer-field\">\n <td>\n <label for=\"sc_event_organizer_email\">Email</label>\n </td>\n <td>\n <input type=\"email\" name=\"sc_event_organizer_email\" id=\"sc_event_organizer_email\">\n </td>\n </tr>\n </tbody>\n </table>\n <?php\n }", "title": "" }, { "docid": "3fa12096b80f73a2d4b2b3273bead2a7", "score": "0.5639713", "text": "function cd_meta_box_save( $post_id )\r\n{\r\n if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\r\n \r\n // if our nonce isn't there, or we can't verify it, bail\r\n if( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\r\n \r\n // if our current user can't edit this post, bail\r\n if( !current_user_can( 'edit_post' ) ) return;\r\n \r\n // now we can actually save the data\r\n $allowed = array( \r\n 'a' => array( // on allow a tags\r\n 'href' => array() // and those anchords can only have href attribute\r\n )\r\n );\r\n \r\n // Probably a good idea to make sure your data is set\r\n if( isset( $_POST['eter_guide_position'] ) )\r\n update_post_meta( $post_id, 'eter_guide_position', wp_kses( $_POST['eter_guide_position'], $allowed ) );\r\n}", "title": "" }, { "docid": "32a6442ad07ebb59108855808282ff2c", "score": "0.56391734", "text": "function setup_save_hooks() {\n\n foreach ( $this->meta_boxes as $meta_box ) {\n\n add_action( 'save_post', $meta_box['save_callback'] );\n\n }\n }", "title": "" }, { "docid": "878bf09bb7783b79fefff0e8aef75968", "score": "0.5638676", "text": "public function manage_meta_box () {\n add_action( 'add_meta_boxes', [ $this, 'add_custom_meta_box' ] );\n\n add_action( 'save_post', [ $this, 'save_post_with_metabox' ] );\n }", "title": "" }, { "docid": "6f4ea5ad580e63742adb82144f63a2b4", "score": "0.56298447", "text": "function wp_tmgr_save_meta_box($post_id){\n if(!isset($_POST[\"wp_tmgr_custom_box_nonce\"])){\n return $post_id;\n }\n $nonce = $_POST[\"wp_tmgr_custom_box_nonce\"];\n\n if(!wp_verify_nonce($nonce,\"wp_tmgr_custom_box\")){\n return $post_id;\n }\n if(defined(\"DOING_AUTOSAVE\")&& DOING_AUTOSAVE){\n return $post_id;\n }\n\n if(\"tmgr_controls\" == $_POST[\"post_type\"]){\n if(!current_user_can(\"edit_post\", $post_id)){\n return $post_id;\n }\n } \n $kind_control = sanitize_text_field($_POST[\"wp_tmgr_kind_of_control\"]);\n $logi_name = sanitize_text_field($_POST[\"wp_tmgr_logical_name\"]);\n update_post_meta($post_id,\"wp_tmgr_kind_of_control\", $kind_control);\n update_post_meta($post_id,\"wp_tmgr_logical_name\", $logi_name);\n}", "title": "" }, { "docid": "2fdd42311d62395bd47d9070ed24d2e0", "score": "0.5621462", "text": "private static function saveMetaBoxes($postID) {\r\n EventMetabox::saveMetabox($postID, $_POST);\r\n }", "title": "" }, { "docid": "2126f5680f31ff5891f821a02a7bb835", "score": "0.56063765", "text": "function addMetaboxes()\n {\n self::showStatusMetaBox();\n self::showTemplateMetaBox();\n\n $args = array(\n 'classname' => __CLASS__,\n 'function' => 'showDetailsMetaBox',\n 'label' => 'Details',\n 'save_function' => 'saveDetailsMetaBox');\n\n self::addMetabox($args);\n }", "title": "" }, { "docid": "db6daca1c78050bfe005ad91ae5b6c9f", "score": "0.56046045", "text": "function cd_meta_box_save( $post_id ) {\r\n\tif( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\r\n\t\r\n\t// if our nonce isn't there, or we can't verify it, bail\r\n\tif( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\r\n\t\r\n\t// if our current user can't edit this post, bail\r\n\tif( !current_user_can( 'edit_post' ) ) return;\r\n\t\r\n\t// now we can actually save the data\r\n\t$allowed = array( \r\n\t\t'a' => array( // on allow a tags\r\n\t\t\t'href' => array() // and those anchords can only have href attribute\r\n\t\t)\r\n\t);\r\n\t\r\n\t// Probably a good idea to make sure the data is set\t\t\r\n\tif( isset( $_POST['video_url'] ) ) {\r\n\t\tupdate_post_meta( $post_id, 'video_url', wp_kses( $_POST['video_url'], $allowed ) );\r\n\t}\r\n\t\r\n\tif( isset( $_POST['audio_url'] ) ) {\r\n\t\tupdate_post_meta( $post_id, 'audio_url', wp_kses( $_POST['audio_url'], $allowed ) );\r\n\t}\r\n\t\r\n\tif( isset( $_POST['quote_content'] ) ) {\r\n\t\tupdate_post_meta( $post_id, 'quote_content', wp_kses( $_POST['quote_content'], $allowed ) );\r\n\t}\r\n\t\r\n\tif( isset( $_POST['quote_attribution'] ) ) {\r\n\t\tupdate_post_meta( $post_id, 'quote_attribution', wp_kses( $_POST['quote_attribution'], $allowed ) );\r\n\t}\r\n\t\r\n\tif( isset( $_POST['link_url'] ) ) {\r\n\t\tupdate_post_meta( $post_id, 'link_url', wp_kses( $_POST['link_url'], $allowed ) );\r\n\t}\r\n\t\r\n\tif( isset( $_POST['link_title'] ) ) {\r\n\t\tupdate_post_meta( $post_id, 'link_title', wp_kses( $_POST['link_title'], $allowed ) );\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "58a464c57698bbddee4c06dc3725e5d7", "score": "0.557657", "text": "function save() {\n\n $this->mdl_mcb_data->save('astr_forfait_filter_inventory_type', $this->input->post('astr_forfait_filter_inventory_type'));\n $this->mdl_mcb_data->save('astr_base_hour_inventory', $this->input->post('astr_base_hour_inventory'));\n \n $this->mdl_mcb_data->save('astr_nightly_hours_start', $this->input->post('astr_nightly_hours_start'));\n $this->mdl_mcb_data->save('astr_nightly_hours_end', $this->input->post('astr_nightly_hours_end'));\n\n if ($this->input->post('astr_dashboard_show_astreintes')) {\n $this->mdl_mcb_data->save('astr_dashboard_show_astreintes', \"TRUE\");\n } else {\n $this->mdl_mcb_data->save('astr_dashboard_show_astreintes', \"FALSE\");\n }\n\t}", "title": "" }, { "docid": "539af15627caf8cfad179e4d7db1321c", "score": "0.5573677", "text": "function prowp_save_meta_box( $post_id ){\n //process metabox data if $_POST is submitted\n if( isset( $_POST['prowp_product_type'] ) ){\n // if auto saving skip saving our meta box data\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )\n return;\n\n //check nonce for security\n check_admin_referer( plugin_basename( __FILE__ ), 'prowp_save_meta_box' );\n\n // save the meta box data as post meta using the post ID as a unique prefix\n update_post_meta( $post_id, '_prowp_type',sanitize_text_field( $_POST['prowp_product_type'] ) );\n update_post_meta( $post_id, '_prowp_price',sanitize_text_field ( $_POST['prowp_price'] ) );\n\n }\n }", "title": "" }, { "docid": "02033f0b6c42293c30bea09edfb86b54", "score": "0.556606", "text": "function property_details_box_save($post_id)\r\n\t{\r\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)\r\n\t\t\treturn;\r\n\r\n\t\t// Prevent quick edit from clearing custom fields\r\n if (defined('DOING_AJAX') && DOING_AJAX)\r\n return;\r\n\r\n\t\tif (!wp_verify_nonce($_POST['property_details_box_content_nonce'], plugin_basename(_FILE_)))\r\n\t\t\treturn;\r\n\t\tif ('page' == $_POST['post_type'])\r\n\t\t{\r\n\t\t\tif (!current_user_can('edit_page', $post_id))\r\n\t\t\t\treturn;\r\n\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (!current_user_can('edit_post', $post_id))\r\n\t\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$property_details_price = $_POST['property_details_price'];\r\n\t\tupdate_post_meta( $post_id, 'property_details_price', $property_details_price);\r\n\r\n\t\t$property_details_location = $_POST['property_details_location'];\r\n\t\tupdate_post_meta( $post_id, 'property_details_location', $property_details_location);\r\n\t\t\r\n\t\t$property_details_dateofconstruction = $_POST['property_details_date of construction'];\r\n\t\tupdate_post_meta( $post_id, 'property_details_date of construction', $property_details_dateofconstruction);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "c07b2a06afabef7fd2f44ca116a2a057", "score": "0.5541915", "text": "function ssTmCreateMetaBoxesWP() {\n //-- add metabox\n add_meta_box( \n 'ss_team_member_metabox',\n esc_html__( 'Other Information', 'ss_team_member' ),\n array( $this, 'ssTmDisplayWpMetabox' ),\n $this->ss_tm_post_type_name\n );\n }", "title": "" }, { "docid": "77744811dfe1682c329bb33d5ee35abd", "score": "0.55348486", "text": "public function post_type_meta(){\n\t\tadd_filter( 'cmb2_override_excerpt_meta_value', function ( $data, $post_id ) {\n\t\t\treturn get_post_field( 'post_excerpt', $post_id );\n\t\t}, 10, 2 );\n\t\t\n\t\tadd_filter( 'cmb2_override_post_title_meta_value', function ( $data, $post_id ) {\n\t\t\treturn get_post_field( 'post_title', $post_id );\n\t\t}, 10, 2 );\t\n\n\t\tadd_filter( 'cmb2_override_content_meta_value', function ( $data, $post_id ) {\n\t\t\treturn get_post_field( 'post_content', $post_id );\n\t\t}, 10, 2 );\t\t\t\t\n\t\t\n\t\tadd_filter( 'cmb2_override_excerpt_meta_save', '__return_true' );\n\t\tadd_filter( 'cmb2_override_post_title_meta_save', '__return_true' );\t\t\n\t\tadd_filter( 'cmb2_override_content_meta_save', '__return_true' );\n\t\t\n\t\t$cmb = \\new_cmb2_box( array(\n\t\t\t'id' \t\t=> $this->prefix . 'details_metabox',\n\t\t\t'title' \t\t=> __( 'Details', 'cmb2' ),\n\t\t\t'object_types' \t\t=> array( $this->post_type ),\n\t\t\t'context' \t\t=> 'normal',\n\t\t\t'priority' \t\t=> 'high',\n\t\t) );\n\n\t\t\t\t$cmb->add_field( array(\n\t\t\t\t\t'name' \t\t=> 'Title',\n\t\t\t\t\t'desc' \t\t=> 'The title of this video.',\n\t\t\t\t\t'id' \t\t=> 'post_title',\t\t\t\t\t\n\t\t\t\t\t'default' \t\t\t=> '',\t\t\t\t\t\n\t\t\t\t\t'type' \t\t=> 'text',\n\t\t\t\t) );\n\t\t\n\t\t\t\t$cmb->add_field( array(\n\t\t\t\t\t'name' \t\t=> 'Summary',\n\t\t\t\t\t'desc' \t\t=> 'A Summary about this event.',\n\t\t\t\t\t'id' \t\t=> 'excerpt',\t\t\t\t\t\n\t\t\t\t\t'type' \t\t=> 'textarea',\n\t\t\t\t\t'escape_cb' \t\t=> false,\n\t\t\t\t) );\t\n\t\t\t\t\n\t\t\t\t$cmb->add_field( array(\n\t\t\t\t\t'name' \t\t=> 'Description',\n\t\t\t\t\t'desc' \t\t=> 'Event Description',\n\t\t\t\t\t'id' \t\t=> 'content',\t\t\t\t\t\n\t\t\t\t\t'type' \t\t=> 'wysiwyg',\n\t\t\t\t\t'escape_cb' \t\t=> false,\n\t\t\t\t) );\n\t\t\t\t\n\t\t\t\t$cmb->add_field( array(\n\t\t\t\t\t'name' \t\t\t\t=> __( 'Location', 'cmb2' ),\n\t\t\t\t\t'id' \t\t\t\t=> $this->prefix . 'location',\n\t\t\t\t\t'type' \t\t\t\t=> 'text',\n\t\t\t\t) );\t\n\n\t\t\t\t$cmb->add_field( array(\n\t\t\t\t\t'name' \t\t\t\t=> __( 'Event Date', 'cmb2' ),\n\t\t\t\t\t'id' \t\t\t\t=> $this->prefix . 'date',\n\t\t\t\t\t'type' \t\t\t\t=> 'text_date',\n\t\t\t\t) );\t\t\t\t\n\n\t\t\t\t$cmb->add_field( array(\n\t\t\t\t\t'desc' => 'Upload/Select an image.',\n\t\t\t\t\t'name' => 'Image',\n\t\t\t\t\t'id' => '_thumbnail',\t\t\t\t\t\n\t\t\t\t\t'type' => 'file',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'url' => false,\n\t\t\t\t\t),\n\t\t\t\t\t'text' => array(\n\t\t\t\t\t\t'add_upload_file_text' => 'Add Image'\n\t\t\t\t\t),\n\t\t\t\t) );\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t$cmb = \\new_cmb2_box( array(\n\t\t\t'id' \t\t=> $this->prefix . 'categories_metabox',\n\t\t\t'title' \t\t=> __( 'Categories', 'cmb2' ),\n\t\t\t'object_types' \t\t=> array( $this->post_type ),\n\t\t\t'context' \t\t=> 'normal',\n\t\t\t'priority' \t\t=> 'high',\n\t\t) );\t\n\t\t\n\t\t\t\t$cmb->add_field( array(\n\t\t\t\t\t'name' \t\t\t\t=> __( 'Category', 'cmb2' ),\n\t\t\t\t\t'desc' \t=> 'What is the category for this event',\n\t\t\t\t\t'id' \t=> $this->prefix . 'category',\n\t\t\t\t\t'taxonomy' \t=> 'event_category', \n\t\t\t\t\t'show_option_none' \t=> false,\n\t\t\t\t\t'type' \t=> 'taxonomy_select',\n\t\t\t\t\t'remove_default' \t=> 'true', \n\t\t\t\t\t'query_args' => array(\n\t\t\t\t\t),\n\t\t\t\t) );\n\t\t\t\t\n\t\t\t\t$cmb->add_field( array(\n\t\t\t\t\t'name' \t\t\t\t=> __( 'Event Topics', 'cmb2' ),\n\t\t\t\t\t'desc' \t\t\t=> 'What topics were covered at this event?',\n\t\t\t\t\t'id' \t\t\t\t=> $this->prefix . 'topics',\n\t\t\t\t\t'type' \t\t\t=> 'taxonomy_multicheck',\n\t\t\t\t\t'remove_default' \t=> 'true', \t\t\t\t\t\n\t\t\t\t\t'taxonomy' \t=> 'event_topic', \n\t\t\t\t) );\t\n\n\t\t\t\t$cmb->add_field( array(\n\t\t\t\t\t'name' \t\t\t\t=> __( 'Event Type', 'cmb2' ),\n\t\t\t\t\t'desc' \t=> 'What type of event is this',\n\t\t\t\t\t'id' \t=> $this->prefix . 'type',\n\t\t\t\t\t'taxonomy' \t=> 'event_type', \n\t\t\t\t\t'show_option_none' \t=> false,\t\t\t\t\t\n\t\t\t\t\t'type' \t=> 'taxonomy_select',\n\t\t\t\t\t'remove_default' \t=> 'true', \n\t\t\t\t\t'query_args' => array(\n\t\t\t\t\t),\n\t\t\t\t) );\n\t\t\t\t\t\t\t\t\n\t\t$cmb = \\new_cmb2_box( array(\n\t\t\t'id' \t\t=> $this->prefix . 'payment_metabox',\n\t\t\t'title' \t\t=> __( 'Payment', 'cmb2' ),\n\t\t\t'object_types' \t\t=> array( $this->post_type ),\n\t\t\t'context' \t\t=> 'normal',\n\t\t\t'priority' \t\t=> 'high',\n\t\t) );\t\t\t\t\t\n\t\t\n\t\t\t\t$cmb->add_field( array(\n\t\t\t\t\t'name' \t\t\t\t=> __( 'Event Payment Model', 'cmb2' ),\n\t\t\t\t\t'desc' \t=> 'What is the payment model for this event',\n\t\t\t\t\t'id' \t\t=> $this->prefix . 'payment_model',\n\t\t\t\t\t'taxonomy' \t=> 'event_payment_model',\n\t\t\t\t\t'show_option_none' \t=> false,\t\t\t\t\t\n\t\t\t\t\t'type' \t=> 'taxonomy_select',\n\t\t\t\t\t'remove_default' => 'true', \n\t\t\t\t\t'query_args' => array(\n\t\t\t\t\t),\n\t\t\t\t) );\n\n\t\t$cmb = \\new_cmb2_box( array(\n\t\t\t'id' \t\t=> $this->prefix . 'products',\n\t\t\t'title' \t\t=> __( 'Products', 'cmb2' ),\n\t\t\t'object_types' \t\t=> array( $this->post_type ),\n\t\t\t'context' \t\t=> 'normal',\n\t\t\t'priority' \t\t=> 'low',\n\t\t\t//'show_on_cb'\t\t=> function($cmb){\n\t\t\t\t//return(\\has_term( 'premium', 'event_payment_model')); REPLACE WITH JS\n\t\t\t//},\n\t\t) );\n\n\n\t\t\t\t$cmb->add_field( array(\n\t\t\t\t\t'name' \t\t\t\t=> __( 'Linked Products', 'cmb2' ),\n\t\t\t\t\t'desc' \t=> 'Which products when purchased give access to this event. This has no effect is the event is set to Free',\t\t\t\n\t\t\t\t\t'id' \t\t\t\t=> $this->prefix . 'products',\n\t\t\t\t\t'type' \t\t\t\t=> 'multicheck',\n\t\t\t\t\t'options' \t\t\t=> \\liod\\helpers\\cmb2::get_all_od_products(),\n\t\t\t\t) );\t\t\t\t\n\n\t\t\n\t}", "title": "" }, { "docid": "893cda07d3bfa6eb70acc694eeef9255", "score": "0.55309695", "text": "function dance_post_meta_boxes_setup() {\n\n /* Add meta boxes on the 'add_meta_boxes' hook. */\n add_action( 'add_meta_boxes', 'dance_add_post_meta_boxes' );\n /* Save post meta on the 'save_post' hook. */\n add_action( 'save_post', 'dance_save_post_class_meta', 10, 2 );\n }", "title": "" }, { "docid": "82b16dcc5e59581b590a811f327b0c7f", "score": "0.5527171", "text": "function save_meta_box($post_id) {\r\n \r\n if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) \r\n return $post_id;\r\n \r\n if ( !current_user_can( 'edit_post', $post_id ) )\r\n return $post_id;\r\n \r\n $post = get_post($post_id);\r\n if ($post->post_type == 'team') {\r\n $social = !empty($_POST['team_social']) ? $_POST['team_social'] : '';\r\n $job = !empty($_POST['team_job']) ? $_POST['team_job'] : '';\r\n update_post_meta($post_id, 'team_social', esc_attr($social));\r\n update_post_meta($post_id, 'team_job', esc_attr($job));\r\n } elseif ($post->post_type == 'works') {\r\n $category = !empty($_POST['works_category']) ? $_POST['works_category'] : '';\r\n $client = !empty($_POST['works_client']) ? $_POST['works_client'] : '';\r\n $link = !empty($_POST['works_link']) ? $_POST['works_link'] : '';\r\n $video_link = !empty($_POST['works_video_link']) ? $_POST['works_video_link'] : '';\r\n $gallery = !empty($_POST['portfolio_gallery']) ? $_POST['portfolio_gallery'] : '';\r\n update_post_meta($post_id, 'works_category', esc_attr($category));\r\n update_post_meta($post_id, 'works_client', esc_attr($client));\r\n update_post_meta($post_id, 'works_link', esc_attr($link));\r\n update_post_meta($post_id, 'works_video_link', esc_attr($video_link));\r\n update_post_meta($post_id, 'portfolio_gallery', esc_attr($gallery));\r\n } elseif ($post->post_type == 'program') {\r\n $category = !empty($_POST['program_category']) ? $_POST['program_category'] : '';\r\n $client = !empty($_POST['program_client']) ? $_POST['program_client'] : '';\r\n $link = !empty($_POST['program_link']) ? $_POST['program_link'] : '';\r\n $video_link = !empty($_POST['program_video_link']) ? $_POST['program_video_link'] : '';\r\n $gallery = !empty($_POST['portfolio_gallery']) ? $_POST['portfolio_gallery'] : '';\r\n update_post_meta($post_id, 'program_category', esc_attr($category));\r\n update_post_meta($post_id, 'program_client', esc_attr($client));\r\n update_post_meta($post_id, 'program_link', esc_attr($link));\r\n update_post_meta($post_id, 'program_video_link', esc_attr($video_link));\r\n update_post_meta($post_id, 'portfolio_gallery', esc_attr($gallery)); \r\n\r\n } elseif ($post->post_type == 'event') {\r\n $category = !empty($_POST['event_category']) ? $_POST['event_category'] : '';\r\n $client = !empty($_POST['event_client']) ? $_POST['event_client'] : '';\r\n $link = !empty($_POST['event_link']) ? $_POST['event_link'] : '';\r\n $video_link = !empty($_POST['event_video_link']) ? $_POST['event_video_link'] : '';\r\n $gallery = !empty($_POST['portfolio_gallery']) ? $_POST['portfolio_gallery'] : '';\r\n update_post_meta($post_id, 'event_category', esc_attr($category));\r\n update_post_meta($post_id, 'event_client', esc_attr($client));\r\n update_post_meta($post_id, 'event_link', esc_attr($link));\r\n update_post_meta($post_id, 'event_video_link', esc_attr($video_link));\r\n update_post_meta($post_id, 'portfolio_gallery', esc_attr($gallery)); \r\n\r\n } elseif ($post->post_type == 'page') {\r\n $page_animation = !empty($_POST['page_animation']) ? $_POST['page_animation'] : '';\r\n update_post_meta($post_id, 'page_animation', esc_attr($page_animation));\r\n }\r\n \r\n return $post_id;\r\n}", "title": "" }, { "docid": "60da3fdcfb29e1f5853df01eee730a4f", "score": "0.55234504", "text": "function frenchpress_save_meta_box_data( $post_id ) {\n\n\t/*\n\t * We need to verify this came from our screen and with proper authorization,\n\t * because the save_post action can be triggered at other times.\n\t */\n\n\t// Check if our nonce is set.\n\tif ( ! isset( $_POST['frenchpress_meta_box_nonce'] ) ) {\n\t\treturn;\n\t}\n\n\t// Verify that the nonce is valid.\n\tif ( ! wp_verify_nonce( $_POST['frenchpress_meta_box_nonce'], 'frenchpress_save_meta_box_data' ) ) {\n\t\treturn;\n\t}\n\n\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\treturn;\n\t}\n\n\t// Check the user's permissions.\n\tif ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\n\t\tif ( ! current_user_can( 'edit_page', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t} else {\n\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t/* OK, it's safe for us to save the data now. */\n\n\t// Make sure that it is set.\n\tif ( ! isset( $_POST['frenchpress_new_field'] ) ) {\n\t\treturn;\n\t}\n\n\t// Sanitize user input.\n\t$my_data = sanitize_text_field( $_POST['frenchpress_new_field'] );\n\n\t// Update the meta field in the database.\n\tupdate_post_meta( $post_id, 'frenchpress_schema_article', $my_data );\n}", "title": "" }, { "docid": "65f41f614599a0da5d342a9fc343a223", "score": "0.55226153", "text": "function vh_metabox_setup() {\n\tadd_action( 'add_meta_boxes', 'vh_add_metabox' );\n\n\t/* Save post meta on the 'save_post' hook. */\n\tadd_action( 'save_post', 'animal_location_metabox', 10, 2 );\n}", "title": "" }, { "docid": "a42d79bcc80f7662fb5444010fe988c8", "score": "0.5516062", "text": "static function save_meta_boxes ($post_id, $post, $is_update)\n {\n // Bail if we're doing an auto save\n if (defined( 'DOING_AUTOSAVE' ) && \\DOING_AUTOSAVE) return;\n foreach ($_REQUEST as $k => $v) {\n $matched = array();\n if (preg_match(sprintf('/%s-nonce-meta_box_([a-zA-Z0-9_]+)$/',\n Person::get_post_type()),\n $k, $matched)) {\n $save_method_name = \"save_meta_box_\" . $matched[1];\n if (method_exists(get_called_class(), $save_method_name)) {\n if (! wp_verify_nonce($v, $k)) {\n wp_die(___(\"Nonce check failed\"));\n } elseif (! current_user_can('edit_post')) {\n wp_die(___(\"Permission denied: edit person\"));\n } elseif (self::$saved_meta_boxes[$k]) {\n // Break out of silly recursion: we call\n // writer functions such as wp_insert_post()\n // and wp_update_post(), which call us back\n return;\n } else {\n self::$saved_meta_boxes[$k] = true;\n call_user_func(\n array(get_called_class(), $save_method_name),\n $post_id, $post, $is_update);\n }\n }\n }\n } // End foreach\n }", "title": "" }, { "docid": "581c4032f2d216c498fe1bd406bcbee3", "score": "0.5515784", "text": "function save_custom_meta( $term_id ) {\n\n\t\tif ( isset( $_POST['term_meta'] ) ) {\n\t\t\t$t_id = $term_id;\n\t\t\t$term_meta = get_option( \"event_calendar_$t_id\" );\n\t\t\t$cat_keys = array_keys( $_POST['term_meta'] );\n\t\t\tforeach ( $cat_keys as $key ) {\n\t\t\t\tif ( isset ( $_POST['term_meta'][$key] ) ) {\n\t\t\t\t\t$value = $_POST['term_meta'][$key];\n\t\t\t\t\t$term_meta[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Save the option array.\n\t\t\tupdate_option( \"event_calendar_$t_id\", $term_meta );\n\t\t}\n\t}", "title": "" }, { "docid": "ca8e63f830a67e0055ef967f30cf02e3", "score": "0.54966414", "text": "function save_as_post($info){\n\t\textract($info);\n\t\t$my_post = array(\n\t\t 'post_title' => $SeriesName,\n\t\t 'post_content' => $Overview ,\n\t\t 'post_type' =>'series' ,\n\t\t 'post_status' => 'publish',\n\t\t 'post_author' => 1,\n\t\t 'post_excerpt' => substr( $Overview,0,50 )\n\t\t);\n\n // Insert the post into the database\n\t\t$res=wp_insert_post( $my_post );\n\t\tif($res){\n\t\t\tadd_post_meta($res,'series_meta',$info);\n\t\t\t$default_value = get_option('tvdvseries_posts_optios');\n\t\t\tadd_post_meta($res,'_mgm_post_options',$default_value,true); \n\n }\n\t\t$this->upload_image($id,array('banner' => $banner, 'poster' => $poster))\t;\n\t\t\t\n\t}", "title": "" }, { "docid": "4dd1587381a90aa63ee4e36ceb0e057d", "score": "0.54944164", "text": "function metaboxes() {\n\t\t// add_meta_box('richard_attorneys_metabox', __( 'Attorneys Main', 'richard' ), array( $this, 'richard_attorneys_metabox' ), $this->pagehook, 'main', 'high');\n\t\t// add_meta_box('richard_top_image_metabox', __( 'Default Top Image', 'richard' ), array( $this, 'richard_top_image_metabox' ), $this->pagehook, 'main', 'high');\n\t\tadd_meta_box('richard_navigation_metabox', __( 'Menu Extras', 'richard' ), array( $this, 'richard_navigation_metabox' ), $this->pagehook, 'main', 'high');\n\t\tadd_meta_box('richard_footer_info_metabox', __( 'Footer Info', 'richard' ), array( $this, 'richard_footer_info_metabox' ), $this->pagehook, 'main', 'high');\n\t\t// add_meta_box('wsm_upate_notifications_metabox', __( 'Update Notifications', 'richard' ), array( $this, 'wsm_upate_notifications_metabox' ), $this->pagehook, 'main', 'high');\n\t}", "title": "" }, { "docid": "7ef7fcb18187d2652aa49207249f0683", "score": "0.54834414", "text": "function create(){\n $meta = $this->_model->meta();\n foreach ($meta as $key => $field){\n if ( isset( $this->_post[$key])) $meta->$key = $this->_post[$key];\n }\n $meta->save();\n }", "title": "" }, { "docid": "9b9d17e5aca23e6c107ace7984d1f9d9", "score": "0.54812187", "text": "function setCustomMetaBoxes()\n\t\t{\n\t\t\t$this->metaboxes = [\n\t\t\t\t['id' => 'ticket_price', 'title' => 'Ticket Price', 'cb' => 'setInputTicketPrice'],\n\t\t\t\t['id' => 'release_date', 'title' => 'Release Date', 'cb' => 'setInputReleaseDate']\n\t\t\t];\n\t\t}", "title": "" }, { "docid": "86f89e3dcd15d3450ab11e7db39e5b69", "score": "0.54783064", "text": "private function form_editor_save($tab) {\r\n\r\n $field_type = ! empty( $_POST['type'] ) ? array_map( 'sanitize_text_field', $_POST['type'] ) : array();\r\n $field_name = ! empty( $_POST['name'] ) ? array_map( 'sanitize_textarea_field', $_POST['name'] ) : array();\r\n //$field_label = ! empty( $_POST['label'] ) ? array_map( 'sanitize_text_field', $_POST['label'] ) : array();\r\n $field_placeholder = ! empty( $_POST['placeholder'] ) ? array_map( 'wp_kses_post', $_POST['placeholder'] ) : array();\r\n $field_class = ! empty( $_POST['class'] ) ? array_map( 'sanitize_text_field', $_POST['class'] ) : array();\r\n $field_css_class = ! empty( $_POST['css_class'] ) ? array_map( 'sanitize_text_field', $_POST['css_class'] ) : array();\r\n $field_multi = ! empty( $_POST['multi'] ) ? array_map( 'sanitize_text_field', $_POST['multi'] ) : array();\r\n \r\n $field_priority = ! empty( $_POST['priority'] ) ? array_map( 'sanitize_text_field', $_POST['priority'] ) : array();\r\n $field_place = ! empty( $_POST['place'] ) ? array_map( 'sanitize_text_field', $_POST['place'] ) : array();\r\n $field_taxonomy = ! empty( $_POST['field_taxonomy'] ) ? array_map( 'sanitize_text_field', $_POST['field_taxonomy'] ): array();\r\n $field_max = ! empty( $_POST['max'] ) ? array_map( 'sanitize_text_field', $_POST['max'] ) : array();\r\n $field_min = ! empty( $_POST['min'] ) ? array_map( 'sanitize_text_field', $_POST['min'] ) : array();\r\n $field_unit = ! empty( $_POST['unit'] ) ? array_map( 'sanitize_text_field', $_POST['unit'] ) : array();\r\n $field_state = ! empty( $_POST['state'] ) ? array_map( 'sanitize_text_field', $_POST['state'] ) : array();\r\n $field_options_cb = ! empty( $_POST['options_cb'] ) ? array_map( 'sanitize_text_field', $_POST['options_cb'] ) : array();\r\n $field_options_source = ! empty( $_POST['options_source'] ) ? array_map( 'sanitize_text_field', $_POST['options_source'] ): array();\r\n $field_options = ! empty( $_POST['options'] ) ? $this->sanitize_array( $_POST['options'] ) : array();\r\n $new_fields = array();\r\n $index = 0;\r\n\r\n foreach ( $field_name as $key => $field ) {\r\n \r\n \r\n $name = sanitize_title( $field_name[ $key ] );\r\n\r\n $options = array();\r\n if(! empty( $field_options[ $key ] )){\r\n foreach ($field_options[ $key ] as $op_key => $op_value) {\r\n $options[$op_value['name']] = $op_value['value'];\r\n } \r\n }\r\n $new_field = array();\r\n $new_field['type'] = isset($field_type[ $key ]) ? $field_type[ $key ] : 'text';\r\n $new_field['name'] = $field_name[ $key ];\r\n //$new_field['label'] = $field_label[ $key ];\r\n $new_field['placeholder'] = $field_placeholder[ $key ];\r\n if($tab !='search_on_home_page' ) : \r\n $new_field['class'] = isset($field_class[ $key ]) ? $field_class[ $key ] : '';\r\n endif;\r\n \r\n $new_field['css_class'] = $field_css_class[ $key ];\r\n $new_field['multi'] = isset($field_multi[ $key ]) ? $field_multi[ $key ] : false;\r\n $new_field['priority'] = $field_priority[ $key ];\r\n $new_field['place'] = isset($field_place[ $key ]) ? $field_place[ $key ] : 'main';\r\n $new_field['taxonomy'] = $field_taxonomy[ $key ];\r\n $new_field['max'] = $field_max[ $key ];\r\n $new_field['min'] = $field_min[ $key ];\r\n \r\n if(!empty($field_state[ $key ])){\r\n $new_field['state'] = $field_state[ $key ]; \r\n }\r\n \r\n \r\n $new_field['options_source'] = $field_options_source[ $key ];\r\n $new_field['options_cb'] = $field_options_cb[ $key ];\r\n if(!empty($field_options_cb[ $key ])) {\r\n $new_field['options'] = array();\r\n } else {\r\n $new_field['options'] = $options;\r\n }\r\n $new_field['priority'] = $index ++;\r\n \r\n $new_fields[ $name ] = $new_field;\r\n \r\n }\r\n\r\n $result = update_option( \"listeo_{$tab}_form_fields\", $new_fields);\r\n \r\n\r\n if ( true === $result ) {\r\n echo '<div class=\"updated\"><p>' . __( 'The fields were successfully saved.', 'wp-job-manager-applications' ) . '</p></div>';\r\n }\r\n \r\n }", "title": "" }, { "docid": "fc92d726fa50079bdd2aa58568ec4f8b", "score": "0.5469752", "text": "function cheffism_save_schema_meta_box( $post_id ) {\n\n /*\n * We need to verify this came from our screen and with proper authorization,\n * because the save_post action can be triggered at other times.\n */\n\n // Check if our nonce is set.\n if ( ! isset( $_POST['cheffism_schema_meta_box_nonce'] ) ) {\n return;\n }\n\n // Verify that the nonce is valid.\n if ( ! wp_verify_nonce( $_POST['cheffism_schema_meta_box_nonce'], 'cheffism_schema_meta_box' ) ) {\n return;\n }\n\n // If this is an autosave, our form has not been submitted, so we don't want to do anything.\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n return;\n }\n\n // Check the user's permissions.\n if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\n if ( ! current_user_can( 'edit_page', $post_id ) ) {\n return;\n }\n\n } else {\n\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\n return;\n }\n }\n\n /* OK, it's safe for us to save the data now. */\n \n // Make sure that it is set.\n if ( ! isset( $_POST['cheffism_schema_type'] ) ) {\n return;\n }\n\n // Sanitize user input.\n $my_data = sanitize_text_field( $_POST['cheffism_schema_type'] );\n\n // Update the meta field in the database.\n update_post_meta( $post_id, '_cheffism_schema_type', $my_data );\n}", "title": "" }, { "docid": "1ad00bf2d077c641279979d93da110a7", "score": "0.54668415", "text": "public function SaveItem() {\n try {\n // Update any fields for controls that have been created\n //if ($this->txtNombre) $this->objItem->Nombre = $this->txtNombre->Text;\n if ($this->txtDescripcion) {\n $this->objItem->Descripcion = $this->txtDescripcion->Text;\n $strNombre = strtolower(substr($this->objItem->Descripcion, 0, 254));\n $strNombre = str_replace(array('á','é','í','ó','ú','ñ'), array('a','e','i','o','u','ni'), $strNombre);\n $strNombre = str_replace(array('!','-',' ','.','?',')', '(', ',',':', \"'\", \"'\",'+','&','$'), '_', $strNombre);\n $strNombre = preg_replace('/[^\\w]+/', '', $strNombre);\n $this->objItem->Nombre = $strNombre;\n }\n if ($this->txtSeccion) $this->objItem->Seccion = $this->txtSeccion->SelectedValue;\n $this->objItem->IdTipoDatoType = TipoDatoType::checkboxortext;\n\n if ($this->lstIdPaisObject->SelectedValue) $this->objItem->IdPais = $this->lstIdPaisObject->SelectedValue;\n else $this->objItem->IdPais = 2;\n\n // Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n // Save the Item object\n $this->objItem->Save();\n\n // Finally, update any ManyToManyReferences (if any)\n } catch (QCallerException $objExc) {\n $objExc->IncrementOffset();\n throw $objExc;\n }\n }", "title": "" }, { "docid": "854eacb5cb07f679efa35e723b459142", "score": "0.5466293", "text": "function save_meta_box( $post_id, $post ) {\r\n\t\r\n\t\t/* Verify that the post type supports the meta box and the nonce before preceding. */\r\n\t\tif ( !isset( $_POST[\"{$post->post_type}_meta_box_nonce\"] ) || !wp_verify_nonce( $_POST[\"{$post->post_type}_meta_box_nonce\"], basename( __FILE__ ) ) )\r\n\t\t\treturn $post_id;\r\n\t\r\n\t\t/* Get the post type object. */\r\n\t\t$post_type = get_post_type_object( $post->post_type );\r\n\t\r\n\t\t/* Check if the current user has permission to edit the post. */\r\n\t\tif ( !current_user_can( $post_type->cap->edit_post, $post_id ) )\r\n\t\t\treturn $post_id;\r\n\t\r\n\t\t/* Get the post meta box arguments. */\r\n\t\t$metadata = $this->meta_box_args( $_POST['post_type'] );\r\n\t\t\n\t\t// need to edit this to take arrays for repeatable...\n\n\t\tforeach ( $metadata as $meta ) {\n\t\t\t\n\t\t\t$name = $meta['name'];\n\t\t\t\n\t\t\t// if name is an array, need to loop through?\n\t\t\t\n\t\t\t$posted[$name]['name'] = $name;\n\t\t\t$posted[$name]['data'] = $_POST[ preg_replace( \"/[^A-Za-z_-]/\", '-', $name ) ];\n\t\t\t$posted[$name]['type'] = $meta['type'];\n\t\t\t\t\t\n\t\t}\n\t\t\n\t\t$metadata = Plugin_Starter_Admin::validate_posted( $posted );\n\t\t\n\t\t// for testing...\n\t\t//update_option( $this->domain . '_testing_meta' , $metadata );\n\t\n\t\t\r\n\t\t/* Loop through all of post meta box arguments. */\r\n\t\tforeach ( $metadata as $name => $meta ) {\r\n\t\r\n\t\t\t$meta_value = get_post_meta( $post_id, $name, true );\r\n\t\t\t$new_meta_value = stripslashes( $_POST[ preg_replace( \"/[^A-Za-z_-]/\", '-', $meta['name'] ) ] );\r\n\t\r\n\t\t\tif ( $new_meta_value && '' == $meta_value )\r\n\t\t\t\tadd_post_meta( $post_id, $meta['name'], $new_meta_value, true );\r\n\t\t\telseif ( $new_meta_value && $new_meta_value != $meta_value )\r\n\t\t\t\tupdate_post_meta( $post_id, $meta['name'], $new_meta_value );\r\n\t\t\telseif ( '' == $new_meta_value && $meta_value )\r\n\t\t\t\tdelete_post_meta( $post_id, $meta['name'], $meta_value );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c15767888c25669e79c204959d006250", "score": "0.5457002", "text": "function log_favourites_add_post_metaboxes() {\n add_meta_box(\n 'log-favourites-element',\n 'Save as favourite',\n array( $this ,'log_favourites_display_metabox' ), // function to handle the display\n array('post'),\n 'side',\n 'high'\n );\n\t}", "title": "" }, { "docid": "6fa8bd87a8d1583fdff90b5f79457baf", "score": "0.545447", "text": "public function save_meta_boxes( $post_id, $post ) {\n\t\tif(in_array($post->post_type,array('post','page','category'))){\n\t\t\t//clear vietnamese character in post link\n\t\t\t$post->post_name = FvnHelper::translate_eng(urldecode($post->post_name));\n\t\t\tglobal $wpdb;\n\t\t\t$wpdb->update($wpdb->posts, array('post_name'=>$post->post_name), array('ID'=>$post->ID));\n\t\t}\n\t\t// Check the nonce\n\t\tif ( empty( $_POST['hb_meta_nonce'] ) || ! wp_verify_nonce( $_POST['hb_meta_nonce'], 'HB_save_data' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t// $post_id and $post are required\n\t\tif ( empty( $post_id ) || empty( $post )) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Dont' save meta boxes for revisions or autosaves\n\t\tif ( defined( 'DOING_AUTOSAVE' ) || is_int( wp_is_post_revision( $post ) ) || is_int( wp_is_post_autosave( $post ) ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Check the post being saved == the $post_id to prevent triggering this call for other save_post events\n\t\tif ( empty( $_POST['post_ID'] ) || $_POST['post_ID'] != $post_id ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check user has permission to edit\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// import metabox and save\n\t\t$view_name = substr($post->post_type, 8);\n\t\tFvnImporter::metabox($view_name);\n\t\t$class = 'HBView'.$view_name.'_Metabox';\n\t\t//$func = 'save_'.$post->post_type;\n\t\t$check = $class::save( $post_id, $post );\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d05f1cac48cb8d5d29ed90f738587c80", "score": "0.5451898", "text": "function woo_add_custom_general_fields_save( $post_id ) {\n $woocommerce_text_field_amazon_link = $_POST['_amazon_link'];\n \tif( !empty( $woocommerce_text_field_amazon_link ) )\n \t\tupdate_post_meta( $post_id, '_amazon_link', esc_attr( $woocommerce_text_field_amazon_link ) );\n\n $woocommerce_select_field_print_type = $_POST['_print_type'];\n \tif( !empty( $woocommerce_select_field_print_type ) )\n \t\tupdate_post_meta( $post_id, '_print_type', esc_attr( $woocommerce_select_field_print_type ) );\n\n $woocommerce_text_field_isbn = $_POST['_isbn'];\n if( !empty( $woocommerce_text_field_isbn ) )\n update_post_meta( $post_id, '_isbn', esc_attr( $woocommerce_text_field_isbn ) );\n\n $woocommerce_text_field_number_of_pages = $_POST['_number_of_pages'];\n if( !empty( $woocommerce_text_field_number_of_pages ) )\n update_post_meta( $post_id, '_number_of_pages', esc_attr( $woocommerce_text_field_number_of_pages ) );\n\n $woocommerce_select_field_book_format = $_POST['_book_format'];\n if( !empty( $woocommerce_select_field_book_format ) )\n update_post_meta( $post_id, '_book_format', esc_attr( $woocommerce_select_field_book_format ) );\n }", "title": "" }, { "docid": "4e8d73bc86043ff72c9b3d2dbe9f5652", "score": "0.5431166", "text": "function vw_corporate_pro_posttype_ex_bn_metadesig_save( $post_id ) {\n if( isset( $_POST[ 'meta-desig' ] ) ) {\n update_post_meta( $post_id, 'meta-desig', esc_html($_POST[ 'meta-desig' ]) );\n }\n if( isset( $_POST[ 'meta-call' ] ) ) {\n update_post_meta( $post_id, 'meta-call', esc_html($_POST[ 'meta-call' ]) );\n }\n // Save facebookurl\n if( isset( $_POST[ 'meta-facebookurl' ] ) ) {\n update_post_meta( $post_id, 'meta-facebookurl', esc_url($_POST[ 'meta-facebookurl' ]) );\n }\n // Save linkdenurl\n if( isset( $_POST[ 'meta-linkdenurl' ] ) ) {\n update_post_meta( $post_id, 'meta-linkdenurl', esc_url($_POST[ 'meta-linkdenurl' ]) );\n }\n if( isset( $_POST[ 'meta-twitterurl' ] ) ) {\n update_post_meta( $post_id, 'meta-twitterurl', esc_url($_POST[ 'meta-twitterurl' ]) );\n }\n // Save googleplusurl\n if( isset( $_POST[ 'meta-googleplusurl' ] ) ) {\n update_post_meta( $post_id, 'meta-googleplusurl', esc_url($_POST[ 'meta-googleplusurl' ]) );\n }\n // Save designation\n if( isset( $_POST[ 'meta-designation' ] ) ) {\n update_post_meta( $post_id, 'meta-designation', esc_html($_POST[ 'meta-designation' ]) );\n }\n}", "title": "" }, { "docid": "4c5e05f23106e9e63c7cad08ade31d13", "score": "0.5425148", "text": "public function saveMetabox($postId)\n {\n // First, have a look if we're able to save\n if (\n // Don't save on auto save as there is not data sent\n defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ||\n // Also, don't save on bulk edit, no data as well\n isset($_REQUEST['bulk_edit']) ||\n (\n // Don't save on inline, trashing or untrashing, there's no meta data\n isset($_REQUEST['action']) && (\n $_REQUEST['action'] == 'inline-save' ||\n $_REQUEST['action'] == 'trash' ||\n $_REQUEST['action'] == 'untrash'\n )\n )\n ) {\n return;\n }\n\n // If we save a revision, change the revision post id to the original, to make the preview work\n if ($origPostId = wp_is_post_revision($postId)) {\n $postId = $origPostId;\n }\n\n foreach ($this->fields as $box => $fields) {\n foreach ($fields as $field) {\n callUserFunctionWithSafeArguments($field['save'], array($postId, $field, $box));\n }\n }\n\n if (count($this->errors) > 0) {\n $_SESSION['metabox_errors_' . $this->posttype] = $this->errors;\n }\n }", "title": "" }, { "docid": "631af75fb443d21b6b37827dc1125c81", "score": "0.54215324", "text": "public function add_meta_boxes() {\t\n\t\t$screen = get_current_screen();\n\t\t//auto import metabox file\n// \t\tdebug(strpos('dest', $screen->post_type));die;\n\t\tif(strpos('hb', $screen->post_type)==0){\n\t\t\t$view_name = substr($screen->post_type, 3);\n\t\t\tif(is_file(FVN_PATH.'includes/admin/'.$view_name.'/metabox.php')){\n\t\t\t\tFvnImporter::metabox($view_name);\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "8dbdc365450740f786d71d09f176bae0", "score": "0.5418575", "text": "function custom_save_metabox($post_id){\n\n // check autosave\n if( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) {\n return $post_id;\n }\n if( isset($_POST['custom_vuehaus_template']) ) {\n\t update_post_meta($post_id, 'custom_vuehaus_template', $_POST['custom_vuehaus_template']);\n }\n if( isset($_POST['custom_video_url']) ) {\n\t update_post_meta($post_id, 'custom_video_url', $_POST['custom_video_url']);\n }\n // if( isset($_POST['second_post_thumbnail']) ) {\n\t // update_post_meta($post_id, 'second_post_thumbnail', $_POST['second_post_thumbnail']);\n // }\n\n }", "title": "" }, { "docid": "742a7983cef4c84aeff74a3d10143643", "score": "0.5413757", "text": "protected function save_post_meta()\n {\n foreach ($this->dirty as $key => $value) {\n\n if ($this->is_post_meta($key)) {\n\n update_post_meta($this->post['ID'], $key, $this->post_meta[$key]);\n }\n }\n }", "title": "" }, { "docid": "5dcced771885aa183a77c018abcf7412", "score": "0.5404525", "text": "public function add_meta_boxes() {\n\t\tadd_meta_box( 'mc4wp-form-settings', __( 'Form Settings', 'mailchimp-for-wp' ), array( $this, 'show_required_form_settings_metabox' ), 'mc4wp-form', 'side', 'high' );\n\t\tadd_meta_box( 'mc4wp-optional-settings', __( 'Optional Settings', 'mailchimp-for-wp' ), array( $this, 'show_optional_form_settings_metabox' ), 'mc4wp-form', 'normal', 'high' );\n\t\tadd_meta_box( 'mc4wp-form-variables', __( 'Variables', 'mailchimp-for-wp' ), array( $this, 'show_form_variables_metabox' ), 'mc4wp-form', 'side' );\n\t}", "title": "" }, { "docid": "4df4e96df447bfd128a2102f072fa4c7", "score": "0.5401948", "text": "function gavern_metaboxes_save( $post_id ) {\n if( !current_user_can( 'edit_post', $post_id ) ) {\n \treturn;\n }\n // avoid requests on the autosave \n if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n \treturn; \n } \n // check the existing of the fields and save it\n if( isset( $_POST['gavern-post-desc-value'] ) ) {\n // check the nonce\n if( !isset( $_POST['gavern_meta_box_seo_nonce'] ) || !wp_verify_nonce( $_POST['gavern_meta_box_seo_nonce'], 'gavern-post-seo-nonce' ) ) {\n \treturn;\n }\n // update post meta\n update_post_meta( $post_id, 'gavern-post-desc', esc_attr( $_POST['gavern-post-desc-value'] ) ); \n }\n \t//\n if( isset( $_POST['gavern-post-keywords-value'] ) ) {\n \t// check the nonce\n \tif( !isset( $_POST['gavern_meta_box_seo_nonce'] ) || !wp_verify_nonce( $_POST['gavern_meta_box_seo_nonce'], 'gavern-post-seo-nonce' ) ) {\n \t\treturn;\n \t}\n \t// update post meta\n update_post_meta( $post_id, 'gavern-post-keywords', esc_attr( $_POST['gavern-post-keywords-value'] ) ); \n }\n //\n if( isset( $_POST['gavern-post-params-title-value'] ) ) {\n \t// check the nonce\n \tif( !isset( $_POST['gavern_meta_box_params_nonce'] ) || !wp_verify_nonce( $_POST['gavern_meta_box_params_nonce'], 'gavern-post-params-nonce' ) ) {\n \t\treturn;\n \t}\n \t// update post meta\n update_post_meta( $post_id, 'gavern-post-params-title', esc_attr( $_POST['gavern-post-params-title-value'] ) ); \n }\n //\n if( isset( $_POST['gavern-post-params-aside-value'] ) ) {\n \t// check the nonce\n \tif( !isset( $_POST['gavern_meta_box_params_nonce'] ) || !wp_verify_nonce( $_POST['gavern_meta_box_params_nonce'], 'gavern-post-params-nonce' ) ) {\n \t\treturn;\n \t}\n \t$aside_value = array(\n \t\t'aside' => esc_attr( $_POST['gavern-post-params-aside-value'] ),\n \t\t'date' => esc_attr( $_POST['gavern-post-params-date-value'] ),\n \t\t'author' => esc_attr( $_POST['gavern-post-params-author-value'] ),\n \t\t'category' => esc_attr( $_POST['gavern-post-params-category-value'] ),\n \t\t'tags' => esc_attr( $_POST['gavern-post-params-tags-value'] ),\n \t\t'comments' => esc_attr( $_POST['gavern-post-params-comments-value'] )\n \t);\n \t// update post meta\n update_post_meta( $post_id, 'gavern-post-params-aside', serialize($aside_value) ); \n }\n //\n if( isset( $_POST['gavern-post-params-image-value'] ) ) {\n \t// check the nonce\n \tif( !isset( $_POST['gavern_meta_box_params_nonce'] ) || !wp_verify_nonce( $_POST['gavern_meta_box_params_nonce'], 'gavern-post-params-nonce' ) ) {\n \t\treturn;\n \t}\n \t// update post meta\n update_post_meta( $post_id, 'gavern-post-params-image', esc_attr( $_POST['gavern-post-params-image-value'] ) ); \n }\n //\n if( isset( $_POST['gavern-post-params-contact-name'] ) ) {\n \t// check the nonce\n \tif( !isset( $_POST['gavern_meta_box_params_nonce'] ) || !wp_verify_nonce( $_POST['gavern_meta_box_params_nonce'], 'gavern-post-params-nonce' ) ) {\n \t\treturn;\n \t}\n \t// update post meta\n \t$contact_value = esc_attr( $_POST['gavern-post-params-contact-name'] ) . ',' . esc_attr( $_POST['gavern-post-params-contact-email'] ) . ',' . esc_attr( $_POST['gavern-post-params-contact-copy'] );\n \t$templates_value = array('contact' => $contact_value);\n update_post_meta( $post_id, 'gavern-post-params-templates', serialize($templates_value) ); \n }\n}", "title": "" }, { "docid": "866cab854490c274d617e55646d00d67", "score": "0.5393945", "text": "function register_post_type_metadata(array $meta_boxes){\r\n\t\t$fields = array(\t\r\n\t\t\t\tarray( 'id' => 'portfolio-style', 'name' => esc_html__('Style', 'cactus'), 'type' => 'select', 'options' => array( '' => esc_html__('Default', 'cactus'),'big-gallery' => esc_html__('Big gallery', 'cactus'), 'small-gallery' => esc_html__('Small gallery', 'cactus'), 'big-image' => esc_html__('Big Image', 'cactus'), 'small-image' => esc_html__('Image List', 'cactus')),'desc' => esc_html__('Select \"Default\" to use settings in Plugin Options', 'cactus'), 'repeatable' => false, 'multiple' => false),\r\n\t\t\t\tarray( 'id' => 'portfolio-video_embed', 'name' => esc_html__('Video Embedded Code','cactus'), 'type' => 'textarea' , 'desc' => esc_html__('(available when Style is not \"Image List\") To use Video instead of images, enter Video Embedded Code here','cactus'), 'repeatable' => false, 'multiple' => false),\r\n\t\t\t\t);\r\n\t\t\t\r\n\t\t$meta_boxes[] = array(\r\n\t\t\t'title' => esc_html__('Layout Settings','cactus'),\r\n\t\t\t'pages' => 'ct_portfolio',\r\n\t\t\t'fields' => $fields,\r\n\t\t\t'priority' => 'high'\r\n\t\t);\r\n\t\t$tmr_criteria = $this->get_option('portfolio-metadata');\r\n\t\t $tmr_criteria = $tmr_criteria?explode(\",\", $tmr_criteria):'';\r\n\t\t if($tmr_criteria){\r\n\t\t\t foreach($tmr_criteria as $criteria){\r\n\t\t\t\t $meta_box_ct[] = array(\r\n\t\t\t\t\t 'id' => 'portfolio_'.sanitize_title($criteria),\r\n\t\t\t\t\t 'name' => $criteria,\r\n\t\t\t\t\t 'type' => 'text',\r\n\t\t\t\t\t 'desc'\t\t=>'',\r\n\t\t\t\t\t 'repeatable' => false,\r\n\t\t\t\t\t 'multiple' => false\r\n\t\t\t\t );\r\n\t\t\t }\r\n\t\t\t$meta_boxes[] = array(\r\n\t\t\t\t'title' => esc_html__('Custom Meta','cactus'),\r\n\t\t\t\t'pages' => 'ct_portfolio',\r\n\t\t\t\t'fields' => $meta_box_ct,\r\n\t\t\t\t'priority' => 'high'\r\n\t\t\t);\r\n\t\t }\r\n\t\treturn $meta_boxes;\r\n\t}", "title": "" }, { "docid": "6d9684aa48e0d0738ee71aeb124eba38", "score": "0.5393233", "text": "function savewppresentrsettings_squeeze( $post_id )\r\n{\r\n\tif( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\r\n\t\r\n\t// if our nonce isn't there, or we can't verify it, bail\r\n\tif( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\r\n\t\r\n\t// if our current user can't edit this post, bail\r\n\tif( !current_user_can( 'edit_post' ) ) return;\r\n\t\r\n\t// now we can actually save the data\r\n\t$allowed = array( \r\n\t\t'a' => array( // on allow a tags\r\n\t\t\t'href' => array() // and those anchords can only have href attribute\r\n\t\t)\r\n\t);\r\n\t\r\n\t// Probably a good idea to make sure your data is set\r\n\tif( isset( $_POST['timer'] ) )\r\n\t\tupdate_post_meta( $post_id, 'timer', wp_kses( $_POST['timer'], $allowed ) );\r\n\t\t\r\n\tif( isset( $_POST['paragraph'] ) )\r\n\t\tupdate_post_meta( $post_id, 'paragraph', esc_attr( $_POST['paragraph'] ) );\r\n\t\t\r\n\tif( isset( $_POST['item1name'] ) )\r\n\t\tupdate_post_meta( $post_id, 'item1name', esc_attr( $_POST['item1name'] ) );\r\n\t\t\r\n\tif( isset( $_POST['item1price'] ) )\r\n\t\tupdate_post_meta( $post_id, 'item1price', esc_attr( $_POST['item1price'] ) );\r\n\t\t\r\n\tif( isset( $_POST['item1image'] ) )\r\n\t\tupdate_post_meta( $post_id, 'item1image', esc_attr( $_POST['item1image'] ) );\r\n\r\nif( isset( $_POST['buttonstyle'] ) )\r\n\t\tupdate_post_meta( $post_id, 'buttonstyle', esc_attr( $_POST['buttonstyle'] ) );\r\n\t\t\r\n\t\r\n\r\n\tif( isset( $_POST['typography'] ) )\r\n\t\tupdate_post_meta( $post_id, 'typography', esc_attr( $_POST['typography'] ) );\r\n\r\nif( isset( $_POST['mainheadline'] ) )\r\n\t\tupdate_post_meta( $post_id, 'mainheadline', esc_attr( $_POST['mainheadline'] ) );\r\n\r\n\tif( isset( $_POST['footer'] ) )\r\n\t\tupdate_post_meta( $post_id, 'footer', esc_attr( $_POST['footer'] ) );\r\n\r\n\tif( isset( $_POST['videourl'] ) )\r\n\t\tupdate_post_meta( $post_id, 'videourl', esc_attr( $_POST['videourl'] ) );\r\n\r\n\tif( isset( $_POST['background'] ) )\r\n\t\tupdate_post_meta( $post_id, 'background', esc_attr( $_POST['background'] ) );\r\n\r\n\tif( isset( $_POST['bulleticon1'] ) )\r\n\t\tupdate_post_meta( $post_id, 'bulleticon1', esc_attr( $_POST['bulleticon1'] ) );\r\n\r\n\tif( isset( $_POST['benefit1'] ) )\r\n\t\tupdate_post_meta( $post_id, 'benefit1', esc_attr( $_POST['benefit1'] ) );\r\n\r\n\tif( isset( $_POST['bulleticon2'] ) )\r\n\t\tupdate_post_meta( $post_id, 'bulleticon2', esc_attr( $_POST['bulleticon2'] ) );\r\n\r\n\tif( isset( $_POST['benefit2'] ) )\r\n\t\tupdate_post_meta( $post_id, 'benefit2', esc_attr( $_POST['benefit2'] ) );\r\n\r\n\tif( isset( $_POST['bulleticon3'] ) )\r\n\t\tupdate_post_meta( $post_id, 'bulleticon3', esc_attr( $_POST['bulleticon3'] ) );\r\n\r\n\tif( isset( $_POST['benefit3'] ) )\r\n\t\tupdate_post_meta( $post_id, 'benefit3', esc_attr( $_POST['benefit3'] ) );\r\n\r\n\tif( isset( $_POST['bulleticon4'] ) )\r\n\t\tupdate_post_meta( $post_id, 'bulleticon4', esc_attr( $_POST['bulleticon4'] ) );\r\n\r\n\tif( isset( $_POST['benefit4'] ) )\r\n\t\tupdate_post_meta( $post_id, 'benefit4', esc_attr( $_POST['benefit4'] ) );\r\n\r\n\tif( isset( $_POST['bulleticon5'] ) )\r\n\t\tupdate_post_meta( $post_id, 'bulleticon5', esc_attr( $_POST['bulleticon5'] ) );\r\n\r\n\tif( isset( $_POST['benefit5'] ) )\r\n\t\tupdate_post_meta( $post_id, 'benefit5', esc_attr( $_POST['benefit5'] ) );\r\n\r\n\tif( isset( $_POST['presentr_slideContent_1'] ) )\r\n\t\tupdate_post_meta( $post_id, 'presentr_slideContent_1', esc_attr( $_POST['presentr_slideContent_1'] ) );\r\n\r\n\tif( isset( $_POST['presentr_slideContent_2'] ) )\r\n\t\tupdate_post_meta( $post_id, 'presentr_slideContent_2', esc_attr( $_POST['presentr_slideContent_2'] ) );\r\n\r\n\tif( isset( $_POST['buttontext'] ) )\r\n\t\tupdate_post_meta( $post_id, 'buttontext', esc_attr( $_POST['buttontext'] ) );\r\n\t\r\n}", "title": "" }, { "docid": "5645624537b3be35d4d1e4b8c33b1559", "score": "0.5392672", "text": "function save_dettagli_film_meta_box($post_id, $post, $update){\n\t\n\t// sE NESSUN nonce è stato inoltrato o il nonce è sbagliato interrompi ed esci\n if (!isset($_POST[\"meta-box-nonce\"]) || !wp_verify_nonce($_POST[\"meta-box-nonce\"], basename(__FILE__)))\n return $post_id;\n\n\t// Se l'utente attuale non ha i permessi per editare interrompi ed esci\n if(!current_user_can(\"edit_post\", $post_id))\n return $post_id;\n\n\t// Se è in atto un auto-salvataggio interrompi ed esci\n if(defined(\"DOING_AUTOSAVE\") && DOING_AUTOSAVE)\n return $post_id;\n\t\n\t// Esegui solo se il post type è produzioni se no interrompi ed esci\t\n $slug = \"produzioni\";\n if($slug != $post->post_type)\n return $post_id;\n\t\n\t/*************************************** \n\t CHECK, SANIFICA E SALVA VALORI \n\t ***************************************/\n\t\n\t/* DURATA ---------------------------------------------------------*/\n $durata = \"\";\n\n if(isset($_POST[\"durata-film\"])){\n $durata = (string) trim($_POST[\"durata-film\"]);\n } \t\n update_post_meta($post_id, \"durata-film\", $durata);\n\t\n\t/* REGIA ---------------------------------------------------------*/\n $regia = \"\";\n\n if(isset($_POST[\"regia-film\"])){\n $regia = (string) trim($_POST[\"regia-film\"]);\n } \t\n update_post_meta($post_id, \"regia-film\", $regia);\n\t\n\t/* ANNO ---------------------------------------------------------*/\n $anno = \"\";\n\n if(isset($_POST[\"anno-film\"])){\n $anno = (int) $_POST[\"anno-film\"];\n } \t\n update_post_meta($post_id, \"anno-film\", $anno);\n\t\n\t/* LINGUA ---------------------------------------------------------*/\n $lingua = \"\";\n\n if(isset($_POST[\"lingua-film\"])){\n $lingua = (string) trim($_POST[\"lingua-film\"]);\n } \t\n update_post_meta($post_id, \"lingua-film\", $lingua);\n\t\n\t/* SOTTOTITOLI ---------------------------------------------------------*/\n $sottotitoli = \"\";\n\n if(isset($_POST[\"sottotitoli-film\"])){\n $sottotitoli = (string) trim($_POST[\"sottotitoli-film\"]);\n } \t\n update_post_meta($post_id, \"sottotitoli-film\", $sottotitoli);\n\t\n\t/* LIMITE ETA' ---------------------------------------------------------*/\n $eta = \"\";\n\n if(isset($_POST[\"limite-eta-film\"])){\n $eta = (string) trim($_POST[\"limite-eta-film\"]);\n } \t\n update_post_meta($post_id, \"limite-eta-film\", $eta);\n\t\n\t/* TIPO LINK VIDEO ---------------------------------------------------------*/\n $tipo_videolink = \"\";\n\n if(isset($_POST[\"tipo-videolink-film\"])){\n $tipo_videolink = (string) trim($_POST[\"tipo-videolink-film\"]);\n } \t\n update_post_meta($post_id, \"tipo-videolink-film\", $tipo_videolink);\n\t\n\t/* LINK VIDEO ---------------------------------------------------------*/\n $videolink = \"\";\n\n if(isset($_POST[\"videolink-film\"])){\n $videolink = (string) trim($_POST[\"videolink-film\"]);\n } \t\n update_post_meta($post_id, \"videolink-film\", $videolink);\n\t\n\t/* ATTORI ---------------------------------------------------------*/\n $attori = \"\";\n\n if(isset($_POST[\"attori-film\"])){\n $attori = $_POST[\"attori-film\"];\n } \t\n update_post_meta($post_id, \"attori-film\", $attori);\n\t\n\t/* LINK FACEBOOK ---------------------------------------------------------*/\n $link_fb = \"\";\n\n if(isset($_POST[\"link-fb-film\"])){\n $link_fb = (string) trim($_POST[\"link-fb-film\"]);\n } \t\n update_post_meta($post_id, \"link-fb-film\", $link_fb);\n\t\n\t/* LINK YOUTUBE ---------------------------------------------------------*/\n $link_youtube = \"\";\n\n if(isset($_POST[\"link-youtube-film\"])){\n $link_youtube = (string) trim($_POST[\"link-youtube-film\"]);\n } \t\n update_post_meta($post_id, \"link-youtube-film\", $link_fb);\n\t\n\t/* LINK VIMEO ---------------------------------------------------------*/\n $link_vimeo = \"\";\n\n if(isset($_POST[\"link-vimeo-film\"])){\n $link_vimeo = (string) trim($_POST[\"link-vimeo-film\"]);\n } \t\n update_post_meta($post_id, \"link-vimeo-film\", $link_vimeo);\n\t\n\t/* LINK IMDB ---------------------------------------------------------*/\n $link_imdb = \"\";\n\n if(isset($_POST[\"link-imdb-film\"])){\n $link_imdb = (string) trim($_POST[\"link-imdb-film\"]);\n } \t\n update_post_meta($post_id, \"link-imdb-film\", $link_imdb);\n\t\n\t/* LINK #1 ---------------------------------------------------------*/\n $link_1 = $namelink_1 = \"\";\n\n if(isset($_POST[\"link-1-film\"])){\n $link_1 = (string) trim($_POST[\"link-1-film\"]);\n } \t\n update_post_meta($post_id, \"link-1-film\", $link_1);\n\t\n if(isset($_POST[\"name-link-1-film\"])){\n $namelink_1 = (string) trim($_POST[\"name-link-1-film\"]);\n } \t\n update_post_meta($post_id, \"name-link-1-film\", $namelink_1);\n\t\n\t/* LINK #2 ---------------------------------------------------------*/\n $link_2 = $namelink_2 = \"\";\n\n if(isset($_POST[\"link-2-film\"])){\n $link_2 = (string) trim($_POST[\"link-2-film\"]);\n } \t\n update_post_meta($post_id, \"link-2-film\", $link_2);\n\t\n if(isset($_POST[\"name-link-2-film\"])){\n $namelink_2 = (string) trim($_POST[\"name-link-2-film\"]);\n } \t\n update_post_meta($post_id, \"name-link-2-film\", $namelink_2);\n\t\n\t\n\t/* LINK #3 ---------------------------------------------------------*/\n $link_3 = $nomelink_3 = \"\";\n\n if(isset($_POST[\"link-3-film\"])){\n $link_3 = (string) trim($_POST[\"link-3-film\"]);\n } \t\n update_post_meta($post_id, \"link-3-film\", $link_3);\n\t\n if(isset($_POST[\"name-link-3-film\"])){\n $namelink_3 = (string) trim($_POST[\"name-link-3-film\"]);\n } \t\n update_post_meta($post_id, \"name-link-3-film\", $namelink_3);\n\t\n\t/* DISTRIBUTORE ---------------------------------------------------------*/\n\t// logo-distributore-film \n\t// nome-distributore-film \n\t// link-distributore-film\n $nome_distributore = $link_distributore = $logo_distributore = \"\";\n\n if(isset($_POST[\"nome-distributore-film\"])){\n $nome_distributore = (string) trim($_POST[\"nome-distributore-film\"]);\n } \t\n update_post_meta($post_id, \"nome-distributore-film\", $nome_distributore);\n\t\n if(isset($_POST[\"link-distributore-film\"])){\n $link_distributore = (string) trim($_POST[\"link-distributore-film\"]);\n } \t\n update_post_meta($post_id, \"link-distributore-film\", $link_distributore);\n\t\n if(isset($_POST[\"logo-distributore-film\"])){\n $logo_distributore = (int) $_POST[\"logo-distributore-film\"];\n } \t\n update_post_meta($post_id, \"logo-distributore-film\", $logo_distributore);\n\t\n}", "title": "" }, { "docid": "e06cc3eda9474519136c3070f8850fba", "score": "0.5391754", "text": "function repairs_metabox_callback($post) {\n\n $repairsType = get_post_meta($post->ID, 'type', true);\n $repairsArea= get_post_meta($post->ID, 'area', true);\n $repairsTime = get_post_meta($post->ID, 'time', true);\n $repairsDescription = get_post_meta($post->ID, 'description', true);\n\n\n /*location for map*/\n echo '<span>Тип ремонта:</span>';\n echo '<br />';\n echo '<input type=\"text\" style=\"width: 100%\" name=\"type\" required value=\"'.($repairsType ? $repairsType : \"\").'\" />';\n\n echo '<span>Площадь:</span>';\n echo '<br />';\n echo '<input type=\"text\" style=\"width: 100%\" name=\"area\" required value=\"'.($repairsArea ? $repairsArea : \"\").'\" />';\n\n echo '<span>Сроки работ:</span>';\n echo '<br />';\n echo '<input type=\"text\" style=\"width: 100%\" name=\"time\" required value=\"'.($repairsTime ? $repairsTime : \"\").'\" />';\n\n echo '<span>Описание</span>';\n echo '<br />';\n echo '<textarea style=\"width: 100%\" rows=\"8\" name=\"description\" required value=\"'.($repairsDescription ? $repairsDescription : \"\").'\" />'\n\n . $repairsDescription.'</textarea>';\n\n}", "title": "" }, { "docid": "3e4ef72e90750058fa04b938b95d54de", "score": "0.53905666", "text": "protected function callPostSaveSettings()\n {\n $data = $this->getValues();\n $field = $this->getField($this->getSettingsValues());\n $field->postSaveSettings($data);\n }", "title": "" }, { "docid": "120852c818ca36a131d6d29782295f35", "score": "0.53861177", "text": "public function add_meta_boxes() {\n\t\t$this->add_category_selection_meta_box();\n\t\t$this->add_tags_selection_meta_box();\n\t}", "title": "" }, { "docid": "cb522aea4e4c43538aed6617512a27c9", "score": "0.53836936", "text": "public function meta_boxes_save( $post_id, $post ) {\n\t\tif ( empty( $post_id ) || empty( $post ) || empty( $_POST ) ) return;\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n\t\tif ( is_int( wp_is_post_revision( $post ) ) ) return;\n\t\tif ( is_int( wp_is_post_autosave( $post ) ) ) return;\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) return;\n\t\tif ( $post->post_type != 'artistAttachment' ) return;\n\t\t\t\n\t\t$this->process_book_meta( $post_id, $post );\n\t}", "title": "" }, { "docid": "09bf066b973493b653b3261e99e32922", "score": "0.53700864", "text": "function slider_save_meta_box_data( $post_id ) {\n\n\t/*\n\t * We need to verify this came from our screen and with proper authorization,\n\t * because the save_post action can be triggered at other times.\n\t */\n\n\t// Check if our nonce is set.\n\tif ( ! isset( $_POST['slider_meta_box_nonce'] ) ) {\n\t\treturn;\n\t}\n\n\t// Verify that the nonce is valid.\n\tif ( ! wp_verify_nonce( $_POST['slider_meta_box_nonce'], 'slider_meta_box' ) ) {\n\t\treturn;\n\t}\n\n\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\treturn;\n\t}\n\n\t// Check the user's permissions.\n\tif ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\n\t\tif ( ! current_user_can( 'edit_page', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t} else {\n\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t/* OK, it's safe for us to save the data now. */\n\t\n\t// Make sure that it is set.\n\tif ( ! isset( $_POST['sub_title_field'] ) ) {\n\t\treturn;\n\t}\n\tif ( ! isset( $_POST['text_position_field'] ) ) {\n\t\treturn;\n\t}\n\n\t// Sanitize user input.\n\t$sub_title_data = isset( $_POST['sub_title_field'] ) ? sanitize_text_field( $_POST['sub_title_field'] ) : \"\";\n\t$text_position_data = isset($_POST['text_position_field']) ? sanitize_text_field( $_POST['text_position_field'] ) : \"\";\n\n\t// Update the meta field in the database.\n\tupdate_post_meta( $post_id, '_sub_title_val', $sub_title_data );\n\tupdate_post_meta( $post_id, '_text_position_val', $text_position_data );\n}", "title": "" }, { "docid": "a55a46d2d765b67f4b1da7707f27ca05", "score": "0.53645366", "text": "public function add_meta_boxes()\n {\n // Add this metabox to every selected post\n add_meta_box(\n sprintf('wp_plugin_template_%s_section', self::POST_TYPE), __('Additional info', WP_Kivi_Schedule_Plugin::textdomain), array(&$this, 'add_inner_meta_boxes'), self::POST_TYPE\n );\n }", "title": "" }, { "docid": "82e5a899d3d049f6f752eb9922c9903a", "score": "0.5356821", "text": "function offshore_meta_box_add()\n\t\t{\n\t\t\tadd_meta_box( '', 'Movie Custom Fields', 'offshore_meta_box', 'ob_movie', 'normal', 'high' );\n\t\t}", "title": "" }, { "docid": "907b50d695210bd8753addb04ebb635b", "score": "0.5352796", "text": "public function save_meta_box_data( $post_id ) {\n\n\t\t// Check if our nonce is set.\n\t\tif ( ! isset( $_POST['myplugin_meta_box_nonce'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Verify that the nonce is valid.\n\t\tif ( ! wp_verify_nonce( $_POST['myplugin_meta_box_nonce'], 'myplugin_meta_box' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check the user's permissions.\n\t\tif ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\n\t\t\tif ( ! current_user_can( 'edit_page', $post_id ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t/* OK, it's safe for us to save the data now. */\n\t\t\n\t\t// Make sure that it is set.\n\t\tforeach ( $this->fields as $field) {\n\t\t \tif ( ! isset( $_POST[ $field['name'] ] ) )\n\t\t \t{\n\t\t \t\treturn;\n\t\t \t}\n\t\t}\n\n\t\tforeach ( $this->fields as $field ) {\n\t\t\t// Sanitize user input.\n\t\t\t$value = sanitize_text_field( $_POST[ $field['name'] ] );\n\n\t\t\t// Update the meta field in the database.\n\t\t\tupdate_post_meta( $post_id, $field['key'], $value );\n\t\t}\n\t}", "title": "" }, { "docid": "9d7ae03faf14b245cc60563f15dcc77a", "score": "0.53520757", "text": "function ssTmCreateMetaBoxes() {\n $ss_meta_boxes[] = array(\n 'title' => 'Other Information',\n 'post_types' => $this->ss_tm_post_type_name,\n \n 'fields' => array(\n array(\n 'name' => esc_html__( 'Position', 'ss_team_member' ),\n 'desc' => '',\n 'id' => $this->ss_tm_prefix . 'position',\n 'type' => 'text',\n ),\n array(\n 'name' => esc_html__( 'Email', 'ss_team_member' ),\n 'desc' => '',\n 'id' => $this->ss_tm_prefix . 'email',\n 'type' => 'email',\n ),\n array(\n 'name' => esc_html__( 'Phone', 'ss_team_member' ),\n 'desc' => '',\n 'id' => $this->ss_tm_prefix . 'phone',\n 'type' => 'number',\n ),\n array(\n 'name' => esc_html__( 'Website', 'ss_team_member' ),\n 'desc' => esc_html__( 'Example : http://yoursite.com', 'ss_team_member' ),\n 'id' => $this->ss_tm_prefix . 'website',\n 'type' => 'url',\n ),\n array(\n 'name' => esc_html__( 'Image', 'ss_team_member' ),\n 'desc' => '',\n 'id' => $this->ss_tm_prefix . 'image',\n 'type' => 'image_advanced',\n ),\n )\n );\n\n return $ss_meta_boxes;\n }", "title": "" }, { "docid": "4bea15672dd632f4d90d6f3285836f38", "score": "0.53494275", "text": "function joints_post_save_meta_boxes( $post_id, $post )\n{\n\t// $post_id and $post are required\n\tif ( empty( $post_id ) || empty( $post ) ) {\n\t\treturn;\n\t}\n\n\t// Dont' save meta boxes for revisions or autosaves\n\tif ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || is_int( wp_is_post_revision( $post ) ) || is_int( wp_is_post_autosave( $post ) ) ) {\n\t\treturn;\n\t}\n\n\t// Check the post being saved == the $post_id to prevent triggering this call for other save_post events\n\tif ( empty( $_POST['post_ID'] ) || $_POST['post_ID'] != $post_id ) {\n\t\treturn;\n\t}\n\n\t// Check user has permission to edit\n\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\treturn;\n\t}\n\n\tif (!empty($_POST['post_blockquote'])) {\n\t\t$datta = htmlspecialchars( $_POST['post_blockquote'] );\n\t\tupdate_post_meta( $post_id, 'post_blockquote', $datta );\n\t}\n\n\tif (!empty($_POST['page_sidebar_schedule_title'])) {\n\t\t$datta = htmlspecialchars( $_POST['page_sidebar_schedule_title'] );\n\t\tupdate_post_meta( $post_id, 'page_sidebar_schedule_title', $datta );\n\t}\n\n\tif (!empty($_POST['page_sidebar_schedule'])) {\n\t\t$datta = htmlspecialchars( $_POST['page_sidebar_schedule'] );\n\t\tupdate_post_meta( $post_id, 'page_sidebar_schedule', $datta );\n\t}\n\n\tif (!empty($_POST['page_sidebar_contacts_title'])) {\n\t\t$datta = htmlspecialchars( $_POST['page_sidebar_contacts_title'] );\n\t\tupdate_post_meta( $post_id, 'page_sidebar_contacts_title', $datta );\n\t}\n\n\tif (!empty($_POST['page_sidebar_contacts'])) {\n\t\t$datta = htmlspecialchars( $_POST['page_sidebar_contacts'] );\n\t\tupdate_post_meta( $post_id, 'page_sidebar_contacts', $datta );\n\t}\n}", "title": "" }, { "docid": "ff2bc09c33e4f31e6943b5dbaa9bfe74", "score": "0.53493476", "text": "function recruit_save_metabox_data() {\n\tglobal $meta_box, $post;\n\n\t// verify nonce\n\tif (!wp_verify_nonce($_POST['recruit_meta_box_nonce'], basename(__FILE__))) {\n\t\treturn $post_id;\n\t}\n\n\t// check autosave\n\tif (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n\t\treturn $post_id;\n\t}\n\n\t// check permission\n\tif ('page' == $_POST['post_type']) {\n\t\tif (!current_user_can('edit_page', $post_id)) {\n\t\t\treturn $post_id;\n\t\t} elseif (!current_user_can('edit_post', $post_id)) {\n\t\t\treturn $post_id;\n\t\t}\n\t}\n\n\t// loop through fields and save the data\n\tforeach ($meta_box[$post->post_type]['fields'] as $field) {\n\t\t$old = get_post_meta($post_id, $field['id'], true);\n\t\t$new = $_POST[$field['id']];\n\n\t\tif ($new && $new != $old) {\n\t\t\tupdate_post_meta($post_id, $field['id'], true);\n\t\t} elseif ('' == $new && $old || !isset($_POST[$field['id']])) {\n\t\t\tdelete_post_meta($post_id, $field['id'], $old);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "bff3c0133e411347e8e3173539b13e52", "score": "0.53455675", "text": "static function add_meta_boxes ()\n {\n if (is_form_new()) {\n self::add_meta_box('find_by_sciper', ___('Find person'));\n self::add_meta_box('show_publication_link', ___('Infoscience URL'), 'after-editor');\n } else {\n self::add_meta_box('show_person_details', ___('Person details'));\n self::add_meta_box('show_publication_link', ___('Infoscience URL'), 'after-editor');\n }\n (new AutoFieldsController(Person::class))->add_meta_boxes();\n }", "title": "" }, { "docid": "a35311ff081980043c308633666bb275", "score": "0.5344997", "text": "function save_taxonomy_custom_metaEBS( $term_id ) {\n\t\tif ( isset( $_POST['term_meta'] ) ) {\n\t\t\t$t_id = $term_id;\n\t\t\t$term_meta = get_term_meta($t_id,'cat_meta');\n\t\t\t$cat_keys = array_keys( $_POST['term_meta'] );\n\t\t\tforeach ( $cat_keys as $key ) {\n\t\t\t\tif ( isset ( $_POST['term_meta'][$key] ) ) {\n\t\t\t\t\t$term_meta[$key] = $_POST['term_meta'][$key];\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Save the option array.\n\t\t\tupdate_term_meta($term_id, 'cat_meta', $term_meta);\n\n\t\t}\n\t}", "title": "" }, { "docid": "32ca8b715b9d120ec842f0508bae2188", "score": "0.53431416", "text": "public function save_to_db() {\n\t\tglobal $wpdb;\n\t\t$table_name = $wpdb->prefix . WPM_PREFIX . 'mobject_kinds';\n\n\t\tif ( $this->label ) {\n\t\t\t$this->name = self::name_from_label( $this->label );\n\t\t\tif ( ! $this->label_plural ) {\n\t\t\t\t$this->label_plural = $this->label . 's';\n\t\t\t}\n\t\t}\n\n\t\t$saved_kind = get_kind( $this->kind_id );\n\n\t\tif ( $this->name ) {\n\t\t\t$this->update_type_name();\n\t\t}\n\n\t\tif ( is_null( $saved_kind ) ) {\n\t\t\t$insert_array = $this->to_array();\n\t\t\tunset( $insert_array['kind_id'] );\n\t\t\treturn $wpdb->insert( $table_name, $insert_array );\n\t\t} else {\n\t\t\treturn $wpdb->update( $table_name, $this->to_array(), [ 'kind_id' => $this->kind_id ] );\n\t\t}\n\t}", "title": "" }, { "docid": "f8d9c75690b893aca25cd920ea76c909", "score": "0.53422797", "text": "function _save_meta_boxes($post_id, $post){\n\t\t\n\t\tif ( !wp_verify_nonce( isset($_POST['_wppm_project_meta_nonce']), WPPM_RELATIVE )) {\n \t\treturn $post->ID;\n \t}//if\n \t\n \tif ( !current_user_can( 'edit_post', $post->ID )){\n \treturn $post->ID;\n \t}//if\n \t\n $meta = array();\n \n foreach($_POST as $key => $value){\n \n \tif(preg_match(\"/_wppm_project_meta_/i\",$key) && $value != ''){\n \n \t\t$meta[$key] = $value;\n \n \t}//if\t\n \n }//foreach\n \n $meta = apply_filters('WPPM_before_meta_save',$meta, $meta);\n\n\n if(get_post_meta($post->ID, '_wppm_project_meta', true)) { // If the custom field already has a value\n \n update_post_meta($post->ID, '_wppm_project_meta', $meta);\n \n } else { // If the custom field doesn't have a value\n \n add_post_meta($post->ID, '_wppm_project_meta', $meta);\n \n }//else\n \n \n\t\t//sortable by completed\n if(isset($_POST['_wppm_project_meta_completed'])){\n \t\n \t$sortable = $_POST['_wppm_project_meta_completed'];\n \t\n }else{\n \t\n \t$sortable = 0;\n \t\n }\n \n if(get_post_meta($post->ID, '_wppm_custom_sort', true)) { // If the custom field already has a value\n \n update_post_meta($post->ID, '_wppm_custom_sort', $sortable);\n \n } else { // If the custom field doesn't have a value\n \n add_post_meta($post->ID, '_wppm_custom_sort', $sortable);\n \n }//else\n \n //sortable by end date\n if(isset($_POST['_wppm_project_meta_end_date'])){\n \t\n \t$sortable = strtotime($_POST['_wppm_project_meta_end_date'].' 00:00');\n \t\n \t}else{\n \t\n \t\t$sortable = 0;\n \t\t\n \t}\n \n if(get_post_meta($post->ID, '_wppm_custom_sort_end_date', true)) { // If the custom field already has a value\n \n update_post_meta($post->ID, '_wppm_custom_sort_end_date', $sortable);\n \n } else { // If the custom field doesn't have a value\n \n add_post_meta($post->ID, '_wppm_custom_sort_end_date', $sortable);\n \n }//else\n \n //sortable by paid\n if(isset($_POST['_wppm_project_meta_paid'])){\n \t\n \tif($_POST['_wppm_project_meta_paid'] == 'Yes'){\n \t\t\n \t\t$sortable = 1;\n \t\t\n \t}\n \t\n \telseif($_POST['_wppm_project_meta_paid'] == 'Part' && !isset($_POST['_wppm_project_meta_paid_amount'])){\n \t\t\n \t\t$sortable = 0.5;\n \t\n \t}\n \t\n \telseif($_POST['_wppm_project_meta_paid'] == 'Part' && isset($_POST['_wppm_project_meta_paid_amount'])){\n \t\n \t\t$string = preg_replace('#[^0-9]#','',strip_tags($_POST['_wppm_project_meta_paid_amount']));\n \t\t$sortable = '0.'.$string;\n \t\n \t}\n \t\n \telseif($_POST['_wppm_project_meta_paid'] == 'No'){\n \t\n \t\t$sortable = 0.00;\n \t\n \t}\t\n \t\n }else{\n \n \t$sortable = 0;\n \n }\n \n \n if(get_post_meta($post->ID, '_wppm_custom_sort_paid', true)) { // If the custom field already has a value\n \n update_post_meta($post->ID, '_wppm_custom_sort_paid', $sortable);\n \n } else { // If the custom field doesn't have a value\n \n add_post_meta($post->ID, '_wppm_custom_sort_paid', $sortable);\n \n }//else\n \n \n \n return $post->ID;\n \n\t}", "title": "" }, { "docid": "3cffd01855656a88c53884776fb25ced", "score": "0.53244025", "text": "function save(){\n //in the post parameters\n $this->params_imported = true;\n $this->set('date', time());\n parent::save();\n }", "title": "" }, { "docid": "0fefad8b24992aab2261876d0b559920", "score": "0.5319178", "text": "function cs_events_meta_save($post_id) {\n global $wpdb;\n\t$inside_event_artists = '';\n\tif (empty($_POST[\"inside_event_gallery\"])){ $_POST[\"inside_event_gallery\"] = \"\";}\n\tif (empty($_POST[\"cs_images_per_gallery\"])){ $_POST[\"cs_images_per_gallery\"] = \"\";}\n if (empty($_POST[\"event_social_sharing\"])){ $_POST[\"event_social_sharing\"] = \"\";}\n\tif (empty($_POST[\"event_start_time\"])){ $_POST[\"event_start_time\"] = \"\";}\n\tif (empty($_POST[\"event_end_time\"])){ $_POST[\"event_end_time\"] = \"\";}\n if (empty($_POST[\"event_all_day\"])){ $_POST[\"event_all_day\"] = \"\";}\n\tif (empty($_POST[\"event_ticket_price\"])){ $_POST[\"event_ticket_price\"] = \"\";}\n\tif (empty($_POST[\"event_ticket_url\"])){ $_POST[\"event_ticket_url\"] = \"\";}\n if (empty($_POST[\"event_address\"])){ $_POST[\"event_address\"] = \"\";}\n if (empty($_POST[\"event_map\"])){ $_POST[\"event_map\"] = \"\";}\n\tif (empty($_POST[\"inside_event_artists\"])){ $inside_event_artists = \"\";} else {\n\t\t$inside_event_artists = implode(\",\", $_POST[\"inside_event_artists\"]);\n\t }\n\t if (empty($_POST[\"event_rating\"])){ $_POST[\"event_rating\"] = \"\";}\n\n $sxe = new SimpleXMLElement(\"<event></event>\");\n\t\t$sxe->addChild('inside_event_gallery', $_POST[\"inside_event_gallery\"]);\n\t\t$sxe->addChild('cs_images_per_gallery', $_POST[\"cs_images_per_gallery\"]);\n \t\t$sxe->addChild('event_social_sharing', $_POST[\"event_social_sharing\"]);\n \t\t$sxe->addChild('event_start_time', $_POST[\"event_start_time\"]);\n\t\t$sxe->addChild('event_end_time', $_POST[\"event_end_time\"]);\n\t\t$sxe->addChild('event_all_day', $_POST[\"event_all_day\"]);\n\t\t$sxe->addChild('event_ticket_price', $_POST[\"event_ticket_price\"]);\n\t\t$sxe->addChild('event_ticket_url', $_POST[\"event_ticket_url\"]);\n \t\t$sxe->addChild('event_address', $_POST[\"event_address\"]);\n\t\t$sxe->addChild('event_map', $_POST[\"event_map\"]);\n\t\t$sxe->addChild('event_rating', $_POST[\"event_rating\"]);\n\t\t$sxe->addChild('inside_event_artists', $inside_event_artists);\n update_post_meta($post_id, 'cs_event_meta', $sxe->asXML());\n}", "title": "" }, { "docid": "6ba78b1554ff64ae4714e2736ddcaaea", "score": "0.5309189", "text": "public function add_meta_boxes() {\n\n $postTypes = $this->get_settings( 'post_types' );\n if( is_array( $postTypes )) {\n\n foreach ( $postTypes as $type ) {\n add_meta_box(\n 'mytunes_metabox',\n __('MyTune Information', 'mytunes'),\n array( $this, 'mytunes_metabox' ),\n $type,\n 'normal',\n 'high',\n null\n );\n }\n }\n }", "title": "" }, { "docid": "93e1851284d7b936b540cc625d66ef56", "score": "0.5308322", "text": "function seous_meta_box(){\n\tglobal $seous_config;\n\n\t$define_pt_for_title_and_desc = $seous_config['define_pt_for_title_and_desc'];\n\n\tif( ! $define_pt_for_title_and_desc ){\n\t\t// Buscamos donde queremos añadir nuestros metabox\n\t\t$args = array(\n\t\t\t'public' => true,\n\t\t\t'_builtin' => false\n\t\t);// solo los custom-post-types, excluye post, page, attachment\n\t\t$output = 'names'; // names or objects, note names is the default\n\t\t$operator = 'and'; // 'and' or 'or'\n\t\t$post_types_custom = get_post_types( $args, $output, $operator );\n\t\t// Creamos un array con los tipos de post donde necesitamos añadir metabox\n\t\t$post_types_default = array( 'post','page');\n\t\t$post_types_for_cmb = array_merge( $post_types_default, $post_types_custom );\n\t\t$define_pt_for_title_and_desc = $post_types_for_cmb;\n\t}\n\tforeach ( $define_pt_for_title_and_desc as $post_type ) {\n\t\tadd_meta_box('seous-meta',__( 'Meta tags' , 'seous' ), 'seousmeta_fields', $post_type );\n\t}\n}", "title": "" }, { "docid": "858c1af817b286d54ab7c1e588df8321", "score": "0.5307817", "text": "function MB_info_activitys($POST){\n wp_nonce_field(basename(__FILE__), 'metabox_info_activitys_nonce');\n $quand = get_post_meta($POST->ID, 'quand', true);\n $heure_debut = get_post_meta($POST->ID, 'heure_debut', true);\n $heure_fin = get_post_meta($POST->ID, 'heure_fin', true);\n ?>\n <p>\n <label for=\"quand\">Quand</label><br />\n <input class=\"widefat\" id=\"quand\" type=\"text\" name=\"quand\" value=\"<?php echo $quand; ?>\"/>\n </p>\n <p>\n <label for=\"heure_debut\">Commence à</label>\n <input id=\"heure_debut\" type=\"time\" name=\"heure_debut\" value=\"<?php echo $heure_debut; ?>\"/>\n </p>\n <p>\n <label for=\"heure_fin\">Se termine à</label>\n <input id=\"heure_fin\" type=\"time\" name=\"heure_fin\" value=\"<?php echo $heure_fin; ?>\"/>\n </p>\n <?php\n}", "title": "" }, { "docid": "4b17fb8f9287ce90aee5baf847feea8e", "score": "0.5306998", "text": "function save_metaboxes_cita( $post_id ){\n\n\t\tif ( isset($_POST['_nombre_meta']) and check_admin_referer( __FILE__, '_nombre_meta_nonce') ){\n\t\t\tupdate_post_meta($post_id, '_nombre_meta', $_POST['_nombre_meta']);\n\t\t}\n\t\tif ( isset($_POST['_email_meta']) and check_admin_referer( __FILE__, '_email_meta_nonce') ){\n\t\t\tupdate_post_meta($post_id, '_email_meta', $_POST['_email_meta']);\n\t\t}\n\t\tif ( isset($_POST['_telefono_meta']) and check_admin_referer( __FILE__, '_telefono_meta_nonce') ){\n\t\t\tupdate_post_meta($post_id, '_telefono_meta', $_POST['_telefono_meta']);\n\t\t}\n\t\tif ( isset($_POST['_ciudad_meta']) and check_admin_referer( __FILE__, '_ciudad_meta_nonce') ){\n\t\t\tupdate_post_meta($post_id, '_ciudad_meta', $_POST['_ciudad_meta']);\n\t\t}\n\t\tif ( isset($_POST['_tienda_meta']) and check_admin_referer( __FILE__, '_tienda_meta_nonce') ){\n\t\t\tupdate_post_meta($post_id, '_tienda_meta', $_POST['_tienda_meta']);\n\t\t}\n\t\tif ( isset($_POST['_fecha_meta']) and check_admin_referer( __FILE__, '_fecha_meta_nonce') ){\n\t\t\tupdate_post_meta($post_id, '_fecha_meta', $_POST['_fecha_meta']);\n\t\t}\n\t\tif ( isset($_POST['_horario_meta']) and check_admin_referer( __FILE__, '_horario_meta_nonce') ){\n\t\t\tupdate_post_meta($post_id, '_horario_meta', $_POST['_horario_meta']);\n\t\t}\n\t\t/*\n\t\tif ( isset($_POST['_status_meta']) and check_admin_referer( __FILE__, '_status_meta_nonce') ){\n\t\t\tupdate_post_meta($post_id, '_status_meta', $_POST['_status_meta']);\n\t\t}\n\t\t*/\n\n\t}", "title": "" }, { "docid": "3eda136c6c68d251da121ac6652ecd06", "score": "0.530272", "text": "function saveActionBoxMeta( $postId, $postObj ){\n\t\tglobal $MabBase, $post;\n\t\t\n\t\t$wp_is_post_autosave = wp_is_post_autosave( $post );\n\t\t$wp_is_post_revision = wp_is_post_revision( $post );\n\t\t\n\t\t//ignore autosaves\n\t\tif( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) \n\t\t\treturn;\n\t\t\n\t\t//save action for Action Box post types\n\t\tif( ( false === $wp_is_post_autosave || $wp_is_post_revision ) && is_object( $post ) && $MabBase->is_mab_post_type( $post->post_type ) ){\n\t\t\t\n\t\t\t$actionBoxType = $MabBase->get_actionbox_type( $postId );\n\n\t\t\t$this->processActionBoxTypeSpecificMeta( $postId, $post );\n\n\t\t\t//process action box design meta\n\t\t\t$this->processActionBoxDesignMeta( $postId, $post );\n\n\t\t\tdo_action( 'mab_save_action_box', $actionBoxType, $postId, $post );\n\t\t\t\n\t\t}\n\t\t\n\t\t/* save action for other content types */\n\t\tif( ( false === $wp_is_post_autosave || $wp_is_post_revision ) && is_object( $post ) && $MabBase->is_allowed_content_type( $post->post_type ) ){\n\t\t\t$this->processActionBoxMetaForOtherContentTypes( $postId, $post );\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "921652eec63caf2028eda14d1ec9f0c6", "score": "0.52995735", "text": "function cmr_meta_boxes_setup() {\n\t/* Add meta boxes on the 'add_meta_boxes' hook. */\n\tadd_action( 'add_meta_boxes', 'cmr_add_post_meta_boxes' );\n\t/* Save post meta on the 'save_post' hook. */\n\tadd_action( 'save_post', 'cmr_save_post_meta', 10, 2 );\n}", "title": "" }, { "docid": "0515e8f0f45c2425460ed9b95d8376bc", "score": "0.5296118", "text": "public function save_meta_boxes( $post_id, $post ) {\n\t\t// $post_id and $post are required\n\t\tif ( empty( $post_id ) || null === $post || self::$saved_meta_boxes ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Dont' save meta boxes for revisions or autosaves\n\t\tif ( defined( 'DOING_AUTOSAVE' ) || is_int( wp_is_post_revision( $post ) ) || is_int( wp_is_post_autosave( $post ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check the nonce\n\t\tif ( empty( $_POST['wpm_meta_nonce'] ) || ! wp_verify_nonce( $_POST['wpm_meta_nonce'], 'wpm_save_data' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check the post being saved == the $post_id to prevent triggering this call for other save_post events\n\t\tif ( empty( $_POST['post_ID'] ) || (int) $_POST['post_ID'] !== $post_id ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check user has permission to edit\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tself::$saved_meta_boxes = true;\n\n\t\tdo_action( 'wpm_process_meta', $post_id, $post );\n\t\tdo_action( 'wpm_process_' . $post->post_type . '_meta', $post_id, $post );\n\t}", "title": "" }, { "docid": "5fef7cebd90b07e6c9756ac631e1b7cb", "score": "0.52958775", "text": "function display_save_tt($post_id){\n\n $trongtai =sanitize_text_field($_POST[trongtai]);\n update_post_meta( $post_id,'trongtai', $trongtai );\n\n $dungtichxilanh =sanitize_text_field($_POST[dungtichxilanh]);\n update_post_meta( $post_id,'dungtichxilanh', $dungtichxilanh );\n }", "title": "" }, { "docid": "aa1dcab512f9e52593b75c41881f14c6", "score": "0.5295532", "text": "function sw_meta_box_save( $post_id ) {\n\tif( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n\n\t// Verify the nonce. If insn't there, stop the script\n\tif( !isset( $_POST['sw_meta_box_nonce'] ) || !wp_verify_nonce( $_POST['sw_meta_box_nonce'], 'my_sw_meta_box_nonce' ) ) return;\n\n\t// Stop the script if the user does not have edit permissions\n\tif( !current_user_can( 'edit_post', get_the_id() ) ) return;\n\n\t// Save the textfield\n\tif( isset( $_POST['sw_textfield'] ) )\n\t\tupdate_post_meta( $post_id, 'sw_textfield', esc_attr( $_POST['sw_textfield'] ) );\n\n\tif( isset( $_POST['sw_textarea'] ) )\n\t\tupdate_post_meta( $post_id, 'sw_textarea', esc_attr( $_POST['sw_textarea'] ) );\n\n\tupdate_post_meta( $post_id, 'sw_key_descrip_enabled', esc_attr( $_POST['sw_key_descrip_enabled'] ) );\n}", "title": "" }, { "docid": "22d98a1986a4d98d1b645749cb9e93c0", "score": "0.52924633", "text": "public function renderAddCastAndCrewMetabox(WP_Post $post, array $metabox): void\n {\n $production = Production::make($post);\n\n // Get all castcrew by id and name\n $all_cast_crew_names = $production->getCastCrewNames();\n\n // Get all related cast and crew members to this production\n $production_cast_and_crew_members = $production->getCastAndCrew();\n $cast_members = [];\n $crew_members = [];\n\n // Sort them into cast then crew members\n if (!empty($production_cast_and_crew_members) && is_array($production_cast_and_crew_members)) {\n $cast_members = array_filter($production_cast_and_crew_members, function ($castcrew_member) {\n return ($castcrew_member->ccwp_join->type == 'cast');\n });\n $cast_members = array_values($cast_members);\n\n $crew_members = array_filter($production_cast_and_crew_members, function ($castcrew_member) {\n return ($castcrew_member->ccwp_join->type == 'crew');\n });\n $crew_members = array_values($crew_members);\n }\n\n View::make('admin/production-add-castcrew-metabox.php', [\n 'wp_nonce' => wp_nonce_field(basename(__FILE__), 'ccwp_add_cast_and_crew_to_production_box_nonce', true, false),\n 'post' => $post,\n 'metabox' => $metabox,\n 'all_cast_crew_names' => $all_cast_crew_names,\n 'cast_members' => $cast_members,\n 'crew_members' => $crew_members,\n ])->render();\n }", "title": "" }, { "docid": "b5235b1526dc5cfef0f4572ff920fd04", "score": "0.52912074", "text": "function save_frontslide_meta($post_id) {\n global $frontslide_meta_fields;\n\t\n\t// verify nonce\n\tif (!wp_verify_nonce($_POST['frontslide_meta_box_nonce'], basename(__FILE__))) \n\t\treturn $post_id;\n\t// check autosave\n\tif (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)\n\t\treturn $post_id;\n\t// check permissions\n\tif ('page' == $_POST['post_type']) {\n\t\tif (!current_user_can('edit_page', $post_id))\n\t\t\treturn $post_id;\n\t\t} elseif (!current_user_can('edit_post', $post_id)) {\n\t\t\treturn $post_id;\n\t}\n\t\n\t// loop through fields and save the data\n\tforeach ($frontslide_meta_fields as $field) {\n\t\tif($field['type'] == 'tax_select') continue;\n\t\t$old = get_post_meta($post_id, $field['id'], true);\n\t\t$new = $_POST[$field['id']];\n\t\tif ($new && $new != $old) {\n\t\t\tupdate_post_meta($post_id, $field['id'], $new);\n\t\t} elseif ('' == $new && $old) {\n\t\t\tdelete_post_meta($post_id, $field['id'], $old);\n\t\t}\n\t} // enf foreach\n}", "title": "" }, { "docid": "88986822e44aebb7f23514e00538ba5b", "score": "0.52853125", "text": "function media_metaboxes( array $meta_boxes ) {\n $prefix = '_artfile_';\n\n /**\n * Sample metabox to demonstrate each field type included\n */\n $meta_boxes['media_metabox'] = array(\n 'id' => 'media_metabox',\n 'title' => __( 'Details of Art', 'cmb2' ),\n 'object_types' => array( 'attachment', ), // Post type\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true, // Show field names on the left\n // 'cmb_styles' => false, // false to disable the CMB stylesheet\n 'fields' => array(\n array(\n 'name' => __( 'Artist Name', 'cmb2' ),\n 'desc' => __( 'field description (optional)', 'cmb2' ),\n 'id' => $prefix . 'artist_name',\n 'type' => 'text',\n 'show_on_cb' => 'cmb2_hide_if_no_cats', // function should return a bool value\n // 'sanitization_cb' => 'my_custom_sanitization', // custom sanitization callback parameter\n // 'escape_cb' => 'my_custom_escaping', // custom escaping callback parameter\n // 'on_front' => false, // Optionally designate a field to wp-admin only\n // 'repeatable' => true,\n ),\n array(\n 'name' => __( 'Title', 'cmb2' ),\n 'id' => $prefix . 'title',\n 'type' => 'text',\n ),\n array(\n\t\t\t 'name' => 'Date',\n\t\t\t 'id' => $prefix . 'start',\n\t\t\t 'type' => 'text_date_timestamp',\n\t\t\t // 'timezone_meta_key' => $prefix . 'timezone',\n\t\t\t 'date_format' => 'M j, Y',\n\t\t\t),\n\t\t\tarray(\n 'name' => __( 'Medium', 'cmb2' ),\n 'id' => $prefix . 'medium',\n 'type' => 'text',\n ),\n array(\n 'name' => __( 'Dimensions', 'cmb2' ),\n 'id' => $prefix . 'size',\n 'type' => 'text',\n ),\n array(\n 'name' => __( 'Website', 'cmb2' ),\n 'id' => $prefix . 'size',\n 'type' => 'text_url',\n ),\n array(\n 'name' => __( 'Photo Credit', 'cmb2' ),\n 'id' => $prefix . 'credit',\n 'type' => 'text',\n ),\n ),\n );\n\n // Add other metaboxes as needed\n\n return $meta_boxes;\n}", "title": "" }, { "docid": "6790f6c93530c45a7a35e089c7d52424", "score": "0.5283881", "text": "public function meta_boxes_save( $post_id, $post ) {\n\t\tif ( empty( $post_id ) || empty( $post ) || empty( $_POST ) ) return;\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n\t\tif ( is_int( wp_is_post_revision( $post ) ) ) return;\n\t\tif ( is_int( wp_is_post_autosave( $post ) ) ) return;\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) return;\n\t\tif ( $post->post_type != 'team' ) return;\n\t\t\t\n\t\t$this->process_team_meta( $post_id, $post );\n\t}", "title": "" }, { "docid": "b4ac81503176f294981626c067bfa6cc", "score": "0.52824634", "text": "public function save_meta_boxes($post_id, $post)\n {\n // $post_id and $post are required\n if (empty($post_id) || empty($post) || self::$saved_meta_boxes) {\n return;\n }\n\n // Dont' save meta boxes for revisions or autosaves\n if (defined('DOING_AUTOSAVE') || is_int(wp_is_post_revision($post)) || is_int(wp_is_post_autosave($post))) {\n return;\n }\n\n // Check the nonce\n if (empty($_POST['wc_sa_meta_nonce']) || !wp_verify_nonce($_POST['wc_sa_meta_nonce'], 'wc_sa_save_data')) {\n return;\n }\n\n // Check the post being saved == the $post_id to prevent triggering this call for other save_post events\n if (empty($_POST['post_ID']) || $_POST['post_ID'] != $post_id) {\n return;\n }\n\n // Check user has permission to edit\n if (!current_user_can('edit_post', $post_id)) {\n return;\n }\n\n self::$saved_meta_boxes = true;\n\n // Check the post type\n if (in_array($post->post_type, array('wc_custom_statuses'))) {\n do_action('wc_sa_process_' . $post->post_type . '_meta', $post_id, $post);\n }\n }", "title": "" }, { "docid": "cfa5de0feaf5789fdfb311bbcc8f70fa", "score": "0.5279276", "text": "function offshore_meta_box( $post )\n\t\t{\n\t\t\t$values = get_post_custom( $post->ID );\n\t\t\t$idMovie = isset( $values['idMovie'] ) ? esc_attr( $values['idMovie'][0] ) : '';\n\t\t\t$trailer = isset( $values['trailer'] ) ? esc_attr( $values['trailer'][0] ) : '';\n\t\t\t$overview = isset( $values['overview'] ) ? esc_attr( $values['overview'][0] ) : ''; \n\t\t\t$genres = isset( $values['genres'] ) ? esc_attr( $values['genres'][0] ) : ''; \n\t\t\t$poster_path = isset( $values['poster_path'] ) ? esc_attr( $values['poster_path'][0] ) : ''; \n\t\t\t$backdrop_path = isset( $values['backdrop_path'] ) ? esc_attr( $values['backdrop_path'][0] ) : ''; \n\t\t\t$backdrops_path = isset( $values['backdrops_path'] ) ? esc_attr( $values['backdrops_path'][0] ) : ''; \n\t\t\t$imdb_rating = isset( $values['imdb_rating'] ) ? esc_attr( $values['imdb_rating'][0] ) : ''; \n\t\t\t$imdb_link = isset( $values['imdb_link'] ) ? esc_attr( $values['imdb_link'][0] ) : ''; \n\t\t\t$cast = isset( $values['cast'] ) ? esc_attr( $values['cast'][0] ) : ''; \n\t\t\t$bilgi_ulke = isset( $values['bilgi_ulke'] ) ? esc_attr( $values['bilgi_ulke'][0] ) : ''; \n\t\t\t$bilgi_sure = isset( $values['bilgi_sure'] ) ? esc_attr( $values['bilgi_sure'][0] ) : ''; \n\t\t\t$bilgi_vizyon = isset( $values['bilgi_vizyon'] ) ? esc_attr( $values['bilgi_vizyon'][0] ) : ''; \n\t\t\t$bilgi_butce = isset( $values['bilgi_butce'] ) ? esc_attr( $values['bilgi_butce'][0] ) : ''; \n\t\t\t$bilgi_hasilat = isset( $values['bilgi_hasilat'] ) ? esc_attr( $values['bilgi_hasilat'][0] ) : ''; \n\t\t\twp_nonce_field( 'my_meta_box_nonce', 'meta_box_nonce' );\n\t\t\t\n\t\t\t//trying out cast array\n\t\t\t$caststrip = stripslashes($cast);\n\t\t\t$cast_detail_array=json_decode($caststrip, 1);\n\t\t\t//var_dump($cast_detail_array);\n\t\t\t//var_dump($cast);\n\t\t\t//echo json_last_error();\t\t\n\t\t\t?>\n\t\t\t<p class=\"gab_caption\">The Movie Database ID</p>\n\t\t\t<div class=\"gab_fieldrow\">\n\t\t\t\t<div class=\"gab_fieldname\"><label for=\"idMovie\"><?php _e('The ID of movie form tmdb.org','offshore'); ?></label></div>\n\t\t\t\t<div class=\"gab_fieldinput\">\n\t\t\t\t\t<input type=\"text\" class=\"gab_textfield\" name=\"idMovie\" class=\"regular-text\" id=\"idMovie\" value=\"<?php echo $idMovie; ?>\" />\n\t\t\t\t\t<input type=\"button\" value=\"Load Details\" class=\"button search_button\" id=\"search_button\" />\n\t\t\t\t\t\n\t\t\t\t\t<div id=\"searchresults\">Loading Details for movie id: <span class=\"word\"></span></div>\n\n\t\t\t\t\t<div id=\"results\" class=\"update\">\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\t\n\n\t\t\t<p class=\"gab_caption\">The Movie Trailer</p>\n\t\t\t<div class=\"gab_fieldrow\">\n\t\t\t\t<div class=\"gab_fieldname\"><label for=\"trailer\"><?php _e('Enter a Youtube URL here','offshore'); ?></label></div>\n\t\t\t\t<div class=\"gab_fieldinput\"><input type=\"text\" class=\"gab_textfield\" name=\"trailer\" class=\"regular-text\" id=\"trailer\" value=\"<?php if($trailer !== '') { echo $trailer; } ?>\" /><label class=\"not_available\" style=\"color:#F30;\" id=\"trailer_label\"></label></div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\t\t\t\n\t\t\t\n\t\t\t<p class=\"gab_caption\">Plot Summary</p>\n\t\t\t<div class=\"gab_fieldrow\">\n\t\t\t\t<div class=\"gab_fieldname\"><label for=\"overview\"><?php _e('The short summary of movie','offshore'); ?></label></div>\n\t\t\t\t<div class=\"gab_fieldinput\"><textarea class=\"gab_textfield\" name=\"overview\" class=\"regular-text\" id=\"overview\"><?php if($overview !== '') { echo $overview; } else { echo $movieInfo[overview]; } ?></textarea><label class=\"not_available\" style=\"color:#F30;\" id=\"overview_label\"></label></div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\t\n\t\t\t\n\t\t\t<p class=\"gab_caption\">Movie Cast</p>\n\t\t\t<div class=\"gab_fieldrow\">\n\t\t\t\t<div class=\"gab_fieldname\"><label for=\"cast\"><?php _e('The cast of movie','offshore'); ?></label></div>\n\t\t\t\t<div class=\"gab_fieldinput\"><textarea class=\"gab_textfield\" name=\"cast\" class=\"regular-text\" id=\"cast\"><?php if($cast !== '') { echo $cast; } else { @print implode(\" \\n\", $echo_cast); } ?></textarea><label class=\"not_available\" style=\"color:#F30;\" id=\"cast_label\"></label></div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\t\t\t\n\t\t\t\n\t\t\t<p class=\"gab_caption\">Genres</p>\n\t\t\t<div class=\"gab_fieldrow\">\n\t\t\t\t<div class=\"gab_fieldname\"><label for=\"genres\"><?php _e('The movie genres','offshore'); ?></label></div>\n\t\t\t\t<div class=\"gab_fieldinput\"><input type=\"text\" class=\"gab_textfield\" name=\"genres\" class=\"regular-text\" id=\"genres\" value=\"<?php if($genres !== '') { echo $genres; } else { @print implode(', ', $echo_genres); } ?>\" /><label class=\"not_available\" style=\"color:#F30;\" id=\"genres_label\"></label></div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\t\t\t\n\t\t\t\n\t\t\t<p class=\"gab_caption\">Poster Path</p>\n\t\t\t<div class=\"gab_fieldrow\">\n\t\t\t\t<div class=\"gab_fieldname\"><label for=\"poster_path\"><?php _e('Poster URL','offshore'); ?></label></div>\n\t\t\t\t<div class=\"gab_fieldinput\"><input type=\"text\" class=\"gab_textfield\" name=\"poster_path\" class=\"regular-text\" id=\"poster_path\" value=\"<?php if($poster_path !== '') { echo $poster_path; } else { echo $tmdb_posterpath; } ?>\" /><label class=\"not_available\" style=\"color:#F30;\" id=\"poster_path_label\"></label></div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\t\n\n\t\t\t<p class=\"gab_caption\">Backdrop Path</p>\n\t\t\t<div class=\"gab_fieldrow\">\n\t\t\t\t<div class=\"gab_fieldname\"><label for=\"backdrop_path\"><?php _e('Backdrop URL','offshore'); ?></label></div>\n\t\t\t\t<div class=\"gab_fieldinput\"><input type=\"text\" class=\"gab_textfield\" name=\"backdrop_path\" class=\"regular-text\" id=\"backdrop_path\" value=\"<?php if($backdrop_path !== '') { echo $backdrop_path; } else { echo $tmdb_backdroppath; } ?>\" /><label class=\"not_available\" style=\"color:#F30;\" id=\"backdrop_path_label\"></label></div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\t\t\t\n\t\t\t\n\t\t\t<p class=\"gab_caption\">Backdrops</p>\n\t\t\t<div class=\"gab_fieldrow\">\n\t\t\t\t<div class=\"gab_fieldname\"><label for=\"backdrops_path\"><?php _e('Backdrop URL','offshore'); ?></label></div>\n\t\t\t\t<div class=\"gab_fieldinput\"><textarea class=\"gab_textfield\" name=\"backdrops_path\" class=\"regular-text\" id=\"backdrops_path\"><?php if($backdrops_path !== '') { echo $backdrops_path; } else { echo $tmdb_backdroppath; } ?></textarea><label class=\"not_available\" style=\"color:#F30;\" id=\"backdrops_path_label\"></label></div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\t\t\t\n\t\t\t\n\t\t\t<p class=\"gab_caption\">IMDB Rating</p>\n\t\t\t<div class=\"gab_fieldrow\">\n\t\t\t\t<div class=\"gab_fieldname\"><label for=\"imdb_rating\"><?php _e('The IMDB rating of movie','offshore'); ?></label></div>\n\t\t\t\t<div class=\"gab_fieldinput\"><input type=\"text\" class=\"gab_textfield\" name=\"imdb_rating\" class=\"regular-text\" id=\"imdb_rating\" value=\"<?php if($imdb_rating !== '') { echo $imdb_rating; } ?>\" /><label class=\"not_available\" style=\"color:#F30;\" id=\"imdb_rating_label\"></label></div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\t\t\n\n\t\t\t<p class=\"gab_caption\">IMDB Link</p>\n\t\t\t<div class=\"gab_fieldrow\">\n\t\t\t\t<div class=\"gab_fieldname\"><label for=\"imdb_link\"><?php _e('The IMDB link of movie','offshore'); ?></label></div>\n\t\t\t\t<div class=\"gab_fieldinput\"><input type=\"text\" class=\"gab_textfield\" name=\"imdb_link\" class=\"regular-text\" id=\"imdb_link\" value=\"<?php if($imdb_link !== '') { echo $imdb_link; } ?>\" /><label class=\"not_available\" style=\"color:#F30;\" id=\"imdb_link_label\"></label></div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\t\t\n\n\t\t\t<p class=\"gab_caption\">Ülke</p>\n\t\t\t<div class=\"gab_fieldrow\">\n\t\t\t\t<div class=\"gab_fieldname\"><label for=\"bilgi_ulke\"><?php _e('The production countries of movie','offshore'); ?></label></div>\n\t\t\t\t<div class=\"gab_fieldinput\"><input type=\"text\" class=\"gab_textfield\" name=\"bilgi_ulke\" class=\"regular-text\" id=\"bilgi_ulke\" value=\"<?php if($bilgi_ulke !== '') { echo $bilgi_ulke; } ?>\" /><label class=\"not_available\" style=\"color:#F30;\" id=\"bilgi_ulke_label\"></label></div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\t\t\n\n\t\t\t<p class=\"gab_caption\">Vizyon Tarihi</p>\n\t\t\t<div class=\"gab_fieldrow\">\n\t\t\t\t<div class=\"gab_fieldname\"><label for=\"bilgi_vizyon\"><?php _e('The release date of movie','offshore'); ?></label></div>\n\t\t\t\t<div class=\"gab_fieldinput\"><input type=\"text\" class=\"gab_textfield\" name=\"bilgi_vizyon\" class=\"regular-text\" id=\"bilgi_vizyon\" value=\"<?php if($bilgi_vizyon !== '') { echo $bilgi_vizyon; } ?>\" /><label class=\"not_available\" style=\"color:#F30;\" id=\"bilgi_vizyon_label\"></label></div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\t\t\n\n\t\t\t<p class=\"gab_caption\">Süre</p>\n\t\t\t<div class=\"gab_fieldrow\">\n\t\t\t\t<div class=\"gab_fieldname\"><label for=\"bilgi_sure\"><?php _e('The runtime of movie','offshore'); ?></label></div>\n\t\t\t\t<div class=\"gab_fieldinput\"><input type=\"text\" class=\"gab_textfield\" name=\"bilgi_sure\" class=\"regular-text\" id=\"bilgi_sure\" value=\"<?php if($bilgi_sure !== '') { echo $bilgi_sure; } ?>\" /><label class=\"not_available\" style=\"color:#F30;\" id=\"bilgi_sure_label\"></label></div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\t\t\n\n\t\t\t<p class=\"gab_caption\">Bütçe</p>\n\t\t\t<div class=\"gab_fieldrow\">\n\t\t\t\t<div class=\"gab_fieldname\"><label for=\"bilgi_butce\"><?php _e('The budget of movie','offshore'); ?></label></div>\n\t\t\t\t<div class=\"gab_fieldinput\"><input type=\"text\" class=\"gab_textfield\" name=\"bilgi_butce\" class=\"regular-text\" id=\"bilgi_butce\" value=\"<?php if($bilgi_butce !== '') { echo $bilgi_butce; } ?>\" /><label class=\"not_available\" style=\"color:#F30;\" id=\"bilgi_butce_label\"></label></div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\t\t\n\n\t\t\t<p class=\"gab_caption\">Hasılat</p>\n\t\t\t<div class=\"gab_fieldrow\">\n\t\t\t\t<div class=\"gab_fieldname\"><label for=\"bilgi_hasilat\"><?php _e('The revenue of movie','offshore'); ?></label></div>\n\t\t\t\t<div class=\"gab_fieldinput\"><input type=\"text\" class=\"gab_textfield\" name=\"bilgi_hasilat\" class=\"regular-text\" id=\"bilgi_hasilat\" value=\"<?php if($bilgi_hasilat !== '') { echo $bilgi_hasilat; } ?>\" /><label class=\"not_available\" style=\"color:#F30;\" id=\"bilgi_hasilat_label\"></label></div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t</div>\t\t\t\t\n\n\t\t\t<script>\n\t\t\t\tjQuery( function($) {\n\t\t\t\t\t\n\t\t\t\t\t//hide the search result div\n\t\t\t\t\t$(\"#searchresults\").hide();\n\t\t\t\t\t\n\t\t\t\t\t//on click of a button\n\t\t\t\t\t$(\"#search_button\").click(function() {\n\n\t\t\t\t\t$(\"#overview\").val(\"\");\n\t\t\t\t\t$(\"#poster_path\").val(\"\");\n\t\t\t\t\t$(\"#backdrop_path\").val(\"\");\n\t\t\t\t\t$(\"#backdrops_path\").val(\"\");\n\t\t\t\t\t$(\"#genres\").val(\"\");\n\t\t\t\t\t$(\"#cast\").val(\"\");\n\t\t\t\t\t$(\"#trailer\").val(\"\");\n\t\t\t\t\t$(\"#imdb_rating\").val(\"\");\n\t\t\t\t\t$(\"#imdb_link\").val(\"\");\n\t\t\t\t\t$(\"#bilgi_ulke\").val(\"\");\n\t\t\t\t\t$(\"#bilgi_sure\").val(\"\");\n\t\t\t\t\t$(\"#bilgi_vizyon\").val(\"\");\n\t\t\t\t\t$(\"#bilgi_butce\").val(\"\");\n\t\t\t\t\t$(\"#bilgi_hasilat\").val(\"\");\n\t\t\t\t\t\n\t\t\t\t\t$(\"#overview_label\").text(\"\");\n\t\t\t\t\t$(\"#poster_path_label\").text(\"\");\n\t\t\t\t\t$(\"#backdrop_path_label\").text(\"\");\n\t\t\t\t\t$(\"#backdrops_path_label\").text(\"\");\n\t\t\t\t\t$(\"#genres_label\").text(\"\");\n\t\t\t\t\t$(\"#cast_label\").text(\"\");\n\t\t\t\t\t$(\"#trailer_label\").text(\"\");\n\t\t\t\t\t$(\"#imdb_rating_label\").text(\"\");\n\t\t\t\t\t$(\"#imdb_link_label\").text(\"\");\n\t\t\t\t\t$(\"#bilgi_ulke_label\").text(\"\");\n\t\t\t\t\t$(\"#bilgi_sure_label\").text(\"\");\n\t\t\t\t\t$(\"#bilgi_vizyon_label\").text(\"\");\n\t\t\t\t\t$(\"#bilgi_butce_label\").text(\"\");\n\t\t\t\t\t$(\"#bilgi_hasilat_label\").text(\"\");\n\t\t\t\t\t\t\t// if searchString is not empty\n\t\t\t\t\t\n\t\t\t\t\t//getting the value that user typed\n\t\t\t\t\tvar searchString = $(\"#idMovie\").val();\n\t\t\t\t\tif(searchString) {\n\t\t\t\t\t\t// ajax call\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\ttype: \"POST\",\n\t\t\t\t\t\t\turl: \"<?php echo site_url(); ?>/wp-content/plugins/ob_movie_database/includes/load_movie_details.php\",\n\t\t\t\t\t\t\tdata: {movie_id : searchString},\n\t\t\t\t\t\t\t//dataType: \"json\",\n\t\t\t\t\t\t\tbeforeSend: function(html) { // this happen before actual call\n\t\t\t\t\t\t\t\t$(\"#results\").html(''); \n\t\t\t\t\t\t\t\t$(\"#searchresults\").show();\n\t\t\t\t\t\t\t\t$(\".word\").html(searchString);\n\t\t\t\t\t\t },\n\t\t\t\t\t\t success: function(html){ // this happen after we get result\n\t\t\t\t\t\t\t\t$(\"#results\").s();\n\t\t\t\t\t\t\t\t$(\"#results\").append(html);\n\t\t\t\t\t\t\t\t$(\"#searchresults\").hide();\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}); \n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\t</script>\t\n\t\t\t<?php\t\n\t\t}", "title": "" }, { "docid": "9bc5326eed5cae256fe11561ade1109a", "score": "0.5278553", "text": "public function ppc_save_data() {\n\t\t\t$page = ! empty( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : null;\n\t\t\tif ( 'ppc' !== $page ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! empty( $_POST['ppc-form'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['ppc-form'] ) ), 'ppc-form-nonce' ) && current_user_can( 'manage_options' ) ) {\n\t\t\t\tif ( isset( $_POST['submit_radio'] ) ) {\n\n\t\t\t\t\t// saves the radio button option.\n\t\t\t\t\tif ( ! empty( $_POST['ppc_radio_button_option'] ) ) {\n\t\t\t\t\t\t$ppc_radio = sanitize_text_field( wp_unslash( $_POST['ppc_radio_button_option'] ) );\n\t\t\t\t\t\tupdate_option( 'ppc_error_level', $ppc_radio );\n\t\t\t\t\t}\n\t\t\t\t\t// saves the posts types to have our meta box on.\n\t\t\t\t\t$ppc_post_types = array();\n\t\t\t\t\tif ( ! empty( $_POST['posts'] ) ) {\n\t\t\t\t\t\t$ppc_post_types = array_map( 'sanitize_text_field', wp_unslash( $_POST['posts'] ) );\n\t\t\t\t\t}\n\t\t\t\t\tupdate_option( 'ppc_post_types_to_display', $ppc_post_types );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8f15166acfd3ee1bc5c03dfa3e25c6f9", "score": "0.52764606", "text": "function shop_save_meta_box_data( $post_id ) {\n if ( ! isset( $_POST['shop_meta_box_nonce'] ) ) {\n return;\n }\n\n // Verify that the nonce is valid.\n if ( ! wp_verify_nonce( $_POST['shop_meta_box_nonce'], 'shop_meta_box' ) ) {\n return;\n }\n\n // If this is an autosave, our form has not been submitted, so we don't want to do anything.\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n return;\n }\n\n // Check the user's permissions\n if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n if ( ! current_user_can( 'edit_page', $post_id ) ) {\n return;\n }\n } else {\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\n return;\n }\n }\n\n // Make sure that data is set\n if ( !isset( $_POST['shop_url_field'] ) ) {\n return;\n }\n\n // Sanitize input\n $shop_url = sanitize_text_field( $_POST['shop_url_field'] );\n\n // Update the meta field in the database.\n update_post_meta( $post_id, 'shop_url_key', $shop_url );\n}", "title": "" }, { "docid": "1db0a88a2fb1ff1b15b7f9fb0e3422d2", "score": "0.5276271", "text": "function cd_meta_box_save( $post_id ){\n\t\t// Cancel if we're doing an auto save\n\t\tif( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n\t\t \n\t\t// Cancel if our nonce isn't there, or we can't verify it.\n\t\tif( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\n\t\t \n\t\t// Cancel if our current user can't edit this post\n\t\tif( !current_user_can( 'edit_posts' ) ) return;\n\n\t\tif( isset( $_POST['custom_post_sidebar'] ) )\n\t\t\tupdate_post_meta( $post_id, 'custom_post_sidebar', esc_attr( $_POST['custom_post_sidebar'] ) );\n\t\telse{\n\t\t\t// Data was not set, so delete it\n\t\t\tdelete_post_meta( $post_id, 'custom_post_sidebar' );\n\t\t}\n\t}", "title": "" }, { "docid": "1a219235367e54d9f6e85109c33c6d15", "score": "0.52731425", "text": "function save_taxonomy_term_meta( $id ) { global $onpage_seo;\n if ( isset( $_POST[OnpageSEO::$post_array] ) )\n $onpage_seo->admin->save_form( $_POST[OnpageSEO::$post_array], array( \"entity_type\" => \"taxonomy term\", \"entity_id\" => $id ) );\n }", "title": "" }, { "docid": "5421f278d953ec141a6f4bc35d869f83", "score": "0.52649796", "text": "function insertar_campos_zoologico() {\n\tadd_meta_box( \n\t\t'wpshed-meta-box', __( 'Campos especificos para el Zoologico', 'titulo' ), \n\t\t'salida_campos_zoologico', 'zoologico', 'normal', 'high' );\n\n}", "title": "" }, { "docid": "f68d3d92b2de02557f1e294926365fd4", "score": "0.52580506", "text": "function clm_gallery_metaboxes_save($post_id) {\n // Bail if we're doing an auto save\n if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n\n // if our nonce isn't there, or we can't verify it, bail\n if( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\n\n // if our current user can't edit this post, bail\n if( !current_user_can( 'edit_post' ) ) return;\n\n // verify and save our data\n update_post_meta($post_id, 'gallery_visibility', $_REQUEST['gallery_visibility']);\n update_post_meta($post_id, 'gallery_user_visibility', $_REQUEST['user_checkbox']);\n}", "title": "" }, { "docid": "c4473bf3a1089828306323707b4edbfc", "score": "0.5251236", "text": "function cre_basic_metabox_fields($property_metabox_fields)\n{\n\n\n\t/*\n\t * Migration code related to additional details improvements in version 3.11.2\n\t */\n\t$post_id = false;\n\tif (isset($_GET['post'])) {\n\t\t$post_id = intval($_GET['post']);\n\t} elseif (isset($_POST['post_ID'])) {\n\t\t$post_id = intval($_POST['post_ID']);\n\t}\n\n\tif ($post_id && $post_id > 0) {\n\t\tcre_additional_details_migration($post_id); // Migrate property additional details from old metabox key to new key.\n\t}\n\n\n\n\t$cre_basic_fields = array(\n\t\tarray(\n\t\t\t'id' => \"cre_property_price\",\n\t\t\t'name' => esc_html__('Sale or Rent Price ( Only digits )', 'crucial-real-estate'),\n\t\t\t'desc' => esc_html__('Example: 12500', 'crucial-real-estate'),\n\t\t\t'type' => 'text',\n\t\t\t'std' => '',\n\t\t\t'columns' => 12,\n\t\t\t'tab' => 'details',\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'cre_property_price_prefix',\n\t\t\t'name' => esc_html__('Price Prefix', 'crucial-real-estate'),\n\t\t\t'desc' => esc_html__('Example: From', 'crucial-real-estate'),\n\t\t\t'type' => 'text',\n\t\t\t'std' => '',\n\t\t\t'columns' => 12,\n\t\t\t'tab' => 'details',\n\t\t),\n\t\tarray(\n\t\t\t'id' => \"cre_property_price_postfix\",\n\t\t\t'name' => esc_html__('Price Postfix', 'crucial-real-estate'),\n\t\t\t'desc' => esc_html__('Example: Monthly or Per Night', 'crucial-real-estate'),\n\t\t\t'type' => 'text',\n\t\t\t'std' => '',\n\t\t\t'columns' => 12,\n\t\t\t'tab' => 'details',\n\t\t),\n\t\tarray(\n\t\t\t'type' => 'divider',\n\t\t\t'columns' => 12,\n\t\t\t'id' => 'price_divider',\n\t\t\t'tab' => 'details',\n\t\t),\n\t\tarray(\n\t\t\t'id' => \"cre_property_size\",\n\t\t\t'name' => esc_html__('Area Size ( Only digits )', 'crucial-real-estate'),\n\t\t\t'desc' => esc_html__('Example: 2500', 'crucial-real-estate'),\n\t\t\t'type' => 'text',\n\t\t\t'std' => '',\n\t\t\t'columns' => 12,\n\t\t\t'tab' => 'details',\n\t\t),\n\t\tarray(\n\t\t\t'id' => \"cre_property_size_postfix\",\n\t\t\t'name' => esc_html__('Area Size Postfix', 'crucial-real-estate'),\n\t\t\t'desc' => esc_html__('Example: sq ft', 'crucial-real-estate'),\n\t\t\t'type' => 'text',\n\t\t\t'std' => '',\n\t\t\t'columns' => 12,\n\t\t\t'tab' => 'details',\n\t\t),\n\t\tarray(\n\t\t\t'id' => \"cre_property_lot_size\",\n\t\t\t'name' => esc_html__('Lot Size ( Only digits )', 'crucial-real-estate'),\n\t\t\t'desc' => esc_html__('Example: 3000', 'crucial-real-estate'),\n\t\t\t'type' => 'text',\n\t\t\t'std' => '',\n\t\t\t'columns' => 12,\n\t\t\t'tab' => 'details',\n\t\t),\n\t\tarray(\n\t\t\t'id' => \"cre_property_lot_size_postfix\",\n\t\t\t'name' => esc_html__('Lot Size Postfix', 'crucial-real-estate'),\n\t\t\t'desc' => esc_html__('Example: sq ft', 'crucial-real-estate'),\n\t\t\t'type' => 'text',\n\t\t\t'std' => '',\n\t\t\t'columns' => 12,\n\t\t\t'tab' => 'details',\n\t\t),\n\t\tarray(\n\t\t\t'id' => \"cre_property_bedrooms\",\n\t\t\t'name' => esc_html__('Bedrooms', 'crucial-real-estate'),\n\t\t\t'desc' => esc_html__('Example: 4', 'crucial-real-estate'),\n\t\t\t'type' => 'text',\n\t\t\t'std' => '',\n\t\t\t'columns' => 12,\n\t\t\t'tab' => 'details',\n\t\t),\n\t\tarray(\n\t\t\t'id' => \"cre_property_bathrooms\",\n\t\t\t'name' => esc_html__('Bathrooms', 'crucial-real-estate'),\n\t\t\t'desc' => esc_html__('Example: 2', 'crucial-real-estate'),\n\t\t\t'type' => 'text',\n\t\t\t'std' => '',\n\t\t\t'columns' => 12,\n\t\t\t'tab' => 'details',\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'cre_property_kitchen',\n\t\t\t'name' => esc_html__( 'Kitchens', 'crucial-real-estate' ),\n\t\t\t'desc' => esc_html__( 'Example: 1', 'crucial-real-estate' ),\n\t\t\t'type' => 'text',\n\t\t\t'std' => '',\n\t\t\t'columns' => 12,\n\t\t\t'tab' => 'details',\n\t\t),\n\t\tarray(\n\t\t\t'id' => \"cre_property_garage\",\n\t\t\t'name' => esc_html__('Garages or Parking Spaces', 'crucial-real-estate'),\n\t\t\t'desc' => esc_html__('Example: 1', 'crucial-real-estate'),\n\t\t\t'type' => 'text',\n\t\t\t'std' => '',\n\t\t\t'columns' => 12,\n\t\t\t'tab' => 'details',\n\t\t),\n\t\tarray(\n\t\t\t'id' => \"cre_property_id\",\n\t\t\t'name' => esc_html__('Property ID', 'crucial-real-estate'),\n\t\t\t'desc' => esc_html__('It will help you search a property directly.', 'crucial-real-estate'),\n\t\t\t'type' => 'text',\n\t\t\t'std' => ('true' === get_option('aarambha_auto_property_id_check')) ? get_option('aarambha_auto_property_id_pattern') : '',\n\t\t\t'columns' => 12,\n\t\t\t'tab' => 'details',\n\t\t\t'attributes' => array(\n\t\t\t\t'readonly' => ('true' === get_option('aarambha_auto_property_id_check')) ? true : false,\n\t\t\t),\n\t\t),\n\t\tarray(\n\t\t\t'id' => \"cre_property_year_built\",\n\t\t\t'name' => esc_html__('Year Built', 'crucial-real-estate'),\n\t\t\t'desc' => esc_html__('Example: 2017', 'crucial-real-estate'),\n\t\t\t'type' => 'text',\n\t\t\t'std' => '',\n\t\t\t'columns' => 12,\n\t\t\t'tab' => 'details',\n\t\t),\n\n\t);\n\n\treturn array_merge($property_metabox_fields, $cre_basic_fields);\n}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "8e8e03727ca6544a2d009483f6d1aca9", "score": "0.0", "text": "public function destroy($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "37dd170c1eaea50870a9bd20839ad070", "score": "0.71387243", "text": "public function remove(ResourceInterface $resource): void\n {\n }", "title": "" }, { "docid": "4b8255c05a264d5d61f546d7bcd507ce", "score": "0.6673811", "text": "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.66624975", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "9128270ecb10fe081d7b27ed99999426", "score": "0.66351163", "text": "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "title": "" }, { "docid": "ca4c6cd0f72c6610d38f362f323ea885", "score": "0.66280866", "text": "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "title": "" }, { "docid": "e3c740412fbdcfbb4c5f134b55955877", "score": "0.6605496", "text": "public function deleteStorage($id);", "title": "" }, { "docid": "22e99170ed44ab8bba05c4fea1103beb", "score": "0.65443397", "text": "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "title": "" }, { "docid": "86a97ef20b44d79f474926937530d353", "score": "0.6317361", "text": "public function remove($resourceId)\n {\n return $this->rResourceMixin->remove($resourceId);\n }", "title": "" }, { "docid": "2961fd7e3d8100bdb9570443ca486260", "score": "0.62501013", "text": "public function destroy()\n {\n if ($this->resource) {\n sem_remove($this->resource);\n @unlink($this->filePath);\n }\n }", "title": "" }, { "docid": "0145806453a1e9f5ee0809b4db0b14d3", "score": "0.6131707", "text": "public function markAsDeleted(ResolvedResource $resource);", "title": "" }, { "docid": "6c6fe1826f8ec4ac06c5e0ef405b8b7a", "score": "0.6101575", "text": "function deleteResource($id) {\n\t\t\t$id = sqlescape($id);\n\t\t\t$r = $this->getResource($id);\n\t\t\tif ($r) {\n\t\t\t\tsqlquery(\"DELETE FROM bigtree_resources WHERE file = '\".sqlescape($r[\"file\"]).\"'\");\n\t\t\t\t$storage = new BigTreeStorage;\n\t\t\t\t$storage->delete($r[\"file\"]);\n\t\t\t\tforeach ($r[\"thumbs\"] as $thumb) {\n\t\t\t\t\t$storage->delete($thumb);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "60da5cdaab3c2b4a3de543383ff7326a", "score": "0.6089098", "text": "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "title": "" }, { "docid": "d7a9a477b41e565ba02b2968aa02b2d8", "score": "0.6054164", "text": "public function remove ($resource = false, $key = false) {\n\t\t$resource = ($resource) ? $resource : $this->resource;\n\t\t$key = ($key) ? $key : $this->key;\n\n\t\treturn DB::execute ('delete from `#prefix#lock` where resource = ? and resource_id = ?', $resource, $key);\n\t}", "title": "" }, { "docid": "ccaddaf8c48305cf51ff4f4e87f7f513", "score": "0.60534257", "text": "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "title": "" }, { "docid": "5bb36f163668a235aa80821b0746c2bc", "score": "0.6006416", "text": "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "title": "" }, { "docid": "0edce8e39abb5191d53e16b1ad17f69f", "score": "0.5964831", "text": "public function destroy($id)\n {\n $suplier = Supplier::where('id',$id)->first();\n $photo = $suplier->photo;\n if($photo)\n {\n unlink($photo);\n Supplier::where('id',$id)->delete();\n\n }\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.593359", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.593359", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.593359", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.593359", "text": "public function remove($path);", "title": "" }, { "docid": "b549ee1a3239f6720bb4eae802ea1753", "score": "0.5929751", "text": "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "title": "" }, { "docid": "02436278b72d788803fbd1efa4067eef", "score": "0.59201753", "text": "public function delete(): void\n {\n unlink($this->path);\n }", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121144", "text": "public function remove($entity);", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.58963126", "text": "public function remove() {}", "title": "" }, { "docid": "83e24f29d0e8d9db1e7e13447c37580c", "score": "0.58958113", "text": "public function deleteResource(Resource $resource)\n {\n //unset all fields (for now)\n foreach (get_class_methods($resource) as $method) {\n if (0 === strpos($method, 'set')) {\n $resource->$method(null);\n }\n }\n\n //set delete date and status\n $resource->setDateDeleted(new \\DateTime());\n $resource->setStatus(Resource::STATUS_DELETED);\n\n return $resource;\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.589437", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.589437", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.589437", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.589437", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.589437", "text": "public function remove();", "title": "" }, { "docid": "140b6c44eef77c79cbd9edc171fe8e75", "score": "0.58819216", "text": "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "title": "" }, { "docid": "682325cf5de8624768bd5dbfad42738d", "score": "0.5876151", "text": "public function action_remove()\n\t{\n\t\t$this->access('admin.'.strtolower($this->_admin->resource).'.remove');\n\t\t$id = $this->request->param('id');\n\n\t\tif(!$this->request->is_ajax())\n\t\t{\n\t\t\tthrow new Kohana_HTTP_Exception_404;\n\t\t}\n\n\t\t// Needs to be a GET request\n\t\tif($this->request->method() != Request::GET)\n\t\t{\n\t\t\tthrow new Kohana_HTTP_Exception_403('No data was requested to be removed.');\n\t\t}\n\n\t\t$record = $this->_admin->model->where($this->_admin->primary_key, '=', $id)->find();\n\n\t\tif($record->loaded())\n\t\t{\n\t\t\tRD::set(RD::SUCCESS, ':resource #:id has been removed.', array(\n\t\t\t\t':resource' => Inflector::singular($this->_resource),\n\t\t\t\t':id' => $id\n\t\t\t));\n\t\t\t$record->delete();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tRD::set(RD::WARNING, ':resource can\\'t be found.', array(\n\t\t\t\t':resource' => Inflector::singular($this->_resource),\n\t\t\t\t':id' => $id\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "7760e18034429a581e9c1073281ca346", "score": "0.587537", "text": "public function delete ()\n {\n $this->unlock();\n sem_remove( $this->getResource() );\n $this->resource = NULL;\n return $this;\n }", "title": "" }, { "docid": "16ede02ea64f8d696ab94948fa4d095a", "score": "0.5871256", "text": "public function destroyFile($resource, File $file)\n {\n $file->delete();\n return $file->{$resource};\n }", "title": "" }, { "docid": "72dc5bfa6ca53ddd2451fc0e14e6fcfe", "score": "0.58684987", "text": "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "b0b6f080ff9e00a37e1e141de8af472d", "score": "0.5864614", "text": "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "title": "" }, { "docid": "e02a61dc8d778d6f70e60505035c99d1", "score": "0.58630604", "text": "public function onDelete(DeleteResourceEvent $event)\n {\n $em = $this->container->get('doctrine.orm.entity_manager');\n $em->remove($event->getResource());\n $event->stopPropagation();\n }", "title": "" }, { "docid": "ee70945e791659b8782f1f156e69304e", "score": "0.58468133", "text": "public function delete()\n {\n return $this->getStorage()->delete($this->path().DIRECTORY_SEPARATOR.$this->name());\n }", "title": "" }, { "docid": "fbd716173957d995532e7a5839e6a5dc", "score": "0.58400846", "text": "public function rm($item);", "title": "" }, { "docid": "df76e304787c6be76144a24a799b6900", "score": "0.58365864", "text": "public function removeAction()\n {\n Pi::service('log')->mute();\n $id = $this->params('id', 0);\n $fakeId = $this->params('fake_id', 0);\n $affectedRows = 0;\n $module = $this->getModule();\n\n if ($id) {\n $row = $this->getModel('media')->find($id);\n\n if ($row && $row->url) {\n // Delete media\n unlink(Pi::path($row->url));\n\n // Update db\n $row->url = '';\n $row->type = '';\n $row->size = 0;\n $row->meta = '';\n $affectedRows = $row->save();\n }\n } elseif ($fakeId) {\n $session = Media::getUploadSession($module, 'media');\n\n if (isset($session->$fakeId)) {\n $uploadInfo = isset($session->$id) ? $session->$id : $session->$fakeId;\n\n unlink(Pi::path($uploadInfo['tmp_name']));\n\n unset($session->$id);\n unset($session->$fakeId);\n }\n $affectedRows = 1;\n }\n\n echo json_encode([\n 'status' => $affectedRows ? self::AJAX_RESULT_TRUE : self::AJAX_RESULT_FALSE,\n 'message' => 'ok',\n ]);\n exit;\n }", "title": "" }, { "docid": "e47bb1b7bccbeb8651920ef7986252ae", "score": "0.5821593", "text": "protected function destroy(User $resource)\n {\n }", "title": "" }, { "docid": "7e3f12eaa72d671def04991239bd33f4", "score": "0.5810391", "text": "public function destroy(Resource $resource)\n\t{\n\t\t$resource->delete();\n\n return ['success' => true, 'message' => 'Resource deleted'];\n\t}", "title": "" }, { "docid": "c6821270bce7c29555a3d0ca63e8ff36", "score": "0.58097607", "text": "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "title": "" }, { "docid": "3e2addfb4f78b979aaadcf2a7b28b1c4", "score": "0.578285", "text": "public function destroy(Request $request, $id)\n {\n\n $file= Documents::whereId($id)->firstOrFail();\n\n //unlink(public_path('storage',$file->id));\n\n $file->delete();\n return back();\n\n\n }", "title": "" }, { "docid": "5bc196208c1decbb644cd5cece6edd3f", "score": "0.5773751", "text": "public function unlink($uri) {\n $this->uri = $uri; // set instance URI\n return unlink($this->get_local_path());\n }", "title": "" }, { "docid": "f97458f1a249bea8589e37ce4a19458a", "score": "0.5771788", "text": "public function destroy($id)\n {\n// $info = $request->img;\n// dd($info);\n// dd($id);\n $info = Zhou::where('id',$id)->select('file')->first()->toArray();\n// dd('/storage/'.$info['file']);\n unlink('./storage/'.$info['file']);\n $data = Zhou::where('id',$id)->delete();\n\n\n// dd();\n if($data){\n return json_encode(['code'=>200]);\n }\n }", "title": "" }, { "docid": "27c91ef0cac551b90c12d8956a711079", "score": "0.5767978", "text": "public function deleteFromStore()\n\t{\n\t\t$this->isInStore(true);\n\n\t\t$store = GAMA_Store::singleton();\n\n\t\t// ===============\n\t\tapp_lock(LOCK_EX);\n\t\t// ===============\n\t\ttry\n\t\t{\n\t\t\t// make sure there are no instances of this class\n\t\t\t$count = $store->sqlFetchValue(\n\t\t\t\t'select count(*) from RESOURCE where type=?', $this->id);\n\t\t\t\n\t\t\tif($count > 0)\n\t\t\t{\n\t\t\t\tthrow new Exception('Delete related instances first');\n\t\t\t}\n\n\t\t\t// make sure there are no properties using this class\n\t\t\t$count = $store->sqlFetchValue('\n\t\t\t\tselect count(*) from PROPERTY\n\t\t\t\twhere dom=? or rng=?\n\t\t\t\t', $this->id, $this->id );\n\t\t\t\n\t\t\tif($count > 0)\n\t\t\t{\n\t\t\t\tthrow new Exception('Delete related properties first');\n\t\t\t}\n\t\t\t\n\t\t\t// now we can delete the class\n\t\t\t$store->sql('delete from RESOURCE where id=?', $this->id);\n\n\t\t\t// we should also update our cache\n\t\t\t$this->reloadFromStore();\n\t\t\t\n\t\t} catch(Exception $e)\n\t\t{\n\t\t\tapp_unlock();\n\t\t\tthrow $e;\n\t\t}\n\t\t\t\n\t\t// ==========\n\t\tapp_unlock();\n\t\t// ==========\n\t\t\n\t\tdebug(\"Resource deleted: $this->uri\");\n\t}", "title": "" }, { "docid": "80ccefee911dbbebc88e3854b170acf7", "score": "0.57658565", "text": "public function removeRecord();", "title": "" }, { "docid": "bbd4fbeb169cce49dbdee4fcf4da3308", "score": "0.57645273", "text": "public function destroy(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "81bac0e5ac8e3c967ba616afac4bfb1c", "score": "0.5761358", "text": "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "title": "" }, { "docid": "385e69d603b938952baeb3edc255a4ea", "score": "0.57558876", "text": "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "title": "" }, { "docid": "ddf3faf7670af66339c535dd8de7c088", "score": "0.57447016", "text": "public function destroy(Request $request)\n {\n Storage::delete($request->path);\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "9a5dfeb522e8b8883397ebfbc0e9d95b", "score": "0.57264656", "text": "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "title": "" }, { "docid": "38e5a4eab7d9a854a4348b6f78b1554b", "score": "0.57157594", "text": "public function destroy($resource, $id)\n {\n $this->repository->delete($id);\n return response(null, 204);\n }", "title": "" }, { "docid": "883f70738d6a177cbdf3fcaec9e9c05f", "score": "0.5715195", "text": "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "title": "" }, { "docid": "20950b5737f7cbea0d1cc5dc11a68eb1", "score": "0.57039726", "text": "public function delete() {\n $filePath = $this->getPath();\n if (is_file($filePath) && is_writable($filePath)) {\n unlink($filePath);\n }\n parent::delete();\n }", "title": "" }, { "docid": "e41dcd69306378f20a25f414352d6e6b", "score": "0.5698952", "text": "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "title": "" }, { "docid": "405f641d9f45ae5d1d63de363880f02b", "score": "0.5692005", "text": "public function destroy($id)\n\n {\n\n $product = Product::findOrFail($id);\n\n\n\n// unlink(public_path(). $icon->file);\n\n\n\n// $photo->delete();\n//\n// $icon->delete();\n Photo::where('product_id',$id)->delete();\n $product->delete();\n\n\n\n\n\n return redirect()->route('admin.products.index');\n\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.56844676", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.56844676", "text": "public function delete($path);", "title": "" }, { "docid": "88290b89858a6178671f929ae0a7ccba", "score": "0.56783324", "text": "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "title": "" }, { "docid": "f3ecd01b9c9cfcc917a40e1827e8d6a1", "score": "0.5652098", "text": "public function del() {\n sem_acquire($this->__mutex); //block until released\n @shm_remove_var($this->__shm, $this->__key);\n sem_release($this->__mutex); //release mutex\n }", "title": "" }, { "docid": "8b94ff007c35fa2c7485cebe32b8de85", "score": "0.564899", "text": "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "title": "" }, { "docid": "2752e2223b3497665cc8082d9af5a967", "score": "0.5648674", "text": "public function delete($path, $data = null);", "title": "" }, { "docid": "85a8d03b0c01970f57fe2403d38a7103", "score": "0.5648665", "text": "public function delete(): void\n {\n\t\tif(@unlink($this->getPath())) {\n\t\t\t$this->deleteCacheEntries();\n\t\t\tself::unsetInstance($this->getPath());\n\t\t}\n\t\telse {\n\t\t\tthrow new FilesystemFileException(\"Delete of file '{$this->getPath()}' failed.\", FilesystemFileException::FILE_DELETE_FAILED);\n\t\t}\n\t}", "title": "" }, { "docid": "8cf7657c92ed341a5a4e1ac7b314cf43", "score": "0.5647576", "text": "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "title": "" }, { "docid": "0cb73bdc807934bf8edf7e5eccafdd2b", "score": "0.5639274", "text": "public function delete() {\n $this->storageController->connect();\n $query = sprintf('DELETE FROM items WHERE name=\"%s\"', $this->name);\n $this->storageController->query($query);\n $this->storageController->close();\n\n $this->is_new = TRUE;\n }", "title": "" }, { "docid": "f51aa1f231aecb530fa194d38c843872", "score": "0.56325674", "text": "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "title": "" }, { "docid": "83377e4a1bcc3dc2e77329262b4d9a6d", "score": "0.56286436", "text": "public function delete()\n {\n fclose($this->inputStream);\n }", "title": "" }, { "docid": "9db585fcb135fe60165f9be69e476584", "score": "0.5621615", "text": "private function _remove($id)\n\t{\n\t\t$store = $this->model_store->find($id);\n\n\t\tif (!empty($store->IMAGE)) {\n\t\t\t$path = FCPATH . '/uploads/store/' . $store->IMAGE;\n\n\t\t\tif (is_file($path)) {\n\t\t\t\t$delete_file = unlink($path);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn $this->model_store->remove($id);\n\t}", "title": "" }, { "docid": "342b5fc16c6f42ac6826e9c554c81f4d", "score": "0.5601336", "text": "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "title": "" }, { "docid": "97e50e61326801fa4efc3704e9dd77c1", "score": "0.56004316", "text": "public function revoke($resource, $permission = null);", "title": "" }, { "docid": "eb981a32d53ea8153aa2cec46a4f509f", "score": "0.55813533", "text": "public function destroy($id)\n {\n// if(Auth::user()->role == User::ROLE_SUPERADMIN) {\n $product = ProductItem::findOrFail($id);\n if($product->image_name != '') {\n $image_path = app_path(\"../../files/product/\" . $product->image_name);\n unlink($image_path);\n }\n\n ProductItem::destroy($id);\n\n Alert::success('Your data already deleted !', 'Success !');\n\n return redirect('admin/product');\n// }\n }", "title": "" }, { "docid": "97914eb78d7cf648246f9bcd6ac69124", "score": "0.55748343", "text": "public function destroy($id)\n {\n /*\n\n = R::load( '', $id );\n R::trash( );*/\n }", "title": "" }, { "docid": "9063023fcee6a479bc40053db38d89e0", "score": "0.55698293", "text": "public function destroy($id)\n {\n //\n\n\n $post = Post::withTrashed()->where('id',$id)->firstOrFail();\n\n if ($post->trashed()){\n /////$path = 'test.txt';\n /////Storage::disk('s3')->put($path, 'hello');\n ///// Storage::disk('s3')->delete($path);\n //return $post->image;\n\n if(Storage::disk('s3')->exists($post->filename)) {\n Storage::disk('s3')->delete($post->filename);\n } else {\n $post->deleteImage();\n $post->forceDelete();\n\n }\n\n\n return redirect(route('trashed-posts.index'))->with('status', 'Post deleted successfully');\n }\n else {\n $post->delete();\n return redirect(route('posts.index'))->with('status', 'Post deleted successfully');\n }\n\n // return redirect(route('posts.index'))->with('status', 'Post deleted successfully');\n\n }", "title": "" }, { "docid": "ea73af051ca124bba926c5047e1f799b", "score": "0.55665016", "text": "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "title": "" }, { "docid": "a85f6f9231c5a5b648efc0e34b009554", "score": "0.5565872", "text": "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "title": "" }, { "docid": "9ef8b8850e1424f439f75a07b411de21", "score": "0.5563011", "text": "public function remove($filePath){\n return Storage::delete($filePath);\n }", "title": "" }, { "docid": "7fbd1a887ad4dca00687bb4abce1ae49", "score": "0.5556361", "text": "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "b45d20ef7b675860a322ba4b6d1dbd5a", "score": "0.555592", "text": "public function destroy($id)\n {\n $file_data = Media::find($id)->first();\n if(file_exists($file_data->path)){\n @unlink(public_path(), $file_data->path);\n }\n Media::where('id', $id)->delete();\n return redirect()->back()->with('message', 'Media deleted successfully!');\n }", "title": "" }, { "docid": "e98c4608a62ab3f2b92573a4bed86a6f", "score": "0.55526763", "text": "abstract public function Resource_Link_delete($resource_link);", "title": "" }, { "docid": "39fd8b9a4b5864c48e07d66807e5775f", "score": "0.5540923", "text": "public function destroy($id)\n {\n $image = Slider::findOrFail($id);\n //dd($image);\n// $image_path = app_path(\"images/{$image}\");\n// //dd($image_path);\n// if (File::exists($image_path)) {\n// File::delete($image_path);\n// //File::delete(\"images/{$image}\");\n// unlink($image_path);\n// }\n// File::delete(public_path(\"images/{$image->path}\"));\n $image->delete();\n return redirect('admin-group-1/slider');\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540394", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540394", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540394", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540394", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540394", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540394", "text": "public function remove($id);", "title": "" }, { "docid": "35753424e21be7d9c22ced54d549e939", "score": "0.5539808", "text": "public function remove()\n\t{\n\t\tif(self::exists($this->name))\n\t\t{\n\t\t\t$this->value = false;\n\t\t\t$this->encodedValue = null;\n\t\t\t$this->sendHeader();\n\n\t\t\t$cookiePath = $this->getMetaFilePath();\n\n\t\t\tif(File::exists($cookiePath))\n\t\t\t\tFile::remove($cookiePath);\n\t\t}\n\t}", "title": "" }, { "docid": "0005f2e6964d036d888b5343fa80a1b1", "score": "0.5536237", "text": "public function deleted(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "d434e2cdc40338f523a40bcd0c8522a0", "score": "0.5534673", "text": "public function delete() {\n $this->client->deleteData($this->uri);\n }", "title": "" }, { "docid": "bd7d7fbce770fd39cf8081927084d5c3", "score": "0.5534001", "text": "public function destroy($id)\n {\n $brand = Brand::findOrFail($id);\n\n if (Storage::disk('public')->exists('Brand/'.$brand->brand_image)) {\n Storage::disk('public')->delete('Brand/'.$brand->brand_image);\n }\n $brand->delete();\n }", "title": "" }, { "docid": "b36cf6614522a902b216519e3592c3ba", "score": "0.5527274", "text": "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "title": "" }, { "docid": "f79bb84fccbc8510950d481223fa2893", "score": "0.5527126", "text": "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5527044", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5527044", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5527044", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5527044", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5527044", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5527044", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5527044", "text": "public function delete();", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "fa595c84127466702e7ac2d36609afe2", "score": "0.0", "text": "public function delete(Projection $projection)\n {\n $projection->delete();\n return response()->json(null, 204);\n }", "title": "" } ]
[ { "docid": "f1aaf41a7156fa1ddfcdb965f9ec5b59", "score": "0.77682966", "text": "public function remove($resource)\n {\n if($this->exist($resource)){\n unset($this->resources[$resource]);\n }\n }", "title": "" }, { "docid": "8b628383b34d63dd0eb00f58ca93193b", "score": "0.703237", "text": "public static function deleteResource($resource)\n {\n $resourceKey = self::getResourceKey($resource);\n unset(self::$resource_registry[$resourceKey]);\n }", "title": "" }, { "docid": "4227c47fa6415b99ac7ad79261ad7226", "score": "0.6690498", "text": "public function removeResource(AbstractResourceFile $resource) {\n if (parent::offsetExists($resource->getMemberId())) {\n parent::offsetUnset($resource->getMemberId());\n }\n }", "title": "" }, { "docid": "cba9c3b5928674c49645b80c060a27ee", "score": "0.66900694", "text": "public function deleted(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "503409da4f5b9a20ee18f568cabc837e", "score": "0.6578654", "text": "protected function deleteResource($resource) {\n $translator = $this->i18n->getTranslator($resource['locale']);\n $translator->setTranslation($resource['key'], null);\n }", "title": "" }, { "docid": "104d6984e581161b647cdf9206aaa4be", "score": "0.65266734", "text": "public function delete($storage_name);", "title": "" }, { "docid": "e8e36bc4035715e1553386a49c3dd64a", "score": "0.64323646", "text": "final protected function remove($resource)\n {\n // Initilize the request as post\n $this->init('delete', $resource);\n\n // Make the request using guzzle\n return $this->call();\n }", "title": "" }, { "docid": "fa011b24954b422bb6ebfc09cdafce74", "score": "0.64162064", "text": "public function unpublishResource(PersistentResource $resource)\n {\n try {\n $objectName = $this->keyPrefix . $this->getRelativePublicationPathAndFilename($resource);\n $this->getCurrentBucket()->object($objectName)->delete();\n $this->systemLogger->log(sprintf('Successfully unpublished resource as object \"%s\" (MD5: %s) from bucket \"%s\"', $objectName, $resource->getMd5() ?: 'unknown', $this->bucketName), LOG_DEBUG);\n } catch (NotFoundException $e) {\n }\n }", "title": "" }, { "docid": "628a4d244227d2089465337bd866ab72", "score": "0.634412", "text": "public function delete() {\n\n // Does the Resource object have an ID?\n if ( is_null( $this->id ) ) trigger_error ( \"Resource::delete(): Attempt to delete an Resource object that does not have its ID property set.\", E_USER_ERROR );\n\n // Delete the Resource\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $st = $conn->prepare ( \"DELETE FROM resource WHERE id = :id LIMIT 1\" );\n $st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }", "title": "" }, { "docid": "2e3daccb9b7f61db1ba5db127ae75245", "score": "0.63187486", "text": "private static function deleteResourceAndUsage( $resource ) {\n $dbw = wfGetDB( DB_PRIMARY );\n $dbw -> delete('edusharing_resource', array( 'EDUSHARING_RESOURCE_ID = ' . $resource->EDUSHARING_RESOURCE_ID ), $fname = 'Database::delete');\n\n $postData = new stdClass ();\n $postData->nodeId = str_replace(\"ccrep://local/\",\"\",$resource->EDUSHARING_RESOURCE_OBJECT_URL);\n $postData->usageId = $resource->EDUSHARING_RESOURCE_USAGE;\n\n // delete usage from repo\n $eduService = new EduSharingService();\n $eduService -> deleteUsage( $postData );\n }", "title": "" }, { "docid": "7c8424d31eaa624067dc5241abfb9372", "score": "0.6257354", "text": "public function deleteStorage($storageId);", "title": "" }, { "docid": "4266f43d7f511bcf14d6ed4a63e0608f", "score": "0.6230025", "text": "public function delete($resource) {\n\t\t\t\n\t\t$url = $this->_path . '/api/v2' . $resource;\n\t\t\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_URL, $url);\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $this->_headers);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($curl, CURLOPT_VERBOSE, 1);\n\t\tcurl_setopt($curl, CURLOPT_HEADER, 1);\n\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\t\t$response = curl_exec($curl);\n\t\t$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\t\t$header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\n\t\t$headers = substr($response, 0, $header_size);\n\t\t$body = substr($response, $header_size);\n\t\tself::http_parse_headers($headers);\t \n\t\tcurl_close ($curl);\n\t\tif ($http_status == 204) {\n\t \treturn $http_status . ' DELETED';\n\t\t } else {\n\t\t \t$this->error($body, $url, null, 'DELETE');\n\t\t }\n\t}", "title": "" }, { "docid": "71cdf2c8771b0884ed0346cbff1672a0", "score": "0.62021154", "text": "abstract protected function destroyResource(): void;", "title": "" }, { "docid": "174b3cc2502c8f8c88a91296ed95d437", "score": "0.61883366", "text": "public function delete($resource) {\n\t\t\t\n\t\t$url = 'https://api.bigcommerce.com/stores/' . $this->_hash . '/v2/' . $resource;\n\t\t\n\t\tcurl_setopt($this->_curl, CURLOPT_URL, $url);\n\t\tcurl_setopt($this->_curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n\t\t$response = curl_exec($curl);\n\t\t$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\t\t$header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\n\t\t$headers = substr($response, 0, $header_size);\n\t\t$body = substr($response, $header_size);\n\t\t$headersArray = self::http_parse_headers($headers);\n\t\tif (! $this->rate_limit($headersArray) && $this->retries < self::RETRY_ATTEMPTS) {\n\t\t\t$this->retries = $this->retries + 1;\n\t\t\treturn $this->delete($resource);\n\t\t}\t \n\t\tcurl_close ($curl);\n\t\tif ($http_status == 204) {\n\t \treturn $http_status . ' DELETED';\n\t\t } else {\n\t\t \t$this->error($body, $url, null, 'DELETE');\n\t\t }\n\t}", "title": "" }, { "docid": "04ec0c72a529ea888ebec978b8312735", "score": "0.6156356", "text": "public function deleteFromStorage()\n {\n //Original\n if(file_exists(public_path($this->url))){\n File::delete(public_path($this->url));\n }\n\n //Thumbnail\n if(file_exists(public_path($this->thumb_url))){\n File::delete(public_path($this->thumb_url));\n }\n }", "title": "" }, { "docid": "2f47947186448448aa034e3f635016f3", "score": "0.61315197", "text": "public function removeApiResource($resource)\n {\n $index = array_search($resource, $this->apiResources);\n if ($index !== false) {\n unset($this->apiResources[$index]);\n // reindex this array to be sequential zero-based.\n $this->apiResources = array_values($this->apiResources);\n }\n }", "title": "" }, { "docid": "e0c513c82c944008d275fc6f457afb42", "score": "0.6123187", "text": "public function forceDeleted(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "347ab67e3e18ac392ded1095e453fdae", "score": "0.61123997", "text": "public function removeResource(string $resource): ?bool {\r\n\r\n //Check if resource exists\r\n if(true === isset($this -> resources[$resource])) {\r\n\r\n unset($this -> resources[$resource]);\r\n return true;\r\n }\r\n\r\n return null;\r\n }", "title": "" }, { "docid": "f1df46e2c5dfa855b0aae2241e47a742", "score": "0.60987437", "text": "public function destroy($id)\n {\n $entry = Storage::findOrFail($id);\n\n $entry->delete();\n\n return redirect('/storages');\n }", "title": "" }, { "docid": "7caa54c56a26f9c25867bf3b317a8b05", "score": "0.6078726", "text": "public function removeResource($key) {\r\n\t\tif (isset($this->resources[$key]))\r\n\t\t\tunset($this->resources[$key]);\r\n\t}", "title": "" }, { "docid": "4ee6a6c61b47a02140107fbd844ed2bb", "score": "0.6063936", "text": "public function removeResource($resource)\n\t{\n\t\t$this->needResource($resource);\n\n\t\t$parent = $this->resources[$resource]['parent'];\n\t\tif ($parent !== NULL) {\n\t\t\tunset($this->resources[$parent]['children'][$resource]);\n\t\t}\n\n\t\t$removed = array($resource);\n\t\tforeach ($this->resources[$resource]['children'] as $child => $foo) {\n\t\t\t$this->removeResource($child);\n\t\t\t$removed[] = $child;\n\t\t}\n\n\t\tforeach ($removed as $resourceRemoved) {\n\t\t\tforeach ($this->rules['byResource'] as $resourceCurrent => $rules) {\n\t\t\t\tif ($resourceRemoved === $resourceCurrent) {\n\t\t\t\t\tunset($this->rules['byResource'][$resourceCurrent]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tunset($this->resources[$resource]);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1a7799a3edae94b9a12c008d1d703c57", "score": "0.59831214", "text": "public function deleteStorageService($name);", "title": "" }, { "docid": "1a7799a3edae94b9a12c008d1d703c57", "score": "0.59831214", "text": "public function deleteStorageService($name);", "title": "" }, { "docid": "6916dd8c1d60603bcf3ae4bd18d41a83", "score": "0.5977718", "text": "public function removeResource($resource)\n {\n $acl = $this->_getAcl();\n $acl->remove($resource);\n $this->_setAcl($acl);\n\n return $this;\n }", "title": "" }, { "docid": "f23ad90184663348cc9db3cf44d0b0a5", "score": "0.595982", "text": "public function destroy(Resource $resource)\n {\n //\n\t\t\t\treturn response()->json([\n\t\t\t\t\t'destroyed'=>$resource->delete()\n\t\t\t\t]);\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "ef4a1685667d21fcb638df892463f9c8", "score": "0.59317005", "text": "public function destroy($id)\n {\n $supplier = Supplier::where('id',$id)->first();\n $photo = $supplier->image;\n if($photo){\n unlink($photo);\n $supplier->delete();\n }else{\n $supplier->delete();\n }\n }", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "d9a8a2179bed321de0122e8cff40c63a", "score": "0.5906186", "text": "public function remove($storageKey)\n {\n $path = $this->getImagePath((string) $storageKey);\n @unlink($path);\n }", "title": "" }, { "docid": "39b14dd177c56742d793fa231de87204", "score": "0.5899593", "text": "public function remove()\n {\n unlink($this->uploadDir . $this->nomenovo);\n\n parent::remove();\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "e03265a289855852afd2372dcb1d8daa", "score": "0.58933157", "text": "public function remove($path, $hard = false);", "title": "" }, { "docid": "aad5350294ac8f905383132f720b1be8", "score": "0.588305", "text": "public function delete($resource, $arOptions);", "title": "" }, { "docid": "d6fae5ff4be2ba960f6582fc42fd3676", "score": "0.5868486", "text": "public function remove() {\n if (file_exists($this->location))\n unlink($this->location);\n parent::remove();\n }", "title": "" }, { "docid": "77eb36c589be56f3f633dc84debdce8a", "score": "0.5864072", "text": "public function clearStorage(): void;", "title": "" }, { "docid": "7e7b93a0bfbbefcf0448e892241c5a20", "score": "0.585261", "text": "public function remove($name)\n {\n if (isset($this->storage[$name])) {\n unset($this->storage[$name]);\n }\n }", "title": "" }, { "docid": "3ca22b7764fa3b3a6a94edbeb0b0d64f", "score": "0.585028", "text": "public function clear()\n {\n if (file_exists($this->storageFile)) {\n unlink($this->storageFile);\n }\n }", "title": "" }, { "docid": "41603163cf71ae1b28de95896f8297c6", "score": "0.58502716", "text": "public function destroy($id)\n {\n $this->authorize('delete', $this->resource->getModel()->find($id));\n\n if (in_array($this->module->getName(), config('resource_lock'))) {\n\t $this->unlock($id);\n\t }\n\n $this->resource->delete($id);\n }", "title": "" }, { "docid": "1486c0df76f6bc31a817da2f80eb3546", "score": "0.5835488", "text": "public function deleteResourceById($id)\n {\n $resource = $this->getRecordById($id);\n\n if (isset($resource->id)) {\n //Delete record from id\n $this->delete(array('id = ?' => $id));\n\n //Delete files\n if (!empty($this->uploadedFiles)) {\n foreach ($this->uploadedFiles as $colName => $location) {\n if (!empty($resource->$colName)) {\n $fileName = $location . $resource->$colName;\n\n if (is_file($fileName)) {\n unlink($fileName);\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "83da6d00e9ec003d7115d52e8eaed9e7", "score": "0.5812055", "text": "public function del($path);", "title": "" }, { "docid": "bbd4fbeb169cce49dbdee4fcf4da3308", "score": "0.576368", "text": "public function destroy(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "5446b650450a069ded319874becfacf8", "score": "0.5749654", "text": "public function destroy($id)\n {\n $prestamo = Prestamo::where('id', $id)->first();\n $photo = $prestamo->image;\n if ($photo) {\n unlink($photo);\n $prestamo->delete();\n } else {\n $prestamo->delete();\n }\n }", "title": "" }, { "docid": "80dea14a08ed690bb6c0e40f9adf7b93", "score": "0.5730856", "text": "public function destroy($id)\n {\n $item=Item::find($id);\n //delete related file from storage\n $item->delete();\n return redirect()->route('items.index');\n }", "title": "" }, { "docid": "223830251a63efdf7921b31d2cb714b9", "score": "0.57265943", "text": "public function remove(string $path): void;", "title": "" }, { "docid": "afcc6695c26fa480351516ff52f20881", "score": "0.5723434", "text": "public function destroy($id)\n {\n $photo = Photo::find($id);\n if(file_exists(basename($photo->thumpnail_url))){\n unlink(\"storage/thumbnail/\". basename($photo->thumbnail_url));\n }\n if(file_exists(basename($photo->photo_url))){\n unlink(\"storage/slider/\". basename($photo->photo_url));\n } \n $photo->delete(); \n\n return redirect('/admin/photo/show');\n }", "title": "" }, { "docid": "e1196ae52794e4b5c86db7a7fa85b63b", "score": "0.5721902", "text": "public function destroy($id)\n {\n $image = Image::where('name','like','%'.$id.'%')->first();\n Storage::disk('spaces')->delete($image->location);\n $image->delete();\n }", "title": "" }, { "docid": "7b06ca498cebb34097bee47d0def61eb", "score": "0.5718601", "text": "public function delete() {\n if (unlink($this->fullPath)) {\n $this->fullPath = '';\n $this->mimeType = '';\n $this->simpleName = '';\n $this->size = 0;\n } else {\n throw new Exception('Check write Access to delete file!');\n }\n }", "title": "" }, { "docid": "e8717e0d91da860445a846b6f0ff4c6e", "score": "0.5717918", "text": "public function delete($uri) {\n return $this->filesystem->unlink($uri);\n }", "title": "" }, { "docid": "b86ae32c63f3ca7d52497df28e9fc6c7", "score": "0.5715146", "text": "public function remove(string $path): self;", "title": "" }, { "docid": "d88570650ee0cd02f602031e7809a9e1", "score": "0.569391", "text": "public function destroy(ResourceCreator $listener, $resourceId);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "e5d47a80a17edd9d97460e8002cc40a1", "score": "0.56822425", "text": "public function destroy($id)\n {\n try {\n $req = Req::find($id);\n\n foreach (json_decode($req->images) as $img){\n @unlink('storage/' . $img);\n }\n\n $req->delete();\n return response()->json([\n 'success' => 'Record deleted successfully!'\n ]);\n } catch (\\Exception $e) {\n return redirect()->back()->with('error', 'Error Try Again !!');\n }\n }", "title": "" }, { "docid": "69eb53cf8ca11222913b106ef117d68e", "score": "0.5679363", "text": "public function delete() {\n\t\t$this->checkWritePermission(true);\n\t\t$file = \\GO\\Files\\Model\\File::model()->findByPath($this->relpath);\n\t\t$file->delete();\n\t}", "title": "" }, { "docid": "c4f845a8d7bbb2425211bda284218817", "score": "0.56762695", "text": "function destroy() {\n\t\tunlink($this->get_file_name());\n\t\tself::remove_from_cache($this);\n\t}", "title": "" }, { "docid": "f62dc86d2fbee3e234695c789eabb485", "score": "0.5661866", "text": "public function destroy($id)\n {\n $student = Student::find($id);\n\n/* if($student->avatar)\n {\n unlink($student->avatar);\n }*/\n $student->delete();\n\n return redirect('students/')->with('success' , 'Data has been deleted');\n }", "title": "" }, { "docid": "c063d4508937e69e31d325da727fad68", "score": "0.56615514", "text": "public function unlink($filename) {\n $filename = $this->normalizePath($filename, NULL, FALSE);\n $filename_write = $this->toWritePath($filename);\n $this->writeOps->unlink($filename_write);\n if ($this->readOps instanceof ClearStatCacheInterface) {\n $this->readOps->clearstatcache($filename);\n }\n }", "title": "" }, { "docid": "7603d1c91a07e1809908a024215c7ff9", "score": "0.5659815", "text": "public function destroy($id)\n {\n $model= Model::findOrFail($id);\n $model->delete();\n\n $name = $model->image;\n File::delete(public_path().'/storage/'.$name);\n File::delete(public_path().'/storage/'.'thumb_'.$name);\n\n Alert::success('Model ' . $model->name . ' fue eliminada');\n return redirect()->route('models.index');\n }", "title": "" }, { "docid": "16edf2c6b79eca832eb0c092ab2f3f24", "score": "0.5649448", "text": "public function removeUpload()\r\n{\r\n if ($file = $this->getAbsolutePath()) {\r\n unlink($file); \r\n }\r\n}", "title": "" }, { "docid": "ca16d50e4d4e2ae00c79d72d63ee1f86", "score": "0.56463283", "text": "public function destroy($id)\n {\n\n $product = Product::findOrFail($id);\n if($product->photo){\n unlink( public_path() . $product->photo->path);\n }\n $product->delete();\n return redirect('productmodule/product')->with('message' ,\"Product Deleted Successfully\");\n\n// if ($product->delete()){\n// return new ProductResource($product);\n// }\n }", "title": "" }, { "docid": "a3a38b27322f5033d7e5049f50adbc03", "score": "0.5645099", "text": "public function unlink($uri, $context = NULL);", "title": "" }, { "docid": "0bc5c9101341c52f6ddc40571b9f9b66", "score": "0.5642073", "text": "public static function delete($image){\n if(!empty($image)){\n $image = str_replace('storage/', 'public/', $image);\n Storage::delete($image);\n }\n }", "title": "" }, { "docid": "be8b1d58278cafac500d99e1d8bf4e7c", "score": "0.56408733", "text": "public function delete()\n {\n self::getPersistenceDriver()->deleteOne($this->data);\n }", "title": "" }, { "docid": "2827a1d4696a95ab9b5d963d5f620b35", "score": "0.56362814", "text": "public function delete() {\n if (!isset($this->currentUser)) {\n throw new Exception(\"Not in session. Editing users requires login\");\n }\n if ($this->currentUser->getUser_type()!=usertype::Administrator){\n throw new Exception(\"Not valid user. Editing resource requires Administrator\");\n }\n\n // Get the user object from the database\n $idresource = $_REQUEST[\"idresource\"];\n $resource = $this->resourceMapper->findById($idresource);\n\n // Does the user exist?\n if ($resource == NULL) {\n throw new Exception(\"no such resource with id: \".$idresource);\n }\n\n // Delete the user object from the database\n $this->resourceMapper->delete($resource);\n\n\n $this->view->setFlash(sprintf(i18n(\"Resource successfully deleted.\"),$resource->getIdresource()));\n\n $this->view->redirect(\"resources\", \"index\");\n\n }", "title": "" }, { "docid": "5109ebc26960086f990edb39768f4e00", "score": "0.5635025", "text": "public function destroy($id)\n {\n unlink('.'.item::find($id)->img);\n item::destroy($id);\n Session::flash('warning','Item Removido!');\n return redirect()->route('home');\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "d29811d1577ed7443199fc1b4276bdd0", "score": "0.56324077", "text": "public function remove($id) {\r\n if ($this->has($id, $this->namespace, self::SCOPE_MEMORY)) {\r\n unset($this->$cache[$this->generateAccessKey($id)]);\r\n }\r\n elseif ($this->has($id, $namespace, self::SCOPE_FILE)) {\r\n \t$filepath = $this->getFilename($this->generateAccessKey($id));\r\n \t@unlink($filepath);\r\n }\r\n }", "title": "" }, { "docid": "62ec0dff73832f5d98bdecee5d10241e", "score": "0.5628287", "text": "public function destroy($ourResource)\n {\n $ourResource= OurResource::Find($ourResource)->firstOrFail();\n $ourResource->delete();\n return redirect(route('ourresource.index'));\n\n }", "title": "" }, { "docid": "e69195d4a9a40721a876716ff49334cc", "score": "0.5625231", "text": "public function destroy($id)\n {\n\n $post = $this->globalvar['model']::find($id);\n $resourceimage = $this->imageresource;\n File::delete($this->globalvar['uploadpath'].'/'.$post->$resourceimage);\n $post->delete();\n\n Session::flash('Success', $this->globalvar['deletionsuccess']);\n return redirect()->route($this->globalvar['routeindex']);\n }", "title": "" }, { "docid": "81b2a149b82ad070a8fc5640c23cb4c5", "score": "0.56235874", "text": "public function deleteResource($resourceId)\n {\n $req = new RESTRequest();\n $data = $req->adminGet('LearningObject/delete/' . $resourceId)->getData();\n return $data;\n }", "title": "" }, { "docid": "3662a98e9c39b3ce43a9446f372faaea", "score": "0.56112725", "text": "public function destroyById($id);", "title": "" }, { "docid": "d19f0dd6eed7e8a8da6c207b4e430532", "score": "0.560789", "text": "public function serverDeleteVideo($resource, $email)\n {\n $resource2 = $resource;\n $path = base_path() . \"\\\\resources\\\\videos\\\\\";\n $path = $path . $email . \"\\\\\";\n\n $dir = @dir($path) or die(\"getFileList: Error abriendo el directorio $path para leerlo\");\n while(($archivo = $dir->read()) !== false) {\n // Obviamos los archivos ocultos\n if($archivo[0] == \".\") continue;\n /*if(is_dir($path . $archivo)) {\n // var_dump($archivo[0]);\n }*/ else if (is_readable($path . $archivo)) {\n \n $file = basename($path . $archivo); \n //echo $file;\n if($file == $resource2){\n unlink($path . $archivo);\n //echo $file;\n $contents = \"Deleted\";\n $response = Response::make($contents, 204);\n $response->header('Content-Type', 'application/json');\n return var_dump($response);\n }\n }\n }\n \n }", "title": "" }, { "docid": "be1aaccbcdec9ba85c660767bd3c39d7", "score": "0.5604081", "text": "public function destroy($id)\n {\n Resource::deleteResource($id);\n }", "title": "" }, { "docid": "b51f394c05cd4f2c03b66fb420214bf9", "score": "0.5596357", "text": "private function removeStoragePath($image)\n {\n $path_attr = $this->path_attr;\n\n Storage::delete($image->$path_attr);\n }", "title": "" }, { "docid": "6fbcf9a59c7f34ed85fd172cdf3d3c38", "score": "0.5595493", "text": "public function remove(){}", "title": "" }, { "docid": "635fc9f7a4a2830c651a29b140289b35", "score": "0.5590984", "text": "public function delete(string $path): void;", "title": "" }, { "docid": "61fba936475c878e54c2ccdf6070fb37", "score": "0.5589317", "text": "public function destroy($id)\n {\n //\n $record = Record::findOrFail($id);\n if($record->photo_id){ \n unlink(public_path() . $record->photo->file);\n }\n $record->delete();\n Session::flash('deleted_record','The record has been deleted');\n return redirect('admin/records');\n }", "title": "" }, { "docid": "e8dc5b1c3960ebd872e6313cb6c5d0a3", "score": "0.55856156", "text": "public function destroy($id)\n\t{\n $modelname = $this->modelname;\n $resource = $modelname::find($id);\n if($resource)\n {\n $resource->delete();\n }\n\t}", "title": "" }, { "docid": "727ad3584e68e2fbd7f4240087aca6cc", "score": "0.5571009", "text": "public function destroy($id)\n {\n $data = Supplier::findOrFail($id);\n $file_path = public_path() . $data->photo;\n if (file_exists($file_path)) {\n try {\n unlink($file_path);\n } catch (Exception $e) {\n // Do Nothing on Exception\n }\n }\n if ($data->delete()) {\n return back()->with([\"success\" => \"Data deleted successfully\"]);\n } else {\n return back()->with([\"error\" => \"Delete process failed\"]);\n }\n }", "title": "" }, { "docid": "5ee1747f20cb5d4c363843da3cc571d2", "score": "0.55688524", "text": "public function destroy($id)\n {\n try {\n \n $photo=Supplier::find($id);\n $location=base_path().'/public/img/supplier/' .$photo->Picture;\n $cc = unlink($location);\n \n Supplier::find($id)->delete(); \n return redirect('/supplier')->with('Data supplier successfully removed .');\n }\n catch(Exception $e) {\n return redirect('/supplier')->with('pesan_gagal', $e->getMessage());\n }\n }", "title": "" }, { "docid": "c70b89412cfa3204082621e98738cb27", "score": "0.5562218", "text": "public function delete()\n\t{\n\t\t$resource_contents = $this->client->query('DELETE', $this->url);\n\t\t$this->initialize_from_resource_contents($resource_contents);\n\t}", "title": "" }, { "docid": "21b9068d98d337440a28121b19231757", "score": "0.5560739", "text": "public function destroy($id)\n {\n $pic = Pic::find($id);\n $path = public_path('/storage/').$pic['name'];\n if(file_exists($path)){\n unlink($path);\n $pic->delete();\n return redirect('pics')->with('success', 'Picture has been successfully deleted');\n }\n else{\n return redirect('pics')->with('failure', 'Picture was not deleted');\n }\n }", "title": "" }, { "docid": "16a6c0a8baa71c1d7233b60b2b1c76f7", "score": "0.5559715", "text": "public function destroy($id)\n {\n $product = Product::find($id);\n $product->delete();\n// Storage::disk('uploads')->delete($product->image_path);\n\n// unlink(public_path('uploads/' . $product->image_path)); //Native php\n return redirect()->route('products.index')->with([\n 'success' => 'product ' . $product->name . ' deleted to trash Successfully'\n ]);\n }", "title": "" }, { "docid": "944f0f53f717617ff54aba9fd9e47542", "score": "0.5556541", "text": "public function destroy($id){\n\n $image = Slider::find($id);\n\n if(unlink(public_path('/images/slider/'.$image->image))){\n $image->delete();\n return back()->with('success', 'Slider Image Deleted');\n }\n }", "title": "" }, { "docid": "120960a561ec9e0438e25d9279c7d899", "score": "0.55498356", "text": "public function destroy($id)\n {\n $deleteSingle = Menu::find($id);\n \nunlink(public_path() . '/menu/' . $deleteSingle->image);\n \n $deleteSingle->delete();\n return redirect('/admin/menu');\n }", "title": "" }, { "docid": "640b23a5dcf07677851e9c4a1dcdabf1", "score": "0.55474347", "text": "public function remove($assetFile);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "2f14aec89d53e310ca8947cee2091f8e", "score": "0.5540011", "text": "public function deleteFromResourceIndices(&$resource) {\n\n if ($this->connector != null) {\n $params = [\n 'index' => \\snac\\Config::$ELASTIC_SEARCH_RESOURCE_INDEX,\n 'id' => $resource->getID()\n ];\n\n $this->logger->addDebug(\"Updated elastic search to remove resource\");\n }\n\n }", "title": "" }, { "docid": "b5b688091a31c75ff8615389051972dc", "score": "0.5539336", "text": "public function delete()\n {\n $this->removeImage();\n parent::delete();\n }", "title": "" }, { "docid": "d0252df7b40416387e377fa297935229", "score": "0.5537589", "text": "public function persistRemove()\n {\n $old = $this->determineName(false);\n if (!isset($old)) return;\n \n $old = new File($this->getPath() . '/' .$old);\n if (file_exists($old)) {\n if ((string)$old != (string)$this->replacement) unlink($old);\n foreach (glob($old->getPath() . '/*.' . $old->getBasename()) as $file) unlink($file);\n }\n }", "title": "" }, { "docid": "d74232efdaa63e7c24cc94cdb786b212", "score": "0.55310154", "text": "public function removeImage(){\r\n\t\t$id = Input::get('id');\r\n\t\t$image = ProductImage::where('id', $id)->pluck('image');\r\n @unlink(PRODUCTS_IMAGE_ROOT_PATH . $image);\r\n\t\tDB::table('product_images')->where('id', '=', $id)->delete();\r\n\t\tdie;\r\n\t}", "title": "" }, { "docid": "05455e5116f6ce487eddc1f096db4ea6", "score": "0.55273694", "text": "public function delete() : Resource {\n try{\n \n $this->method = 'DELETE';\n return $this;\n \n } catch (\\Throwable $t){\n new ErrorTracer($t);\n }\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" } ]
b7f0c8d6630f3040aad92ef6211537aa
function getResized($id, &$mime, $imgFolder, $newWidth=false, $newHeight=false, $bgcolor="000000", $resample=true, $cache=false, $cacheFolder=false, $cacheClear=false, $tempFolder=false, $crop=true, $crop_direction='N', $enlarge=true,$resize=false,$watermark=false)
[ { "docid": "2c0863761a5f87cfca7411fbef54e6d6", "score": "0.8752108", "text": "function getResized($id, &$mime, $options=array()){\n\n\t\t//$imgFolder,\n\n\t\t$default_options=array(\n\t\t\t\t'newWidth'=>false,\n\t\t\t\t'newHeight'=>false,\n\t\t\t\t'bgcolor'=>'FFFFFF',\n\t\t\t\t'resample'=>true,\n\t\t\t\t'subFolder'=>'',\n\t\t\t\t'imgFolder'=>Q3MEDIA_IMG_UPLOAD_FOLDER,\n\t\t\t\t'tempFolder'=>Q3MEDIA_IMG_TEMP_FOLDER,\n\t\t\t\t'cacheFolder'=>Q3MEDIA_IMG_CACHE_FOLDER,\n\t\t\t\t'cache'=>Q3MEDIA_IMG_CACHE,\n\t\t\t\t'cacheClear'=>false,\n\t\t\t\t'crop'=>true,\n\t\t\t\t'crop_direction'=>'N',\n\t\t\t\t'enlarge'=>true,\n\t\t\t\t'resize'=>false,\n\t\t\t\t'watermark'=>false\n\t\t);\n\n\t\t$actual_options=array_merge($default_options,$options);\n\t\textract($actual_options);\n\n\t\t$cacheClear=true;//?¿\n\n\t\tif(!empty($subFolder)){\n\t\t\t$imgFolder.=$subFolder.DS;\n\t\t\t$tempFolder.=$subFolder.DS;\n\t\t\t$cacheFolder.=$subFolder.DS;\n\t\t}\n\n\t\t$img = $imgFolder .$id;\n\t\tlist($oldWidth, $oldHeight, $type) = getimagesize($img);\n\t\t$ext = $this->image_type_to_extension($type);\n\t\t$mime = image_type_to_mime_type($type);\n\n\t\tif ($cache AND is_writeable($cacheFolder)){\n\t\t\t$extra=$crop_direction;\n\t\t\tif($enlarge){\n\t\t\t\t$extra.='_e';\n\t\t\t}\n\t\t\t$dest = $cacheFolder . $id . '_' . $newWidth . 'x' . $newHeight.'_'.$extra;\n\t\t}\n\t\telseif (is_writeable($tempFolder)){\n\t\t\t$dest = $tempFolder . $id;\n\t\t}\n\t\telse{\n\t\t\tdebug(\"You must set either a cache folder or temporal folder for image processing. And the folder has to be writable.\");\n\t\t\tif (strlen($cacheFolder)){\n\t\t\t\tdebug(\"Cache Folder \\\"\".$cacheFolder.\"\\\" has permissions \".substr(sprintf('%o', fileperms($cacheFolder)), -4));\n\t\t\t\tdebug(\"Please run \\\"chmod 777 $cacheFolder\\\"\");\n\t\t\t}\n\t\t\tif (strlen($tempFolder)){\n\t\t\t\tdebug(\"Temp Folder: \".$tempFolder.\" Permissions:\".substr(sprintf('%o', fileperms($tempFolder)), -4));\n\t\t\t\tdebug(\"Run \\\"chmod 777 $tempFolder\\\"\");\n\t\t\t}\n\t\t\texit();\n\t\t}\n\n\t\tif ($newWidth OR $newHeight)\n\t\t{\n\t\t\tif($cacheClear && file_exists($dest))\n\t\t\t{\n\t\t\t\tunlink($dest);\n\t\t\t}\n\n\t\t\tif($cache AND file_exists($dest))\n\t\t\t{\n\t\t\t\t$i = fopen($dest, 'rb');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\tif(!$enlarge && !$resize){\n\t\t\t\t\tif($newWidth>$oldWidth){\n\t\t\t\t\t\t$newWidth=$oldWidth;\n\t\t\t\t\t}\n\t\t\t\t\tif($newHeight>$oldHeight){\n\t\t\t\t\t\t$newHeight=$oldHeight;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($newHeight==0){\n\t\t\t\t\t$newHeight=$newWidth*$oldHeight/$oldWidth;\n\t\t\t\t}\n\n\t\t\t\tif($newWidth==0){\n\t\t\t\t\t$newWidth=$newHeight*$oldWidth/$oldHeight;\n\t\t\t\t}\n\n\t\t\t\tif($crop){\n\t\t\t\t\t// Horizontal cropping\n\t\t\t\t\tif($newWidth/$newHeight<$oldWidth/$oldHeight){\n\t\t\t\t\t\t$delta_x=$oldWidth-($oldHeight*$newWidth)/$newHeight;\n\t\t\t\t\t\t$delta_y=0;\n\t\t\t\t\t\t$start_y=0;\n\t\t\t\t\t\t// Intermediate image size (to obtain advanced cropping)\n\t\t\t\t\t\t$midWidth = round(($oldWidth*$newHeight)/$oldHeight);\n\t\t\t\t\t\tswitch($crop_direction){\n\t\t\t\t\t\t\tcase 'W':\n\t\t\t\t\t\t\tcase 'NW':\n\t\t\t\t\t\t\tcase 'SW': $start_x=0;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'E':\n\t\t\t\t\t\t\tcase 'NE':\n\t\t\t\t\t\t\tcase 'SE': $start_x=$delta_x;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'C':\n\t\t\t\t\t\t\tcase 'S':\n\t\t\t\t\t\t\tcase 'N':$start_x=$delta_x/2;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$start_x = explode(\"-\",$crop_direction);\n\t\t\t\t\t\t\t\t$start_x = ($start_x[0]*$delta_x)/($midWidth-$newWidth);\n\t\t\t\t\t\t\t\t// Fix crop if out of bounds.\n\t\t\t\t\t\t\t\tif(($start_x+$newWidth)>$midWidth) $start_x -= (($start_x+$newWidth)-$midWidth);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\t// Vertical cropping\n\t\t\t\t\telse{\n\t\t\t\t\t\t$delta_x=0;\n\t\t\t\t\t\t$delta_y=$oldHeight-($oldWidth*$newHeight)/$newWidth;\n\t\t\t\t\t\t$start_x=0;\n\t\t\t\t\t\t// Intermediate image size (to obtain advanced cropping)\n\t\t\t\t\t\t$midHeight = round(($oldHeight*$newWidth)/$oldWidth);\n\t\t\t\t\t\tswitch($crop_direction){\n\t\t\t\t\t\t\tcase 'N':\n\t\t\t\t\t\t\tcase 'NE':\n\t\t\t\t\t\t\tcase 'NW': $start_y=0;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'S':\n\t\t\t\t\t\t\tcase 'SE':\n\t\t\t\t\t\t\tcase 'SW': $start_y=$delta_y;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'C':\n\t\t\t\t\t\t\tcase 'E':\n\t\t\t\t\t\t\tcase 'W':$start_y=$delta_y/2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\n\t\t\t\t\t\t\t\t$start_y = explode(\"-\",$crop_direction);\n\t\t\t\t\t\t\t\t$start_y = ($start_y[1]*$delta_y)/($midHeight-$newHeight);\n\t\t\t\t\t\t\t\t// Fix crop if out of bounds.\n\t\t\t\t\t\t\t\tif(($start_y+$newHeight)>$midHeight) $start_y -= (($start_y+$newHeight)-$midHeight);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(!$resize && ($newWidth > $oldWidth) && ($newHeight > $oldHeight)){\n\n\t\t\t\t\t\t$applyWidth = $oldWidth;\n\t\t\t\t\t\t$applyHeight = $oldHeight;\n\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tif(($newWidth/$newHeight) < ($oldWidth/$oldHeight)){\n\t\t\t\t\t\t\t$applyHeight = $newWidth*$oldHeight/$oldWidth;\n\t\t\t\t\t\t\t$applyWidth = $newWidth;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$applyWidth = $newHeight*$oldWidth/$oldHeight;\n\t\t\t\t\t\t\t$applyHeight = $newHeight;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tswitch($ext)\n\t\t\t\t{\n\t\t\t\t\tcase 'gif' :\n\t\t\t\t\t\t$oldImage = imagecreatefromgif($img);\n\t\t\t\t\t\t$newImage = imagecreate($newWidth, $newHeight);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'png' :\n\t\t\t\t\t\t$oldImage = imagecreatefrompng($img);\n\t\t\t\t\t\t$newImage = imagecreatetruecolor($newWidth, $newHeight);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'jpg' :\n\t\t\t\t\t\t$oldImage = imagecreatefromjpeg($img);\n\t\t\t\t\t\t$newImage = imagecreatetruecolor($newWidth, $newHeight);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'jpeg' :\n\t\t\t\t\t\t$oldImage = imagecreatefromjpeg($img);\n\t\t\t\t\t\t$newImage = imagecreatetruecolor($newWidth, $newHeight);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(!empty($bgcolor)){\n\t\t\t\t\tsscanf($bgcolor, \"%2x%2x%2x\", $red, $green, $blue);\n\t\t\t\t\t$newColor = ImageColorAllocate($newImage, $red, $green, $blue);\n\t\t\t\t\timagefill($newImage,0,0,$newColor);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\timagealphablending($newImage, false);\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\t debug($newWidth.' - '.$newHeigh);\n\t\t\t\tdebug($applyWidth.' - '.$applyHeight);\n\t\t\t\tdebug($oldWidth.' - '.$oldHeight);\n\t\t\t\tdie();\n\t\t\t\t*/\n\n\n\n\t\t\t\tif ($resample==true)\n\t\t\t\t{\n\t\t\t\t\tif($crop){\n\t\t\t\t\t\tImageCopyResampled($newImage,$oldImage,0,0,$start_x,$start_y,$newWidth,$newHeight,$oldWidth-$delta_x,$oldHeight-$delta_y);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tImageCopyResampled($newImage, $oldImage, ($newWidth-$applyWidth)/2, ($newHeight-$applyHeight)/2, 0, 0, $applyWidth, $applyHeight, $oldWidth, $oldHeight);\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\tif($crop){\n\t\t\t\t\t\tImageCopyResized($newImage,$oldImage,0,0,$start_x,$start_y,$newWidth,$newHeight,$oldWidth-$delta_x,$oldHeight-$delta_y);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tImageCopyResampled($newImage, $oldImage, ($newWidth-$applyWidth)/2, ($newHeight-$applyHeight)/2, 0, 0, $applyWidth, $applyHeight, $oldWidth, $oldHeight);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t\tif($watermark && file_exists($watermark)){\n\n\n\t\t\t\t\tlist($wmWidth, $wmHeight, $wmtype) = getimagesize($watermark);\n\t\t\t\t\t$wmImage = imagecreatefrompng($watermark);\n\t\t\t\t\t//imagealphablending($wmImage, TRUE);\n\t\t\t\t\t//\t\t\t\t\tdebug($wmWidth.'x'.$wmHeight);\n\t\t\t\t\t//\t\t\t\t\tdebug($applyWidth.'x'.$applyHeight);\n\t\t\t\t\t//\t\t\t\t\tdebug('0'.'x'.($applyHeight-$wmHeight).'x'.'0'.'x'.'0'.'x'.$wmWidth.'x'.$wmHeight.'x'.$applyWidth.'x'.$applyHeight);\n\n\t\t\t\t\timagealphablending($newImage, TRUE);\n\t\t\t\t\t$factor=($newWidth/$wmWidth);\n\t\t\t\t\t//\t\t\t\t\tdebug('0'.'x'.($applyHeight-$wm_real_height).'x'.'0'.'x'.'0'.'x'.$wmWidth.'x'.$wmHeight.'x'.$applyWidth.'x'.$wm_real_height);\n\t\t\t\t\t//\t\t\t\t\tdebug($wm_real_height);\n\t\t\t\t\t//\t\t\t\t\tdie();\n\t\t\t\t\t//ImageCopyResized($newImage,$wmImage,0,($applyHeight-$wm_real_height),0,0,$wmWidth,$wmHeight,$applyWidth,$wm_real_height);\n\t\t\t\t\tImageCopyResized($newImage,$wmImage,0,($newHeight-($newHeight-$applyHeight)/2-$factor*$wmHeight),0,0,$factor*$wmWidth,$factor*$wmHeight,$wmWidth,$wmHeight);\n\n\n\t\t\t\t\t//\t\t\t\t$newImage=$wmImage;\n\t\t\t\t\t//\t\t\timagealphablending($newImage, TRUE);\n\t\t\t\t}\n\n\t\t\t\t//\t\t\tdie();\n\n\t\t\t\tswitch($ext)\n\t\t\t\t{\n\t\t\t\t\tcase 'gif' :\n\t\t\t\t\t\timagegif($newImage, $dest);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'png' :\n\t\t\t\t\t\tif(empty($bgcolor)){\n\t\t\t\t\t\t\timagealphablending($newImage,false);\n\t\t\t\t\t\t\timagesavealpha($newImage,true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\timagepng($newImage, $dest);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'jpg' :\n\t\t\t\t\t\timagejpeg($newImage, $dest, '90');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'jpeg' :\n\t\t\t\t\t\timagejpeg($newImage, $dest);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\timagedestroy($newImage);\n\t\t\t\timagedestroy($oldImage);\n\t\t\t\t$i = fopen($dest, 'rb');\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$i = fopen($img, 'rb');\n\t\t}\n\n\t\treturn $i;\n\t}", "title": "" } ]
[ { "docid": "61fd5ce6f3287460aa301a103fff0346", "score": "0.70568", "text": "function pte_resize_images(){\n\t$logger = PteLogger::singleton();\n\tglobal $pte_sizes;\n\n\t// Require JSON output\n\tpte_require_json();\n\n\t$id = pte_check_id( $_GET['id'] );\n\t$w = pte_check_int( $_GET['w'] );\n\t$h = pte_check_int( $_GET['h'] );\n\t$x = pte_check_int( $_GET['x'] );\n\t$y = pte_check_int( $_GET['y'] );\n\n\tif ( $id === false\n\t\t|| $w === false\n\t\t|| $h === false\n\t\t|| $x === false\n\t\t|| $y === false\n\t){\n\t\treturn pte_json_error( \"ResizeImages initialization failed: '{$id}-{$w}-{$h}-{$x}-{$y}'\" );\n\t}\n\n\t// Get the sizes to process\n\t$pte_sizes = $_GET['pte-sizes'];\n\t$sizes = pte_get_all_alternate_size_information( $id );\n\n\t// The following information is common to all sizes\n\t// *** common-info\n\t$dst_x = 0;\n\t$dst_y = 0;\n\t$original_file = get_attached_file( $id );\n\t$original_size = @getimagesize( $original_file );\n\t$uploads \t = wp_upload_dir();\n\t$PTE_TMP_DIR = $uploads['basedir'] . DIRECTORY_SEPARATOR . \"ptetmp\" . DIRECTORY_SEPARATOR;\n\t$PTE_TMP_URL = $uploads['baseurl'] . \"/ptetmp/\";\n\t$thumbnails = array();\n\n\tif ( !$original_size ){\n\t\treturn pte_json_error(\"Could not read image size\");\n\t}\n\n\t$logger->debug( \"BASE FILE DIMENSIONS/INFO: \" . print_r( $original_size, true ) );\n\tlist( $orig_w, $orig_h, $orig_type ) = $original_size;\n\t// *** End common-info\n\n\t// So this never interrupts the jpeg_quality anywhere else\n\tadd_filter('jpeg_quality', 'pte_get_jpeg_quality');\n\n\tforeach ( $sizes as $size => $data ){\n\t\t// Get all the data needed to run image_create\n\t\t//\n\t\t//\t$dst_w, $dst_h \n\t\textract( pte_get_width_height( $data, $w, $h ) );\n\t\t$logger->debug( \"WIDTHxHEIGHT: $dst_w x $dst_h\" );\n\n\t\t// Set the directory\n\t\t$basename = pte_generate_filename( $original_file, $dst_w, $dst_h );\n\t\t// Set the file and URL's - defines set in pte_ajax\n\t\t$tmpfile = \"{$PTE_TMP_DIR}{$id}\" . DIRECTORY_SEPARATOR . \"{$basename}\";\n\t\t$tmpurl = \"{$PTE_TMP_URL}{$id}/{$basename}\";\n\n\t\t// === CREATE IMAGE ===================\n\t\t// This function is in wp-includes/media.php\n\t\t$editor = wp_get_image_editor( $original_file );\n\t\t$crop_results = $editor->crop($x, $y, $w, $h, $dst_w, $dst_h); \n\n\t\tif ( is_wp_error( $crop_results ) ){\n\t\t\t$logger->error( \"Error creating image: {$size}\" );\n\t\t\tcontinue;\n\t\t}\n\n\t\t// The directory containing the original file may no longer exist when\n\t\t// using a replication plugin.\n\t\twp_mkdir_p( dirname( $tmpfile ) );\n\n\t\t$tmpfile = dirname( $tmpfile ) . '/' . wp_unique_filename( dirname( $tmpfile ), basename( $tmpfile ) );\n\n\t\tif ( is_wp_error( $editor->save( $tmpfile ) ) ){\n\t\t\t$logger->error( \"Error writing image: {$size} to '{$tmpfile}'\" );\n\t\t\tcontinue;\n\t\t}\n\t\t// === END CREATE IMAGE ===============\n\n\t\t// URL: wp_upload_dir => base_url/subdir + /basename of $tmpfile\n\t\t// This is for the output\n\t\t$thumbnails[$size]['url'] = $tmpurl;\n\t\t$thumbnails[$size]['file'] = basename( $tmpfile );\n\t}\n\n\t// Did you process anything?\n\tif ( count( $thumbnails ) < 1 ){\n\t\treturn pte_json_error(\"No images processed\");\n\t}\n\n\treturn pte_json_encode( array( \n\t\t'thumbnails' => $thumbnails,\n\t\t'pte-nonce' => wp_create_nonce( \"pte-{$id}\" ),\n\t\t'pte-delete-nonce' => wp_create_nonce( \"pte-delete-{$id}\" )\n\t) );\n}", "title": "" }, { "docid": "df961bb6470c6c0fb461eef51e5793e4", "score": "0.69318086", "text": "function resize_image($orig_file_name, $resized_file_name) {\r\n\t\r\n\t// *** 1) Initialise / load image\r\n\t$resizeObj = new resize ( $orig_file_name );\r\n\t\r\n\t// *** 2) Resize image (options: exact, portrait, landscape, auto, crop)\r\n\t$resizeObj->resizeImage ( 200, 200, 'crop' );\r\n\t\r\n\t// *** 3) Save image\r\n\t$resizeObj->saveImage ( $resized_file_name, 100 );\r\n}", "title": "" }, { "docid": "aabf2244011c11c8ce6792d0382628a9", "score": "0.6774626", "text": "function img_resizer($src,$quality,$w,$h,$saveas) {\r\n\t$r=1;\r\n\t$e=strtolower(substr($src,strrpos($src,\".\")+1,3));\r\n\tif (($e == \"jpg\") || ($e == \"peg\")) {\r\n\t\t$OldImage=ImageCreateFromJpeg($src) or $r=0;\r\n\t} elseif ($e == \"gif\") {\r\n\t\t$OldImage=ImageCreateFromGif($src) or $r=0;\r\n\t} elseif ($e == \"bmp\") {\r\n\t\t$OldImage=ImageCreateFromwbmp($src) or $r=0;\r\n\t} elseif ($e == \"png\") {\r\n\t\t$OldImage=ImageCreateFromPng($src) or $r=0;\r\n\t} else {\r\n\t\t_o(\"Not a Valid Image! (\".$e.\") -- \".$src);$r=0;\r\n\t}\r\n\tif ($r) {\r\n\t\tlist($width,$height)=getimagesize($src);\r\n\t\t// check if ratios match\r\n\t\t$_ratio=array($width/$height,$w/$h);\r\n\t\tif ($_ratio[0] != $_ratio[1]) { // crop image\r\n\r\n\t\t\t// find the right scale to use\r\n\t\t\t$_scale=min((float)($width/$w),(float)($height/$h));\r\n\r\n\t\t\t// coords to crop\r\n\t\t\t$cropX=(float)($width-($_scale*$w));\r\n\t\t\t$cropY=(float)($height-($_scale*$h));\r\n\r\n\t\t\t// cropped image size\r\n\t\t\t$cropW=(float)($width-$cropX);\r\n\t\t\t$cropH=(float)($height-$cropY);\r\n\r\n\t\t\t$crop=ImageCreateTrueColor($cropW,$cropH);\r\n\t\t\t// crop the middle part of the image to fit proportions\r\n\t\t\tImageCopy(\r\n\t\t\t$crop,\r\n\t\t\t$OldImage,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t(int)($cropX/2),\r\n\t\t\t(int)($cropY/2),\r\n\t\t\t$cropW,\r\n\t\t\t$cropH\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// do the thumbnail\r\n\t\t$NewThumb=ImageCreateTrueColor($w,$h);\r\n\t\tif (isset($crop)) { // been cropped\r\n\t\t\tImageCopyResampled(\r\n\t\t\t$NewThumb,\r\n\t\t\t$crop,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t$w,\r\n\t\t\t$h,\r\n\t\t\t$cropW,\r\n\t\t\t$cropH\r\n\t\t\t);\r\n\t\t\tImageDestroy($crop);\r\n\t\t} else { // ratio match, regular resize\r\n\t\t\tImageCopyResampled(\r\n\t\t\t$NewThumb,\r\n\t\t\t$OldImage,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t$w,\r\n\t\t\t$h,\r\n\t\t\t$width,\r\n\t\t\t$height\r\n\t\t\t);\r\n\t\t}\r\n\t\t_ckdir($saveas);\r\n\t\tImageJpeg($NewThumb,$saveas,$quality);\r\n\t\tImageDestroy($NewThumb);\r\n\t\tImageDestroy($OldImage);\r\n\t}\r\n\treturn $r;\r\n}", "title": "" }, { "docid": "d407e3322d476ea3eb5740caa16ceca5", "score": "0.67545265", "text": "function resizeimg($img, $w, $h, $newfilename,$folder,$fixwh=\"\") {\r\r\n $imgInfo = getimagesize($img);\r\r\n\t\r\r\n switch ($imgInfo[2]) {\r\r\n case 1: $im = imagecreatefromgif($img); break;\r\r\n case 2: $im = imagecreatefromjpeg($img); break;\r\r\n case 3: $im = imagecreatefrompng($img); break;\r\r\n //default: trigger_error('Unsupported filetype!', E_USER_WARNING); break;\r\r\n }\r\r\n \r\r\n //If image dimension is smaller, do not resize\r\r\n if ($imgInfo[0] <= $w && $imgInfo[1] <= $h) {\r\r\n $nHeight = $imgInfo[1];\r\r\n $nWidth = $imgInfo[0];\r\r\n }else{\r\r\n //yeah, resize it, but keep it proportional\r\r\n\t\r\r\n if ($w/$imgInfo[0] > $h/$imgInfo[1]) {\r\r\n $nWidth = $w;\r\r\n $nHeight = $imgInfo[1]*($w/$imgInfo[0]);\r\r\n }else{\r\r\n $nWidth = $imgInfo[0]*($h/$imgInfo[1]);\r\r\n $nHeight = $h;\r\r\n }\r\r\n\t \r\r\n\t if($fixwh!=\"\" && $fixwh==\"h\"){\r\r\n\t\t $nWidth = $imgInfo[0]*($h/$imgInfo[1]);\r\r\n \t $nHeight = $h;\r\r\n\t\t}\r\r\n\t else if($fixwh!=\"\" && $fixwh==\"w\"){\r\r\n\t\t\t$nWidth = $w;\r\r\n\t\t $nHeight = $imgInfo[1]*($w/$imgInfo[0]);\r\r\n\t\t}\r\r\n\t\r\r\n }\r\r\n $nWidth = round($nWidth);\r\r\n $nHeight = round($nHeight);\r\r\n \r\r\n $newImg = imagecreatetruecolor($nWidth, $nHeight);\r\r\n \r\r\n /* Check if this image is PNG or GIF, then set if Transparent*/ \r\r\n if(($imgInfo[2] == 1) OR ($imgInfo[2]==3)){\r\r\n imagealphablending($newImg, false);\r\r\n imagesavealpha($newImg,true);\r\r\n $transparent = imagecolorallocatealpha($newImg, 255, 255, 255, 127);\r\r\n imagefilledrectangle($newImg, 0, 0, $nWidth, $nHeight, $transparent);\r\r\n }\r\r\n imagecopyresampled($newImg, $im, 0, 0, 0, 0, $nWidth, $nHeight, $imgInfo[0], $imgInfo[1]);\r\r\n \r\r\n //Generate the file, and rename it to $newfilename\r\r\n switch ($imgInfo[2]) {\r\r\n case 1: imagegif($newImg,SITE_PATH.'uploads/'.$folder.'/'.$newfilename); break;\r\r\n case 2: imagejpeg($newImg,SITE_PATH.'uploads/'.$folder.'/'.$newfilename); break;\r\r\n case 3: imagepng($newImg,SITE_PATH.'uploads/'.$folder.'/'.$newfilename); break;\t\t\r\r\n // default: trigger_error('Failed resize image!', E_USER_WARNING); break;\r\r\n }\r\r\n \r\r\n return $newfilename;\r\r\n }", "title": "" }, { "docid": "63658334b15ca0b5a399d6c5de3c2a9c", "score": "0.67237836", "text": "function jw_resize($attach_id = null, $img_url = null, $width, $height, $crop = false) {\n\n\t\t// this is an attachment, so we have the ID\n\t\tif($attach_id) {\n\t\t\n\t\t\t$image_src = wp_get_attachment_image_src($attach_id, 'full');\n\t\t\t$file_path = get_attached_file($attach_id);\n\t\t\n\t\t// this is not an attachment, let's use the image url\n\t\t}else if($img_url){\n\t\t\t\n\t\t\t$file_path = parse_url($img_url);\n\t\t\t$file_path = $_SERVER['DOCUMENT_ROOT'] . $file_path['path'];\n\t\t\t\n\t\t\t$orig_size = getimagesize($file_path);\n\t\t\t\n\t\t\t$image_src[0] = $img_url;\n\t\t\t$image_src[1] = $orig_size[0];\n\t\t\t$image_src[2] = $orig_size[1];\n\t\t}\n\t\t\n\t\t$file_info = pathinfo($file_path);\n\t\t$extension = '.'. $file_info['extension'];\n\n\t\t// the image path without the extension\n\t\t$no_ext_path = $file_info['dirname'].'/'.$file_info['filename'];\n\n\t\t$cropped_img_path = $no_ext_path.'-'.$width.'x'.$height.$extension;\n\n\t\t// checking if the file size is larger than the target size\n\t\t// if it is smaller or the same size, stop right here and return\n\t\tif ($image_src[1] > $width || $image_src[2] > $height) {\n\n\t\t\t// the file is larger, check if the resized version already exists (for $crop = true but will also work for $crop = false if the sizes match)\n\t\t\tif (file_exists($cropped_img_path)) {\n\n\t\t\t\t$cropped_img_url = str_replace(basename($image_src[0]), basename($cropped_img_path), $image_src[0]);\n\t\t\t\t\n\t\t\t\t$vt_image = array (\n\t\t\t\t\t'url' => $cropped_img_url,\n\t\t\t\t\t'width' => $width,\n\t\t\t\t\t'height' => $height\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\treturn $vt_image;\n\t\t\t}\n\n\t\t\t// $crop = false\n\t\t\tif ($crop == false) {\n\t\t\t\n\t\t\t\t// calculate the size proportionaly\n\t\t\t\t$proportional_size = wp_constrain_dimensions($image_src[1], $image_src[2], $width, $height);\n\t\t\t\t$resized_img_path = $no_ext_path.'-'.$proportional_size[0].'x'.$proportional_size[1].$extension;\t\t\t\n\n\t\t\t\t// checking if the file already exists\n\t\t\t\tif (file_exists($resized_img_path)) {\n\t\t\t\t\n\t\t\t\t\t$resized_img_url = str_replace(basename($image_src[0]), basename($resized_img_path), $image_src[0]);\n\n\t\t\t\t\t$vt_image = array (\n\t\t\t\t\t\t'url' => $resized_img_url,\n\t\t\t\t\t\t'width' => $proportional_size[0],\n\t\t\t\t\t\t'height' => $proportional_size[1]\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\treturn $vt_image;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// no cache files - let's finally resize it\n\t\t\t$new_img_path = image_resize($file_path, $width, $height, $crop);\n\t\t\t$new_img_size = getimagesize($new_img_path);\n\t\t\t$new_img = str_replace(basename($image_src[0]), basename($new_img_path), $image_src[0]);\n\n\t\t\t// resized output\n\t\t\t$vt_image = array (\n\t\t\t\t'url' => $new_img,\n\t\t\t\t'width' => $new_img_size[0],\n\t\t\t\t'height' => $new_img_size[1]\n\t\t\t);\n\t\t\t\n\t\t\treturn $vt_image;\n\t\t}\n\n\t\t// default output - without resizing\n\t\t$vt_image = array (\n\t\t\t'url' => $image_src[0],\n\t\t\t'width' => $image_src[1],\n\t\t\t'height' => $image_src[2]\n\t\t);\n\t\t\n\t\treturn $vt_image;\n\t\t\n\t}", "title": "" }, { "docid": "b5fd8dfaba5dbe81f014b5a542bbe7cc", "score": "0.6705966", "text": "function resizepic($link, $size, $noCache, $keepRatio, $w='', $h=''){\n global $path;\n global $CONFIG;\n $theFileLink = '';\n global $mediaSizes;\n if($size != '' && in_array($size, array_keys($mediaSizes))){\n $t_width = $mediaSizes[$size][0];\n $t_height = $mediaSizes[$size][1];\n }\n else{\n $t_width = $w;\n $t_height = $h;\n }\n //$keep_ratio = isset($noCache) ? ($noCache == 1) : false;\n $keep_ratio = isset($noCache) ? ($noCache == 1) : true;\n// return ('$link: '.$link.' $size: '. $size. ' $path: _'. $path. '_ $t_width: '.$t_width.' $t_height: '.$t_height );\n\n $thumbcache = \"cache/thumbs/\";\n $md5_reflink = md5($link);\n $filename = $md5_reflink . \"_\" . $t_width . \"_\" . $t_height . \".jpg\";\n \n //if the cache doesn't exist or cachebuster is enabled\n if (!file_exists($path . $thumbcache . $filename ) || $noCache) {\n $quality = 70;\n if( $keep_ratio ) $quality = 100;\n\n $options = array(\n 'in_path' => $CONFIG['server']['root'] . $link,\n 'out_path' => $CONFIG['server']['root'] . $thumbcache . $filename,\n 'w' => $t_width,\n 'h' => $t_height,\n 'keep_ratio' => $keep_ratio,\n 'quality' => $quality\n );\n// return createMediaSubsample($options);\n if ( createMediaSubsample($options) ) {\n $theFileLink = $thumbcache . $filename;\n } else {\n $theFileLink = '';\n }\n }else{\n $theFileLink = $thumbcache . $filename;\n }\n return $theFileLink;\n}", "title": "" }, { "docid": "076aaf24a74689b63ff8b0ceceec78ec", "score": "0.6634724", "text": "function resize_img($imgPath, $maxWidth, $maxHeight, $directOutput = true, $quality = 90, $verbose,$imageType)\n{\n // 2 is (1 = GIF, 2 = JPG, 3 = PNG)\n \n $size = getimagesize($imgPath);\n\t\t$arr=explode(\".\",$imgPath);\t\t\n // break and return false if failed to read image infos\n if(!$size){\n if($verbose && !$directOutput)echo \"<br />Not able to read image infos.<br />\";\n return false;\n }\n\n // relation: width/height\n $relation = $size[0]/$size[1];\n\t \n\t $relation_original = $relation;\n \n \n // maximal size (if parameter == false, no resizing will be made)\n $maxSize = array($maxWidth?$maxWidth:$size[0],$maxHeight?$maxHeight:$size[1]);\n // declaring array for new size (initial value = original size)\n $newSize = $size;\n // width/height relation\n $relation = array($size[1]/$size[0], $size[0]/$size[1]);\n\n\n\tif(($newSize[0] > $maxWidth))\n\t{\n\t\t$newSize[0]=$maxSize[0];\n\t\t$newSize[1]=$newSize[0]*$relation[0];\n\t\t$newSize[0]=$maxWidth;\n\t\t$newSize[1]=$newSize[0]*$relation[0];\t\t\n\t\t\n\t}\n\t\n\t\t$newSize[0]=$maxWidth;\n\t\t$newSize[1]=$newSize[0]*$relation[0];\n\t\t//$newSize[1]=$maxHeight;\t\t\n // create image\n switch($size[2])\n {\n case 1:\n if(function_exists(\"imagecreatefromgif\"))\n {\n $originalImage = imagecreatefromgif($imgPath);\n }else{\n if($verbose && !$directOutput)echo \"<br />No GIF support in this php installation, sorry.<br />\";\n return false;\n }\n break;\n case 2: $originalImage = imagecreatefromjpeg($imgPath); break;\n case 3: $originalImage = imagecreatefrompng($imgPath); break;\n default:\n if($verbose && !$directOutput)echo \"<br />No valid image type.<br />\";\n return false;\n }\n\n\n // create new image\n\n $resizedImage = imagecreatetruecolor($newSize[0], $newSize[1]); \n\n imagecopyresampled($resizedImage, $originalImage,0, 0, 0, 0,$newSize[0], $newSize[1], $size[0], $size[1]);\n\t\t$rz=$imgPath;\n // output or save\n if($directOutput)\n\t\t{\n imagejpeg($resizedImage);\n\t\t }\n\t\t else\n\t\t{\n\t\t\t\n\t\t\t $rz=preg_replace(\"/\\.([a-zA-Z]{3,4})$/\",\"\".$imageType.\".\".$arr[count($arr)-1],$imgPath);\n \t\timagejpeg($resizedImage, $rz, $quality);\n }\n // return true if successfull\n return $rz;\n}", "title": "" }, { "docid": "6ad6cf0701de70bb9d74948ae5748c19", "score": "0.6586139", "text": "function resizeImage($image,$width,$height,$scale) {\n\tlist($imagewidth, $imageheight, $imageType) = getimagesize($image);\n\t$imageType = image_type_to_mime_type($imageType);\n\t$newImageWidth = ceil($width * $scale);\n\t$newImageHeight = ceil($height * $scale);\n\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t\t\t$source=imagecreatefromgif($image); \n\t\t\tbreak;\n\t case \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t\t\t$source=imagecreatefromjpeg($image); \n\t\t\tbreak;\n\t case \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\t$source=imagecreatefrompng($image); \n\t\t\tbreak;\n \t}\n\timagecopyresampled($newImage,$source,0,0,0,0,$newImageWidth,$newImageHeight,$width,$height);\n\t\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t \t\timagegif($newImage,$image); \n\t\t\tbreak;\n \tcase \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t \t\timagejpeg($newImage,$image,90); \n\t\t\tbreak;\n\t\tcase \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\timagepng($newImage,$image); \n\t\t\tbreak;\n }\n\t\n\tchmod($image, 0777);\n\treturn $image;\n}", "title": "" }, { "docid": "eef9d771fc53d387d0dbbe543d974ab1", "score": "0.657669", "text": "function wp_img_resizer_single( $width = '', $height = NULL, $size = 'full' ) {\n\t\t// set for reset\n\t\t$img_url = FALSE;\n\t\t\n\t \t// get full URL to image (use \"large\" or \"medium\" if the images too big)\n\t\t$img_url = wp_get_attachment_url( get_post_thumbnail_id(), $size );\n\t\t\n\t\tif ( ! $img_url )\n\t\t\treturn;\n\t\t\n\t\t$args = array(\n\t\t\t'url' => $img_url,\n\t\t\t'width' => $width,\n\t\t\t'height' => $height\n\t\t);\n\t\t\n\t\treturn wp_img_resizer( $args );\n\t}", "title": "" }, { "docid": "0b43ab9c63e5e8b9b4a7892953f670ba", "score": "0.6576571", "text": "function resize_img1($imgPath, $maxWidth, $maxHeight, $directOutput = true, $quality = 90, $verbose,$imageType)\n{\n // 2 is (1 = GIF, 2 = JPG, 3 = PNG)\n \n $size = getimagesize($imgPath);\n\t\t$arr=explode(\".\",$imgPath);\t\t\n // break and return false if failed to read image infos\n if(!$size){\n if($verbose && !$directOutput)echo \"<br />Not able to read image infos.<br />\";\n return false;\n }\n\n // relation: width/height\n $relation = $size[0]/$size[1];\n\t \n\t $relation_original = $relation;\n \n \n // maximal size (if parameter == false, no resizing will be made)\n $maxSize = array($maxWidth?$maxWidth:$size[0],$maxHeight?$maxHeight:$size[1]);\n // declaring array for new size (initial value = original size)\n $newSize = $size;\n // width/height relation\n $relation = array($size[1]/$size[0], $size[0]/$size[1]);\n\n\n\tif(($newSize[0] > $maxWidth))\n\t{\n\t\t$newSize[0]=$maxSize[0];\n\t\t$newSize[1]=$newSize[0]*$relation[0];\n\t\t$newSize[0]=$maxWidth;\n\t\t$newSize[1]=$newSize[0]*$relation[0];\t\t\n\t\t\n\t}\n\t\n\t\t$newSize[0]=$maxWidth;\n\t\t//$newSize[1]=$newSize[0]*$relation[0];\n\t\t$newSize[1]=$maxHeight;\t\t\n // create image\n switch($size[2])\n {\n case 1:\n if(function_exists(\"imagecreatefromgif\"))\n {\n $originalImage = imagecreatefromgif($imgPath);\n }else{\n if($verbose && !$directOutput)echo \"<br />No GIF support in this php installation, sorry.<br />\";\n return false;\n }\n break;\n case 2: $originalImage = imagecreatefromjpeg($imgPath); break;\n case 3: $originalImage = imagecreatefrompng($imgPath); break;\n default:\n if($verbose && !$directOutput)echo \"<br />No valid image type.<br />\";\n return false;\n }\n\n\n // create new image\n\n $resizedImage = imagecreatetruecolor($newSize[0], $newSize[1]); \n\n imagecopyresampled($resizedImage, $originalImage,0, 0, 0, 0,$newSize[0], $newSize[1], $size[0], $size[1]);\n\t\t$rz=$imgPath;\n // output or save\n if($directOutput)\n\t\t{\n imagejpeg($resizedImage);\n\t\t }\n\t\t else\n\t\t{\n\t\t\t\n\t\t\t $rz=preg_replace(\"/\\.([a-zA-Z]{3,4})$/\",\"\".$imageType.\".\".$arr[count($arr)-1],$imgPath);\n \t\timagejpeg($resizedImage, $rz, $quality);\n }\n // return true if successfull\n return $rz;\n}", "title": "" }, { "docid": "57e07fbb1e2f9c88a0226e1f594035ba", "score": "0.65750486", "text": "function resizeImage($image,$width,$height,$scale,$max_width) {\n\tlist($imagewidth, $imageheight, $imageType) = getimagesize($image);\n\t$imageType = image_type_to_mime_type($imageType);\n\t$newImageWidth = ceil($width * $scale);\n\t\n\tif($max_width =='240'){\n\t\t\n\t$newImageHeight =320;\t\n\t\t}\n\telse{\n\t$newImageHeight = ceil($height * $scale);\n\t}\n\t\n\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t\t\t$source=imagecreatefromgif($image); \n\t\t\tbreak;\n\t case \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t\t\t$source=imagecreatefromjpeg($image); \n\t\t\tbreak;\n\t case \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\t$source=imagecreatefrompng($image); \n\t\t\tbreak;\n \t}\n\timagecopyresampled($newImage,$source,0,0,0,0,$newImageWidth,$newImageHeight,$width,$height);\n\t\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t \t\timagegif($newImage,$image); \n\t\t\tbreak;\n \tcase \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t \t\timagejpeg($newImage,$image,90); \n\t\t\tbreak;\n\t\tcase \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\timagepng($newImage,$image); \n\t\t\tbreak;\n }\n\t\n\tchmod($image, 0777);\n\treturn $image;\n}", "title": "" }, { "docid": "e858a7cbd302bc72bc197861e21ef8e4", "score": "0.6568279", "text": "function thumb_resize($filename, $max_size, $w = 0, $h = 0) {\n\t\t \n\t \t// Get new dimensions\n\t \t$type = file_type( $filename );\n list($width, $height) = getimagesize($filename);\n \n\t\t//Se for informado width\n\t\tif( $w > 0 ){\n\t\t\t\n\t\t\tif( $h > 0 && ($w * $height) / $width > $h ){\n\t\t\t\t$new_height = $h;\n \t$new_width = ($h * $width)/$height;\n\t\t\t} else {\n\t\t\t\t$new_width = $w;\n\t $new_height = ($w * $height)/$width;\n\t\t\t}\n\t\t\n\t\t//se for informado height\n\t\t} elseif( $h > 0 ){\n\t\t\t\n\t\t\tif( $w > 0 && ($h * $width) / $height > $w ){\n\t\t\t\t$new_width = $w;\n\t $new_height = ($w * $height)/$width;\n\t\t\t} else {\n\t\t\t\t$new_height = $h;\n \t$new_width = ($h * $width)/$height;\n\t\t\t}\n\t\t\n\t\t//Se não for informado nenhum dos 2, usa o metodo padrao\n\t\t} elseif ($width > $height){\n\t\t\t\n $new_width = $max_size;\n $new_height = ($max_size * $height)/$width;\n\t\t\t\n } else {\n\t\t\t\n $new_height = $max_size;\n $new_width = ($max_size * $width)/$height;\n\t\t\t\n }\n\n $image_p = imagecreatetruecolor($new_width, $new_height);\n \n\t\tif($type == 'image/gif' or $type == 'image/png'){\n\t\t\timagecolortransparent($image_p, imagecolorallocatealpha($image_p, 0, 0, 0, 127));\n\t\t imagealphablending($image_p, false);\n\t\t imagesavealpha($image_p, true);\n\t\t}\n\t\t\n $image = createImage( $filename );\n \n imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n \n return $image_p;\n }", "title": "" }, { "docid": "90209dff30d2ebc176a091996ac6a6e2", "score": "0.6567229", "text": "function Image_Resize($file, $size, $jpg_quality) {\n\t$width = $size;\n\t$height = $size;\n\n\t// Neue Bildgröße und Typ ermitteln\n\tlist($width_orig, $height_orig, $type) = @getimagesize($file);\n\n\t// Neue Bildgröße und Typ brechnen\n\tif ($width_orig > $width || $height_orig > $height) {\n\t\t$ratio_orig = $width_orig/$height_orig;\n\n\t\tif ($width/$height > $ratio_orig) {\n\t\t $width = $height*$ratio_orig;\n\t\t} else {\n\t\t $height = $width/$ratio_orig;\n\t\t}\n\t}\n\telse {\n\t\t$width = $width_orig;\n\t\t$height = $height_orig;\n\t}\n\n\t// Neues Bild erstellen\n\t$image_p = imagecreatetruecolor($width, $height);\n\n\tswitch($type) {\n\t\tcase 1:\n\t\t\tif (ImageTypes() & IMG_GIF) {\n\n\t\t\t\t// Bilddatei laden\n\t\t\t\t$image = imagecreatefromgif($file);\n\n\t\t\t\t// Transparenz erhalten\n\t\t\t\t$trnprt_indx = imagecolortransparent($image);\n\t\t\t\tif ($trnprt_indx >= 0) {\n\t\t\t\t\t$trnprt_color = @imagecolorsforindex($image, $trnprt_indx);\n\t\t\t\t\t$trnprt_indx = @imagecolorallocate($image_p, $trnprt_color['red'], $trnprt_color['green'], $trnprt_color['blue']);\n\t\t\t\t\timagefill($image_p, 0, 0, $trnprt_indx);\n\t\t\t\t\timagecolortransparent($image_p, $trnprt_indx);\n\t\t\t\t}\n\n\t\t\t\t// Resample\n\t\t\t\timagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);\n\n\t\t\t\t// Bild schärfen\n\t\t\t\t$image_p = Image_Sharpen($image_p, 80, 0.5, 3);\n\n\t\t\t\t// Bilddatei speichern\n\t\t\t\t@imagegif($image_p, $file);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\tif (ImageTypes() & IMG_JPG) {\n\n\t\t\t\t// Bilddatei laden \n\t\t\t\t$image = imagecreatefromjpeg($file);\n\t\t\t\t\n\t\t\t\t// Resample\n\t\t\t\timagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);\n\n\t\t\t\t// Bild schärfen\n\t\t\t\t$image_p = Image_Sharpen($image_p, 80, 0.5, 3);\n\n\t\t\t\t// Bilddatei speichern\n\t\t\t\t@imagejpeg($image_p, $file, $jpg_quality);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 3:\n\t\t\tif (ImageTypes() & IMG_PNG) {\n\n\t\t\t\t// Bilddatei laden\n\t\t\t\t$image = imagecreatefrompng($file);\n\n\t\t\t\t// Transparenz erhalten\n\t\t\t\timagealphablending($image_p, false);\n\t\t\t\t$colorTransparent = imagecolorallocatealpha($image_p, 0, 0, 0, 127);\n\t\t\t\timagefill($image_p, 0, 0, $colorTransparent);\n\t\t\t\timagesavealpha($image_p, true);\n\n\t\t\t\t// Resample\n\t\t\t\timagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);\n\n\t\t\t\t// Bild schärfen\n\t\t\t\t$image_p = Image_Sharpen($image_p, 80, 0.5, 3);\n\n\t\t\t\t// Bilddatei speichern\n\t\t\t\t@imagepng($image_p, $file);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//\n\t\t\t}\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\t//\n\t\t\tbreak;\n\t}\n\n\t// Speicher freigeben\n\tif (isset($image)) { imagedestroy($image); }\n\tif (isset($image_p)) { imagedestroy($image_p); }\n}", "title": "" }, { "docid": "fa4b8e0a1f7c34bc2719bd477c408ebc", "score": "0.6550911", "text": "function resize($path, $type, $width, $height)\n {\n \t$this->__initValue();\n $ext = preg_replace('/image\\//', '', $type);\n switch ($ext)\n {\n case 'jpg':\n case 'jpeg':\n case 'pjpeg':\n $this->image = imagecreatefromjpeg($path);\n $func = 'imagejpeg';\n break;\n\n case 'gif':\n $this->image = imagecreatefromgif($path);\n $func = 'imagegif';\n break;\n\n case 'png':\n case 'x-png':\n $this->image = imagecreatefrompng($path);\n $func = 'imagepng';\n break;\n default:\n $func = 'imagepng';\n }\n \n if($this->image === FALSE){\n return false;\n }\n list($this->oriWidth, $this->oriHeight) = getimagesize($path);\n \n $this->newWidth = $this->oriWidth; \n $this->newHeight = $this->oriHeight;\n \n $this->width = $width > $this->oriWidth?$this->oriWidth:$width;\n $this->height = $height > $this->oriHeight?$this->oriHeight:$height;\n \n $this->crop($width, $height);\n $imageResized = imagecreatetruecolor($width, $height);\n imagecopyresampled($imageResized, $this->image, 0, 0, 0, 0, $width, $height, $this->newWidth, $this->newHeight);\n \n /**\n * Capture output from buffer\n */\n ob_start();\n switch($func)\n {\n case 'imagejpeg':\n $func($imageResized,null,100); //quality 100.\n break;\n case 'imagepng':\n $func($imageResized,null,9); //quality 9.\n break;\n default:\n $func($imageResized); \n }\n $finalImage = ob_get_contents();\n ob_end_clean();\n\n imagedestroy($imageResized); // free up memory\n $this->saveFile($saveFilePath,$finalImage);\n }", "title": "" }, { "docid": "0600131beeb5539e3d32a2d5a740281a", "score": "0.6539547", "text": "function imageresize($filename, $type){\n\t$width = 150;\n\t$height = 150;\n\n\t// Content type\n\theader('Content-Type: image/jpeg');\n\n\t// Get new dimensions\n\tlist($width_orig, $height_orig) = getimagesize($filename);\n\n\t$ratio_orig = $width_orig/$height_orig;\n\n\tif ($width/$height > $ratio_orig) {\n\t $width = $height*$ratio_orig;\n\t} else {\n\t $height = $width/$ratio_orig;\n\t}\n\n\t// Resample\n\t$image_p = imagecreatetruecolor($width, $height);\n\t\tswitch(strtolower($type))\n\t\t{\n\t\t\tcase 'image/jpeg':\n\t\t\t\t$image = imagecreatefromjpeg($filename);\n\t\t\t\tbreak;\n\t\t\tcase 'image/png':\n\t\t\t\t$image = imagecreatefrompng($filename);\n\t\t\t\tbreak;\n\t\t\tcase 'image/gif':\n\t\t\t\t$image = imagecreatefromgif($filename);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\texit('Unsupported type: '.$type);\n\t\t}\t\n\timagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);\n\t\n\t// Output\n\tob_start();\n\timagejpeg($image_p, NULL, 100);\n\t$data = ob_get_clean();\n\t// Destroy resources\n\timagedestroy($image);\n\timagedestroy($image_p);\n\t// Set new content-type and status code\n\theader(\"Content-type: image/jpeg\", true, 200);\n\t// Output data\n\treturn $data;\n\t}", "title": "" }, { "docid": "d40b5b1937f0a4917140af9b76dc399d", "score": "0.6538567", "text": "function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale,$max_width){\n\tlist($imagewidth, $imageheight, $imageType) = getimagesize($image);\n\t$imageType = image_type_to_mime_type($imageType);\n\t\n\t$newImageWidth = '180';\n\t$newImageHeight ='240';\t\n\t\n\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t\t\t$source=imagecreatefromgif($image); \n\t\t\tbreak;\n\t case \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t\t\t$source=imagecreatefromjpeg($image); \n\t\t\tbreak;\n\t case \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\t$source=imagecreatefrompng($image); \n\t\t\tbreak;\n \t}\n\timagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t \t\timagegif($newImage,$thumb_image_name); \n\t\t\tbreak;\n \tcase \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t \t\timagejpeg($newImage,$thumb_image_name,90); \n\t\t\tbreak;\n\t\tcase \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\timagepng($newImage,$thumb_image_name); \n\t\t\tbreak;\n }\n\tchmod($thumb_image_name, 0777);\n\treturn $thumb_image_name;\n}", "title": "" }, { "docid": "041701cb14f16b8fa4dbe37d2e5ecded", "score": "0.65172744", "text": "function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale){\n\tlist($imagewidth, $imageheight, $imageType) = getimagesize($image);\n\t$imageType = image_type_to_mime_type($imageType);\n\t\n\t$newImageWidth = ceil($width * $scale);\n\t$newImageHeight = ceil($height * $scale);\n\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t\t\t$source=imagecreatefromgif($image); \n\t\t\tbreak;\n\t case \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t\t\t$source=imagecreatefromjpeg($image); \n\t\t\tbreak;\n\t case \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\t$source=imagecreatefrompng($image); \n\t\t\tbreak;\n \t}\n\timagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t \t\timagegif($newImage,$thumb_image_name); \n\t\t\tbreak;\n \tcase \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t \t\timagejpeg($newImage,$thumb_image_name,90); \n\t\t\tbreak;\n\t\tcase \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\timagepng($newImage,$thumb_image_name); \n\t\t\tbreak;\n }\n\tchmod($thumb_image_name, 0777);\n\treturn $thumb_image_name;\n}", "title": "" }, { "docid": "c1fb70aa578501fc9e5dd59c373b9916", "score": "0.65120703", "text": "function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale)\n {\r\n list($imagewidth, $imageheight, $imageType) = getimagesize($image);\r\n $imageType = image_type_to_mime_type($imageType);\r\n \r\n $newImageWidth = ceil($width * $scale);\r\n $newImageHeight = ceil($height * $scale);\r\n $newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\r\n switch($imageType) {\r\n case \"image/gif\":\r\n $source=imagecreatefromgif($image);\r\n break;\r\n case \"image/pjpeg\":\r\n case \"image/jpeg\":\r\n case \"image/jpg\":\r\n $source=imagecreatefromjpeg($image);\r\n break;\r\n case \"image/png\":\r\n case \"image/x-png\":\r\n $source=imagecreatefrompng($image);\r\n break;\r\n }\r\n imagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);\r\n switch($imageType) {\r\n case \"image/gif\":\r\n imagegif($newImage,$thumb_image_name);\r\n break;\r\n case \"image/pjpeg\":\r\n case \"image/jpeg\":\r\n case \"image/jpg\":\r\n imagejpeg($newImage,$thumb_image_name,90);\r\n break;\r\n case \"image/png\":\r\n case \"image/x-png\":\r\n imagepng($newImage,$thumb_image_name);\r\n break;\r\n }\r\n chmod($thumb_image_name, 0777);\r\n return $thumb_image_name;\r\n }", "title": "" }, { "docid": "b597fb1643702bd7eee782fa6f331dbd", "score": "0.65084296", "text": "function makeThumbnail($photo, $newwidth, $newheight)\r\n{\r\n if ($photo['type'] && $photo['tmp_name']) {\r\n $mime = $photo['type'];\r\n $file = $photo['tmp_name'];\r\n $temp = imagecreatetruecolor($newwidth, $newheight); // temp GD image object\r\n list ($oldwidth, $oldheight) = getimagesize($file); // get current width & height\r\n\r\n ob_start(); // start object buffer to capture image data\r\n\r\n switch ($mime) {\r\n case 'image/jpg':\r\n case 'image/jpeg':\r\n\r\n $image = imagecreatefromjpeg($file); // create GD image from input file\r\n imagecopyresampled($temp, $image, 0, 0, 0, 0, $newwidth, $newheight, $oldwidth, $oldheight); // resize image and save to $temp object\r\n imagejpeg($temp); // output image\r\n break;\r\n\r\n case 'image/png':\r\n\r\n $image = imagecreatefrompng($file); // create GD image from input file\r\n imagecopyresampled($temp, $image, 0, 0, 0, 0, $newwidth, $newheight, $oldwidth, $oldheight); // resize image and save to $temp object\r\n imagepng($temp); // output image\r\n break;\r\n\r\n default:\r\n throw new Exception(\"File Type not supported\");\r\n //break;\r\n }\r\n\r\n $thumbnailData = ob_get_contents(); // send object buffer/image data to variable\r\n ob_end_clean(); // close object buffer\r\n\r\n return $thumbnailData;\r\n } else {\r\n return false;\r\n }\r\n}", "title": "" }, { "docid": "22ae06e1989eb0770ad10da996c1cf1a", "score": "0.6508265", "text": "function resize($file,$extension,$path, $newSize) {\n switch ($extension)\n {\n case('jpg'):\n $source = imagecreatefromjpeg($file);\n break;\n case('jpeg'):\n $source = imagecreatefromjpeg($file);\n break;\n case('png'):\n $source = imagecreatefrompng($file);\n break;\n case('gif'):\n $source = imagecreatefromgif($file);\n break;\n }\n $width = imagesx($source);\n $height = imagesy($source);\n\n // calculate ratio\n $new_height = floor($height * ($newSize / $width));\n\n // it create a new virtual image\n $new_image = imagecreatetruecolor($newSize, $new_height);\n // keep transparency\n imagealphablending( $new_image, false );\n imagesavealpha( $new_image, true );\n\n // make a copy with new sizes from the virtual image\n imagecopyresampled($new_image, $source, 0, 0, 0, 0, $newSize, $new_height, $width, $height);\n\n // create image according to its extension\n switch ($extension)\n {\n case('jpg'):\n imagejpeg($new_image, $path);\n break;\n case('jpeg'):\n imagejpeg($new_image, $path);\n break;\n case('png'):\n imagepng($new_image,$path);\n break;\n case('gif'):\n imagegif($new_image,$path);\n break;\n }\n\n }", "title": "" }, { "docid": "2a5b52a6f0ca67b085e014806d8a5974", "score": "0.65013", "text": "function thumbnail($filename, $newsize)\n{\n // $filename = 'test.jpg';\n $percent = 0.5;\n\n // Content type\n // header('Content-Type: image/jpeg');\n\n // Get new sizes\n list($width, $height) = getimagesize($filename);\n $newwidth = $width * $percent;\n $newheight = $height * $percent;\n\n // Load\n $thumb = imagecreatetruecolor($newwidth, $newheight);\n $source = imagecreatefromjpeg($filename);\n\n // Resize\n imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);\n\n// Output\n imagejpeg($thumb);\n}", "title": "" }, { "docid": "4264130a4a5d975d8d204ea184476601", "score": "0.6485722", "text": "function img_resize($target, $newcopy, $w, $h, $ext) {\n list($w_orig, $h_orig) = getimagesize($target);\n $scale_ratio = $w_orig / $h_orig;\n if (($w / $h) > $scale_ratio) {\n $w = $h * $scale_ratio;\n } else {\n $h = $w / $scale_ratio;\n }\n if ($ext == 'gif'){\n $img = imagecreatefromgif($target);\n }else{\n $img = imagecreatefromjpeg($target);\n }\n $tci = imagecreatetruecolor($w, $h);\n imagecopyresampled($tci, $img, 0, 0, 0, 0, $w, $h, $w_orig, $h_orig);\n if ($ext == 'gif'){\n imagegif($tci, $newcopy, 80);\n }else {\n imagejpeg($tci, $newcopy, 80);\n }\n}", "title": "" }, { "docid": "f9b48d23107e2afa80da3ca14323759f", "score": "0.64736557", "text": "function resizeImage(){\n //lay duong dan file duoc request\n $request = $_SERVER['REQUEST_URI'];\n //lay ten file\n $tmp_request = explode('/',$request);\n $case = count($tmp_request);\n $image_name = $tmp_request[$case - 1];\n //type resize\n $resize_type = $tmp_request[$case - 2];\n //echo $image_name;\n $resource_img = get_picture_dir($image_name) . '/' . $image_name;\n $resource_img = '..' . $resource_img;\n if(!file_exists($resource_img)){\n error_404_document();\n };\n //echo file_get_contents($resource_img);exit();\n $images = new Image($resource_img);\n $imageinfo = $images->getImageInfo();\n if($imageinfo['height'] == null || $imageinfo['height'] == 0){\n error_404_document();\n }\n //kich thuoc resize\n $array_resize = array(\n 'large'=>array(480,360),\n 'medium'=>array(240,180),\n 'medium2'=>array(145,95),\n 'small'=>array(106,80),\n 'thumb'=>array(50,50),\n 'mobile'=>array(640,400),\n 'mobile_medium'=>array(320,200),\n 'mobile_small'=>array(120,75),\n 'mobile_low'=>array(640,400,30),\n 'mobile_medium_low'=>array(320,200,30),\n 'mobile_small_low'=>array(120,75,30),\n );\n if(!isset($array_resize[$resize_type])){\n error_404_document();\n }\n //image name file no extension\n $filesavename = explode('.', $image_name);\n $count3 = count($filesavename);\n if($count3 > 1){\n unset($filesavename[$count3-1]);\n }\n $filesavename = implode('.', $filesavename);\n $pathsave = '..'.get_picture_dir($image_name,$resize_type);\n //nếu thư mục ảnh không tồn tại thì tạo mới\n if(!file_exists($pathsave)){\n mkdir($pathsave,0755,1);\n }\n //echo $pathsave;die();\n //kich thuoc resize ok -> tao file voi kich thuoc phu hop\n $r_width = $array_resize[$resize_type][0];\n $r_height = $array_resize[$resize_type][1];\n if(isset($array_resize[$resize_type][2])){\n $r_quality = $array_resize[$resize_type][2];\n }else{\n $r_quality = 100;\n }\n if($resize_type == 'organic'){\n $images->resize($r_width, $r_height, 'fit', 'c', 'c', $r_quality);\n }else{\n $images->resize($r_width, $r_height, 'crop', 'c', 'c', $r_quality);\n }\n\n $images->save($filesavename, $pathsave);\n header(\"HTTP/1.0 200 OK\");\n $images->display();\n}", "title": "" }, { "docid": "821b4bef08f420729939bab08fccad04", "score": "0.6469663", "text": "function squaerresize($source, $destPath, $size = false){\n\tglobal $core;\n\t$fileSource = moveTemplate($source, $destPath);\n\n\t$core->lib->load('images');\n\t$destPathLocal = '/vars/files/images/';\n\t$destPath = CORE_PATH.substr($destPathLocal, 1);\n\n\t$sprev1 = (is_array($size) && isset($size[0]))? $size[0] : 220;\n\t$sprev2 = (is_array($size) && isset($size[1]))? $size[1] : false;\n\t$sprev3 = (is_array($size) && isset($size[2]))? $size[2] : false;\n\n\t$fnameBig = 'big_'.$fileSource['filename'];\n\t$fnamePrev = $sprev1.'_'.$fileSource['filename'];\n\t$fnamePrev2 = $sprev2.'_'.$fileSource['filename'];\n\t$fnamePrev2 = $sprev3.'_'.$fileSource['filename'];\n\t$sorceFullPath = CORE_PATH.$fileSource['local'];\n\n\t$mimeCheckResult = images::checkMime($sorceFullPath);\n\tif($mimeCheckResult !== true) {\n\t\tunlink($source);\n\t\treturn array('error'=>'File is not image','code'=>$mimeCheckResult);\n\t}\n\n\t$core->images = new images(false, false, false, false, 2);\n\t$core->images->fname = $sorceFullPath;\n\n\tif(!$core->images->open()){\n\t\tunlink($sorceFullPath);\n\t\treturn false;\n\t}\n\n\t$bigInfo = $core->images->resizeResample(false,false,$destPath,$fnameBig);\n\n\n\t$core->images->resizeResample($sprev1,$sprev1,$destPath,$fnamePrev);\n\t$return = array();\n\n\t$return[] = array('name'=>$fileSource['local'], 'size'=>$bigInfo['width']);\n\t$return[] = array('name'=>$destPathLocal.$fnameBig, 'size'=>$sprev1);\n\n\n\tif($sprev2) {\n\t\t$core->images->resizeResample($sprev2,$sprev2,$destPath,$fnamePrev2);\n\t\t$return[] = array('name'=>$destPathLocal.$fnamePrev2, 'size'=>$sprev2);\n\t}\n\n\tif($sprev3) {\n\t\t$core->images->resizeResample($sprev3,$sprev3,$destPath,$fnamePrev3);\n\t\t$return[] = array('name'=>$destPathLocal.$fnamePrev3, 'size'=>$sprev3);\n\t}\n\n\n\t$return['resizedWidth']=$bigInfo['width'];\n\t$return['resizedHeight']=$bigInfo['height'];\n\n\n\n\treturn $return;\n}", "title": "" }, { "docid": "8a975cf341b52c6610caf6d6e5de588d", "score": "0.6462766", "text": "function ajx_sharpen_resized_files( $resized_file ) {\n $image = wp_load_image( $resized_file );\n if ( !is_resource( $image ) )\n return new WP_Error( 'error_loading_image', $image, $file );\n $size = @getimagesize( $resized_file );\n if ( !$size )\n return new WP_Error('invalid_image', __('Could not read image size'), $file);\n list($orig_w, $orig_h, $orig_type) = $size;\n switch ( $orig_type ) {\n case IMAGETYPE_JPEG:\n $matrix = array(\n array(-1, -1, -1),\n array(-1, 16, -1),\n array(-1, -1, -1),\n );\n $divisor = array_sum(array_map('array_sum', $matrix));\n $offset = 0; \n imageconvolution($image, $matrix, $divisor, $offset);\n imagejpeg($image, $resized_file,apply_filters( 'jpeg_quality', 90, 'edit_image' ));\n break;\n case IMAGETYPE_PNG:\n return $resized_file;\n case IMAGETYPE_GIF:\n return $resized_file;\n }\n return $resized_file;\n}", "title": "" }, { "docid": "aa26efea9e06a1692719957be266e3db", "score": "0.6454305", "text": "function vt_resize( $attach_id = null, $img_url = null, $width, $height, $crop = false ) {\n\n\t// this is an attachment, so we have the ID\n\tif ( $attach_id ) {\n\t\n\t\t$image_src = wp_get_attachment_image_src( $attach_id, 'full' );\n\t\t$file_path = get_attached_file( $attach_id );\n\t\n\t// this is not an attachment, let's use the image url\n\t} else if ( $img_url ) {\n\t\t\n\t\t$file_path = parse_url( $img_url );\n\t\t$file_path = $_SERVER['DOCUMENT_ROOT'] . $file_path['path'];\n\t\t\n\t\t//$file_path = ltrim( $file_path['path'], '/' );\n\t\t//$file_path = rtrim( ABSPATH, '/' ).$file_path['path'];\n\t\t\n\t\t$orig_size = getimagesize( $file_path );\n\t\t\n\t\t$image_src[0] = $img_url;\n\t\t$image_src[1] = $orig_size[0];\n\t\t$image_src[2] = $orig_size[1];\n\t} else {\n\treturn False;\n\t}\n\t\n\t$file_info = pathinfo( $file_path );\n\t$extension = '.'. $file_info['extension'];\n\n\t// the image path without the extension\n\t$no_ext_path = $file_info['dirname'].'/'.$file_info['filename'];\n\n\t$cropped_img_path = $no_ext_path.'-'.$width.'x'.$height.$extension;\n\n\t// checking if the file size is larger than the target size\n\t// if it is smaller or the same size, stop right here and return\n\tif ( $image_src[1] > $width || $image_src[2] > $height ) {\n\n\t\t// the file is larger, check if the resized version already exists (for $crop = true but will also work for $crop = false if the sizes match)\n\t\tif ( file_exists( $cropped_img_path ) ) {\n\n\t\t\t$cropped_img_url = str_replace( basename( $image_src[0] ), basename( $cropped_img_path ), $image_src[0] );\n\t\t\t\n\t\t\t$vt_image = array (\n\t\t\t\t'url' => $cropped_img_url,\n\t\t\t\t'width' => $width,\n\t\t\t\t'height' => $height\n\t\t\t);\n\t\t\t\n\t\t\treturn $vt_image;\n\t\t}\n\n\t\t// $crop = false\n\t\tif ( $crop == false ) {\n\t\t\n\t\t\t// calculate the size proportionaly\n\t\t\t$proportional_size = wp_constrain_dimensions( $image_src[1], $image_src[2], $width, $height );\n\t\t\t$resized_img_path = $no_ext_path.'-'.$proportional_size[0].'x'.$proportional_size[1].$extension;\t\t\t\n\n\t\t\t// checking if the file already exists\n\t\t\tif ( file_exists( $resized_img_path ) ) {\n\t\t\t\n\t\t\t\t$resized_img_url = str_replace( basename( $image_src[0] ), basename( $resized_img_path ), $image_src[0] );\n\n\t\t\t\t$vt_image = array (\n\t\t\t\t\t'url' => $resized_img_url,\n\t\t\t\t\t'width' => $proportional_size[0],\n\t\t\t\t\t'height' => $proportional_size[1]\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\treturn $vt_image;\n\t\t\t}\n\t\t}\n\n\t\t// no cache files - let's finally resize it\n\t\t$new_img_path = image_resize( $file_path, $width, $height, $crop );\n\t\t$new_img_size = getimagesize( $new_img_path );\n\t\t$new_img = str_replace( basename( $image_src[0] ), basename( $new_img_path ), $image_src[0] );\n\n\t\t// resized output\n\t\t$vt_image = array (\n\t\t\t'url' => $new_img,\n\t\t\t'width' => $new_img_size[0],\n\t\t\t'height' => $new_img_size[1]\n\t\t);\n\t\t\n\t\treturn $vt_image;\n\t}\n\n\t// default output - without resizing\n\t$vt_image = array (\n\t\t'url' => $image_src[0],\n\t\t'width' => $image_src[1],\n\t\t'height' => $image_src[2]\n\t);\n\t\n\treturn $vt_image;\n}", "title": "" }, { "docid": "f70468bf0f7d8bd4893a6acbf86cb3b4", "score": "0.64361537", "text": "public function resizeOriginalCoverPhoto($filename, $media_original_path, $org_resize_dir) {\n $path_to_thumbs_directory = $org_resize_dir;\n $path_to_image_directory = $media_original_path;\n\n //get image thumb width\n $thumb_width = $this->original_resize_image_width;\n $thumb_height = $this->original_resize_image_height;\n \n $image_data = file_get_contents($path_to_image_directory . $filename);\n $im = imagecreatefromstring($image_data);\n $ox = imagesx($im);\n $oy = imagesy($im);\n \n //check if image size is less than defined limit size\n // if($ox > $thumb_width || $oy > $thumb_height){\n if($ox > $thumb_width && $oy > $thumb_height){\n //getting aspect ratio\n $original_aspect = $ox / $oy;\n $thumb_aspect = $thumb_width / $thumb_height;\n\n if ($original_aspect >= $thumb_aspect) {\n // If image is wider than thumbnail (in aspect ratio sense)\n $new_height = $thumb_height;\n $new_width = $ox / ($oy / $thumb_height);\n //check if new width is less than minimum width\n if($new_width > $thumb_width){\n $new_width = $thumb_width;\n $new_height = $oy / ($ox / $thumb_width);\n }\n } else {\n // If the thumbnail is wider than the image\n $new_width = $thumb_width;\n $new_height = $oy / ($ox / $thumb_width);\n //check if new height is less than minimum height\n if($new_height > $thumb_height){\n $new_height = $thumb_height;\n $new_width = $ox / ($oy / $thumb_height);\n }\n }\n $nx = $new_width;\n $ny = $new_height;\n }else{\n //set original image size\n $nx = $ox;\n $ny = $oy;\n }\n $nm = imagecreatetruecolor($nx, $ny);\n //code for create png\n $image_upload = $this->container->get('amazan_upload_object.service');\n $image_upload->createPngImage($nm, $im, $nx, $ny, $ox, $oy);\n \n //imagecopyresampled($nm, $im, 0, 0, 0, 0, $nx, $ny, $ox, $oy);\n if (!file_exists($path_to_thumbs_directory)) {\n if (!mkdir($path_to_thumbs_directory, 0777, true)) {\n die(\"THERE_WAS_A_PROBLEM_PLEASE_TRY_AGAIN\");\n }\n }\n if (preg_match('/[.](jpg)$/', $filename)) {\n imagejpeg($nm, $path_to_thumbs_directory . $filename,75);\n } else if (preg_match('/[.](jpeg)$/', $filename)) {\n imagejpeg($nm, $path_to_thumbs_directory . $filename,75);\n } else if (preg_match('/[.](gif)$/', $filename)) {\n imagegif($nm, $path_to_thumbs_directory . $filename,75);\n } else if (preg_match('/[.](png)$/', $filename)) {\n imagepng($nm, $path_to_thumbs_directory . $filename,9);\n }\n \n // $s3imagepath = \"uploads/documents/socialproject/original\";\n $s3imagepath = \"uploads/documents/images/original\";\n $image_local_path = $path_to_thumbs_directory.$filename;\n //upload on amazon\n $s3_image_path = $this->ImageS3UploadService($s3imagepath, $image_local_path, $filename);\n return $s3_image_path;\n }", "title": "" }, { "docid": "922443b61e4f48b29c7fc14c05d9d698", "score": "0.64316463", "text": "function thumbnail ($id_image)\n {\n\n /* first we get the URL */\n $image = $this->image_model->get_image_by_id($id_image);\n\n $config['image_library'] = 'gd2';\n //$config['library_path'] = 'C:\\\\Program Files\\\\ImageMagick-6.9.0-Q16';\n $config['source_image'] = $image->url;\n $config['create_thumb'] = TRUE;\n $config['maintain_ratio'] = TRUE;\n $config['width'] = 200;\n $config['height'] = 200;\n $config['dynamic_output'] = TRUE;\n\n $this->load->library('image_lib', $config);\n if(!$this->image_lib->resize()){\n echo $this->image_lib->display_errors();\n }\n }", "title": "" }, { "docid": "3c05b0d11e812e7aca9f45f69aa2bb0c", "score": "0.64249134", "text": "function img_resize($target, $newcopy, $w, $h, $ext) {\n list($w_orig, $h_orig) = getimagesize($target);\n $scale_ratio = $w_orig / $h_orig;\n if (($w / $h) > $scale_ratio) {\n $w = $h * $scale_ratio;\n } else {\n $h = $w / $scale_ratio;\n }\n $img = \"\";\n $ext = strtolower($ext);\n if ($ext == \"gif\"){ \n $img = imagecreatefromgif($target);\n } else if($ext ==\"png\"){ \n $img = imagecreatefrompng($target);\n } else { \n $img = imagecreatefromjpeg($target);\n }\n $tci = imagecreatetruecolor($w, $h);\n \n imagecopyresampled($tci, $img, 0, 0, 0, 0, $w, $h, $w_orig, $h_orig);\n imagejpeg($tci, $newcopy, 80);\n}", "title": "" }, { "docid": "24a98fef0c027623ad95467529d96996", "score": "0.6423166", "text": "function thumbnail($directSave,$image,$width){ // уменьшаем изображение пропорционально в зависемости от нужной ширины\n\n $size = getimagesize($image);\n $format = substr(stristr($size['mime'],'/'),1);\n $creatfunc = \"imagecreatefrom\".$format;\n $src = $creatfunc($image);\n $iw = $size[0];\n $ih = $size[1];\n $koe = $iw/$width;\n $new_h = ceil($ih/$koe);\n $dst = imagecreatetruecolor($width,$new_h);\n\n ImageCopyResampled($dst, $src, 0, 0, 0, 0, $width, $new_h, $iw, $ih);\n\n $saveimg = \"image\".$format;\n $nameimage = $directSave.\"/thumb_\".$width.\"x\".$new_h.\"_\".substr(strrchr($image,'/'),1);\n $saveimg($dst,$nameimage);\n imagedestroy($src);\n\n return $nameimage;\n}", "title": "" }, { "docid": "28e49401f003304e8a2027407ffeb97e", "score": "0.6422665", "text": "abstract public function resize();", "title": "" }, { "docid": "c808eee378e8f8b365a04c0ac96fe4ce", "score": "0.64171904", "text": "function resize_pic($file,$newprefix='',$picw=100,$pich=100,$directory='img/userfiles',$newdirectory='img/userfiles', $subdir=''){\n\t\n\t$dir=$_SERVER['DOCUMENT_ROOT'].$subdir.'/'.$directory.'/';\n\t$newdir=$_SERVER['DOCUMENT_ROOT'].$subdir.'/'.$newdirectory.'/';\n\t\n\t\t$filecur=$dir.$file;\n\t\t$newfilecur=$newdir.$newprefix.$file;\n\n if(file_exists($newfilecur)==false){\n\n\t\t\t$size = getImageSize($filecur); //\n\t\t\t$srcWidth = $size[0]; $srcHeight = $size[1]; // -\n\t\t\t$destWidth = $picw;\n\t\t\t$destHeight = $pich;\n\n\t\t\tif (!function_exists('imagecreatefromjpeg')) {\n\t\t\t\tdie(\"PHP running on your server does not support the GD image library, check with your webhost if ImageMagick is installed\");\n\t\t\t}\n\t\t\tif (!function_exists('imagecreatetruecolor')) {\n\t\t\t\tdie(\"PHP running on your server does not support GD version 2.x, please switch to GD version 1.x on the config page\");\n\t\t\t}\n\n\t\t\tif($size[2] == IMAGETYPE_PNG){\n\t\t\t\t$src_img = @imagecreatefrompng($filecur);\n\t\t\t}else if($size[2] == IMAGETYPE_GIF){\n $src_img = @imagecreatefromgif($filecur);\n }else{\n\t\t\t\t$src_img = @imagecreatefromjpeg($filecur);\n\t\t\t}\n\n\t\t\tif (!$src_img) {\n\t\t\t\t//die(\"Invalid image!\");\n\t\t\t\treturn false;\n\t\t\t}else{\n\n\t\t\t$dst_img = imagecreatetruecolor($destWidth, $destHeight);\n\n\t\t\t if($size[2] == IMAGETYPE_PNG) {\n\t\t\t\t// Turn off transparency blending (temporarily)\n\t\t\t\timagealphablending($dst_img, false);\n\n\t\t\t\t// Create a new transparent color for image\n\t\t\t\t$color = imagecolorallocatealpha($dst_img, 0, 0, 0, 127);\n\n\t\t\t\t// Completely fill the background of the new image with allocated color.\n\t\t\t\timagefill($dst_img, 0, 0, $color);\n\n\t\t\t\t// Restore transparency blending\n\t\t\t\timagesavealpha($dst_img, true);\n\t\t\t }\n\n\t\t\timagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, (int)$destWidth, (int)$destHeight, $srcWidth, $srcHeight);\n\t\t\t@unlink($newfilecur);\n\n\t\t\tif($size[2] == IMAGETYPE_PNG){\n\t\t\t\timagepng($dst_img, $newfilecur, 9);\n\n }else if($size[2] == IMAGETYPE_GIF){\n imagegif($dst_img, $newfilecur);\n }else{\n\t\t\t\timagejpeg($dst_img, $newfilecur, 100);\n\t\t\t}\n\n\t\t\timagedestroy($src_img);\n\t\t\timagedestroy($dst_img);\n\n\t\t\t}\n\n\t\t}\n\t\n\t return true;\t\n\t}", "title": "" }, { "docid": "0fd62990fc0b5552e90538d9991f2f86", "score": "0.6416041", "text": "function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale){\r\n list($imagewidth, $imageheight, $imageType) = getimagesize($image);\r\n $imageType = image_type_to_mime_type($imageType);\r\n\r\n $newImageWidth = ceil($width * $scale);\r\n $newImageHeight = ceil($height * $scale);\r\n $newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\r\n switch($imageType) {\r\n case \"image/gif\":\r\n $source=imagecreatefromgif($image);\r\n break;\r\n case \"image/pjpeg\":\r\n case \"image/jpeg\":\r\n case \"image/jpg\":\r\n $source=imagecreatefromjpeg($image);\r\n break;\r\n case \"image/png\":\r\n case \"image/x-png\":\r\n $source=imagecreatefrompng($image);\r\n break;\r\n }\r\n imagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);\r\n switch($imageType) {\r\n case \"image/gif\":\r\n imagegif($newImage,$thumb_image_name);\r\n break;\r\n case \"image/pjpeg\":\r\n case \"image/jpeg\":\r\n case \"image/jpg\":\r\n imagejpeg($newImage,$thumb_image_name,90);\r\n break;\r\n case \"image/png\":\r\n case \"image/x-png\":\r\n imagepng($newImage,$thumb_image_name);\r\n break;\r\n }\r\n chmod($thumb_image_name, 0777);\r\n return $thumb_image_name;\r\n}", "title": "" }, { "docid": "bffde10a6e27455e80ded36ab2ceb2b2", "score": "0.63976604", "text": "function resize_image($fileName, $imageName, $imagePath, $dimX, $dimY, $dimRestrict = NULL)\n {\n $imgInfo = getimagesize($imagePath.$imageName);\n $imgType = $imgInfo[2];\n $imageX = $imgInfo[0];\n $imageY = $imgInfo[1];\n // resize the image based on restrictions, otherwise we leave it alone\n if ($dimX != 0) $imageX = $dimX;\n if ($dimY != 0) $imageY = $dimY;\n if ($dimRestrict == RESTRICT_WIDTH){\n $imageY = $imgInfo[1] * ($imageX / $imgInfo[0]);\n if( $imageY > 480 && ($fileName == \"pic1.jpg\" || $fileName == \"pic2.jpg\" || $fileName == \"pic3.jpg\") ){\n $imageY = 480;\n }\n }\n elseif ($dimRestrict == RESTRICT_HEIGHT){\n $imageX = $imgInfo[0] * ($imageY / $imgInfo[1]);\n if( $imageX > 640 && ($fileName == \"pic1.jpg\" || $fileName == \"pic2.jpg\" || $fileName == \"pic3.jpg\") ){\n $imageX = 640;\n }\n }\n // create the destination image resource\n if (function_exists('imagecreatetruecolor'))\n $imageDest = imagecreatetruecolor($imageX, $imageY);\n else\n $imageDest = imagecreate($imageX, $imageY);\n // read the source image and use the correct function depending on format\n if ($imgType == IMAGETYPE_JPEG) $imageType = imagecreatefromjpeg($imagePath.$imageName);\n elseif ($imgType == IMAGETYPE_PNG) $imageType = imagecreatefrompng($imagePath.$imageName);\n elseif ($imgType == IMAGETYPE_GIF) $imageType = imagecreatefromgif($imagePath.$imageName);\n\n \n\n // gd 2.0 is needed for clean resampling, but sloppy resizing is always available\n\n if (function_exists('imagecopyresampled'))\n\n imagecopyresampled($imageDest, $imageType, 0,0,0,0, $imageX, $imageY, $imgInfo[0], $imgInfo[1]);\n\n else\n\n imagecopyresized($imageDest, $imageType, 0,0,0,0, $imageX, $imageY, $imgInfo[0], $imgInfo[1]);\n\n \n\n // make the image path and image name, strip file extension and change to .jpg\n\n $imageFileName = $imagePath.substr($fileName, 0, strlen($fileName) - 4).'.jpg';\n\n \n\n // check to see if the file is being overwritten\n\n $imgUpdated = false;\n\n if (file_exists($imageFileName)) $imgUpdated = true;\n\n \n\n // save the image to the image path\n\n if (!imageJPEG($imageDest, $imageFileName, 80)) return false;\n\n \n\n // return in an array: the filename, if the file was overwritten\n\n return array(substr($fileName, 0, strlen($fileName) - 4).'.jpg', $imgUpdated);\n\n }", "title": "" }, { "docid": "a287d3bdbf5a89e5f339ec65db0086cf", "score": "0.6383814", "text": "function attachment_thumbnail($id, $size) {\n $image = image_downsize($id, $size, false);\n return $image[0];\n}", "title": "" }, { "docid": "471b0451df83819ac1aff90f4557d895", "score": "0.6381802", "text": "function resampimage($forcedwidth, $forcedheight, $sourcefile, $destfile)\n {\n $g_srcfile=$sourcefile;\n $g_dstfile=$destfile;\n $g_fw=$forcedwidth;\n $g_fh=$forcedheight;\n\n $stats = getimagesize($sourcefile);\n if($stats === FALSE)\n return false;\n\n $mime = $stats['mime'];\n\n if (!preg_match(\"/jpeg/i\", $mime) && !preg_match(\"/png/i\", $mime) && !preg_match(\"/gif/i\", $mime))\n return false;\n\n\n if(file_exists($g_srcfile))\n {\n $g_is=getimagesize($g_srcfile);\n if(($g_is[0]-$g_fw)>=($g_is[1]-$g_fh))\n {\n $g_iw=$g_fw;\n $g_ih=($g_fw/$g_is[0])*$g_is[1];\n }\n else\n {\n $g_ih=$g_fh;\n $g_iw=($g_ih/$g_is[1])*$g_is[0];\n }\n\n if(preg_match(\"/jpeg/i\", $mime))\n $img_src = imagecreatefromjpeg($g_srcfile);\n else if(preg_match(\"/gif/i\", $mime))\n $img_src = imagecreatefromgif($g_srcfile);\n else if(preg_match(\"/png/i\", $mime))\n $img_src = imagecreatefrompng($g_srcfile);\n\n $img_dst=imagecreatetruecolor($g_iw,$g_ih);\n imagecopyresampled($img_dst, $img_src, 0, 0, 0, 0, $g_iw, $g_ih, $g_is[0], $g_is[1]);\n\n if (preg_match(\"/jpeg/i\", $mime))\n imagejpeg($img_dst, $g_dstfile);\n else if(preg_match(\"/gif/i\", $mime))\n imagegif($img_dst, $g_dstfile);\n else\n imagepng($img_dst, $g_dstfile);\n\n imagedestroy($img_dst);\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "c259c7451e43c93712c4f812d18f0b9c", "score": "0.6376367", "text": "function set_image_size($max_width,$max_height,$resize)\n\t{\n\t\t\tif(empty($max_height))\n\t\t\t{\n\t\t\t\t//$max_height=800;\n\t\t\t}\n\t\t\tlist($width, $height, $type, $attr) = getimagesize($this->filepath);\t\n\t\t\t$this->image_x\t\t=\t$width;\n\t\t\t$this->image_y\t\t=\t$height;\n\t\t\t$this->max_width\t=\t$max_width;\n\t\t\t$this->max_height\t=\t$max_height;\n\t\t\t\n\t\t\t\t//both constraints//\n\t\t\tif($max_width && $max_height)\n\t\t\t{\n\t\t\t\tif($resize==1)\n\t\t\t\t{\n\t\t\t\t\t$this->image_tx\t=\t$max_width;\n\t\t\t\t\t$this->image_ty\t=\t$max_height;\n\t\t\t\t}\n\t\t\t\telse if(($this->image_x>$max_width) &&($this->image_y>$max_height) )\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif($this->image_x>=$this->image_y)\n\t\t\t\t\t{\n\t\t\t\t\t\t$nm_width\t=\t$this->max_width;\n\t\t\t\t\t \t$nm_height\t=\t($nm_width/$this->image_x)*$this->image_y;\n\t\t\t\t\t\tif($nm_height>$max_height)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$prp\t\t=\t$max_height/$nm_height;\n\t\t\t\t\t\t\t$nm_height\t=\t$nm_height*$prp;\n\t\t\t\t\t\t\t$nm_width\t=\t($prp)*$nm_width;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->image_tx\t=\t$nm_width;\n\t\t\t\t\t\t$this->image_ty\t=\t$nm_height;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse if($this->image_y > $this->image_x)\n\t\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t\t$nm_height\t=\t$this->max_height;\n\t\t\t\t\t \t$nm_width\t=\t($nm_height/$this->image_y)*$this->image_x;\n\t\t\t\t\t\tif($nm_width > $max_width)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$prp\t\t=\t$max_width/$nm_width;\n\t\t\t\t\t\t\t$nm_width\t=\t$nm_width*$prp;\n\t\t\t\t\t\t\t$nm_height\t=\t($prp)*$nm_height;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->image_tx\t=\t$nm_width;\n\t\t\t\t\t\t$this->image_ty\t=\t$nm_height;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(($this->image_x<$max_width)&&($this->image_y<$max_height))\n\t\t\t\t{\n\t\t\t\t\t$this->image_tx\t=\t$this->image_x;\n\t\t\t\t\t$this->image_ty\t=\t$this->image_y;\n\t\t\t\t}\n\t\t\t\telse if($this->image_x>$max_width)\n\t\t\t\t{\n\t\t\t\t\t$nm_width\t=\t$max_width;\n\t\t\t\t\t$nm_height\t=\t($nm_width/$this->image_x)*$this->image_y;\n\t\t\t\t\t\n\t\t\t\t\t$this->image_tx\t=\t$nm_width;\n\t\t\t\t\t$this->image_ty\t=\t$nm_height;\n\t\t\t\t}\n\t\t\t\telse if($this->image_y>$max_height)\n\t\t\t\t{\n\t\t\t\t\t$nm_height\t=\t$max_height;\n\t\t\t\t\t$nm_width\t=\t($nm_height/$this->image_y)*$this->image_x;\n\t\t\t\t\t\n\t\t\t\t\t$this->image_tx\t=\t$nm_width;\n\t\t\t\t\t$this->image_ty\t=\t$nm_height;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->image_tx\t=\t$max_width;\n\t\t\t\t\t$this->image_ty\t=\t$max_height;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(!empty($max_width))\n\t\t\t{\n\t\t\t\t\t$nm_width\t=\t$max_width;\n\t\t\t\t\t$nm_height\t=\t($nm_width/$this->image_x)*$this->image_y;\n\t\t\t\t\t\n\t\t\t\t\t$this->image_tx\t=\t$nm_width;\n\t\t\t\t\t$this->image_ty\t=\t$nm_height;\n\t\t\t}\n\t\t\telse if(!empty($max_height))\n\t\t\t{\n\t\t\t\t\t$nm_height\t=\t$max_height;\n\t\t\t\t\t$nm_width\t=\t($nm_height/$this->image_y)*$this->image_x;\n\t\t\t\t\t\n\t\t\t\t\t$this->image_tx\t=\t$nm_width;\n\t\t\t\t\t$this->image_ty\t=\t$nm_height;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t\t\t$this->image_tx\t=\t$this->image_x;\n\t\t\t\t\t$this->image_ty\t=\t$this->image_y;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\t\t$this->image_tx\t=\tceil($this->image_tx);\n\t\t\t\t\t$this->image_ty\t=\tceil($this->image_ty);\n\t}", "title": "" }, { "docid": "7455462d2cc741846e4f12ff583c2068", "score": "0.63595617", "text": "function resizejpeg($dir, $newdir, $img, $max_w, $max_h, $prefix)\n{\n // set destination directory\n if (!$newdir) $newdir = $dir;\n\n // get original images width and height\n list($or_w, $or_h, $or_t) = getimagesize($dir.$img);\n\n // make sure image is a jpeg\n if ($or_t == 2) \n {\n \n // obtain the image's ratio\n $ratio = ($or_h / $or_w);\n\n // original image\n $or_image = imagecreatefromjpeg($dir.$img);\n\n // resize image?\n if ($or_w > $max_w || $or_h > $max_h) {\n\n // resize by height, then width (height dominant)\n if ($max_h < $max_w) {\n $rs_h = $max_h;\n $rs_w = $rs_h / $ratio;\n }\n // resize by width, then height (width dominant)\n else {\n $rs_w = $max_w;\n $rs_h = $ratio * $rs_w;\n }\n\n // copy old image to new image\n $rs_image = imagecreatetruecolor($rs_w, $rs_h);\n imagecopyresampled($rs_image, $or_image, 0, 0, 0, 0, $rs_w, $rs_h, $or_w, $or_h);\n }\n // image requires no resizing\n else {\n $rs_w = $or_w;\n $rs_h = $or_h;\n\n $rs_image = $or_image;\n }\n\n // generate resized image\n imagejpeg($rs_image, $newdir.$prefix.$img, 100);\n\n return true;\n } \n\n // Image type was not jpeg!\n else \n {\n return false;\n }\n}", "title": "" }, { "docid": "87d026c79e1faf54562c1fc91f1b7779", "score": "0.6359523", "text": "function resize($path, $width, $height, $aspect = true, $crop = false, $cropvars = array(), $autocrop = false, $htmlAttributes = array(), $return = false, $webrootPath, $onlyPath = false) {\r\r\n\r\r\n $types = array(1 => \"gif\", \"jpeg\", \"png\", \"swf\", \"psd\", \"wbmp\"); // used to determine image type\r\r\n \r\r\n $fullpath = ROOT . DS . APP_DIR . DS . WEBROOT_DIR . DS . $this->themeWeb . $this->uploadDir;\r\r\n echo WWW_ROOT.'uploads'.DS.'hotels'.DS.$upload_dir;\r\r\n die;\r\r\n //$url = $fullpath.$path;\r\r\n //$url = \"img/\" . $path;\r\r\n $url = $path;\r\r\n // $webrootPath = ROOT . DS . APP_DIR . DS . WEBROOT_DIR;\r\r\n echo $webrootPath = FULL_BASE_URL . '/silk/';\r\r\n\r\r\n\r\r\n\r\r\n if (!($size = getimagesize($url)))\r\r\n return; // image doesn't exist\r\r\n\r\r\n if ($width == $size[0] && $height == $size[1]) {\r\r\n //$webrootPath = FULL_BASE_URL . '/' . $webrootPath;\r\r\n $newPath = explode(\"$this->uploadDir\", $path);\r\r\n $relfile = $webrootPath . $this->uploadDir . 'thumbs';\r\r\n //$relfile = $webrootPath . $this->uploadDir . $newPath[1];\r\r\n } else {\r\r\n if ($autocrop) {\r\r\n $multiplier = 1.0;\r\r\n while (($width * $multiplier < $size[0]) && ($height * $multiplier < $size[1])) {\r\r\n $multiplier += .01;\r\r\n }\r\r\n\r\r\n // make SURE we don't run over\r\r\n $multiplier -= .01;\r\r\n\r\r\n $cropw = floor($width * $multiplier);\r\r\n $croph = floor($height * $multiplier);\r\r\n\r\r\n //echo(\"$cropw $croph $width $height $multiplier $size[0] $size[1] <br />\");\r\r\n ///die();\r\r\n\r\r\n $xindent = ($size[0] - $cropw) / 2.0;\r\r\n $yindent = ($size[1] - $croph) / 2.0;\r\r\n\r\r\n $startx = floor($xindent);\r\r\n $endx = $size[0] - ceil($xindent);\r\r\n\r\r\n $starty = floor($yindent);\r\r\n $endy = $size[1] - ceil($yindent);\r\r\n\r\r\n //echo(\"$xindent, $yindent -> leads to: $startx, $starty start and $endx, $endy end\");\r\r\n //die();\r\r\n\r\r\n $cropvars = array($startx, $starty, $endx, $endy);\r\r\n }\r\r\n\r\r\n if (($width > $size[0] || $height > $size[1]) && $autocrop) {\r\r\n\r\r\n $multiplier = 1.0;\r\r\n while (($width * $multiplier >= $size[0]) || ($height * $multiplier >= $size[1])) {\r\r\n $multiplier -= .01;\r\r\n }\r\r\n\r\r\n $cropw = floor($width * $multiplier);\r\r\n $croph = floor($height * $multiplier);\r\r\n\r\r\n //echo(\"$cropw $croph $width $height $multiplier $size[0] $size[1] <br />\");\r\r\n ///die();\r\r\n\r\r\n $xindent = ($size[0] - $cropw) / 2.0;\r\r\n $yindent = ($size[1] - $croph) / 2.0;\r\r\n\r\r\n $startx = floor($xindent);\r\r\n $endx = $size[0] - ceil($xindent);\r\r\n\r\r\n $starty = floor($yindent);\r\r\n $endy = $size[1] - ceil($yindent);\r\r\n\r\r\n //echo(\"$xindent, $yindent -> leads to: $startx, $starty start and $endx, $endy end\");\r\r\n //die();\r\r\n\r\r\n $cropvars = array($startx, $starty, $endx, $endy);\r\r\n }\r\r\n\r\r\n // check that user supplied full start and stop coordinates\r\r\n if (sizeof($cropvars) == 4) {\r\r\n if ($cropvars[0] > $size[0] || $cropvars[1] > $size[1] || $cropvars[2] > $size[0] || $cropvars[3] > $size[1] || $cropvars[0] < 0 || $cropvars[1] < 0 || $cropvars[2] < 0 || $cropvars[3] < 0) {\r\r\n $crop = false;\r\r\n }\r\r\n } else {\r\r\n $crop = false;\r\r\n }\r\r\n\r\r\n // temporarily set size to this for aspect checking\r\r\n if ($crop) {\r\r\n $tempsize = array($size[0], $size[1]);\r\r\n $size[0] = $cropvars[2] - $cropvars[0];\r\r\n $size[1] = $cropvars[3] - $cropvars[1];\r\r\n }\r\r\n\r\r\n if ($aspect) { // adjust to aspect\r\r\n if (($size[1] / $height) > ($size[0] / $width)) // $size[0]:width, [1]:height, [2]:type\r\r\n $width = ceil(($size[0] / $size[1]) * $height);\r\r\n else\r\r\n $height = ceil($width / ($size[0] / $size[1]));\r\r\n }\r\r\n\r\r\n // set size back\r\r\n if ($crop) {\r\r\n $size[0] = $tempsize[0];\r\r\n $size[1] = $tempsize[1];\r\r\n }\r\r\n\r\r\n if ($crop) {\r\r\n $cropstring = $cropvars[0] . $cropvars[1] . $cropvars[2] . $cropvars[3] . '_';\r\r\n } else {\r\r\n $cropstring = '';\r\r\n }\r\r\n\r\r\n $webrootPath = FULL_BASE_URL . '/' . $webrootPath;\r\r\n $relfile = $webrootPath . $this->themeWeb . $this->uploadDir . $this->cacheDir . '/' . $width . 'x' . $height . '_' . $cropstring . basename($path); // relative file\r\r\n $cachefile = $fullpath . $this->cacheDir . DS . $width . 'x' . $height . '_' . $cropstring . basename($path); // location on server\r\r\n\r\r\n\r\r\n if (file_exists($cachefile)) {\r\r\n $csize = getimagesize($cachefile);\r\r\n $cached = ($csize[0] == $width && $csize[1] == $height); // image is cached\r\r\n if (@filemtime($cachefile) < @filemtime($url)) // check if up to date\r\r\n $cached = false;\r\r\n } else {\r\r\n $cached = false;\r\r\n }\r\r\n\r\r\n if (!$cached) {\r\r\n $resize = ($size[0] > $width || $size[1] > $height) || ($size[0] < $width || $size[1] < $height);\r\r\n } else {\r\r\n $resize = false;\r\r\n }\r\r\n\r\r\n if ($resize) {\r\r\n $image = call_user_func('imagecreatefrom' . $types[$size[2]], $url);\r\r\n\r\r\n if ($crop) {\r\r\n if (function_exists(\"imagecreatetruecolor\") && ($tempcrop = imagecreatetruecolor($cropvars[2] - $cropvars[0], $cropvars[3] - $cropvars[1]))) {\r\r\n imagecopyresampled($tempcrop, $image, 0, 0, $cropvars[0], $cropvars[1], $cropvars[2] - $cropvars[0], $cropvars[3] - $cropvars[1], $cropvars[2] - $cropvars[0], $cropvars[3] - $cropvars[1]);\r\r\n } else {\r\r\n $temp = imagecreate($cropvars[2] - $cropvars[0], $cropvars[3] - $cropvars[1]);\r\r\n imagecopyresized($tempcrop, $image, 0, 0, $cropvars[0], $cropvars[1], $cropvars[2] - $cropvars[0], $cropvars[3] - $cropvars[1], $size[0], $size[1]);\r\r\n }\r\r\n\r\r\n $image = $tempcrop;\r\r\n }\r\r\n\r\r\n $size[0] = $cropvars[2] - $cropvars[0];\r\r\n $size[1] = $cropvars[3] - $cropvars[1];\r\r\n\r\r\n if (function_exists(\"imagecreatetruecolor\") && ($temp = imagecreatetruecolor($width, $height))) {\r\r\n imagecopyresampled($temp, $image, 0, 0, 0, 0, $width, $height, $size[0], $size[1]);\r\r\n } else {\r\r\n $temp = imagecreate($width, $height);\r\r\n imagecopyresized($temp, $image, 0, 0, 0, 0, $width, $height, $size[0], $size[1]);\r\r\n }\r\r\n if ($types[$size[2]] == \"jpeg\") {\r\r\n imagejpeg($temp, $cachefile, 90);\r\r\n } else {\r\r\n call_user_func(\"image\" . $types[$size[2]], $temp, $cachefile);\r\r\n }\r\r\n imagedestroy($image);\r\r\n imagedestroy($temp);\r\r\n }\r\r\n //return $this->output(sprintf($this->Html->image, $relfile, $this->Html->_parseAttributes($htmlAttributes, null, '', ' ')), $return);\r\r\n }\r\r\n if ($onlyPath) {\r\r\n return $relfile;\r\r\n }\r\r\n\r\r\n $htmlAttributes['src'] = $relfile;\r\r\n return $this->imageAttributes($htmlAttributes);\r\r\n //return '<img src=\"' . $relfile . '\" alt=\"\" />';\r\r\n }", "title": "" }, { "docid": "835f50ec235e6cb6430a6b8673cf7265", "score": "0.63404197", "text": "function imageResize($width, $height, $target) {\n// formula accordingly...this is so this script will work \n// dynamically with any size image \n\nif ($width > $height) { \n$percentage = ($target / $width); \n} else { \n$percentage = ($target / $height); \n} \n\n// gets the new value and applies the percentage, then rounds the value \n$width = round($width * $percentage); \n$height = round($height * $percentage); \n\n// returns the new sizes in html image tag format...this is so you \n// can plug this function inside an image tag and just get the \n\nreturn \"width=\\\"$width\\\" height=\\\"$height\\\"\"; \n}", "title": "" }, { "docid": "f6547e3c24c979724438bb66a0bd7336", "score": "0.63360184", "text": "function imageResizeToThumbnail(){\r\n if(!isset($_FILES)){\r\n return array('isValid' => true , 'errorMsg' => 'Select a file and try again.');\r\n }\r\n \r\n #Managing FILE data\r\n $fileName = $_FILES['thumbnail']['name'];\r\n \r\n #Defense Layer\r\n $whitelist = array( 'jpeg' => 'image/jpeg' , 'jpg' => 'ímage/jpg' \r\n , 'gpg' => 'image/gpg' , 'png' => 'image/png' \r\n , 'svg' => 'image/svg');\r\n \r\n $extension = $_FILES['thumbnail']['type'];\r\n \r\n if(!in_array($extension,$whitelist)){\r\n return array('isValid' => false , 'errorMsg' => \"File format not supported\");\r\n }\r\n \r\n $pattern = \"/^[\\w\\s\\-]+(\\.[\\w]{3,4})?$/\";\r\n \r\n if(!preg_match($pattern,$fileName)){\r\n return array('isValid' => false , 'errorMsg' => \"File name is not valid, try again!\");\r\n } \r\n\r\n $directory = \"../genre_thumbs/\";\r\n $newName = sha1($_POST['name']);\r\n \r\n $thumbnail = $directory . $newName;\r\n \r\n if(move_uploaded_file($_FILES['thumbnail']['tmp_name'], $thumbnail)){ \r\n $resizeSuccessful = smart_resize_image($thumbnail,null,200,200);\r\n }else {\r\n return array('isValid' => false , 'errorMsg' => \"Bad Request! Please , try one more time\");\r\n }\r\n \r\n if(!$resizeSuccessful){\r\n return array('isValid' => false , 'errorMsg' => \"Bad Request! Please , try one more time\");\r\n }\r\n \r\n return array('isValid' => true , 'filepath' => $thumbnail);\r\n \r\n \r\n }", "title": "" }, { "docid": "d58737157a024d2a98e7d5eb0deb06e6", "score": "0.632836", "text": "private function _resizeWithFillHeight($new_sizes){\n \tif(!$this->_imageProtect($new_sizes['canvas_width'], $new_sizes['canvas_height'])) return;\n\t \n\t \tif($this->arrOriginalDetails['mime']=='image/gif'){\n\t\t\t #właściwy obrazek\n $this->resResizedImage = imagecreate($new_sizes['actual_pic_width'], $new_sizes['canvas_height']);\n\t\t\t #płótno\n\t\t\t $this->resResizedImage_2 = imagecreate($new_sizes['canvas_width'], $new_sizes['canvas_height']);\n\t\t\t $background = imagecolorallocate($this->resResizedImage, 255, 255, 255);\n\t\t\t $background_2 = imagecolorallocate($this->resResizedImage_2, 255, 255, 255);\n\t\t\t\t\n\t\t} else if($this->arrOriginalDetails['mime']=='image/jpeg'){\n \n\t\t\t #właściwy obrazek\n\t\t\t $this->resResizedImage = imagecreatetruecolor($new_sizes['actual_pic_width'], $new_sizes['canvas_height']);\n\t\t\t #płótno\n\t\t\t $this->resResizedImage_2 = imagecreatetruecolor($new_sizes['canvas_width'], $new_sizes['canvas_height']);\n\t\t\t $background = imagecolorallocate($this->resResizedImage, 255, 255, 255);\n\t\t\t $background_2 = imagecolorallocate($this->resResizedImage_2, 255, 255, 255);\n\t\t\t \n } else if($this->arrOriginalDetails['mime']=='image/png'){ \n #właściwy obrazek\n $this->resResizedImage = imagecreatetruecolor($new_sizes['actual_pic_width'], $new_sizes['canvas_height']); \n imagecolortransparent($this->resResizedImage, imagecolorallocate($this->resResizedImage, 0, 0, 0)); \n\t\t\t $background = imagecolorallocate($this->resResizedImage, 255, 255, 255);\n imagealphablending($this->resResizedImage, false); \n imagesavealpha($this->resResizedImage, true); \n\t\t\t \n\t\t\t #płótno\n $this->resResizedImage_2 = imagecreatetruecolor($new_sizes['canvas_width'], $new_sizes['canvas_height']);\n\t\t\t $background_2 = imagecolorallocate($this->resResizedImage_2, 255, 255, 255);\n imagecolortransparent($this->resResizedImage_2, imagecolorallocate($this->resResizedImage_2, 0, 0, 0)); \n imagealphablending($this->resResizedImage_2, false); \n imagesavealpha($this->resResizedImage_2, true); \n\t\t\t \n\t\t\t\n } \n\t\t\n\t\timagefill($this->resResizedImage, 0, 0, $background);\n\t\timagefill($this->resResizedImage_2, 0, 0, $background_2);\n\t\t$this->updateNewDetails(); \n\t\t\n\t\t#przekopiowujemy dane z oryginalnego obrazka do wlasciwej miniaturki\n imagecopyresampled($this->resResizedImage, $this->resOriginalImage, 0, 0, 0, 0, $new_sizes['actual_pic_width'], $new_sizes['canvas_height'], $this->arrOriginalDetails[0], $this->arrOriginalDetails[1]);\n\t\timagecopy($this->resResizedImage_2, $this->resResizedImage, $new_sizes['left_margin'], 0, 0, 0, $new_sizes['actual_pic_width'], $new_sizes['canvas_height']);\n\t\t\n //saves the image \n \t$this->saveFillImage(); \n }", "title": "" }, { "docid": "00f466e3d71486582f8fad5f984c51d6", "score": "0.63249385", "text": "function redimensionarImagen($origin, $destino, $newWidth, $newHeight, $jpgQuality = 100)\n{\n // getimagesize devuelve un array con: anchura,altura,tipo,cadena de \n // texto con el valor correcto height=\"yyy\" width=\"xxx\"\n $datos = getimagesize($origin);\n // comprobamos que la imagen sea superior a los tamaños de la nueva imagen\n if ($datos[0] > $newWidth || $datos[1] > $newHeight) {\n\n // creamos una nueva imagen desde el original dependiendo del tipo\n if ($datos[2] == 1)\n $img = imagecreatefromjpg($origin);\n if ($datos[2] == 2)\n $img = imagecreatefromjpeg($origin);\n if ($datos[2] == 3)\n $img = imagecreatefrompng($origin);\n\n // Redimensionamos proporcionalmente\n if (rad2deg(atan($datos[0] / $datos[1])) > rad2deg(atan($newWidth / $newHeight))) {\n $anchura = $newWidth;\n $altura = round(($datos[1] * $newWidth) / $datos[0]);\n } else {\n $altura = $newHeight;\n $anchura = round(($datos[0] * $newHeight) / $datos[1]);\n }\n\n // creamos la imagen nueva\n $newImage = imagecreatetruecolor($anchura, $altura);\n\n // redimensiona la imagen original copiandola en la imagen\n imagecopyresampled($newImage, $img, 0, 0, 0, 0, $anchura, $altura, $datos[0], $datos[1]);\n\n // guardar la nueva imagen redimensionada donde indica $destino\n if ($datos[2] == 1)\n imagejpg($newImage, $destino);\n if ($datos[2] == 2)\n imagejpeg($newImage, $destino, $jpgQuality);\n if ($datos[2] == 3)\n imagepng($newImage, $destino);\n\n // eliminamos la imagen temporal\n imagedestroy($newImage);\n\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "e51eddefec89acc6adefbd6d81fb5e0f", "score": "0.6312527", "text": "private function _resizeWithFillWidth($new_sizes){\n \tif(!$this->_imageProtect($new_sizes['canvas_width'], $new_sizes['canvas_height'])) return;\n\t \n\t \tif($this->arrOriginalDetails['mime']=='image/gif'){\n\t\t\t #właściwy obrazek\n $this->resResizedImage = imagecreate($new_sizes['canvas_width'], $new_sizes['actual_pic_height']);\n\t\t\t #płótno\n\t\t\t $this->resResizedImage_2 = imagecreate($new_sizes['canvas_width'], $new_sizes['canvas_height']);\n\t\t\t $background = imagecolorallocate($this->resResizedImage, 255, 255, 255);\n\t\t\t $background_2 = imagecolorallocate($this->resResizedImage_2, 255, 255, 255);\n\t\t\t\t\n\t\t} else if($this->arrOriginalDetails['mime']=='image/jpeg'){\n \n\t\t\t #właściwy obrazek\n\t\t\t $this->resResizedImage = imagecreatetruecolor($new_sizes['canvas_width'], $new_sizes['actual_pic_height']);\n\t\t\t #płótno\n\t\t\t $this->resResizedImage_2 = imagecreatetruecolor($new_sizes['canvas_width'], $new_sizes['canvas_height']);\n\t\t\t $background = imagecolorallocate($this->resResizedImage, 255, 255, 255);\n\t\t\t $background_2 = imagecolorallocate($this->resResizedImage_2, 255, 255, 255);\n\t\t\t\n } else if($this->arrOriginalDetails['mime']=='image/png'){ \n #właściwy obrazek\n $this->resResizedImage = imagecreatetruecolor($new_sizes['canvas_width'], $new_sizes['actual_pic_height']); \n imagecolortransparent($this->resResizedImage, imagecolorallocate($this->resResizedImage, 0, 0, 0)); \n\t\t\t $background = imagecolorallocate($this->resResizedImage, 255, 255, 255);\n imagealphablending($this->resResizedImage, false); \n imagesavealpha($this->resResizedImage, true); \n\t\t\t \n\t\t\t #płótno\n $this->resResizedImage_2 = imagecreatetruecolor($new_sizes['canvas_width'], $new_sizes['canvas_height']);\n\t\t\t $background_2 = imagecolorallocate($this->resResizedImage_2, 255, 255, 255);\n imagecolortransparent($this->resResizedImage_2, imagecolorallocate($this->resResizedImage_2, 0, 0, 0)); \n imagealphablending($this->resResizedImage_2, false); \n imagesavealpha($this->resResizedImage_2, true); \n\t\t\t \n\t\t\t\n } \n\t\t\n\t\timagefill($this->resResizedImage, 0, 0, $background);\n\t\timagefill($this->resResizedImage_2, 0, 0, $background_2);\n\t\t$this->updateNewDetails(); \n\t\t\n\t\t#przekopiowujemy dane z oryginalnego obrazka do wlasciwej miniaturki\n imagecopyresampled($this->resResizedImage, $this->resOriginalImage, 0, 0, 0, 0, $new_sizes['canvas_width'], $new_sizes['actual_pic_height'], $this->arrOriginalDetails[0], $this->arrOriginalDetails[1]);\n\t\timagecopy($this->resResizedImage_2, $this->resResizedImage, 0, $new_sizes['top_margin'], 0, 0, $new_sizes['canvas_width'], $new_sizes['actual_pic_height']);\n\t\t\n //saves the image \n \t$this->saveFillImage(); \n }", "title": "" }, { "docid": "6e4ac40cb18ac76018afc8e7dc95eb92", "score": "0.63120866", "text": "public function genricResizeUploadedImage( $itsWidth, $itsHeight,$fileDest=\"\",$fileToResizePath=\"\"){\n\t\t $resorce; $realExt; $mage; $thumbheight;$thumbheight; $imageCompr=90;\n\t\t\n\t $this->fileDestination = empty($fileDest)? $this->fileDestination : $fileDest;\n\t\t $this->filePath = empty($fileToResizePath)? $this->filePath : $fileToResizePath;\n\t\n\t\t list($this->fileWidth,$this->fileHeight) = getimagesize($this->filePath);\n\t\t \n\t\t if ( $itsWidth < $this->fileWidth && $this->fileWidth >= $this->fileHeight) {\n $thumbwidth = $itsWidth ;\n $thumbheight = ($thumbwidth / $this->fileWidth) * $this->fileHeight;\n }\n elseif ($itsHeight < $this->fileHeight && $this->fileHeight >= $this->fileWidth) {\n $thumbheight = $itsHeight;\n $thumbwidth = ($thumbheight /$this->fileHeight) * $this->fileWidth;\n }\n else {\n $thumbheight = $this->fileHeight;\n $thumbwidth = $this->fileWidth;\n }\n\t\t \n\t\t $fExt = $this->getFileExtension(); // get foto extension\n\t\t $this->fileDestinationAndName = $this->fileDestination.$this->getFileName().\".\".$fExt;\n $newFile= imagecreatetruecolor($thumbwidth,$thumbheight);\n\t\t switch($fExt){\n\t\t\t case \"jpg\":\n\t\t\t case \"jpeg\": $resorce = imagecreatefromjpeg($this->filePath); $realExt=\"jpeg\"; break; \n\t\t\t case \"gif\" : $resorce = imagecreatefromgif($this->filePath);$realExt=$fExt; break;\n\t\t\t case \"png\" : $resorce = imagecreatefrompng($this->filePath);$realExt=$fExt; $imageCompr=9; break;\n default: $this->fileDelete($this->filePath); return false;\n\t\t }\n\t\t try{\n\t\t\t\t \n\t\t\t\tif($fExt == \"gif\" or $fExt == \"png\"){\n\t\t\t\t\t\timagecolortransparent($newFile, imagecolorallocatealpha($newFile, 0, 0, 0, 127));\n\t\t\t\t\t\timagealphablending($newFile, false);\n\t\t\t\t\t\timagesavealpha($newFile, true);\n\t\t\t\t\t }\n\t\t\t\t imagecopyresampled($newFile,$resorce,0,0,0,0,$thumbwidth,$thumbheight,$this->fileWidth,$this->fileHeight);\n\t\t\t\t //$this->fileDelete($this->filePath);\n\t\t\t\t $mage = \"image\".$realExt;\n\t\t\t\t $mage($newFile, $this->fileDestinationAndName,$imageCompr);\n\t\t\t\t chmod($this->fileDestinationAndName,0777);\n\t\t\t\t $this->allMainFile[]= $this->fileDestinationAndName;\n\t\t\t\t imagedestroy($newFile);\t\n/*\t\t try{\n\t\t\t $dir = explode(\"/\",$this->fileDestination);\n\t\t\t if($this->setRquery(\"INSERT INTO amistiPhotos VALUES(?,?,?,?,?,?)\",array(\n\t\t\t \"\", $_SESSION['logInUserId'],$dir[count($dir)-2], $this->getFileName($this->filePath), $this->filePath,time()))){\n\t\t\t\treturn true;\n\t\t\t\t \n\t\t\t}}catch(Exception $ex){\n\t\t\t\techo $ex->getMessage();\n\t\t\t\t}*/\n\t\t\t\t return true;\t\t\t\n\t\t\t }catch(Exception $ex){\n\t\t\t\t echo $ex->getMessage();\n\t\t\t\t }\n\t\t\t\n\t\t}", "title": "" }, { "docid": "a3efa4ef0652ed1514f11971121020e3", "score": "0.62952226", "text": "function resize_image($file,$path,$width,$height,$quality,$thumb=0,$path_thumb=\"\")\n\t{\n\t\t$ci =& get_instance();\n\t\t$ci->load->library('image_lib');\n\n\t\tif($thumb==1){\n\t\t\t$img_array = array(\n\t\t\t\t'image_library' => 'gd2',\n\t\t\t\t'source_image' => $path.$file,\n\t\t\t\t'new_image' => $path_thumb,\n\t\t\t\t'create_thumb' => FALSE,//tell the CI do not create thumbnail on image\n\t\t\t\t'maintain_ratio' => TRUE,\n\t\t\t\t'width' => $width,//new size of image\n\t\t\t\t'height' => $height,//new size of image\n\t\t\t\t'quality'=>$quality,\n\t\t\t);\n\t\t}\n\t\telse{\n\t\t\t$img_array = array(\n\t\t\t\t'image_library' => 'gd2',\n\t\t\t\t'source_image' => $path.$file,\n\t\t\t\t'create_thumb' => FALSE,//tell the CI do not create thumbnail on image\n\t\t\t\t'maintain_ratio' => TRUE,\n\t\t\t\t'width' => $width,//new size of image\n\t\t\t\t'height' => $height,//new size of image\n\t\t\t\t'quality'=>$quality,\n\t\t\t);\n\t\t}\n\t\t$ci->image_lib->clear();\n\t\t$ci->image_lib->initialize($img_array);\n\t\t$ci->image_lib->resize();\n\t}", "title": "" }, { "docid": "9ece5a28a30f1c81a69a6acdff1f96a2", "score": "0.62842935", "text": "function smart_resize_image(\n\t\t$file,\n\t\t$string = null,\n\t\t$width = 0,\n\t\t$height = 0,\n\t\t$proportional = false,\n\t\t$output = 'file',\n\t\t$delete_original = true,\n\t\t$use_linux_commands = false,\n\t\t$quality\t\t\t= 100\n\t)\n{\n\n\tif ( $height <= 0 && $width <= 0 ) return false;\n\tif ( $file === null && $string === null ) return false;\n\n\t# Setting defaults and meta\n\t$info\t\t\t\t\t\t\t= $file !== null ? getimagesize( $file ) : getimagesizefromstring( $string );\n\t$image\t\t\t\t\t\t\t= '';\n\t$final_width\t\t\t\t\t= 0;\n\t$final_height\t\t\t\t\t= 0;\n\tlist( $width_old, $height_old )\t= $info;\n\t$cropHeight = $cropWidth\t\t= 0;\n\n\t# Calculating proportionality\n\tif ( $proportional ) {\n\t\tif ( $width == 0 ) $factor = $height/$height_old;\n\t\telseif ( $height == 0 ) $factor = $width/$width_old;\n\t\telse $factor = min( $width/$width_old, $height/$height_old );\n\n\t\t$final_width = round( $width_old * $factor );\n\t\t$final_height = round( $height_old * $factor );\n\t}\n\telse {\n\t\t$final_width = ( $width <= 0 ) ? $width_old : $width;\n\t\t$final_height = ( $height <= 0 ) ? $height_old : $height;\n\t\t$widthX = $width_old / $width;\n\t\t$heightX = $height_old / $height;\n\n\t\t$x = min( $widthX, $heightX );\n\t\t$cropWidth = ( $width_old - $width * $x ) / 2;\n\t\t$cropHeight = ( $height_old - $height * $x ) / 2;\n\t}\n\n\t# Loading image to memory according to type\n\tswitch ( $info[2] ) {\n\t\tcase IMAGETYPE_JPEG: $file !== null ? $image = imagecreatefromjpeg($file) : $image = imagecreatefromstring($string); break;\n\t\tcase IMAGETYPE_GIF: $file !== null ? $image = imagecreatefromgif($file) : $image = imagecreatefromstring($string); break;\n\t\tcase IMAGETYPE_PNG: $file !== null ? $image = imagecreatefrompng($file) : $image = imagecreatefromstring($string); break;\n\t\tdefault: return false;\n\t}\n\n\n\t# This is the resizing/resampling/transparency-preserving magic\n\t$image_resized = imagecreatetruecolor( $final_width, $final_height );\n\tif ( ($info[2] == IMAGETYPE_GIF) || ($info[2] == IMAGETYPE_PNG) ) {\n\t\t$transparency = imagecolortransparent( $image );\n\t\t$palletsize = imagecolorstotal( $image );\n\n\t\tif ( $transparency >= 0 && $transparency < $palletsize ) {\n\t\t\t$transparent_color = imagecolorsforindex( $image, $transparency );\n\t\t\t$transparency = imagecolorallocate( $image_resized, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue'] );\n\t\t\timagefill( $image_resized, 0, 0, $transparency );\n\t\t\timagecolortransparent( $image_resized, $transparency );\n\t\t}\n\t\telseif ( $info[2] == IMAGETYPE_PNG ) {\n\t\t\timagealphablending( $image_resized, false );\n\t\t\t$color = imagecolorallocatealpha( $image_resized, 0, 0, 0, 127 );\n\t\t\timagefill( $image_resized, 0, 0, $color );\n\t\t\timagesavealpha( $image_resized, true );\n\t\t}\n\t}\n\timagecopyresampled( $image_resized, $image, 0, 0, $cropWidth, $cropHeight, $final_width, $final_height, $width_old - 2 * $cropWidth, $height_old - 2 * $cropHeight );\n\n\n\t# Taking care of original, if needed\n\tif ( $delete_original ) {\n\t\tif ( $use_linux_commands ) exec( 'rm '.$file );\n\t\telse @unlink( $file );\n\t}\n\n\t# Preparing a method of providing result\n\tswitch ( strtolower( $output ) ) {\n\t\tcase 'browser':\n\t\t\t$mime = image_type_to_mime_type( $info[2] );\n\t\t\theader(\"Content-type: $mime\");\n\t\t\t$output = NULL;\n\t\t\tbreak;\n\t\tcase 'file':\n\t\t\t$output = $file;\n\t\t\tbreak;\n\t\tcase 'return':\n\t\t\treturn $image_resized;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\t# Writing image according to type to the output destination and image quality\n\tswitch ( $info[2] ) {\n\t\tcase IMAGETYPE_GIF: imagegif( $image_resized, $output ); break;\n\t\tcase IMAGETYPE_JPEG: imagejpeg( $image_resized, $output, $quality ); break;\n\t\tcase IMAGETYPE_PNG:\n\t\t\t$quality = 9 - (int)((0.9*$quality)/10.0);\n\t\t\timagepng( $image_resized, $output, $quality );\n\t\t\tbreak;\n\t\tdefault: return false;\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "487e6c3ba6ccefcdf90d5ff7ecd3a89d", "score": "0.62839794", "text": "function cb_ajax_cprt_regenerate_thumbnail( AjaxController $ajaxControllerClass )\n{\n $request = $ajaxControllerClass->getRequest();\n\n //#! If there are no image sizes registered\n $newImageSizes = ImageHelper::getSizes();\n\n if ( empty( $newImageSizes ) ) {\n return $ajaxControllerClass->responseError( __( 'cprt::m.No registered images sizes found.' ) );\n }\n\n $files = $request->get( 'files' );\n\n if ( empty( $files ) ) {\n return $ajaxControllerClass->responseError( __( 'cprt::m.No files provided.' ) );\n }\n\n $mh = new MediaHelper();\n\n foreach ( $files as $fileID ) {\n $mediaFile = MediaFile::find( $fileID );\n if ( !$mediaFile ) {\n return $ajaxControllerClass->responseError( __( 'cprt::m.The specified file was not found.' ) );\n }\n cprt_plugin_resize_image( $mediaFile, $newImageSizes, $mh );\n }\n return $ajaxControllerClass->responseSuccess();\n}", "title": "" }, { "docid": "aca8274ce6897665313134f5f232bf20", "score": "0.62823904", "text": "function ak_img_resize_4444($target_4444, $newcopy_4444, $w_4444, $h_4444, $ext_4444) {\n \n list($w_orig_4444, $h_orig_4444) = getimagesize($target_4444);\n \n $scale_ratio_4444 = $w_orig_4444 / $h_orig_4444;\n \n if (($w_4444 / $h_4444) > $scale_ratio_4444) {\n $w_4444 = $h_4444 * $scale_ratio_4444;\n } \n else {\n $h_4444 = $w_4444 / $scale_ratio_4444;\n }\n\n $img_4444 = \"\";\n $ext_4444 = strtolower($ext_4444);\n \n if ($ext_4444 == \"gif\") { \n $img_4444 = imagecreatefromgif($target_4444);\n } \n else if($ext_4444 ==\"png\") { \n $img_4444 = imagecreatefrompng($target_4444);\n } \n else { \n $img_4444 = imagecreatefromjpeg($target_4444);\n }\n\n $tci_4444 = imagecreatetruecolor($w_4444, $h_4444);\n \n // imagecopyresampled(dst_img, src_img, dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h)\n imagecopyresampled($tci_4444, $img_4444, 0, 0, 0, 0, $w_4444, $h_4444, $w_orig_4444, $h_orig_4444);\n imagejpeg($tci_4444, $newcopy_4444, 100);\n }", "title": "" }, { "docid": "e03d39290ef0225f8fe12772b7f78ead", "score": "0.62816715", "text": "function resizeImagen($ruta, $nombre, $alto, $ancho,$nombreN,$extension)\n{\n$rutaImagenOriginal = $ruta.$nombre;\nif($extension == 'GIF' || $extension == 'gif')\n{\n\t$img_original = imagecreatefromgif($rutaImagenOriginal);\n}\nif($extension == 'jpg' || $extension == 'JPG')\n{\n\t$img_original = imagecreatefromjpeg($rutaImagenOriginal);\n}\nif($extension == 'png' || $extension == 'PNG')\n{\n\t$img_original = imagecreatefrompng($rutaImagenOriginal);\n}\n$max_ancho = $ancho;\n$max_alto = $alto;\nlist($ancho,$alto)=getimagesize($rutaImagenOriginal);\n$x_ratio = $max_ancho / $ancho;\n$y_ratio = $max_alto / $alto;\nif( ($ancho <= $max_ancho) && ($alto <= $max_alto) ){//Si ancho\n$ancho_final = $ancho;\n$alto_final = $alto;\n} elseif (($x_ratio * $alto) < $max_alto){\n$alto_final = ceil($x_ratio * $alto);\n$ancho_final = $max_ancho;\n} else{\n$ancho_final = ceil($y_ratio * $ancho);\n$alto_final = $max_alto;\n}\n$tmp=imagecreatetruecolor($ancho_final,$alto_final);\nimagecopyresampled($tmp,$img_original,0,0,0,0,$ancho_final, $alto_final,$ancho,$alto);\nimagedestroy($img_original);\n$calidad=70;\nimagejpeg($tmp,$ruta.$nombreN,$calidad);\n}", "title": "" }, { "docid": "ca3c1b55a74f30f3c4fca8c922e3b54a", "score": "0.62708104", "text": "function cv_resize( $id = 0, $width = 50, $height = 50, $crop = true ){\n\n // Check if attachment is an image\n if ( !$id || !wp_attachment_is_image($id) )\n return false;\n\n $upload_dir = wp_upload_dir();\n $img_meta = wp_get_attachment_metadata( $id );\n\n if( empty($img_meta) )\n return false;\n\n // attachment url converted to image path\n $file = $upload_dir['basedir'] . '/' . $img_meta['file'];\n\n $image = wp_get_image_editor( $file );\n\n // legacy error explanation.\n if ( is_wp_error( $image ) )\n return false;\n\n // generate intended file name and check if the image exists.\n $new_file_path = $image->generate_filename($suffix = $width.'x'.$height);\n\n // If this file already exists, return the image url.\n if(file_exists($new_file_path))\n return str_replace($upload_dir['basedir'], $upload_dir['baseurl'], $new_file_path);\n\n // resize image and save\n $image->resize( $width, $height, $crop );\n $new_image_info = $image->save();\n\n // legacy error explanation.\n if ( is_wp_error( $new_image_info ) )\n return false;\n\n // convert path to url\n $url = str_replace($upload_dir['basedir'], $upload_dir['baseurl'], $new_image_info['path']);\n\n return $url;\n}", "title": "" }, { "docid": "5c6421fae5889188bc1d3e35f345d779", "score": "0.6262706", "text": "function resizeImage($file,\r\n $width = 0,\r\n $height = 0,\r\n $output = 'file',\r\n\t\t\t\t\t\t\t $proportional = false,\r\n $delete_original = false,\r\n $use_linux_commands = false,\r\n $quality\t\t\t = 100,\r\n\t\t\t\t\t\t\t $string = null\r\n\t\t\t\t ) {\r\n\r\n\t\t\tif ( $height <= 0 && $width <= 0 ) return false;\r\n\t\t\tif ( $file === null && $string === null ) return false;\r\n\r\n\t\t\t# Setting defaults and meta\r\n\t\t\t$info = $file !== null ? getimagesize($file) : getimagesizefromstring($string);\r\n\t\t\t$image = '';\r\n\t\t\t$final_width = 0;\r\n\t\t\t$final_height = 0;\r\n\t\t\tlist($width_old, $height_old) = $info;\r\n\t\t\t$cropHeight = $cropWidth = 0;\r\n\r\n\t\t\t# Calculating proportionality\r\n\t\t\tif ($proportional) {\r\n\t\t\t if ($width == 0) $factor = $height/$height_old;\r\n\t\t\t elseif ($height == 0) $factor = $width/$width_old;\r\n\t\t\t else $factor = min( $width / $width_old, $height / $height_old );\r\n\r\n\t\t\t $final_width = round( $width_old * $factor );\r\n\t\t\t $final_height = round( $height_old * $factor );\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t $final_width = ( $width <= 0 ) ? $width_old : $width;\r\n\t\t\t $final_height = ( $height <= 0 ) ? $height_old : $height;\r\n\t\t\t $widthX = $width_old / $width;\r\n\t\t\t $heightX = $height_old / $height;\r\n\r\n\t\t\t $x = min($widthX, $heightX);\r\n\t\t\t $cropWidth = ($width_old - $width * $x) / 2;\r\n\t\t\t $cropHeight = ($height_old - $height * $x) / 2;\r\n\t\t\t}\r\n\r\n\t\t\t# Loading image to memory according to type\r\n\t\t\tswitch ( $info[2] ) {\r\n\t\t\t case IMAGETYPE_JPEG: $file !== null ? $image = imagecreatefromjpeg($file) : $image = imagecreatefromstring($string); break;\r\n\t\t\t case IMAGETYPE_GIF: $file !== null ? $image = imagecreatefromgif($file) : $image = imagecreatefromstring($string); break;\r\n\t\t\t case IMAGETYPE_PNG: $file !== null ? $image = imagecreatefrompng($file) : $image = imagecreatefromstring($string); break;\r\n\t\t\t default: return false;\r\n\t\t\t}\r\n\r\n\t\t\t# This is the resizing/resampling/transparency-preserving magic\r\n\t\t\t$image_resized = imagecreatetruecolor( $final_width, $final_height );\r\n\t\t\tif ( ($info[2] == IMAGETYPE_GIF) || ($info[2] == IMAGETYPE_PNG) ) {\r\n\t\t\t $transparency = imagecolortransparent($image);\r\n\t\t\t $palletsize = imagecolorstotal($image);\r\n\r\n\t\t\t if ($transparency >= 0 && $transparency < $palletsize) {\r\n\t\t\t\t$transparent_color = imagecolorsforindex($image, $transparency);\r\n\t\t\t\t$transparency = imagecolorallocate($image_resized, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']);\r\n\t\t\t\timagefill($image_resized, 0, 0, $transparency);\r\n\t\t\t\timagecolortransparent($image_resized, $transparency);\r\n\t\t\t }\r\n\t\t\t elseif ($info[2] == IMAGETYPE_PNG) {\r\n\t\t\t\timagealphablending($image_resized, false);\r\n\t\t\t\t$color = imagecolorallocatealpha($image_resized, 0, 0, 0, 127);\r\n\t\t\t\timagefill($image_resized, 0, 0, $color);\r\n\t\t\t\timagesavealpha($image_resized, true);\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t\timagecopyresampled($image_resized, $image, 0, 0, $cropWidth, $cropHeight, $final_width, $final_height, $width_old - 2 * $cropWidth, $height_old - 2 * $cropHeight);\r\n\r\n\t\t\t# Taking care of original, if needed\r\n\t\t\tif ( $delete_original ) {\r\n\t\t\t if ( $use_linux_commands ) exec('rm '.$file);\r\n\t\t\t else @unlink($file);\r\n\t\t\t}\r\n\r\n\t\t\t# Preparing a method of providing result\r\n\t\t\tswitch ( strtolower($output) ) {\r\n\t\t\t case 'browser':\r\n\t\t\t\t$mime = image_type_to_mime_type($info[2]);\r\n\t\t\t\theader(\"Content-type: $mime\");\r\n\t\t\t\t$output = NULL;\r\n\t\t\t break;\r\n\t\t\t case 'file':\r\n\t\t\t\t$output = $file;\r\n\t\t\t break;\r\n\t\t\t case 'return':\r\n\t\t\t\treturn $image_resized;\r\n\t\t\t break;\r\n\t\t\t default:\r\n\t\t\t break;\r\n\t\t\t}\r\n\r\n\t\t\t# Writing image according to type to the output destination and image quality\r\n\t\t\tswitch ( $info[2] ) {\r\n\t\t\t case IMAGETYPE_GIF: imagegif($image_resized, $output); break;\r\n\t\t\t case IMAGETYPE_JPEG: imagejpeg($image_resized, $output, $quality); break;\r\n\t\t\t case IMAGETYPE_PNG:\r\n\t\t\t\t$quality = 9 - (int)((0.9*$quality)/10.0);\r\n\t\t\t\timagepng($image_resized, $output, $quality);\r\n\t\t\t\tbreak;\r\n\t\t\t default: return false;\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t }", "title": "" }, { "docid": "b1432277ac3df51eeadd5a0e7e63c984", "score": "0.6261962", "text": "static private function createResizedImage($filename, $width, $height, $type)\n { \n // create image from file\n $image = self::createImage($filename, $type);\n\n if (!$image)\n return false;\n\n //calculate dimensions based on smallest size\n $new_width = $width < self::$resize_dim ? $width : self::$resize_dim;\n $new_height = $height < self::$resize_dim ? $height : self::$resize_dim;\n\n // create resampled image\n $new_image = imagecreatetruecolor($new_width, $new_height);\n\n if ($new_image === false)\n return false;\n\n if (imagecopyresampled($new_image, $image, 0, 0, 0, 0, $new_width,\n $new_height, $width, $height))\n return array($new_image, $new_width, $new_height);\n else\n return false;\n }", "title": "" }, { "docid": "8c01f0eb38101fd40a152ea6b8613b4b", "score": "0.62520367", "text": "function resize_img($newWidth, $targetFile, $originalFile) {\n\n $info = getimagesize($originalFile);\n $mime = $info['mime'];\n\n switch ($mime) {\n case 'image/jpeg':\n $image_create_func = 'imagecreatefromjpeg';\n $image_save_func = 'imagejpeg';\n $new_image_ext = 'jpg';\n break;\n\n case 'image/png':\n $image_create_func = 'imagecreatefrompng';\n $image_save_func = 'imagepng';\n $new_image_ext = 'png';\n break;\n\n case 'image/gif':\n $image_create_func = 'imagecreatefromgif';\n $image_save_func = 'imagegif';\n $new_image_ext = 'gif';\n break;\n\n default: \n throw new Exception('Unknown image type.');\n }\n\n $img = $image_create_func($originalFile);\n list($width, $height) = getimagesize($originalFile);\n\n $newHeight = ($height / $width) * $newWidth;\n $tmp = imagecreatetruecolor($newWidth, $newHeight);\n imagesavealpha($tmp, true);\n $trans_colour = imagecolorallocatealpha($tmp, 0, 0, 0, 127);\n imagefill($tmp, 0, 0, $trans_colour);\n\n imagecopyresampled($tmp, $img, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height);\n\n if (file_exists($targetFile)) {\n unlink($targetFile);\n }\n $image_save_func($tmp, $targetFile);\n}", "title": "" }, { "docid": "0877736766b925130966cbb302f469a6", "score": "0.6250542", "text": "function imgSize($f='',$h=0,$w=0,$s='',$m=''){\n\t//IMG_FILTER_NEGATE, IMG_FILTER_GRAYSCALE, IMG_FILTER_COLORIZE, \n\t//IMG_FILTER_EDGEDETECT, IMG_FILTER_EMBOSS, IMG_FILTER_GAUSSIAN_BLUR, \n\t//IMG_FILTER_SELECTIVE_BLUR, IMG_FILTER_MEAN_REMOVAL, IMG_FILTER_SMOOTH, IMG_FILTER_PIXELATE\n\t$file_name = $this->gvar($f,'f');\n\t$crop_height = $this->gvar($h,'h');\n\t$crop_width = $this->gvar($w,'w');\n\t$save_path = $this->gvar($s,'s');\n\t$mode = $this->gvar($m,'m');\n\t\n\t$oH = $crop_height;\n\t$oW = $crop_width;\n\t$isHv = ($crop_height == 0)?true:false;\n\t$isWv = ($crop_width == 0)?true:false;\n\t\n\t$original_image_size = getimagesize($file_name);\n\t$mime = $original_image_size['mime'];\n\t\n\t$original_width = $original_image_size[0];\n\t$original_height = $original_image_size[1];\n\t\n\t$crop_height = ($crop_height == 0)?($crop_width /$original_width)*$original_height:$crop_height;\n\t$crop_width = ($crop_width == 0)?($crop_height /$original_height)*$original_width:$crop_width;\n\t\n\tif($mime=='image/gif'){$original_image_gd = imagecreatefromgif($file_name);}\t\n\telseif($mime=='image/png'){$original_image_gd = imagecreatefrompng($file_name);}\n\telseif($mime=='image/bmp'){$original_image_gd = imagecreatefromwbmp($file_name);}\n\telseif($mime=='image/jpeg' ){$original_image_gd = imagecreatefromjpeg($file_name);}\n\telse{$original_image_gd = imagecreatefromgd($file_name);}\n\t\n\n\t$w_ratio = $original_width;\n\t$h_ratio = $original_height;\n\t$isWidth = false;$isHeight = false;\n\t\n\tif($original_width>$original_height ){\n\t \t$w_ratio = ($crop_height /$original_height)*$original_width;\n\t\t$h_ratio = $crop_height;\n\t\t$isWidth =($original_width>=$original_height)?true:false;\n\t}\n\t\n\t$new_canvas = imagecreatetruecolor($w_ratio,$h_ratio);\n\t\n\timagecopyresampled($new_canvas , $original_image_gd ,0,0,0,0, $w_ratio, $h_ratio, $original_width , $original_height );\n\t\n\t$cropped_image_gd = imagecreatetruecolor($crop_width, $crop_height);\n\t$white = imagecolorallocate($cropped_image_gd, 255, 255, 255);\n\timagefill($cropped_image_gd, 0, 0, $white);\n\t$wm = $w_ratio /$crop_width;$hm = $h_ratio /$crop_height;\n\t$h_height = $crop_height/2;\n\t$w_height = $crop_width/2;\n\t\n\tif($isWidth && $w_ratio>$crop_width){ \n\t $adjusted_width =$w_ratio / $hm;$half_width = $adjusted_width / 2;$int_width = $w_height - $half_width;\n\t imagecopyresampled($cropped_image_gd ,$new_canvas ,$int_width,0,0,0, $adjusted_width, $crop_height, $w_ratio , $h_ratio ); \n\t}else{\n\t $adjusted_height = $h_ratio / $wm;$half_height = $adjusted_height / 2;$int_height = $half_height - $h_height;\n\t imagecopyresampled($cropped_image_gd , $new_canvas ,0,0,0,0, $crop_width, $adjusted_height, $w_ratio , $h_ratio );\n\t}\n\t\n\tif($mode == 2){\n\t $opic = 'images/watermark.png';\n\t $opicSize = getimagesize($opic);\n\t $overlay_gd = imagecreatefrompng($opic);\n\t $newImg[0] = $crop_width/2;\n\t $newImg[1] = ceil(($newImg[0]/250)*75);\n\t imagecopyresampled($cropped_image_gd ,$overlay_gd , ($crop_width)/3,($crop_height)/3,0,0, $newImg[0], $newImg[1], $opicSize[0], $opicSize[1] );\n\t}\n\n\t//IMG_FILTER_SMOOTH\n\timagefilter($cropped_image_gd,IMG_FILTER_CONTRAST,-5);\n\timagefilter($cropped_image_gd,IMG_FILTER_BRIGHTNESS,2);\n\t//imagefilter($cropped_image_gd,IMG_FILTER_COLORIZE,0,0,10);\n\t//imagefilter($cropped_image_gd,IMG_FILTER_SMOOTH,3);\n\tif($mode==1) imagefilter($cropped_image_gd,IMG_FILTER_GRAYSCALE);\n\t//echo 'success';\n\tif($save_path == \"\"){\n\t header (\"Content-type: image/jpeg\");\n\t imagejpeg($cropped_image_gd,NULL,100);\n\t}else{\n\t header (\"Content-type: image/jpeg\");\n\t imagejpeg($cropped_image_gd,$save_path,100);\n\t}\n }", "title": "" }, { "docid": "b2c41777aa941372140269e4d985aa45", "score": "0.6242981", "text": "function resizeImage($originalImage, $outputImage, $quality, $desiredHeight, $desiredWidth)\n{ $exploded = explode('.',$originalImage);\n $ext = $exploded[count($exploded) - 1]; \n\n if (preg_match('/jpg|jpeg/i',$ext))\n $imageTmp=imagecreatefromjpeg($originalImage);\n else if (preg_match('/png/i',$ext))\n $imageTmp=imagecreatefrompng($originalImage);\n else if (preg_match('/gif/i',$ext))\n $imageTmp=imagecreatefromgif($originalImage);\n else if (preg_match('/bmp/i',$ext))\n $imageTmp=imagecreatefrombmp($originalImage);\n else\n return 0;\n\n $x = getimagesize($originalImage); \n $width = $x['0'];\n $height = $x['1'];\n $optimalDimensions = autoResize($width, $height, $desiredWidth, $desiredHeight);\n $rs_width = $optimalDimensions['optimalWidth'];\n $rs_height = $optimalDimensions['optimalHeight'];\n \n $img_base = imagecreatetruecolor($rs_width, $rs_height);\n imagecopyresampled($img_base, $imageTmp, 0, 0, 0, 0, $rs_width, $rs_height, $width, $height);\n\n // quality is a value from 0 (worst) to 100 (best)\n imagejpeg($img_base, $outputImage, $quality);\n imagedestroy($imageTmp);\n\n return 1;\n}", "title": "" }, { "docid": "dfaa3237a19fccafb99b8713dde05e7d", "score": "0.62412524", "text": "public function resizetheimage(){\n $path=$this->input->post('path');\n $w=$this->input->post('w');\n $h=$this->input->post('h');\n if (!isset($w) && !isset($h) && !isset($path) ) \n {\n echo (\"Error resizing \");\n $this->session->set_flashdata('msg', '<div class=\"alert alert-danger col-md-6\"> Error resizing !! <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button></div>');\n }else{\n $config['image_library'] = 'gd2';\n $config['source_image'] = 'assets/uploads/'.$path;\n $config['create_thumb'] = FALSE;\n $config['maintain_ratio'] = FALSE;\n $config['width'] = $w;\n $config['height'] = $h;\n \n $this->image_lib->clear();\n $this->image_lib->initialize($config);\n $this->image_lib->resize();\n $this->session->set_flashdata('msg', '<div class=\"alert alert-warning col-md-6\"> The image has bean resized <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button></div>');\n }\n \n }", "title": "" }, { "docid": "97b323b7c6c32ab91ff3d240ed1f6591", "score": "0.62367713", "text": "function process_image($db,$fileid,$bigsize) \n{\n global $USER, $system_settings;\n \n if (!$bigsize)\n $bigsize = 300;\n if (!$fileid)\n return false;\n $imagefile=file_path ($db,$fileid);\n if (!file_exists($imagefile)) {\n return false;\n }\n $bigthumb=$system_settings['thumbnaildir'].\"/big/$fileid.jpg\";\n $smallthumb=$system_settings['thumbnaildir'].\"/small/$fileid.jpg\";\n $smallsize=$system_settings['smallthumbsize'];\n $convert=$system_settings['convert'];\n\n // make big thumbnail and get image info\n if (extension_loaded('gd') || extension_loaded('gd2')) {\n //Get Image size info\n list($width_orig, $height_orig, $image_type) = getimagesize($imagefile);\n \n switch ($image_type)\n {\n case 1: $im = imagecreatefromgif($imagefile); break;\n case 2: $im = imagecreatefromjpeg($imagefile); break;\n case 3: $im = imagecreatefrompng($imagefile); break;\n default: ; break;\n } \n /*** calculate the aspect ratio ***/\n $aspect_ratio = (float) $height_orig / $width_orig;\n\n /*** calulate the thumbnail width based on the height ***/\n $thumb_height = round($bigsize * $aspect_ratio);\n\n $newImg = imagecreatetruecolor($bigsize, $thumb_height);\n imagecopyresampled($newImg, $im, 0, 0, 0, 0, $bigsize, $thumb_height, $width_orig, $height_orig);\n imagejpeg($newImg, $bigthumb);\n\n } else {\n $command = \"$convert -verbose -sample \".$bigsize.\"x\".$bigsize.\" $action \\\"$imagefile\\\" jpg:$bigthumb\";\n exec($command, $result_str_arr, $status);\n }\n\n // make small thumbnail\n if (extension_loaded('gd') || extension_loaded('gd2')) {\n //Get Image size info\n list($width_orig, $height_orig, $image_type) = getimagesize($imagefile);\n \n switch ($image_type)\n {\n case 1: $im = imagecreatefromgif($imagefile); break;\n case 2: $im = imagecreatefromjpeg($imagefile); break;\n case 3: $im = imagecreatefrompng($imagefile); break;\n default: ; break;\n } \n /*** calculate the aspect ratio ***/\n $aspect_ratio = (float) $height_orig / $width_orig;\n\n /*** calulate the thumbnail width based on the height ***/\n $thumb_height = round($smallsize * $aspect_ratio);\n\n $newImg = imagecreatetruecolor($smallsize, $thumb_height);\n imagecopyresampled($newImg, $im, 0, 0, 0, 0, $smallsize, $thumb_height, $width_orig, $height_orig);\n imagejpeg($newImg, $smallthumb);\n\n } else {\n $command = \"$convert -sample \".$smallsize.\"x\".$smallsize.\" $action \\\"$imagefile\\\" jpg:$smallthumb\";\n `$command`;\n }\n\n // get size, mime, and type from image file. \n // Try exif function, if that fails use convert \n $sizearray=getimagesize($imagefile);\n $width=$sizearray[0];\n if ($width) {\n $height=$sizearray[1];\n $mime=$sizearray['mime'];\n switch ($sizearray[2]) {\n case 1: $filename_extension='GIF'; break;\n case 2: $filename_extension='JPG'; break;\n case 3: $filename_extension='PNG'; break;\n case 4: $filename_extension='SWF'; break;\n case 5: $filename_extension='PSD'; break;\n case 6: $filename_extension='BMP'; break;\n case 7: $filename_extension='TIFF'; break;\n case 8: $filename_extension='TIFF'; break;\n case 9: $filename_extension='JPC'; break;\n case 10: $filename_extension='JP2'; break;\n case 11: $filename_extension='JPX'; break;\n case 12: $filename_extension='JB2'; break;\n case 13: $filename_extension='SWC'; break;\n case 14: $filename_extension='IFF'; break;\n }\n }\n else {\n // get filetype and size in pixels from convert. Take first token after filesize. Don't know if it always works.\n // appparently convert yields:\n // original filename, dimensions, Class, (optional) colordepht, size (in kb), filetype, ???, ???\n $convertresult[0] = strtok ($result_str_arr[0],\" \");\n $test = false;\n for ($i=1; $i<7; $i++) {\n $convertresult[$i] = strtok (\" \");\n if ($i == 1) \n $pixels = $convertresult[$i];\n if ($test) {\n $filename_extension = $convertresult[$i];\n $test = false; \n }\n if (substr ($convertresult[$i], -2) == 'kb')\n $test = true;\n }\n // extract pixel dimensions, this fails when there are spaces in the filename\n $width = (int) strtok ($pixels, 'x+= >');\n $height = (int) strtok ('x+= >');\n }\n\n if($mime) \n $db->Execute(\"UPDATE files SET mime='$mime' WHERE id=$fileid\");\n $r=$db->Execute(\"SELECT id FROM images WHERE id=$fileid\");\n\n if (!$r->fields[\"id\"]) \n $query=\"INSERT INTO images (id,x_size,y_size,xbt_size,ybt_size,xst_size,yst_size,type) VALUES ('$fileid', '$width', '$height', '$bigsize', '$bigsize', '$smallsize', '$smallsize', '$filename_extension')\";\n else \n $query=\"UPDATE images SET x_size='$width',y_size='$height',xbt_size='$bigsize',ybt_size='$bigsize',xst_size='$smallsize',yst_size='$smallsize',type='$filename_extension' WHERE id=$fileid\";\n $db->Execute($query);\n \n}", "title": "" }, { "docid": "669ffc95f1dc39034e52823f6d90cdea", "score": "0.62367666", "text": "public function resize($str_checksum, $item_id) {\n // This both gives fotomoto access to resizes regardless of permissions\n // and forces fotomoto to track images by unique id instead of file name\n // which is necessary for auto-pickup.\n\n // Load the photo from the provided id#. If invalid, display a 404 error.\n $item = ORM::factory(\"item\", $item_id);\n if (!$item->loaded()) {\n throw new Kohana_404_Exception();\n }\n\n // Make sure checksum matches, if not, throw a 404 error.\n if ($str_checksum != md5($item->created)) {\n throw new Kohana_404_Exception();\n }\n\n // If the resize file doesn't exist for some reason, display a 404 error.\n if (!file_exists($item->resize_path())) {\n throw new Kohana_404_Exception();\n }\n\n // Display the image.\n header(\"Content-Type: {$item->mime_type}\");\n Kohana::close_buffers(false);\n $fd = fopen($item->resize_path(), \"rb\");\n fpassthru($fd);\n fclose($fd);\n }", "title": "" }, { "docid": "589553015a66b361b97f325d8ca6e09a", "score": "0.6233148", "text": "function getImageSize($id, $subfolder=null){\n\n\t\t$image=$this->getImage($id,$subfolder);\n\t\tif(!empty($image)){\n\t\t\t$folder=Q3MEDIA_IMG_UPLOAD_FOLDER;\n\t\t\tif(!empty($subfolder)){\n\t\t\t\t$folder.=$subfolder.DS;\n\t\t\t}\n\t\t\tlist($imgWidth, $imgHeight, $type) = getimagesize($folder.$image);\n\t\t}\n\t\telse{\n\t\t\t$imgWidth=null;\n\t\t\t$imgHeight=null;\n\t\t}\n\n\t\treturn array($imgWidth,$imgHeight);\n\t}", "title": "" }, { "docid": "96cc09b8c94b4717ad51ff9a5418809e", "score": "0.62220603", "text": "function magic_thumbnails($post_id,$index,$resize=1,$target_width=100,$target_height=75,$overrides='',$html_attrs='') {\t\n\t$overrides = ''; // deprecated\n\t$html_attrs = ''; // deprecated\n\t$thumb = new magicThumbnail;\n\tif ($r = $thumb->generate_thumb($post_id,$index,$target_width,$target_height)) {\n\t\t$src = $r['resized']; $alt = $r['alt']; $title = $r['title']; $class = $r['class'];\n\t} else {\n\t\tglobal $wpdb;\n\t\t$find = $thumb->get_image_object($post_id,$index); $src = $find['src'];\n\t\t$query = \"SELECT ID FROM {$wpdb->posts} WHERE guid='$src'\";\n\t\t$id = $wpdb->get_var($query);\n\t\tif (!empty($id)) {\n\t\t\t$image = wp_get_attachment_image_src($id, array($target_width,$target_height));\n\t\t\t$src = $image[0];\n\t\t\t$alt = $find['alt'];\n\t\t\t$title = $find['title'];\n\t\t\t$class = $find['class'];\n\t\t} else {\n\t\t\t$default = plugins_url('default/default.jpg',__FILE__);\n\t\t\t$default = $thumb->resize_image_file($default,$target_width,$target_height,true);\n\t\t\t$src = $default['resized'];\n\t\t\t$alt = ''; $title = ''; $class = '';\n\t\t}\n\t}\n\t$tag = '<img src=\"'.$src.'\" class=\"'.$class.'\" width=\"'.$target_width.'\" height=\"'.$target_height.'\" alt=\"'.$alt.'\" title=\"'.$title.'\" />';\n\t$return = array('tag'=>$tag, 'src'=>$src);\n\t//print_r($return);\n\treturn $return;\n}", "title": "" }, { "docid": "a78ea2819e1ca31bf972d82ac3f2d38b", "score": "0.6220369", "text": "function auto_thumb($img,$width=null,$height=null,$add_to_thumb_filename='_THUMB_',$crop_image=true){\r\n\t// initialisation\r\n\t$DONT_RESIZE_THUMBS=true;\r\n\tglobal $auto_thumb;\r\n\tif (!$width){$width=$auto_thumb['default_width'];}\r\n\tif (!$height){$height=$auto_thumb['default_height'];}\r\n\r\n\t$recadrageX=0;$recadrageY=0;\r\n\t$motif='#\\.(jpe?g|png|gif)#i'; // Merci à JéromeJ pour la correction ! \r\n\t$rempl=$add_to_thumb_filename.'_'.$width.'x'.$height.'.$1';\r\n\t$thumb_name='thumbs/'.basename(preg_replace($motif,$rempl,$img));\r\n\t// sortie prématurée:\r\n\tif (!file_exists($img)){return 'auto_thumb ERROR: '.$img.' doesn\\'t exists';}\r\n\tif (file_exists($thumb_name)){return $thumb_name;} // miniature déjà créée\r\n\tif ($add_to_thumb_filename!='' && preg_match($add_to_thumb_filename,$img) && $DONT_RESIZE_THUMBS){return false;} // on cherche à traiter un fichier miniature (rangez un peu !)\r\n\r\n\t// redimensionnement en fonction du ratio\r\n\t$taille = getimagesize($img);\r\n\t$src_width=$taille[0];\r\n\t$src_height=$taille[1];\r\n\tif (!$crop_image){ \r\n\t\t// sans recadrage: on conserve les proportions\r\n\t\tif ($src_width<$src_height){\r\n\t\t\t// portrait\r\n\t\t\t$ratio=$src_height/$src_width;\r\n\t\t\t$width=$height/$ratio;\r\n\t\t}else if ($src_width>$src_height){\r\n\t\t\t// paysage\r\n\t\t\t$ratio=$src_width/$src_height;\r\n\t\t\t$height=$width/$ratio;\r\n\t\t}\r\n\t}else{\r\n\t\t// avec recadrage: on produit une image aux dimensions définies mais coupée\r\n\t\tif ($src_width<$src_height){\r\n\t\t\t// portrait\r\n\t\t\t$recadrageY=round(($src_height-$src_width)/2);\r\n\t\t\t$src_height=$src_width;\r\n\t\t}else if ($src_width>$src_height){\r\n\t\t\t// paysage\r\n\t\t\t$recadrageX=round(($src_width-$src_height)/2);\r\n\t\t\t$src_width=$src_height;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\r\n\t// en fonction de l'extension\r\n\t$fichier = pathinfo($img);\r\n\t$extension=str_ireplace('jpg','jpeg',$fichier['extension']);\r\n\t\r\n\t\r\n\t$fonction='imagecreatefrom'.$extension;\r\n\t$src = $fonction($img); // que c'est pratique ça ^^ !\r\n\t\r\n\t// création image\r\n\t$thumb = imagecreatetruecolor($width,$height);\r\n\t\r\n\t// gestion de la transparence \r\n\t// (voir fonction de Seebz: http://code.seebz.net/p/imagethumb/)\r\n\tif( $extension=='png' ){imagealphablending($thumb,false);imagesavealpha($thumb,true);}\r\n\tif( $extension=='gif' && @imagecolortransparent($img)>=0 ){\r\n\t\t$transparent_index = @imagecolortransparent($img);\r\n\t\t$transparent_color = @imagecolorsforindex($img, $transparent_index);\r\n\t\t$transparent_index = imagecolorallocate($thumb, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']);\r\n\t\timagefill($thumb, 0, 0, $transparent_index);\r\n\t\timagecolortransparent($thumb, $transparent_index);\r\n\t}\r\n\t\r\n\timagecopyresampled($thumb,$src,0,0,$recadrageX,$recadrageY,$width,$height,$src_width,$src_height);\r\n\timagepng($thumb, $thumb_name);\r\n\timagedestroy($thumb);\r\n\t\r\n\treturn $thumb_name;\r\n}", "title": "" }, { "docid": "26a6b7f8f092e45d2c4f5b24a65210db", "score": "0.6206621", "text": "function resizeImage($filename, $maxWidth, $maxHeight, $folder = '/thumb/', $quality = 100)\n{\n $filenameDestination = dirname($filename) . $folder . '/'; //sometimes is // but it works.\n //echo $filenameDestination;\n if (!is_dir($filenameDestination)) {\n echo $filenameDestination;\n mkdir($filenameDestination, 0777, true);\n }\n\n list($width, $height) = getimagesize($filename);\n\n $ratio = $width / $height; // width/height\n\n if ($width < $maxWidth && $height < $maxHeight) {\n // don't resize up - have to apply lanchos alg later ;)\n $maxWidth = $width;\n $maxHeight = $height;\n }\n\n $xRatio = $maxWidth / $width;\n $yRatio = $maxHeight / $height;\n\n if ($xRatio * $height < $maxHeight) { // Resize the image based on width\n $newheight = ceil($xRatio * $height);\n $newwidth = $maxWidth;\n } else { // Resize the image based on height\n $newwidth = ceil($yRatio * $width);\n $newheight = $maxHeight;\n }\n\n\n// if ($width > $height && $newheight < $height) {\n// $newheight = $height / ($width / $newwidth);\n// } elseif ($width < $height && $newwidth < $width) {\n// $newwidth = $width / ($height / $newheight);\n// } else {\n// $newwidth = $width;\n// $newheight = $height;\n// }\n $thumb = imagecreatetruecolor($newwidth, $newheight);\n $source = imagecreatefromjpeg($filename);\n imagecopyresampled($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);\n\n $destinationFilename = $filenameDestination . basename($filename);\n\n return imagejpeg($thumb, $destinationFilename, $quality);\n}", "title": "" }, { "docid": "9bc48d4890b6c97be85447a177b818c5", "score": "0.6192738", "text": "function zoom_pic($img,$width,$height,$directory='img/userfiles', $subdir=''){\n\t $dir=$_SERVER['DOCUMENT_ROOT'].$subdir.'/'.$directory.'/';\n\t $ret['width']=$width;\n\t $ret['height']=$height;\n\t $ret['top']=0;\n\t $ret['left']=0;\n\t\t\n\t\tif ($size=@getimagesize($dir.$img)) {\n\t\t\t$x_w=$size[0]-$width;\n\t\t\t$x_h=$size[1]-$height;\n\t\t\t\t \t\n\t if($x_w < $x_h){\n\t \t$ratio = $height / $size[1];\n\t\t\t\t$ret['width'] = intval($size[0] * $ratio);\n\t\t\t\t$ret['left'] = intval(($width - $ret['width']) / 2);\n\t }elseif($x_w > $x_h) {\n\t \t$ratio = $width / $size[0];\n\t \t$ret['height'] = intval($size[1] * $ratio);\n\t\t\t\t$ret['top'] = intval(($height - $ret['height']) / 2);\n\t }\n\t\t}\n\t \n\t return $ret; \n\t}", "title": "" }, { "docid": "20f099c10ca9c885b58ec5ffcc3910de", "score": "0.6191048", "text": "function make_thumb($src,$dest,$desired_width) {\n\t/* read the source image */\n\t$info = getimagesize($src);\n $mime = $info['mime'];\n\t$width = $info[0];\n\t$height = $info[1];\n\t/* find the \"desired height\" of this thumbnail, relative to the desired width */\n\t$desired_height = floor($height*($desired_width/$width));\n\t/* create a new, \"virtual\" image */\n\t$virtual_image = imagecreatetruecolor($desired_width,$desired_height);\n\t/* copy source image at a resized size */\n\t // APPENDED RESIZE CODE //\n switch ($mime) {\n case 'image/jpeg':\nimagealphablending($virtual_image, false);\nimagesavealpha($virtual_image, true);\t\t\t\n\t\t\t\n $image_create_func = 'imagecreatefromjpeg';\n $image_save_func = 'imagejpeg';\n $new_image_ext = 'jpg';\n break;\n\n case 'image/png':\t\nimagealphablending($virtual_image, false);\nimagesavealpha($virtual_image, true);\t\t\t\n\t\t\t\n $image_create_func = 'imagecreatefrompng';\n $image_save_func = 'imagepng';\n $new_image_ext = 'png';\n break;\n\n case 'image/gif':\nimagealphablending($virtual_image, false);\nimagesavealpha($virtual_image, true);\t\t\t\n \t $image_create_func = 'imagecreatefromgif';\n $image_save_func = 'imagegif';\n $new_image_ext = 'gif';\n break;\n\n default: \n throw Exception('Unknown image type.');\n }\n $img = $image_create_func($src);\n\n\timagecopyresampled($virtual_image,$img,0,0,0,0,$desired_width,$desired_height,$width,$height);\n \n $image_save_func($virtual_image, $dest);\n\t/* create the physical thumbnail image to its destination\n\timagejpeg($virtual_image,$dest); */\n}", "title": "" }, { "docid": "cd58165cc2bd8cb4358fc84d5eaf5bc7", "score": "0.61656463", "text": "function kvell_edge_resize_image($attach_id = null, $attach_url = null, $width = null, $height = null, $crop = true) {\n $return_array = array();\n\n //is attachment id empty?\n if (empty($attach_id) && $attach_url !== '') {\n //get attachment id from url\n $attach_id = kvell_edge_get_attachment_id_from_url($attach_url);\n }\n\n if (!empty($attach_id) && (isset($width) && isset($height))) {\n\n //get file path of the attachment\n $img_path = get_attached_file($attach_id);\n\n //get attachment url\n $img_url = wp_get_attachment_url($attach_id);\n\n //break down img path to array so we can use it's components in building thumbnail path\n $img_path_array = pathinfo($img_path);\n\n //build thumbnail path\n $new_img_path = $img_path_array['dirname'] . '/' . $img_path_array['filename'] . '-' . $width . 'x' . $height . '.' . $img_path_array['extension'];\n\n //build thumbnail url\n $new_img_url = str_replace($img_path_array['filename'], $img_path_array['filename'] . '-' . $width . 'x' . $height, $img_url);\n\n //check if thumbnail exists by it's path\n if (!file_exists($new_img_path)) {\n //get image manipulation object\n $image_object = wp_get_image_editor($img_path);\n\n if (!is_wp_error($image_object)) {\n //resize image and save it new to path\n $image_object->resize($width, $height, $crop);\n $image_object->save($new_img_path);\n\n //get sizes of newly created thumbnail.\n ///we don't use $width and $height because those might differ from end result based on $crop parameter\n $image_sizes = $image_object->get_size();\n\n $width = $image_sizes['width'];\n $height = $image_sizes['height'];\n }\n }\n\n //generate data to be returned\n $return_array = array(\n 'img_url' => $new_img_url,\n 'img_width' => $width,\n 'img_height' => $height\n );\n } //attachment wasn't found, probably because it comes from external source\n elseif ($attach_url !== '' && (isset($width) && isset($height))) {\n //generate data to be returned\n $return_array = array(\n 'img_url' => $attach_url,\n 'img_width' => $width,\n 'img_height' => $height\n );\n }\n\n return $return_array;\n }", "title": "" }, { "docid": "50539b656226eb98a6f71f2108280b9c", "score": "0.61606985", "text": "function resizeImage($resourceType,$image_width,$image_height) {\n $resizeWidth = 300;\n $resizeHeight = 300;\n $imageLayer = imagecreatetruecolor($resizeWidth,$resizeHeight);\n imagecopyresampled($imageLayer,$resourceType,0,0,0,0,$resizeWidth,$resizeHeight, $image_width,$image_height);\n return $imageLayer;\n }", "title": "" }, { "docid": "9daa3c406544dd9112383e7e9c660014", "score": "0.61605597", "text": "public function resizeOriginal($filename, $media_original_path, $thumb_dir, $post_id, $s3imagepath, $album_id = null) {\n //get image thumb width\n $thumb_width = $this->original_resize_image_width;\n $thumb_height = $this->original_resize_image_height;\n $path_to_thumbs_directory = $thumb_dir;\n $path_to_image_directory = $media_original_path;\n //$final_width_of_image = 200;\n /* if (preg_match('/[.](jpg)$/', $filename)) {\n $im = imagecreatefromjpeg($path_to_image_directory . $filename);\n } else if (preg_match('/[.](jpeg)$/', $filename)) {\n $im = imagecreatefromjpeg($path_to_image_directory . $filename);\n } else if (preg_match('/[.](gif)$/', $filename)) {\n $im = imagecreatefromgif($path_to_image_directory . $filename);\n } else if (preg_match('/[.](png)$/', $filename)) {\n $im = imagecreatefrompng($path_to_image_directory . $filename);\n } */\n //new code for getting the image.\n $image_data = file_get_contents($path_to_image_directory . $filename);\n $im = imagecreatefromstring($image_data);\n \n $ox = imagesx($im);\n $oy = imagesy($im);\n //check a image is less than defined size.. \n if ($ox > $thumb_width || $oy > $thumb_height) {\n //getting aspect ratio\n $original_aspect = $ox / $oy;\n $thumb_aspect = $thumb_width / $thumb_height;\n\n if ($original_aspect >= $thumb_aspect) {\n // If image is wider than thumbnail (in aspect ratio sense)\n $new_height = $thumb_height;\n $new_width = $ox / ($oy / $thumb_height);\n //check if new width is less than minimum width\n if ($new_width > $thumb_width) {\n $new_width = $thumb_width;\n $new_height = $oy / ($ox / $thumb_width);\n }\n } else {\n // If the thumbnail is wider than the image\n $new_width = $thumb_width;\n $new_height = $oy / ($ox / $thumb_width);\n //check if new height is less than minimum height\n if ($new_height > $thumb_height) {\n $new_height = $thumb_height;\n $new_width = $ox / ($oy / $thumb_height);\n }\n }\n $nx = $new_width;\n $ny = $new_height;\n } else {\n $nx = $ox;\n $ny = $oy;\n }\n\n $nm = imagecreatetruecolor($nx, $ny);\n //code for png start\n $background = imagecolorallocate($nm, 0, 0, 0);\n // removing the black from the placeholder\n imagecolortransparent($nm, $background);\n\n // turning off alpha blending (to ensure alpha channel information \n // is preserved, rather than removed (blending with the rest of the \n // image in the form of black))\n imagealphablending($nm, false);\n\n // turning on alpha channel information saving (to ensure the full range \n // of transparency is preserved)\n imagesavealpha($nm, true); \n //code for png end.\n imagecopyresized($nm, $im, 0, 0, 0, 0, $nx, $ny, $ox, $oy);\n if (!file_exists($path_to_thumbs_directory)) {\n if (!mkdir($path_to_thumbs_directory, 0777, true)) {\n die(\"THERE_WAS_A_PROBLEM_PLEASE_TRY_AGAIN\");\n }\n }\n //imagejpeg($nm, $path_to_thumbs_directory . $filename);\n if (preg_match('/[.](jpg)$/', $filename)) {\n imagejpeg($nm, $path_to_thumbs_directory . $filename, 75);\n } else if (preg_match('/[.](jpeg)$/', $filename)) {\n imagejpeg($nm, $path_to_thumbs_directory . $filename, 75);\n } else if (preg_match('/[.](gif)$/', $filename)) {\n imagegif($nm, $path_to_thumbs_directory . $filename, 75);\n } else if (preg_match('/[.](png)$/', $filename)) {\n imagepng($nm, $path_to_thumbs_directory . $filename, 9);\n }\n\n $s3imagepath = $s3imagepath;\n //check if album id is not null\n if ($album_id != \"\") {\n $s3imagepath = $s3imagepath . \"/\" . $album_id;\n }\n $image_local_path = $path_to_thumbs_directory . $filename;\n\n //upload on amazon\n $s3_image_path = $this->ImageS3UploadService($s3imagepath, $image_local_path, $filename);\n return $s3_image_path;\n }", "title": "" }, { "docid": "133444092a3b475e0f7da371a855280e", "score": "0.6156284", "text": "function auto_resize(){\r\n\t\tswitch ($this->config['scale_by']) {\r\n\t\t\tcase 'width':\r\n\t\t\t\t$this->resize_by_width($this->config['max_width']);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'height':\r\n\t\t\t\t$this->resize_by_height($this->config['max_height']);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'auto':\r\n\t\t\tdefault:\r\n\t\t\t\t//is it landscape or portrait image?\r\n\t\t\t\tif($this->img_width > $this->img_height){\r\n\t\t\t\t\t//it is landscape, resize by with\r\n\t\t\t\t\t$this->resize_by_width($this->config['max_width']);\r\n\t\t\t\t\tif($this->thumb_height > $this->config['max_height'])\r\n\t\t\t\t\t\t$this->resize_by_height($this->config['max_height']);\r\n\t\t\t\t}elseif($this->img_width < $this->img_height){\r\n\t\t\t\t\t//it is portrait, resize by height\r\n\t\t\t\t\t$this->resize_by_height($this->config['max_height']);\r\n\t\t\t\t\tif($this->thumb_width > $this->config['max_width'])\r\n\t\t\t\t\t\t$this->resize_by_width($this->config['max_width']);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//is a square\r\n\t\t\t\t\t$this->thumb_width = $this->config['max_width'];\r\n\t\t\t\t\t$this->thumb_height = $this->config['max_height'];\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6f2e3e3dbfea2e9dd1a82d83ef44457a", "score": "0.6155828", "text": "function rhd_image_sizes(){\n}", "title": "" }, { "docid": "bc216d4351fac1dae43cd0401af9e37b", "score": "0.6151324", "text": "function imageresize($source, $destination, $width = 0, $height = 0, $crop = false, $quality = 80) {\n $quality = $quality ? $quality : 80;\n $image = imagecreatefromstring($source);\n if ($image) {\n // Get dimensions\n $w = imagesx($image);\n $h = imagesy($image);\n //die(json_encode(array('width' => $w, 'height' => $h)));\n if (($width && $w > $width) || ($height && $h > $height)) {\n $ratio = $w / $h;\n if (($ratio >= 1 || $height == 0) && $width && !$crop) {\n $new_height = $width / $ratio;\n $new_width = $width;\n } elseif ($crop && $ratio <= ($width / $height)) {\n $new_height = $width / $ratio;\n $new_width = $width;\n } else {\n $new_width = $height * $ratio;\n $new_height = $height;\n }\n } else {\n $new_width = $w;\n $new_height = $h;\n }\n $x_mid = $new_width * .5; //horizontal middle\n $y_mid = $new_height * .5; //vertical middle\n // Resample\n // error_log('height: ' . $new_height . ' - width: ' . $new_width);\n $new = imagecreatetruecolor(floor($new_width), floor($new_height));\n $x = 0;\n if ($new_width > $new_height) {\n //$new_height = $new_height *8;\n } else {\n //$x = -$new_width * 7;\n //$new_width = $new_width *8;\n }\n imagecopyresampled($new, $image, 0, 0, $x, 0, $new_width, $new_height, $w, $h);\n // Crop\n if ($crop) {\n $crop = imagecreatetruecolor($width ? $width : $new_width, $height ? $height : $new_height);\n imagecopyresampled($crop, $new, 0, 0, ($x_mid - ($width * .5)), 0, $width, $height, $width, $height);\n //($y_mid - ($height * .5))\n }\n // Output\n // Enable interlancing [for progressive JPEG]\n imageinterlace($crop ? $crop : $new, true);\n\n $dext = strtolower(pathinfo($destination, PATHINFO_EXTENSION));\n if ($dext == '') {\n $dext = $ext;\n $destination .= '.' . $ext;\n }\n switch ($dext) {\n case 'jpeg':\n case 'jpg':\n imagejpeg($crop ? $crop : $new, $destination, $quality);\n break;\n case 'png':\n $pngQuality = ($quality - 100) / 11.111111;\n $pngQuality = round(abs($pngQuality));\n imagepng($crop ? $crop : $new, $destination, $pngQuality);\n break;\n case 'gif':\n imagegif($crop ? $crop : $new, $destination);\n break;\n }\n @imagedestroy($image);\n @imagedestroy($new);\n @imagedestroy($crop);\n }\n}", "title": "" }, { "docid": "eaf0e8f2939713b4408366968e89bf83", "score": "0.61494327", "text": "function BllCropImageInDifferentSizes()\n {\n\n if($_FILES['file']['name']!=\"\")\n {\n // *** Include the class\n include(\"resize-class.php\");\n // 1) Initialise / load image\n $resizeObj = new resize('StuffImages/'.$this->filename); //edited by sumit on 20-Nov-2010\n\n /*Size1 => w:30 h:30*/\n // 2) Resize image (options: exact, portrait, landscape, auto, crop)\n $resizeObj -> resizeImage(30, 30, 'crop');\n // 3) Save image\n $resizeObj -> saveImage('StuffImages/size1/'.str_replace('%','_',$this->filename), 100);\n\n //Size2 => w:60 h:30\n // 2) Resize image (options: exact, portrait, landscape, auto, crop)\n $resizeObj -> resizeImage(60, 30, 'crop');\n // 3) Save image\n $resizeObj -> saveImage('StuffImages/size2/'.str_replace('%','_',$this->filename), 100);\n\n //Size3 => w:30 h:60\n // 2) Resize image (options: exact, portrait, landscape, auto, crop)\n $resizeObj -> resizeImage(30, 60, 'crop');\n // 3) Save image\n $resizeObj -> saveImage('StuffImages/size3/'.str_replace('%','_',$this->filename), 100);\n\n //Size4 => w:60 h:60\n // 2) Resize image (options: exact, portrait, landscape, auto, crop)\n $resizeObj -> resizeImage(60, 60, 'crop');\n // 3) Save image\n $resizeObj -> saveImage('StuffImages/size4/'.str_replace('%','_',$this->filename), 100);\n\n //Size5 => w:120 h:120\n // 2) Resize image (options: exact, portrait, landscape, auto, crop)\n $resizeObj -> resizeImage(120, 120, 'crop');\n // 3) Save image\n $resizeObj -> saveImage('StuffImages/size5/'.str_replace('%','_',$this->filename), 100);\n\n //Size6 => w:250 h:210\n // 2) Resize image (options: exact, portrait, landscape, auto, crop)\n $resizeObj -> resizeImage(250, 210, 'auto');\n // 3) Save image\n $resizeObj -> saveImage('StuffImages/size6/'.str_replace('%','_',$this->filename), 100);\n }\n else\n {\n // *** Include the class\n include(\"resize-class.php\");\n // 1) Initialise / load image\n $resizeObj = new resize('StuffImages/'.$this->urlfilename,100);\n\n /*Size1 => w:30 h:30*/\n // 2) Resize image (options: exact, portrait, landscape, auto, crop)\n $resizeObj -> resizeImage(30, 30, 'crop');\n // 3) Save image\n $resizeObj -> saveImage('StuffImages/size1/'.str_replace('%','_',$this->urlfilename), 100);\n\n //Size2 => w:60 h:30\n // 2) Resize image (options: exact, portrait, landscape, auto, crop)\n $resizeObj -> resizeImage(60, 30, 'crop');\n // 3) Save image\n $resizeObj -> saveImage('StuffImages/size2/'.str_replace('%','_',$this->urlfilename), 100);\n\n //Size3 => w:30 h:60\n // 2) Resize image (options: exact, portrait, landscape, auto, crop)\n $resizeObj -> resizeImage(30, 60, 'crop');\n // 3) Save image\n $resizeObj -> saveImage('StuffImages/size3/'.str_replace('%','_',$this->urlfilename), 100);\n\n //Size4 => w:60 h:60\n // 2) Resize image (options: exact, portrait, landscape, auto, crop)\n $resizeObj -> resizeImage(60, 60, 'crop');\n // 3) Save image\n $resizeObj -> saveImage('StuffImages/size4/'.str_replace('%','_',$this->urlfilename), 100);\n\n //Size5 => w:120 h:120\n // 2) Resize image (options: exact, portrait, landscape, auto, crop)\n $resizeObj -> resizeImage(120, 120, 'crop');\n // 3) Save image\n $resizeObj -> saveImage('StuffImages/size5/'.str_replace('%','_',$this->urlfilename), 100);\n\n //Size6 => w:250 h:210\n // 2) Resize image (options: exact, portrait, landscape, auto, crop)\n $resizeObj -> resizeImage(250, 210, 'auto');\n // 3) Save image\n $resizeObj -> saveImage('StuffImages/size6/'.str_replace('%','_',$this->urlfilename), 100);\n }\n\n }", "title": "" }, { "docid": "f57ddde25b0a1b1222cf8112fe939d99", "score": "0.6147563", "text": "function resizeImage($originalImage,$toWidth,$toHeight){\n\tlist($width, $height) = getimagesize($originalImage);\n\t$xscale=$width/$toWidth;\n\t$yscale=$height/$toHeight;\n\n\t // Recalculate new size with default ratio\n if ($yscale>$xscale){\n $new_width = round($width * (1/$yscale));\n $new_height = round($height * (1/$yscale));\n }\n else {\n $new_width = round($width * (1/$xscale));\n $new_height = round($height * (1/$xscale));\n }\n\n\t// Resize the original image\n $imageResized = imagecreatetruecolor($new_width, $new_height);\n $imageTmp = imagecreatefromjpeg ($originalImage);\n imagecopyresampled($imageResized, $imageTmp, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n\n\treturn $imageResized;\n}", "title": "" }, { "docid": "9b209536a9aed248e967d555e1fbc140", "score": "0.6147461", "text": "public function resize_thumbnail_image($thumb_image_name, $image, $width, $height, $startx, $starty, $scale)\n {\n list($imagewidth, $imageheight, $imageType) = getimagesize($image);\n $imageType = image_type_to_mime_type($imageType);\n\n // get base image width\n \t$site_width=$this->width;\n\n // get the original image width\n \t// see imagewidth\n\n // get the ratio between\n \t$ratio=$imagewidth/$site_width;\n\n // multiply by the ratio to set the cropped area values appropriately\n \t$width=floor($width*$ratio);\n \t$height=floor($height*$ratio);\n \t$startx=floor($startx*$ratio);\n \t$starty=floor($starty*$ratio);\n\n $newImageWidth = ceil($width * $scale);\n $newImageHeight = ceil($height * $scale);\n\n $newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n switch($imageType)\n {\n case \"image/gif\":\n $source=imagecreatefromgif($image);\n break;\n case \"image/pjpeg\":\n case \"image/jpeg\":\n case \"image/jpg\":\n $source=imagecreatefromjpeg($image);\n break;\n case \"image/png\":\n case \"image/x-png\":\n $source=imagecreatefrompng($image);\n break;\n }\n imagecopyresampled($newImage,$source,0,0,$startx,$starty,$newImageWidth,$newImageHeight,$width,$height);\n switch($imageType)\n {\n case \"image/gif\":\n imagegif($newImage,$thumb_image_name);\n break;\n case \"image/pjpeg\":\n case \"image/jpeg\":\n case \"image/jpg\":\n imagejpeg($newImage,$thumb_image_name,90);\n break;\n case \"image/png\":\n case \"image/x-png\":\n imagepng($newImage,$thumb_image_name);\n break;\n }\n chmod($thumb_image_name, 0777);\n imagedestroy($newImage);\n return $thumb_image_name;\n }", "title": "" }, { "docid": "5e48e553b0f5ef95b26ec3f4eaabe6a0", "score": "0.61433214", "text": "function resize($name,$filename,$width,$height)\r\n{\r\n\tglobal $gd2;\r\n\t$system=explode(\".\",$name);\r\n\t$img_ext=strrchr($name, \".\");\r\n\tif (preg_match(\"/(jpg)/i\",$img_ext)){\r\n\t\t$src_img=imagecreatefromjpeg($name);\r\n\t} else\tif (preg_match(\"/(jpeg)/i\",$img_ext)){\r\n\t\t$src_img=imagecreatefromjpeg($name);\r\n\t}else if (preg_match(\"/png/i\",$img_ext)){\r\n\t\t$src_img=imagecreatefrompng($name);\r\n\t}else if (preg_match(\"/gif/i\",$img_ext)){\r\n\t\t$src_img=imagecreatefromgif($name);\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn \"default.jpg\";\r\n\t}\r\n\t$new_w = \"\";\r\n\t$new_h = \"\";\r\n\t$w=imageSX($src_img);\r\n $h=imageSY($src_img);\r\n\t$tx = $w;\r\n\t$ty = $h;\r\n\t$Ratio=$tx/$ty;\r\n\twhile ($tx>$width || $ty > $height)\r\n\t{\r\n\t\t$tx=$tx-1;\r\n\t\t$ty = $tx/$Ratio;\r\n\t}\r\n\t$new_w=$tx;\r\n $new_h=$ty;\r\n\tif ($gd2==\"\"){\r\n\t\t$dst_img=ImageCreate($new_w,$new_h);\r\n\t\timagecopyresized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imageSX($src_img),imageSY($src_img)); \r\n\t}else{\r\n\t\t$dst_img=ImageCreateTrueColor($new_w,$new_h);\r\n\t\timagecopyresampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imageSX($src_img),imageSY($src_img)); \r\n\t}\r\n\tif (preg_match(\"/png/i\",$img_ext)){\r\n\t\timagepng($dst_img,$filename); \r\n\t} else if (preg_match(\"/jpeg/i\",$img_ext)){\r\n\t\timagejpeg($dst_img,$filename); \r\n\t}else if (preg_match(\"/jpg/i\",$img_ext)){\r\n\t\timagejpeg($dst_img,$filename); \r\n\t}else if (preg_match(\"/gif/i\",$img_ext)){\r\n\t\timagegif($dst_img,$filename); \r\n\t}\r\n\timagedestroy($dst_img); \r\n\timagedestroy($src_img); \r\n\treturn($filename);\r\n}", "title": "" }, { "docid": "41fd97dd3bc27fb3bc2c122bfc08b722", "score": "0.6140412", "text": "private function resize()\n {\n //se eh um tipo aceito\n if (array_key_exists($this->type['extension'], $this->types)) {\n $this->setSizes();\n //cria o arquivo de destino de referencia\n $dst = imagecreatetruecolor($this->t['new_w'], $this->t['new_h']);\n // cria uma copia da imagem\n $src = $this->types[$this->type['extension']]['make']($this->path . $this->file);\n // redimensiona a copia\n imagecopyresampled($dst, $src, 0, 0, 0, 0, $this->t['new_w'], $this->t['new_h'], $this->t['old_w'], $this->t['old_h']);\n // salva a nova imagem no caminho correto\n $this->types[$this->type['extension']]['save']($dst, $this->path. $this->file); \n //apaga o destino de referencia\n imagedestroy($dst);\n }\n }", "title": "" }, { "docid": "61697333ad400004e094a9617e36ea42", "score": "0.6135649", "text": "public function resize(int $id, string $type): void;", "title": "" }, { "docid": "1b58ee5c0ba139a05fc627e2bb08896f", "score": "0.6122219", "text": "function thumbnailImage(){\r\nglobal $THUMBNAIL_FOLDER, $THUMBNAIL_WIDTH, $LARGE_THUMBNAIL_WIDTH, $THUMBNAIL_HEIGHT, $LARGE_THUMBNAIL_HEIGHT, $rootpath, $quality, $imageFontSize, $basedir, $info;\r\n\r\n\tif ( !is_dir($rootpath.'/'.$info.'/'.$THUMBNAIL_FOLDER.'/') ){\r\n\t\t\tmkdir($rootpath.'/'.$info.'/'.$THUMBNAIL_FOLDER.'/', 0777);}\r\n\r\n\t\t$image = $_GET['img'];\r\n\t\t$sizeType = $_GET['size'];\r\n\t\t\r\n\t\tif (!$image) return;\r\n\t\t\r\n\t\tif ($sizeType == 'large'){\r\n\t\t$THUMBNAIL_WIDTH = $LARGE_THUMBNAIL_WIDTH;\r\n\t\t$THUMBNAIL_HEIGHT = $LARGE_THUMBNAIL_HEIGHT;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$imagecache = $THUMBNAIL_FOLDER . \"/\" . md5($sizeType.$image) . \".jpg\";\r\n\t\t\r\n\t\t$im = @imagecreatefromjpeg( $imagecache );\r\n\t\t\r\n\t\tif ( $im )\r\n\t\t{\r\n\t\t\theader(\"Content-type: image/jpg\");\r\n\t\t\timagejpeg($im);\t\t\t\t\t\t\t\r\n\t\t\timagedestroy($im);\t\t\t\t\t\t\t\t\t\r\n\t\t\texit();\r\n\t\t}\r\n\t\t\r\n\t\t$imgsize = getimagesize ( $image );\r\n\t\t\r\n\t\t// If i forgot to take this out before releasing it then feel free to delete this.\r\n\t\t$imgsize = basename($image) == \"huge.jpg\" ? \"poop\" : $imgsize;\r\n\t\t\r\n\t\tswitch ($imgsize[2]) \r\n\t\t{\r\n\t \t\tcase 1: // GIF\r\n\t \t\t$im \t= imagecreatefromgif( $image );\r\n\t \t\tbreak;\r\n\t \t\tcase 2: // JPG\r\n\t \t\t$im \t= imagecreatefromjpeg( $image );\r\n\t \t\tbreak;\r\n\t \t\tcase 3: // PNG\r\n\t \t\t$im \t= imagecreatefrompng( $image );\r\n\t \t\tbreak;\r\n\t \tdefault: // UNKNOWM!\r\n\t\t\timageCenterString( $THUMBNAIL_WIDTH, $THUMBNAIL_HEIGHT, basename($image), $imageFontSize );\r\n\t\t\t\texit();\r\n\t\t\t}\r\n\t\t\r\n\t\theader(\"Content-type: image/jpg\");\r\n\r\n\t\t$img_thumb = imagecreatetruecolor( $THUMBNAIL_WIDTH, $THUMBNAIL_HEIGHT );\r\n\t\t\r\n\t\t$dsth = ($THUMBNAIL_WIDTH / ImageSX($im)) * ImageSY($im);\r\n\t\t\r\n\t\timagecopyresampled( $img_thumb, $im, 0,($THUMBNAIL_HEIGHT-$dsth)/2, 0,0, $THUMBNAIL_WIDTH, $dsth, ImageSX($im), ImageSY($im) );\r\n\t\t\r\n\t\timagejpeg( $img_thumb );\r\n\t\t\r\n\t\t// This will fail if you haven't created and chmodded your thumbnails folder\r\n\t\t@imagejpeg( $img_thumb, $imagecache, $quality );\r\n\t\t\r\n\t\timagedestroy( $img_thumb );\r\n\t\timagedestroy( $im );\r\n\t\texit();\r\n\t\t}", "title": "" }, { "docid": "db7a0d4194085e08c4cb02b1607ba21c", "score": "0.61193836", "text": "function resizeImage($target, $newcopy, $w, $h, $ext) {\n list($w_orig, $h_orig) = getimagesize($target);\n $scale_ratio = $w_orig / $h_orig;\n if (($w / $h) > $scale_ratio) {\n $w = $h * $scale_ratio;\n } else {\n $h = $w / $scale_ratio;\n }\n $img = \"\";\n $ext = strtolower($ext);\n if ($ext == \"gif\"){ \n $img = imagecreatefromgif($target);\n } else if($ext ==\"png\"){ \n $img = imagecreatefrompng($target);\n } else { \n $img = imagecreatefromjpeg($target);\n }\n $tci = imagecreatetruecolor($w, $h);\n // imagecopyresampled(dst_img, src_img, dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h)\n imagecopyresampled($tci, $img, 0, 0, 0, 0, $w, $h, $w_orig, $h_orig);\n imagejpeg($tci, $newcopy, 80);\n}", "title": "" }, { "docid": "54fa4a31d0715c1c636db088e2e31f2a", "score": "0.61114764", "text": "private function getResizeImage($size,$img) {\n $imagick = new Imagick(realpath('/home/archita/Documents/MyDocs/codes/assignment/'.$img));\n $imagick->resizeimage($size,$size,imagick::FILTER_POINT,1, false);\n return $imagick->getimageblob();\n }", "title": "" }, { "docid": "75338af213180d71d4c828e1c20a3f71", "score": "0.611078", "text": "public function resize_upload_img($param)\n {\n /*\n $param variable=array(\n \"width\"=>100,\n \"height\"=>100,\n \"img_url\"=>$_FILES[\"filename\"][\"tmp_name\"][0],\n \"img_upload_location\"=>\"\"\n )\n\n */\n\n //images tmp_name\n $img_name=$param[\"img_url\"];\n\n //Get all the information about the Image\n $img_info=getimagesize($param[\"img_url\"]);\n\n //Image's Original width & height\n $original_width=$img_info[0];\n $original_height=$img_info[1];\n \n // width & height given while calling the function\n $resized_width=$param[\"width\"];\n $resized_height=$param[\"height\"];\n \n //Get the location where the img has to be uploaded\n $img_upload_location=$param[\"img_upload_location\"];\n\n //First create a blank black image\n $blank_img=imagecreatetruecolor($resized_width,$resized_height);\n \n if($img_info[\"mime\"] == \"image/jpeg\"){\n\n $src_img=imagecreatefromjpeg($img_name);\n\n }elseif($img_info[\"mime\"] == \"image/png\"){\n\n $src_img=imagecreatefrompng($img_name);\n }\n\n imagecopyresized($blank_img, $src_img, 0,0,0,0, $resized_width, $resized_height, $original_width, $original_height);\n \n if($img_info[\"mime\"] == \"image/jpeg\"){\n\n return imagejpeg($blank_img, $img_upload_location, 90);\n\n }elseif($img_info[\"mime\"] == \"image/png\"){\n\n return imagepng($blank_img, $img_upload_location, 90);\n\n }\n }", "title": "" }, { "docid": "b807e71cc15eed280e22674d595e4b2f", "score": "0.6108662", "text": "abstract protected function processResize($srcFilename, $dstFilename, $fullWidth, $fullHeight, $finalWidth, $finalHeight);", "title": "" }, { "docid": "df21e44d47ff4fff138afe36baac934f", "score": "0.61056733", "text": "function thumb($id,$wh=\"200x115\",$crop = false) # landscape shape\n\t{\n\t\textract($this->vars());\n\n\t\t# with $crop off, it's perfect.\n\n\t\t$image = $this->{$this->modelClass}->read(null, $id);\n\t\t# IF NOT FOUND, MIGHT BE WRONG SITE/RESCUE...\n\n\t\t$whparts = split(\"x\", $wh);\n\t\tif(empty($whparts[1])) { $whparts[1] = $whparts[0]; } # 300 => 300x300\n\t\tlist($w,$h) = $whparts;\n\n\t\tif(!empty($image[$this->modelClass]['crop_w']))\n\t\t{\n\t\t\t$this->Image->coords(\n\t\t\t\t$image[$this->modelClass]['crop_x'],\n\t\t\t\t$image[$this->modelClass]['crop_y'],\n\t\t\t\t$image[$this->modelClass]['crop_w'],\n\t\t\t\t$image[$this->modelClass]['crop_h']\n\t\t\t);\n\t\t}\n\n\t\treturn $this->Image->render($image[$this->modelClass], $w,$h, $crop);\n\t}", "title": "" }, { "docid": "b7e5e586094972594f279957fc823712", "score": "0.6101789", "text": "function ShowImage($img = NULL, $size = NULL, $quality = NULL, $wtm = NULL, $parameters = NULL)\n {\n $size_auto = NULL;\n $size_width = NULL;\n $size_height = NULL;\n if ( strstr($size,'size_auto') ) $size_auto = substr( $size, strrpos($size,'=')+1, strlen($size) );\n if ( strstr($size,'size_width') ) $size_width = substr( $size, strrpos($size,'=')+1, strlen($size) );\n if ( strstr($size,'size_height') ) $size_height = substr( $size, strrpos($size,'=')+1, strlen($size) );\n\n if (empty($quality)) $quality=100;\n\n $img_with_path = Dealer_Img_Path.$img;\n $img_full_path = Dealer_Img_Full_Path.$img;\n\n //$img_full_path = Spr_Img_Path.$spr.'/'.$img_with_path; // like z:/home/speakers/www/uploads/45/R1800TII_big.jpg\n //echo '<br> $img_full_path='.$img_full_path.'<br> $size_auto='.$size_auto;\n if ( !file_exists($img_full_path) ) return false;\n\n $thumb = new Thumbnail($img_full_path);\n\n if ( !empty($size_width ) and empty($size_height) ) $thumb->size_width($size_width);\n if ( !empty($size_height) and empty($size_width) ) $thumb->size_height($size_height);\n if ( !empty($size_width) and !empty($size_height) ) $thumb->size($size_width,$size_height);\n if ( !$size_width and !$size_height and $size_auto ) $thumb->size_auto($size_auto);\t\t // [OPTIONAL] set the biggest width and height for thumbnail\n\n $thumb->quality=$quality; //default 75 , only for JPG format\n //echo '<br>$wtm='.$wtm;\n if ( $wtm == 'img' ) {\n $thumb->img_watermark = SITE_PATH.'/images/design/m01.png';\t // [OPTIONAL] set watermark source file, only PNG format [RECOMENDED ONLY WITH GD 2 ]\n $thumb->img_watermark_Valing='CENTER'; \t // [OPTIONAL] set watermark vertical position, TOP | CENTER | BOTTOM\n $thumb->img_watermark_Haling='CENTER'; \t // [OPTIONAL] set watermark horizonatal position, LEFT | CENTER | RIGHT\n }\n if ( $wtm == 'txt' ) {\n if ( defined('WATERMARK_TEXT') ) $thumb->txt_watermark=SPR_WATERMARK_TEXT;\t // [OPTIONAL] set watermark text [RECOMENDED ONLY WITH GD 2 ]\n else $thumb->txt_watermark='';\n $thumb->txt_watermark_color='000000';\t // [OPTIONAL] set watermark text color , RGB Hexadecimal[RECOMENDED ONLY WITH GD 2 ]\n $thumb->txt_watermark_font=5;\t // [OPTIONAL] set watermark text font: 1,2,3,4,5\n $thumb->txt_watermark_Valing='TOP'; \t // [OPTIONAL] set watermark text vertical position, TOP | CENTER | BOTTOM\n $thumb->txt_watermark_Haling='LEFT'; // [OPTIONAL] set watermark text horizonatal position, LEFT | CENTER | RIGHT\n $thumb->txt_watermark_Hmargin=10; // [OPTIONAL] set watermark text horizonatal margin in pixels\n $thumb->txt_watermark_Vmargin=10; // [OPTIONAL] set watermark text vertical margin in pixels\n }\n\n $thumb->process(); \t// generate image\n\n //make new image like R1800TII_big.jpg -> R1800TII_big_autozoom_100x84.jpg\n $mas_img_name=explode(\".\",$img_with_path);\n $img_name_new = $mas_img_name[0].SPR_ADDITIONAL_FILES_TEXT.intval($thumb->img['x_thumb']).'x'.intval($thumb->img['y_thumb']).'.'.$mas_img_name[1];\n $img_src = $img_name_new;\n $img_full_path_new = SITE_PATH.$img_name_new;\n $uploaddir = SITE_PATH.substr($img_with_path, 0, strrpos($img_with_path,'/')).'/';\n\n\n $alt = $this->GetImgTitle( $img);\n $title = $this->GetImgTitle( $img);\n //echo '<br>$img_name_new='.$img_name_new;\n //echo '<br>$img_full_path_new='.$img_full_path_new;\n //echo '<br>$img_src='.$img_src;\n if ( !strstr($parameters, 'alt') ) $parameters = $parameters.' alt=\"'.$alt.'\"';\n if ( !strstr($parameters, 'title') ) $parameters = $parameters.' title=\" '.$title.' \"';\n\n if ( !file_exists($img_full_path_new) ){\n //echo '<br>$uploaddir='.$uploaddir.'<br>$img_full_path_new='.$img_full_path_new;\n chmod($uploaddir,0777);\n $thumb->save($img_full_path_new);\n chmod($uploaddir,0755);\n $params = \"img=$img&amp;$size&amp;quality=$quality\";\n //echo '<br> $params='.$params;\n\n /*?><img src=\"http://<?=NAME_SERVER.Dealer_Path;?>thumb_dealer.php?<?=$params;?>\" <?=$parameters;?> ><?*/\n ?><img src=\"<?=$img_src;?>\" <?=$parameters?>><?\n }\n else {\n ?><img src=\"<?=$img_src;?>\" <?=$parameters?>><?\n }\n return;\n }", "title": "" }, { "docid": "eb071709e424edef4856b68cc7d925e2", "score": "0.6096919", "text": "function image_thumb($file_path = NULL, $width = 100, $height = 100, $crop = FALSE, $master_dim = 'auto', $overwrite = FALSE)\n{\n\t// Get CI instance\n\t$ci =& get_instance();\n\t\n\tif (is_file($file_path)) :\n\t\t// Calculate aspect ratios\n\t\t$image_size = getimagesize($file_path);\n\t\t\n\t\t// Get folder path and file name\n\t\t$folder \t= explode(\"/\", $file_path);\n\t\t$file_name \t= array_pop($folder);\n\t\t$folder \t= implode(\"/\", $folder);\n\t\t\n\t\t$thumb_folder \t= $folder.'/'.$width.'x'.$height;\n\t\tif ($crop) \t$thumb_folder = $thumb_folder.'_cropped/';\n\t\telse \t\t$thumb_folder = $thumb_folder.'/';\n\t\t$new_file_path \t= $thumb_folder.$file_name;\n\t\t\n\t\t// Create folder for thumbs\n\t\tif ( ! is_dir($thumb_folder)) :\n\t\t\t@mkdir($thumb_folder, 0777);\n\t\t\t@chmod($thumb_folder, 0777);\n\t\tendif;\n\t\t\n\t\t//echo $file_path, '<br />';\n\t\t//echo $new_file_path, '<br /><br />';\n\t\t\n\t\t// Resize only if image doesn't already exists\n\t\tif ( ! is_file($new_file_path) || $overwrite) :\n\t\t\t// If dimmensions are square\n\t\t\tif ($width == $height) :\n\t\t\t\t$ci->image_resize->squareThumb(FCPATH.$file_path, FCPATH.$new_file_path, $width);\n\t\t\telse :\n\t\t\t\t$ci->image_resize->resize(FCPATH.$file_path, $width, $height, FCPATH.$new_file_path, true);\n\t\t\tendif;\n\t\tendif;\n\t\t\n\t\treturn site_url($new_file_path);\n\tendif;\n\t\n}", "title": "" }, { "docid": "f2c391b0bda280e8b629da3b9f97a408", "score": "0.60862833", "text": "function resizeForFrontpage($filename)\n\t{\n\t\t$file_type = $this->getFileType($this->prefix.$filename);\n\t\t\n\t\tif (!$file_type || $file_type != 'image')\n\t\t\treturn array('success'=>false, 'error'=>\"This file doesn't exist or isn't an image\");\n\t\t\n\t\t$this->load->library('image_lib');\n\t\t\n\t\tlist($width, $height) = getimagesize($this->prefix.$filename);\n\t\t$current_ratio = $width/$height;\n\t\t$target_width = 700;\n\t\t$target_height = 399;\n\t\t$target_ratio = $target_width/$target_height;\n\t\t$config['source_image'] = $this->prefix.$filename;\n\t\t\n\t\tif ($current_ratio > $target_ratio)\n\t\t{\n\t\t\t//resize first to height, maintain ratio\n\t\t\t$config['height'] = $target_height;\n\t\t\t$config['width'] = $target_height * $current_ratio;\n\t\t\t$this->image_lib->initialize($config);\n\t\t\t\n\t\t\tif (!$this->image_lib->resize())\n\t\t\t\treturn array('success'=>false, 'error'=>\"There was an error while resizing this image\");\n\t\t\t\n\t\t\t//then crop off width\n\t\t\t$config['width'] = $target_width;\n\t\t\t$config['maintain_ratio'] = false;\n\t\t\t$this->image_lib->initialize($config);\n\t\t\t\n\t\t\tif ($this->image_lib->crop())\n\t\t\t\treturn array('success'=>true);\n\t\t\telse\n\t\t\t\treturn array('success'=>false, 'error'=>\"There was an error while cropping this image\");\n\t\t}\n\t\telse if ($current_ratio < $target_ratio)\n\t\t{\n\t\t\t//resize first to width, maintain ratio\n\t\t\t$config['width'] = $target_width;\n\t\t\t$config['height'] = $target_width / $current_ratio;\n\t\t\t$this->image_lib->initialize($config);\n\t\t\t\n\t\t\tif (!$this->image_lib->resize())\n\t\t\t\treturn array('success'=>false, 'error'=>\"There was an error while resizing this image\");\n\t\t\t\n\t\t\t//then crop off height\n\t\t\t$config['height'] = $target_height;\n\t\t\t$config['maintain_ratio'] = false;\n\t\t\t$this->image_lib->initialize($config);\n\t\t\t\n\t\t\tif ($this->image_lib->crop())\n\t\t\t\treturn array('success'=>true);\n\t\t\telse\n\t\t\t\treturn array('success'=>false, 'error'=>\"There was an error while cropping this image\");\n\t\t}\n\t\telse {\n\t\t\t$config['width'] = $target_width;\n\t\t\t$config['height'] = $target_height;\n\t\t\t$this->image_lib->initialize($config);\n\t\t\t\n\t\t\tif ($this->image_lib->resize())\n\t\t\t\treturn array('success'=>true);\n\t\t\telse\n\t\t\t\treturn array('success'=>false, 'error'=>\"There was an error while resizing this image\");\n\t\t}\n\t}", "title": "" }, { "docid": "92bc5c2e541dfc110a5340efe590418e", "score": "0.6084773", "text": "function thumb($file, $save, $width, $height, $ratioby)\n\t{\n\t\t//GD-Lib > 2.0 only!\n\t\t@unlink($save);\n\n\t\t//get sizes else stop\n\t\tif (!$infos = @getimagesize($file)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// keep proportions\n\t\t$iWidth = $infos[0];\n\t\t$iHeight = $infos[1];\n\t\t$iRatioW = $width / $iWidth;\n\t\t$iRatioH = $height / $iHeight;\n\n\t\tswitch($ratioby)\n\t\t{\n\t\t\tcase 1:\t\t\t\t\n\t\t\t\t$iNewW = $iWidth * $iRatioW;\n\t\t\t\t$iNewH = $iHeight * $iRatioW;\n\t\t\t\tbreak;\n\t\t\tcase 2:\t\t\t\t\n\t\t\t\t$iNewW = $iWidth * $iRatioH;\n\t\t\t\t$iNewH = $iHeight * $iRatioH;\n\t\t\t\tbreak;\n\t\t\tdefault:\t\t\t\n\t\t\t\tif ($iRatioW < $iRatioH) {\n\t\t\t\t\t$iNewW = $iWidth * $iRatioW;\n\t\t\t\t\t$iNewH = $iHeight * $iRatioW;\n\t\t\t\t} else {\n\t\t\t\t\t$iNewW = $iWidth * $iRatioH;\n\t\t\t\t\t$iNewH = $iHeight * $iRatioH;\n\t\t\t\t}\n\t\t}\n\n\t\t//Don't resize images which are smaller than thumbs\n\t\tif ($infos[0] < $width && $infos[1] < $height) {\n\t\t\t$iNewW = $infos[0];\n\t\t\t$iNewH = $infos[1];\n\t\t}\n\n\t\tif($infos[2] == 1) {\n\t\t\t/*\n\t\t\t* Image is typ gif\n\t\t\t*/\n\t\t\t$imgA = imagecreatefromgif($file);\n\t\t\t$imgB = imagecreate($iNewW,$iNewH);\n\t\t\t\n \t\t//keep gif transparent color if possible\n \tif(function_exists('imagecolorsforindex') && function_exists('imagecolortransparent')) {\n \t$transcolorindex = imagecolortransparent($imgA);\n \t\t//transparent color exists\n \t\tif($transcolorindex >= 0 ) {\n \t\t\t$transcolor = imagecolorsforindex($imgA, $transcolorindex);\n \t\t\t$transcolorindex = imagecolorallocate($imgB, $transcolor['red'], $transcolor['green'], $transcolor['blue']);\n \t\t\timagefill($imgB, 0, 0, $transcolorindex);\n \t\t\timagecolortransparent($imgB, $transcolorindex);\n \t\t//fill white\n \t\t} else {\n \t\t\t$whitecolorindex = @imagecolorallocate($imgB, 255, 255, 255);\n \t\t\timagefill($imgB, 0, 0, $whitecolorindex);\n \t\t}\n //fill white\n \t} else {\n \t$whitecolorindex = imagecolorallocate($imgB, 255, 255, 255);\n \timagefill($imgB, 0, 0, $whitecolorindex);\n \t}\n \timagecopyresampled($imgB, $imgA, 0, 0, 0, 0, $iNewW, $iNewH, $infos[0], $infos[1]);\n\t\t\timagegif($imgB, $save); \n\n\t\t} elseif($infos[2] == 2) {\n\t\t\t/*\n\t\t\t* Image is typ jpg\n\t\t\t*/\n\t\t\t$imgA = imagecreatefromjpeg($file);\n\t\t\t$imgB = imagecreatetruecolor($iNewW,$iNewH);\n\t\t\timagecopyresampled($imgB, $imgA, 0, 0, 0, 0, $iNewW, $iNewH, $infos[0], $infos[1]);\n\t\t\timagejpeg($imgB, $save);\n\n\t\t} elseif($infos[2] == 3) {\n\t\t\t/*\n\t\t\t* Image is typ png\n\t\t\t*/\n\t\t\t$imgA = imagecreatefrompng($file);\n\t\t\t$imgB = imagecreatetruecolor($iNewW, $iNewH);\n\t\t\timagealphablending($imgB, false);\n\t\t\timagecopyresampled($imgB, $imgA, 0, 0, 0, 0, $iNewW, $iNewH, $infos[0], $infos[1]);\n\t\t\timagesavealpha($imgB, true);\n\t\t\timagepng($imgB, $save);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1de82fb607c40bd13fcc277e38529b05", "score": "0.60836333", "text": "function imageUploadSized($width,$height,$folder,$filename)\n{\n\t$uploaddir = \"uploads/\";\n\tif($_FILES['IMAGE']['type'] != \"\")\n\t{\n\t\t$uploadfile = $uploaddir . basename($_FILES['IMAGE']['name']);\n\t\t$imagetype = $_FILES['IMAGE']['type'];\n\t\t$entry = $_FILES['IMAGE']['name'];\n\t\tmove_uploaded_file($_FILES['IMAGE']['tmp_name'], $uploadfile);\n\t\t\t\n\t\tif(($imagetype == \"image/jpeg\" OR $imagetype == \"image/jpg\" OR $imagetype == \"image/pjpeg\" || $imagetype == \"image/png\" || $imagetype == \"image/gif\"))\n\t\t{\n\t\t\t$image = new Imagick($uploadfile);\n\t\t\t$image->thumbnailImage($width, $height, false);\n\t\t\t$image->writeImage($folder.$filename);\n\t\t\tunlink($uploadfile);\n\t\t\t\n\t\t\t/*if(createImage($uploaddir,$entry,$width,$height,$filename))\n\t\t\t\tmoveUploadedPhoto($filename,$folder);\n\t\t\telse\n\t\t\t\t$error = \"$entry is not a valid .JPG file. New Image not uploaded.\";*/\n\t\t}\n\t\telse\n\t\t\t$error = \"$entry is not a valid .JPG file. New Image not uploaded.\";\n\t\tif(file_exists(\"uploads/$entry\"))\n\t\t\tunlink(\"uploads/$entry\");\n\t}\n\treturn $error;\n}", "title": "" }, { "docid": "85f699cfdbbb1d66d8812aaecdf3b03f", "score": "0.60779387", "text": "public function createNewImageSizes() {\r\n\t\t\t\r\n\t\t\t/*****************************************************/\r\n\t\t\t/** Config Options **/\r\n\t\t\t\r\n\t\t\tdefine('BIN_PATH', '/usr/bin'); // Location of the 'convert' tool\r\n\t\t\tdefine('BGCOLOR', 'white');\r\n\t\t\tdefine('RELATIVE_PATH', dirname($_SERVER['REQUEST_URI']).'/images/'); // This directory should be writable by the web server\r\n\t\t\tdefine('SAVE_PATH', $_SERVER['DOCUMENT_ROOT'].RELATIVE_PATH);\r\n\t\t\tdefine('HTTP_PATH', 'http://'.$_SERVER['SERVER_NAME'].RELATIVE_PATH);\r\n\t\t\tdefine('NEW_FILE_EXT', 'jpg');\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t * Define the different image sizes to be created\r\n\t\t\t * The array key will be used as the ending of the filename (ie. ..._large.jpg)\r\n\t\t\t * Values are (width, height), height is optional\r\n\t\t\t */\r\n\t\t\t$imageSizes = array(\r\n\t\t\t\t'small' => array(150, 150),\r\n\t\t\t\t'med' => array(480),\r\n\t\t\t\t'large' => array(520)\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t/*****************************************************/\r\n\r\n\t\t\t$origImage = $this->fileInfo['tmp_name'];\r\n\t\t\t\r\n\t\t\t// Get width and height of original image\r\n\t\t\tlist($srcWidth, $srcHeight) = getimagesize($origImage);\r\n\t\t\t\r\n\t\t\t// Create an image name using a hash, not hash browns\r\n\t\t\t$imageBaseName = sha1(mt_rand(10000, 99999).time());\r\n\t\t\t\r\n\t\t\t// Move uploaded file, if it fails return false\r\n\t\t\t$movedOrigImage = $imageBaseName.'.'.NEW_FILE_EXT;\r\n\t\t\tif (!move_uploaded_file($origImage, SAVE_PATH.$movedOrigImage)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Create array to hold the different image names, add original image to it\r\n\t\t\t$newImages = array('orig' => HTTP_PATH.$movedOrigImage);\r\n\t\t\t$newImagesToTransfer = array('orig' => SAVE_PATH.$movedOrigImage);\r\n\t\t\t\r\n\t\t\t// Create all the different sized images\r\n\t\t\tforeach($imageSizes as $sizeText => $sizeDim) {\r\n\t\t\t\t$newImage = $imageBaseName.'_'.$sizeText.'.'.NEW_FILE_EXT;\r\n\t\t\t\t\r\n\t\t\t\t// If height is not given just resize to width, preserving aspect ratio\r\n\t\t\t\tif (!isset($sizeDim[1])) {\r\n\t\t\t\t\t$dimStr = '\"'.$sizeDim[0].'>\"';\r\n\t\t\t\t\t\r\n\t\t\t\t// If height is given pad the sides to match exact width x height\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$dimStr = '\"'.$sizeDim[0].'x'.$sizeDim[1].'>\" -extent '.$sizeDim[0].'x'.$sizeDim[1];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Resize image\r\n\t\t\t\texec(BIN_PATH.'/convert ' . SAVE_PATH.$movedOrigImage . '[0] -background '.BGCOLOR.' -gravity center -thumbnail '.$dimStr.' '.SAVE_PATH.$newImage);\r\n\t\t\t\t\r\n\t\t\t\t$newImages[$sizeText] = HTTP_PATH.$newImage;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $newImages;\r\n\r\n\t\t}", "title": "" }, { "docid": "66669066128f3f6774301faf46ead34d", "score": "0.6077558", "text": "function imageresize($source, $destination, $width = 0, $height = 0, $crop = false, $quality = 100) \r\n{\r\n\t$quality = $quality ? $quality : 100;\r\n\t$image = imagecreatefromstring($source);\r\n\tif ($image) \r\n\t{\r\n\t\t// Get dimensions\r\n\t\t$w = imagesx($image);\r\n\t\t$h = imagesy($image);\r\n\t\tif (($width && $w > $width) || ($height && $h > $height)) {\r\n\t\t\t$ratio = $w / $h;\r\n\t\t\tif (($ratio >= 1 || $height == 0) && $width && !$crop) {\r\n\t\t\t\t$new_height = $width / $ratio;\r\n\t\t\t\t$new_width = $width;\r\n\t\t\t} elseif ($crop && $ratio <= ($width / $height)) {\r\n\t\t\t\t$new_height = $width / $ratio;\r\n\t\t\t\t$new_width = $width;\r\n\t\t\t} else {\r\n\t\t\t\t$new_width = $height * $ratio;\r\n\t\t\t\t$new_height = $height;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$new_width = $w;\r\n\t\t\t$new_height = $h;\r\n\t\t}\r\n\t\t$x_mid = $new_width * .5; //horizontal middle\r\n\t\t$y_mid = $new_height * .5; //vertical middle\r\n\t\t// Resample\r\n\t\terror_log('height: '.$new_height.' - width: '.$new_width);\r\n\t\t$new = imagecreatetruecolor(round($new_width), round($new_height));\r\n\t\timagecopyresampled($new, $image, 0, 0, 0, 0, $new_width, $new_height, $w, $h);\r\n\t\t// Crop\r\n\t\tif ($crop) {\r\n\t\t\t$crop = imagecreatetruecolor($width ? $width : $new_width, $height ? $height : $new_height);\r\n\t\t\timagecopyresampled($crop, $new, 0, 0, ($x_mid - ($width * .5)), 0, $width, $height, $width, $height);\r\n\t\t\t//($y_mid - ($height * .5))\r\n\t\t}\r\n\t\t// Output\r\n\t\t// Enable interlancing [for progressive JPEG]\r\n\t\timageinterlace($crop ? $crop : $new, true);\r\n\r\n\t\t$dext = strtolower(pathinfo($destination, PATHINFO_EXTENSION));\r\n\t\tif ($dext == '') {\r\n\t\t\t$dext = $ext;\r\n\t\t\t$destination .= '.' . $ext;\r\n\t\t}\r\n\t\tswitch ($dext) {\r\n\t\t\tcase 'jpeg':\r\n\t\t\tcase 'jpg':\r\n\t\t\t\timagejpeg($crop ? $crop : $new, $destination, $quality);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'png':\r\n\t\t\t\t$pngQuality = ($quality - 100) / 11.111111;\r\n\t\t\t\t$pngQuality = round(abs($pngQuality));\r\n\t\t\t\timagepng($crop ? $crop : $new, $destination, $pngQuality);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'gif':\r\n\t\t\t\timagegif($crop ? $crop : $new, $destination);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t@imagedestroy($image);\r\n\t\t@imagedestroy($new);\r\n\t\t@imagedestroy($crop);\r\n\t}\r\n}", "title": "" }, { "docid": "848098a0e4dfb3ef40ac2cd2a9d8e1a6", "score": "0.6077226", "text": "function resize($blob_binary, $desired_width, $desired_height) {\r\n if($desired_width=='x'&&$desired_height=='x'){\r\n\t $new = imagecreatefromstring($blob_binary);\r\n\t}\r\n\telse {\r\n\t$im = imagecreatefromstring($blob_binary);\r\n $new = imagecreatetruecolor($desired_width, $desired_height) or exit(\"bad url\");\r\n $x = imagesx($im);\r\n $y = imagesy($im);\r\n imagecopyresampled($new, $im, 0, 0, 0, 0, $desired_width, $desired_height, $x, $y) or exit(\"bad url\");\r\n imagedestroy($im);\r\n }\r\n\t$new=imagerotate($new,-90,0);\r\n imagejpeg($new, null, 85) or exit(\"bad url\");\r\n\treturn $new;\r\n\t}", "title": "" }, { "docid": "52831b0fc1861abefc0a89ed9d141daa", "score": "0.6074271", "text": "function resize($file, $w, $h, $crop=FALSE) {\n list($width, $height) = getimagesize($file);\n $r = $width / $height;\n if ($crop) {\n if ($width > $height) $width=ceil($width-($width*abs($r-$w/$h)));\n else $height = ceil($height-($height*abs($r-$w/$h)));\n $newwidth = $w; $newheight = $h;\n } else {\n if ($w/$h > $r) {\n $newwidth = $h*$r;\n $newheight = $h;\n } else {\n $newheight = $w/$r;\n $newwidth = $w;\n }\n }\n $src = imagecreatefromjpeg($file); $dst = imagecreatetruecolor($newwidth, $newheight);\n imagecopyresampled($dst, $src, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);\n return $dst;\n}", "title": "" }, { "docid": "013c9ef4d84bd2d13249e53151cc84b7", "score": "0.60712385", "text": "function predefinedlabels_generate_resized_image(stored_file $file, $maxwidth, $maxheight) {\n global $CFG;\n\n $fullurl = moodle_url::make_draftfile_url($file->get_itemid(), $file->get_filepath(), $file->get_filename());\n $link = null;\n $attrib = array('alt' => $file->get_filename(), 'src' => $fullurl);\n\n if ($imginfo = $file->get_imageinfo()) {\n // Work out the new width / height, bounded by maxwidth / maxheight\n $width = $imginfo['width'];\n $height = $imginfo['height'];\n if (!empty($maxwidth) && $width > $maxwidth) {\n $height *= (float) $maxwidth / $width;\n $width = $maxwidth;\n }\n if (!empty($maxheight) && $height > $maxheight) {\n $width *= (float) $maxheight / $height;\n $height = $maxheight;\n }\n\n $attrib['width'] = $width;\n $attrib['height'] = $height;\n\n // If the size has changed and the image is of a suitable mime type, generate a smaller version\n if ($width != $imginfo['width']) {\n $mimetype = $file->get_mimetype();\n if ($mimetype === 'image/gif' or $mimetype === 'image/jpeg' or $mimetype === 'image/png') {\n require_once($CFG->libdir . '/gdlib.php');\n $data = $file->generate_image_thumbnail($width, $height);\n\n if (!empty($data)) {\n $fs = get_file_storage();\n $record = array(\n 'contextid' => $file->get_contextid(),\n 'component' => $file->get_component(),\n 'filearea' => $file->get_filearea(),\n 'itemid' => $file->get_itemid(),\n 'filepath' => '/',\n 'filename' => 's_' . $file->get_filename(),\n );\n $smallfile = $fs->create_file_from_string($record, $data);\n\n // Replace the image 'src' with the resized file and link to the original\n $attrib['src'] = moodle_url::make_draftfile_url($smallfile->get_itemid(), $smallfile->get_filepath(), $smallfile->get_filename());\n $link = $fullurl;\n }\n }\n }\n } else {\n // Assume this is an image type that get_imageinfo cannot handle (e.g. SVG)\n $attrib['width'] = $maxwidth;\n }\n\n $img = html_writer::empty_tag('img', $attrib);\n if ($link) {\n return html_writer::link($link, $img);\n } else {\n return $img;\n }\n}", "title": "" }, { "docid": "61de942a891c32faae4a5afad398ea74", "score": "0.60701406", "text": "function resize_crop_image($max_width, $max_height, $source_file, $dst_dir, $quality = 80){\n $imgsize = getimagesize($source_file);\n $width = $imgsize[0];\n $height = $imgsize[1];\n $mime = $imgsize['mime'];\n\n switch($mime){\n case 'image/gif':\n $image_create = \"imagecreatefromgif\";\n $image = \"imagegif\";\n break;\n\n case 'image/png':\n $image_create = \"imagecreatefrompng\";\n $image = \"imagepng\";\n $quality = 7;\n break;\n\n case 'image/jpeg':\n $image_create = \"imagecreatefromjpeg\";\n $image = \"imagejpeg\";\n $quality = 80;\n break;\n\n default:\n return false;\n break;\n }\n\n $dst_img = imagecreatetruecolor($max_width, $max_height);\n $src_img = $image_create($source_file);\n\n $width_new = $height * $max_width / $max_height;\n $height_new = $width * $max_height / $max_width;\n //if the new width is greater than the actual width of the image, then the height is too large and the rest cut off, or vice versa\n if($width_new > $width){\n //cut point by height\n $h_point = (($height - $height_new) / 2);\n //copy image\n imagecopyresampled($dst_img, $src_img, 0, 0, 0, $h_point, $max_width, $max_height, $width, $height_new);\n }else{\n //cut point by width\n $w_point = (($width - $width_new) / 2);\n imagecopyresampled($dst_img, $src_img, 0, 0, $w_point, 0, $max_width, $max_height, $width_new, $height);\n }\n\n $image($dst_img, $dst_dir, $quality);\n\n if($dst_img)imagedestroy($dst_img);\n if($src_img)imagedestroy($src_img);\n echo \"We are done!\";\n}", "title": "" }, { "docid": "e66994835460749bd5f8c6e173cbf30d", "score": "0.6065258", "text": "function resize($src_file, $dest_file, $new_size, $img_meta) {\n if (!zmgGd2xTool::isSupportedType($img_meta['extension'], $src_file)) {\n return false;\n }\n \n // height/width\n $ratio = max($img_meta['width'], $img_meta['height']) / $new_size;\n $ratio = max($ratio, 1.0);\n $destWidth = (int)($img_meta['width'] / $ratio);\n $destHeight = (int)($img_meta['height'] / $ratio);\n\n if ($img_meta['extension'] == \"jpg\" || $img_meta['extension'] == \"jpeg\") {\n $src_img = @imagecreatefromjpeg($src_file);\n $dst_img = imagecreatetruecolor($destWidth, $destHeight);\n } else if ($img_meta['extension'] == \"png\") {\n $src_img = @imagecreatefrompng($src_file);\n $dst_img = imagecreatetruecolor($destWidth, $destHeight);\n $img_white = imagecolorallocate($dst_img, 255, 255, 255); // set background to white\n $img_return = @imagefill($dst_img, 0, 0, $img_white);\n } else {\n $src_img = @imagecreatefromgif($src_file);\n $dst_img = imagecreatetruecolor($destWidth,$destHeight);\n $img_white = imagecolorallocate($dst_img, 255, 255, 255); // set background to white\n $img_return = @imagefill($dst_img, 0, 0, $img_white);\n }\n if (!$src_img) {\n return zmgToolboxPlugin::registerError($src_file, 'GD 2.x: Could not convert image.');\n }\n\n imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $destWidth, $destHeight,\n $img_meta['width'], $img_meta['height']);\n\n if ($img_meta['extension'] == \"jpg\" || $img_meta['extension'] == \"jpeg\") {\n imagejpeg($dst_img, $dest_file, $img_meta['jpeg_qty']);\n } else if ($img_meta['extension'] == \"png\") {\n imagepng($dst_img, $dest_file);\n } else {\n imagegif($dst_img, $dest_file);\n }\n\n imagedestroy($src_img);\n imagedestroy($dst_img);\n return true;\n }", "title": "" }, { "docid": "55c5f4fb058742af1cbfe3de4fbf4c8f", "score": "0.6056046", "text": "public function resizeImage($cInput, $cOutput, $nH = 1600, $nW = 2560, $xType = 'normal', $nQuality = 75)\n {\n \n if (function_exists('imagecreatefromgif')) {\n \n $src_img = '';\n $nH == $nW ? $xType = 'square' : false;\n $cOutput == null ? $cOutput = $cInput : false;\n $cType = strtolower(substr(stripslashes($cInput), strrpos(stripslashes($cInput), '.')));\n\n if ($cType == '.gif' || $cType == 'image/gif') {\n $src_img = imagecreatefromgif($cInput); /* Attempt to open */\n $cType = 'image/gif';\n } elseif ($cType == '.png' || $cType == 'image/png' || $cType == 'image/x-png') {\n $src_img = imagecreatefrompng($cInput); /* Attempt to open */\n $cType = 'image/x-png';\n } elseif ($cType == '.bmp' || $cType == 'image/bmp') {\n $src_img = imagecreatefrombmp($cInput); /* Attempt to open */\n $cType = 'image/bmp';\n } elseif ($cType == '.jpg' || $cType == '.jpeg' || $cType == 'image/jpg' || $cType == 'image/jpeg' || $cType == 'image/pjpeg') {\n $src_img = imagecreatefromjpeg($cInput); /* Attempt to open */\n $cType = 'image/jpeg';\n } else {\n \n }\n\n if (!$src_img) {\n $src_img = imagecreatefromgif(FOONSTER_PATH . '/images/widget.gif'); /* Attempt to open */\n $cType = 'image/gif';\n } else {\n\n $tmp_img;\n list($width, $height) = getimagesize($cInput);\n \n if ($xType == 'square' && $width != $height) {\n \n $biggestSide = '';\n $cropPercent = .5;\n $cropWidth = 0;\n $cropHeight = 0;\n $c1 = array();\n \n if ($width > $height) {\n $biggestSide = $width;\n $cropWidth = round($biggestSide*$cropPercent);\n $cropHeight = round($biggestSide*$cropPercent);\n $c1 = array(\"x\"=>($width-$cropWidth)/2, \"y\"=>($height-$cropHeight)/2);\n } else {\n $biggestSide = $height;\n $cropWidth = round($biggestSide*$cropPercent);\n $cropHeight = round($biggestSide*$cropPercent);\n $c1 = array(\"x\"=>($width-$cropWidth)/2, \"y\"=>($height-$cropHeight)/7);\n }\n \n $thumbSize = $nH;\n\n if ($cType == 'image/gif') {\n $tmp_img = imagecreate($thumbSize, $thumbSize);\n imagecolortransparent($tmp_img, imagecolorallocate($tmp_img, 0, 0, 0));\n imagecopyresized($tmp_img, $src_img, 0, 0, $c1['x'], $c1['y'], $thumbSize, $thumbSize, $cropWidth, $cropHeight);\n } elseif ($cType == 'image/x-png') {\n \n $tmp_img = imagecreatetruecolor($thumbSize, $thumbSize);\n imagecopyresampled($tmp_img, $src_img, 0, 0, $c1['x'], $c1['y'], $thumbSize, $thumbSize, $cropWidth, $cropHeight);\n \n } elseif ($cType == 'image/bmp') {\n \n $tmp_img = imagecreatetruecolor($thumbSize, $thumbSize);\n imagecopyresampled($tmp_img, $src_img, 0, 0, $c1['x'], $c1['y'], $thumbSize, $thumbSize, $cropWidth, $cropHeight);\n\n } elseif ($cType == 'image/jpeg') {\n \n $tmp_img = imagecreatetruecolor($thumbSize, $thumbSize);\n imagecopyresampled($tmp_img, $src_img, 0, 0, $c1['x'], $c1['y'], $thumbSize, $thumbSize, $cropWidth, $cropHeight);\n \n } else {\n $tmp_img = imagecreatetruecolor($thumbSize, $thumbSize);\n imagecopyresampled($tmp_img, $src_img, 0, 0, $c1['x'], $c1['y'], $thumbSize, $thumbSize, $cropWidth, $cropHeight);\n }\n\n imagedestroy($src_img);\n $src_img = $tmp_img;\n } else {\n $ow = imagesx($src_img);\n $oh = imagesy($src_img);\n if ($nH == 0 && $nW == 0) {\n $nH = $oh;\n $nW = $ow;\n }\n if ($nH == 0) {\n $nH = $nW;\n }\n if ($nW == 0) {\n $nW = $nH;\n }\n if ($nH > $oh && $nW > $ow) {\n $width = $ow;\n $height = $oh;\n } else {\n\n if ($nW && ($ow < $oh)) {\n $nW = ($nH / $oh) * $ow;\n } else {\n $nH = ($nW / $ow) * $oh;\n }\n \n $width = $nW;\n \n $height = $nH;\n }\n \n if ($cType == 'image/gif') {\n $tmp_img = imagecreate($width, $height);\n imagecolortransparent($tmp_img, imagecolorallocate($tmp_img, 0, 0, 0));\n imagecopyresized($tmp_img, $src_img, 0, 0, $off_w, $off_h, $width, $height, $ow, $oh);\n } elseif ($cType == 'image/x-png') {\n $tmp_img = imagecreatetruecolor($width, $height);\n imagecopyresampled($tmp_img, $src_img, 0, 0, $off_w, $off_h, $width, $height, $ow, $oh);\n } elseif ($cType == 'image/bmp') {\n $tmp_img = imagecreatetruecolor($width, $height);\n imagecopyresampled($tmp_img, $src_img, 0, 0, $off_w, $off_h, $width, $height, $ow, $oh);\n } elseif ($cType == 'image/jpeg') {\n $tmp_img = imagecreatetruecolor($width, $height);\n imagecopyresampled($tmp_img, $src_img, 0, 0, $off_w, $off_h, $width, $height, $ow, $oh);\n } else {\n $tmp_img = imagecreatetruecolor($width, $height);\n imagecopyresampled($tmp_img, $src_img, 0, 0, $off_w, $off_h, $width, $height, $ow, $oh);\n }\n \n imagedestroy($src_img);\n \n $src_img = $tmp_img;\n \n }\n \n }\n \n // set the output\n \n if ($cType == 'image/gif') {\n imageGIF($src_img, $cOutput);\n } elseif ($cType == 'image/x-png') {\n imagePNG($src_img, $cOutput);\n } elseif ($cType == 'image/bmp') {\n imageJPEG($src_img, $cOutput, $nQuality);\n } elseif ($cType == 'image/jpeg') {\n imageJPEG($src_img, $cOutput, $nQuality);\n } else {\n imageJPEG($src_img, $cOutput, $nQuality);\n }\n // Free up memory\n imagedestroy($src_img);\n }\n }", "title": "" }, { "docid": "11e9088c78043a26ec8ab2587136d08b", "score": "0.6055728", "text": "function redimensionar_jpeg($img_original, $img_nueva, $img_nueva_anchura, $img_nueva_altura, $img_nueva_calidad)\n{\n\t// crear una imagen desde el original \n\t$img = ImageCreateFromJPEG($img_original);\n\t// crear una imagen nueva \n\t$thumb = imagecreatetruecolor($img_nueva_anchura,$img_nueva_altura);\n\t// redimensiona la imagen original copiandola en la imagen \n\tImageCopyResized($thumb,$img,0,0,0,0,$img_nueva_anchura,$img_nueva_altura,ImageSX($img),ImageSY($img));\n \t// guardar la nueva imagen redimensionada donde indicia $img_nueva \n\tImageJPEG($thumb,$img_nueva,$img_nueva_calidad);\n\tImageDestroy($img);\n}", "title": "" }, { "docid": "c14136a5e9b302db9e2929b12322eca8", "score": "0.60555077", "text": "function resize_crop_image($max_width, $max_height, $source_file, $dst_dir, $quality = 80, $minWidth = 80, $minHeight = 80){\n $imgsize = getimagesize($source_file);\n $width = $imgsize[0];\n $height = $imgsize[1];\n $mime = $imgsize['mime'];\n if($width < $minWidth or $height < $minWidth) {\n return [false, \"Image must be larger than \" . $minWidth . \"px in width and \" . $minHeight . \"px in height. Your image is \" . $width . \"px x \" . $height . \"px.\"];\n }else {\n switch ($mime) {\n case 'image/gif':\n $image_create = \"imagecreatefromgif\";\n $image = \"imagegif\";\n break;\n\n case 'image/png':\n $image_create = \"imagecreatefrompng\";\n $image = \"imagepng\";\n $quality = 7;\n break;\n\n case 'image/jpeg':\n $image_create = \"imagecreatefromjpeg\";\n $image = \"imagejpeg\";\n $quality = 80;\n break;\n\n default:\n return [false, \"File is not an image\"];\n break;\n }\n\n $dst_img = imagecreatetruecolor($max_width, $max_height);\n $src_img = $image_create($source_file);\n\n $width_new = $height * $max_width / $max_height;\n $height_new = $width * $max_height / $max_width;\n //if the new width is greater than the actual width of the image, then the height is too large and the rest cut off, or vice versa\n if ($width_new > $width) {\n //cut point by height\n $h_point = (($height - $height_new) / 2);\n //copy image\n imagecopyresampled($dst_img, $src_img, 0, 0, 0, $h_point, $max_width, $max_height, $width, $height_new);\n } else {\n //cut point by width\n $w_point = (($width - $width_new) / 2);\n imagecopyresampled($dst_img, $src_img, 0, 0, $w_point, 0, $max_width, $max_height, $width_new, $height);\n }\n\n $image($dst_img, $dst_dir, $quality);\n\n if ($dst_img) imagedestroy($dst_img);\n if ($src_img) imagedestroy($src_img);\n return [true];\n }\n}", "title": "" }, { "docid": "074d9baca43c703c4c1e4dffac8719d8", "score": "0.6052058", "text": "function createthumnail_imagic($sourceimg,$destinationimg,$newwidth,$newheight){\n $current_file = $sourceimg;\n $max_width = $newwidth;\n\n // Get the current info on the file\n $current_size = getimagesize($current_file);\n $current_img_width = $current_size[0];\n $current_img_height = $current_size[1];\n $image_base = explode('.', $current_file);\n\n \n $thumb_name = $destinationimg;\n\n \n $too_big_diff_ratio = $current_img_width/$max_width;\n $new_img_width = $max_width;\n $new_img_height = round($current_img_height/$too_big_diff_ratio);\n // Convert the file\n $make_magick = exec(USER_BIN_CONVERT_PATH.\"convert -geometry $new_img_width x $new_img_height $current_file $thumb_name\", $retval);\n \n \n }", "title": "" }, { "docid": "9603ff28448b1cdbea98b06c234d50bc", "score": "0.6048994", "text": "function image_resize_postion($payload, $orig_w, $orig_h, $dest_w, $dest_h, $crop) {\n\n // Change this to a conditional that decides whether you\n // want to override the defaults for this image or not.\n if( false )\n\n return $payload;\n\n if ($crop) {\n // crop the largest possible portion of the original image that we can size to $dest_w x $dest_h\n $aspect_ratio = $orig_w / $orig_h;\n $new_w = min($dest_w, $orig_w);\n $new_h = min($dest_h, $orig_h);\n\n if (!$new_w) {\n $new_w = intval($new_h * $aspect_ratio);\n }\n\n if (!$new_h) {\n $new_h = intval($new_w / $aspect_ratio);\n }\n\n $size_ratio = max($new_w / $orig_w, $new_h / $orig_h);\n\n $crop_w = round($new_w / $size_ratio);\n $crop_h = round($new_h / $size_ratio);\n if ($dest_w == '300') {\n $s_x = floor( ($orig_w - $crop_w) / 2 );\n $s_y = 0;\n } else {\n $s_x = floor( ($orig_w - $crop_w) / 2 );\n $s_y = floor( ($orig_h - $crop_h) / 2 );\n }\n } else {\n // don't crop, just resize using $dest_w x $dest_h as a maximum bounding box\n $crop_w = $orig_w;\n $crop_h = $orig_h;\n\n $s_x = 0;\n $s_y = 0;\n\n list( $new_w, $new_h ) = wp_constrain_dimensions( $orig_w, $orig_h, $dest_w, $dest_h );\n }\n\n // if the resulting image would be the same size or larger we don't want to resize it\n if ( $new_w >= $orig_w && $new_h >= $orig_h )\n return false;\n\n // the return array matches the parameters to imagecopyresampled()\n // int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h\n return array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h );\n\n}", "title": "" } ]
4e1baab252514f1d5bd5194373427022
Allow shipping auto recalculation
[ { "docid": "849bf9f4a32db9a048a16962e73c653c", "score": "0.6720474", "text": "public function getIsAllowAutoRecalculateShipping()\n {\n return $this->scopeConfig->getValue(self::XML_PATH_SHIPPING_AUTO_RECALCULATE);\n }", "title": "" } ]
[ { "docid": "0aab660f5632f60f3c0a620a23979d79", "score": "0.7065118", "text": "public function shouldReloadOnShippingMethodChange()\n {\n return $this->_helper()->shouldReloadTotalsOnShippingMethodChange();\n }", "title": "" }, { "docid": "6975e339cd2f8a5db5d8f46b1eabc9e5", "score": "0.6911531", "text": "protected function RecalculateShipping()\n {\n $this->dCostShipping = 0;\n\n // validate shipping group - reset if not valid\n if (null !== $this->GetActiveShippingGroup()) {\n if (false === $this->SetActiveShippingGroup($this->GetActiveShippingGroup())) {\n $this->SetActiveShippingGroup(null);\n }\n }\n\n // if the basket contains a voucher that is set to free_shipping, then we keep costs to zero\n if (is_null($this->GetActiveVouchers()) || !$this->GetActiveVouchers()->HasFreeShippingVoucher()) {\n if (!is_null($this->GetActiveShippingGroup())) {\n $this->dCostShipping = $this->GetActiveShippingGroup()->GetShippingCostsForBasket();\n }\n }\n }", "title": "" }, { "docid": "73fca5d6fedfaf22b6fc4f8912c9ef4b", "score": "0.67776954", "text": "public function requiresShipping();", "title": "" }, { "docid": "43fff11b3f66afcdf88fba5c89b385ec", "score": "0.6769815", "text": "public static function shippingCostPerPaperback();", "title": "" }, { "docid": "ee8e256b9a1a1537cfb49fd6ef50d7d3", "score": "0.675561", "text": "public function shouldReloadOnOrderTotalChange()\n {\n return $this->_helper()->shouldReloadShippingMethodsOnOrderTotalChange();\n }", "title": "" }, { "docid": "a866f98241e35bde7c4892d9ed47ed6c", "score": "0.651872", "text": "public function shippingTax();", "title": "" }, { "docid": "d619026ffbfc5b44973b74a0ef22d1de", "score": "0.6473967", "text": "public function calculate_shipping( $package ) {\r\n\r\n $weight = 0;\r\n $cost = 0;\r\n //$country = $package[\"destination\"][\"country\"];\r\n $address = '';\r\n if ($package['destination']['city'])\r\n $address = $package['destination']['city'];\r\n $response = wp_remote_post('https://unizoo.ru/service/export/dpd_tarif/?curl=Y&[email protected]&password=6YJLH78v23SB');\r\n $body = wp_remote_retrieve_body( $response );\r\n foreach (json_decode($body) as $item) {\r\n $locality = mb_strtolower($item->LocalityName);\r\n if ( $locality == $address ) {\r\n $result = $item;\r\n $cost = $item->baseDeliveryPrice;\r\n $costDop = $item->priceDop;\r\n $costDop1 = $item->priceDop1;\r\n $costDop2 = $item->priceDop2;\r\n $costDop3 = $item->priceDop3;\r\n $costDop4 = $item->priceDop4;\r\n\r\n $subtotal = WC()->cart->get_subtotal();\r\n if ($subtotal > 0 && $subtotal <= 1999)\r\n $cost = $cost + $costDop;\r\n elseif ($subtotal >= 2000 && $subtotal <= 3499)\r\n $cost = $cost + $costDop1;\r\n elseif ($subtotal >= 3500 && $subtotal <= 4999)\r\n $cost = $cost + $costDop2;\r\n elseif ($subtotal >= 5000 && $subtotal <= 7999)\r\n $cost = $cost + $costDop3;\r\n elseif ($subtotal >= 8000)\r\n $cost = $cost + $costDop4;\r\n }\r\n }\r\n\r\n foreach ( $package['contents'] as $item_id => $values )\r\n {\r\n $_product = $values['data'];\r\n $weight = $weight + $_product->get_weight() * $values['quantity'];\r\n }\r\n if ($weight > 5) {\r\n $add_weight = round($weight - 5);\r\n $cost = $cost + $add_weight * 10;\r\n }\r\n if ($cost <= 0)\r\n $cost = 0;\r\n $rate = array(\r\n 'id' => $this->id,\r\n 'label' => $this->title,\r\n 'cost' => $cost\r\n );\r\n\r\n $this->add_rate( $rate );\r\n }", "title": "" }, { "docid": "9fc37bbdf5211a60358a3aa47d0fdbc8", "score": "0.641868", "text": "public static function shippingCostPerHardcover();", "title": "" }, { "docid": "93272bb3bece4c0f862153ed6515588f", "score": "0.6418134", "text": "function billing_shipping_method() {\n\t\t//\n\t}", "title": "" }, { "docid": "303370c68f897535c39103503ba5601a", "score": "0.6353922", "text": "public function shouldReloadShippingMethodsOnPostalCodeChange()\n {\n return $this->_helper()->shouldReloadShippingMethodsOnPostalCodeChange();\n }", "title": "" }, { "docid": "91533ed3a3cde5acd8eb8ff3dbb23af3", "score": "0.6349929", "text": "public function testUpdateShippingItem()\n {\n }", "title": "" }, { "docid": "598c8d3720cbf241edb677f39beff40c", "score": "0.6341973", "text": "public function calculateShippingCostsAction()\n {\n\n if ($this->Request()->getPost('sCountry')) {\n $this->session['sCountry'] = (int)$this->Request()->getPost('sCountry');\n $this->session[\"sState\"] = 0;\n $this->session[\"sArea\"] = Shopware()->Db()->fetchOne(\"\n SELECT areaID FROM s_core_countries WHERE id = ?\n \", [$this->session['sCountry']]);\n }\n\n if ($this->Request()->getPost('sPayment')) {\n $this->session['sPaymentID'] = (int)$this->Request()->getPost('sPayment');\n }\n\n if ($this->Request()->getPost('sDispatch')) {\n $this->session['sDispatch'] = (int)$this->Request()->getPost('sDispatch');\n }\n\n if ($this->Request()->getPost('sState')) {\n $this->session['sState'] = (int)$this->Request()->getPost('sState');\n }\n\n // We might change the shop context here so we need to initialize it again\n $this->get('shopware_storefront.context_service')->initializeShopContext();\n\n // We need an indicator in the view to expand the shipping costs pre-calculation on page load\n $this->View()->assign('calculateShippingCosts', true);\n\n $this->forward('index');\n }", "title": "" }, { "docid": "5a50864a39f9904c4ce143cbf5704fb6", "score": "0.6336287", "text": "public function calculate_shipping( $package ) {\r\n\r\n $weight = 0;\r\n $cost = 0;\r\n //$country = $package[\"destination\"][\"country\"];\r\n $subtotal = WC()->cart->get_subtotal();\r\n foreach ( $package['contents'] as $item_id => $values )\r\n {\r\n $_product = $values['data'];\r\n $weight = $weight + $_product->get_weight() * $values['quantity'];\r\n }\r\n\r\n $address = '';\r\n if ($package['destination']['city'])\r\n $address = $package['destination']['city'];\r\n $response = wp_remote_post('https://unizoo.ru/service/export/dpd_tarif/?curl=Y&[email protected]&password=6YJLH78v23SB');\r\n $body = wp_remote_retrieve_body( $response );\r\n foreach (json_decode($body) as $item) {\r\n $locality = mb_strtolower($item->LocalityName);\r\n if ($locality == $address) {\r\n $result = $item;\r\n $cost = $item->basePickupPrice;\r\n $costDop = $item->priceDop;\r\n $costDop1 = $item->priceDop1;\r\n $costDop2 = $item->priceDop2;\r\n $costDop3 = $item->priceDop3;\r\n $costDop4 = $item->priceDop4;\r\n\r\n $subtotal = WC()->cart->get_subtotal();\r\n if ($subtotal > 0 && $subtotal <= 1999)\r\n $cost = $cost + $costDop;\r\n elseif ($subtotal >= 2000 && $subtotal <= 3499)\r\n $cost = $cost + $costDop1;\r\n elseif ($subtotal >= 3500 && $subtotal <= 4999)\r\n $cost = $cost + $costDop2;\r\n elseif ($subtotal >= 5000 && $subtotal <= 7999)\r\n $cost = $cost + $costDop3;\r\n elseif ($subtotal >= 8000)\r\n $cost = $cost + $costDop4;\r\n\r\n }\r\n }\r\n if ($weight > 5) {\r\n $add_weight = round($weight - 5);\r\n $cost = $cost + $add_weight * 10;\r\n }\r\n if ($cost <= 0)\r\n $cost = 0;\r\n $rate = array(\r\n 'id' => $this->id,\r\n 'label' => $this->title,\r\n 'cost' => $cost\r\n );\r\n\r\n $this->add_rate( $rate );\r\n }", "title": "" }, { "docid": "a4e06ca31c1fcdb6563167d89a024617", "score": "0.6309973", "text": "public function getShippingRateInput();", "title": "" }, { "docid": "a4e06ca31c1fcdb6563167d89a024617", "score": "0.6309973", "text": "public function getShippingRateInput();", "title": "" }, { "docid": "77e397273f80b662ec004e672b3ba5f3", "score": "0.62752813", "text": "public function shouldReloadOnPostcodeChange()\n {\n return $this->_helper()->shouldReloadShippingMethodsOnPostalCodeChange();\n }", "title": "" }, { "docid": "e388d52b5f052d85f1e325d3450aaff6", "score": "0.6268143", "text": "public static function shippingCostPerOrder();", "title": "" }, { "docid": "ef00d268447cf19a5ef2de8bf95ee4dd", "score": "0.6261769", "text": "public function calculate_shipping($package = array())\n {\n $prag_gratis_Bucuresti = $this->get_option('prag_gratis_Bucuresti');\n $suma_fixa_Bucuresti = $this->get_option('suma_fixa_Bucuresti');\n $prag_gratis_provincie = $this->get_option('prag_gratis_provincie');\n $suma_fixa_provincie = $this->get_option('suma_fixa_provincie');\n\n $orasdest = strtolower($package['destination']['city']);\n $judetdest_abvr = $package['destination']['state'] ?? '';\n $judetdest = safealternative_get_counties_list()[$judetdest_abvr];\n $adresadest = $package['destination']['address'];\n $postcodedest = $package['destination']['postcode'];\n $tarif_contract = $this->get_option('tarif_contract');\n $tarif_maxim = $this->get_option('tarif_maxim');\n if (empty($tarif_maxim)) $tarif_maxim = 99999;\n\n $ramburs = 0;\n $greutate = 0;\n $valoare_cos = 0;\n\n foreach ($package['contents'] as $product) {\n $ramburs += ($product['line_total'] + $product['line_tax']);\n $valoare_cos += ($product['line_total'] + $product['line_tax']);\n\n // WooCommerce 3.0 or later.\n if (method_exists($product['data'], 'get_height')) {\n $greutate += $this->fix_format($product['data']->get_weight() ?: 1) * $product['quantity'];\n } else {\n $greutate += $this->fix_format($product['data']->weight ?: 1) * $product['quantity'];\n }\n }\n\n $weight_type = get_option('woocommerce_weight_unit');\n if ($weight_type == 'g') {\n $greutate = $greutate / 1000;\n }\n\n if ($greutate < 1) {\n $greutate = 1;\n } else {\n $greutate = round($greutate);\n }\n\n /////////////////////////////////////////////////////////\n $label = $this->title;\n\n if ($prag_gratis_Bucuresti == $prag_gratis_provincie && $ramburs >= $prag_gratis_Bucuresti) {\n $transport = 0;\n $label = $this->title . ': Gratis';\n } else {\n if ($tarif_contract == 'yes' && class_exists('NemoAWB')) {\n global $wpdb;\n $first_zip = $wpdb->get_var(\"SELECT ZipCode FROM courier_zipcodes WHERE County='$judetdest' AND City LIKE '%$orasdest%'\");\n $zip = $postcodedest ?? $first_zip;\n\n if (isset($_REQUEST['payment_method']) && (addslashes($_REQUEST['payment_method']) != 'cod')) {\n $ramburs = 0;\n }\n\n $req_vars = [\n 'type' => get_option('nemo_package_type'),\n 'service_type' => get_option('nemo_service'),\n 'cnt' => get_option('nemo_parcel_count'),\n 'retur' => get_option('nemo_return'),\n 'retur_type' => get_option('nemo_return_type'),\n 'ramburs' => $ramburs,\n 'ramburs_type' => 'cash',\n 'service_1' => get_option('nemo_is_sat_delivery'),\n 'service_2' => get_option('nemo_open_delivery'),\n 'service_3' => get_option('nemo_atypical_package'),\n 'insurance' => get_option('nemo_insurance'),\n 'weight' => $greutate,\n 'content' => get_option('nemo_content'),\n 'fragile' => get_option('nemo_is_fragile'),\n 'payer' => get_option('nemo_payer'),\n 'from_county' => get_option('nemo_county'),\n 'from_city' => get_option('nemo_city'),\n 'from_address' => get_option('nemo_address'),\n 'from_zipcode' => get_option('nemo_postcode'),\n 'to_county' => $judetdest,\n 'to_city' => $orasdest,\n 'to_address' => $adresadest,\n 'to_zipcode' => $zip,\n ];\n\n $transport = (float) $this->get_option('tarif_implicit') ?: 0;\n\n if (empty($judetdest_abvr) || empty($orasdest)) return;\n\n try {\n $bypass = false;\n if ($judetdest_abvr == \"B\") {\n if ($valoare_cos >= $prag_gratis_Bucuresti) {\n $transport = 0;\n $bypass = true;\n }\n } else {\n if ($valoare_cos >= $prag_gratis_provincie) {\n $transport = $bypass = 0;\n $bypass = true;\n }\n }\n\n if (!$bypass) {\n $transport = (new SafealternativeNemoShippingClass)->calculate($req_vars);\n }\n\n if ($transport == 0) $label = $this->title . ': Gratis';\n } catch (\\Exception $e) {\n }\n } else {\n if ($judetdest_abvr && $orasdest) {\n\n if ($judetdest_abvr == \"B\") {\n if ($valoare_cos < $prag_gratis_Bucuresti) $transport = $suma_fixa_Bucuresti;\n if ($valoare_cos >= $prag_gratis_Bucuresti) $transport = 0;\n } else {\n if ($valoare_cos < $prag_gratis_provincie) $transport = $suma_fixa_provincie;\n if ($valoare_cos >= $prag_gratis_provincie) $transport = 0;\n }\n\n if ($transport == 0) $label = $this->title . ': Gratis';\n } else {\n $transport = (float) $this->get_option('tarif_implicit') ?: 0;\n }\n }\n }\n\n $transport = min($transport, $tarif_maxim);\n\n $args = array(\n 'id' => $this->id,\n 'label' => $label,\n 'cost' => $transport,\n 'taxes' => true\n );\n\n if ($transport !== 0 || (strpos($label, 'Gratis') !== false)) {\n $args = apply_filters('safealternative_overwrite_nemo_shipping', $args, $judetdest, $orasdest);\n $this->add_rate($args);\n }\n }", "title": "" }, { "docid": "d881f6ed42069cccafb41171fa29b92e", "score": "0.62406754", "text": "public function getShippingAmount()\r\n {\r\n\r\n }", "title": "" }, { "docid": "e31a3315b6d181d397eace9fd5892031", "score": "0.62391055", "text": "public function calculate_shipping($package = array())\n {\n $prag_gratis_Bucuresti = $this->get_option('prag_gratis_Bucuresti');\n $suma_fixa_Bucuresti = $this->get_option('suma_fixa_Bucuresti');\n $prag_gratis_provincie = $this->get_option('prag_gratis_provincie');\n $suma_fixa_provincie = $this->get_option('suma_fixa_provincie');\n\n $orasdest = ucfirst(strtolower($package['destination']['city']));\n $judetdest_abvr = $package['destination']['state'] ?? '';\n $judetdest = safealternative_get_counties_list($judetdest_abvr);\n\n $tarif_contract = $this->get_option('tarif_contract');\n $tarif_maxim = $this->get_option('tarif_maxim');\n if (empty($tarif_maxim)) $tarif_maxim = 99999;\n\n $ramburs = 0;\n $valoare_cos = 0;\n $greutate = 0;\n\n foreach ($package['contents'] as $product) {\n $ramburs += ($product['line_total'] + $product['line_tax']);\n $valoare_cos += ($product['line_total'] + $product['line_tax']);\n\n // WooCommerce 3.0 or later.\n if (method_exists($product['data'], 'get_height')) {\n $greutate += $this->fix_format($product['data']->get_weight() ?: 1) * $product['quantity'];\n } else {\n $greutate += $this->fix_format($product['data']->weight ?: 1) * $product['quantity'];\n }\n }\n\n $weight_type = get_option('woocommerce_weight_unit');\n if ($weight_type == 'g') {\n $greutate = $greutate / 1000;\n }\n\n if ($greutate < 1) {\n $greutate = 1;\n } else {\n $greutate = round($greutate);\n }\n\n /////////////////////////////////////////////////////////\n $label = $this->title;\n\n if ($prag_gratis_Bucuresti == $prag_gratis_provincie && $ramburs >= $prag_gratis_Bucuresti) {\n $transport = 0;\n $label = $this->title . ': Gratis';\n } else {\n if ($tarif_contract == 'yes' && class_exists('DPDAWB')) {\n global $wpdb;\n $first_zip = $wpdb->get_var(\"SELECT ZipCode FROM courier_zipcodes WHERE County='$judetdest' AND City LIKE '%$orasdest%' LIMIT 1\");\n \n if (isset($_REQUEST['payment_method']) && (addslashes($_REQUEST['payment_method']) != 'cod')) {\n $ramburs = 0;\n }\n\n $req_vars = [\n 'sender_id' => get_option('dpd_sender_id'),\n 'service_ids' => get_option('dpd_service_id'),\n 'recipient_private_person' => 'y',\n 'courier_service_payer' => get_option('dpd_courier_service_payer') ?: 'SENDER',\n 'parcels_count' => get_option('dpd_parcel_count') ?: 1,\n 'total_weight' => $greutate,\n 'recipient_address_site_name' => $orasdest,\n 'recipient_address_state_id' => $judetdest,\n 'recipient_address_postcode' => $first_zip,\n 'autoadjust_pickup_date' => 'y',\n 'cod_amount' => $ramburs,\n 'cod_currency' => get_woocommerce_currencies(),\n ];\n \n $transport = (float) $this->get_option('tarif_implicit') ?: 0;\n \n if (empty($judetdest_abvr) || empty($orasdest)) return;\n \n try {\n $bypass = false;\n if ($judetdest_abvr == \"B\") {\n if ($valoare_cos >= $prag_gratis_Bucuresti) {\n $transport = 0;\n $bypass = true;\n }\n } else {\n if ($valoare_cos >= $prag_gratis_provincie) {\n $transport = 0;\n $bypass = true;\n }\n }\n \n if (!$bypass) {\n $transport = (new SafealternativeDPDShippingClass)->calculate($req_vars);\n }\n \n if ($transport == 0) $label = $this->title . ': Gratis';\n } catch (\\Exception $e) {\n }\n } else {\n if ($judetdest_abvr && $orasdest) {\n if ($judetdest_abvr == \"B\") {\n if ($valoare_cos < $prag_gratis_Bucuresti) $transport = $suma_fixa_Bucuresti;\n if ($valoare_cos >= $prag_gratis_Bucuresti) $transport = 0;\n } else {\n if ($valoare_cos < $prag_gratis_provincie) $transport = $suma_fixa_provincie;\n if ($valoare_cos >= $prag_gratis_provincie) $transport = 0;\n }\n \n if ($transport == 0) $label = $this->title . ': Gratis';\n } else {\n $transport = (float) $this->get_option('tarif_implicit') ?: 0;\n }\n }\n }\n\n $transport = min($transport, $tarif_maxim);\n\n $args = array(\n 'id' => $this->id,\n 'label' => $label,\n 'cost' => $transport,\n 'taxes' => true\n );\n\n if ($transport !== 0 || (strpos($label, 'Gratis') !== false)) {\n $args = apply_filters('safealternative_overwrite_dpd_shipping', $args, $judetdest, $orasdest);\n $this->add_rate($args);\n\n if ($this->get_option('dpd_box') == \"yes\") {\n //Gets the available collectpoint options in the selected city\n if (is_numeric($transport)) $this->get_collect_points_rate($transport);\n }\n }\n }", "title": "" }, { "docid": "b018f4d334bf80388d463a4c250ce949", "score": "0.62385654", "text": "function wpsc_update_shipping_price() {\n\tglobal $wpsc_cart;\n\n\t$quote_shipping_method = $_POST['method'];\n\t$quote_shipping_option = str_replace( array( '®', '™' ), array( '&reg;', '&trade;' ), $_POST['option'] );\n\n if ( ! empty( $quote_shipping_option ) && ! empty( $quote_shipping_method ) ) {\n $wpsc_cart->update_shipping( $quote_shipping_method, $quote_shipping_option );\n }\n\n if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {\n \t\techo json_encode( array( 'shipping' => wpsc_cart_shipping(), 'coupon' => wpsc_coupon_amount(), 'cart_total' => wpsc_cart_total(), 'tax' => wpsc_cart_tax() ) );\n \texit();\n }\n\n}", "title": "" }, { "docid": "336fb0df2a07c711d91dd81dd9f47b5e", "score": "0.62189573", "text": "public function saveShippingMethodAction()\n {\n\n // Pierre Mainguet - Problem with haveAnySlotAvailable() function (to be checked)\n //if(Mage::getModel('ddate/dtime')->getCollection()->count() > 0 && Mage::helper('ddate')->haveAnySlotAvailable()) {\n if (Mage::getModel('ddate/dtime')->getCollection()->count() > 0) {\n if ($this->_expireAjax()) {\n return;\n }\n if ($this->getRequest()->isPost()) {\n $shippingdata = $this->getRequest()->getPost('shipping_method', '');\n $result = $this->getOnepage()->saveShippingMethod($shippingdata);\n // $result will contain error data if shipping method is empty\n if (!$result) {\n $ddatedata = $this->getRequest()->getPost('ddate', '');\n $result = $this->getOnepage()->saveDdate($ddatedata);\n if (!$result) {\n Mage::dispatchEvent(\n 'checkout_controller_onepage_save_shipping_method',\n array(\n 'request' => $this->getRequest(),\n 'quote' => $this->getOnepage()->getQuote(), ));\n $this->getOnepage()->getQuote()->collectTotals();\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n\t\t\t\t\t\t\t\t\t\t\t\t\n /*$result['goto_section'] = 'payment';\n $result['update_section'] = array(\n 'name' => 'payment-method',\n 'html' => $this->_getPaymentMethodsHtml(),\n );*/\n\t\t\t\t\t\t$result['goto_section'] = 'checkcart';\n\t\t\t\t\t\t$result['update_section'] = array(\n 'name' => 'checkcart', \n 'html' => $this->_getCheckcartHtml(),\n );\n /*$result['update_section'] = array(\n 'name' => 'payment-method',\n 'html' => $this->_getPaymentMethodsHtml(),\n );*/\n }\n }\n $this->getOnepage()->getQuote()->collectTotals()->save();\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n }\n } else {\n if ($this->_expireAjax()) {\n return;\n }\n if ($this->getRequest()->isPost()) {\n $data = $this->getRequest()->getPost('shipping_method', '');\n $result = $this->getOnepage()->saveShippingMethod($data);\n // $result will contain error data if shipping method is empty\n if (!$result) {\n Mage::dispatchEvent(\n 'checkout_controller_onepage_save_shipping_method',\n array(\n 'request' => $this->getRequest(),\n 'quote' => $this->getOnepage()->getQuote(), ));\n $this->getOnepage()->getQuote()->collectTotals();\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n\n /*$result['goto_section'] = 'payment';\n $result['update_section'] = array(\n 'name' => 'payment-method',\n 'html' => $this->_getPaymentMethodsHtml(),\n );*/\n\t\t\t\t\t$result['goto_section'] = 'checkcart';\n\t\t\t\t\t$result['update_section'] = array(\n\t\t\t\t\t\t'name' => 'checkcart',\n\t\t\t\t\t\t'html' => $this->_getCheckcartHtml(),\n\t\t\t\t\t);\n }\n $this->getOnepage()->getQuote()->collectTotals()->save();\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n }\n }\n }", "title": "" }, { "docid": "f920f0963c6ae735db43a77f119a7063", "score": "0.6210047", "text": "private function _qualifySingleShippingServiceResult()\n {\n try {\n $shippingServices = Models_Mapper_ShippingConfigMapper::getInstance()->fetchByStatus(Models_Mapper_ShippingConfigMapper::STATUS_ENABLED);\n if (!empty($shippingServices)) {\n $shippingServices = array_map(function ($shipper) {\n return !in_array($shipper['name'], array(\n Shopping::SHIPPING_TRACKING_URL,\n Shopping::SHIPPING_MARKUP,\n Shopping::SHIPPING_PICKUP,\n Shopping::SHIPPING_FREESHIPPING,\n Shopping::ORDER_CONFIG,\n Shopping::SHIPPING_RESTRICTION_ZONES\n )) ? array(\n 'name' => $shipper['name'],\n 'title' => isset($shipper['config']) && isset($shipper['config']['title']) ? $shipper['config']['title'] : null\n ) : null;\n }, $shippingServices);\n }\n\n $shippingServices = array_filter($shippingServices);\n if (empty($shippingServices) || count($shippingServices) > 1) {\n return false;\n }\n\n $shippingService = current($shippingServices);\n $result = Tools_System_Tools::firePluginMethodByPluginName($shippingService['name'], 'calculateShipping', array(), false);\n\n if (!empty($result) && count($result) === 1 && empty($result['error'])) {\n $result = current($result);\n $cart = Tools_ShoppingCart::getInstance();\n\n $shippingData = array(\n 'service' => $shippingService['name'],\n 'type' => isset($result['type']) ? $result['type'] : Shopping::SHIPPING_FLATRATE,\n 'price' => $result['price']\n\n );\n if (!empty($result['service_id'])) {\n $shippingData['service_id'] = $result['service_id'];\n }\n\n if (!empty($result['service_id'])) {\n $shippingData['availability_days'] = $result['availability_days'];\n }\n\n if (!empty($result['service_id'])) {\n $shippingData['service_info'] = $result['service_info'];\n }\n $cart->setShippingData($shippingData);\n $cart->calculate(true);\n $cart->save()->saveCartSession(null);\n $this->_checkoutSession->returnAllowed = array(\n self::STEP_LANDING,\n self::STEP_SHIPPING_OPTIONS,\n self::STEP_SHIPPING_METHOD\n );\n return $this->_renderPaymentZone();\n }\n } catch (Exception $e) {\n Tools_System_Tools::debugMode() && error_log($e->getMessage());\n return false;\n }\n\n return false;\n }", "title": "" }, { "docid": "529666e3019eff20518c80c4a2895ce2", "score": "0.6205933", "text": "public function getShippingAmount();", "title": "" }, { "docid": "e51600de69e107e71efcd3afb0692739", "score": "0.61696374", "text": "public function hasShipping();", "title": "" }, { "docid": "c0a167d4a3dc5e47f9bd08efe41f68f7", "score": "0.61581457", "text": "public function shippingMethod()\r\n\t{\r\n\t\t$this->servePage($this->CHKOUT_STG_1_SHIPPING);\r\n\t}", "title": "" }, { "docid": "2a331c5824cd1fe639ba13ffca3b6f2c", "score": "0.61212546", "text": "function fn_store_locator_calculate_cart_content_before_shipping_calculation($cart, $auth, $calculate_shipping, $calculate_taxes, $options_style, $apply_cart_promotions, &$shipping_cache_tables)\n{\n $shipping_cache_tables[] = 'store_locations';\n $shipping_cache_tables[] = 'store_location_descriptions';\n}", "title": "" }, { "docid": "7441645df17f18ece29f7444345576ee", "score": "0.61105585", "text": "function ams_applicable_shipping_method( WP_REST_Request $request ) {\n\n\t\t$req = $request->get_json_params();\n\t\t$validate = ams_basic_validate( $req, array( 'shipping', 'line_items' ) );\n\t\tif ( $validate != true ) {\n\t\t\treturn $validate;}\n\n\t\t$product_id = sanitize_text_field( $req['product_id'] );\n\t\t$shipping = $req['shipping'];\n\t\t$line_items = $req['line_items'];\n\t\t$free_shipping_by_coupon = rest_sanitize_boolean( $req['free_shipping_by_coupon'] );\n\t\t$args = array(\n\t\t\t'include' => array_column( $line_items, 'product_id' ),\n\t\t);\n\t\t$products = wc_get_products( $args );\n\t\t$cartTotal = 0;\n\t\tforeach ( $products as $key => $product ) {\n\t\t\t$cartTotal += ( wc_get_price_excluding_tax( $product ) * $line_items[ $key ]['quantity'] ); // price without VAT\n\t\t}\n\t\t$stateCode = sanitize_text_field( $shipping['state'] );\n\t\t$postcode = sanitize_text_field( $shipping['postcode'] );\n\t\t$countryCode = sanitize_text_field( $shipping['country'] );\n\t\t$newShippingMethods = array();\n\t\t$shipping_class_ids = array_column( $products, 'shipping_class_id' );\n\t\t$product_qty = array_column( $line_items, 'quantity' );\n\t\t$only_shipping_zone_zero_exist = false;\n\n\t\t// GET REQUEST##########################################\n\t\t$request_a = new WP_REST_Request( 'GET', '/wc/v3/shipping/zones' );\n\t\t$response_a = rest_do_request( $request_a );\n\t\t$server_a = rest_get_server();\n\t\t$data_a = $server_a->response_to_data( $response_a, false );\n\t\t$shippingZones = $data_a;\n\t\t// GET REQUEST##########################################\n\n\t\t\t$shippingZoneId = 0; // Default shipping zone id (Locations not covered by other zones)\n\t\t\tunset( $shippingZones[0] ); // Remove default zone from the zone list which is to be matched.\n\t\t\t$shippingZones = array_values( $shippingZones );\n\n\t\tif ( empty( $shippingZones ) ) {\n\t\t\t$only_shipping_zone_zero_exist = true;}\n\n\t\tforeach ( $shippingZones as $key => $shippingZone ) {\n\t\t\t// Get location of the each zone\n\t\t\t// GET REQUEST##########################################\n\t\t\t$request_b = new WP_REST_Request( 'GET', \"/wc/v3/shipping/zones/{$shippingZone['id']}/locations\" );\n\t\t\t$response_b = rest_do_request( $request_b );\n\t\t\t$server_b = rest_get_server();\n\t\t\t$data_b = $server_b->response_to_data( $response_b, false );\n\t\t\t$shippingZones[ $key ]['locations'] = $data_b;\n\t\t\t// GET REQUEST##########################################\n\n\t\t\tunset( $shippingZones[ $key ]['_links'] );\n\n\t\t\tif ( ! empty( $shippingZones[ $key ]['locations'] ) ) {\n\t\t\t\tforeach ( $shippingZones[ $key ]['locations'] as $locationkey => $locations ) {\n\t\t\t\t\tif ( $shippingZones[ $key ]['locations'][ $locationkey ]['type'] == 'postcode' ) {\n\t\t\t\t\t\t$does_zone_contain_location_of_type_postcode = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$does_zone_contain_location_of_type_postcode = false;}\n\t\t\t\t}\n\t\t\t\tforeach ( $shippingZones[ $key ]['locations'] as $locationkey => $locations ) {\n\t\t\t\t\tunset( $shippingZones[ $key ]['locations'][ $locationkey ]['_links'] );\n\n\t\t\t\t\tif ( $shippingZones[ $key ]['locations'][ $locationkey ]['type'] == 'postcode' ) {\n\t\t\t\t\t\t// if country code and state code does not match but the zone defines post code, we need to match post code\n\n\t\t\t\t\t\t$haystack = $shippingZones[ $key ]['locations'][ $locationkey ]['code'];\n\n\t\t\t\t\t\tif ( strpos( $haystack, '...' ) !== false ) {\n\t\t\t\t\t\t\t$zips = explode( '...', $haystack );\n\t\t\t\t\t\t\tif ( $postcode >= $zips[0] && $postcode <= $zips[1] ) {\n\t\t\t\t\t\t\t\t$shippingZoneId = $shippingZones[ $key ]['id'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} elseif ( strpos( $haystack, '*' ) !== false ) { // if zone defines preg match of zip Ex. 1100*\n\t\t\t\t\t\t\t$haystack = str_replace( '*', '', $haystack );\n\n\t\t\t\t\t\t\tif ( preg_match( \"/^{$haystack}/\", $postcode ) ) {\n\t\t\t\t\t\t\t\t$shippingZoneId = $shippingZones[ $key ]['id'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} elseif ( strtolower( $haystack ) == strtolower( $postcode ) ) {\n\t\t\t\t\t\t\t$shippingZoneId = $shippingZones[ $key ]['id'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// if post code not matched, let's continue the same process for other zones.\n\t\t\t\t\t\t}\n\t\t\t\t\t} elseif ( ( ! $does_zone_contain_location_of_type_postcode ) && ( $shippingZones[ $key ]['locations'][ $locationkey ]['type'] == 'state' ) && ( $shippingZones[ $key ]['locations'][ $locationkey ]['code'] == $countryCode . ':' . $stateCode ) ) {\n\t\t\t\t\t\t$shippingZoneId = $shippingZones[ $key ]['id'];\n\t\t\t\t\t} elseif ( ( ! $does_zone_contain_location_of_type_postcode ) && ( $shippingZones[ $key ]['locations'][ $locationkey ]['type'] == 'country' ) && ( $shippingZones[ $key ]['locations'][ $locationkey ]['code'] == $countryCode ) ) {\n\t\t\t\t\t\t$shippingZoneId = $shippingZones[ $key ]['id'];\n\n\t\t\t\t\t} elseif ( ( ! $does_zone_contain_location_of_type_postcode ) && ( $shippingZones[ $key ]['locations'][ $locationkey ]['type'] == 'continent' ) && ( $shippingZones[ $key ]['locations'][ $locationkey ]['code'] == ams_get_country_continent( $countryCode ) ) ) {\n\t\t\t\t\t\t$shippingZoneId = $shippingZones[ $key ]['id'];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// continue\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( $shippingZoneId != 0 ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else // If no location are associated with particular zone, possible with worldwide location\n\t\t\t{\n\t\t\t\t$shippingZoneId = $shippingZones[ $key ]['id'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// REQUEST##########################################\n\t\t$request_c = new WP_REST_Request( 'GET', \"/wc/v3/shipping/zones/{$shippingZoneId}/methods\" );\n\t\t$response_c = rest_do_request( $request_c );\n\t\t$server_c = rest_get_server();\n\t\t$methods = $server_c->response_to_data( $response_c, false );\n\t\t// REQUEST##########################################\n\n\t\tif ( $shippingZoneId == 0 && empty( $methods ) && $only_shipping_zone_zero_exist ) { // If only zone = 0 present and there are no methods in this zone. Additionally, no other zones found, we need to skip the shipping screen, with 0 price.\n\t\t\t\t$newShippingMethods[] = array(\n\t\t\t\t\t'id' => (string) ( 0 ),\n\t\t\t\t\t'title' => 'zone_zero_with_no_shipping_methods',\n\t\t\t\t\t'method_id' => 'zone_zero_with_no_shipping_methods',\n\t\t\t\t\t'cost' => floatval( '0.00' ),\n\t\t\t\t);\n\t\t\t\treturn( rest_ensure_response( $newShippingMethods ) );\n\t\t}\n\n\t\tforeach ( $methods as $methodKey => $method ) {\n\t\t\tif ( isset( $method['settings']['min_amount'] ) ) {\n\t\t\t\tif ( $method['settings']['requires']['value'] == 'min_amount' && $cartTotal > $method['settings']['min_amount']['value'] ) {\n\t\t\t\t\t\t$methods[ $methodKey ]['methodcost'] = 0;\n\t\t\t\t\t\tunset( $methods[ $methodKey ]['_links'] );\n\n\t\t\t\t} elseif ( ( $method['settings']['requires']['value'] == 'coupon' ) && ( $free_shipping_by_coupon == true ) ) {\n\n\t\t\t\t\t\t$methods[ $methodKey ]['methodcost'] = 0;\n\t\t\t\t\t\tunset( $methods[ $methodKey ]['_links'] );\n\n\t\t\t\t} elseif ( ( $method['settings']['requires']['value'] == 'both' ) && ( $free_shipping_by_coupon == true ) && ( $cartTotal > $method['settings']['min_amount']['value'] ) ) {\n\n\t\t\t\t\t\t$methods[ $methodKey ]['methodcost'] = 0;\n\t\t\t\t\t\tunset( $methods[ $methodKey ]['_links'] );\n\n\t\t\t\t} elseif ( ( $method['settings']['requires']['value'] == 'either' ) && ( $free_shipping_by_coupon == true || $cartTotal > $method['settings']['min_amount']['value'] ) ) {\n\n\t\t\t\t\t\t$methods[ $methodKey ]['methodcost'] = 0;\n\t\t\t\t\t\tunset( $methods[ $methodKey ]['_links'] );\n\n\t\t\t\t} elseif ( $method['settings']['requires']['value'] == '' ) {\n\n\t\t\t\t\t\t$methods[ $methodKey ]['methodcost'] = 0;\n\t\t\t\t\t\tunset( $methods[ $methodKey ]['_links'] );\n\n\t\t\t\t} else {\n\t\t\t\t\tunset( $methods[ $methodKey ] ); // remove methods those does not require amount to be applicable (in case of coupon or both coupon and amount)\n\t\t\t\t}\n\t\t\t} elseif ( isset( $method['settings']['type'] ) ) {\n\t\t\t\t\t$methodCost = $method['settings']['cost']['value'];\n\t\t\t\t\t$methodCost = trim( trim( $methodCost, ']' ), '[' );\n\t\t\t\tif ( strpos( $methodCost, 'fee percent' ) !== false ) {\n\t\t\t\t\t$methodCost = str_replace( 'fee percent', 'fee_percent', $methodCost );\n\t\t\t\t\t$methodCostArr = explode( ' ', $methodCost );\n\n\t\t\t\t\tforeach ( $methodCostArr as $methodCostkey => $methodCostArrVal ) {\n\t\t\t\t\t\t$methodCostArrVal = explode( '=\"', trim( $methodCostArrVal, '\"' ) );\n\t\t\t\t\t\tswitch ( $methodCostArrVal[0] ) {\n\t\t\t\t\t\t\tcase 'fee_percent':\n\t\t\t\t\t\t\t\t$fee_percent = $methodCostArrVal[1];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'min_fee':\n\t\t\t\t\t\t\t\t$min_fee = $methodCostArrVal[1];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'max_fee':\n\t\t\t\t\t\t\t\t$max_fee = $methodCostArrVal[1];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$methodNewCost = ( $cartTotal * $fee_percent ) / 100;\n\n\t\t\t\t\tif ( isset( $min_fee ) && $min_fee > $methodNewCost ) {\n\t\t\t\t\t\t$methodNewCost = $min_fee;\n\t\t\t\t\t}\n\t\t\t\t\tif ( isset( $max_fee ) && $methodNewCost > $max_fee ) {\n\t\t\t\t\t\t$methodNewCost = $max_fee;\n\t\t\t\t\t}\n\t\t\t\t} elseif ( strpos( $methodCost, 'qty' ) !== false ) {\n\t\t\t\t\t$multiplier = (float) $methodCost;\n\t\t\t\t\t$qty = array_sum( $product_qty ); // $product_qty[$shippinkey];\n\t\t\t\t\t$methodNewCost = ( $multiplier * $qty );\n\t\t\t\t} else {\n\t\t\t\t\t$methodNewCost = (float) $methodCost;\n\t\t\t\t}\n\n\t\t\t\t\t$methods[ $methodKey ]['settings']['cost']['value'] = $methodNewCost;\n\n\t\t\t\tforeach ( $shipping_class_ids as $shippinkey => $shipping_class ) {\n\n\t\t\t\t\t$shippingClassId = $shipping_class != 0 ? 'class_cost_' . $shipping_class : 'no_class_cost';\n\t\t\t\t\t$currCost = $method['settings'][ $shippingClassId ]['value'];\n\t\t\t\t\t$currCost = trim( trim( $currCost, ']' ), '[' );\n\t\t\t\t\t$methodCost = $method['settings']['cost']['value'];\n\n\t\t\t\t\tif ( strpos( $currCost, 'fee percent' ) !== false ) {\n\t\t\t\t\t\t$currCost = str_replace( 'fee percent', 'fee_percent', $currCost );\n\t\t\t\t\t\t$currCostArr = explode( ' ', $currCost );\n\n\t\t\t\t\t\tforeach ( $currCostArr as $currCostkey => $currCostArrVal ) {\n\t\t\t\t\t\t\t$currCostArrVal = explode( '=\"', trim( $currCostArrVal, '\"' ) );\n\t\t\t\t\t\t\tswitch ( $currCostArrVal[0] ) {\n\t\t\t\t\t\t\t\tcase 'fee_percent':\n\t\t\t\t\t\t\t\t\t$fee_percent = $currCostArrVal[1];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'min_fee':\n\t\t\t\t\t\t\t\t\t$min_fee = $currCostArrVal[1];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'max_fee':\n\t\t\t\t\t\t\t\t\t$max_fee = $currCostArrVal[1];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$methodNewCost = ( $cartTotal * $fee_percent ) / 100;\n\n\t\t\t\t\t\tif ( isset( $min_fee ) && $min_fee > $methodNewCost ) {\n\t\t\t\t\t\t\t$methodNewCost = $min_fee;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( isset( $max_fee ) && $methodNewCost > $max_fee ) {\n\t\t\t\t\t\t\t$methodNewCost = $max_fee;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$methods[ $methodKey ]['cost'] = $methodNewCost;\n\n\t\t\t\t\t} elseif ( strpos( $currCost, 'qty' ) !== false ) {\n\t\t\t\t\t\t$multiplier = (float) $currCost;\n\t\t\t\t\t\t$qty = $product_qty[ $shippinkey ];\n\t\t\t\t\t\t$methodNewCost = ( $multiplier * $qty );\n\t\t\t\t\t\t$methods[ $methodKey ]['cost'][] = $methodNewCost;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$methodNewCost = (float) $currCost;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( $method['settings']['type']['value'] == 'class' ) {\n\t\t\t\t\t$methods[ $methodKey ]['methodcost'] = array_sum( $methods[ $methodKey ]['cost'] ) + $methods[ $methodKey ]['settings']['cost']['value']; // Bugfix +$methodCost\n\t\t\t\t\tunset( $methods[ $methodKey ]['_links'] );\n\t\t\t\t} elseif ( $method['settings']['type']['value'] == 'order' ) {\n\t\t\t\t\t$methods[ $methodKey ]['methodcost'] = max( $methods[ $methodKey ]['cost'] ) + $methods[ $methodKey ]['settings']['cost']['value']; // Bugfix +$methodCost\n\t\t\t\t\tunset( $methods[ $methodKey ]['_links'] );\n\n\t\t\t\t} else {\n\t\t\t\t\t// Continue\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$methods[ $methodKey ]['methodcost'] = $methods[ $methodKey ]['settings']['cost']['value'] ? $methods[ $methodKey ]['settings']['cost']['value'] : 0;\n\t\t\t\tunset( $methods[ $methodKey ]['_links'] );\n\t\t\t}\n\t\t\tif ( $methods[ $methodKey ]['enabled'] != 1 ) {\n\t\t\t\tunset( $methods[ $methodKey ] );\n\t\t\t} else {\n\t\t\t\t$newShippingMethods[] = array(\n\t\t\t\t\t'id' => (string) $methods[ $methodKey ]['id'],\n\t\t\t\t\t'title' => $methods[ $methodKey ]['title'],\n\t\t\t\t\t'method_id' => $methods[ $methodKey ]['method_id'],\n\t\t\t\t\t'cost' => floatval( $methods[ $methodKey ]['methodcost'] ),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t$methods = array_values( $methods );\n\t\tif ( ! $newShippingMethods ) {\n\t\t\treturn( rest_ensure_response( array() ) ); }\n\t\treturn( rest_ensure_response( $newShippingMethods ) );\n\n\t}", "title": "" }, { "docid": "b84d8b600235a0ecbe1bbebd3382c58a", "score": "0.61031616", "text": "public function shouldReloadShippingMethodsOnCountryChange()\n {\n return $this->_helper()->shouldReloadShippingMethodsOnCountryChange();\n }", "title": "" }, { "docid": "3a7e4c4613b3f20709be34e36bcb60c9", "score": "0.6102723", "text": "public function testUpdateShippingTemplate()\n {\n }", "title": "" }, { "docid": "b5a7f6def977969f2280cd9d725899ee", "score": "0.6090468", "text": "public function addShippingData()\n {\n $this->apiOrder->setShippingAddress($this->wcShippingAddress());\n }", "title": "" }, { "docid": "a1e5097854d90191dfdb6e1cd1231bb8", "score": "0.6084234", "text": "function SK_shipping_cash(){\n\t\tforeach ($this->array as $key => $value) {\n\t\t\tif ($value['príjemca-štát'] == 'Slovenská republika [SK]' && $value['dobierka'] == true) {\n\t\t\t\tif ($this->get_minMax($value['dobierka'], 0.01, 3300.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'cash on delivery', 0.6);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f1312a3076e3cc119c471659ea0d5bcc", "score": "0.6076114", "text": "protected function RecalculateVAT()\n {\n $this->GetActiveVATList()->GoToStart();\n while ($oVat = $this->GetActiveVATList()->Next()) {\n $oVat->reset();\n $dGrossTotal = $this->GetBasketTotalForVatGroup($oVat, false);\n $oVat->addValue($dGrossTotal);\n }\n\n $this->dCostVATWithoutShipping = $this->GetActiveVATList()->GetTotalVatValue();\n $this->GetActiveVATList()->GoToStart();\n\n $oShopConf = TdbShop::GetInstance();\n if (true === $oShopConf->fieldShippingVatDependsOnBasketContents && $this->dCostVATWithoutShipping > 0) {\n if (is_null($this->GetActiveVouchers()) || !$this->GetActiveVouchers()->HasFreeShippingVoucher()) {\n // need to add the shipping costs to the max vat group\n $oVatMax = $this->GetLargestVATObject();\n if (!is_null($oVatMax)) {\n $this->GetActiveVATList()->GoToStart();\n $bDone = false;\n while (!$bDone && ($oVat = $this->GetActiveVATList()->Next())) {\n if ($oVatMax->id == $oVat->id && !is_null($this->GetActiveShippingGroup())) {\n $dGrossTotal = $this->GetActiveShippingGroup()->GetShippingCostsForBasket();\n $oVat->addValue($dGrossTotal);\n $bDone = true;\n }\n }\n }\n }\n } else {\n $oActiveShippingGroup = $this->GetActiveShippingGroup();\n if (null !== $oActiveShippingGroup) {\n $oVatShippingGroup = $oActiveShippingGroup->GetVat();\n if (null !== $oVatShippingGroup) {\n $this->GetActiveVATList()->GoToStart();\n $bDone = false;\n while (!$bDone && ($oVat = $this->GetActiveVATList()->Next())) {\n if ($oVatShippingGroup->id === $oVat->id) {\n $dGrossTotal = $oActiveShippingGroup->GetShippingCostsForBasket();\n $oVat->addValue($dGrossTotal);\n $bDone = true;\n }\n }\n }\n }\n }\n\n $this->dCostVAT = $this->GetActiveVATList()->GetTotalVatValue();\n $this->GetActiveVATList()->GoToStart();\n }", "title": "" }, { "docid": "cf455e6e5fbe93c30b0ee3980dd937b5", "score": "0.6069586", "text": "public function shouldReloadShippingMethodsOnRegionChange()\n {\n return $this->_helper()->shouldReloadShippingMethodsOnRegionChange();\n }", "title": "" }, { "docid": "1068c93f2cc6d488a9f49e2dd749a1f5", "score": "0.6060922", "text": "function fn_store_locator_calculate_cart_post($cart, $auth, $calculate_shipping, $calculate_taxes, $options_style, $apply_cart_promotions, $cart_products, &$product_groups)\n{\n foreach ($product_groups as $group_key => $group) {\n $selected_shipping = isset($group['chosen_shippings']) ? reset($group['chosen_shippings']) : 0;\n $selected_shipping_id = isset($selected_shipping['shipping_id']) ? $selected_shipping['shipping_id'] : 0;\n\n foreach ($group['shippings'] as $shipping_id => $shipping) {\n $is_selected_shipping = $selected_shipping_id == $shipping_id;\n $is_store_selected = !empty($cart['select_store'][$group_key][$shipping_id]);\n\n if (($is_selected_shipping && $is_store_selected)\n || empty($shipping['data']['stores'])\n ) {\n continue;\n }\n\n if (!empty(array_column($shipping['data']['stores'], 'pickup_rate'))) {\n $min_rate = min(array_column($shipping['data']['stores'], 'pickup_rate'));\n $product_groups[$group_key]['shippings'][$shipping_id]['pickup_rate_from'] = $min_rate;\n }\n }\n }\n}", "title": "" }, { "docid": "0a55d6aa5cf8d5ad2a451612e71f50a4", "score": "0.6058867", "text": "public function calculate()\n {\n $data = ['status' => false];\n\n if (! $this->isAvailable()) {\n $data['message'] = 'Unavailable shipping method';\n\n return $data;\n }\n\n $cart = Cart::getCart();\n\n if (empty($cart->shipping_address)) {\n $data['message'] = 'No shipping address';\n\n return $data;\n }\n\n // Get shipping address\n $zipOrigination = core()->getConfigData('sales.shipping.origin.zipcode') ?? '';\n $zipDestination = $cart->shipping_address->postcode ?? '';\n\n if (empty($zipOrigination)) {\n $data['message'] = 'No Zip/Postal code in dashboard configuration';\n\n return $data;\n }\n\n $shippingInfo = [\n 'zip_origination' => $zipOrigination,\n 'zip_destination' => $zipDestination,\n ];\n $defaultAmount = $this->getConfigData('default_rate') ?? 0;\n\n foreach ($cart->items as $item) {\n if ($item->product->getTypeInstance()->isStockable()) {\n $defaultAmount = $defaultAmount + ($defaultAmount * $item->quantity);\n $shipping = $item->child->product->product ?? $item->product;\n\n $shippingInfo['package'] = [\n 'weight' => ($shippingInfo['package']['weight'] ?? 0) + ((int) ($shipping->weight ?? 0) * $item->quantity),\n 'length' => ($shippingInfo['package']['length'] ?? 0) + ((int) ($shipping->depth ?? 0) * $item->quantity),\n 'width' => ($shippingInfo['package']['width'] ?? 0) + ((int) ($shipping->width ?? 0) * $item->quantity),\n 'height' => ($shippingInfo['package']['height'] ?? 0) + ((int) ($shipping->height ?? 0) * $item->quantity),\n ];\n }\n }\n\n // Get shipping rates\n $rateDetails = uspsCalculateShippingRates($shippingInfo);\n\n // Check calling api status\n if (isset($rateDetails['status']) && !$rateDetails['status'])\n return $rateDetails;\n\n $services = [];\n\n if (! empty($rateDetails['MailService']))\n $rateDetails = [$rateDetails];\n\n foreach ($rateDetails as $rateDetail) {\n if (! empty($rateDetail['MailService'])) {\n $mailService = str_replace([\n '&lt;sup&gt;&#8482;&lt;/sup&gt;',\n '&lt;sup&gt;&#174;&lt;/sup&gt;'\n ], '', $rateDetail['MailService']);\n $object = new CartShippingRate;\n $object->carrier = 'uspsrate';\n $object->carrier_title = $this->getConfigData('title');\n $object->method = 'uspsrate_' . (str_replace([' ', '-'], '_', $mailService) ?? '');\n $object->method_title = $mailService;\n $object->method_description = $mailService;\n $object->price += $rateDetail['Rate'] ?? core()->convertPrice($defaultAmount);\n $object->base_price += $rateDetail['Rate'] ?? $defaultAmount;\n $services[] = $object;\n unset($object);\n }\n }\n\n $data['status'] = true;\n $data['services'] = $services;\n\n return $data;\n }", "title": "" }, { "docid": "1e5bc1e46d4b78346ac65baaeae97cb5", "score": "0.60247844", "text": "public function shouldReloadOnCountryChange()\n {\n return $this->_helper()->shouldReloadShippingMethodsOnCountryChange();\n }", "title": "" }, { "docid": "58df72f6a97ab3fc64af863b2f0e6597", "score": "0.6020196", "text": "protected function processShippingTax() {\n\t\t// will never happen because API will returns always this field\n\t\tif (!array_key_exists('Shipping', $this->o['orderTotal'])) {\n\t\t\t$this->o['orderTotal']['Shipping'] = array(\n\t\t\t\t'value' => 0.0,\n\t\t\t\t'title' => $this->marketplaceTitle,\n\t\t\t\t'class' => 'ot_shipping',\n\t\t\t\t'sort_order' => 50,\n\t\t\t);\n\t\t}\n\t\t\n\t\t$existingShippingCost = (float)MagnaDB::gi()->fetchOne(eecho('\n\t\t SELECT value\n\t\t FROM '.TABLE_ORDERS_TOTAL.'\n\t\t WHERE orders_id = '.$this->cur['OrderID'].'\n\t\t AND class = \"ot_shipping\"\n\t\t ORDER BY value DESC \n\t\t LIMIT 1\n\t\t', $this->verbose));\n\n\t\t$totalNumberOfItems = (int)MagnaDB::gi()->fetchOne(eecho('\n\t\t\tSELECT SUM(products_quantity)\n\t\t\t FROM '.TABLE_ORDERS_PRODUCTS.'\n\t\t\t WHERE orders_id = '.$this->cur['OrderID'].'\n\t\t', $this->verbose));\n\n\t\t$totalPriceWOShipping = (float)MagnaDB::gi()->fetchOne(eecho('\n\t\t SELECT SUM(final_price)\n\t\t FROM '.TABLE_ORDERS_PRODUCTS.'\n\t\t WHERE orders_id = '.$this->cur['OrderID'].'\n\t\t', $this->verbose));\n\t\t\n\t\tif (($existingShippingCost > 0) || ($totalNumberOfItems > $this->o['_processingData']['ProductsCount'])) {\n\t\t\t/* Merged order */\n\t\t\t$this->o['orderTotal']['Shipping']['value'] = $this->calculateShippingCost(\n\t\t\t\t$existingShippingCost,\n\t\t\t\t$this->o['orderTotal']['Shipping']['value'],\n\t\t\t\t$totalNumberOfItems,\n\t\t\t\t$totalPriceWOShipping,\n\t\t\t\t$this->o['_processingData']['ProductsCount']\n\t\t\t);\n\t\t\t$this->o['_processingData']['mergedOrders'] = true;\n\t\t\tif ($this->verbose) {\n\t\t\t\techo \"\\n\".'Merged ShippingCost: '.$this->o['orderTotal']['Shipping']['value'].\"\\n\";\n\t\t\t}\n\t\t}\n\t\tparent::processShippingTax();\n\t}", "title": "" }, { "docid": "f6a0349bf7477bd1ed7a80f9e1aa1a84", "score": "0.6018672", "text": "function billing_shipping_address() {\n\t\t//\n\t}", "title": "" }, { "docid": "96953de71275d6528a3beb2b5827b773", "score": "0.60044146", "text": "public function getTaxedShippingPrice();", "title": "" }, { "docid": "1cf27b28d88a440fc45983a894eb1ee4", "score": "0.60039365", "text": "public function rp_shipChargeUpdate(){\n\t\tif(isset($_SESSION['SHOPWALA_SESS_CART_ID']) && $_SESSION['SHOPWALA_SESS_CART_ID']>0 && isset($_SESSION['SHOPWALA_SESS_PINCODE']) && $_SESSION['SHOPWALA_SESS_PINCODE']!=\"\"){\n\t\t\t$shop_cart_r = parent::rp_getData(\"cartitems\",\"*\",\"cart_id='\".$_SESSION['SHOPWALA_SESS_CART_ID'].\"'\");\n\t\t\tif(mysql_num_rows($shop_cart_r)>0){\n\t\t\t\twhile($shop_cart_d = mysql_fetch_array($shop_cart_r)){\n\t\t\t\t\t$pid \t\t= $shop_cart_d['pid'];\n\t\t\t\t\t$subpid \t= $shop_cart_d['subpid'];\n\t\t\t\t\t$qty \t\t= $shop_cart_d['qty'];\n\t\t\t\t\t$ship_charge = parent::rp_getShippingCharge($_SESSION['SHOPWALA_SESS_PINCODE'],$pid,$subpid);\n\t\t\t\t\t$ship_charge = parent::rp_num($ship_charge*$qty);\n\t\t\t\t\t$rows \t= array(\n\t\t\t\t\t\t\"ship_charge\"\t\t=> $ship_charge,\n\t\t\t\t\t);\n\t\t\t\t\t$where\t= \"pid='\".$pid.\"' AND cart_id='\".$_SESSION['SHOPWALA_SESS_CART_ID'].\"'\";\n\t\t\t\t\tparent::rp_update(\"cartitems\",$rows,$where);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5e16d0b97cb43111de26efafa7f0d858", "score": "0.5999463", "text": "public function adjustCost()\n {\n }", "title": "" }, { "docid": "c2d8f2ff33896c345074bb8d15232a0b", "score": "0.5989774", "text": "public function shouldReloadOnPostcodeChange()\n {\n return $this->_helper()->shouldReloadTotalsOnBillingPostcodeChange();\n }", "title": "" }, { "docid": "9224a5dc2fde23b0491c93cf6d292322", "score": "0.5985802", "text": "function update_order_review( $array )\n{ \n $packages = WC()->cart->get_shipping_packages();\n\n foreach ($packages as $key => $value) {\n $shipping_session = \"shipping_for_package_$key\";\n unset(WC()->session->$shipping_session);\n }\n\n WC()->cart->calculate_shipping();\n return;\n}", "title": "" }, { "docid": "5ef60cdd80b4823000ba947f11172dc4", "score": "0.59639144", "text": "function beforeCallSetExpressCheckout(Sb $sb):void {\n\t\tif (self::eligible($sb['address'])) {\n\t\t\t$sb['suppress_shipping'] = true;\n\t\t}\n\t}", "title": "" }, { "docid": "fd641825425f5a3053e97e20287fd5e9", "score": "0.59616995", "text": "function calculate_shipping() {\n\t \tglobal $current_user;\n\t \t$available_services = unserialize($this->services);\n\t\t\t$this->shipping_total \t= 0;\n\t\t\t$this->shipping_tax \t= 0;\n\t\t\t$this->insured_value \t= 0;\n\t\t\t$this->length\t\t\t= false;\n\t\t\t$this->width\t\t\t= false;\n\t\t\t$this->height\t\t\t= false;\n\t \t$weight \t\t\t\t= 0;\n\t\t\t$rates \t\t\t\t\t= array();\n \t\t$this->combined \t\t= false;\n \t\t$this->separate\t\t\t= false;\n\t\t\t$weight_unit = get_option('jigoshop_weight_unit');\n\t\t\tswitch($weight_unit){\n\t\t\t\tcase \"lbs\":\n\t\t\t\t\t$this->weight_unit = \"LBS\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"kg\":\n\t\t\t\t\t$this->weight_unit = \"KGS\";\n\t\t\t}\n\t \t// Get the weight of the cart\n \t\tif (sizeof(jigoshop_cart::get_cart())>0) : \n\t\t\t\tforeach (jigoshop_cart::get_cart() as $item_id => $values) :\n\t\t\t\t\t$_product = $values['data'];\n\t\t\t\t\t$_product = new jigoshop_product( $_product->id );\n\t\t\t\t\t\n\t\t\t\t\t/*DW Added Qty for items in cart*/ \n\t\t\t\t\t if( jigoshop_cart::needs_shipping() ) :\n\t\t\t\t\t\t$ships_separate = get_post_meta($_product->id, '_ups_ships_separate',true);\n\t\t\t\t\t\t$this->insured_value += $_product->get_price() * $values['quantity'];\n\t\t\t\t\t\t$this->package_count= 1;\n\t\t\t\t\t\tif($ships_separate !=\"yes\"):\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->combined = true;\n\t\t\t\t\t\t\t$weight = $weight + ($_product->get_weight() * $values['quantity']);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($_product->has_dimensions(true)) :\n\t \t// determine longest product in cart\n\t \tif (!$this->length || $this->length < $_product->get_length()) :\n\t\t\t\t\t\t\t\t\t$this->length = $_product->get_length();\n\t\t endif;\n\t\t // determine widest product in cart\n\t \t if (!$this->width || $this->width < $_product->get_width()) :\n\t \t $this->width = $_product->get_width();\n\t \t endif;\n\t\t // determine overall height of products in the cart\n\t \t $this->height += $_product->get_height();\n\t \t \t \tendif;\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$separate_weight = $_product->get_weight();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($_product->has_dimensions(true)) :\n\t \t// determine longest product in cart\n\t \t$this->ind_length = $_product->get_length();\n\t\t // determine widest product in cart\n\t \t $this->ind_width = $_product->get_width();\n\t \t // determine overall height of products in the cart\n\t \t $this->ind_height = $_product->get_height();\n\t\t\t\t\t\t\t\t$this->ind_insured_value = $_product->get_price_excluding_tax($values['quantity']); \n\t \t \t \tendif;\n\t\t\t\t\t\t\t$ind_dimensions = false;\n\t\t\t\t\t\t\tif($this->ind_length > 0 && $this->ind_width > 0 && $this->ind_height > 0 ):\n\t\t\t\t\t\t\t\t$ind_dimensions = true;\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->package_count += $values['quantity'];\n\t\t\t\t\t\t\t$i = 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile($i <= $values['quantity']):\n\t\t\t\t\t\t\t\tif($ind_dimensions):\n\t\t\t\t\t\t\t\t\t$this->separate[] =\t'<Package> \n\t\t\t\t\t\t\t\t\t\t\t\t<PackagingType> \n\t\t\t\t\t \t\t\t\t\t\t\t<Code>02</Code> \n\t\t\t\t\t\t\t\t\t\t\t\t\t</PackagingType>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Dimensions>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<UnitOfMeasurement>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Code>'.$this->dimension_unit.'</Code>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</UnitOfMeasurement>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Length>'.$this->ind_length.'</Length>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Width>'.$this->ind_width.'</Width>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Height>'.$this->ind_height.'</Height>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Dimensions> \n\t\t\t\t\t\t\t\t\t\t\t\t\t<PackageWeight> \n\t\t\t\t\t\t \t\t\t\t\t\t\t<UnitOfMeasurement> \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Code>'.$this->weight_unit.'</Code> \n\t\t\t\t\t\t \t\t\t\t\t\t\t</UnitOfMeasurement> \n\t\t\t\t\t\t \t\t\t\t\t\t\t<Weight>'.$separate_weight.'</Weight> \n\t\t\t\t\t\t\t\t\t\t\t\t\t</PackageWeight>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<PackageServiceOptions>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<InsuredValue>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CurrencyCode>USD</CurrencyCode>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MonetaryValue>'.$this->ind_insured_value.'</MonetaryValue>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</InsuredValue>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</PackageServiceOptions> \n\t\t\t\t \t\t\t\t\t\t</Package>'; \n\t\t\t\t\t\t\t else:\n\t\t\t\t\t\t\t\t\t$this->separate[] = '<Package> \n\t\t\t\t\t\t\t\t\t\t\t\t<PackagingType> \n\t\t\t\t\t \t\t\t\t\t\t\t<Code>02</Code> \n\t\t\t\t\t\t\t\t\t\t\t\t\t</PackagingType>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<PackageWeight> \n\t\t\t\t\t\t \t\t\t\t\t\t\t<UnitOfMeasurement> \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Code>'.$this->weight_unit.'</Code> \n\t\t\t\t\t\t \t\t\t\t\t\t\t</UnitOfMeasurement> \n\t\t\t\t\t\t \t\t\t\t\t\t\t<Weight>'.$separate_weight.'</Weight> \n\t\t\t\t\t\t\t\t\t\t\t\t\t</PackageWeight>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<PackageServiceOptions>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<InsuredValue>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<CurrencyCode>USD</CurrencyCode>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MonetaryValue>'.$this->ind_insured_value.'</MonetaryValue>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</InsuredValue>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</PackageServiceOptions> \n\t\t\t\t \t\t\t\t\t</Package>';\n\t\t\t\t\t\t\t endif;\n\t\t\t\t\t\t\t\t$i +=1;\t\n\t\t\t\t\t\t\tendwhile;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\n\t\t\t\t\tendif;\n \t\t\tendforeach; \n \t\tendif;\n\t\t\t\n\t\t\tif($weight > 0 && $weight < 1):\n\t\t\t\t$weight = 1;\n\t\t\tendif;\n\t\t\t\n\t\t\t$this->weight = $weight;\n\t\t\t//Make UPS call for the order\n\t\t\t/*DW 3/5/2011*/\n\t\t\t$this->dest_zip \t= jigoshop_customer::get_shipping_postcode();\n\t\t\t$this->dest_country = jigoshop_customer::get_shipping_country();\n\t\t\t\n\t\t\tif(!$this->dest_zip ):\n\t\t\t\t$this->set_error_message('Please enter a postal code to receive UPS rates');\n\t\t\tendif;\n\t \t$this->calculate_rate();\n\t\t\t$cheapest_price = $this->get_cheapest_price();\n\t\t\t\n if (!empty($cheapest_price) && $cheapest_price > 0 && $cheapest_price!= NULL) :\n $this->shipping_total = $cheapest_price;\n\t\t\telse:\n\t\t\t\t$this->has_error = empty($this->rates);\n endif;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "668a2d4236f353df5a7ea707410d244f", "score": "0.595243", "text": "function woocommerce_bundle_rate_shipping_init() {\n\n // Load plugin text domain\n load_plugin_textdomain('woocommerce-bundle-rate-shipping', false, dirname( plugin_basename( __FILE__ ) ) . '/languages');\n\n // Check whether we are updated to the most recent version\n $version = mktime(0,0,0,3,07,2013);\n $db_version = get_option('woocommerce_enda_bundle_rate_version');\n if ( $db_version === false || $db_version < $version ) { \n require_once('upgrade.class.php'); \n\n enda_woocommerce_bundlerate_upgrade::do_upgrade($version, $db_version);\n update_option('woocommerce_enda_bundle_rate_version', $version);\n }\n}", "title": "" }, { "docid": "331ebcb43cc94e6c77088023edeee62f", "score": "0.5950243", "text": "public function onShippingStatusChange($order);", "title": "" }, { "docid": "d6a26dd946f7d78889b6f457eb131138", "score": "0.59321547", "text": "public function shouldReloadOnRegionChange()\n {\n return $this->_helper()->shouldReloadShippingMethodsOnRegionChange();\n }", "title": "" }, { "docid": "d0d0d19160a322266f4597096b6dde1d", "score": "0.5931527", "text": "public function saveAddressTriggerAction()\n {\n if ($this->_expireAjax()) {\n return;\n }\n $result = $this->_result;\n if ($this->getRequest()->isPost()) {\n $dataBilling = $this->getRequest()->getPost('billing', array());\n $customerAddressId = $this->getRequest()->getPost('billing_address_id', false);\n\n if (isset($dataBilling['email'])) {\n $dataBilling['email'] = trim($dataBilling['email']);\n }\n $saveBilling = Mage::helper('securedcheckout/checkout_address')->saveBilling($dataBilling, $customerAddressId);\n $useForShipping = isset($dataBilling['use_for_shipping']) ? $dataBilling['use_for_shipping'] : 0;\n if ($useForShipping == 0) {\n Mage::getSingleton('checkout/session')->setData('same_as_billing', 0);\n $data_shipping = $this->getRequest()->getPost('shipping', array());\n $data_shipping['same_as_billing'] = 0;\n $customerAddressId = $this->getRequest()->getPost('shipping_address_id', false);\n $saveShipping = Mage::helper('securedcheckout/checkout_address')->saveShipping($data_shipping, $customerAddressId);\n } else if ($useForShipping == 2) {\n if (Mage::helper('core')->isModuleOutputEnabled('Pook_CollectInStore') && Mage::getStoreConfigFlag('carriers/collectinstore/active')) {\n $carrier = Mage::getModel('pook_collectinstore/carrier_collectInStore');\n /* Set shipping address to configured store address... */\n $data_shipping = array(\n 'address_id' => null,\n 'firstname' => $carrier->getConfigData('address_firstname'),\n 'lastname' => $carrier->getConfigData('address_lastname'),\n 'company' => $carrier->getConfigData('address_company'),\n 'street' => array(\n $carrier->getConfigData('address_line1'),\n $carrier->getConfigData('address_line2')\n ),\n 'city' => $carrier->getConfigData('address_city'),\n 'region_id' => 1,\n 'region' => $carrier->getConfigData('address_region'),\n 'postcode' => $carrier->getConfigData('address_postcode'),\n 'country_id' => $carrier->getConfigData('address_country'),\n 'telephone' => $carrier->getConfigData('address_telephone'),\n 'save_in_address_book' => 0,\n 'same_as_billing' => 2\n );\n\n $this->getQuote()->setTotalsCollectedFlag(true);\n $saveShipping = $this->getOnepage()->saveShipping($data_shipping, false);\n /* Set shipping method to collectinstore... */\n $method = $carrier->getCode() . '_' . $carrier->getCode();\n $this->getQuote()->setTotalsCollectedFlag(false);\n /* Now reset TotalsCollectedFlag so the Shipping/shippingMethod totals are calculated. */\n $this->getShippingAddress()->setShippingMethod($method);\n Mage::getSingleton('checkout/session')->setData('same_as_billing', 2);\n }\n } else {\n Mage::getSingleton('checkout/session')->setData('same_as_billing', 1);\n }\n if (isset($saveShipping)) {\n $saveResult = array_merge($saveBilling, $saveShipping);\n } else {\n $saveResult = $saveBilling;\n }\n\n if (is_array($saveResult) && isset($saveResult['error'])) {\n if (is_array($saveResult['message'])) {\n $result['messages'] = array_merge($result['messages'], $saveResult['message']);\n } else {\n $result['messages'] = array_merge($result['messages'], $saveResult['message']);\n\n }\n $result['success'] = false;\n }\n if (1 == count($shippingRates = $this->collectShippingRates()->getAllShippingRates())) {\n $this->getShippingAddress()->setShippingMethod($shippingRates[0]->getCode());\n }\n /**\n * Set Default Shipping Method\n **/\n Mage::helper('securedcheckout/checkout_address')->setDefaultShippingMethod($shippingRates, $this->getShippingAddress());\n $this->collectQuote();\n $result['blocks'] = $this->getBlockHelper()->getActionBlocks();\n } else {\n $result['messages'][] = $this->__('Please enter billing address information.');\n $result['success'] = false;\n }\n $this->bodyResponse($result);\n }", "title": "" }, { "docid": "6f64f1660eaa44e818feafb526d7b481", "score": "0.59293854", "text": "public function testPOSTShippingMethods()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "c41e7353cbb2ad6f7089a9b76c5d00ed", "score": "0.59233505", "text": "public function collectRates(Mage_Shipping_Model_Rate_Request $request) {\n \n if (!Mage::getStoreConfig('carriers/'.$this->_code.'/active')) {\n return false;\n }\n \n \n // initialize the variables\n $shippingPrice = 0;\n $config=(object)array();\n $config->locale_choose = $this->getConfigData(\"locale_choose\");\n $config->api_access_key = Mage::helper('core')->decrypt($this->getConfigData(\"api_access_key\"));\n $config->api_password = Mage::helper('core')->decrypt($this->getConfigData(\"api_password\"));\n $config->billing_acct = Mage::helper('core')->decrypt($this->getConfigData(\"billing_acct\"));\n $config->registered_acct = Mage::helper('core')->decrypt($this->getConfigData(\"registered_acct\"));\n $config->allowed_methods = \",\".$this->getConfigData(\"allowed_methods\").\",\";\n $config->free_method = $this->getConfigData(\"free_method\");\n $config->free_shipping_with_minimum_order_amount = $this->getConfigData(\"free_shipping_with_minimum_order_amount\");\n $config->minimum_shipping_cost = $this->getConfigData(\"minimum_shipping_cost\");\n $config->fixed_handling = $this->getConfigData(\"fixed_handling\");\n $config->percent_markup = $this->getConfigData(\"percent_markup\");\n $config->days_for_handling = $this->getConfigData(\"days_for_handling\");\n $config->convert_weight = $this->getConfigData(\"convert_weight\");\n $config->virtual_box_mode = $this->getConfigData(\"virtual_box_mode\");\n $config->max_package_weight = $this->getConfigData(\"max_package_weight\")*$config->convert_weight;\n $config->calculate_dimension_weight = $this->getConfigData(\"calculate_dimension_weight\");\n $config->dimensional_multiplier = $this->getConfigData(\"dimensional_multiplier\");\n $config->address_validation = $this->getConfigData(\"address_validation\");\n $config->sallowspecific = $this->getConfigData(\"sallowspecific\");\n $config->specificerrmsg = $this->getConfigData(\"specificerrmsg\");\n $config->developer_mode = $this->getConfigData(\"developer_mode\");\n $config->log_mode = $this->getConfigData(\"log_mode\");\n $config->originpostalcode = $this->getConfigData(\"originpostalcode\");\n $config->widthattribute = $this->getConfigData(\"widthattribute\");\n $config->defaultwidth = $this->getConfigData(\"defaultwidth\");\n $config->lengthattribute = $this->getConfigData(\"lengthattribute\");\n $config->defaultlength = $this->getConfigData(\"defaultlength\");\n $config->heightattribute = $this->getConfigData(\"heightattribute\");\n $config->defaultheight = $this->getConfigData(\"defaultheight\");\n $config->convert_size = $this->getConfigData(\"convert_size\");\n $config->dutiable = $this->getConfigData(\"dutiable\");\n $config->handling_type = $this->getConfigData(\"handling_type\");\n $config->handling_action = $this->getConfigData(\"handling_action\");\n $config->handling_fee = $this->getConfigData(\"handling_fee\");\n $config->address_validation_warning = $this->getConfigData(\"address_validation_warning\");\n $config->store_response = $this->getConfigData(\"address_validation_warning\");\n $config->json_description = ($this->getConfigData('json_description')==1);\n\n \n \n $config->url= ($config->developer_mode==1 ? $this->_devUrl : $this->_liveUrl);\n $config->installPath = Mage::getModuleDir('etc', 'Deviant_PurolatorShipping') . DS . 'wsdl' . DS ;\n /*\n $config->installPath=dirname(__FILE__);\n if (stristr(__FILE__,\"Deviant_PurolatorShipping_Model_Carrier_Purolator\")!==false) {\n // Running in \"compile\" mode, need to manually set the install path\n $config->installPath = str_replace(\"includes/src\",\"app/code/community/Deviant/PurolatorShipping/Model/Carrier/\",$config->installPath);\n }*/\n $config->wsdlpath=$config->installPath.($config->developer_mode==1 ? \"/Development\" : \"/Production\");\n\n \n $currentLocale = Mage::app()->getLocale()->getLocaleCode();\n \n $config->language = \"en\";\n if ($config->locale_choose==\"fr\") {\n $config->language = \"fr\";\n }\n else if ($config->locale_choose==\"choose\") {\n $storeLocale = Mage::getStoreConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_LOCALE, $this->getStore());\n if ($storeLocale == \"fr_CA\" || $storeLocale == \"fr_FR\") {\n $config->language = \"fr\";\n }\n }\n \n $config->originpostalcode = Mage::getStoreConfig('shipping/origin/postcode', $this->getStore());\n $config->originCountryCode = Mage::getStoreConfig('shipping/origin/country_id', $this->getStore());\n $config->originRegionID = Mage::getStoreConfig('shipping/origin/region_id', $this->getStore());\n $config->originCity = Mage::getStoreConfig('shipping/origin/city', $this->getStore());\n $config->originRegion = Mage::getModel('directory/region')->load($config->originRegionID)->getCode();\n \n //$config->originCountryCode;\n $config->destCity = $request->getDestCity();\n if ($request->getDestCountryId()) {\n $config->destCountry = $request->getDestCountryId();\n }\n else {\n $config->destCountry = self::USA_COUNTRY_ID;\n }\n \n $config->destRegion = $request->getDestRegionCode();\n if ($request->getDestPostcode()) {\n $config->destPostalCode = $request->getDestPostcode();\n }\n else {\n $config->destPostalCode='';\n }\n $this->shipLog($config, \"Config for shipment*****\",$config);\n $config->request = $request;\n $config->shipping=(object)array(\"methodkey\"=>array(),\"methods\"=>array());\n $config->responseError=\"Shipment error, please contact us\";\n $config->shippable = new Deviant_PurolatorShipping_Model_Carrier_Purolator_Shippable();\n $config->shippable->config = $config;\n $config->shippable->carrier = $this;\n $this->preptranslate($config);\n \n $result = Mage::getModel('shipping/rate_result');\n $config->result=$result;\n $defaults = $this->getDefaults();\n \n // Quick check to verify we can make a quote\n if (!$config->destPostalCode || !$config->originpostalcode) {\n // Return an error response\n $error = Mage::getModel('shipping/rate_result_error');\n $error->setCarrier($this->_code);\n $error->setCarrierTitle($this->getConfigData('title'));\n $error->setErrorMessage($this->getConfigData('specificerrmsg') . \" - Missing postal codes for quote\");\n $result->append($error);\n \n }\n else {\n \n $config->validateclient = new SoapClient( $config->wsdlpath.\"/ServiceAvailabilityService.wsdl\", \n array (\n 'trace' => true,\n 'location' => $config->url.\"/PWS/V1/ServiceAvailability/ServiceAvailabilityService.asmx\",\n 'uri' => \"http://purolator.com/pws/datatypes/v1\",\n 'login' => $config->api_access_key,\n 'password' => $config->api_password\n )\n );\n\n $validateheaders[] = new SoapHeader ( 'http://purolator.com/pws/datatypes/v1', \n 'RequestContext', \n array (\n 'Version' => '1.2',\n 'Language' => 'en',\n 'GroupID' => 'xxx',\n 'RequestReference' => 'Rating Example'\n )\n ); \n //Apply the SOAP Header to your client \n $config->validateclient->__setSoapHeaders($validateheaders);\n \n $config->validateclientrequest=$this->arrayToObject(\n array(\n \"Addresses\"=>array(\"ShortAddress\"=>array(\"PostalCode\"=>$config->destPostalCode,\n \"Country\"=>$config->destCountry,\n ))\n \n )\n );\n \n // If destination city is not populated this is a quick quote\n // but we need to manually populate it regardless\n // Also perform this function if address validation is off\n try {\n if ($config->destCity==\"\" || $config->address_validation==0) {\n $response = $config->validateclient->ValidateCityPostalCodeZip($config->validateclientrequest);\n \n if ($response->SuggestedAddresses->SuggestedAddress) {\n $config->destCity = $response->SuggestedAddresses->SuggestedAddress->Address->City;\n \n // Check the province JIC\n if ($response->SuggestedAddresses->SuggestedAddress->Address->Province!=$config->request->getDestRegionCode()) {\n if ($config->address_validation_warning==1) {\n $error = Mage::getModel('shipping/rate_result_error');\n $error->setCarrier($this->_code);\n $error->setCarrierTitle($this->getConfigData('title'));\n $error->setErrorMessage(\"Warning: Selected State / Province code does not match postal code \".\n $config->destRegion.\",\" . \" auto changed to \" . \n $response->SuggestedAddresses->SuggestedAddress->Address->Province );\n $result->append($error);\n } \n $config->destRegion=$response->SuggestedAddresses->SuggestedAddress->Address->Province;\n $request->setDestRegionCode($config->destRegion);\n $request->setDestCity($config->destCity);\n }\n }\n }\n } catch(Exception $exception) {\n // Log the error\n $config->responseError=\"Purolator server reported an error on this quote, this information has been logged. \";\n $error = Mage::getModel('shipping/rate_result_error');\n $error->setCarrier($this->_code);\n $error->setCarrierTitle($this->getConfigData('title'));\n $error->setErrorMessage($this->getConfigData('specificerrmsg') . \" - \".$config->responseError);\n $config->result->append($error);\n $this->shipLogError($config,\"Error reported by purolator \" .$exception->getMessage());\n return $result;\n }\n \n /** Purpose : Creates a SOAP Client in Non-WSDL mode with the appropriate authentication and \n * header information\n **/\n //Set the parameters for the Non-WSDL mode SOAP communication with your Development/Production credentials\n $config->estimateclient = new SoapClient( $config->wsdlpath.\"/EstimatingService.wsdl\", \n $config->estimateclientHead=array (\n 'trace' => true,\n // Development (dev)\n 'location' => $config->url.\"/PWS/V1/Estimating/EstimatingService.asmx\",\n // Production \n // 'location' => \"https://webservices.purolator.com/PWS/V1/Estimating/EstimatingService.asmx\",\n 'uri' => \"http://purolator.com/pws/datatypes/v1\",\n 'login' => $config->api_access_key,\n 'password' => $config->api_password\n )\n );\n //Define the SOAP Envelope Headers\n $headers[] = new SoapHeader ( 'http://purolator.com/pws/datatypes/v1', \n 'RequestContext', \n array (\n 'Version' => '1.3',\n 'Language' => $config->language,\n 'GroupID' => 'xxx',\n 'RequestReference' => 'Rating Example'\n )\n ); \n $this->shipLog($config,\"Estimate Request head \", $config->estimateclientHead);\n \n //Apply the SOAP Header to your client \n $config->estimateclient->__setSoapHeaders($headers);\n $config->fullestimateclientrequest=$this->arrayToObject(\n array(\n \"Shipment\"=>array(// \"M9W 7J2\" ETOBICOKE\n \"SenderInformation\"=>array(\"Address\"=>array(\"PostalCode\"=>'M8Z 5E7',\n // Unneeded\n //\"Name\"=>,\n //\"StreetNumber\"=>,\n //\"StreetName\"=>,\n \"City\"=>'Etobicoke',\n \"Province\"=>'ON',\n \"Country\"=>'CA',\n )),\n \"ReceiverInformation\"=>array(\"Address\"=>array(//\"PostalCode\"=>$config->destPostalCode,\n \"PostalCode\"=>$config->destPostalCode,\n //\"Name\"=>\"Foo Bar\",\n //\"StreetNumber\"=>\"1234\",\n //\"StreetName\"=>\"Main Street\",\n \"City\"=>$config->destCity,\n \"Province\"=>$config->destRegion,\n \"Country\"=>$config->destCountry,\n //\"PhoneNumber\"=>array(\"CountryCode\"=>\"1\",\"AreaCode\"=>\"905\",\"Phone\"=>\"5555555\"),\n )),\n \"PackageInformation\"=>array(\"TotalWeight\"=>array(\"Value\"=>0,\"WeightUnit\"=>\"lb\"),\n \"TotalPieces\"=>0,\n \"PiecesInformation\"=>array(\"Piece\"=>array()),\n \"ServiceID\"=>($config->destCountry==\"CA\" ? \n \"PurolatorExpress\":($config->destCountry==\"US\" ?\n \"PurolatorExpressU.S.\":\"PurolatorExpressInternational\")),\n \n ),\n \"PaymentInformation\"=>array(\"PaymentType\"=>\"Sender\",\n \"BillingAccountNumber\" => $config->billing_acct,\n \"RegisteredAccountNumber\"=>$config->registered_acct),\n \"PickupInformation\"=>array(\"PickupType\"=>\"DropOff\"),\n \n \n ),\n \"ShowAlternativeServicesIndicator\"=>\"true\")\n );\n $config->fullestimateclientitem=array(\"Weight\"=>array(\"Value\"=>0,\"WeightUnit\"=>\"lb\"),\n \"Length\"=>array(\"Value\"=>0,\"DimensionUnit\"=>\"in\"),\n \"Width\"=>array(\"Value\"=>0,\"DimensionUnit\"=>\"in\"),\n \"Height\"=>array(\"Value\"=>0,\"DimensionUnit\"=>\"in\"),\n //\"Options\"\n );\n //print_r($config->fullestimateclientrequest);\n $config->fullestimateclientrequest->Shipment->PackageInformation->PiecesInformation->Piece=array();\n $options = array();\n $configOptionsInformation = \"\";\n switch ($config->destCountry) {\n case \"CA\":\n $configOptionsInformation=$this->getConfigData(\"options_information_canada\");\n break;\n case \"US\":\n $configOptionsInformation=$this->getConfigData(\"options_information_us\");\n break;\n default: \n $configOptionsInformation=$this->getConfigData(\"options_information_international\");\n break;\n }\n \n // Remove whitespace from options\n $c=str_replace(array(\" \",\"\\t\",\"\\n\",\"\\r\",\"\\0\",\"\\x0b\"),\"\",$configOptionsInformation);\n if ($c!=\"\") {\n foreach(explode(\",\",$c) as $option) {\n $detail = explode(\"=\",$option);\n $options[] = (object)array(\"ID\"=>$detail[0],\"Value\"=>$detail[1]);\n }\n //print_r($options);die();\n $config->fullestimateclientrequest->Shipment->PackageInformation->OptionsInformation=(object)array(\"Options\"=>(object)array(\"OptionIDValuePair\"=>array()));\n $config->fullestimateclientrequest->Shipment->PackageInformation->OptionsInformation->Options->OptionIDValuePair=$options;\n }\n \n $quoteResult = false;\n try {\n $quoteResult = $this->processQuote($config, $result, $defaults);\n } catch(Exception $exception) {\n // Log the error\n $config->responseError=\"Purolator server reported an error on this quote, this information has been logged. \";\n $error = Mage::getModel('shipping/rate_result_error');\n $error->setCarrier($this->_code);\n $error->setCarrierTitle($this->getConfigData('title'));\n $error->setErrorMessage($this->getConfigData('specificerrmsg') . \" - \".$config->responseError);\n $config->result->append($error);\n $this->shipLogError($config,\"Error reported by purolator \" .$exception->getMessage());\n }\n if ($quoteResult!=FALSE) {\n \n // Determine cheapest shipping method, if neccesary\n $freeshipmethod=$config->free_method;\n if ($config->free_shipping_with_minimum_order_amount>0 && \n $request->getPackageValueWithDiscount()>=$config->free_shipping_with_minimum_order_amount &&\n $config->free_method==\"LowestPriceFreeShipping\") {\n $lowestPrice=9999999999; \n foreach ($config->shipping->methods as $method=>$estimate) {\n if ($estimate->PreTaxPrice<$lowestPrice) {\n $freeshipmethod=$method;\n $lowestPrice=$estimate->PreTaxPrice;\n }\n }\n }\n \n // Got through all methods to create shipping options\n foreach ($config->shipping->methods as $method=>$estimate) {\n $this->shipLog($config, \"Composed total estimate\",$estimate);\n \n $rate = Mage::getModel('shipping/rate_result_method');\n $rate->setCarrier($this->_code);\n\n $rate->setMethod($method);\n \n \n $rate->setCost($estimate->PreTaxPrice);\n if ($config->json_description) {\n $rate->setMethodDescription( json_encode(array(\"request\"=>$config->fullestimateclientrequest,\"response\"=>$estimate)));\n }\n \n $totalPrice = max($estimate->PreTaxPrice*(1+$config->percent_markup/100)+$config->fixed_handling,\n $config->minimum_shipping_cost);\n \n \n /*$methodTitle = $this->translate($config,$method) . \" (\" \n . ($estimate->RealTransitDays + $config->days_for_handling) . \n \" \".$this->translate($config,\"Business Day\".(($estimate->RealTransitDays + $config->days_for_handling)>1?\"s\":\"\")).\")\";*/\n\n\t\t\t\t$methodTitle = \"Ground\";\n \n // Add in any special magento pricing\n $totalPrice = $this->getMethodPrice($totalPrice, $methodTitle);\n \n if ($config->free_shipping_with_minimum_order_amount>0 && \n $config->runningPrice>$config->free_shipping_with_minimum_order_amount &&\n $freeshipmethod==$method) {\n $this->shipLog($config, \"Free Shipping Detected, \",$config->runningPrice);\n $totalPrice=0;\n $methodTitle = $this->translate($config,\"FREE\").\" \" . $methodTitle;\n }\n $rate->setMethodTitle($methodTitle);\n $rate->setPrice($totalPrice);\n $result->append($rate);\n } // end for\n \n }\n else {\n $error = Mage::getModel('shipping/rate_result_error');\n $error->setCarrier($this->_code);\n $error->setCarrierTitle($this->getConfigData('title'));\n $error->setErrorMessage($this->getConfigData('specificerrmsg') . \" - \".$config->responseError);\n $config->result->append($error);\n \n }\n }\n return $result;\n }", "title": "" }, { "docid": "accbf3a2f91e2d59b1012f0e60549f09", "score": "0.5897711", "text": "public function action_shipping() {\n $this->restrictActions(CartModel::STEP_SHIPPING);\n $customerAddresses = $this->pixie->orm->get('CustomerAddress')->getAll();\n /** @var Cart $cartModel */\n $cartModel = $this->pixie->orm->get('Cart');\n $cart = $cartModel->getCart();\n\n if (!$cart->customer_id) {\n $cartModel->setCustomer();\n }\n\n if ($this->request->is_ajax()) {\n $this->checkCsrfToken('checkout_step2', null, false);\n\n $post = $this->request->post();\n $addressId = isset($post['address_id']) ? $post['address_id'] : 0;\n if ($post['buyer_name']) {\n $cart->buyer_name = $post['buyer_name'];\n $cart->save();\n }\n unset($post['buyer_name']);\n\n if (!$addressId) {\n $addressId = $this->pixie->orm->get('CustomerAddress')->create($post);\n }\n $this->pixie->orm->get('Cart')->updateAddress($addressId, 'shipping');\n $this->execute = false;\n\n } else {\n if (!$cart->buyer_name) {\n $cart->buyer_name = trim($cart->customer->first_name . ' ' . $cart->customer->last_name);\n $cart->save();\n }\n\n $this->view->subview = 'cart/shipping';\n $this->view->tab = 'shipping';//active tab\n $this->view->step = $this->pixie->orm->get('Cart')->getStepLabel();//last step\n $currentAddress = $cart->getShippingAddress() ;\n $this->view->shippingAddress = is_array($currentAddress) ? [] : $currentAddress->as_array();\n $this->view->customerAddresses = $customerAddresses;\n $this->view->customerName = $cart->buyer_name;\n }\n }", "title": "" }, { "docid": "54502fffd9273f767a75cdc130dea1eb", "score": "0.5881793", "text": "function woocommerce_table_rate_shipping_init() {\n\tif ( class_exists( 'Woocommerce' ) || class_exists( 'WooCommerce' ) ) {\n\t\t\n\t\tif (!class_exists('WC_Shipping_Method')) return;\n\n\t\tif ( !class_exists( 'BE_Table_Rate_Shipping' ) ) {\n\n\t\t\t$GLOBALS['settings_slug'] = 'woocommerce_settings';\n\t\t\tif( WOOCOMMERCE_VERSION >= 2.1 ) {\n\t\t\t\tif( !isset( $woocommerce ) ) $woocommerce = WC();\n\t\t\t\t$GLOBALS['settings_slug'] = 'wc-settings';\n\t\t\t}\n\t\t\trequire('inc/woocommerce-shipping-zones.php');\n\t\t\t\n\t\t\tclass BE_Table_Rate_Shipping extends WC_Shipping_Method {\n\n\t\t\t\tpublic static $version = '3.3.7';\n\n\t\t\t\t/**\n\t\t\t\t * __construct function.\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @return void\n\t\t\t\t */\n\t\t\t\tfunction __construct() {\n\t\t \t$this->id = 'table_rate_shipping';\n\t\t\t \t\t$this->method_title = __( 'Table Rate', 'woocommerce' );\n\t\t\t\t\t$this->admin_page_heading = __('Table Rates', 'woocommerce' );\n\t\t\t\t\t$this->admin_page_description = __( 'Table rate shipping allows you to set numerous rates based on location and specified conditions. Click the headlines below to expand or hide additional settings.', 'woocommerce' );\n\t\t\t\t\t$this->table_rate_options = 'woocommerce_table_rates';\n\t\t\t\t\t$this->class_priorities_options = 'woocommerce_class_priorities';\n\t\t\t\t\t$this->handling_rates_options = 'woocommerce_handling_rates';\n\t\t\t\t\t$this->title_order_options = 'woocommerce_trshipping_title_orders';\n\n\t\t\t\t\t// Remove PHP Notices in WP_DEBUG mode\n\t\t\t\t\t$this->handling = 0;\n\t\t\t\t\t//$this->availability = $this->countries = '';\n\n\t\t\t\t\tadd_action( 'woocommerce_update_options_shipping_' . $this->id, array( &$this, 'process_admin_options' ) );\n\t\t\t\t\tadd_action( 'woocommerce_update_options_shipping_' . $this->id, array( &$this, 'process_table_rates' ) );\n\n\t\t\t\t\tadd_action( 'admin_enqueue_scripts', array( &$this, 'register_plugin_styles' ) );\n\n\t\t\t\t\t$this->init();\n\t\t\t\t}\n\n\n\t\t\t\t/**\n\t\t\t\t* init function.\n\t\t\t\t* initialize variables to be used\n\t\t\t\t*\n\t\t\t\t* @access public\n\t\t\t\t* @return void\n\t\t\t\t*/\n\t\t\t\tfunction init() {\n\t\t\t\t\t// Load the form fields.\n\t\t\t\t\t$this->init_form_fields();\n\n\t\t\t\t\t// Load the settings.\n\t\t\t\t\t$this->init_settings();\n\n\t\t\t\t\t// Define user set variables\n\t\t\t\t\t$this->enabled = $this->settings['enabled'];\n\t\t\t\t\t$this->title = $this->settings['title'];\n\t\t\t\t\t$this->condition = $this->settings['condition'];\n\t\t\t\t\t$this->ship_free = $this->settings['ship_free'];\n\t\t\t\t\t$this->ship_free_label = $this->settings['ship_free_label'];\n\t\t\t\t\t$this->ship_free_option = $this->settings['ship_free_option'];\n\t\t\t\t\t$this->includetax = $this->settings['includetax'];\n\t\t\t\t\t$this->volumetric_enable = $this->settings['volumetric_enable'];\n\t\t\t\t\t$this->volumetric_divisor = $this->settings['volumetric_divisor'];\n\t\t\t\t\t$this->highest_class = $this->settings['highest_class'];\n\n\t\t\t\t\t// Load Cart rates\n\t\t\t\t\t$this->get_table_rates();\n\n\t\t\t\t\t// Load Shipping Classes\n\t\t\t\t\t$this->get_class_priorities();\n\n\t\t\t\t\t// Load Shipping Classes\n\t\t\t\t\t$this->get_handling_rates();\n\n\t\t\t\t\t// Load Shipping Classes\n\t\t\t\t\t$this->get_title_order();\n\t\t\t\t}\n\n\n\t\t\t\t/**\n\t\t\t\t * Initialise Gateway Settings Form Fields\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @return void\n\t\t\t\t */\n\t\t\t\tfunction init_form_fields() {\n\t\t\t\t\tglobal $woocommerce;\n\n\t\t\t\t\t$this->form_fields = array(\n\t\t\t\t\t\t'general_settings_title' => array(\n\t\t\t\t\t\t\t'title' => __( 'General Settings', 'woocommerce' ),\n\t\t\t\t\t\t\t'type' => 'title',\n\t\t\t\t\t\t\t'class' => 'title_drop title_h4 general_settings_title active',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t'enabled' => array(\n\t\t\t\t\t\t\t'title' => __( 'Enable/Disable', 'woocommerce' ),\n\t\t\t\t\t\t\t'type' \t=> 'checkbox',\n\t\t\t\t\t\t\t'label' => __( 'Enable this shipping method', 'woocommerce' ),\n\t\t\t\t\t\t\t'default' => 'no',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t'title' => array(\n\t\t\t\t\t\t\t'title' => __( 'Method Title', 'woocommerce' ),\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'description' => __( '', 'woocommerce' ),\n\t\t\t\t\t\t\t'default' => __( 'Shipping', 'woocommerce' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t'condition' => array(\n\t\t\t\t\t\t\t'title' => __( 'Condition', 'woocommerce' ),\n\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t'default' => 'per-order',\n\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t'per-order' => __( 'Per Order', 'woocommerce' ),\n\t\t\t\t\t\t\t\t'per-item' => __( 'Per Item', 'woocommerce' ),\n\t\t\t\t\t\t\t\t'per-class' => __( 'Per Class', 'woocommerce' ),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t'ship_free_title' => array(\n\t\t\t\t\t\t\t'title' => __( 'Free Shipping Override', 'woocommerce' ),\n\t\t\t\t\t\t\t'type' => 'title',\n\t\t\t\t\t\t\t'class' => 'title_drop title_h4 ship_free_title',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t'ship_free' => array(\n\t\t\t\t\t\t\t'title' => __( 'Free Shipping at', 'woocommerce' ),\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __( 'Minimum cost of ALL cart items to be eligible for free shipping. Leave blank to disable free shipping option', 'woocommerce' ),\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t'css' => 'width:100px;'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t'ship_free_label' => array(\n\t\t\t\t\t\t\t'title' => __( 'Free Shipping Label', 'woocommerce' ),\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'description' => __( 'Label to appear next to Free Shipping Option in cart/checkout pages', 'woocommerce' ),\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t'ship_free_option' => array(\n\t\t\t\t\t\t\t'title' => __( 'Add Free Shipping as Option', 'woocommerce' ),\n\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t'label' => __( 'When checked, free shipping will be the only shipping cost, otherwise free shipping will be added as an option in addition to the table below', 'woocommerce' ),\n\t\t\t\t\t\t\t'default' => 'no',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t'tax_options_title' => array(\n\t\t\t\t\t\t\t'title' => __( 'Tax Options', 'woocommerce' ),\n\t\t\t\t\t\t\t'type' => 'title',\n\t\t\t\t\t\t\t'class' => 'title_drop title_h4 tax_options_title',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t'includetax' => array(\n\t\t\t\t\t\t\t'title' => __( 'Include Tax', 'woocommerce' ),\n\t\t\t\t\t\t\t'type' \t=> 'checkbox',\n\t\t\t\t\t\t\t'label' => __( 'Calculate shipping based on prices AFTER tax', 'woocommerce' ),\n\t\t\t\t\t\t\t'default' => 'no',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t'volumetric_shipping_title' => array(\n\t\t\t\t\t\t\t'title' => __( 'Volumetric Shipping', 'woocommerce' ),\n\t\t\t\t\t\t\t'type' => 'title',\n\t\t\t\t\t\t\t'class' => 'title_drop title_h4 volumetric_shipping_title',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t'volumetric_enable' => array(\n\t\t\t\t\t\t\t'title' => __( 'Enable Volumetric Comparison', 'woocommerce' ),\n\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t'label' => __( 'When activated, plugin will determine if volumetric weight is heavier than weight given and charge shipping based on the higher amount', 'woocommerce' ),\n\t\t\t\t\t\t\t'default' => 'no',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t'volumetric_divisor' => array(\n\t\t\t\t\t\t\t'title' => __( 'Volumetric Divisor', 'woocommerce' ),\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'description' => __( 'This number can be found through your carrier\\'s website', 'woocommerce' ),\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t'misc_settings_title' => array(\n\t\t\t\t\t\t\t'title' => __( 'Miscellaneous Settings', 'woocommerce' ),\n\t\t\t\t\t\t\t'type' => 'title',\n\t\t\t\t\t\t\t'class' => 'title_drop title_h4 misc_settings_title',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t'highest_class' => array(\n\t\t\t\t\t\t\t'title' => __( 'Single Class Only', 'woocommerce' ),\n\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t'label' => __( 'When enabled, only items of the highest priority shipping class will be counted towards the shipping cost', 'woocommerce' ) . ' <b>' . __( '(Per Class Method Only)', 'woocommerce' ) . '</b>',\n\t\t\t\t\t\t\t'default' => 'no',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t'table_settings_title' => array(\n\t\t\t\t\t\t\t'title' => __( 'Shipping Cost Tables', 'woocommerce' ),\n\t\t\t\t\t\t\t'type' => 'title',\n\t\t\t\t\t\t\t'class' => 'title_drop active title_h4 table_settings_title',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t);\n\n\t\t\t\t}\n\n\n\t\t\t\t/**\n\t\t\t\t * calculate_shipping function.\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @param array $package (default: array())\n\t\t\t\t * @return void\n\t\t\t\t */\n\t\t\t\tfunction calculate_shipping( $package = array() ) {\n\t\t\t\t\tglobal $woocommerce;\n\n\t\t\t\t\t$this->rates = array();\n\t\t\t\t\t$shippingClasses = array();\n\t\t\t\t\t$itemsByClass = array();\n\t\t\t\t\t$fee_handling = $this->handling;\n\t\t\t\t\t$condition = $this->condition;\n\t\t\t\t\t$shipForFreeOption = false;\n\t\t\t\t\t$cart_subtotal = ($this->includetax == 'yes') ? 0 : $package['contents_cost'];\n\t\t\t\t\t$cart_dimensions = 0;\n\t\t\t\t\t$shipping_country = $package['destination']['country'];\n\t\t\t\t\t$shipping_state = $package['destination']['state'];\n\t\t\t\t\t$shipping_zipcode = $package['destination']['postcode'];\n\t\t\t\t\t$excludedClasses = array();\n\t\t\t\t\t$shipping_classes = $this->class_priorities;\n\t\t\t\t\t$handling_rates = $this->handling_rates;\n\n\t\t\t\t\t// get excluded shipping classes\n\t\t\t\t\tforeach ($shipping_classes as $key => $value) {\n\t\t\t\t\t\tif($value['excluded'] == 'on')\n\t\t\t\t\t\t\t$excludedClasses[$value['term_id']] = $value;\n\t\t\t\t\t}\n\n\t\t\t\t\t// count number of items in cart and accumulated weights\n\t\t\t\t\t$cart_item_count = 0;\n\t\t\t\t\t$cart_weight_total = 0;\n\t\t \t\tif ( sizeof( $package['contents'] ) > 0 ) {\n\t\t\t\t\t\tforeach ( $package['contents'] as $item_id => $values ) {\n\t\t\t\t\t\t\tif($values['data']->needs_shipping()) {\n\t\t\t\t\t\t\t\t// get class information\n\t\t\t\t\t\t\t\t$item_class_id = $values['data']->get_shipping_class_id();\n\t\t\t\t\t\t\t\t$item_class_name = $values['data']->get_shipping_class();\n\t\t\t\t\t\t\t\tif( $item_class_name == '' ) $item_class_name = '*';\n\t\t\t\t\t\t\t\tif($this->includetax == 'yes') $cart_subtotal += $values['data']->get_price_including_tax() * $values['quantity'];\n\n\t\t\t\t\t\t\t\t\t$shippingClasses[] = $item_class_id;\n\t\t\t\t\t\t\t\tif($condition != 'per-order') {\n\t\t\t\t\t\t\t\t\t$cart_item_count += $values['quantity'];\n\t\t\t\t\t\t\t\t\t$cart_weight_total += $values['data']->weight * $values['quantity'];\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif(!array_key_exists($item_class_id, $excludedClasses)) {\n\t\t\t\t\t\t\t\t\t\t$cart_item_count += $values['quantity'];\n\t\t\t\t\t\t\t\t\t\t$p_length = ($values['data']->length) ? $values['data']->length : 1;\n\t\t\t\t\t\t\t\t\t\t$p_width = ($values['data']->width) ? $values['data']->width : 1;\n\t\t\t\t\t\t\t\t\t\t$p_height = ($values['data']->height) ? $values['data']->height : 1;\n\t\t\t\t\t\t\t\t\t\t$cart_dimensions += ($p_length*$p_width*$p_height) * $values['quantity'];\n\t\t\t\t\t\t\t\t\t\t//calculate volumetric weight\n\t\t\t\t\t\t\t\t\t\tif($this->volumetric_enable == 'yes') {\n\t\t\t\t\t\t\t\t\t\t\t$v_weight = ($p_length*$p_width*$p_height) / $this->volumetric_divisor;\n\t\t\t\t\t\t\t\t\t\t\t$cart_weight_total += ($v_weight > $values['data']->weight) ? $v_weight * $values['quantity'] : $values['data']->weight * $values['quantity'];\n\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t$cart_weight_total += $values['data']->weight * $values['quantity'];\n\t\t\t\t\t\t\t\t\t} elseif($this->includetax == 'no') {\n\t\t\t\t\t\t\t\t\t\t$cart_subtotal -= ($values['data']->get_price() * $values['quantity']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// group items by class for per-class method\n\t\t\t\t\t\t\t\t$new_array = array(\n\t\t\t\t\t\t\t\t\t'class_name' => $item_class_name,\n\t\t\t\t\t\t\t\t\t'product_data' => $values,\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tif(!array_key_exists($item_class_name, $itemsByClass)) $itemsByClass[$item_class_name] = array('class_id' => $item_class_id,'products'=>array());\n\t\t\t\t\t\t\t\tarray_push($itemsByClass[$item_class_name]['products'],$values);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t \t\t}\n\t\t \t\t$shippingClasses = array_unique($shippingClasses);\n\n\t\t\t\t\t// check for free shipping\n\t\t\t\t\tif($this->ship_free != '') {\n\t\t\t\t\t\tif($cart_subtotal >= (float) $this->ship_free) {\n\t\t\t\t\t\t\t$free_rate_label = ($this->ship_free_label == \"\") ? $this->title : $this->ship_free_label;\n\t\t\t\t\t\t\t$free_rate = array( 'id' => sanitize_title($free_rate_label), 'label' => $free_rate_label, 'cost' => floatval(0) );\n\t\t\t\t\t\t\t$this->add_rate( $free_rate );\n\n\t\t\t\t\t\t\tif($this->ship_free_option == 'yes')\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif($condition == 'per-order') {\n\t\t\t\t\t\t$order_data = array(\n\t\t\t\t\t\t\t\"condition\" => $condition,\n\t\t\t\t\t\t\t\"fee_handling\" => $fee_handling,\n\t\t\t\t\t\t\t\"subtotal\" => $cart_subtotal,\n\t\t\t\t\t\t\t\"totalweight\" => $cart_weight_total,\n\t\t\t\t\t\t\t\"itemcount\" => $cart_item_count,\n\t\t\t\t\t\t\t\"dimensions\" => $cart_dimensions,\n\t\t\t\t\t\t\t\"volumetric\" => ($this->volumetric_enable == 'yes') ? ($cart_dimensions / $this->volumetric_divisor) : 0,\n\t\t\t\t\t\t\t\"shipping_country\" => $shipping_country,\n\t\t\t\t\t\t\t\"shipping_state\" => $shipping_state,\n\t\t\t\t\t\t\t\"shipping_zipcode\" => $shipping_zipcode,\n\t\t\t\t\t\t\t\"shipping_classes\" => $shippingClasses,\n\t\t\t\t\t\t\t\"excluded_classes\" => $excludedClasses,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t$rate = $this->calculate_shipping_perorder($order_data);\n\t\t\t\t\t} elseif($condition == 'per-item') {\n\t\t\t\t\t\t$rate_temp = array();\n\t\t\t \t\t// cycle through all cart items\n\t\t\t \t\tif ( sizeof( $package['contents'] ) > 0 ) {\n\t\t\t \t\t\t$p_dimensions = 0;\n\t\t\t \t\t$denied_rates = array();\n\n\t\t\t\t\t\t// get excluded shipping classes\n\t\t\t\t\t\t$charge_shipping = FALSE;\n\t\t\t\t\t\tforeach ($shippingClasses as $key => $value) {\n\t\t\t\t\t\t\tif(!array_key_exists($value, $excludedClasses))\n\t\t\t\t\t\t\t\t$charge_shipping = TRUE;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(!$charge_shipping) {\n\t\t\t\t\t\t\t$newAr = array( 'id' => sanitize_title($this->title),\n\t\t\t\t\t\t\t\t\t\t\t'label' => $this->title,\n\t\t\t\t\t\t\t\t\t\t\t'cost' => '0',\n\t\t\t\t\t\t\t\t\t\t\t'default' => 'no',\n\t\t\t\t\t\t\t\t\t\t\t'shiptype' => get_woocommerce_currency_symbol());\n\t\t\t\t\t\t\tarray_push($rate_temp, array($newAr));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tforeach ( $package['contents'] as $item_id => $values ) {\n\t\t\t\t\t\t\tif($values['data']->needs_shipping() && !array_key_exists($values['data']->get_shipping_class_id(), $excludedClasses)) {\n\t\t\t\t\t\t\t\t$product_weight = $values['data']->get_weight();\n\t\t\t\t\t\t\t\t//calculate volumetric weight\n\t\t\t\t\t\t\t\t$p_length = ($values['data']->length) ? $values['data']->length : 1;\n\t\t\t\t\t\t\t\t$p_width = ($values['data']->width) ? $values['data']->width : 1;\n\t\t\t\t\t\t\t\t$p_height = ($values['data']->height) ? $values['data']->height : 1;\n\t\t\t\t\t\t\t\tif($this->volumetric_enable == 'yes') {\n\t\t\t\t\t\t\t\t\t$v_weight = ($p_length*$p_width*$p_height) / $this->volumetric_divisor;\n\t\t\t\t\t\t\t\t\tif($v_weight > $values['data']->get_weight()) $product_weight = $v_weight;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$product_weight *= $values['quantity'];\n\t\t\t\t\t\t\t\t$item_cost = ($this->includetax == 'no') ? $values['data']->get_price() : $values['data']->get_price_including_tax();\n\n\t\t\t\t\t\t\t\t$p_length = ($values['data']->length) ? $values['data']->length : 1;\n\t\t\t\t\t\t\t\t$p_width = ($values['data']->width) ? $values['data']->width : 1;\n\t\t\t\t\t\t\t\t$p_height = ($values['data']->height) ? $values['data']->height : 1;\n\t\t\t\t\t\t\t\t$p_dimensions = ($p_length*$p_width*$p_height);\n\n\t\t\t\t\t\t\t\t$order_data = array(\n\t\t\t\t\t\t\t\t\t\"condition\" => $condition,\n\t\t\t\t\t\t\t\t\t\"fee_handling\" => $fee_handling,\n\t\t\t\t\t\t\t\t\t\"price\" => $item_cost, //sale_price,\n\t\t\t\t\t\t\t\t\t\"quantity\" => $values['quantity'],\n\t\t\t\t\t\t\t\t\t\"class\" => $values['data']->get_shipping_class_id(),\n\t\t\t\t\t\t\t\t\t\"subtotal\" => $cart_subtotal,\n\t\t\t\t\t\t\t\t\t\"totalweight\" => $product_weight,\n\t\t\t\t\t\t\t\t\t\"dimensions\" => $p_dimensions,\n\t\t\t\t\t\t\t\t\t\"volumetric\" => ($this->volumetric_enable == 'yes') ? ($p_dimensions / $this->volumetric_divisor) : 0,\n\t\t\t\t\t\t\t\t\t\"shipping_country\" => $shipping_country,\n\t\t\t\t\t\t\t\t\t\"shipping_state\" => $shipping_state,\n\t\t\t\t\t\t\t\t\t\"shipping_zipcode\" => $shipping_zipcode,\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t$returnedRate = $this->calculate_shipping_peritem($order_data, $denied_rates); \n\t\t\t\t\t\t\t\t\t$rate_temp[] = $returnedRate['rate'];\n\t\t\t\t\t\t\t\t\t$denied_rates = $returnedRate['denied_rates'];\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t}\n\t\t\t \t\t}\n\n\t\t\t \t\t$total_tmp = array();\n\t\t\t \t\tif( isset($rate_temp) && count($rate_temp)) {\n\t\t\t\t \t\t// ensure all products are accounted for\n\t\t\t\t \t\t$shippingTitles = array();\n\t\t\t\t \t\tforeach ($rate_temp as $rt) {\n\t\t\t\t \t\t\tif(count($rt)) {\n\t\t\t\t\t \t\t\tforeach ($rt as $key => $rtd) {\n\t\t\t\t\t \t\t\t\t$shippingTitles[] = $key;\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\t\tforeach ($shippingTitles as $skey => $title) {\n\t\t\t\t\t\t\t\tforeach ($rate_temp as $rkey => $rate) {\n\t\t\t\t\t\t\t\t\tif(!array_key_exists($title, $rate)) {\n\t\t\t\t \t\t\t\t\t//if( isset( $rate_temp[ $rkey ][$title] ) ) unset($rate_temp[$rkey][ $title ]);\n\t\t\t\t \t\t\t\t\t$denied_rates[] = $title;\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}\n\t\t\t\t\t \t// setup rates\n\t\t\t\t \t\tforeach ($rate_temp as $item) {\n\t\t\t\t \t\t\tforeach ($item as $key => $rate) {\n\t\t\t\t \t\t\t\t// check if rate has been denied and should not be added\n\t\t\t\t\t\t\t\t\tif(!in_array($key,$denied_rates)) {\n\t\t\t\t\t \t\t\t\tif(!isset($total_tmp[$rate['id']]['default']) || $total_tmp[$rate['id']]['default'] == '') $total_tmp[$rate['id']]['default'] = 'off';\n\t\t\t\t\t \t\t\t\tif(!isset($total_tmp[$rate['id']]['cost']) || $total_tmp[$rate['id']]['cost'] == '') $total_tmp[$rate['id']]['cost'] = 0;\n\t\t\t\t \t\t\t\t\t$total_tmp[$rate['id']]['id'] = sanitize_title($rate['id']);\n\t\t\t\t \t\t\t\t\t$total_tmp[$rate['id']]['label'] = $rate['label'];\n\t\t\t\t \t\t\t\t\t$total_tmp[$rate['id']]['cost'] += (array_key_exists('cost', $rate)) ? floatval($rate['cost']) : '';\n\t\t\t\t \t\t\t\t\t$total_tmp[$rate['id']]['shiptype'] = $rate['shiptype'];\n\t\t\t\t \t\t\t\t\tif($rate['default'] == 'on') $total_tmp[$rate['id']]['default'] = 'on';\n\t\t\t\t \t\t\t\t}\n\t\t\t\t\t \t\t}\n\t\t\t\t \t\t}\n\t\t\t\t \t}\n\t\t\t\t\t\t$rate = $total_tmp;\n\n\t\t\t\t\t} elseif($condition == 'per-class') {\n\t\t\t\t\t\t$order_data = array(\n\t\t\t\t\t\t\t\"items\" => $itemsByClass,\n\t\t\t\t\t\t\t\"condition\" => $condition,\n\t\t\t\t\t\t\t\"fee_handling\" => $fee_handling,\n\t\t\t\t\t\t\t\"subtotal\" => $cart_subtotal,\n\t\t\t\t\t\t\t\"totalweight\" => $cart_weight_total,\n\t\t\t\t\t\t\t\"itemcount\" => $cart_item_count,\n\t\t\t\t\t\t\t\"shipping_country\" => $shipping_country,\n\t\t\t\t\t\t\t\"shipping_state\" => $shipping_state,\n\t\t\t\t\t\t\t\"shipping_zipcode\" => $shipping_zipcode,\n\t\t\t\t\t\t\t\"shipping_classes\" => $shippingClasses,\n\t\t\t\t\t\t\t\"excluded_classes\" => $excludedClasses,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t$rate = $this->calculate_shipping_perclass($order_data);\n\t\t\t\t\t}\n\n\t\t \t\t/* add handling fee */\n\t\t\t \tif(count($rate) > 0) {\n\t\t\t \t\t$handlingFee = 0;\n\t\t\t\t\t\tif(count($this->handling_rates) > 0) {\n\t\t\t\t\t\t\tforeach ($this->handling_rates as $value) {\n\t\t\t\t\t\t\t\tif(be_in_zone($value['zone'],$shipping_country, $shipping_state, $shipping_zipcode)) {\n\t\t\t\t\t\t\t\t\t$handlingFee = $value['fee'];\n\t\t\t\t\t\t\t\t\t$handlingPer = $value['percent'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Get chosen method\n\t\t\t\t\t\tif ( ! empty( $woocommerce->session->chosen_shipping_method ) )\n\t\t\t\t\t\t\t$chosen_method = $woocommerce->session->chosen_shipping_method;\n\n\t\t\t\t\t\t//sort array by user chosen order\n\t\t\t\t\t\t$properOrderedArray = $rate;\n\t\t\t\t\t\tif(count($this->title_order)) {\n\t\t\t\t\t\t\t$title_order = array_map( 'sanitize_title', $this->title_order );\n\t\t\t\t\t\t\t$properOrderedArray = array_merge(array_flip($title_order), $rate);\n\t\t\t\t\t\t}\n\n\t\t\t \t\tforeach ($properOrderedArray as $value) {\n\t\t\t \t\t\tif(is_array($value)) {\n\t\t\t\t\t \t\tif(isset($handlingPer) && $handlingPer > 0) $value['cost'] += ($handlingPer / 100) * $cart_subtotal;\n\t\t\t\t\t \t\tif(isset($handlingFee) && $handlingFee > 0) $value['cost'] += $handlingFee;\n\n\t\t\t\t \t\t\t$value['label'] = ($value['label'] == \"\") ? $this->title : $value['label'];\n\t\t\t\t \t\t\t$value['id'] = sanitize_title($value['id']);\n\n\t\t\t\t\t\t\t\t// Register the rates\n\t\t\t\t\t\t\t\t$this->add_rate( $value );\n\n\t\t\t\t\t\t\t\t// Set default rate if one is not already chosen\n\t\t\t\t\t\t\t\tif(isset($value['default']) && $value['default'] == 'on') {\n\t\t\t\t\t\t\t\t\tif( empty( $chosen_method ) || ! isset( $_available_methods[$chosen_method] ) ) {\n\t\t\t\t\t\t\t\t\t\t// Store chosen method\n\t\t\t\t\t\t\t\t\t\t$woocommerce->session->chosen_shipping_method = $value['id'];\n\n\t\t\t\t\t\t\t\t\t\t// Do action for this chosen method\n\t\t\t\t\t\t\t\t\t\tdo_action( 'woocommerce_shipping_method_chosen', $value['id'] );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t\t}\n\n\n\n\t\t\t\t/**\n\t\t\t\t * calculate_shipping_perorder function.\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @param array $package (default: array())\n\t\t\t\t * @return array\n\t\t\t\t */\n\t\t\t\tfunction calculate_shipping_perorder( $data = array() ) {\n\t\t\t\t\tglobal $woocommerce;\n\n\t\t\t\t\t$shipping_options = $this->table_rates;\n\t\t\t\t\t$rate = array();\n\t\t\t\t\t$shipping_costs = array();\n\t\t\t\t\t$charge_shipping = FALSE;\n\t\t\t\t\t$denied_rates = array();\n\n\t\t\t\t\t// get excluded shipping classes\n\t\t\t\t\tforeach ($data['shipping_classes'] as $key => $value) {\n\t\t\t\t\t\tif(!array_key_exists($value, $data['excluded_classes']))\n\t\t\t\t\t\t\t$charge_shipping = TRUE;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(!$charge_shipping)\n\t\t\t\t\t\tarray_push($shipping_costs, array($this->title,'0',get_woocommerce_currency_symbol(),'no',sanitize_title($this->title)));\n\n\t\t\t\t\tforeach ($shipping_options as $key => $value) {\n\t\t\t\t\t\tif(!be_in_zone($value['zone'], $data['shipping_country'], $data['shipping_state'], $data['shipping_zipcode'])) unset($shipping_options[$key]);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(count($shipping_options) <= 0) return $rate;\n\n\t\t \t\t// cycle through all shipping options\n\t\t \t\tforeach ($shipping_options as $shipping_id => $values) {\n\t\t \t\t\t$shipping_total = 0;\n\t\t \t\t\tif( $values['identifier'] == '' ) $values['identifier'] = sanitize_title( $values['title'] );\n \t\t\t\t\tif($values['class'] == '*' || in_array($values['class'], $data['shipping_classes'])) {\n\t \t\t\t\t\tswitch($values['cond']) {\n\t \t\t\t\t\t\tcase 'price':\n\t \t\t\t\t\t\t\tif(($values['min'] == '*' || $data['subtotal'] >= $values['min']) && ($values['max'] == '*' || $data['subtotal'] <= $values['max'])) {\n\t \t\t\t\t\t\t\t\tif($values['bundle_qty'] > 1) {\n\t \t\t\t\t\t\t\t\t\tfor($i = 1; $i <= $data['itemcount']; $i++) {\n\t \t\t\t\t\t\t\t\t\t\tif($i < $values['bundle_qty'])\n\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['cost'];\n\t\t \t\t\t\t\t\t\t\t\telse\n\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['bundle_cost'];\n\t \t\t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == '%') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $data['subtotal'] * ($values['cost'] / 100);\n\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'x') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $data['itemcount'];\n\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'w') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $data['totalweight'];\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'];\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == 'D') {\n\t\t\t\t\t\t\t\t\t\t\tif(isset($shipping_costs[$values['identifier']])) unset($shipping_costs[$values['identifier']]);\n\t\t\t\t\t\t\t\t\t\t\t$denied_rates[] = $values['identifier'];\n\t\t\t\t\t\t\t\t\t\t} elseif( !in_array( $values['identifier'], $denied_rates ) ) {\n\t\t \t\t\t\t\t\t\t\t$shipping_costs[sanitize_title($values['identifier'])] = array($values['title'],$shipping_total,$values['default'],$values['shiptype'],$values['identifier']);\n\t\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\tbreak;\n\t \t\t\t\t\t\tcase 'weight':\n\t \t\t\t\t\t\t\tif(($values['min'] == '*' || $data['totalweight'] >= $values['min']) && ($values['max'] == '*' || $data['totalweight'] <= $values['max'])) {\n\t \t\t\t\t\t\t\t\tif($values['bundle_qty'] > 1) {\n\t \t\t\t\t\t\t\t\t\tfor($i = 1; $i <= $data['itemcount']; $i++) {\n\t \t\t\t\t\t\t\t\t\t\tif($i < $values['bundle_qty'])\n\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['cost'];\n\t\t \t\t\t\t\t\t\t\t\telse\n\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['bundle_cost'];\n\t \t\t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == '%') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $data['subtotal'] * ($values['cost'] / 100);\n\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'x') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $data['itemcount'];\n\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'w') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $data['totalweight'];\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'];\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == 'D') {\n\t\t\t\t\t\t\t\t\t\t\tif(isset($shipping_costs[$values['identifier']])) unset($shipping_costs[$values['identifier']]);\n\t\t\t\t\t\t\t\t\t\t\t$denied_rates[] = $values['identifier'];\n\t\t\t\t\t\t\t\t\t\t} elseif( !in_array( $values['identifier'], $denied_rates ) ) {\n\t\t \t\t\t\t\t\t\t\t$shipping_costs[sanitize_title($values['identifier'])] = array($values['title'],$shipping_total,$values['default'],$values['shiptype'],$values['identifier']);\n\t\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\tbreak;\n\t \t\t\t\t\t\tcase 'item-count':\n\t \t\t\t\t\t\t\tif(($values['min'] == '*' || $data['itemcount'] >= $values['min']) && ($values['max'] == '*' || $data['itemcount'] <= $values['max'])) {\n\t \t\t\t\t\t\t\t\tif($values['bundle_qty'] > 1) {\n\t \t\t\t\t\t\t\t\t\tfor($i = 1; $i <= $data['itemcount']; $i++) {\n\t \t\t\t\t\t\t\t\t\t\tif($i < $values['bundle_qty'])\n\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['cost'];\n\t\t \t\t\t\t\t\t\t\t\telse\n\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['bundle_cost'];\n\t \t\t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == '%') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $data['subtotal'] * ($values['cost'] / 100);\n\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'x') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $data['itemcount'];\n\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'w') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $data['totalweight'];\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'];\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == 'D') {\n\t\t\t\t\t\t\t\t\t\t\tif(isset($shipping_costs[$values['identifier']])) unset($shipping_costs[$values['identifier']]);\n\t\t\t\t\t\t\t\t\t\t\t$denied_rates[] = $values['identifier'];\n\t\t\t\t\t\t\t\t\t\t} elseif( !in_array( $values['identifier'], $denied_rates ) ) {\n\t\t \t\t\t\t\t\t\t\t$shipping_costs[sanitize_title($values['identifier'])] = array($values['title'],$shipping_total,$values['default'],$values['shiptype'],$values['identifier']);\n\t\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\tbreak;\n\t \t\t\t\t\t\tcase 'dimensions':\n\t \t\t\t\t\t\t\tif(($values['min'] == '*' || $data['dimensions'] >= $values['min']) && ($values['max'] == '*' || $data['dimensions'] <= $values['max'])) {\n\t \t\t\t\t\t\t\t\tif($values['bundle_qty'] > 1) {\n\t \t\t\t\t\t\t\t\t\tfor($i = 1; $i <= $data['itemcount']; $i++) {\n\t \t\t\t\t\t\t\t\t\t\tif($i < $values['bundle_qty'])\n\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['cost'];\n\t\t \t\t\t\t\t\t\t\t\telse\n\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['bundle_cost'];\n\t \t\t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == '%') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $data['subtotal'] * ($values['cost'] / 100);\n\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'x') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $data['itemcount'];\n\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'w') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $data['totalweight'];\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'];\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == 'D') {\n\t\t\t\t\t\t\t\t\t\t\tif(isset($shipping_costs[$values['identifier']])) unset($shipping_costs[$values['identifier']]);\n\t\t\t\t\t\t\t\t\t\t\t$denied_rates[] = $values['identifier'];\n\t\t\t\t\t\t\t\t\t\t} elseif( !in_array( $values['identifier'], $denied_rates ) ) {\n\t\t \t\t\t\t\t\t\t\t$shipping_costs[sanitize_title($values['identifier'])] = array($values['title'],$shipping_total,$values['default'],$values['shiptype'],$values['identifier']);\n\t\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\t\n\t \t\t\t\t}\n\t\t \t\t}\n\n\t\t \t\t/* create rate(s) */\n\t\t \t\tforeach ($shipping_costs as $value) {\n\t\t \t\t\tif( is_array($value) && isset($value[4]) ) {\n\t\t\t\t\t\t\t$rate[sanitize_title($value[4])] = array(\n\t\t\t\t\t\t\t\t'id' \t=> sanitize_title($this->id.\"_\".$value[4]),\n\t\t\t\t\t\t\t\t'label' => $value[0],\n\t\t\t\t\t\t\t\t'cost' \t=> $value[1],\n\t\t\t\t\t\t\t\t'default' => $value[2],\n\t\t\t\t\t\t\t\t'shiptype' => $value[3],\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t \t\t}\n\n\t\t\t\t\treturn $rate;\n\t\t\t\t}\n\n\n\t\t\t\t/**\n\t\t\t\t * calculate_shipping_peritem function.\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @param array $package (default: array())\n\t\t\t\t * @return array\n\t\t\t\t */\n\t\t\t\tfunction calculate_shipping_peritem( $data = array(), $denied_rates = array() ) {\n\t\t\t\t\t$shipping_options = $this->table_rates;\n\t\t\t\t\t$rate = array('rate' => array(), 'denied_rates' => $denied_rates);\n\t\t\t\t\t$shipping_costs = array();\n\n\t\t\t\t\tforeach ($shipping_options as $key => $value) {\n\t\t\t\t\t\tif($value['zone'] != '*' && !be_in_zone($value['zone'], $data['shipping_country'], $data['shipping_state'], $data['shipping_zipcode'])) unset($shipping_options[$key]);\n\t\t\t\t\t}\n\t\t\t\t\tif(count($shipping_options) <= 0) return $rate;\n\n\t\t \t\t// cycle through all shipping options\n\t\t \t\tforeach ($shipping_options as $shipping_id => $values) {\n\t\t \t\t\t$shipping_total = 0;\n\t\t \t\t\tif( $values['identifier'] == '' ) $values['identifier'] = sanitize_title( $values['title'] );\n \t\t\t\t\tif($data['class'] == $values['class'] || $values['class'] == '*') {\n\t \t\t\t\t\tswitch($values['cond']) {\n\t \t\t\t\t\t\tcase 'price':\n\t \t\t\t\t\t\t\tif(($values['min'] == '0' || $data['price'] >= $values['min']) && ($values['max'] == '*' || $data['price'] <= $values['max'])) {\n\t \t\t\t\t\t\t\t\tif($values['bundle_qty'] > 1) {\n\t \t\t\t\t\t\t\t\t\tfor($i = 1; $i <= $data['quantity']; $i++) {\n\t \t\t\t\t\t\t\t\t\t\tif($i < $values['bundle_qty'])\n\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['cost'];\n\t\t \t\t\t\t\t\t\t\t\telse\n\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['bundle_cost'];\n\t \t\t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == '%') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = ($data['quantity'] * $data['price']) * ($values['cost'] / 100);\n\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'w') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $data['totalweight'] * $data['quantity'];\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $data['quantity'];\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == 'D') {\n\t\t\t\t\t\t\t\t\t\t\t$denied_rates[] = $values['identifier'];\n\t\t\t\t\t\t\t\t\t\t} elseif( !in_array( $values['identifier'], $denied_rates ) ) {\n\t\t \t\t\t\t\t\t\t\t$shipping_costs[sanitize_title($values['identifier'])] = array($values['title'],$shipping_total,$values['default'],$values['shiptype'],$values['identifier']);\n\t\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\tbreak;\n\t \t\t\t\t\t\tcase 'weight':\n\t \t\t\t\t\t\t\tif(($values['min'] == '0' || $data['totalweight'] >= $values['min']) && ($values['max'] == '*' || $data['totalweight'] <= $values['max'])) {\n\t \t\t\t\t\t\t\t\tif($values['bundle_qty'] > 1) {\n\t \t\t\t\t\t\t\t\t\tfor($i = 1; $i <= $data['quantity']; $i++) {\n\t \t\t\t\t\t\t\t\t\t\tif($i < $values['bundle_qty'])\n\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['cost'];\n\t\t \t\t\t\t\t\t\t\t\telse\n\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['bundle_cost'];\n\t \t\t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == '%') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $data['price'] * ($values['cost'] / 100);\n\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'w') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $data['totalweight'];\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'];\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == 'D') {\n\t\t\t\t\t\t\t\t\t\t\t$denied_rates[] = $values['identifier'];\n\t\t\t\t\t\t\t\t\t\t} elseif( !in_array( $values['identifier'], $denied_rates ) ) {\n\t\t \t\t\t\t\t\t\t\t$shipping_costs[sanitize_title($values['identifier'])] = array($values['title'],$shipping_total,$values['default'],$values['shiptype'],$values['identifier']);\n\t\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\tbreak;\n\t \t\t\t\t\t\tcase 'item-count':\n\t \t\t\t\t\t\t\tif(($values['min'] == '0' || $data['quantity'] >= $values['min']) && ($values['max'] == '*' || $data['quantity'] <= $values['max'])) {\n\t \t\t\t\t\t\t\t\tif($values['bundle_qty'] > 1) {\n\t \t\t\t\t\t\t\t\t\tfor($i = 1; $i <= $data['quantity']; $i++) {\n\t \t\t\t\t\t\t\t\t\t\tif($i < $values['bundle_qty'])\n\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['cost'];\n\t\t \t\t\t\t\t\t\t\t\telse\n\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['bundle_cost'];\n\t \t\t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == '%') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = ($data['quantity'] * $data['price']) * ($values['cost'] / 100);\n\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'w') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $data['totalweight'] * $data['quantity'];\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $data['quantity'];\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == 'D') {\n\t\t\t\t\t\t\t\t\t\t\t$denied_rates[] = $values['identifier'];\n\t\t\t\t\t\t\t\t\t\t} elseif( !in_array( $values['identifier'], $denied_rates ) ) {\n\t\t \t\t\t\t\t\t\t\t$shipping_costs[sanitize_title($values['identifier'])] = array($values['title'],$shipping_total,$values['default'],$values['shiptype'],$values['identifier']);\n\t\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\tbreak;\n\t \t\t\t\t\t\tcase 'dimensions':\n\t \t\t\t\t\t\t\tif(($values['min'] == '0' || $data['dimensions'] >= $values['min']) && ($values['max'] == '*' || $data['dimensions'] <= $values['max'])) {\n\t \t\t\t\t\t\t\t\tif($values['bundle_qty'] > 1) {\n\t \t\t\t\t\t\t\t\t\tfor($i = 1; $i <= $data['quantity']; $i++) {\n\t \t\t\t\t\t\t\t\t\t\tif($i < $values['bundle_qty'])\n\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['cost'];\n\t\t \t\t\t\t\t\t\t\t\telse\n\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['bundle_cost'];\n\t \t\t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == '%') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = ($data['quantity'] * $data['price']) * ($values['cost'] / 100);\n\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'w') {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $data['totalweight'] * $data['quantity'];\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $data['quantity'];\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == 'D') {\n\t\t\t\t\t\t\t\t\t\t\t$denied_rates[] = $values['identifier'];\n\t\t\t\t\t\t\t\t\t\t} elseif( !in_array( $values['identifier'], $denied_rates ) ) {\n\t\t \t\t\t\t\t\t\t\t$shipping_costs[sanitize_title($values['identifier'])] = array($values['title'],$shipping_total,$values['default'],$values['shiptype'],$values['identifier']);\n\t\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\t\n\t \t\t\t\t}\n\t\t \t\t}\n\n\t\t \t\t/* create rate(s) */\n\t\t \t\t$rate['denied_rates'] = $denied_rates;\n\t\t \t\tforeach ($shipping_costs as $value) {\n\t\t\t\t\t\t$rate['rate'][sanitize_title($value[4])] = array(\n\t\t\t\t\t\t\t'id' \t=> sanitize_title($this->id.\"_\".$value[4]),\n\t\t\t\t\t\t\t'label' => $value[0],\n\t\t\t\t\t\t\t'cost' \t=> $value[1],\n\t\t\t\t\t\t\t'default' => $value[2],\n\t\t\t\t\t\t\t'shiptype' => $value[3],\n\t\t\t\t\t\t\t);\n\t\t \t\t}\n\n\t\t\t\t\treturn $rate;\n\t\t\t\t}\n\n\n\n\t\t\t\t/**\n\t\t\t\t * calculate_shipping_perclass function.\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @param array $package (default: array())\n\t\t\t\t * @return array\n\t\t\t\t */\n\t\t\t\tfunction calculate_shipping_perclass( $data = array() ) {\n\t\t\t\t\t$shipping_options = $this->table_rates;\n\t\t\t\t\t$rate = array();\n\t\t\t\t\t$shipping_costs = array();\n\t\t\t\t\t$denied_rates = array();\n\t\t\t\t\t$charge_shipping = FALSE;\n\n\t\t\t\t\tforeach ($shipping_options as $key => $value) {\n\t\t\t\t\t\tif($value['zone'] != '*' && !be_in_zone($value['zone'], $data['shipping_country'], $data['shipping_state'], $data['shipping_zipcode'])) unset($shipping_options[$key]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(count($shipping_options) <= 0) return $rate;\n\n\t\t\t\t\t// get excluded shipping classes\n\t\t\t\t\tforeach ($data['shipping_classes'] as $key => $value) {\n\t\t\t\t\t\tif(!array_key_exists($value, $data['excluded_classes']))\n\t\t\t\t\t\t\t$charge_shipping = TRUE;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(!$charge_shipping) {\n\t\t\t\t\t\t$newAr[sanitize_title($this->title)] = array('title' => $this->title,\n\t\t\t\t\t\t\t\t\t\t'cost' => '0',\n\t\t\t\t\t\t\t\t\t\t'shiptype' => get_woocommerce_currency_symbol(),\n\t\t\t\t\t\t\t\t\t\t'default' => 'no');\n\t\t\t\t\t\tarray_push($shipping_costs, $newAr);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// cycle through each shipping class\n\t\t\t\t\t\tforeach ($data['items'] as $class => $cval) {\n\t\t\t\t\t\t\t// setup new array for price options\n\t\t\t\t\t\t\t$shipping_costs[$class] = array();\n\n\t\t\t\t\t\t\t// get total counts\n\t\t\t\t\t\t\t$class_total_price = $class_total_count = $class_total_weight = $class_total_dimensions = 0;\n\t\t\t\t \t\tif ( sizeof( $cval['products'] ) > 0 ) {\n\t\t\t\t\t\t\t\tforeach ( $cval['products'] as $values ) {\n\t\t\t\t\t\t\t\t\t$class_total_price += ($this->includetax == 'yes') ? $values['data']->get_price_including_tax() * $values['quantity'] : $values['data']->price * $values['quantity'];\n\t\t\t\t\t\t\t\t\t$class_total_count += $values['quantity'];\n\n\t\t\t\t\t\t\t\t\t$product_weight = $values['data']->get_weight();\n\t\t\t\t\t\t\t\t\t//calculate volumetric weight\n\t\t\t\t\t\t\t\t\t$p_length = ($values['data']->length) ? $values['data']->length : 1;\n\t\t\t\t\t\t\t\t\t$p_width = ($values['data']->width) ? $values['data']->width : 1;\n\t\t\t\t\t\t\t\t\t$p_height = ($values['data']->height) ? $values['data']->height : 1;\n\t\t\t\t\t\t\t\t\tif($this->volumetric_enable == 'yes') {\n\t\t\t\t\t\t\t\t\t\t$v_weight = ($p_length*$p_width*$p_height) / $this->volumetric_divisor;\n\t\t\t\t\t\t\t\t\t\tif($v_weight > $values['data']->get_weight()) $product_weight = $v_weight;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$class_total_dimensions += ($p_length*$p_width*$p_height) * $values['quantity'];\n\t\t\t\t\t\t\t\t\t$class_total_weight += $product_weight * $values['quantity'];\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t \t\t}\n\n\t\t\t\t \t\t// cycle through all shipping options\n\t\t\t\t \t\tforeach ($shipping_options as $shipping_id => $values) {\n\t\t\t\t \t\t\t$shipping_total = 0;\n\t\t\t \t\t\t\tif( $values['identifier'] == '' ) $values['identifier'] = sanitize_title( $values['title'] );\n\t\t \t\t\t\t\tif($values['class'] == '*' || $values['class'] == $cval['class_id']) {\n\t\t\t \t\t\t\t\tswitch($values['cond']) {\n\t\t\t \t\t\t\t\t\tcase 'price':\n\t\t\t \t\t\t\t\t\t\tif(($values['min'] == '*' || $class_total_price >= $values['min']) && ($values['max'] == '*' || $class_total_price <= $values['max'])) {\n\t\t\t \t\t\t\t\t\t\t\tif($values['bundle_qty'] > 1) {\n\t\t\t \t\t\t\t\t\t\t\t\tfor($i = 1; $i <= $class_total_count; $i++) {\n\t\t\t \t\t\t\t\t\t\t\t\t\tif($i < $values['bundle_qty'])\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['cost'];\n\t\t\t\t \t\t\t\t\t\t\t\t\telse\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['bundle_cost'];\n\t\t\t \t\t\t\t\t\t\t\t\t}\n\t\t\t \t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == '%') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $class_total_price * ($values['cost'] / 100);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'x') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $class_total_count;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'w') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $class_total_weight;\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t \t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == 'D') {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(isset($shipping_costs[$class][$values['identifier']])) unset($shipping_costs[$class][$values['identifier']]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$denied_rates[] = $values['identifier'];\n\t\t\t\t\t\t\t\t\t\t\t\t} elseif( !in_array( $values['identifier'], $denied_rates ) ) {\n\t\t\t\t\t \t\t\t\t\t\t\t$shipping_costs[$class][$values['identifier']]['title'] = $values['title'];\n\t\t\t\t\t \t\t\t\t\t\t\t$shipping_costs[$class][$values['identifier']]['cost'] = $shipping_total;\n\t\t\t\t\t \t\t\t\t\t\t\t$shipping_costs[$class][$values['identifier']]['default'] = $values['default'];\n\t\t\t\t\t \t\t\t\t\t\t\t$shipping_costs[$class][$values['identifier']]['shiptype'] = $values['shiptype'];\n\t\t\t\t \t\t\t\t\t\t\t}\n\t\t\t\t \t\t\t\t\t\t}\n\t\t\t \t\t\t\t\t\t\tbreak;\n\t\t\t \t\t\t\t\t\tcase 'weight':\n\t\t\t \t\t\t\t\t\t\tif(($values['min'] == '*' || $class_total_weight >= $values['min']) && ($values['max'] == '*' || $class_total_weight <= $values['max'])) {\n\t\t\t \t\t\t\t\t\t\t\tif($values['bundle_qty'] > 1) {\n\t\t\t \t\t\t\t\t\t\t\t\tfor($i = 1; $i <= $class_total_count; $i++) {\n\t\t\t \t\t\t\t\t\t\t\t\t\tif($i < $values['bundle_qty'])\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['cost'];\n\t\t\t\t \t\t\t\t\t\t\t\t\telse\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['bundle_cost'];\n\t\t\t \t\t\t\t\t\t\t\t\t}\n\t\t\t \t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == '%') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $class_total_price * ($values['cost'] / 100);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'x') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $class_total_count;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'w') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $class_total_weight;\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == 'D') {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(isset($shipping_costs[$class][$values['identifier']])) unset($shipping_costs[$class][$values['identifier']]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$denied_rates[] = $values['identifier'];\n\t\t\t\t\t\t\t\t\t\t\t\t} elseif( !in_array( $values['identifier'], $denied_rates ) ) {\n\t\t\t\t\t \t\t\t\t\t\t\t$shipping_costs[$class][$values['identifier']]['title'] = $values['title'];\n\t\t\t\t\t \t\t\t\t\t\t\t$shipping_costs[$class][$values['identifier']]['cost'] = $shipping_total;\n\t\t\t\t\t \t\t\t\t\t\t\t$shipping_costs[$class][$values['identifier']]['default'] = $values['default'];\n\t\t\t\t\t \t\t\t\t\t\t\t$shipping_costs[$class][$values['identifier']]['shiptype'] = $values['shiptype'];\n\t\t\t\t \t\t\t\t\t\t\t}\n\t\t\t \t\t\t\t\t\t\t}\n\t\t\t \t\t\t\t\t\t\tbreak;\n\t\t\t \t\t\t\t\t\tcase 'item-count':\n\t\t\t \t\t\t\t\t\t\tif(($values['min'] == '*' || $class_total_count >= $values['min']) && ($values['max'] == '*' || $class_total_count <= $values['max'])) {\n\t\t\t \t\t\t\t\t\t\t\tif($values['bundle_qty'] > 1) {\n\t\t\t \t\t\t\t\t\t\t\t\tfor($i = 1; $i <= $class_total_count; $i++) {\n\t\t\t \t\t\t\t\t\t\t\t\t\tif($i < $values['bundle_qty'])\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['cost'];\n\t\t\t\t \t\t\t\t\t\t\t\t\telse\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['bundle_cost'];\n\t\t\t \t\t\t\t\t\t\t\t\t}\n\t\t\t \t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == '%') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $class_total_price * ($values['cost'] / 100);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'x') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $class_total_count;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'w') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $class_total_weight;\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == 'D') {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(isset($shipping_costs[$class][$values['identifier']])) unset($shipping_costs[$class][$values['identifier']]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$denied_rates[] = $values['identifier'];\n\t\t\t\t\t\t\t\t\t\t\t\t} elseif( !in_array( $values['identifier'], $denied_rates ) ) {\n\t\t\t\t\t \t\t\t\t\t\t\t$shipping_costs[$class][$values['identifier']]['title'] = $values['title'];\n\t\t\t\t\t \t\t\t\t\t\t\t$shipping_costs[$class][$values['identifier']]['cost'] = $shipping_total;\n\t\t\t\t\t \t\t\t\t\t\t\t$shipping_costs[$class][$values['identifier']]['default'] = $values['default'];\n\t\t\t\t\t \t\t\t\t\t\t\t$shipping_costs[$class][$values['identifier']]['shiptype'] = $values['shiptype'];\n\t\t\t\t \t\t\t\t\t\t\t}\n\t\t\t \t\t\t\t\t\t\t}\n\t\t\t \t\t\t\t\t\t\tbreak;\n\t\t\t \t\t\t\t\t\tcase 'dimensions':\n\t\t\t \t\t\t\t\t\t\tif(($values['min'] == '*' || $class_total_dimensions >= $values['min']) && ($values['max'] == '*' || $class_total_dimensions <= $values['max'])) {\n\t\t\t \t\t\t\t\t\t\t\tif($values['bundle_qty'] > 1) {\n\t\t\t \t\t\t\t\t\t\t\t\tfor($i = 1; $i <= $class_total_count; $i++) {\n\t\t\t \t\t\t\t\t\t\t\t\t\tif($i < $values['bundle_qty'])\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['cost'];\n\t\t\t\t \t\t\t\t\t\t\t\t\telse\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t$shipping_total += $values['bundle_cost'];\n\t\t\t \t\t\t\t\t\t\t\t\t}\n\t\t\t \t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == '%') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $class_total_price * ($values['cost'] / 100);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'x') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $class_total_count;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}elseif($values['shiptype'] == 'w') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'] * $class_total_weight;\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$shipping_total = $values['cost'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tif($values['shiptype'] == 'D') {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(isset($shipping_costs[$class][$values['identifier']])) unset($shipping_costs[$class][$values['identifier']]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$denied_rates[] = $values['identifier'];\n\t\t\t\t\t\t\t\t\t\t\t\t} elseif( !in_array( $values['identifier'], $denied_rates ) ) {\n\t\t\t\t\t \t\t\t\t\t\t\t$shipping_costs[$class][$values['identifier']]['title'] = $values['title'];\n\t\t\t\t\t \t\t\t\t\t\t\t$shipping_costs[$class][$values['identifier']]['cost'] = $shipping_total;\n\t\t\t\t\t \t\t\t\t\t\t\t$shipping_costs[$class][$values['identifier']]['default'] = $values['default'];\n\t\t\t\t\t \t\t\t\t\t\t\t$shipping_costs[$class][$values['identifier']]['shiptype'] = $values['shiptype'];\n\t\t\t\t \t\t\t\t\t\t\t}\n\t\t\t \t\t\t\t\t\t\t}\n\t\t\t \t\t\t\t\t\t\tbreak;\n\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}\n\t\t\t\t \t}\n\t\t\t\t }\n\t\t\t \t// adjust array if highest priority only is enabled\n\t\t \t\tif( $this->highest_class == 'yes' ) {\n\t\t \t\t\t$classesUsed = array_keys( $shipping_costs );\n\t\t \t\t\t$highestClass = $this->get_highest_priority_class( $classesUsed );\n\t\t \t\t\t$highestClassTerm = get_term_by( 'id', $highestClass, 'product_shipping_class', ARRAY_A );\n\t\t \t\t\t$shipping_costs_new[ $highestClassTerm['slug'] ] = $shipping_costs[ $highestClassTerm['slug'] ];\n\t\t \t\t\t$shipping_costs = $shipping_costs_new;\n\t\t \t\t}\n\n\t\t \t\t// ensure all products are accounted for\n\t\t \t\t$shippingTitles = array();\n\t\t \t\t$productClasses = array_keys( $shipping_costs );\n\t\t \t\tforeach ($productClasses as $pc) {\n\t\t \t\t\tforeach ($shipping_costs[ $pc ] as $key => $sc) {\n\t\t \t\t\t\t$shippingTitles[ $pc ][] = $key;\n\t\t \t\t\t}\n\t\t \t\t\t\n\t\t \t\t}\n\t\t \t\t$compArray = $shippingTitles[ $productClasses[ 0 ] ];\n\t\t \t\tfor( $i=1; $i<count($shippingTitles);$i++) {\n\t\t\t \t\t$differences = array_diff($compArray,$shippingTitles[$productClasses[ $i ]]);\n\t\t\t \t\t$differences = array_merge( $differences, array_diff($shippingTitles[$productClasses[ $i ]], $compArray) );\n\t\t\t \t\tif( count( $differences ) ) {\n\t\t\t \t\t\tforeach ($differences as $key => $dif) {\n\t\t\t \t\t\t\tforeach ($productClasses as $pc) {\n\t\t\t \t\t\t\t\tif( isset( $compArray[ $key ] ) ) unset( $compArray[ $key ] );\n\t\t\t \t\t\t\t\tif( isset( $shipping_costs[ $pc ][ $dif ] ) ) unset($shipping_costs[ $pc ][ $dif ]);\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}\n\n\t\t\t \t// structure shipping costs for final output\n\t\t \t\t$new_rates_array = array();\n\t\t \t\tforeach ($shipping_costs as $class => $val) {\n\t\t \t\t\tforeach ($val as $key => $val2) {\n\t\t \t\t\t\tif(!isset($new_rates_array[$key]['cost'])) $new_rates_array[$key]['cost'] = 0;\n\t\t \t\t\t\t$new_rates_array[$key]['title'] = $val2['title'];\n\t\t \t\t\t\t$new_rates_array[$key]['cost'] += (float) $val2['cost'];\n\t\t \t\t\t\tif($val2['default'] == 'on') $new_rates_array[$key]['default'] = 'on';\n\t\t \t\t\t}\n\t\t \t\t}\n\n\t\t \t\t/* create rate(s) */\n\t\t \t\tforeach ($new_rates_array as $identifier => $value) {\n\t\t\t\t\t\t$rate[sanitize_title($identifier)] = array(\n\t\t\t\t\t\t\t'id' \t=> sanitize_title($this->id.\"_\".$identifier),\n\t\t\t\t\t\t\t'label' => $value['title'],\n\t\t\t\t\t\t\t'cost' \t=> $value['cost'],\n\t\t\t\t\t\t\t'shiptype' => (isset($value['shiptype'])) ? $value['shiptype'] : \"\",\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\tif(isset($value['default'])) $rate[$this->id.\"_\".$title]['default'] = $value['default'];\n\t\t \t\t}\n\n\t\t\t\t\treturn $rate;\n\t\t\t\t}\n\n\n\n\t\t\t\t/**\n\t\t\t\t * Admin Panel Options\n\t\t\t\t * - Options for the cart based portion\n\t\t\t\t *\n\t\t\t\t * @since 1.0.0\n\t\t\t\t * @access public\n\t\t\t\t * @return void\n\t\t\t\t */\n\t\t\t\tpublic function admin_options() {\n\t\t\t\t\tglobal $woocommerce;\n\n\t\t\t\t\t$cur_symbol = get_woocommerce_currency_symbol();\n\t\t\t $condOpsG = $classOpsG = $zoneOpsJS = \"\";\n\t\t\t\t\t$shippingClasses = $woocommerce->shipping->get_shipping_classes();\n \t\tif(count($shippingClasses) > 0) foreach($shippingClasses as $key => $val) $classOpsG .= \"<option value=\\\"\".$val->term_id.\"\\\">\".$val->name.\"</option>\";\n\t\t\t $conds = array(\"price\" => \"Price\",\"weight\" => \"Weight\",\"item-count\" => \"Item Count\",\"dimensions\" => \"Dimensions\");\n \t\tforeach($conds as $key => $val) $condOpsG .= \"<option value=\\\"\".$key.\"\\\">\".$val.\"</option>\";\n\t\t\t $countries = $woocommerce->countries->get_allowed_countries();\n\t\t\t $zones = be_get_zones();\n \t\tif( count( $zones ) ) foreach($zones as $val) $zoneOpsJS .= \"<option value=\\\"\".$val['zone_id'].\"\\\">\".$val['zone_title'].\"</option>\";\n\t?>\n\t\t\t<style>.check-column input{margin-left:8px;} .check-column {margin: 0;padding: 0;}</style>\n\t \t<h3><?php echo $this->admin_page_heading; ?></h3>\n\t \t<p><?php echo $this->admin_page_description; ?></p>\n\t \t<table class=\"form-table\">\n\t \t<?php\n\t \t\t// Generate the HTML For the settings form.\n\t \t\t$this->generate_settings_html();\n\t \t\t?>\n\t\t \t<tr valign=\"top\" id=\"shipping_handling_rates\">\n\t\t <th scope=\"row\" class=\"titledesc\"><?php _e( 'Handling / Base Rates', 'woocommerce' ); ?>:</th>\n\t\t <td class=\"forminp\" id=\"<?php echo $this->id; ?>_handling_rates\">\n\t\t \t<table class=\"shippingrows widefat\" style=\"width: 60%;min-width:550px;\" cellspacing=\"0\">\n\t\t \t\t<thead>\n\t\t \t\t\t<tr>\n\t\t \t\t\t\t<th class=\"check-column\"><input type=\"checkbox\"></th>\n\t\t \t \t<th><?php _e( 'Zone', 'woocommerce' ); ?> <a class=\"tips\" data-tip=\"<?php _e('Setup and review zones under the \\'Shipping Zones\\' tab','woocommerce'); ?>\">[?]</a></th>\n\t\t \t \t<th><?php _e( 'Fee', 'woocommerce' ); ?> <a class=\"tips\" data-tip=\"<?php _e('Adds the specified percentage of purchase total followed by the fixed fee','woocommerce'); ?>\">[?]</a></th>\n\t\t \t\t\t</tr>\n\t\t \t\t</thead>\n\t\t \t\t<tfoot>\n\t\t \t\t\t<tr>\n\t\t \t\t\t\t<th colspan=\"2\"><a href=\"#\" class=\"add button\"><?php _e( '+ Add Handling Fee', 'woocommerce' ); ?></a></th>\n\t\t \t\t\t\t<th colspan=\"1\" style=\"text-align:right;\"><a href=\"#\" class=\"remove button\"><?php _e( 'Delete selected fees', 'woocommerce' ); ?></a></th>\n\t\t \t\t\t</tr>\n\t\t \t\t</tfoot>\n\t\t \t\t<tbody class=\"class_priorities\">\n\t\t \t<?php\n\t\t \t$i = -1;\n\t\t \tif(count($this->handling_rates) > 0) {\n\t\t \t\tforeach ( $this->handling_rates as $id => $arr ) {\n\t\t\t \t\t$countryOps = \"\";\n\t\t \t\t\t$i++;\n\t\t\t \t\tforeach ( $zones as $val ) {\n\t\t\t\t\t\t\t\t\t\t$countryOps .= '<option value=\"' . $val['zone_id'] . '\" ' . selected( $val['zone_id'], $arr['zone'], false ) . '>' . $val['zone_title'] . '</option>';\n\t\t\t \t\t}\n\t\t\t \t\techo '<tr class=\"handling_fees\">\n\t\t\t \t\t <td class=\"check-column\"><input type=\"checkbox\" name=\"select\" /></td>\n\t\t\t\t\t <td><select name=\"'. $this->id .'_handling_country[' . $i . ']\">' . $countryOps . '</select></td>\n\t\t\t \t\t <td>' . $cur_symbol . '<input type=\"text\" value=\"' . $arr['fee'] . '\" name=\"'. $this->id .'_handling_fee[' . $i . ']\" size=\"5\" /> &nbsp; % <input type=\"text\" value=\"' . $arr['percent'] . '\" name=\"'. $this->id .'_handling_percent[' . $i . ']\" size=\"5\" /></td></tr>';\n\t\t \t\t}\n\t\t \t} echo '<tr colspan=\"3\">' . _e( 'Set different handling rates or base fees for different countries. These prices will be added to all qualifying orders.', 'woocommerce' ) . '</tr>';\n\t\t \t?>\n\t\t \t</tbody>\n\t\t </table>\n\t\t </td>\n\t\t </tr>\n\t\t \t<tr valign=\"top\" id=\"table_rate_based\">\n\t\t <th scope=\"row\" class=\"titledesc\"><?php _e( 'Shipping Table Rates', 'woocommerce' ); ?>:</th>\n\t\t <td class=\"forminp\" id=\"<?php echo $this->id; ?>_table_rates\">\n\t\t \t<table class=\"shippingrows widefat\" cellspacing=\"0\">\n\t\t \t\t<thead>\n\t\t \t\t\t<tr>\n\t\t \t\t\t\t<th class=\"check-column\"><input type=\"checkbox\"></th>\n\t\t \t \t<th class=\"shipping_class\"><?php _e( 'Title', 'woocommerce' ); ?>* <a class=\"tips\" data-tip=\"<?php _e('This controls the title which the user sees during checkout','woocommerce'); ?>\">[?]</a></th>\n\t\t \t \t<th class=\"shipping_class\"><?php _e( 'Identifier', 'woocommerce' ); ?> <a class=\"tips\" data-tip=\"<?php _e('Separates which rates are combined and which become different options. If left blank, one will be generated.','woocommerce'); ?>\">[?]</a></th>\n\t\t \t\t\t\t<th><?php _e( 'Zone', 'woocommerce' ); ?>* <a class=\"tips\" data-tip=\"<?php _e('Setup and review zones under the \\'Shipping Zones\\' tab','woocommerce'); ?>\">[?]</a></th>\n\t\t \t \t<th><?php _e( 'Shipping Class', 'woocommerce' ); ?></th>\n\t\t \t \t<th><?php _e( 'Based On', 'woocommerce' ); ?></th>\n\t\t \t \t<th><?php _e( 'Min', 'woocommerce' ); ?></th>\n\t\t \t \t<th><?php _e( 'Max', 'woocommerce' ); ?></th>\n\t\t \t \t<th><?php _e( 'Cost', 'woocommerce' ); ?> <a class=\"tips\" data-tip=\"<?php echo $cur_symbol; _e(' - Fixed Price&lt;br /&gt;% - Percentage of Cart Subtotal&lt;br /&gt;x - Multiply cost by quantity&lt;br /&gt;(does not apply to Per Item method)&lt;br /&gt;w - Multiply cost by weight&lt;br /&gt;D - Deny: the titled shipping rate will be removed','woocommerce'); ?>\">[?]</a></th>\n\t\t \t \t<th><?php _e( 'Bundle', 'woocommerce' ); ?> <a class=\"tips\" data-tip=\"<?php _e('If supplied, charges cost up until quantity given. Then charges second price for this and every item after.','woocommerce'); ?>\">[?]</a></th>\n\t\t \t \t<th><?php _e( 'Default', 'woocommerce' ); ?> <a class=\"tips\" data-tip=\"<?php _e('Check the box to set this option as the default selected choice on the cart page','woocommerce'); ?>\">[?]</a></th>\n\t\t \t\t\t</tr>\n\t\t \t\t</thead>\n\t\t \t\t<tfoot>\n\t\t \t\t\t<tr>\n\t\t \t\t\t\t<th colspan=\"3\"><a href=\"#\" class=\"add button\"><?php _e( '+ Add Table Rate', 'woocommerce' ); ?></a></th>\n\t\t \t\t\t\t<th colspan=\"8\" style=\"text-align:right;\"><small><?php _e( 'Use the wildcard symbol (*) to denote multiple regions', 'woocommerce' ); ?></small>\n\t\t \t\t\t\t\t<a href=\"#\" class=\"double button\"><?php _e( 'Duplicate selected rates', 'woocommerce' ); ?></a>\n\t\t \t\t\t\t\t<a href=\"#\" class=\"remove button\"><?php _e( 'Delete selected rates', 'woocommerce' ); ?></a></th>\n\t\t \t\t\t</tr>\n\t\t \t\t</tfoot>\n\t\t \t\t<tbody class=\"table_rates\">\n\t\t \t<?php\n\t\t \t$i = -1;\n\t\t \tif ( $this->table_rates ) {\n\t\t \t\tforeach ( $this->table_rates as $class => $rate ) {\n\t\t\t \t\t$i++;\n\t\t\t\t\t\t\t\t\t$selType = \"<select name=\\\"\". $this->id .\"_shiptype[\" . $i . \"]\\\" class=\\\"shiptype\\\">\n\t\t\t\t\t\t\t\t\t\t<option>\".$cur_symbol.\"</option>\n\t\t\t\t\t\t\t\t\t\t<option\";\n\t\t\t\t\t\t\t\t\t\tif($rate['shiptype'] == \"%\") $selType .= \" selected=\\\"selected\\\"\";\n\t\t\t\t\t\t\t\t\t\t$selType .= \">%</option>\n\t\t\t\t\t\t\t\t\t\t<option\";\n\t\t\t\t\t\t\t\t\t\tif($rate['shiptype'] == \"x\") $selType .= \" selected=\\\"selected\\\"\";\n\t\t\t\t\t\t\t\t\t\t$selType .= \">x</option>\n\t\t\t\t\t\t\t\t\t\t<option\";\n\t\t\t\t\t\t\t\t\t\tif($rate['shiptype'] == \"w\") $selType .= \" selected=\\\"selected\\\"\";\n\t\t\t\t\t\t\t\t\t\t$selType .= \">w</option>\n\t\t\t\t\t\t\t\t\t\t<option\";\n\t\t\t\t\t\t\t\t\t\tif($rate['shiptype'] == \"D\") $selType .= \" selected=\\\"selected\\\"\";\n\t\t\t\t\t\t\t\t\t\t$selType .= \">D</option></select>\";\n\t\t\t \t\t$condOps = \"\";\n\t\t\t \t\tforeach($conds as $key => $val) { \n\t\t\t \t\t\t$condOps .= '<option value=\"' . $key . '\" ' . selected($rate['cond'], $key, false) . '>' . $val . '</option>';\n\t\t\t \t\t}\n\t\t\t \t\t$zoneOps = \"\";\n\t\t\t \t\tforeach ($zones as $value) {\n\t\t\t \t\t\t$zoneOps .= '<option value=\"' . $value['zone_id'] . '\" ' . selected($rate['zone'], $value['zone_id'], false) . '>' . $value['zone_title'] . '</option>';\n\t\t\t \t\t}\n\n\t\t\t \t\techo '<tr class=\"cart_rate\">\n\t\t\t \t\t <td class=\"check-column\"><input type=\"checkbox\" name=\"select\" /></td>\n\t\t\t \t\t <td><input type=\"text\" value=\"' . stripslashes( $rate['title'] ) . '\" name=\"'. $this->id .'_title[' . $i . ']\" class=\"title\" size=\"25\" /></td>\n\t\t\t \t\t <td><input type=\"text\" value=\"' . $rate['identifier'] . '\" name=\"'. $this->id .'_identifier[' . $i . ']\" class=\"identifier\" size=\"25\" /></td>\n\t\t\t\t\t <td><select name=\"'. $this->id .'_zone[' . $i . ']\" class=\"zone\">' . $zoneOps . '</select></td>\n\t\t\t\t\t <td><select name=\"'. $this->id .'_class[' . $i . ']\" class=\"class\"><option>*</option>';\n\t\t\t\t\t foreach($shippingClasses as $key => $val) echo '<option value=\"' . $val->term_id . '\" '.selected( $rate['class'], $val->term_id, false) . '>' . $val->name . '</option>';\n\t\t\t\t\t echo '</select></td><td><select name=\"'. $this->id .'_cond[' . $i . ']\" class=\"condition\">' . $condOps . '</select></td>\n\t\t\t\t\t <td><input type=\"text\" value=\"' . $rate['min'] . '\" name=\"'. $this->id .'_min[' . $i . ']\" class=\"min\" placeholder=\"'.__( 'n/a', 'woocommerce' ).'\" size=\"6\" /></td>\n\t\t\t\t\t <td><input type=\"text\" value=\"' . $rate['max'] . '\" name=\"'. $this->id .'_max[' . $i . ']\" class=\"max\" placeholder=\"'.__( 'n/a', 'woocommerce' ).'\" size=\"6\" /></td>\n\t\t\t\t\t <td>' . $selType . ' <input type=\"text\" value=\"' . $rate['cost'] . '\" name=\"'. $this->id .'_cost[' . $i . ']\" class=\"cost\" placeholder=\"'.__( '0.00', 'woocommerce' ).'\" size=\"6\" /></td>\n\t\t\t\t\t <td>qty >= <input type=\"text\" value=\"' . $rate['bundle_qty'] . '\" name=\"'. $this->id .'_bundle_qty[' . $i . ']\" class=\"bundle_qty\" placeholder=\"0\" size=\"3\" /><br />' . $cur_symbol . '\n\t\t\t\t\t \t<input type=\"text\" value=\"' . $rate['bundle_cost'] . '\" name=\"' . $this->id . '_bundle_cost[' . $i . ']\" class=\"bundle_cost\" placeholder=\"'.__( '0.00', 'woocommerce' ).'\" size=\"6\" /></td>\n\t\t\t\t\t <td><input type=\"checkbox\" name=\"' . $this->id . '_default[' . $i . ']\" class=\"default\" '.checked( $rate['default'], 'on', false) . ' /></td>\n\t\t\t\t </tr>';\n\t\t \t\t}\n\t\t \t}\n\t\t \t?>\n\t\t \t</tbody>\n\t\t </table>\n\t\t </td>\n\t\t </tr>\n\t\t \t<tr valign=\"top\" id=\"shipping_class_priorities\">\n\t\t <th scope=\"row\" class=\"titledesc\"><?php _e( 'Shipping Class Priorities', 'woocommerce' ); ?>:</th>\n\t\t <td class=\"forminp\" id=\"<?php echo $this->id; ?>_class_priorities\">\n\t\t \t<table class=\"shippingrows widefat\" cellspacing=\"0\">\n\t\t \t\t<thead>\n\t\t \t\t\t<tr>\n\t\t \t \t<th class=\"shipping_class\"><?php _e( 'Shipping Class', 'woocommerce' ); ?></th>\n\t\t \t \t<th><?php _e( 'Priority', 'woocommerce' ); ?> <a class=\"tips\" data-tip=\"Enter any whole number, largest number is highest priority\">[?]</a></th>\n\t\t \t \t<th><?php _e( 'Exclude', 'woocommerce' ); ?> <a class=\"tips\" data-tip=\"If shipping is free for items with this class, check the box to exclude these cart items from the per-order method\">[?]</a></th>\n\t\t \t\t\t</tr>\n\t\t \t\t</thead>\n\t\t \t\t<tfoot>\n\t\t \t\t\t<tr>\n\t\t \t\t\t\t<th colspan=\"3\"><i><?php _e( 'These priorities will be used to calculate the appropriate \"Per Order\" shipping price in the table above. When an order has items of different shipping classes, the one with the highest priority will be used.', 'woocommerce' ); ?></i></th>\n\t\t \t\t\t</tr>\n\t\t \t\t</tfoot>\n\t\t \t\t<tbody class=\"class_priorities\">\n\t\t \t<?php\n\t\t \t$class_priorities_array = array();\n\t\t \tif(count($shippingClasses) > 0) {\n\t\t\t \tforeach ($shippingClasses as $key => $val) {\n\t\t\t \t\t$class_priorities_array[$val->term_id] = array(\"term_id\" => $val->term_id, \"name\" => $val->name, \"priority\" => (float) 10, \"exclude\" => '0');\n\t\t\t \t}\n\t\t\t }\n\t\t \tif(count($this->class_priorities) > 0) {\n\t\t\t \tforeach ($this->class_priorities as $key => $val) {\n\t\t\t \t\tif(!array_key_exists($val['term_id'], $class_priorities_array)) unset($this->class_priorities[$val['term_id']]);\n\t\t\t \t\t\telseif( $class_priorities_array[$key]['name'] != $val['name'] ) $this->class_priorities[$key]['name'] = $class_priorities_array[$key]['name'];\n\t\t\t \t}\n\t\t\t }\n\t\t \t$class_priorities_array = $this->class_priorities + $class_priorities_array;\n\n\t\t\t\t\t\t\t// Sort Array by Priority\n\t\t\t\t\t\t\tif(count($class_priorities_array) > 0) {\n\t\t\t\t\t\t\t\tforeach ($class_priorities_array as $key => $row) {\n\t\t\t \t\t\t\t\t$name[$key] = $row['name'];\n\t\t\t \t\t\t\t\t$priority[$key] = $row['priority'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tarray_multisort($priority, SORT_DESC, $name, SORT_ASC, $class_priorities_array);\n\t\t\t\t\t\t\t}\n\n\t\t \t$i = -1;\n\t\t \tif(count($class_priorities_array) > 0) {\n\t\t \t\tforeach ( $class_priorities_array as $id => $arr ) {\n\t\t \t\t\t$i++;\n\t\t \t\t\t$checked = ($arr['excluded'] == 'on') ? ' checked=\"checked\"' : '';\n\t\t\t \t\techo '<tr class=\"shipping_class\">\n\t\t\t \t\t\t<input type=\"hidden\" name=\"'. $this->id .'_scpid[' . $i . ']\" value=\"' . $arr['term_id'] . '\" />\n\t\t\t \t\t\t<input type=\"hidden\" name=\"'. $this->id .'_scp[' . $i . ']\" value=\"' . $id . '\" />\n\t\t\t \t\t\t<input type=\"hidden\" name=\"'. $this->id .'_sname[' . $i . ']\" value=\"' . $arr['name'] . '\" />\n\t\t\t \t\t\t<td>'.$arr['name'].'</td>\n\t\t\t \t\t <td><input type=\"text\" value=\"' . $arr['priority'] . '\" name=\"'. $this->id .'_priority[' . $i . ']\" size=\"5\" /></td>\n\t\t\t \t\t <td><input type=\"checkbox\" ' . $checked . '\" name=\"'. $this->id .'_excluded[' . $i . ']\" size=\"5\" /></td>';\n\t\t \t\t}\n\t\t \t} else echo '<tr colspan=\"3\"><td>You have no shipping classes available</td></tr>'\n\t\t \t?>\n\t\t \t</tbody>\n\t\t </table>\n\t\t </td>\n\t\t </tr>\n\t\t\t</table><!--/.form-table-->\n\t\t\t<h4 class=\"title_drop title_h4 ship_free_title\"><?php _e('Set the Order Shipping Options Will Appear','woocommerce'); ?></h4>\n\t\t\t<table class=\"form-table\">\n\t\t \t<tr valign=\"top\" id=\"shipping_title_order\">\n\t\t <th scope=\"row\" class=\"titledesc\"><?php _e( 'Shipping Cost Order', 'woocommerce' ); ?>:</th>\n\t\t <td class=\"forminp\" id=\"<?php echo $this->id; ?>_order_titles\">\n\t\t \t<table class=\"shippingrows widefat\" cellspacing=\"0\">\n\t\t \t\t<tbody>\n<?php\n\t \tif(count($this->title_order) > 0) {\n\t \t\tforeach ( $this->title_order as $tor ) {\n?>\n\t\t\t\t\t\t\t\t<tr><td class=\"title\"><input type=\"hidden\" name=\"<?php echo $this->id; ?>_title_order[]\" value=\"<?php echo $tor; ?>\"><span><?php echo $tor; ?></span></td></tr>\n<?php\n\t \t\t}\n\t \t}\n?>\n\t\t\t\t\t\t\t</tbody>\n\t\t \t</table>\n\t\t\t\t\t\t<p><?php _e('Not seeing all of your options','woocommerce'); ?>? <a href=\"#\" id=\"refresh_list\"><?php _e('Refresh List','woocommerce'); ?></a></p>\n\t\t </td>\n\t\t </tr>\n\t\t\t</table>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tjQuery(function() {\n\t\t\t\t\tjQuery('h4.title_drop').next('.form-table').css('display','none');\n\t\t\t\t\tjQuery('h4.title_drop.general_settings_title').next('.form-table').css('display','table');\n\t\t\t\t\tjQuery('h4.title_drop.table_settings_title').next('.form-table').css('display','table');\n\t\t\t\t\tjQuery('h4.title_drop').live('click', function(){\n\t\t\t\t\t\tif (jQuery(this).next('.form-table').is(\":hidden\")) {\n\t\t\t\t\t\t\tjQuery(this).next('.form-table').show(\"slow\",\"linear\");\n\t\t\t\t\t\t\tjQuery(this).addClass('active');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tjQuery(this).next('.form-table').hide(\"slow\",\"linear\");\n\t\t\t\t\t\t\tjQuery(this).removeClass('active');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//jQuery(this).next('.form-table').slideToggle(\"slow\");\n\t\t\t\t\t});\n\n\t\t\t\t\tjQuery('#<?php echo $this->id; ?>_table_rates a.add').live('click', function(){\n\t\t\t\t\t\tvar size = jQuery('#<?php echo $this->id; ?>_table_rates tbody .cart_rate').size();\n\n\t\t\t\t\t\tjQuery('<tr class=\"cart_rate\">\\\n\t\t\t\t\t\t <td class=\"check-column\"><input type=\"checkbox\" name=\"select\" /></td>\\\n\t\t \t\t\t <td><input type=\"text\" name=\"<?php echo $this->id; ?>_title[' + size + ']\" class=\"title\" size=\"25\" /></td>\\\n\t\t \t\t\t <td><input type=\"text\" name=\"<?php echo $this->id; ?>_identifier[' + size + ']\" class=\"identifier\" size=\"25\" /></td>\\\n\t\t\t\t <td><select name=\"<?php echo $this->id; ?>_zone[' + size + ']\" class=\"zone\"><?php echo addslashes($zoneOpsJS); ?></select></td>\\\n\t\t\t\t <td><select name=\"<?php echo $this->id; ?>_class[' + size + ']\" class=\"class\"><option>*</option><?php echo addslashes($classOpsG); ?></select></td>\\\n\t\t\t\t <td><select name=\"<?php echo $this->id; ?>_cond[' + size + ']\" class=\"condition\"><?php echo addslashes($condOpsG); ?></select></td>\\\n\t\t\t\t <td><input type=\"text\" name=\"<?php echo $this->id; ?>_min[' + size + ']\" class=\"min\" placeholder=\"0\" size=\"6\" /></td>\\\n\t\t\t\t <td><input type=\"text\" name=\"<?php echo $this->id; ?>_max[' + size + ']\" class=\"max\" placeholder=\"*\" size=\"6\" /></td>\\\n\t\t\t\t <td><select name=\"<?php echo $this->id; ?>_shiptype[' + size + ']\" class=\"shiptype\"><option><?php echo $cur_symbol; ?></option><option>%</option><option>x</option><option>w</option><option>D</option></select>\\\n\t\t\t\t \t<input type=\"text\" name=\"<?php echo $this->id; ?>_cost[' + size + ']\" class=\"cost\" placeholder=\"0.00\" size=\"6\" /></td>\\\n\t\t\t\t\t\t <td>qty >= <input type=\"text\" name=\"<?php echo $this->id; ?>_bundle_qty[' + size + ']\" class=\"bundle_qty\" placeholder=\"0\" size=\"3\" /><br />\\\n\t\t\t\t\t\t \t<?php echo $cur_symbol; ?> <input type=\"text\" name=\"<?php echo $this->id; ?>_bundle_cost[' + size + ']\" class=\"bundle_cost\" placeholder=\"0.00\" size=\"6\" /></td>\\\n\t\t\t\t\t\t\t\t <td><input type=\"checkbox\" name=\"<?php echo $this->id; ?>_default[' + size + ']\" class=\"default\" /></td>\\\n\t\t\t\t\t\t </tr>').appendTo('#<?php echo $this->id; ?>_table_rates table tbody');\n\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t});\n\n\t\t\t\t\t// Duplicate row\n\t\t\t\t\tjQuery('#<?php echo $this->id; ?>_table_rates a.double').live('click', function(){\n\t\t\t\t\t\tvar size = jQuery('#<?php echo $this->id; ?>_table_rates tbody .cart_rate').size();\n\n\t\t\t\t\t\tjQuery('#<?php echo $this->id; ?>_table_rates table tbody tr td.check-column input:checked').each(function(i, el){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tjQuery('<tr class=\"cart_rate\">\\\n\t\t\t\t\t\t\t <td class=\"check-column\"><input type=\"checkbox\" name=\"select\" /></td>\\\n\t\t\t \t\t\t <td><input type=\"text\" name=\"<?php echo $this->id; ?>_title[' + size + ']\" class=\"title\" size=\"25\" value=\"' + jQuery(el).closest('tr').find('.title').val() +'\" /></td>\\\n\t\t \t\t\t \t<td><input type=\"text\" name=\"<?php echo $this->id; ?>_identifier[' + size + ']\" class=\"identifier\" size=\"25\" /></td>\\\n\t\t\t\t\t <td><select name=\"<?php echo $this->id; ?>_zone[' + size + ']\" class=\"zone\"><?php echo addslashes($zoneOpsJS); ?></select></td>\\\n\t\t\t\t\t <td><select name=\"<?php echo $this->id; ?>_class[' + size + ']\" class=\"class\"><option>*</option><?php echo addslashes($classOpsG); ?></select></td>\\\n\t\t\t\t\t <td><select name=\"<?php echo $this->id; ?>_cond[' + size + ']\" class=\"condition\"><?php echo addslashes($condOpsG); ?></select></td>\\\n\t\t\t\t\t <td><input type=\"text\" name=\"<?php echo $this->id; ?>_min[' + size + ']\" class=\"min\" value=\"' + jQuery(el).closest('tr').find('.min').val() +'\" placeholder=\"0\" size=\"6\" /></td>\\\n\t\t\t\t\t <td><input type=\"text\" name=\"<?php echo $this->id; ?>_max[' + size + ']\" class=\"max\" value=\"' + jQuery(el).closest('tr').find('.max').val() +'\" placeholder=\"*\" size=\"6\" /></td>\\\n\t\t\t\t\t <td><select name=\"<?php echo $this->id; ?>_shiptype[' + size + ']\" class=\"shiptype\"><option><?php echo $cur_symbol; ?></option><option>%</option><option>x</option><option>w</option><option>D</option></select>\\\n\t\t\t\t\t \t<input type=\"text\" name=\"<?php echo $this->id; ?>_cost[' + size + ']\" class=\"cost\" value=\"' + jQuery(el).closest('tr').find('.cost').val() +'\" placeholder=\"0.00\" size=\"6\" /></td>\\\n\t\t\t\t\t\t\t <td>qty >= <input type=\"text\" name=\"<?php echo $this->id; ?>_bundle_qty[' + size + ']\" placeholder=\"0\" value=\"' + jQuery(el).closest('tr').find('.bundle_qty').val() +'\" size=\"3\" /><br />\\\n\t\t\t\t\t\t\t \t<?php echo $cur_symbol; ?> <input type=\"text\" name=\"<?php echo $this->id; ?>_bundle_cost[' + size + ']\" value=\"' + jQuery(el).closest('tr').find('.bundle_cost').val() +'\" class=\"bundle_cost\" placeholder=\"0.00\" size=\"6\" /></td>\\\n\t\t\t\t\t\t\t <td><input type=\"checkbox\" name=\"<?php echo $this->id; ?>_default[' + size + ']\" class=\"default\" /></td>\\\n\t\t\t\t\t\t\t </tr>').appendTo('#<?php echo $this->id; ?>_table_rates table tbody');\n\n\t\t\t\t\t\t\tjQuery('#<?php echo $this->id; ?>_table_rates table tbody tr').last().find('select.zone').val(jQuery(el).closest('tr').find('select.zone').val())\n\t\t\t\t\t\t\tjQuery('#<?php echo $this->id; ?>_table_rates table tbody tr').last().find('select.class').val(jQuery(el).closest('tr').find('select.class').val())\n\t\t\t\t\t\t\tjQuery('#<?php echo $this->id; ?>_table_rates table tbody tr').last().find('select.condition').val(jQuery(el).closest('tr').find('select.condition').val())\n\t\t\t\t\t\t\tjQuery('#<?php echo $this->id; ?>_table_rates table tbody tr').last().find('select.shiptype').val(jQuery(el).closest('tr').find('select.shiptype').val())\n\t\t\t\t\t\t\tif(jQuery(el).closest('tr').find('.default').attr('checked') == 'checked') jQuery('#<?php echo $this->id; ?>_table_rates table tbody tr').last().find('.default').attr('checked','checked');\n\n\t\t\t\t\t\t\tsize = size + 1;\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t});\n\n\t\t\t\t\t// Remove row\n\t\t\t\t\tjQuery('#<?php echo $this->id; ?>_table_rates a.remove').live('click', function(){\n\t\t\t\t\t\tvar answer = confirm(\"<?php _e('Delete the selected rates?', 'woocommerce'); ?>\")\n\t\t\t\t\t\tif (answer) {\n\t\t\t\t\t\t\tjQuery('#<?php echo $this->id; ?>_table_rates table tbody tr td.check-column input:checked').each(function(i, el){\n\t\t\t\t\t\t\t\tjQuery(el).closest('tr').remove();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t});\n\n\t\t\t\t\tjQuery('#<?php echo $this->id; ?>_handling_rates a.add').live('click', function(){\n\n\t\t\t\t\tvar size = jQuery('#<?php echo $this->id; ?>_handling_rates tbody .handling_fees').size();\n\t\t\t\t\tjQuery('<tr class=\"handling_fees\">\\\n\t\t\t \t\t <td class=\"check-column\"><input type=\"checkbox\" name=\"select\" /></td>\\\n\t\t\t\t <td><select name=\"<?php echo $this->id; ?>_handling_country[' + size + ']\"><?php echo addslashes($zoneOpsJS); ?></select></td>\\\n\t\t\t \t\t <td><?php echo $cur_symbol; ?> <input type=\"text\" name=\"<?php echo $this->id; ?>_handling_fee[' + size + ']\" placeholder=\"0.00\" size=\"5\" /> &nbsp; % <input type=\"text\" name=\"<?php echo $this->id; ?>_handling_percent[' + size + ']\" placeholder=\"0.00\" size=\"5\" /></td>\\\n\t\t\t\t\t\t\t </tr>').appendTo('#<?php echo $this->id; ?>_handling_rates table tbody');\n\t\t\t\t\treturn false;\n\t\t\t\t\t});\n\n\t\t\t\t\t// Remove row\n\t\t\t\t\tjQuery('#<?php echo $this->id; ?>_handling_rates a.remove').live('click', function(){\n\t\t\t\t\t\tvar answer = confirm(\"<?php _e('Delete the selected rates?', 'woocommerce'); ?>\")\n\t\t\t\t\t\tif (answer) {\n\t\t\t\t\t\t\tjQuery('#<?php echo $this->id; ?>_handling_rates table tbody tr td.check-column input:checked').each(function(i, el){\n\t\t\t\t\t\t\t\tjQuery(el).closest('tr').remove();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t});\n\n\t\t\t\t\tjQuery('#refresh_list').live('click', function(){\n\t\t\t\t\t\tvar tableAr = new Array();\n\t\t\t\t\t\tvar titlesAr = new Array();\n\t\t\t\t\t\tjQuery('#<?php echo $this->id; ?>_order_titles table tbody tr').each(function(i, el){\n\t\t\t\t\t\t\ttitlesAr.push(jQuery(el).closest('tr').find('td.title span').html());\n\t\t\t\t\t\t});\n\t\t\t\t\t\tjQuery('#<?php echo $this->id; ?>_table_rates table tbody tr').each(function(i, el){\n\t\t\t\t\t\t\ttableAr.push(jQuery(el).closest('tr').find('input.identifier').val());\n\t\t\t\t\t\t});\n\n\t\t\t\t\t for ( x = 0; x < tableAr.length; x++ ) {\n\t\t\t\t if ( jQuery.inArray(tableAr[x], titlesAr) == -1 ) {\n\t\t\t\t\t \ttitlesAr.push( tableAr[x] );\n\t\t\t\t\t \tjQuery('<tr><td class=\"title '+tableAr[x]+'\"><input type=\"hidden\" name=\"<?php echo $this->id; ?>_title_order[]\" value=\"'+tableAr[x]+'\"><span>'+tableAr[x]+'</span></td></tr>').appendTo('#<?php echo $this->id; ?>_order_titles table tbody');\n\t\t\t\t\t }\n\t\t\t\t\t }\n\n\t\t\t\t\t for ( y = 0; y < titlesAr.length; y++ ) {\n\t\t\t\t if ( jQuery.inArray(titlesAr[y], tableAr) == -1 ) {\n\t\t\t\t\t \tjQuery('#<?php echo $this->id; ?>_order_titles table tbody tr:contains(\"'+titlesAr[y]+'\")').remove();\n\t\t\t\t\t }\n\t\t\t\t\t }\n\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t});\n\n\t\t jQuery(function() {\n\t\t var fixHelperModified = function(e, tr) {\n\t\t var $originals = tr.children();\n\t\t var $helper = tr.clone();\n\t\t $helper.children().each(function(index)\n\t\t {\n\t\t jQuery(this).width($originals.eq(index).width())\n\t\t });\n\t\t return $helper;\n\t\t };\n\t\t jQuery(\"#<?php echo $this->id; ?>_order_titles table tbody\").sortable({\n\t\t helper: fixHelperModified\n\t\t }).disableSelection();\n\t\t });\n\t\t\t\t});\n\t\t\t</script>\n\t<?php\n\t\t\t\t} // End admin_options()\n\n\n\t\t\t\t/**\n\t\t\t\t * process_cart_rates function.\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @return void\n\t\t\t\t */\n\t\t\t\tfunction process_table_rates() {\n\t\t\t\t\tglobal $wpdb;\n\n\t\t\t\t\t// Initialize blank arrays & save variables\n\t\t\t\t\t$table_rate_title = $table_rate_zone = $table_rate_class = $table_rate_cond = $table_rate_min = $table_rate_max = $table_rate_cost = $table_rate_bundle_qty = $table_rate_bundle_cost = $table_rate_default = $table_rates = $table_rate_priority = $class_scpid = $class_scp = $class_sname = $class_priorities = $class_excluded = $handling_country = $handling_fee = $handling_percent = $title_order = array();\n\t\t\t\t\t$saveNames = array('_title', '_identifier', '_zone', '_class', '_cond', '_min', '_max', '_shiptype', '_cost', '_bundle_qty', '_bundle_cost', '_default', '_title_order');\n\n\t\t\t\t\t// Clean table rate data\n\t\t\t\t\tforeach ($saveNames as $sn) {\n\t\t\t\t\t\t$save_name = 'table_rate' . $sn;\n\t\t\t\t\t\tif ( isset( $_POST[ $this->id . $sn] ) ) $$save_name = array_map( 'woocommerce_clean', $_POST[ $this->id . $sn] );\n\t\t\t\t\t}\n\t\t\t\t\tif( isset( $table_rate_title_order ) && count( $table_rate_title_order ) ) $table_rate_title_order = array_map( 'sanitize_title', $table_rate_title_order );\n\t\t\t\t\t\telse $table_rate_title_order = array();\n\t\t\t\t\t// Clean handling data\n\t\t\t\t\t$saveNames = array('_country', '_fee', '_percent');\n\t\t\t\t\tforeach ($saveNames as $sn) {\n\t\t\t\t\t\t$save_name = 'handling' . $sn;\n\t\t\t\t\t\tif ( isset( $_POST[ $this->id . '_handling'. $sn] ) ) $$save_name = array_map( 'woocommerce_clean', $_POST[ $this->id . '_handling' . $sn] );\n\t\t\t\t\t}\n\t\t\t\t\t// Clean classes data\n\t\t\t\t\t$saveNames = array('_scpid', '_scp', '_sname', '_priority', '_excluded');\n\t\t\t\t\tforeach ($saveNames as $sn) {\n\t\t\t\t\t\t$save_name = 'class' . $sn;\n\t\t\t\t\t\tif ( isset( $_POST[ $this->id . $sn] ) ) $$save_name = array_map( 'woocommerce_clean', $_POST[ $this->id . $sn] );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Get max key\n\t\t\t\t\t$values = $class_scp;\n\t\t\t\t\tksort( $values );\n\t\t\t\t\t$value = end( $values );\n\t\t\t\t\t$key = key( $values );\n\n\t\t\t\t\tfor ( $i = 0; $i <= $key; $i++ ) {\n\t\t\t\t\t\tif(isset($class_scp[$i])) {\n\t\t\t\t\t\t\tif($class_priority[$i] == '' || !is_numeric($class_priority[$i])) $class_priority[$i] = '10';\n\n\t\t\t\t\t\t\t// Add priorities to class priorities array\n\t\t\t\t\t\t\t$class_priorities[sanitize_title($class_scpid[$i])] = array(\n\t\t\t\t\t\t\t\t\"term_id\" => $class_scpid[$i],\n\t\t\t\t\t\t\t\t\"name\" => $class_sname[$i],\n\t\t\t\t\t\t\t\t'priority' => ceil($class_priority[$i]),\n\t\t\t\t\t\t\t\t'excluded' => ( isset( $class_excluded[ $i ] ) ) ? $class_excluded[$i] : FALSE\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n \t\t\t$zone_query = get_option( 'be_woocommerce_shipping_zones' );\n\t\t\t\t\t$zone_orders = array();\n\t\t\t\t\t$n = 1;\n\t\t\t\t\tif( count( $zone_query ) ) {\n\t\t\t\t\t\tforeach ($zone_query as $value) {\n\t\t\t\t\t\t\t$zone_orders[$value['zone_id']] = $n;\n\t\t\t\t\t\t\t$n++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Get max key\n\t\t\t\t\t$values = $handling_country;\n\t\t\t\t\tksort( $values );\n\t\t\t\t\t$value = end( $values );\n\t\t\t\t\t$key = key( $values );\n\n\t\t\t\t\tfor ( $i = 0; $i <= $key; $i++ ) {\n\t\t\t\t\t\tif(isset($handling_country[$i])) {\n\t\t\t\t\t\t\tif($handling_fee[$i] == '' || !is_numeric($handling_fee[$i])) $handling_fee[$i] = '0';\n\t\t\t\t\t\t\tif($handling_percent[$i] == '' || !is_numeric($handling_percent[$i])) $handling_percent[$i] = '0';\n\n\t\t\t\t\t\t\t$handling_fee[$i] = number_format($handling_fee[$i], 2, '.', '');\n\t\t\t\t\t\t\t$handling_percent[$i] = number_format($handling_percent[$i], 2, '.', '');\n\n\t\t\t\t\t\t\t// Add priorities to class priorities array\n\t\t\t\t\t\t\t$handling_rates[sanitize_title($handling_country[$i])] = array(\n\t\t\t\t\t\t\t\t\"zone\" => $handling_country[$i],\n\t\t\t\t\t\t\t\t'zone_order' => $zone_orders[ $handling_country[$i] ],\n\t\t\t\t\t\t\t\t'fee' => $handling_fee[$i],\n\t\t\t\t\t\t\t\t'percent' => $handling_percent[$i]\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Get max key\n\t\t\t\t\t$values = $table_rate_title;\n\t\t\t\t\tksort( $values );\n\t\t\t\t\t$value = end( $values );\n\t\t\t\t\t$key = key( $values );\n\n\t\t\t\t\tfor ( $i = 0; $i <= $key; $i++ ) {\n\t\t\t\t\t\tif ( isset( $table_rate_title[$i] ) && isset( $table_rate_zone[$i] ) && isset( $table_rate_cond[$i] ) ) {\n\n\t\t\t\t\t\t\tif($table_rate_min[$i] == '') $table_rate_min[$i] = '0';\n\t\t\t\t\t\t\tif($table_rate_max[$i] == '') $table_rate_max[$i] = '*';\n\t\t\t\t\t\t\tif($table_rate_bundle_qty[$i] == '') $table_rate_bundle_qty[$i] = '0';\n\t\t\t\t\t\t\tif($table_rate_bundle_cost[$i] == '' && $table_rate_shiptype[$i] != 'C') $table_rate_bundle_cost[$i] = '0';\n\t\t\t\t\t\t\tif($table_rate_identifier[$i] == '') $table_rate_identifier[$i] = $table_rate_title[$i];\n\t\t\t\t\t\t\t$table_rate_identifier[$i] = sanitize_title($table_rate_identifier[$i]);\n\n\t\t\t\t\t\t\t$table_rate_priority_ind = ( isset( $table_rate_class[ $i ] ) && $table_rate_class[ $i ] != '' && $table_rate_class[ $i ] != '*' ) ? $class_priorities[ sanitize_title($table_rate_class[ $i ]) ]['priority'] : '';\n\t\t\t\t\t\t\t$table_rate_cost[$i] = wc_format_decimal( $table_rate_cost[$i], get_option( 'woocommerce_price_num_decimals' ), false );//number_format($table_rate_cost[$i], 2, '.', '');\n\t\t\t\t\t\t\tif( $table_rate_cond[$i] == 'price' ) {\n\t\t\t\t\t\t\t\t$table_rate_min[$i] = wc_format_decimal( $table_rate_min[$i], get_option( 'woocommerce_price_num_decimals' ), false );//number_format($table_rate_min[$i], 2, '.', '');\n\t\t\t\t\t\t\t\tif($table_rate_max[$i] != '*') $table_rate_max[$i] = wc_format_decimal( $table_rate_max[$i], get_option( 'woocommerce_price_num_decimals' ), false );//number_format($table_rate_max[$i], 2, '.', '');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Add to cart rates array\n\t\t\t\t\t\t\t$table_rates[$i] = array(\n\t\t\t\t\t\t\t\t'title' => $table_rate_title[ $i ],\n\t\t\t\t\t\t\t\t'identifier' => $table_rate_identifier[ $i ],\n\t\t\t\t\t\t\t\t'zone' => $table_rate_zone[ $i ],\n\t\t\t\t\t\t\t\t'zone_order' => $zone_orders[ $table_rate_zone[ $i ] ],\n\t\t\t\t\t\t\t\t'class' => $table_rate_class[ $i ],\n\t\t\t\t\t\t\t\t'class_priority' => $table_rate_priority_ind,\n\t\t\t\t\t\t\t\t'cond' => $table_rate_cond[ $i ],\n\t\t\t\t\t\t\t 'min' => $table_rate_min[ $i ],\n\t\t\t\t\t\t\t 'max' => $table_rate_max[ $i ],\n\t\t\t\t\t\t\t 'shiptype' => $table_rate_shiptype[ $i ],\n\t\t\t\t\t\t\t 'cost' => $table_rate_cost[ $i ],\n\t\t\t\t\t\t\t 'bundle_qty' => $table_rate_bundle_qty[ $i ],\n\t\t\t\t\t\t\t 'bundle_cost' => $table_rate_bundle_cost[ $i ],\n\t\t\t\t\t\t\t 'default' => ( isset( $table_rate_default[ $i ] ) ) ? $table_rate_default[ $i ] : 0,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Obtain a list of columns\n\t\t\t\t\t$zone_order = $class_priority = $min = $title = $cost = array();\n\t\t\t\t\tif( count( $table_rates ) ) {\n\t\t\t\t\t\tforeach ($table_rates as $key => $row) {\n\t\t\t\t\t\t $zone_order[$key] = $row['zone_order'];\n\t\t\t\t\t\t $class_priority[$key] = $row['class_priority'];\n\t\t\t\t\t\t $min[$key] = $row['min'];\n\t\t\t\t\t\t $title[$key] = $row['title'];\n\t\t\t\t\t\t $cost[$key] = $row['cost'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Sort the rates based on the 5 columns\n\t\t\t\t\t\tarray_multisort($zone_order, SORT_ASC,\n\t\t\t\t\t\t\t\t\t\t$class_priority, SORT_ASC,\n\t\t\t\t\t\t\t\t\t\t$min, SORT_ASC,\n\t\t\t\t\t\t\t\t\t\t$title, SORT_ASC,\n\t\t\t\t\t\t\t\t\t\t$cost, SORT_ASC, $table_rates);\n\t\t\t\t\t}\n\n\t\t\t\t\tupdate_option( $this->table_rate_options, $table_rates );\n\n\t\t\t\t\tupdate_option( $this->class_priorities_options, $class_priorities );\n\n\t\t\t\t\t// Obtain a list of columns\n\t\t\t\t\t$zone_order = $fee = $percent = array();\n\t\t\t\t\tif( isset( $handling_rates ) && count( $handling_rates ) ) {\n\t\t\t\t\t\tforeach ($handling_rates as $key => $row) {\n\t\t\t\t\t\t $zone_order[$key] = $row['zone_order'];\n\t\t\t\t\t\t $fee[$key] = $row['fee'];\n\t\t\t\t\t\t $percent[$key] = $row['percent'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Sort the base fees based on the 3 columns\n\t\t\t\t\t\tarray_multisort($zone_order, SORT_ASC,\n\t\t\t\t\t\t\t\t\t\t$fee, SORT_ASC,\n\t\t\t\t\t\t\t\t\t\t$percent, SORT_ASC, $handling_rates);\n\t\t\t\t\t} else $handling_rates = array();\n\n\t\t\t\t\tupdate_option( $this->handling_rates_options, $handling_rates );\n\n\t\t\t\t\tupdate_option( $this->title_order_options, $table_rate_title_order );\n\n\t\t\t\t\t$this->get_table_rates();\n\t\t\t\t\t$this->get_class_priorities();\n\t\t\t\t\t$this->get_handling_rates();\n\t\t\t\t\t$this->get_title_order();\n\t\t\t\t}\n\n\n\t\t\t\t/**\n\t\t\t\t * get_highest_priority_class function.\n\t\t\t\t * sorts a multi-dimensional array by secondary value\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @return string\n\t\t\t\t */\n\t\t\t\tfunction get_highest_priority_class( $classes = array() ) {\n\t\t\t\t\t$classTerm = $classHigh = 0;\n\t\t\t\t\t$class_priorities = $this->class_priorities;\n\n\t\t\t\t\tif( isset( $classes ) && is_array( $classes ) && count( $classes ) ) {\n\t\t\t\t\t\t$new_class_priorities = array();\n\t\t\t\t\t\tforeach ($classes as $class) {\n\t\t\t\t\t\t\t$term = get_term_by( 'slug', $class, 'product_shipping_class', ARRAY_A );\n\t\t\t\t\t\t\tif( isset( $class_priorities[ $term['term_id'] ] ) ) $new_class_priorities[ $term['term_id'] ] = $class_priorities[ $term['term_id'] ];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$class_priorities = $new_class_priorities;\n\t\t\t\t\t}\n\n\t\t\t\t\tforeach ( $class_priorities as $key => $cls ) {\n\t\t\t\t\t\tif( $cls['excluded'] != 'on' && $cls['priority'] > $classHigh ) {\n\t\t\t\t\t\t\t$classTerm = $key;\n\t\t\t\t\t\t\t$classHigh = $cls['priority'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn $classTerm;\n\t\t\t\t}\n\n\n\t\t\t\t/**\n\t\t\t\t * get_cart_rates function.\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @return void\n\t\t\t\t */\n\t\t\t\tfunction get_table_rates() {\n\t\t\t\t\t$this->table_rates = array_filter( (array) get_option( $this->table_rate_options ) );\n\t\t\t\t}\n\n\n\n\t\t\t\t/**\n\t\t\t\t * get_class_priorities function.\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @return void\n\t\t\t\t */\n\t\t\t\tfunction get_class_priorities() {\n\t\t\t\t\t$this->class_priorities = array_filter( (array) get_option( $this->class_priorities_options ) );\n\t\t\t\t}\n\n\n\t\t\t /**\n\t\t\t\t * get_handling_rates function.\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @return void\n\t\t\t\t */\n\t\t\t\tfunction get_handling_rates() {\n\t\t\t\t\t$this->handling_rates = array_filter( (array) get_option( $this->handling_rates_options ) );\n\t\t\t\t}\n\n\n\t\t\t /**\n\t\t\t\t * get_handling_rates function.\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @return void\n\t\t\t\t */\n\t\t\t\tfunction get_title_order() {\n\t\t\t\t\t$this->title_order = array_filter( (array) get_option( $this->title_order_options ) );\n\t\t\t\t}\n\n\n\t\t\t /**\n\t\t\t * is_available function.\n\t\t\t *\n\t\t\t * @access public\n\t\t\t * @param mixed $package\n\t\t\t * @return bool\n\t\t\t */\n\t\t\t function is_available( $package ) {\n\t\t\t \tglobal $woocommerce;\n\n\t\t\t \tif ($this->enabled==\"no\") return false;\n\n\t\t\t\t\treturn apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', true, $package );\n\t\t\t }\n\n\t\t\t\t/**\n\t\t\t\t * be_zone_update_notice\n\t\t\t\t *\n\t\t\t\t * @package\t\tWooCommerce/Classes/Shipping\n\t\t\t\t * @access public\n\t\t\t\t * @param array $methods\n\t\t\t\t * @return array\n\t\t\t\t */\n\t\t\t\tfunction be_zone_update_notice() {\n\t\t\t\t\tglobal $wpdb;\n\n\t\t\t\t\t$current_zones = get_option( 'be_woocommerce_shipping_zones' );\n\t\t\t\t\tif( !isset( $current_zones ) || $current_zones == '' || ( is_array($current_zones) && count( $current_zones ) == 0 ) ) {\n\t\t\t\t\t\tif( !isset( $_GET['upgrade'] ) || ( isset( $_GET['upgrade'] ) && $_GET['upgrade'] != 'zones' ) ) {\n\t\t\t\t\t\t\t$old_version = (float) get_option('be_table_rate_version');\n\t\t\t\t\t\t\tif( $old_version <= 3.2 ) {\n\t\t\t\t\t\t\t\t$findTable = $wpdb->get_results(\"SHOW TABLES LIKE '\".$wpdb->prefix.\"woocommerce_shipping_zones'\", ARRAY_A);\n\t\t\t\t\t\t\t\tif( count( $findTable ) ) {\n\t\t\t\t\t\t\t\t\techo '<div class=\"error\" style=\"font-weight:bold;\"><p>'.__( 'ATTENTION: Version 3.3 of the Table Rate Shipping plugin for WooCommerce introduced a new, more efficient way of storing zone information. You will need to update your system in order for the plugin to continue functioning properly.', 'woocommerce' ).' <a href=\"'.admin_url( 'admin.php?page='.$GLOBALS['settings_slug'].'&tab=shipping_zones&upgrade=zones' ).'\"><button>Upgrade Zones</button></a></p></div>';\n\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\techo '<div class=\"error\" style=\"font-weight:bold;\"><p>'.__( 'ATTENTION: You have not defined any shipping zones for the WooCommerce Table Rate Shipping plugin. You must setup your zones before creating any rates in the shipping method\\'s settings page.','woocommerce' ).' <a href=\"'.admin_url( 'admin.php?page='.$GLOBALS['settings_slug'].'&tab=shipping_zones' ).'\" class=\"button-primary\">Setup Zones</a></p></div>';\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\techo '<div class=\"error\" style=\"font-weight:bold;\"><p>'.__( 'ATTENTION: You have not defined any shipping zones for the WooCommerce Table Rate Shipping plugin. You must setup your zones before creating any rates in the shipping method\\'s settings page.','woocommerce' ).' <a href=\"'.admin_url( 'admin.php?page='.$GLOBALS['settings_slug'].'&tab=shipping_zones' ).'\" class=\"button-primary\">Setup Zones</a></p></div>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * install function.\n\t\t\t\t *\n\t\t\t\t * @package\t\tWooCommerce/Classes/Shipping\n\t\t\t\t * @access public\n\t\t\t\t * @param array $methods\n\t\t\t\t * @return array\n\t\t\t\t */\n\t\t\t\tfunction install_plugin_button() {\n\t\t\t\t\tglobal $wpdb;\n\n\t\t\t\t\t// upgrade original pre-zone versions\n\t\t\t\t\t$old_version = get_option('be_table_rate_version');\n\t\t\t\t\tif( (float) $old_version <= 3.0 ) {\n\t\t\t\t\t\t$zones = array();\n\t\t\t\t\t\t$zone_id = 1;\n\t\t\t\t\t\t$table_rates = $this->table_rates;\n\t\t\t\t\t\tif(count($table_rates) > 0) {\n\t\t\t\t\t\t\tif( !array_key_exists('zone', $table_rates[0])) {\n\t\t\t\t\t\t\t\tforeach ($table_rates as $key => $value) {\n\t\t\t\t\t\t\t\t\t$tmp = array('country'=>$value['country'],'zip'=>$value['zip']);\n\t\t\t\t\t\t\t\t\t$is_zone = false;\n\t\t\t\t\t\t\t\t\tforeach ($zones as $zk => $z) {\n\t\t\t\t\t\t\t\t\t\tif($z['country'] == $value['country'] && $z['zip'] == $value['zip'])\n\t\t\t\t\t\t\t\t\t\t\t$is_zone = $zk;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif($is_zone) {\n\t\t\t\t\t\t\t\t\t\t$table_rates[$key]['zone'] = $is_zone;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$zone_country = ($value['country']) ? array($value['country']) : array();\n\t\t\t\t\t\t\t\t\t\t$zone_type = ($value['country'] == '*') ? 'everywhere' : 'postal';\n\t\t\t\t\t\t\t\t\t\t$zone_postal = ($value['zip'] == '*') ? '' : $value['zip'];\n\t\t\t\t\t\t\t\t\t\t$zones[ $zone_id ] = array(\n\t\t\t\t\t\t\t\t\t\t\t'zone_id' => $zone_id,\n\t\t\t\t\t\t\t\t\t\t\t'zone_enabled' => 'on',\n\t\t\t\t\t\t\t\t\t\t\t'zone_title' => 'Zone'.$zone_id,\n\t\t\t\t\t\t\t\t\t\t\t'zone_description' => '',\n\t\t\t\t\t\t\t\t\t\t\t'zone_type' => $zone_type,\n\t\t\t\t\t\t\t\t\t\t\t'zone_country' => $zone_country,\n\t\t\t\t\t\t\t\t\t\t\t'zone_postal' => $zone_postal,\n\t\t\t\t\t\t\t\t\t\t\t'zone_except' => '',\n\t\t\t\t\t\t\t\t\t\t\t'zone_order' => $zone_id,\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t$table_rates[$key]['zone'] = $zone_id_new;\n\t\t\t\t\t\t\t\t\t\t$zone_id++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tunset($table_rates[$key]['country']);\n\t\t\t\t\t\t\t\t\tunset($table_rates[$key]['zip']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tupdate_option( $this->table_rate_options, $table_rates );\n\t\t\t\t\t\t\t\t$this->get_table_rates();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// upgrade users from 3.2.x\n\t\t\t\t\t$findTable = $wpdb->get_results(\"SHOW TABLES LIKE '\".$wpdb->prefix.\"woocommerce_shipping_zones'\", ARRAY_A);\n\t\t\t\t\tif( count( $findTable ) ) {\n\t\t\t\t\t\t$zones = array();\n\t\t\t\t\t\t$selectCurrentZones = $wpdb->get_results(\"SELECT * FROM \".$wpdb->prefix.\"woocommerce_shipping_zones\", ARRAY_A);\n\t\t\t\t\t\tif(count($selectCurrentZones)) {\n\t\t\t\t\t\t\tforeach ($selectCurrentZones as $key => $zone) {\n\t\t\t\t\t\t\t\t$zones[$zone['zone_id']] = array(\n\t\t\t\t\t\t\t\t\t'zone_id' => $zone['zone_id'],\n\t\t\t\t\t\t\t\t\t'zone_enabled' => $zone['zone_enabled'],\n\t\t\t\t\t\t\t\t\t'zone_title' => $zone['zone_title'],\n\t\t\t\t\t\t\t\t\t'zone_description' => $zone['zone_description'],\n\t\t\t\t\t\t\t\t\t'zone_type' => $zone['zone_type'],\n\t\t\t\t\t\t\t\t\t'zone_country' => $zone['zone_country'],\n\t\t\t\t\t\t\t\t\t'zone_postal' => $zone['zone_postal'],\n\t\t\t\t\t\t\t\t\t'zone_order' => $zone['zone_order'],\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tupdate_option('be_woocommerce_shipping_zones',$zones);\n\t\t\t\t\t}\n\n\t\t\t\t\tif( !get_option('be_table_rate_version') )\n\t\t\t\t\t\tadd_option('be_table_rate_version',BE_Table_Rate_Shipping::$version);\n\t\t\t\t\telse\n\t\t\t\t\t\tupdate_option('be_table_rate_version',BE_Table_Rate_Shipping::$version);\n?>\n\t\t <div class=\"updated\" style=\"font-weight:bold;\">\n\t\t <p><?php _e('Your zones have been updated. Please test your forms to ensure that everything is in working order.','be_table_rate'); ?></p>\n\t\t </div>\n\t <p><a href=\"<?php echo admin_url( 'admin.php?page='.$GLOBALS['settings_slug'].'&tab=shipping&section=be_table_rate_shipping' ); ?>\" class=\"button-primary\">Continue to Table Rate Settings</a> <a href=\"<?php echo admin_url( 'admin.php?page='.$GLOBALS['settings_slug'].'&tab=shipping_zones' ); ?>\">View Shipping Zones</a></p>\n<?php\n\t\t\t\t\t//$redirect = add_query_arg( array('upgrade' => 'true'));\n\t\t\t\t\t//wp_safe_redirect( admin_url( 'admin.php?page=wc-settings&tab=shipping_zones&upgrade=true' ) );\n\t\t\t\t\t//exit;\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Initialize CSS stylesheet for use with plugin\n\t\t\t\t */\n\t\t\t\tpublic function register_plugin_styles() {\n\t\t\t\t\twp_register_style( 'be-table-rate-shipping', plugins_url( 'assets/plugin.css', __FILE__ ) );\n\t\t\t\t\twp_enqueue_style( 'be-table-rate-shipping' );\n\t\t\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t/**\n\t\t\t * add_cart_rate_method function.\n\t\t\t *\n\t\t\t * @package\t\tWooCommerce/Classes/Shipping\n\t\t\t * @access public\n\t\t\t * @param array $methods\n\t\t\t * @return array\n\t\t\t */\n\t\t\tfunction add_table_rate_method( $methods ) {\n\t\t\t\t$methods[] = 'BE_Table_Rate_Shipping';\n\t\t\t\treturn $methods;\n\t\t\t}\n\t\t\tadd_filter( 'woocommerce_shipping_methods', 'add_table_rate_method' );\n\n\t\t\t/**\n\t\t\t * ensure zone table is created and being used\n\t\t\t */\n\t\t\t//register_activation_hook( __FILE__, array( 'BE_Table_Rate_Shipping', 'activate' ) );\n\t\t\t//add_action( 'admin_init', array( 'BE_Table_Rate_Shipping', 'update' ) );\n\t\t\tadd_action( 'admin_notices', array( 'BE_Table_Rate_Shipping', 'be_zone_update_notice' ) );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "05829fabde5fcc7ccaecd7784d1ed412", "score": "0.5871877", "text": "function SK_shipping() {\n\t\tforeach ($this->array as $key => $value) {\n\t\t\tif ($value['príjemca-štát'] == 'Slovenská republika [SK]') {\n\t\t\t\t$rec_weight = $value['váha'];\n\t\t\t\tif ($this->get_minMax($rec_weight, 0.00, 3.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 2.47);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 3.01, 5.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 2.53);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 5.01, 10.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 2.63);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 10.01, 15.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 2.96);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 15.01, 20.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 3.49);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 20.01, 25.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 4.57);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 25.01, 30.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 5.11);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 30.01, 40.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 6.24);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 40.01, 50.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 7.31);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 50.01, 60.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 9.57);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 60.01, 70.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 11.93);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 70.01, 999.99)) {\n\t\t\t\t\t$discount = $this->discount_maxKg($rec_weight);\n\t\t\t\t\t$this->set_new_value($key, 'shipping', $discount);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "886bbe7abd8d9ea8c80f0ae2d42f8832", "score": "0.5870085", "text": "public function getShipping();", "title": "" }, { "docid": "a2e2ee713cd557ca0569d80741322fb7", "score": "0.58565027", "text": "public function ondemandOrderStore(Request $request)\n {\n \n $quotation_id = $request->quotation_id;\n\n // Get cart data\n $quotation = Quotation::find($quotation_id);\n\n\n $price = $quotation->price + ($quotation->price*(20/100));\n\n $shipping_charge = 100;\n $vatTax = 7.5;\n $currentTime = \\Carbon\\Carbon::now()->format('d-m-Y');\n\n\n\n // Get the client\n $client = Client::find(Session::get('CLIENT_ID'));\n\n //partial payment\n // $partial_payment = $request->partial_payment;\n\n // Check if agreed to terms condition\n if(!isset($request->terms)){\n return redirect()->back()->with('error', 'Please agree with the terms and conditions to continue.');\n }\n\n // Check if billing is different\n if(!isset($request->change_billing_address)){\n // Check if client's billing is specified\n if (!$client->billing){\n return redirect()->back()->with('error', 'Your profile\\'s billing address is not specified. Please check the box \"Change\" and fill up the form with your billing details.');\n }\n\n // Create instance of Billing model & assign form value then save to database\n $billing = new Billing();\n $billing->name = $client->billing->name;\n $billing->address = $client->billing->address;\n $billing->town = $client->billing->town;\n $billing->country = $client->billing->country;\n $billing->division = $client->billing->division;\n $billing->zipCode = $client->billing->zipCode;\n $billing->phone = $client->billing->phone;\n $billing->email = $client->billing->email;\n\n // Check if shipping is different\n if(!isset($request->change_shipping_address)){\n // Check if client's shipping is specified\n if (!$client->shipping){\n return redirect()->back()->with('error', 'Your profile\\'s shipping address is not specified. Please check the box \"Change\" and fill up the form with your shipping details.');\n }\n\n // Create instance of Shipping model & assign form value then save to database\n $shipping = new Shipping();\n $shipping->name = $client->shipping->name;\n $shipping->address = $client->shipping->address;\n $shipping->town = $client->shipping->town;\n $shipping->country = $client->shipping->country;\n $shipping->division = $client->shipping->division;\n $shipping->zipCode = $client->shipping->zipCode;\n $shipping->phone = $client->shipping->phone;\n $shipping->email = $client->shipping->email;\n\n }else{\n\n // Validate form data\n $rules = array(\n 'shipEmail' => 'required',\n 'shipPhone' => 'required',\n 'shipZipCode' => 'required',\n 'shipCountry' => 'required',\n 'shipDivision' => 'required',\n 'shipTown' => 'required',\n 'shipAddress' => 'required',\n );\n\n $validator = Validator::make ( Input::all(), $rules);\n if ($validator->fails()){\n return redirect()->back()->with('error', 'Please give the full Shipping Address.');\n }\n \n\n // Create instance of Shipping model & assign form value then save to database\n $shipping = new Shipping();\n $shipping->name = $request->shipName;\n $shipping->address = $request->shipAddress;\n $shipping->town = $request->shipTown;\n $shipping->country = $request->shipCountry;\n $shipping->division = $request->shipDivision;\n $shipping->zipCode = $request->shipZipCode;\n $shipping->phone = $request->shipPhone;\n $shipping->email = $request->shipEmail;\n }\n }else{\n \n // Validate form data\n $rules = array(\n 'billEmail' => 'required',\n 'billPhone' => 'required',\n 'billZipCode' => 'required',\n 'billCountry' => 'required',\n 'billDivision' => 'required',\n 'billTown' => 'required',\n 'billAddress' => 'required',\n );\n\n $validator = Validator::make ( Input::all(), $rules);\n if ($validator->fails()){\n return redirect()->back()->with('error', 'Please give the full Billing Address.');\n }\n\n // Create instance of Billing model & assign form value then save to database\n $billing = new Billing();\n $billing->name = $request->billName;\n $billing->address = $request->billAddress;\n $billing->town = $request->billTown;\n $billing->country = $request->billCountry;\n $billing->division = $request->billDivision;\n $billing->zipCode = $request->billZipCode;\n $billing->phone = $request->billPhone;\n $billing->email = $request->billEmail;\n\n\n // Check if shipping is different\n if(!isset($request->change_shipping_address)){\n // Check if client's shipping is specified\n if (!$client->shipping){\n return redirect()->back()->with('error', 'Your profile\\'s shipping address is not specified. Please check the box \"Change\" and fill up the form with your shipping details.');\n }\n\n // Create instance of Shipping model & assign form value then save to database\n $shipping = new Shipping();\n $shipping->name = $client->shipping->name;\n $shipping->address = $client->shipping->address;\n $shipping->town = $client->shipping->town;\n $shipping->country = $client->shipping->country;\n $shipping->division = $client->shipping->division;\n $shipping->zipCode = $client->shipping->zipCode;\n $shipping->phone = $client->shipping->phone;\n $shipping->email = $client->shipping->email;\n }else{\n\n // Validate form data\n $rules = array(\n 'shipEmail' => 'required',\n 'shipPhone' => 'required',\n 'shipZipCode' => 'required',\n 'shipCountry' => 'required',\n 'shipDivision' => 'required',\n 'shipTown' => 'required',\n 'shipAddress' => 'required',\n );\n\n $validator = Validator::make ( Input::all(), $rules);\n if ($validator->fails()){\n return redirect()->back()->with('error', 'Please give the full Shipping Address.');\n }\n\n // Create instance of Shipping model & assign form value then save to database\n $shipping = new Shipping();\n $shipping->name = $request->shipName;\n $shipping->address = $request->shipAddress;\n $shipping->town = $request->shipTown;\n $shipping->country = $request->shipCountry;\n $shipping->division = $request->shipDivision;\n $shipping->zipCode = $request->shipZipCode;\n $shipping->phone = $request->shipPhone;\n $shipping->email = $request->shipEmail;\n }\n }\n\n // Create instance of Order model & assign form value then save to database\n $order = new Order;\n $order->client_id = Session::get('CLIENT_ID');\n // $order->payment_id = $payment->id;\n // $order->discount_id = Session::get('coupon_id');\n $order->save();\n\n // Create instance of ondemandOrder model & assign form value then save to database\n $ondemandOrder = new Ondemandorder;\n $ondemandOrder->ondemand_id = $quotation->ondemand->id;\n $ondemandOrder->order_id = $order->id;\n $ondemandOrder->save();\n\n\n // Save billing and shipping details\n // Save shipping details\n if (isset($shipping)){\n $shipping->order_id = $order->id;\n $shipping->save();\n }\n\n // Save billing details\n if (isset($billing)){\n $billing->order_id = $order->id;\n $billing->save();\n }\n\n //payment\n\n\n $vatTax = $price * ($vatTax/100);\n $orderTotal = $price + $shipping_charge + $vatTax;\n\n /* PHP */\n $post_data = array();\n $post_data['store_id'] = \"jarat5e6dad879bd4c\";\n $post_data['store_passwd'] = \"jarat5e6dad879bd4c@ssl\";\n $post_data['total_amount'] = $orderTotal;\n $post_data['currency'] = \"BDT\";\n $post_data['tran_id'] = \"SSLCZ_TEST_\".uniqid();\n // $post_data['success_url'] = \"http://localhost/new_sslcz_gw/success.php\";\n $post_data['success_url'] = url('/').\"/order-success\";\n\n $post_data['fail_url'] = url('/').\"/order-failed?quotation_id=$quotation->id&order_id=$order->id\";\n $post_data['cancel_url'] = url('/').\"/order-cancle?quotation_id=$quotation->id&order_id=$order->id\";\n # $post_data['multi_card_name'] = \"mastercard,visacard,amexcard\"; # DISABLE TO DISPLAY ALL AVAILABLE\n # EMI INFO\n $post_data['emi_option'] = \"1\";\n $post_data['emi_max_inst_option'] = \"9\";\n $post_data['emi_selected_inst'] = \"9\";\n\n # CUSTOMER INFORMATION\n $post_data['cus_name'] = $client->clientName;\n $post_data['cus_email'] = $client->email;\n $post_data['cus_add1'] = \"Dhaka\";\n $post_data['cus_add2'] = \"Dhaka\";\n $post_data['cus_city'] = \"Dhaka\";\n $post_data['cus_state'] = \"Dhaka\";\n $post_data['cus_postcode'] = \"1000\";\n $post_data['cus_country'] = \"Bangladesh\";\n $post_data['cus_phone'] = $client->phone;\n $post_data['cus_fax'] = \"01711111111\";\n\n # SHIPMENT INFORMATION\n $post_data['ship_name'] = \"testjaratb85n\";\n $post_data['ship_add1 '] = \"Dhaka\";\n $post_data['ship_add2'] = \"Dhaka\";\n $post_data['ship_city'] = \"Dhaka\";\n $post_data['ship_state'] = \"Dhaka\";\n $post_data['ship_postcode'] = \"1000\";\n $post_data['ship_country'] = \"Bangladesh\";\n\n\n # OPTIONAL PARAMETERS\n $post_data['value_a'] = $order->id;\n $post_data['value_b '] = \"ref002\";\n $post_data['value_c'] = $quotation->id;\n $post_data['value_d'] = \"ref004\";\n\n # CART PARAMETERS\n $post_data['cart'] = json_encode(array(\n array(\"product\"=>\"DHK TO BRS AC A1\",\"amount\"=>\"200.00\"),\n array(\"product\"=>\"DHK TO BRS AC A2\",\"amount\"=>\"200.00\"),\n array(\"product\"=>\"DHK TO BRS AC A3\",\"amount\"=>\"200.00\"),\n array(\"product\"=>\"DHK TO BRS AC A4\",\"amount\"=>\"200.00\")\n ));\n $post_data['product_amount'] = \"100\";\n $post_data['vat'] = \"5\";\n $post_data['discount_amount'] = \"5\";\n $post_data['convenience_fee'] = \"3\";\n\n\n # REQUEST SEND TO SSLCOMMERZ\n $direct_api_url = \"https://sandbox.sslcommerz.com/gwprocess/v3/api.php\";\n\n $handle = \\curl_init();\n curl_setopt($handle, CURLOPT_URL, $direct_api_url );\n curl_setopt($handle, CURLOPT_TIMEOUT, 30);\n curl_setopt($handle, CURLOPT_CONNECTTIMEOUT, 30);\n curl_setopt($handle, CURLOPT_POST, 1 );\n curl_setopt($handle, CURLOPT_POSTFIELDS, $post_data);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, FALSE); # KEEP IT FALSE IF YOU RUN FROM LOCAL PC\n\n\n $content = curl_exec($handle );\n\n $code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n if($code == 200 && !( curl_errno($handle))) {\n curl_close( $handle);\n $sslcommerzResponse = $content;\n } else {\n curl_close( $handle);\n echo \"FAILED TO CONNECT WITH SSLCOMMERZ API\";\n exit;\n }\n\n # PARSE THE JSON RESPONSE\n $sslcz = json_decode($sslcommerzResponse, true );\n\n if(isset($sslcz['GatewayPageURL']) && $sslcz['GatewayPageURL']!=\"\" ) {\n # THERE ARE MANY WAYS TO REDIRECT - Javascript, Meta Tag or Php Header Redirect or Other\n # echo \"<script>window.location.href = '\". $sslcz['GatewayPageURL'] .\"';</script>\";\n echo \"<meta http-equiv='refresh' content='0;url=\".$sslcz['GatewayPageURL'].\"'>\";\n # header(\"Location: \". $sslcz['GatewayPageURL']);\n exit;\n } else {\n echo \"JSON Data parsing error!\";\n }\n\n\n // Check if payment update is set\n if (isset($request->payment_update)){\n // Get client payment method\n $payment_method = Clientpayment::where('client_id', Session::get('CLIENT_ID'))->first();\n\n // Check if has\n if (!$payment_method){\n // If no create new instance\n $payment_method = new Clientpayment();\n }\n\n // Assign form value then save to database\n $payment_method->paymentMethod = $request->payment_method;\n\n // Check payment method\n if ($request->payment_method == 0){\n $payment_method->accNo = $request->bkash_number;\n $payment_method->bank_name = 'BRAC Bank';\n }elseif ($request->payment_method == 1){\n $payment_method->accNo = $request->rocket_number;\n $payment_method->bank_name = 'Dutch-Bangla Bank';\n }elseif ($request->payment_method == 2){\n $payment_method->acc_name = $request->bank_payment_account_name;\n $payment_method->accNo = $request->bank_payment_account_number;\n $payment_method->bank_name = $request->bank_payment_bank_name;\n }\n\n $payment_method->client_id = Session::get('CLIENT_ID');\n $payment_method->save();\n }\n\n // Unset carts & coupon\n // Session::put('cart', null);\n\n // Send order details to client by E-mail\n // Mail::to($client->email)->send(new OrderPlaced($order));\n // Send order details to sales by E-mail\n // Mail::to('[email protected]')->send(new OrderPlaced($order));\n\n // return view('client.order', compact('order'));\n }", "title": "" }, { "docid": "23eab3ffe9c1ec2fb9c3a4c9b58e683f", "score": "0.58393544", "text": "public function getBaseShippingAmount();", "title": "" }, { "docid": "72acad80dcdecb88b076704d2553ab62", "score": "0.5831015", "text": "public function hookCheckoutCartAddPreDispatch($observer){\n return;\n\t\t//die('dfsdf');\n\t\tif(!$this->_getQuote()->getShippingAddress()->getCountryId()){\n\t\t\t$store = Mage::app()->getStore()->getId();\n\t\t\t$customer = Mage::getSingleton('customer/session')->getCustomer();\n\t\t\tif($customer->getId()){\n\t\t\t\t\n\t\t\t\t$shippingAddress = $customer->getDefaultShippingAddress();\n\t\t\t\t$billingAddress = $customer->getDefaultBillingAddress();\n\t\t\t\tif(!empty($shippingAddress)){\n\t\t\t\t\t$this->_getQuote()->setShippingAddress($shippingAddress);\n\t\t\t\t}\n\t\t\t\tif(!empty($billingAddress)){\n\t\t\t\t\t$this->_getQuote()->setBillingAddress($billingAddress);\n\t\t\t\t}\n\t\t\t\t$this->_getQuote()\n\t\t\t\t\t\t->collectTotals()\n\t\t\t\t\t\t->setCollectShippingRates(true)\n\t\t\t\t\t\t->save();\n\t\t\t\t$this->_getQuote()->setDataChanges(true);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->_getQuote()->getShippingAddress()\n\t\t\t\t\t->setCountryId(Mage::getStoreConfig(Mage_Shipping_Model_Shipping::XML_PATH_STORE_COUNTRY_ID, $store))\n\t\t\t\t\t->setRegionId(Mage::getStoreConfig(Mage_Shipping_Model_Shipping::XML_PATH_STORE_REGION_ID, $store))\n\t\t\t\t\t->setCity(Mage::getStoreConfig(Mage_Shipping_Model_Shipping::XML_PATH_STORE_CITY, $store))\n\t\t\t\t\t->setPostcode(Mage::getStoreConfig(Mage_Shipping_Model_Shipping::XML_PATH_STORE_ZIP, $store))\n\t\t\t\t\t->setCollectShippingRates(true);\n\t\t\t\t$this->_getQuote()->save();\n\t\t\t\t$this->_getQuote()->setDataChanges(true);\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1af9c9ec67aad8ec7be1eb8f4956ce39", "score": "0.57915664", "text": "public function recruiter_wise_billing(){\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "76e1e82f8041321f7210ceed3e2ccfa3", "score": "0.5790117", "text": "public function BasketRequiresRecalculation()\n {\n return $this->bMarkAsRecalculationNeeded;\n }", "title": "" }, { "docid": "15aab0d9028774132507e746c04c6c6d", "score": "0.5781735", "text": "function AT_shipping() {\n\t\tforeach ($this->array as $key => $value) {\n\t\t\tif ($value['príjemca-štát'] == 'Rakúsko [AT]') {\n\t\t\t\t$rec_weight = $value['váha'];\n\t\t\t\tif ($this->get_minMax($rec_weight, 0.00, 3.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 6.2);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 3.01, 5.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 6.7);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 5.01, 10.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 7.2);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 10.01, 15.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 8.2);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 15.01, 20.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 9.2);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 20.01, 25.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 11.2);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 25.01, 30.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 12.5);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 30.01, 40.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 15.80);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 40.01, 50.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 18.50);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 50.01, 999.99)) {\n\t\t\t\t\t$discount = $this->discount_maxKg($rec_weight);\n\t\t\t\t\t$this->set_new_value($key, 'shipping', $discount);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c766b022cabe69881d7d473b0d8ff1ea", "score": "0.57799125", "text": "function calc_order_shipping( &$d ) {\r\n\r\n\t\t$auth = $_SESSION['auth'];\r\n\r\n\t\t$shipping_total = $this->_SHIPPING->get_rate( $d );\r\n\t\t$shipping_taxrate = $this->_SHIPPING->get_tax_rate();\r\n\r\n\t\t// When the Shipping rate is shown including Tax\r\n\t\t// we have to extract the Tax from the Shipping Total\r\n\t\t// before returning the value\r\n\t\tif( $auth[\"show_price_including_tax\"] == 1 ) {\r\n\t\t\t$d['shipping_tax'] = $shipping_total - ($shipping_total / ($shipping_taxrate+1));\r\n\t\t\t$d['shipping_total'] = $shipping_total - $d['shipping_tax'];\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$d['shipping_tax'] = $shipping_total * $shipping_taxrate;\r\n\t\t\t$d['shipping_total'] = $shipping_total;\r\n\t\t}\r\n\t\t$d['shipping_tax'] = $GLOBALS['CURRENCY']->convert( $d['shipping_tax'] );\r\n\t\t$d['shipping_total'] = $GLOBALS['CURRENCY']->convert( $d['shipping_total'] );\r\n\t\t\r\n\t\treturn $d['shipping_total'];\r\n\t}", "title": "" }, { "docid": "0b12992c5a1f04c882bdfa1fb3498b6c", "score": "0.5769602", "text": "public function shippingPlace()\n {\n $this->load->language('extension/payment/novapay');\n\n $this->initPaymentModel();\n\n $method = $_POST['type'] . 'Action';\n if (in_array($method, $this->getAllowedShippingActions())) {\n return call_user_func([$this, $method]);\n }\n if (!empty($this->session->data['price_shipping_novapay'])) {\n $this->session->data['shipping_method']['cost'] = $this->session->data['price_shipping_novapay'];\n }\n echo $this->session->data['shipping_method']['cost'];\n\n }", "title": "" }, { "docid": "54f155930a19b006c4eecc1a83ed007f", "score": "0.57639164", "text": "public function shouldReloadOnCountryChange()\n {\n return $this->_helper()->shouldReloadTotalsOnBillingCountryChange();\n }", "title": "" }, { "docid": "8d56d914407de5a18efea48040b68b51", "score": "0.5751191", "text": "function tc_fix_woocommerce_bundle_rate_shipping_scripts() {\r\n\t\tif ( !(isset( $_GET['page'] ) && isset( $_GET['tab'] ) && $_GET['page'] == 'wc-settings' && $_GET['tab'] == 'shipping') ) {\r\n\t\t\twp_dequeue_script( 'woocommerce_bundle_rate_shipping_admin_js' );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d04c265e33e94154499bad4dde682e00", "score": "0.5749383", "text": "public function setShippingAmount($amount);", "title": "" }, { "docid": "2e325ead33c2af02e41d2b2ba6b8d6ef", "score": "0.5749119", "text": "public function shouldReloadOnCouponCodeChange()\n {\n return $this->_helper()->shouldReloadShippingMethodsOnCouponCodeChange();\n }", "title": "" }, { "docid": "0a8b78390780c51b1b8803068641706f", "score": "0.57136077", "text": "public function shouldReloadOnPaymentMethodChange()\n {\n return $this->_helper()->shouldReloadTotalsOnPaymentMethodChange();\n }", "title": "" }, { "docid": "c228bab85a06797fce70ee7bf1eaacba", "score": "0.57097495", "text": "function calc_order_tax($order_taxable, $d) {\r\n\t\tglobal $order_tax_details, $discount_factor;\r\n\t\t$total = 0; \r\n\t\t$order_tax=0;\r\n\t\t$auth = $_SESSION['auth'];\r\n\t\t$ps_vendor_id = $_SESSION[\"ps_vendor_id\"];\r\n\t\t$db = new ps_DB;\r\n\t\t$ship_to_info_id = vmGet( $_REQUEST, 'ship_to_info_id');\r\n\t\t\r\n\t\t\r\n\t\trequire_once(CLASSPATH.'ps_tax.php');\r\n\t\t$ps_tax = new ps_tax;\r\n\t\t\r\n\t\t$discount_factor = 1;\r\n\t\t\r\n\t\t\t// Shipping address based TAX\r\n\t\tif ( !ps_checkout::tax_based_on_vendor_address () ) {\r\n\t\t\t$q = \"SELECT state, country FROM #__{vm}_user_info \";\r\n\t\t\t$q .= \"WHERE user_info_id='\".$ship_to_info_id. \"'\";\r\n\t\t\t$db->query($q);\r\n\t\t\t$db->next_record();\r\n\t\t\t$state = $db->f(\"state\");\r\n\t\t\t$country = $db->f(\"country\");\r\n\t\t\t$q = \"SELECT * FROM #__{vm}_tax_rate WHERE tax_country='$country' \";\r\n\t\t\tif( !empty($state)) {\r\n\t\t\t\t$q .= \"AND (tax_state='$state' OR tax_state=' $state ')\";\r\n\t\t\t}\r\n\t\t\t$db->query($q);\r\n\t\t\tif ($db->next_record()) {\r\n\t\t\t\t$rate = $order_taxable * floatval( $db->f(\"tax_rate\") );\r\n\t\t\t\tif (empty($rate)) {\r\n\t\t\t\t\t$order_tax = 0.0;\r\n } else {\r\n $cart = $_SESSION['cart'];\r\n\t\t\t\t\t$order_tax = 0.0;\r\n if( (!empty( $_SESSION['coupon_discount'] ) || !empty( $d['payment_discount'] ))\r\n && PAYMENT_DISCOUNT_BEFORE == '1' ) {\r\n\r\n require_once(CLASSPATH.'ps_product.php');\r\n $ps_product= new ps_product;\r\n\r\n for($i = 0; $i < $cart[\"idx\"]; $i++) {\r\n $item_weight = ps_shipping_method::get_weight($cart[$i][\"product_id\"]) * $cart[$i]['quantity'];\r\n\r\n if ($item_weight !=0 or TAX_VIRTUAL) {\r\n $price = $ps_product->get_adjusted_attribute_price($cart[$i][\"product_id\"], $cart[$i][\"description\"]);\r\n $price['product_price'] = $GLOBALS['CURRENCY']->convert( $price['product_price'], $price['product_currency']);\r\n $tax_rate = $db->f(\"tax_rate\");\r\n\r\n $use_coupon_discount= @$_SESSION['coupon_discount'];\r\n //if( !empty( $_SESSION['coupon_discount'] )) {\r\n // if( $auth[\"show_price_including_tax\"] == 1 ) {\r\n // $use_coupon_discount = $_SESSION['coupon_discount'] / ($tax_rate+1);\r\n // }\r\n //}\r\n $factor = (100 * ($use_coupon_discount + @$d['payment_discount'])) / $this->_subtotal;\r\n $price[\"product_price\"] = $price[\"product_price\"] - ($factor * $price[\"product_price\"] / 100);\r\n @$order_tax_details[$tax_rate] += $price[\"product_price\"] * $tax_rate * $cart[$i][\"quantity\"];\r\n\r\n $order_tax += $price[\"product_price\"] * $tax_rate * $cart[$i][\"quantity\"];\r\n $total += $price[\"product_price\"] * $cart[$i][\"quantity\"];\r\n } else {\r\n $order_tax += 0.0;\r\n }\r\n }\r\n } else {\r\n $order_tax = $rate;\r\n }\r\n }\r\n } else {\r\n $order_tax = 0.0;\r\n }\r\n $order_tax_details[$db->f('tax_rate')] = $order_tax;\r\n }\r\n\t\t// Store Owner Address based TAX\r\n\t\telse {\r\n\r\n\t\t\t\t// Calculate the Tax with a tax rate for every product\r\n\t\t\t\t$cart = $_SESSION['cart'];\r\n\t\t\t\t$order_tax = 0.0;\r\n\t\t\t\t$total = 0.0;\r\n\t\t\t\tif( (!empty( $_SESSION['coupon_discount'] ) || !empty( $d['payment_discount'] ))\r\n\t\t\t\t\t&& PAYMENT_DISCOUNT_BEFORE == '1' ) {\r\n\t\t\t\t\t// We need to recalculate the tax details when the discounts are applied\r\n\t\t\t\t\t// BEFORE taxes - because they affect the product subtotals then\r\n\t\t\t\t\t$order_tax_details = array();\r\n\t\t\t\t}\r\n\t\t\t\trequire_once(CLASSPATH.'ps_product.php');\r\n\t\t\t\t$ps_product= new ps_product;\r\n\t\t\t\trequire_once(CLASSPATH.'ps_shipping_method.php');\r\n\r\n\t\t\t\tfor($i = 0; $i < $cart[\"idx\"]; $i++) {\r\n\t\t\t\t\t$item_weight = ps_shipping_method::get_weight($cart[$i][\"product_id\"]) * $cart[$i]['quantity'];\r\n\r\n\t\t\t\t\tif ($item_weight !=0 or TAX_VIRTUAL) {\r\n\t\t\t\t\t\t$price = $ps_product->get_adjusted_attribute_price($cart[$i][\"product_id\"], $cart[$i][\"description\"]);\r\n\t\t\t\t\t\t$price['product_price'] = $GLOBALS['CURRENCY']->convert( $price['product_price'], $price['product_currency']);\r\n\t\t\t\t\t\t$tax_rate = $ps_product->get_product_taxrate($cart[$i][\"product_id\"]);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif( (!empty( $_SESSION['coupon_discount'] ) || !empty( $d['payment_discount'] ))\r\n\t\t\t\t\t\t\t&& PAYMENT_DISCOUNT_BEFORE == '1' ) {\r\n\t\t\t\t\t\t\t$use_coupon_discount= @$_SESSION['coupon_discount'];\r\n\t\t\t\t\t\t\tif( !empty( $_SESSION['coupon_discount'] )) {\r\n\t\t\t\t\t\t\t\tif( $auth[\"show_price_including_tax\"] == 1 ) {\r\n\t\t\t\t\t\t\t\t\t$use_coupon_discount = $_SESSION['coupon_discount'] / ($tax_rate+1);\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\t$factor = (100 * ($use_coupon_discount + @$d['payment_discount'])) / $this->_subtotal;\r\n\t\t\t\t\t\t\t$price[\"product_price\"] = $price[\"product_price\"] - ($factor * $price[\"product_price\"] / 100);\r\n\t\t\t\t\t\t\t@$order_tax_details[$tax_rate] += $price[\"product_price\"] * $tax_rate * $cart[$i][\"quantity\"];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$order_tax += $price[\"product_price\"] * $tax_rate * $cart[$i][\"quantity\"];\r\n\t\t\t\t\t\t$total += $price[\"product_price\"] * $cart[$i][\"quantity\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif( (!empty( $_SESSION['coupon_discount'] ) || !empty( $d['payment_discount'] ))\r\n\t\t\t\t\t&& PAYMENT_DISCOUNT_BEFORE != '1' ) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t// Here we need to re-calculate the Discount\r\n\t\t\t\t\t// because we assume the Discount is \"including Tax\"\r\n\t\t\t\t\t$discounted_total = @$d['order_subtotal_withtax'] - @$_SESSION['coupon_discount'] - @$d['payment_discount'];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif( $discounted_total != @$d['order_subtotal_withtax'] && @$d['order_subtotal_withtax'] > 0.00) {\r\n\t\t\t\t\t\t$discount_factor = $discounted_total / $d['order_subtotal_withtax'];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tforeach( $order_tax_details as $rate => $value ) {\r\n\t\t\t\t\t\t\t$order_tax_details[$rate] = $value * $discount_factor;\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}\r\n\t\t\t\tif( is_object($this->_SHIPPING) ) {\r\n\t\t\t\t\t$taxrate = $this->_SHIPPING->get_tax_rate();\r\n\t\t\t\t\tif( $taxrate ) {\r\n\t\t\t\t\t\t$rate = $this->_SHIPPING->get_rate( $d );\r\n\t\t\t\t\t\tif( $auth[\"show_price_including_tax\"] == 1 ) {\r\n\t\t\t\t\t\t\t@$order_tax_details[$taxrate] += $rate - ($rate / ($taxrate+1));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t@$order_tax_details[$taxrate] += $rate * $taxrate;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\r\n\t\t}\r\n\t\treturn( round( $order_tax, 2 ) );\r\n\t}", "title": "" }, { "docid": "af66ac23d6af6ddfd3ed0555d97a5fe2", "score": "0.5700833", "text": "function your_shipping_method_init()\n {\n if (!class_exists('WC_Your_Shipping_Method')) {\n $shiping_method = new WC_Your_Shipping_Method();\n }\n }", "title": "" }, { "docid": "f4b98824e57df774b30646f9f6049ccd", "score": "0.56864655", "text": "public function getShippingSurcharge();", "title": "" }, { "docid": "fae3c5d1e06422e8674b9a94fe56c3f8", "score": "0.5686401", "text": "function update_order_item_taxes()\n\n {\n $query = \"SELECT\n\n billing_state,\n\n billing_country,\n\n tax_exempt\n\n FROM orders\n\n WHERE id = '\" . $_SESSION['ecommerce']['order_id'] . \"'\";\n\n $result = mysqli_query(db::$con, $query) or output_error('Query failed.');\n\n $row = mysqli_fetch_assoc($result);\n\n $billing_state = $row['billing_state'];\n\n $billing_country = $row['billing_country'];\n\n $tax_exempt = $row['tax_exempt'];\n\n // if order is tax-exempt, clear tax from all order items\n if ($tax_exempt)\n {\n\n $query = \"UPDATE order_items\n\n SET tax = 0\n\n WHERE order_id = '\" . $_SESSION['ecommerce']['order_id'] . \"'\";\n\n $result = mysqli_query(db::$con, $query) or output_error('Query failed.');\n\n // else order is not tax-exempt, so we need to apply taxes to order items\n \n }\n else\n {\n\n // get tax rate for billing address\n $billing_address_tax_rate = get_tax_rate_for_address($billing_country, $billing_state);\n\n // get all ship tos\n $query = \"SELECT\n\n DISTINCT order_items.ship_to_id,\n\n ship_tos.state,\n\n ship_tos.country\n\n FROM order_items\n\n LEFT JOIN ship_tos ON order_items.ship_to_id = ship_tos.id\n\n WHERE order_items.order_id = '\" . $_SESSION['ecommerce']['order_id'] . \"'\n\n ORDER BY order_items.ship_to_id\";\n\n $result = mysqli_query(db::$con, $query) or output_error('Query failed.');\n\n $ship_tos = array();\n\n // foreach ship to, add ship to to array\n while ($row = mysqli_fetch_assoc($result))\n {\n\n $ship_tos[] = $row;\n\n }\n\n // loop through all ship tos\n foreach ($ship_tos as $ship_to)\n {\n\n // if this ship to is a real recipient, get tax rate for shipping address\n if ($ship_to['ship_to_id'] > 0)\n {\n\n $shipping_address_tax_rate = get_tax_rate_for_address($ship_to['country'], $ship_to['state']);\n\n }\n\n // get all order items for this ship to\n $query = \"SELECT\n\n order_items.id,\n\n order_items.price,\n\n products.taxable\n\n FROM order_items\n\n LEFT JOIN products ON order_items.product_id = products.id\n\n WHERE order_id = '\" . $_SESSION['ecommerce']['order_id'] . \"' AND ship_to_id = '\" . $ship_to['ship_to_id'] . \"'\";\n\n $result = mysqli_query(db::$con, $query) or output_error('Query failed.');\n\n $order_items = array();\n\n // foreach order item for this ship to, add order item to array\n while ($row = mysqli_fetch_assoc($result))\n {\n\n $order_items[] = $row;\n\n }\n\n // foreach order item\n foreach ($order_items as $order_item)\n {\n\n // if order item is taxable\n if ($order_item['taxable'])\n {\n\n // if this order item has a recipient\n if ($ship_to['ship_to_id'] > 0)\n {\n\n // if shipping address is in a tax zone, apply tax\n if ($shipping_address_tax_rate)\n {\n\n $apply_tax = true;\n\n $tax_rate = $shipping_address_tax_rate;\n\n // else shipping address is not in a tax zone, so don't apply tax\n \n }\n else\n {\n\n $apply_tax = false;\n\n }\n\n // else this order item does not have a recipient\n \n }\n else\n {\n\n // if billing address is in a tax zone, apply tax\n if ($billing_address_tax_rate)\n {\n\n $apply_tax = true;\n\n $tax_rate = $billing_address_tax_rate;\n\n // else billing address is not in a tax zone, so don't apply tax\n \n }\n else\n {\n\n $apply_tax = false;\n\n }\n\n }\n\n // else order item is not taxable\n \n }\n else\n {\n\n $apply_tax = false;\n\n }\n\n // if taxes should be applied to this order item, apply them\n if ($apply_tax == true)\n {\n\n $tax_amount = round($tax_rate / 100 * $order_item['price']);\n\n $query = \"UPDATE order_items\n\n SET tax = '$tax_amount'\n\n WHERE id = '\" . $order_item['id'] . \"'\";\n\n $result = mysqli_query(db::$con, $query) or output_error('Query failed.');\n\n // else taxes should not be applied to order item, so clear taxes\n \n }\n else\n {\n\n $query = \"UPDATE order_items\n\n SET tax = '0'\n\n WHERE id = '\" . $order_item['id'] . \"'\";\n\n $result = mysqli_query(db::$con, $query) or output_error('Query failed.');\n\n }\n\n }\n\n }\n\n }\n\n }", "title": "" }, { "docid": "905bf141518781893a1b13594efbb80b", "score": "0.5685677", "text": "public function collectRates(RateRequest $request)\n {\n /**\n * Make sure that Shipping method is enabled\n */\n if (!$this->isActive()) {\n return false;\n }\n\n /** @var \\Magento\\Shipping\\Model\\Rate\\Result $result */\n\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\n $result = $this->_rateResultFactory->create();\n\n $shippingPrice = $this->getConfigData('price');\n\n \n\n include 'maps.php';\n\n $storeStreet =$this->_scopeConfig->getValue(\n 'general/store_information/street_line1',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n \n \n \n $storeCity =$this->_scopeConfig->getValue(\n 'general/store_information/city',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n \n $storeAddress = $storeStreet.', '.$storeCity;\n\n //Direccion establecida en el paso anterior, desde checkout\n\n $streetCheckout = $this->_checkoutSession->getQuote()->getShippingAddress()->getStreet();\n $cityCheckout = $this->_checkoutSession->getQuote()->getShippingAddress()->getCity();\n $postCodeCheckout = $this->_checkoutSession->getQuote()->getShippingAddress()->getPostCode();\n $countryCheckout = $this->_checkoutSession->getQuote()->getShippingAddress()->getCountry();\n // $id = $this->_checkoutSession->getQuote()->getCustomerId(); Linea para conseguir el id de el comprador \n \n $street2Checkout=implode(' ',$streetCheckout);\n $addressCheckout = $street2Checkout.', '.$cityCheckout; //Esta variable almacena la direccion ingresada en el paso anterior, calle, codigo postal, ciudad, pais.\n \n //Evaluaremos si el usuario esta logeado\n \n if($this->customerSession->isLoggedIn()) { \n\n \n \n //Direccion establecida como direccion de envios por defecto\n\n $customerId = $this->_checkoutSession->getQuote()->getCustomerId();\n $customer = $objectManager->create('Magento\\Customer\\Model\\Customer')->load($customerId);\n $shippingAddress = $customer->getDefaultShippingAddress(); \n \n $streetDefaultShipping=$shippingAddress->getStreet();\n $cityDefaultShipping=$shippingAddress->getCity();\n $postCodeDefaultShipping=$shippingAddress->getPostCode();\n $countryIdDefaultShipping=$shippingAddress->getCountry();\n $streetDefaultShipping=implode(' ',$streetDefaultShipping);\n $addressDefaultShipping=$streetDefaultShipping.', '.$cityDefaultShipping;\n \n \n //Direccion establecida como direccion de facturacion por defecto\n\n $billingAddress = $customer->getDefaultBillingAddress();\n $streetDefaultBilling=$billingAddress->getStreet();\n $cityDefaultBilling=$billingAddress->getCity();\n $postCodeDefaultBilling=$billingAddress->getPostCode();\n $countryIdDefaultBilling=$billingAddress->getCountry();\n $streetDefaultBilling=implode(' ',$streetDefaultBilling);\n $addressDefaultBilling=$streetDefaultBilling.', '.$cityDefaultBilling;\n\n /**\n * Ingresamos los metodos de envio, su titulo, y precio\n */\n \n\n $methods = array(\n 0 => array(\n 'id' => '1',\n 'title' => 'Destino: '.$addressCheckout,\n 'method' => 'Direccion de envio ingresada ',\n 'price' => $precio=precio($storeStreet,$street2Checkout,$storeCity)\n ),\n 1 => array(\n 'id' => '2',\n 'title' => 'Destino: '.$addressDefaultShipping,\n 'method' => 'Envio por defecto',\n 'price' => $precio=precio($storeStreet,$streetDefaultShipping,$storeCity)\n ),\n 2 => array(\n 'id' => '3',\n 'title' => 'Destino: '.$addressDefaultBilling,\n 'method' => 'Envio a direccion de facturacion',\n 'price' => $precio=precio($storeStreet,$streetDefaultBilling,$storeCity)\n ),\n );\n \n\n \n foreach($methods as $row){\n\n if($row['price']!=0 ){\n $method = $this->_rateMethodFactory->create();\n\n $method->setCarrier($this->getCarrierCode());\n /* $method->setCarrierTitle($this->getConfigData('title')); */ \n $method->setCarrierTitle($row['title']);\n $method->setMethod($row['id']);\n /* $method->setMethodTitle($this->getConfigData('name')); */ \n $method->setMethodTitle($row['method']);\n $method->setMethodApi1($this->getConfigData('api1'));\n $method->setPrice($row['price']);\n $method->setCost($shippingPrice);\n\n $result->append($method);\n }\n } \n \n \n return $result; \n }else{\n // Esto ocurrira si el usuario no esta logeado\n\n \n $street = $this->_checkoutSession->getQuote()->getShippingAddress()->getStreet();\n $city = $this->_checkoutSession->getQuote()->getShippingAddress()->getCity();\n $postCode = $this->_checkoutSession->getQuote()->getShippingAddress()->getPostCode();\n $country = $this->_checkoutSession->getQuote()->getShippingAddress()->getCountry();\n $id = $this->_checkoutSession->getQuote()->getCustomerId();\n\n $street2=implode(' ',$street);\n $direccion = $street2.', '.$city; //Esta variable tiene la direccion completa\n\n $shippingPrice=precio($storeStreet,$street2Checkout,$storeCity); \n\n if($shippingPrice!=0 ){\n\n $method = $this->_rateMethodFactory->create();\n\n $method->setCarrier($this->getCarrierCode());\n // $method->setCarrierTitle($this->getConfigData('title')); Esta es la linea original que setea el titulo del metodo de envio\n $method->setCarrierTitle('Destino: '.$direccion);\n $method->setCarrierApi1($this->getConfigData('api1')); \n \n /**\n * Displayed as shipping method under Carrier\n */\n $method->setMethod($this->getCarrierCode());\n // $method->setMethodTitle($this->getConfigData('name')); Esta es la linea original que setea el nombre del metodo de envio \n $method->setMethodTitle('Envio a direccion ingresada');\n $method->setMethodApi1($this->getConfigData('api1'));\n $method->setPrice( $shippingPrice);\n $method->setCost( $shippingPrice);\n \n $result->append($method);\n \n return $result;\n }\n }\n \n \n \n \n }", "title": "" }, { "docid": "360720c412261cc8198d95d8a54dae94", "score": "0.567101", "text": "public function setRequest(RateRequest $request)\n {\n $parentSetRequest = parent::setRequest($request); \n $parentRawRequest = $parentSetRequest->_rawRequest;\n\n $destCountry = $parentRawRequest->getDestCountry();\n $destRegionCode = $parentRawRequest->getDestRegionCode(); \n\n $destRegionId = $this->_regionFactory->create()->loadByCode($destRegionCode, $destCountry)->getId();\n\n if ( $this->isMultiShippingOriginEnabled($request) \n && $this->isMultiShippingOriginEnabledForUPS($request) \n && $this->isInSelectedUsStates($destRegionId,$request) ){\n /*\n $writer = new \\Zend\\Log\\Writer\\Stream(BP . '/var/log/multiShippingOrigin-settings-enabled.log');\n $logger = new \\Zend\\Log\\Logger();\n $logger->addWriter($writer); \n $logger->info('methods:'.$destRegionCode);\n */ \n $secondaryCountryId = $this->_scopeConfig->getValue(\n Data::XML_PATH_SHIPPING_SECONDARY.'country_id',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE,\n $request->getStore()\n );\n\n $secondaryRegionId = $this->_scopeConfig->getValue(\n Data::XML_PATH_SHIPPING_SECONDARY.'region_id',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE,\n $request->getStore()\n );\n \n $secondaryPostCode = $this->_scopeConfig->getValue(\n Data::XML_PATH_SHIPPING_SECONDARY.'postcode',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE,\n $request->getStore()\n );\n\n $secondaryCity = $this->_scopeConfig->getValue(\n Data::XML_PATH_SHIPPING_SECONDARY.'city',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE,\n $request->getStore()\n );\n \n /* replace origin shipping*/\n if ( isset($secondaryCountryId) ){\n $parentRawRequest->setOrigCountry($this->_countryFactory->create()->load($secondaryCountryId)->getData('iso2_code'));\n }\n \n if ( is_numeric($secondaryRegionId) && isset($secondaryRegionId) ) {\n $secondaryRegionCode = $this->_regionFactory->create()->load($secondaryRegionId)->getCode();\n $parentRawRequest->setOrigRegionCode($secondaryRegionCode);\n } \n\n if ( isset($secondaryPostCode) ){\n $parentRawRequest->setOrigPostal($secondaryPostCode);\n } \n \n if ( isset($secondaryCity) ){\n $parentRawRequest->setOrigCity($secondaryCity);\n }\n \n }\n\n return $parentSetRequest;\n }", "title": "" }, { "docid": "48c29e28b59e0ef3d3c06a6de5cede0e", "score": "0.56698704", "text": "function fn_store_locator_update_shipping(&$shipping_data, $shipping_id, $lang_code)\n{\n $service['service_id'] = db_get_field('SELECT service_id FROM ?:shipping_services WHERE module = ?s AND code = ?s', 'store_locator', 'pickup');\n if (isset($shipping_data['service_id']) && isset($service['service_id']) && $shipping_data['service_id'] === $service['service_id']) {\n $shipping_data['service_params'] = serialize(['active_stores' => '']);\n }\n}", "title": "" }, { "docid": "e7ff3117e756f494462e998bc2aed89b", "score": "0.56533366", "text": "public function prepareTotals()\n {\n $totals = array();\n $details = $this->context->cart->getSummaryDetails(null, true);\n\n $carrier = $details['carrier'];\n $order_total = $this->context->cart->getOrderTotal();\n $notfree = !(isset($details['free_ship']) && $details['free_ship'] == 1);\n\n $total_shipping_cost = round($this->context->cart->getTotalShippingCost(null, false),2);\n $total_shipping_cost_inc_tax = round($this->context->cart->getTotalShippingCost(null, true),2);\n $taxrate = 0;\n\n if ($total_shipping_cost) {\n $taxrate = (($total_shipping_cost_inc_tax - $total_shipping_cost)/$total_shipping_cost * 100);\n }\n\n if ($carrier->active && $notfree)\n {\n if (intval($carrier->id_reference) > 0) {\n // Address saved in store\n $carrier_obj = new Carrier($this->context->cart->id_carrier, $this->context->cart->id_lang);\n $taxrate = $carrier_obj->getTaxesRate(new Address($this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}));\n\n // Try get shipping taxrate with no address\n if ($taxrate == 0) {\n $selected_deliver_option_id = (int)current($this->context->cart->getDeliveryOption());\n $carrier = new Carrier($selected_deliver_option_id, $this->context->cart->id_lang);\n $taxrate = $carrier->getTaxesRate(Address::initialize(0));\n }\n\n // Maybe calculate shipping taxrate\n $total_shipping_cost_inc_tax = 0;\n if ($taxrate == 0) {\n $total_shipping_cost_inc_tax = round($this->context->cart->getTotalShippingCost(null, true),2);\n if ($total_shipping_cost < $total_shipping_cost_inc_tax && $total_shipping_cost > 0 && $total_shipping_cost_inc_tax > 0) {\n $taxrate = round((($total_shipping_cost_inc_tax - $total_shipping_cost) / $total_shipping_cost) * 100);\n }\n }\n\n /**\n * Calculate shipping cost without tax when\n * - store might show prices with 0 decimals\n * - we have not calculated taxrate based on cost with and without tax\n */\n if (\n $total_shipping_cost_inc_tax == 0\n && $taxrate > 0\n && $total_shipping_cost > 0\n && intval($total_shipping_cost) == $total_shipping_cost\n ) {\n if ($total_shipping_cost_inc_tax == 0) {\n $total_shipping_cost_inc_tax = round($this->context->cart->getTotalShippingCost(null, true) ,2);\n }\n if ($total_shipping_cost < $total_shipping_cost_inc_tax && $total_shipping_cost > 0 && $total_shipping_cost_inc_tax > 0) {\n $total_shipping_cost = ($total_shipping_cost_inc_tax / (1 + ($taxrate/100)));\n $total_shipping_cost = round($total_shipping_cost ,2);\n }\n }\n } elseif ($total_shipping_cost == 0) {\n // Address not yet saved in store\n $deliveryOptionData = $this->getDeliveryOptionData();\n $total_shipping_cost = $deliveryOptionData['price_without_tax'];\n $total_shipping_cost_inc_tax = $deliveryOptionData['price_with_tax'];\n\n // Maybe calculate shipping taxrate\n if ($taxrate == 0) {\n if ($total_shipping_cost < $total_shipping_cost_inc_tax && $total_shipping_cost > 0 && $total_shipping_cost_inc_tax > 0) {\n $taxrate = round((($total_shipping_cost_inc_tax - $total_shipping_cost) / $total_shipping_cost) * 100);\n }\n }\n $order_total += $total_shipping_cost_inc_tax;\n }\n\n $totals['Shipping'] = array(\n 'withouttax' => $total_shipping_cost * 100,\n 'taxrate' => $taxrate\n );\n $this->totals += $total_shipping_cost * 100;\n if($taxrate > 0) {\n $this->tax += ($total_shipping_cost * ($taxrate / 100)) * 100;\n }\n }\n if (Configuration::get('BINVOICE_FEE') > 0 && $this->method == 'invoice')\n {\n $fee = Configuration::get('BINVOICE_FEE');\n $invoice_fee_tax = Configuration::get('BINVOICE_FEE_TAX');\n\n $tax = new Tax($invoice_fee_tax);\n $tax_calculator = new TaxCalculator(array($tax));\n $tax_rate = $tax_calculator->getTotalRate();\n $fee = Tools::convertPriceFull($fee,null,$this->context->currency);\n $fee = round($fee,2);\n $totals['Handling'] = array(\n 'withouttax' => $fee * 100,\n 'taxrate' => $tax_rate\n );\n $this->handling_fee = $fee;\n $this->handling_taxrate = $tax_rate;\n $order_total += $fee * (1 + ($tax_rate / 100));\n $this->totals += $fee * 100;\n $this->tax += (($tax_rate / 100) * $fee) * 100;\n }\n if (Configuration::get('BINVOICESERVICE_FEE') > 0 && $this->method == 'invoiceservice')\n {\n $fee = Configuration::get('BINVOICESERVICE_FEE');\n $invoice_fee_tax = Configuration::get('BINVOICESERVICE_FEE_TAX');\n\n $tax = new Tax($invoice_fee_tax);\n $tax_calculator = new TaxCalculator(array($tax));\n $tax_rate = $tax_calculator->getTotalRate();\n $fee = Tools::convertPriceFull($fee,null,$this->context->currency);\n $fee = round($fee,2);\n $totals['Handling'] = array(\n 'withouttax' => $fee * 100,\n 'taxrate' => $tax_rate\n );\n $this->handling_fee = $fee;\n $this->handling_taxrate = $tax_rate;\n $order_total += $fee * (1 + ($tax_rate / 100));\n $this->totals += $fee * 100;\n $this->tax += (($tax_rate / 100) * $fee) * 100;\n }\n\n $rounding = round($order_total * 100) - round($this->tax + $this->totals);\n if($rounding > 50) {\n $rounding -= 100;\n } elseif($rounding <= -50) {\n $rounding += 100;\n }\n $totals['Total'] = array(\n 'withouttax' => round($this->totals),\n 'tax' => round($this->tax),\n 'rounding' => round($rounding),\n 'withtax' => round($this->totals + $this->tax + $rounding)\n );\n $this->paid_amount = $totals['Total']['withtax'];\n\n return $totals;\n }", "title": "" }, { "docid": "2a351743cb71710760c35723899a220c", "score": "0.56475824", "text": "public function calculateFee() {\n }", "title": "" }, { "docid": "620f705246a529cca5b47978790b490f", "score": "0.5646831", "text": "public function shipping()\n\t{\n\t\t$Cart = Cart::getCart();\n\t\t$Shipping = new Shipping();\n\t\t$Shipping = $Shipping->findItem( array( 'Id = '.Request::get('id') ) );\n\t\t$Cart->setShipping( $Shipping );\n\t\t$Cart->save();\n\t\t$response['grand']\t\t= Price::show( $Cart->getGrandTotal() );\n\t\t$response['result']\t\t= 1;\n\t\treturn $this->outputJSON( $response );\n\t}", "title": "" }, { "docid": "8a914de1daba35b02afde5d312d3e786", "score": "0.5645244", "text": "private function DoRecalcBal() {\n\t$ftOut = 'Recalculating order totals...<ul>';\n\t$rs = $this->GetLineRecords();\t// get order lines\n\tif ($rs->hasRows()) {\n\t $ar = $rs->FigureTotals();\n\t $prcNewShItm = $ar['sh-itm'];\n\t $prcNewShPkg = $ar['sh-pkg'];\n\t $prcNewShip = $prcNewShItm + $prcNewShPkg;\n\t $prcNewSale = $ar['cost-sell'];\n\t $prcNewTotal = $prcNewShip + $prcNewSale;\n\n\t $prcOldShip = $this->QuotedShipAmt();\n\t $prcOldSale = $this->QuotedSaleAmt();\n\t $prcOldTotal = $this->QuotedFinalAmt();\n\n\t $arUpd = NULL;\n\n\t $ftOut .= '<li>Shipping: ';\n\t if ($prcOldShip == $prcNewShip) {\n\t\t$ftOut .= 'same';\n\t } else {\n\t\t$ftOut .= '<s>'.$prcOldShip.'</s> &rarr; '.$prcNewShip;\n\t\t$arUpd['WebTotal_Ship'] = $prcNewShip;\n\t }\n\n\t $ftOut .= '<li>Sale: ';\n\t if ($prcOldSale == $prcNewSale) {\n\t\t$ftOut .= 'same';\n\t } else {\n\t\t$ftOut .= '<s>'.$prcOldSale.'</s> &rarr; '.$prcNewSale;\n\t\t$arUpd['WebTotal_Merch'] = $prcNewSale;\n\t }\n\n\t $ftOut .= '<li>Total: ';\n\t if ($prcOldTotal == $prcNewTotal) {\n\t\t$ftOut .= 'same';\n\t } else {\n\t\t$ftOut .= '<s>'.$prcOldTotal.'</s> &rarr; '.$prcNewTotal;\n\t\t$arUpd['WebTotal_Final'] = $prcNewTotal;\n\t }\n\t $ftOut .= '</ul>';\n\n\t if (is_array($arUpd)) {\n\t\t$arEv = array(\n\t\t 'code'\t=> 'TOT',\n\t\t 'descr'\t=> $ftOut,\n\t\t 'where'\t=> __METHOD__\n\t\t );\n\t\t$rcEv = $this->StartEvent($arEv);\n\t\t$this->Update($arUpd);\n\t\t$rcEv->Finish();\n\t\t$this->AdminRedirect();\n\t }\n\t} else {\n\t $ftOut .= 'No items found in order!';\n\t}\n\treturn $ftOut;\n }", "title": "" }, { "docid": "6ccda5262c0ed8606a2e9f92ea48f9ef", "score": "0.5643924", "text": "public function autoSettlementOff();", "title": "" }, { "docid": "34d15ba6986d6ac2cddfc9009907cd8e", "score": "0.56389624", "text": "function wpsc_update_location() {\n\tglobal $wpsc_cart;\n\n\t/*\n\t * Checkout page shipping calculator MAY provide a zip code using the identifier from prior\n\t * releases. Let's check for that.\n\t */\n\tif ( isset( $_POST['zipcode'] ) ) {\n\t\twpsc_update_customer_meta( 'shippingpostcode', $_POST['zipcode'] );\n\t}\n\n\t/*\n\t * Checkout page shipping calculator MAY provide a country code using the identifier from prior\n\t * releases. Let's check for that.\n\t */\n\tif ( isset( $_POST['country'] ) ) {\n\t\t$wpsc_country = new WPSC_Country( $_POST['country'] );\n\t\twpsc_update_customer_meta( 'shippingcountry', $wpsc_country->get_isocode() );\n\t}\n\n\t/*\n\t * WPeC's totally awesome checkout page shipping calculator has a submit button that will send\n\t * some of the shipping data to us in an AJAX request. The format of the data as of version\n\t * 3.8.14.1 uses the 'collected_data' array format just like in checkout. We should process\n\t * this array in case it has some updates to the user meta (checkout information) that haven't been\n\t * recorded at the time the calculate button was clicked. If the country or zip code is set using the\n\t * legacy 'country' or 'zip' code $_POST values they will be overwritten if they are also included\n\t * in the collected_data $_POST value.\n\t */\n\tif ( isset( $_POST['collected_data'] ) && is_array( $_POST['collected_data'] ) ) {\n\t\t_wpsc_checkout_customer_meta_update( $_POST['collected_data'] );\n\t}\n\n\t$wpsc_cart->update_location();\n\t$wpsc_cart->get_shipping_method();\n\t$wpsc_cart->get_shipping_option();\n\n\tif ( $wpsc_cart->selected_shipping_method != '' ) {\n\t\t$wpsc_cart->update_shipping( $wpsc_cart->selected_shipping_method, $wpsc_cart->selected_shipping_option );\n\t}\n\n\tif ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['action'] ) && 'update_location' == $_REQUEST['action'] )\n\t\texit;\n}", "title": "" }, { "docid": "eb1d0161a5505c321f35f3308482b564", "score": "0.562568", "text": "function get_product_shipping($entry_id)\n\t\t{\n\t\t\treturn 0;\n\t\t}", "title": "" }, { "docid": "e4d5269e72ea0bec66505489c0e83e21", "score": "0.55981416", "text": "function HUCZ_shipping() {\n\t\tforeach ($this->array as $key => $value) {\n\t\t\tif ($value['príjemca-štát'] == 'Česká republika [CZ]' || $value['príjemca-štát'] == 'Maďarská republika [HU]') {\n\t\t\t\t$rec_weight = $value['váha'];\n\t\t\t\tif ($this->get_minMax($rec_weight, 0.00, 5.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 4.35);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 5.01, 10.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 4.9);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 10.01, 15.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 6);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 15.01, 20.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 7.5);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 20.01, 25.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 8.5);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 25.01, 30.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 10.10);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 30.01, 40.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 13.60);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 40.01, 50.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'shipping', 16.60);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($rec_weight, 50.01, 999.99)) {\n\t\t\t\t\t$discount = $this->discount_maxKg($rec_weight);\n\t\t\t\t\t$this->set_new_value($key, 'shipping', $discount);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c541fb978e9e38565648ea80a91eca1b", "score": "0.5575708", "text": "function AT_shipping_cash(){\n\t\tforeach ($this->array as $key => $value) {\n\t\t\tif ($value['príjemca-štát'] == 'Rakúsko [AT]' && $value['dobierka'] == true) {\n\t\t\t\tif ($this->get_minMax($value['dobierka'], 0.01, 1000.00)) {\n\t\t\t\t\t$this->set_new_value($key, 'cash on delivery', 4.6);\n\t\t\t\t}\n\t\t\t\tif ($this->get_minMax($value['dobierka'], 1000.01, 3300.00)) {\n\t\t\t\t\t$result = ($value['dobierka'] / 100) * 1.6;\n\t\t\t\t\t$this->set_new_value($key, 'cash on delivery', $result);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b5176b03cd1508044898a8a76cd369b1", "score": "0.5572961", "text": "function woocommerce_bundle_rate_shipping_load() {\n if ( ! class_exists('enda_woocommerce_bundlerate_shipping' ) ) {\n require_once('bundle_rate.class.php');\n }\n}", "title": "" }, { "docid": "ec5c6cc459caf086cf735521ed25691e", "score": "0.55535233", "text": "public function getShippingInfo();", "title": "" }, { "docid": "ec5c6cc459caf086cf735521ed25691e", "score": "0.55535233", "text": "public function getShippingInfo();", "title": "" }, { "docid": "ff691ca44241be4299a4b2cbe2c6aca4", "score": "0.55452085", "text": "public function getShippingTaxAmount();", "title": "" }, { "docid": "83493f616b2839de280e2af992163306", "score": "0.55405784", "text": "public function getOrderPriceShipping() {\n \t\n\t\treturn $this->_order->getShippingAmount();\n\t\t\n\t}", "title": "" }, { "docid": "5391cbe9f30307f8d39b180207b387d1", "score": "0.55395037", "text": "public function quote($method='',$options='', $use_negotiated_rates='') {\n\n\n global $HTTP_POST_VARS, $order, $shipping_weight, $shipping_num_boxes, $total_weight, $boxcount, $cart, $packing, $delivery_confirmation;\n\n\t\t$this->delivery_confirmation = (!empty($options[0])) ? (bool)$options[0] : (bool)0;\n\t\t$this->insurance_cost = (!empty($options[1]) && $options[1] > 0) ? (float)$options[1] : (float)0;\n\n\t\t// # Use Negotiated rates for customer quotes?\n\t\t// # default is False\n\t\t$this->use_negotiated_rates = (!empty($use_negotiated_rates) ? (bool)1 : (bool)0);\n\n\t // # insurance addition\n\t\tif($this->insurance_cost > 0 || MODULE_SHIPPING_UPSXML_INSURE == 'True') {\n $this->insure_package = true;\n\t\t} else {\n\t\t\t$this->insure_package = false;\n\t\t}\n // # end insurance addition\n\n\t\t// # NEGOTIATED RATES\n\t\tif($this->use_negotiated_rates === true) {\n\t\t\t// # manual negotated rate is an override set in configuration -> shipping modules -> ups \n\t\t\t// # this will override the returned negotated rate if any. Purpose is really unknown but it does have one.\n\t\t\t$this->manual_negotiated_rate = intval(MODULE_SHIPPING_UPSXML_RATES_MANUAL_NEGOTIATED_RATE);\n\t\t\t// # the negotated rate flag - usage: 'True' : 'False'\n \t $this->use_negotiated_rates = MODULE_SHIPPING_UPSXML_RATES_USE_NEGOTIATED_RATES;\n\t\t} else {\n\t\t\t$this->manual_negotiated_rate = '';\n \t $this->use_negotiated_rates = 'False';\n\t\t}\n\t\t\n $state = $order->delivery['state'];\n\n $zone_query = tep_db_query(\"select zone_code from \" . TABLE_ZONES . \" where zone_name = '\" . tep_db_input($order->delivery['state']) . \"' and zone_country_id = '\" . $order->delivery['country']['id'] . \"'\");\n\n if (tep_db_num_rows($zone_query) > 0) {\n $zone = tep_db_fetch_array($zone_query);\n $state = $zone['zone_code'];\n }\n\n\t\t// # modify for support for Warehouse locations - last paramter resevred for warehouse ID\n $this->_upsOrigin(MODULE_SHIPPING_UPSXML_RATES_CITY, MODULE_SHIPPING_UPSXML_RATES_STATEPROV, MODULE_SHIPPING_UPSXML_RATES_COUNTRY, MODULE_SHIPPING_UPSXML_RATES_POSTALCODE, '');\n\n\n\t\t// # expand to do a city lookup realtime based on entered zipcode if $order->delivery['city'] is NULL\n\n\t\tif(empty($order->delivery['city']) && tep_session_is_registered('customer_city')) { \n\n\t\t\t$order->delivery['city'] = $_SESSION['customer_city'];\n\t\t}\n\n\t\tif(empty($order->delivery['street_address']) && tep_session_is_registered('delivery_street_address')) { \n\n\t\t\t$order->delivery['street_address'] = $_SESSION['delivery_street_address'];\n\t\t}\n\n\t\tif(empty($order->delivery['name']) && tep_session_is_registered('delivery_name')) { \n\n\t\t\t$order->delivery['name'] = $_SESSION['delivery_name'];\n\t\t}\n\n\t\tif(empty($order->delivery['company']) && tep_session_is_registered('delivery_company')) { \n\n\t\t\t$order->delivery['company'] = $_SESSION['delivery_company'];\n\t\t}\n\n\t\tif(empty($order->customer['telephone']) && tep_session_is_registered('customer_telephone')) { \n\n\t\t\t$order->customer['telephone'] = $_SESSION['customer_telephone'];\n\t\t}\n\n\t\t$order->delivery['street_address'] = preg_replace('/[^A-Za-z0-9\\-\\s,.]/', '', $order->delivery['street_address']);\n\n $this->_upsDest($order->delivery['city'], $state, $order->delivery['country']['iso_code_2'], $order->delivery['postcode'], $order->delivery['street_address'], $order->delivery['name'], $order->delivery['company'], $order->customer['telephone']);\n \n\t\t// # the check on $packing being an object will puzzle people who do things wrong (no changes when \n\t\t// # you enable dimensional support without changing checkout_shipping.php) but better be safe\n if ($this->dimensions_support > 0 && is_object($packing)) {\n $boxValue = 0;\n $totalWeight = $packing->getTotalWeight();\n $boxesToShip = $packing->getPackedBoxes();\n for ($i = 0; $i < count($boxesToShip); $i++) {\n $this->_addItem($boxesToShip[$i]['item_length'], $boxesToShip[$i]['item_width'], $boxesToShip[$i]['item_height'], $boxesToShip[$i]['item_weight'], $boxesToShip[$i]['item_price']);\n } // end for ($i = 0; $i < count($boxesToShip); $i++)\n } else {\n\n // The old method. tell us how many boxes, plus the weight of each (or total? - might be sw/num boxes)\n $this->items_qty = 0; // # reset quantities\n\n\t\t// # $this->pkgvalue has been set as order subtotal around line 108, it will cause overcharging of insurance if \n\t\t// # not divided by the number of boxes\n\n for ($i = 0; $i < $shipping_num_boxes; $i++) {\n $this->_addItem(0, 0, 0, $shipping_weight, number_format(($this->pkgvalue/$shipping_num_boxes), 2, '.', ''));\n }\n\n }\n\n\t\t// # Time In Transit: used for expected delivery dates is skipped when set to \"Not\" in the admin\n if ($this->timeInTransitView != 'Not') {\n if ($this->dimensions_support > 0) {\n $this->weight_for_timeintransit = round($totalWeight,1);\n } else {\n $this->weight_for_timeintransit = round($shipping_num_boxes * $shipping_weight,1);\n }\n\n // # Added to workaround time in transit error 270033 if total weight of packages is over 150lbs or 70kgs\n if (($this->weight_for_timeintransit > 150) && ($this->unit_weight == \"LBS\")) {\n $this->weight_for_timeintransit = 150; \n } else if (($this->weight_for_timeintransit > 70) && ($this->unit_weight == \"KGS\")) {\n $this->weight_for_timeintransit = 70; \n }\n \n // # make sure that when TimeinTransit fails to get results (error or not available)\n // # this is not obvious to the client\n $_upsGetTimeServicesResult = $this->_upsGetTimeServices();\n if ($_upsGetTimeServicesResult != false && is_array($_upsGetTimeServicesResult)) {\n $this->servicesTimeintransit = $_upsGetTimeServicesResult;\n }\n if ($this->logfile) {\n error_log(\"------------------------------------------\\n\", 3, $this->logfile);\n error_log(\"Time in Transit: \" . $this->timeintransit . \"\\n\", 3, $this->logfile);\n }\n } // # END if ($this->timeInTransitView != 'Not') \n \n\t// # END Time In Transit\n\n\n\t\t// # request two different rates methods. \n\t\t// # one method triggers \"shop\" rates (list of allowed shipping methods)\n\t\t// # the other request is to grab the SurePost rate, if available.\n\n\n\t\t// # IF surePost is active, and no rates returned for standard UPS shipping, use SurePost as default.\n\n\t\tif($this->surepost_active == 'True' && !is_array($this->_upsGetQuote())) { \n \t $upsQuote = $this->_upsGetQuote('surePost');\n\t\t} else {\n\t $upsQuote = $this->_upsGetQuote();\n\t\t}\n\n\t\t// # do NOT run a SurePost quote if the address is international - will recieve API errors - Exception Puerto Rico.\n\t\tif($this->surepost_active == 'True' && ($order->delivery['country']['iso_code_2'] == 'US' || $order->delivery['country']['iso_code_2'] == 'PR') && is_array($this->_upsGetQuote()) && is_array($this->_upsGetQuote('surePost'))) { \n\n\t\t\t// # Pass the trigger to the _upsGetQuote() function for SurePost response\n \t $upsSurePostQuote = $this->_upsGetQuote('surePost');\n\n\t\t\t// # now merge the two response arrays!\n\t $upsQuote = array_merge($upsQuote, $upsSurePostQuote);\n\t\t}\n\n if ((is_array($upsQuote)) && (sizeof($upsQuote) > 0)) {\n if (defined('MODULE_SHIPPING_UPSXML_WEIGHT1') && MODULE_SHIPPING_UPSXML_WEIGHT1 == 'False') {\n $this->quotes = array('id' => $this->code, 'module' => $this->title);\n usort($upsQuote, array($this, \"rate_sort_func\"));\n } else {\n if ($this->dimensions_support > 0) {\n $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $this->boxCount . ($this->boxCount > 1 ? ' pkgs, ' : ' pkg, ') . number_format($totalWeight,2) . ' ' . strtolower($this->unit_weight) . ' total)');\n } else {\n $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkgs x ' : ' pkg x ') . number_format($shipping_weight, 2) . ' ' . strtolower($this->unit_weight) . ' total)');\n\n }\n usort($upsQuote, array($this, \"rate_sort_func\"));\n } // end else/if if (defined('MODULE_SHIPPING_UPSXML_WEIGHT1')\n $methods = array();\n for ($i=0; $i < sizeof($upsQuote); $i++) {\n list($type, $cost) = each($upsQuote[$i]);\n if (strpos($type, ' (')) {\n $basetype = substr($type, 0, strpos($type, ' ('));\n } else {\n $basetype = $type;\n }\n // BOF limit choices, behaviour changed from versions < 1.2\n if ($this->exclude_choices($basetype)) continue;\n // EOF limit choices\n if ( $method == '' || $method == $basetype ) {\n $_type = $type;\n\n if ($this->timeInTransitView == \"Raw\") {\n if (isset($this->servicesTimeintransit[$basetype])) {\n $_type = $_type;\n } \n } else {\n if (isset($this->servicesTimeintransit[$basetype])) {\n $eta_array = explode(\"-\", $this->servicesTimeintransit[$basetype][\"date\"]);\n $months = array (\" \", \"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\");\n $eta_arrival_date = $months[(int)$eta_array[1]].\" \".$eta_array[2].\", \".$eta_array[0];\n $_type .= \", Est Delivery Date: \".$eta_arrival_date;\n } \n } \n\t\t\t\t\t// # changed to make handling percentage based\n if ($this->handling_type == \"Percentage\") {\n if ($_type) $methods[] = array('id' => $basetype, 'title' => $_type, 'cost' => ((($this->handling_fee * $cost)/100) + $cost));\n } else {\n if ($_type) $methods[] = array('id' => $basetype, 'title' => $_type, 'cost' => ($this->handling_fee + $cost));\n }\n }\n }\n if ($this->tax_class > 0) {\n $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);\n }\n $this->quotes['methods'] = $methods;\n } else {\n if ( $upsQuote != false ) {\n $errmsg = $upsQuote;\n } else {\n $errmsg = MODULE_SHIPPING_UPSXML_RATES_TEXT_UNKNOWN_ERROR;\n }\n $errmsg .= '<br>' . MODULE_SHIPPING_UPSXML_RATES_TEXT_IF_YOU_PREFER . ' ' . STORE_NAME.' via <a href=\"mailto:'.STORE_OWNER_EMAIL_ADDRESS.'\"><u>Email</u></a>.';\n $this->quotes = array('module' => $this->title, 'error' => $errmsg);\n }\n if (tep_not_null($this->icon)) {\n $this->quotes['icon'] = tep_image($this->icon, $this->title);\n }\n\n return $this->quotes;\n }", "title": "" }, { "docid": "75f57b4e9e406d79ca8609c79936a2cc", "score": "0.5539034", "text": "function checkPrice() {\n\t\tglobal $config;\n\t\t$this->loadItems();\n\t\t$newPrice = 0;\n\t\tif ($config->getNode('delivery','deliveryType') === 'single') {\n\t\t\t$newDelivery = $config->getNode('deliveryTier'.$this->deliveryTier,'value');\n\t\t} else {\n\t\t\t$newDelivery = 0;\n\t\t}\n\t\tforeach (array_keys($this->items) as $item) {\n\t\t\t$obj = new Item($item);\n\t\t\tif ($config->getNode('delivery','deliveryType') === 'custom') {\n\t\t\t\t$newDelivery += $this->items[$item] * $obj->getDeliveryCost();\n\t\t\t} elseif ($config->getNode('delivery','deliveryType') === 'perItem') {\n\t\t\t\t$newDelivery += $this->items[$item] * $config->getNode('deliveryTier'.$this->deliveryTier,'value');\n\t\t\t}\n\t\t\t$newPrice += $this->items[$item] * $obj->getPrice();\n\t\t}\n\t\t$this->total = $newPrice;\n\t\t$this->delivery = $newDelivery;\n\t}", "title": "" }, { "docid": "c360be46248a311ac6c3cbae922df587", "score": "0.5538371", "text": "function load() {\n\t$this->load_query(ORDER_SQL_LOAD, $this->id);\n\n\t$this->shipping_and_handling_amount = $this->shipping_amount + $this->handling_amount;\n }", "title": "" }, { "docid": "2e57c7618b3b0dada6cf5af5b0788ee0", "score": "0.55374974", "text": "function on_paypal_callback_received() {\n\t\tif( @$_POST[ 'METHOD' ] != 'CallbackRequest' )\n\t\t\treturn;\n\n\t\t$this->load->library( 'paypal_instant_update' );\n\n\t\tif( empty( $_POST[ 'SHIPTOZIP' ] ) || empty( $_POST[ 'SHIPTOCOUNTRY' ] ) )\n\t\t\t$this->paypal_instant_update->raise_no_shipment_options();\n\t\telse {\n\t\t\t$_POST[ 'postcode' ] = $_POST[ 'SHIPTOZIP' ];\n\n\t\t\tif( $_POST[ 'SHIPTOCOUNTRY' ] == 'GB' ) { // Great Britain\n\t\t\t\tif( @$_POST[ 'SHIPTOSTATE' ] == 'Isle of Wight' ||\n\t\t\t\t\t@$_POST[ 'SHIPTOSTATE' ] == 'Isles of Scilly' ||\n\t\t\t\t\t@$_POST[ 'SHIPTOSTATE' ] == 'Isle of Man' ||\n\t\t\t\t\t@$_POST[ 'SHIPTOSTATE' ] == 'Channel Islands' )\n\t\t\t\t\t$_POST[ 'country' ] = 'Isle of Wight'; // The goal is to have £30.00 flat rate so no matter the return result is Isle of Wight or Channel Islands or Isles of Scilly\n\t\t\t\telseif( preg_match_all( '/isle\\s+of\\s+wight|chann?els?\\s+island|isles?\\s+of\\s+scill?y/i', $_POST[ 'SHIPTOCITY' ], $matches ) )\n\t\t\t\t\t$_POST[ 'country' ] = 'Isle of Wight';\n\t\t\t\telse\n\t\t\t\t\t$_POST[ 'country' ] = 'United Kingdom';\n\t\t\t\t$flat_rate = $this->get_shipment_flate_rate( 'rawwithoutprice' );\n\t\t\t\t$this->paypal_instant_update->update_shipping_fee( $flat_rate );\n\t\t\t}\n\t\t\telseif( $_POST[ 'SHIPTOCOUNTRY' ] == 'IE' ) { // Ireland\n\t\t\t\t$_POST[ 'country' ] = 'Northern Ireland';\n\n\t\t\t\t$flat_rate = $this->get_shipment_flate_rate( 'rawwithoutprice' );\n\t\t\t\t$this->paypal_instant_update->update_shipping_fee( $flat_rate );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->paypal_instant_update->raise_no_shipment_options();\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "396538737a5530654a7c1e5da9549f1f", "score": "0.5534503", "text": "function fke_shipping_order_amount() {\n $total = WC()->cart->total;\n $free_shipping_settings = get_option( 'woocommerce_free_shipping_settings' );\n if(WC()->customer->get_shipping_country() == \"DE\"){\n $minimum = 20; //change this to your free shipping threshold\n }\n else{\n $minimum = 40; //change this to your free shipping threshold\n }\n $open = $minimum - $total;\n\n if ( WC()->cart->total < $minimum ) {\n if( is_cart() ) {\n wc_print_notice( \n sprintf( 'Ihr aktueller Bestellwert liegt bei %s — Jetzt noch %s hinzufügen und versandkostenfrei bestellen.' , \n wc_price( WC()->cart->total ), \n wc_price( $open)\n ), 'error' \n );\n } else {\n wc_print_notice( \n sprintf( 'Ihr aktueller Bestellwert liegt bei %s — Dadurch bestellen sie heute versandkostenfrei.' , \n wc_price( WC()->cart->total ), \n wc_price( $minimum )\n ), 'error' \n );\n }\n }\n}", "title": "" }, { "docid": "6e8db9fbca6fe9ea94305c7f915c5248", "score": "0.55344766", "text": "public function shouldReloadOnRegionChange()\n {\n return $this->_helper()->shouldReloadTotalsOnBillingRegionChange();\n }", "title": "" }, { "docid": "63d7cc230eba074d0ee7e91d7617b86e", "score": "0.5529071", "text": "function updateShippingAddress() {\n try {\n $result = ChargeBee_Subscription::update($this->getSubscription()->id, \n\t\t\t\t\t\t\t\tarray(\"shippingAddress\" => $_POST[\"shipping_address\"]));\n $response[\"status\"] = \"success\";\n\t\t\t$response[\"forward\"] = getReturnURL();\n return json_encode($response);\n } catch (ChargeBee_InvalidRequestException $e) {\n return $this->handleInvalidRequestErrors($e);\n } catch (Exception $e) {\n return $this->handleGeneralErrors($e);\n }\n }", "title": "" }, { "docid": "93f7fbd1cc73a8e1364d233db2901725", "score": "0.5527202", "text": "private static function loadShipping(): void\n {\n if (self::$shippingLoaded) {\n return;\n }\n\n self::$shippingLoaded = true;\n\n foreach (self::SHIPMENT_METHODS as $method) {\n self::load($method);\n }\n\n foreach (self::SHIPMENT_ZONES as $zone) {\n self::load($zone);\n }\n }", "title": "" }, { "docid": "0fc92ae7557b25001ccdd779bd4c886c", "score": "0.55246145", "text": "public function calculate_shipping( $package = array() ) {\n\n $cost = 0; \n\n // $configurations = maybe_unserialize( $this->get_option( 'rates' ) );\n\n $temp_rates = array();\n\n // Check whether each item in the cart has an applicable configuration\n foreach ( $package[ 'contents' ] as $item ) {\n\n if ( $item[ 'data' ]->needs_shipping() ) {\n \n $item_rates = $this->get_item_configurations( $item );\n\n if ( count( $item_rates ) == 0 ) {\n return;\n }\n\n $rate_id = $this->get_pricing_configuration_id( $item, $item_rates );\n\n if ( array_key_exists( $rate_id, $temp_rates ) ) {\n $temp_rates[ $rate_id ] += $item[ 'quantity' ];\n }\n else {\n $temp_rates[ $rate_id ] = $item[ 'quantity' ];\n } \n }\n }\n\n // Get applicable configurations\n $rates = array();\n \n foreach ( $temp_rates as $rate_id => $quantity ) {\n $rate = unserialize( base64_decode( $rate_id ) );\n $rate[ 'quantity' ] = $quantity;\n $rates[] = $rate;\n } \n\n // If we are only applying the base rate once, sort configurations by base rate\n if ( $this->apply_base_rate_once ) {\n usort( $rates, array( &$this, 'sort_configurations_by_price' ) );\n } \n\n // Allow themes/plugins to override the default configurations setup\n $rates = apply_filters( 'woocommerce_brs_shipping_configurations', $rates );\n\n // Start adding together cost of shipping, one configuration at a time\n $first = true;\n\n foreach ( $rates as $rate ) {\n\n if ( $first === true || ! $this->apply_base_rate_once ) {\n\n $cost += $this->get_configuration_subtotal( $rate[ 'rates' ], $rate[ 'quantity' ] );\n $first = false;\n\n } else {\n\n $cost += $this->get_configuration_subtotal( $rate[ 'rates' ], $rate[ 'quantity' ], 1 );\n\n }\n\n }\n\n // Add handling fee\n if ( $this->fee > 0 ) {\n $cost += $this->get_fee( $this->fee, $package[ 'contents_cost' ] );\n }\n\n // Allow themes/plugins to override the plugin's calculated shipping rates \n $cost = apply_filters( 'woocommerce_brs_shipping_total', $cost, $this, $rates );\n \n $rate = array(\n 'id' => $this->get_rate_id(),\n 'label' => $this->title,\n 'cost' => $cost,\n 'package' => $package,\n );\n\n $this->add_rate( $rate );\n }", "title": "" }, { "docid": "3e4031e5a463f1f4067109a9205710a1", "score": "0.5514887", "text": "public function getFeeOnShipping(): bool\n {\n return $this->feeOnShipping;\n }", "title": "" } ]
b06b9d194b73e2fc5a2a5b004d794031
int 1 accesslevel (CMS,...)0 normal user 1 admin
[ { "docid": "ed7f19b8c6e96c7ebe33bf2647f4fe19", "score": "0.0", "text": "private function __construct($id, $email, $name, $pw, $salt, $accesslvl) {\r\n $this->id = $id;\r\n $this->email = $email;\r\n $this->name = $name;\r\n $this->pw = $pw;\r\n $this->salt = $salt;\r\n $this->accesslvl = $accesslvl;\r\n }", "title": "" } ]
[ { "docid": "2e63a78a321f405cf7c7e4391bae3b5e", "score": "0.7471674", "text": "function super_admin()\n {\n if ($_SESSION[\"user\"][\"userID\"]==1||$_SESSION[\"user\"][\"userID\"]==2)\n return 1;\n else\n return 0;\n }", "title": "" }, { "docid": "a95922642009736db95353077f93dd0c", "score": "0.7437159", "text": "function authGetUserLevel($user) {\n// User not logged in, user level '0'\n if (!$_SESSION['intranet']) {\n return 0;\n }\n// Check if the user is can modify\n $b = true;\n $c = 0;\n while ($b) {\n if ($_SESSION['rol_' . $c]['IDSIS'] = 45) {\n $b = false;\n switch ($_SESSION['rol_' . $c]['nombre']) {\n case \"Superusuario\":\n\t return 2;\n\t break;\n\tcase \"Usuario\":\n\t return 1;\n\t break;\n }\n } else {\n if ($c > $_SESSION['numero_sistemas']) {\n $b = false;\n }\n $c++;\n }\n }\n return 0;\n}", "title": "" }, { "docid": "876cf188eac1af14c85a3f184a038401", "score": "0.71690273", "text": "static function get_access_level() {\n\t\treturn \\Core\\User::get_access_level( \\Core\\Auth::get_current_user_id(), \\Core\\Helper::get_current_project() );\n\t}", "title": "" }, { "docid": "d4e21a8b068a346e5ab4585434f78229", "score": "0.7166867", "text": "public function checkAccess()\n {\n if ($userId = sfContext::getInstance()->getUser()->getAttribute('user_id'))\n {\n if (UllUserTable::hasGroup('MasterAdmins'))\n {\n return 'w';\n }\n\n if ($this->hasWriteAccess())\n {\n return 'w';\n } \n }\n \n if ($this->hasReadAccess())\n {\n return 'r';\n } \n }", "title": "" }, { "docid": "94ffadf6ce9a2f81a2ad566ab12d9c94", "score": "0.6989379", "text": "public function getAccessLevel() {\n\n\t\tif (!is_null($this->baseRoute)) {\n\t\t\t$module = ucfirst(substr($this->baseRoute, 1));\n\t\t} else {\n\t\t\t$module = ucfirst(get_class($this));\n\t\t}\n\n\t\tif (Yii::app()->user->checkAccess($module . 'Admin'))\n\t\t\treturn 3;\n\t\telseif (Yii::app()->user->checkAccess($module . 'View'))\n\t\t\treturn 2;\n\t\telseif (Yii::app()->user->checkAccess($module . 'PrivateReadOnlyAccess'))\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn 0;\n\t}", "title": "" }, { "docid": "68103296d406218bd1a5f3bfbff0316d", "score": "0.6957779", "text": "public function auth_admin_level()\n {\n return $this->auth_admin;\n }", "title": "" }, { "docid": "82e54a0a4898ebdd437ec1fa322ea684", "score": "0.6915328", "text": "function mod_access($type)\n{\n global $cat;\n\n // Allow people without a stored session to read\n $arrStats[LEVEL] = 0;\n if (isset($GLOBALS[\"objSrcUser\"]))\n {\n $objSrcUser = &$GLOBALS[\"objSrcUser\"];\n $arrStats = $objSrcUser->get_stats();\n }\n\n switch($type)\n {\n case 0:\n // Give elders moderator powers\n if ($arrStats[TYPE] == 'elder' || $arrStats[TYPE] == 'coelder')\n $needed = 0;\n else\n $needed = 2;\n break;\n case 1: // staff101\n $needed = 5;\n break;\n case 3: // news\n $needed = 6;\n break;\n case 8: // dragon\n $needed = 6;\n break;\n default:\n $needed = 2;\n }\n\n if ($arrStats[LEVEL] >= $needed)\n return TRUE;\n else\n return FALSE;\n}", "title": "" }, { "docid": "33ac0f3a549f8dedc9e85b6eaf9b3ace", "score": "0.6849818", "text": "function admin()\n {\n if ($this->session->userdata('level') === '2') {\n $this->load->view('admin/dashboard');\n } else {\n echo \"Access Denied\";\n }\n }", "title": "" }, { "docid": "5f1533d748028dd6bc5ba6afdcc83ff6", "score": "0.6828669", "text": "function user_level()\n\t{\n\t\t//Put here for PHP 4 users\n\t\t$this->CI =& get_instance();\n\t\t$id = $this->CI->session->userdata('user_id');\n\t\t$group = $this->CI->User_Model->getGroup($id);\n\t\t$permission = $this->CI->Group_Model->getPermission($group);\n\t\tif(isset($permission) && $permission)\n\t\t{\n\t\t\treturn $permission;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "2b71023af05458538f9c5d7a400e0467", "score": "0.6821568", "text": "function isAdmin(){\n if ($this->level == ADMIN_LEVEL || $this->real_level ==ADMIN_LEVEL) return true;\n return false;\n }", "title": "" }, { "docid": "afe2c459360861a27a351a877f0d4637", "score": "0.67780375", "text": "function is_Admin(){\n\t\t$a = $this->userdata(\"admin\");\n $info = $this->_model->Auth_model->getInfo($a['aid']);\n if($this->is_Login() && $info['radminsuper']==1){\n return TRUE;\n }\n else{\n return FALSE;\n }\n }", "title": "" }, { "docid": "fad661d584d56f271e71279087bd0ac1", "score": "0.6728583", "text": "function checkUserType($userID, $accessLevel){\n //Vars used\n $ans = FALSE;\n $public = accessLevel::readOnly;\n $systemAdmin = accessLevel::systemAdmin;\n\n //Check asscess level\n switch ($accessLevel){\n case $public:\n if(isLoggedIn()){\n $ans = TRUE;\n } \n break;\n case $systemAdmin:\n if(isSystemAdmin($userID) == TRUE){\n $ans = TRUE;\n }\n break;\n }\n\n return $ans;\n}", "title": "" }, { "docid": "1b8ff947536dd5fc09ced5212eaa671d", "score": "0.67174053", "text": "function access_level($access_rights){\n\t\t$CI = & get_instance();\n\t\t\n\t\tswitch($access_rights){\n\t\t\tcase 'ADMIN_ACCESS':\n\t\t\t\t$user_type = array('ADMIN','SUPERUSER','SYSADMIN');\n\t\t\t\tif(!in_array($CI->session->userdata('user_type'), $user_type))\n\t\t\t\t\tredirect('admin/access_error');\n\t\t\tbreak;\n\t\t\tcase 'USER_ACCESS':\n\t\t\t\t$user_type = array('USER');\n\t\t\t\tif(!in_array($CI->session->userdata('user_type'), $user_type))\n\t\t\t\t\tredirect('admin/access_error');\n\t\t\tbreak;\n\t\t};\n\t\t\n\t\treturn;\n\t}", "title": "" }, { "docid": "c7aabbee0562b52d8753c0a1e5c1eacf", "score": "0.66822153", "text": "public static function checkAdmin()\n {\n \n $userId = User::checkLogged();\n\n if($userId)\n {\n\t $user_type = User::checkLoggedType();\n\n\t if ($user_type == 'admin') {\n\t return true;\n\t } \t\n }\n\n die('Access denied');\n }", "title": "" }, { "docid": "8ec9eda2a6d32c73959b56017f4ee4ae", "score": "0.66603094", "text": "function getUserStatus () {\n if (isset ($_SESSION['LOGGED']) || isset($_SESSION['ADMIN'])){\n if ($_SESSION['LOGGED'] && $_SESSION['ADMIN']) {\n return 1;\n }\n return 0;\n }\n return -1;\n }", "title": "" }, { "docid": "6bccb3e86b9b01a8b53ce1a0587d393d", "score": "0.6621014", "text": "function isAdmin()\n{\n if (isset($_SESSION['level']) && $_SESSION['level'] != \"\")\n {\n return $_SESSION['level'];\n }\n else\n {\n return $_SESSION['level'];\n }\n}", "title": "" }, { "docid": "d319487d601185b00c53b18b02060525", "score": "0.6581896", "text": "function Check_If_Admin($loginid)\n{\n\tglobal $db;\n\t$sql = \"SELECT * FROM \". AUTH_USER\n\t\t. \t\" WHERE user_login_id = '\". $loginid. \"' \";\n\t\t$db->query($sql);\n\t\t$db->next_record();\n\t\t$user_role = $db->f('user_type');\n\t\tif($user_role == 'Admin')\n\t\t{\n\t\t\treturn 1;\t\t\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\treturn 0;\n\t\t}\n}", "title": "" }, { "docid": "a9a627bc41b24cb8268bfc6606bf3732", "score": "0.6559857", "text": "function get_user_level($user_id){\n $levels = array(\n 0 => 'Member',\n 1 => 'Admin'\n );\n return $levels[$id];\n}", "title": "" }, { "docid": "12ecc242b7104384d83fee604c48c6dd", "score": "0.65397877", "text": "function current_user_level()\n{\n return intval($_SESSION['level']);\n}", "title": "" }, { "docid": "8b8d058abff33e89437377f00f4397e6", "score": "0.65134263", "text": "function isAdmin()\n {\n return ($this->_level == 0);\n }", "title": "" }, { "docid": "f7f7f5b2d1129ede4cf5d0c1ecf7d551", "score": "0.6512466", "text": "protected function access_only_admin($user_type) {\n if ($user_type !== 'hr operations') {\n echo '0';\n }\n }", "title": "" }, { "docid": "6dfbd0b4966fcd87eab0db382a9b102e", "score": "0.6505818", "text": "function content_admin($access_level) {\n $perms = array();\n switch ($access_level){\n case 'developer':\n // Node\n $perms[] = 'bypass node access';\n $perms[] = 'administer content types';\n // No one should have delete for history or forensics\n // $perms[] = 'delete revisions';\n\n // Taxonomy\n $perms[] = 'administer taxonomy';\n\n // Block\n $perms[] = 'administer blocks';\n\n // Entity View Modes\n $perms[] = 'administer entity view modes';\n\n // Image\n $perms[] = 'administer image styles';\n\n // Menu Import\n $perms[] = 'import or export menu';\n\n // Menu Position\n $perms[] = 'administer menu positions';\n\n // Field Group\n $perms[] = 'administer fieldgroups';\n\n // PathAuto\n $perms[] = 'administer pathauto';\n $perms[] = 'administer pathauto';\n $perms[] = 'notify of path changes';\n\n $perms[] = 'edit file';\n\n case 'content editor':\n // File\n $perms[] = 'view file';\n\n // Node\n $perms[] = 'administer nodes';\n $perms[] = 'access content overview';\n $perms[] = 'view own unpublished content';\n $perms[] = 'view revisions';\n $perms[] = 'revert revisions';\n\n // Menu\n $perms[] = 'administer menu';\n\n // Meta Tag\n $perms[] = 'edit meta tags';\n\n case 'anonymous':\n $perms[] = 'access content';\n\n break;\n default:\n drupal_set_message(t('@level not valid for @func', array(\n '@level' => $access_level,\n '@func' => __FUNCTION__,\n )\n ), 'error');\n }\n\n return $perms;\n}", "title": "" }, { "docid": "1e8dd935f5e217ffa92bf0dc3bda9a9b", "score": "0.64693666", "text": "public function check_acl() {\n\n $this->zend->load('Zend_Acl');\n\n $module = $this->router->fetch_module();\n\n $controller = $this->router->fetch_class();\n\n $action = $this->router->fetch_method();\n\n $level = $this->session->userdata('level');\n $user_id = $this->session->userdata('adminid');\n\n $this->setRoles();\n $this->setResources();\n $role = 'guest';\n // $access=array('products'=>array('index', 'add','edit','list'),'news'=>array('index','add','edit','list'));\n $access_us = $this->f_homemodel->get_data('access', array('user_id' => $user_id), array(), true);\n\n @$access = json_decode(@$access_us->access);\n @$access = (array) $access;\n\n //level=1: admin; level=2: mod\n switch ($level) {\n case '1':\n $role = 'admin';\n break;\n case '2':\n $role = 'mod';\n break;\n }\n// echo $level ; die();\n $this->setAccess($role, $access);\n\n if (!$this->Zend_Acl->isAllowed($role, ':' . $controller, $action)) {\n $this->creat_mess('danger', 'Tài khoản của bạn chưa được cấp quyền chức năng này !');\n redirect(base_url('vnadmin'));\n die();\n }\n }", "title": "" }, { "docid": "856c07cf2737c1b823fe0a48acffefdc", "score": "0.6465811", "text": "function is_admin()\n{\n\treturn modApiFunc('Users','isUserSignedIn');\n}", "title": "" }, { "docid": "8e0684221f26913a7879b1cfa6fb7970", "score": "0.6463509", "text": "function checkPrivilage()\n\t{\n\t\tif(Yii::app()->user->isGuest)\n\t\t{\n\t\t\t$this->redirect(array('userAuth/login'));\n\t\t}\n\t\telse\n\t\t{\n // if using module\n\t\t\t$controllerName = $this->id;\n\t\t\t$userLevelId = Yii::app()->user->userLevelId;\n\t\t\t\n // bypass login user if accessing appUser\n if($controllerName == 'appUser')\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// fetch user privilages \n\t\t\t$criteria = new CDbCriteria();\n\t\t\t$criteria->select = 't.*';\n\t\t\t$criteria->join = 'LEFT JOIN module_privilage as mp ON t.id = mp.module_id';\n\t\t\t$criteria->condition = 'mp.user_level_id = :userLevelId AND t.url = :url';\n\t\t\t$criteria->params = array(\":userLevelId\" => $userLevelId, \n \"url\" => $controllerName\n\t\t\t\t\t\t\t\t);\n\t\t\t\n\t\t\t$modules = Module::model()->findAll($criteria);\n \n\t\t\tif(!isset($modules) || count($modules) == 0)\n\t\t\t{\n\t\t\t\t$this->redirect(array('appUser/noAccess'));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0061dba277b43fc3df89ba96ef950138", "score": "0.64599895", "text": "function check_admin() {\t\t$this->db->where('user_level', 'Administrator');\n\t\t$this->db->where('id', $this->user_id);\n\t\t$query = $this->db->get($this->t_user);\n\n\t\tif ($query->num_rows()) {\n\t\t\treturn TRUE;\n\t\t}\n\t\telse {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "2829367246db80db8ae472b21f73a784", "score": "0.64563423", "text": "public function authorize()\n {\n if(\\Auth::user()->user_level == 1){\n\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "7646fb5731a53cf9733ff2a5b6235092", "score": "0.645485", "text": "public function authorized_for_level($level = -1)\n {\n // Minimum auth level is the Guest one\n if ($level == -1)\n $level = $this->auth_disabled_level();\n\n // If this function returns NULL, then this user has no auth level,\n // So we assign it the lowest possible\n if (is_null($this->session->userdata('user_auth')))\n {\n $user_access_level = $this->auth_disabled_level();\n\n // If the user tries to access one level which is > $this->auth_disabled_level()\n // and he doesn't have the 'user_auth' session variable, this means that he shouldn't be here,\n // BUT maybe his session might have expired.\n // So we redirect him, without logging\n // This feature is temporarily disabled\n // $this->redirect_destroy_session();\n }\n else\n $user_access_level = $this->session->userdata('user_auth');\n // If the user access level is LOWER than the level we're asking, reject!\n if ( $user_access_level < $level)\n {\n // TODO: here we should add controller name as well\n $this->log('alert', 'klsecurity', 'User with lvl '.$user_access_level.' tried to access unauthorized level '. $level);\n $this->redirect_destroy_session();\n }\n // The user is authorized .. let him carry on\n }", "title": "" }, { "docid": "2cead2929825c2d99593e35926af721f", "score": "0.6454785", "text": "function sb_isAdministrator() {\n\n global $loggedInID;\n if( strcmp( $loggedInID, \"\" ) == 0 ) {\n // public can never edit\n return false;\n }\n\n if( sb_getUserDatabaseField( $loggedInID, \"administrator\" ) == 1 ) {\n // admins can always edit\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "4f902624ce3fd356ea3caba0a3d4651a", "score": "0.64195263", "text": "public function is_admin()\n {\n\n if ($this->session->userdata('user_type') == 1 || $this->session->userdata('user_type') == 2) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "49e9f2542c553e09e194090d80e12ed8", "score": "0.6416736", "text": "function isaccess($login,$password,$level)\r\n {\r\n global $xuser;\r\n $ret=false;\r\n if (@($xuser['login']==$login)&&@($xuser['password']==$password)&&@($xuser[$level]==1))\r\n {\r\n $ret=true;\r\n }\r\n return $ret;\r\n }", "title": "" }, { "docid": "9f906b672eb7719fd55b123fc1e025a8", "score": "0.641617", "text": "function isAdmin(){\r\n $user = $this->loadUser();\r\n if ($user)\r\n return $user->group==2;\r\n return false;\r\n }", "title": "" }, { "docid": "a9e2586b56fa74b83556aa02e3abcefe", "score": "0.64102274", "text": "function authGetUserLevel($user)\n{\n\tglobal $ssp;\n\tglobal $auth;\n\t$userData = $ssp->getAttributes();\n\t$username = getUserName();\n\tif (isset($username) && $username === $user) {\n\t\tforeach($auth['saml']['admin'] as $attr => $values) {\n\t\t\tif (array_key_exists($attr, $userData)) foreach($values as $value) {\n\t\t\t\tif (in_array($value, $userData[$attr])) return 2;\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}\n\treturn 0;\n}", "title": "" }, { "docid": "2319ec4321dc52e6e2e9493577ca0ea2", "score": "0.6408684", "text": "private function _isAdminLogin(){\r\n if(!User::isAdminLogin()){\r\n $this->redirect(_WEB_PATH.\"admin/login\");\r\n die;\r\n }\r\n }", "title": "" }, { "docid": "30d6af038581b567122122f972ed28e9", "score": "0.6396376", "text": "public static function access($level)\n\t{\n\t\t//Verifiaca que no exista una autenticacion\n\t\tif(!Session::get('Mundial_authenticate'))\n\t\t{\n\t\t\t//En caso de no existir, se redirecciona al controlador de errores\n\t\t\theader(\"Location: \" . BASE_URL . 'error');\n\t\t\texit;\n\t\t}\n\t\t\n\t\t//Se verifica que el nivel recibido sea mayor que el nivel del usuario\n\t\tif(Session::getLevel($level) > Session::getLevel(Session::get('Mundial_user_rol')))\n\t\t{\n\t\t\t//Si es mayor, se redirecciona al controlador de errores\t\t\t\n\t\t\theader(\"Location: \" . BASE_URL . 'error/access/5656');\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "e0450595c541161e01efa95981e6fdf0", "score": "0.6392609", "text": "function modify_user($user,$level){\r\n\t\t$q = \"UPDATE \".TBL_USERS.\" SET level='$level' WHERE u_id='$user'\";\t//\tquery to change user level\r\n\t\t$result = mysql_query($q, $this->connection);\r\n\t\tif($result)\r\n\t\t\treturn 1;\r\n\t\telse\r\n\t\t\treturn 0;\r\n\t}", "title": "" }, { "docid": "b700247c733e3c9275c0e7205b6147ae", "score": "0.6389697", "text": "function index()\n {\n if ($this->session->userdata('level') === '1') {\n $this->load->view('manager/dashboard');\n } else {\n echo \"Access Denied\";\n }\n }", "title": "" }, { "docid": "d46902368ec3f935be8a94d4aae9f77a", "score": "0.6380456", "text": "function db_getPermissionLevel($usernameid)\n{\n\trequire_once(\"include/db.php\");\n\n\t$user = getUser($usernameid);\n\t\n\tif($user)\n\t\treturn $user['permissionlevel'];\n\treturn PERM_USER;\n}", "title": "" }, { "docid": "9c7d3154816b1cca54a9a814dd58670f", "score": "0.63778925", "text": "public function accessAdmin() {\n return $this->group === 1;\n }", "title": "" }, { "docid": "128e559ca68c02c202f65d052f129994", "score": "0.6372992", "text": "function IsAdmin() {\r\n\t\t$IsAdmin = $this->IsSysAdmin();\r\n\t\tif (!$IsAdmin)\r\n\t\t\t$IsAdmin = in_array(-1, $this->UserLevelID);\r\n\t\treturn $IsAdmin;\r\n }", "title": "" }, { "docid": "b0662cc6aca4edf38f4bff56beef742a", "score": "0.63688475", "text": "function redcap_user_rights($project_id){\n if (SUPER_USER) {\n $add_bulk_users = new bulkUserModuleClass($project_id);\n echo $add_bulk_users->getHTMLOutput();\n }\n\n }", "title": "" }, { "docid": "c147185e0f38cae3244a1291ff83fcdf", "score": "0.6351528", "text": "function cek_level($username)\n\t{\n return $this->db->get_where('admin', array('username'=>$username))->row();\n\t}", "title": "" }, { "docid": "1cb6953e6754e6c644765890ae900a94", "score": "0.6347078", "text": "public function getUserAccessLevel() {\n\t\t\t\n\t\t\t// Check to see if the user is currently logged in\n\t\t\t$username = \"\";\n\t\t\tif (isset($_SESSION['username'])) {\n\t\t\t\t$username = $_SESSION['username'];\n\t\t\t}\n\t\t\t\n\t\t\t// Set the initial status\n\t\t\t$rvalue = Engine::DATABASE_ERROR_COULD_NOT_ACCESS_DATABASE;\n\t\t\t\n\t\t\t// Check to ensure that a database module is installed\n\t\t\tif ($this->isModuleInstalled(Engine::FEATURE_SUPPORT_DATABASE)) {\n\t\t\t\t\n\t\t\t\t// Query the database to get the access level\n\t\t\t\t$result = $this->modules[$this->database_module]->queryDatabase(\"SELECT accesslevel FROM scms_accounts WHERE username = '\".$username.\"';\");\n\t\t\t}\n\t\t\t\n\t\t\t// Check to see if there are results\n\t\t\tif (count($result) > 0) {\n\t\t\t\t\n\t\t\t\t// Loop through the results and get the access level\n\t\t\t\tforeach ($result as $resultrow) {\n\t\t\t\t\t$accesslevel = $resultrow[0];\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$rvalue = $accesslevel;\n\t\t\t} else {\n\t\t\t\t$rvalue = Engine::DATABASE_ERROR_NO_QUERY_RESULTS;\n\t\t\t}\n\t\t\t\n\t\t\t// Return the result\n\t\t\treturn $rvalue;\n\t\t}", "title": "" }, { "docid": "27600ad3ea4055f9c503dfb002c3a759", "score": "0.63328063", "text": "public function authorize()\n {\n return \"ADMIN\" === Auth::user()->user_type;\n }", "title": "" }, { "docid": "32bfb9b23f9b0bda5e18d2c7e23d847d", "score": "0.6311544", "text": "public function isAdmin()\r\n\t{\r\n\t\treturn ($this->statut == 1);\r\n\t}", "title": "" }, { "docid": "759796514bafcb80c622d1f2ed1013dc", "score": "0.6308111", "text": "public function hpp_login(){\r\n $adminID = $this->session->userData('adminID');\r\n if($adminID > 0){\r\n $this->db->update('admin_access' , array('LOG_STATUS' => 'Online', 'LOG_TIME' => date(\"Y-m-d h:i:s\")), array('ADMIN_ID' => $adminID));\r\n }\r\n }", "title": "" }, { "docid": "3618cc308e0dd80d768036185ab3f1ca", "score": "0.6303376", "text": "public static function get_access_level($userID){\n return User_type_model::getInstance()->getWhere(['id'=>User_model::getInstance()->find($userID)['fk_user_type']])->getRow()->access_level;\n\n }", "title": "" }, { "docid": "1738515e6e03f8181794660ec0f97e35", "score": "0.62995476", "text": "function print_admin_access($cms){\n $query = 'SELECT `access`.`access` FROM `nodes_access` AS `access` '\n . 'LEFT JOIN `nodes_admin` AS `admin` ON `admin`.`url` = \"access\" '\n . 'WHERE `access`.`user_id` = \"'.$_SESSION[\"user\"][\"id\"].'\" '\n . 'AND `access`.`admin_id` = `admin`.`id`';\n $admin_res = engine::mysql($query);\n $admin_data = mysqli_fetch_array($admin_res);\n $admin_access = intval($admin_data[\"access\"]);\n if(!$admin_access){\n engine::error(401);\n return;\n }\n if(!empty($_GET[\"user_id\"])){\n $user_id = intval($_GET[\"user_id\"]);\n $query = 'SELECT * FROM `nodes_user` WHERE `id` = \"'.$user_id.'\"';\n $res = engine::mysql($query);\n $user = mysqli_fetch_array($res);\n if($user[\"id\"] == $_SESSION[\"user\"][\"id\"]){\n engine::error(401);\n return;\n }\n if(empty($user) || $user[\"id\"] == 1){\n engine::error(401);\n return;\n }\n if(!empty($_POST[\"flag\"])){\n if($admin_access != 2){\n engine::error(401);\n return;\n }\n $query = 'SELECT * FROM `nodes_admin`';\n $res = engine::mysql($query);\n while($data = mysqli_fetch_array($res)){ \n if(isset($_POST[\"permission_\".$data[\"id\"]])){\n $access = $_POST[\"permission_\".$data[\"id\"]];\n $id = $data[\"id\"];\n $query = 'SELECT * FROM `nodes_access` WHERE `user_id` = \"'.$user[\"id\"].'\" AND `admin_id` = \"'.$id.'\"';\n $r = engine::mysql($query);\n $d = mysqli_fetch_array($r);\n if(!empty($d)){\n $query = 'UPDATE `nodes_access` SET `access` = \"'.$access.'\" WHERE `id` = \"'.$d[\"id\"].'\"';\n engine::mysql($query);\n }else{\n $query = 'INSERT INTO `nodes_access`(admin_id, user_id, access) VALUES(\"'.$id.'\", \"'.$user[\"id\"].'\", \"'.$access.'\")';\n engine::mysql($query);\n }\n }\n }\n $query = 'SELECT * FROM `nodes_access` WHERE `user_id` = \"'.$user[\"id\"].'\" AND `access` > 0';\n $res = engine::mysql($query);\n $data = mysqli_fetch_array($res);\n if(!empty($data)) $flag = 1;\n else $flag = 0;\n $query = 'UPDATE `nodes_user` SET `admin` = \"'.$flag.'\" WHERE `id` = \"'.$user[\"id\"].'\"';\n engine::mysql($query);\n }\n $fout = '<div class=\"document640\"><br/>\n '.lang(\"Manage permission of\").' <b>'.$user[\"name\"].'</b> [<a href=\"mailto:'.$user[\"email\"].'\">'.$user[\"email\"].'</a>]<br/>\n <br/>\n <form method=\"POST\">\n <input type=\"hidden\" name=\"flag\" value=\"1\" />\n <div class=\"table\">\n <table width=100% id=\"table\">';\n \n $query = 'SELECT * FROM `nodes_admin`';\n $res = engine::mysql($query);\n while($data = mysqli_fetch_array($res)){\n $query = 'SELECT `access`.`access` FROM `nodes_access` AS `access` '\n . 'LEFT JOIN `nodes_admin` AS `admin` ON `admin`.`url` = \"'.$data[\"url\"].'\" '\n . 'WHERE `access`.`user_id` = \"'.$_SESSION[\"user\"][\"id\"].'\" '\n . 'AND `access`.`admin_id` = `admin`.`id`';\n $section_res = engine::mysql($query);\n $section_data = mysqli_fetch_array($section_res);\n $section_access = intval($section_data[\"access\"]);\n $query = 'SELECT * FROM `nodes_access` WHERE `user_id` = \"'.$user[\"id\"].'\" AND `admin_id` = \"'.$data[\"id\"].'\"';\n $r = engine::mysql($query);\n $d = mysqli_fetch_array($r);\n $access = intval($d[\"access\"]);\n if($section_access >= $access && $section_access != 0){\n $fout .= '<tr>\n <td align=left>'.lang($data[\"name\"]).'</td>\n <td>\n <select vr-control id=\"select-permission\" name=\"permission_'.$data[\"id\"].'\" class=\"input w280\">\n <option vr-control id=\"option-no-access\" value=\"0\" '.($access==0?'selected':'').'>'.lang(\"No access\").'</option>\n <option vr-control id=\"option-read-only\" value=\"1\" '.($access==1?'selected':'').'>'.lang(\"Read-only\").'</option>';\n if($section_access == 2){\n $fout .= '<option vr-control id=\"option-full-access\" value=\"2\" '.($access==2?'selected':'').'>'.lang(\"Full access\").'</option>';\n }\n $fout .= '\n </select>\n </td>\n </tr>';\n }\n }\n \n $fout .= '</table></div><br/>\n <input vr-control id=\"input-save-changes\" type=\"submit\" value=\"'.lang(\"Save changes\").'\" class=\"btn w280\" /><br/>\n <a vr-control id=\"back-to-access\" href=\"'.$_SERVER[\"DIR\"].'/admin/?mode=access\"><input type=\"button\" class=\"btn w280\" value=\"'.lang(\"Back to access\").'\" /></a>\n </form>\n </div>\n ';\n }else{\n if(!empty($_POST[\"delete\"])){\n if($admin_access != 2){\n engine::error(401);\n return;\n }\n $query = 'SELECT * FROM `nodes_user` WHERE `id` = \"'.intval($_POST[\"delete\"]).'\"';\n $res = engine::mysql($query);\n $user = mysqli_fetch_array($res);\n if($user[\"id\"] == $_SESSION[\"user\"][\"id\"]){\n engine::error(401);\n return;\n }\n if(empty($user) || $user[\"id\"] == 1){\n engine::error(401);\n return;\n }\n $query = 'DELETE FROM `nodes_access` WHERE `user_id` = \"'.$user[\"id\"].'\"';\n engine::mysql($query);\n $query = 'UPDATE `nodes_user` SET `admin` = 0 WHERE `id` = \"'.$user[\"id\"].'\"';\n engine::mysql($query);\n }\n $fout = '<div class=\"document640\">';\n if($_SESSION[\"order\"]==\"id\") $_SESSION[\"order\"] = \"name\";\n $arr_count = 0; \n $from = ($_SESSION[\"page\"]-1)*$_SESSION[\"count\"]+1;\n $to = ($_SESSION[\"page\"]-1)*$_SESSION[\"count\"]+$_SESSION[\"count\"];\n $query = 'SELECT `user`.* FROM `nodes_access` AS `access` '\n . 'LEFT JOIN `nodes_user` AS `user` ON `user`.`id` = `access`.`user_id` '\n . 'GROUP BY `user`.`id` '\n . 'ORDER BY `user`.`'.$_SESSION[\"order\"].'` '.$_SESSION[\"method\"].' '\n . 'LIMIT '.($from-1).', '.$_SESSION[\"count\"];\n $requery = 'SELECT COUNT(DISTINCT(`user`.`id`)) FROM `nodes_access` AS `access` '\n . 'LEFT JOIN `nodes_user` AS `user` ON `user`.`id` = `access`.`user_id` ';\n $table = '\n <div class=\"table\">\n <table width=100% id=\"table\">\n <thead>\n <tr>';\n $array = array(\n \"name\" => \"Name\",\n \"email\" => \"Email\",\n \"online\" => \"Last visit\"\n ); foreach($array as $order=>$value){\n $table .= '<th>';\n if($_SESSION[\"order\"]==$order){\n if($_SESSION[\"method\"]==\"ASC\") $table .= '<a vr-control id=\"table-order-'.$order.'\" class=\"link\" href=\"#\" onClick=\\'document.getElementById(\"order\").value = \"'.$order.'\"; document.getElementById(\"method\").value = \"DESC\"; submit_search_form();\\'>'.lang($value).'&nbsp;&uarr;</a>';\n else $table .= '<a vr-control id=\"table-order-'.$order.'\" class=\"link\" href=\"#\" onClick=\\'document.getElementById(\"order\").value = \"'.$order.'\"; document.getElementById(\"method\").value = \"ASC\"; submit_search_form();\\'>'.lang($value).'&nbsp;&darr;</a>';\n }else $table .= '<a vr-control id=\"table-order-'.$order.'\" class=\"link\" href=\"#\" onClick=\\'document.getElementById(\"order\").value = \"'.$order.'\"; document.getElementById(\"method\").value = \"ASC\"; submit_search_form();\\'>'.lang($value).'</a>';\n $table .= '</th>';\n }\n $table .= '\n <th></th>\n </tr>\n </thead>'; \n $res = engine::mysql($query);\n while($data = mysqli_fetch_array($res)){\n $arr_count++;\n if($data[\"online\"] > date(\"U\")-300) $online = '<center>'.lang(\"Online\").'</center>';\n else $online = date(\"d/m/Y\", $data[\"online\"]);\n if($data[\"id\"] != 1 && $admin_access == 2){\n if($data[\"id\"] != $_SESSION[\"user\"][\"id\"]){\n $select = '<select vr-control id=\"select-action-'.$arr_count.'\" class=\"input\" onChange=\\'if(confirm(\"'.lang(\"Are you sure?\").'\")){\nif(this.value==\"1\"){\n window.location=\"'.$_SERVER[\"DIR\"].'/admin/?mode=access&user_id='.$data[\"id\"].'\";\n}else if(this.value==\"2\"){\n $id(\"delete_id\").value = \"'.$data[\"id\"].'\";\n $id(\"query_form\").submit();\n}else{this.selectedIndex=0;} \n }\\'>'\n . '<option vr-control id=\"option-action-0\" value=\"0\">'.lang(\"Select an action\").'</option>'\n . '<option vr-control id=\"option-action-1\" value=\"1\">'.lang(\"Edit permission\").'</option>'\n . '<option vr-control id=\"option-action-2\" value=\"2\">'.lang(\"Delete from admin\").'</option>'\n . '</select>';\n }else{\n $select = \"\";\n }\n }else{\n if($data[\"id\"] == \"1\"){\n $select = \"<b>\".lang('Primary admin').\"</b>\";\n }else{\n $select = \"\";\n }\n }\n if($data[\"confirm\"]) $flag = '<input type=\"checkbox\" checked disabled />';\n else $flag = '<input vr-control id=\"input-checkbox-'.$data[\"id\"].'\" type=\"checkbox\" title=\"'.lang(\"Code\").': '.$data[\"code\"].'\" '\n . 'onClick=\\'document.getElementById(\"confirm_value\").value=\"'.$data[\"id\"].'\"; '\n . 'document.getElementById(\"confirm_form\").submit();\\' />';\n $table .= '<tr><td align=left class=\"nowrap\">'.$flag.'&nbsp;<a vr-control id=\"link-user-'.$data[\"id\"].'\" href=\"'.$_SERVER[\"DIR\"].'/account/inbox/'.$data[\"id\"].'\">'.$data[\"name\"].'</a></td>'\n . '<td align=left><a href=\"mailto:'.$data[\"email\"].'\">'.$data[\"email\"].'</a></td>'\n . '<td align=left>'.$online.'</td>'\n . '<td width=45 align=left>'.$select.'</td></tr>';\n }$table .= '</table>\n </div>\n <br/>';\n if($arr_count){\n $fout .= $table.'\n <form method=\"POST\" id=\"query_form\" onSubmit=\"submit_search();\">\n <input type=\"hidden\" name=\"page\" id=\"page_field\" value=\"'.$_SESSION[\"page\"].'\" />\n <input type=\"hidden\" name=\"count\" id=\"count_field\" value=\"'.$_SESSION[\"count\"].'\" />\n <input type=\"hidden\" name=\"order\" id=\"order\" value=\"'.$_SESSION[\"order\"].'\" />\n <input type=\"hidden\" name=\"method\" id=\"method\" value=\"'.$_SESSION[\"method\"].'\" />\n <input type=\"hidden\" name=\"reset\" id=\"query_reset\" value=\"0\" />\n <input type=\"hidden\" name=\"delete\" id=\"delete_id\" value=\"0\" />\n <div class=\"total-entry\">';\n $res = engine::mysql($requery);\n $data = mysqli_fetch_array($res);\n $count = $data[0];\n if($to > $count) $to = $count;\n if($data[0]>0){\n $fout.= '<p class=\"p5\">'.lang(\"Showing\").' '.$from.' '.lang(\"to\").' '.$to.' '.lang(\"from\").' '.$count.' '.lang(\"entries\").', \n <nobr><select vr-control id=\"select-pagination\" class=\"input\" onChange=\\'document.getElementById(\"count_field\").value = this.value; submit_search_form();\\' >\n <option vr-control id=\"option-pagination-20\"'; if($_SESSION[\"count\"]==\"20\") $fout.= ' selected'; $fout.= '>20</option>\n <option vr-control id=\"option-pagination-50\"'; if($_SESSION[\"count\"]==\"50\") $fout.= ' selected'; $fout.= '>50</option>\n <option vr-control id=\"option-pagination-100\"'; if($_SESSION[\"count\"]==\"100\") $fout.= ' selected'; $fout.= '>100</option>\n </select> '.lang(\"per page\").'.</nobr></p>';\n }$fout .= '\n </div><div class=\"cr\"></div>';\n if($count>$_SESSION[\"count\"]){\n $fout .= '<div class=\"pagination\" >';\n $pages = ceil($count/$_SESSION[\"count\"]);\n if($_SESSION[\"page\"]>1){\n $fout .= '<span vr-control id=\"previous_page\" onClick=\\'goto_page('.($_SESSION[\"page\"]-1).');\\'><a hreflang=\"'.$_SESSION[\"Lang\"].'\" href=\"#\">'.lang(\"Previous\").'</a></span>';\n }$fout .= '<ul>';\n $a = $b = $c = $d = $e = $f = 0;\n for($i = 1; $i <= $pages; $i++){\n if(($a<2 && !$b && $e<2)||\n ($i >=( $_SESSION[\"page\"]-2) && $i <=( $_SESSION[\"page\"]+2) && $e<5)||\n ($i>$pages-2 && $e<2)){\n if($a<2) $a++;\n $e++; $f = 0;\n if($i == $_SESSION[\"page\"]){\n $b = 1; $e = 0;\n $fout .= '<li class=\"active-page\">'.$i.'</li>';\n }else{\n $fout .= '<li vr-control id=\"page-'.$i.'\" onClick=\\'goto_page('.($i).');\\'><a hreflang=\"'.$_SESSION[\"Lang\"].'\" href=\"#\">'.$i.'</a></li>';\n }\n }else if((!$c||!$b) && !$f && $i<$pages){\n $f = 1; $e = 0;\n if(!$b) $b = 1;\n else if(!$c) $c = 1;\n $fout .= '<li class=\"dots\">. . .</li>';\n }\n }if($_SESSION[\"page\"]<$pages){\n $fout .= '<li vr-control id=\"next-page\" class=\"next\" onClick=\\'goto_page('.($_SESSION[\"page\"]+1).');\\'><a hreflang=\"'.$_SESSION[\"Lang\"].'\" href=\"#\">'.lang(\"Next\").'</a></li>';\n }$fout .= '\n </ul>\n </div>';\n }$fout .= '</form>\n <div class=\"clear\"></div>\n </div>';\n }else{\n $fout = '<div class=\"clear_block\">'.lang(\"Administrators not found\").'</div>';\n }\n if($admin_access == 2){\n $fout .= '\n <input vr-control id=\"input-add-admin\" type=\"button\" class=\"btn w280\" value=\"'.lang(\"Add new admin\").'\" onClick=\\'this.style.display=\"none\"; jQuery(\"#new_admin\").removeClass(\"hidden\");\\' />\n <div class=\"document320 hidden\" id=\"new_admin\">\n <select vr-control class=\"input w280\" id=\"admin_id\">';\n $query = 'SELECT * FROM `nodes_user` WHERE `ban` = 0 AND `admin` = 0';\n $res = engine::mysql($query);\n while($user = mysqli_fetch_array($res)){\n $fout .= '<option value=\"'.$user[\"id\"].'\">'.$user[\"name\"].' ['.$user[\"email\"].']</option>';\n }\n $fout .= '\n </select><br/>\n <input vr-control id=\"input-submit\" type=\"button\" class=\"btn w280\" value=\"'.lang(\"Submit\").'\" onClick=\\'window.location = \"'.$_SERVER[\"DIR\"].'/admin/?mode=access&user_id=\"+$id(\"admin_id\").value\\' />\n </div>\n ';\n }\n }\n return $fout;\n}", "title": "" }, { "docid": "d31d129386ec5865567f46c2965425a0", "score": "0.6294954", "text": "public static function getAccessLevel()\n {\n $userInstance = self::getInstance();\n return $userInstance->accessLevel;\n }", "title": "" }, { "docid": "b057e372b8abc2844a7072c46baadd70", "score": "0.6280385", "text": "function core($access_level) {\n $perms = array();\n switch ($access_level){\n case 'developer':\n // Path\n $perms[] = 'administer url aliases';\n\n // System\n $perms[] = 'administer site configuration';\n $perms[] = 'administer themes';\n $perms[] = 'access site in maintenance mode';\n $perms[] = 'access site reports';\n $perms[] = 'block IP addresses';\n\n case 'content editor':\n // System\n $perms[] = 'access administration pages';\n $perms[] = 'view the administration theme';\n\n // Path\n $perms[] = 'create url aliases';\n\n // Toolbar\n $perms[] = 'access toolbar';\n\n // Contextual\n $perms[] = 'access contextual links';\n\n break;\n default:\n drupal_set_message(t('@level not valid for @func', array(\n '@level' => $access_level,\n '@func' => __FUNCTION__,\n )\n ), 'error');\n }\n\n return $perms;\n}", "title": "" }, { "docid": "ed521e97925d08f7c44cdce6dfc857ca", "score": "0.6272167", "text": "public function authorize()\n {\n return Auth::user()->level > 1;\n }", "title": "" }, { "docid": "2a0a1a64f33067c4c03c19af16ab368c", "score": "0.62704575", "text": "public function getAccessLevel();", "title": "" }, { "docid": "425cb5ce03b14f938b6cd63e6ba180f9", "score": "0.6264315", "text": "function acf_current_user_can_admin() { }", "title": "" }, { "docid": "76d6710a7efb5853bb458bfd93de80e1", "score": "0.6259547", "text": "public function current_status_grants_access();", "title": "" }, { "docid": "24a2e9c1d047808205c6a5e4be24b2e1", "score": "0.625342", "text": "private function adminAuth()\n\t{\t\t\n\t\tif (Auth::User()->type !=\"admin\" && Auth::User()->type !=\"super admin\"){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6694e89657156bfd86823c0989256782", "score": "0.62529075", "text": "function adminLogged(){\n if(isset($_SESSION['admin'])){\n return 1;\n }else{\n return 0;\n }\n}", "title": "" }, { "docid": "9580e37d496c29d03b7f2ae35a960940", "score": "0.6252306", "text": "function authorised($page)\n {\n //if the page is viewable by anyone, or if a super admin user is signed in, then the page is authorised to be viewed\n if ($page[\"anonymousUser\"]||super_admin())\n return 1;\n else\n if ($page[$_SESSION[\"user\"][\"userType\"].\"User\"])\n return 1;\n else\n return 0; \n }", "title": "" }, { "docid": "9b5f2579e4b4fab2c45bf0a0ddb81319", "score": "0.62465954", "text": "function shopAdmin()\t{\n\t\t$admin=0;\n\t\tif ($GLOBALS['TSFE']->beUserLogin)\t{\n\t\t\tif (t3lib_div::_GP('update_code')==$this->conf['update_code'])\t{\n\t\t\t\t$admin= 1;\t\t// Means that the administrator of the website is authenticated.\n\t\t\t}\n\t\t}\n\t\treturn $admin;\n\t}", "title": "" }, { "docid": "1b08fc6181ee343d6cae9eceb124e812", "score": "0.62368685", "text": "function can_access($perms,$block=true)\n{\n $l=user('level');\n if(($l&$perms)!==$perms)\n\t{\n\t\t//stop there!\n\t\tif($block)\n\t\t{\n\t\t\tif(($l&PERM_USER)===PERM_USER){?><div class=\"alert alert-danger\"><b>Oh no!</b><br/>You don't have permissions to access this page.</div><?php\n\t\t\t}elseif(($l&PERM_DEMO)===PERM_DEMO){?><div class=\"alert alert-danger\"><b>This is a Restricted Area</b><br/>This page cannot be accessed in demo/read-only mode.</div><?php\n\t\t\t}else{?><div class=\"alert alert-error\"><a href='login?redir=<?php echo urlencode($_SERVER['REQUEST_URI']) ?>'>Please Login</a> to Continue</div><?php\n\t\t\t}\n\t\t\texit();\n\t\t}\n\t\treturn false;\n\t}\n\treturn true;//every thing fine.\n}", "title": "" }, { "docid": "5ebda55643e5ef790cfe60d21d57a975", "score": "0.62322426", "text": "public function access()\n {\n return $GLOBALS['BE_USER']->isAdmin();\n }", "title": "" }, { "docid": "5c4ed471da6e9fc2389a8e649be496d2", "score": "0.62315315", "text": "function sec_db_check_access($f_uid,$f_mod,$f_level,$f_dept=\"\")\r\n{\r\n\t$ret_var=-1;\r\n\tif(empty($f_uid) || $f_uid==\"\" ||$f_uid<=0)\r\n\t{\r\n\t\treturn NULL;\r\n\t}\r\n\t\t$DB= new ww_db;\r\n\r\n\t\t$sql=\"SELECT * FROM `system_rights`\r\n\t\t\t\t\tJOIN `system_webware` on `system_webware`.`id`=`system_rights`.`ww_id`\r\n\t\t\t\t\tWHERE `system_rights`.`user_id` = '$f_uid'\r\n\t\t\t\t\t AND `system_rights`.`level` = '$f_level' \";\r\n\t\t\tif($f_dept!=\"\")\t\t \r\n\t\t\t\t$sql.=\"\t AND `system_rights`.`dept` = '$f_dept' \";\r\n\t\t$sql.=\"\t\t\t AND `system_webware`.`name` = '$f_mod'\r\n\t\t\t\t\t\t\t \";\r\n\t//\techo \"<br> $sql <br>\"; exit();\r\n\t\t$res=$DB->query($sql);\r\n\t\t$num=$DB->numrows($res);\r\n\t\tif($num == 0)\r\n\t\t{\r\n\t\t\treturn $ret_var;\r\n\t\t}\r\n\t\tif($num == 1)\r\n\t\t{ \r\n\t\t\t\t$var=$DB->fetch_array($res);\r\n\t\t\t\t$ret_var=$var['access'];\r\n\t\t\t\treturn $ret_var;\r\n\t\t\t\r\n\t\t}\r\n\t\treturn;\r\n\t\r\n}", "title": "" }, { "docid": "bf90aa06774ffef182488d35cd3fabe7", "score": "0.6210488", "text": "public function getsubuser()\n {\n\t echo $this->Access->check('SubUser','read') ;\n\t if(!$this->Access->check('SubUser','read')){\n\t \t\techo \"not allow\";\n\t }else{\n\t \t\techo \"allow\";\n\t }\n }", "title": "" }, { "docid": "2b8cf8189966ba44a2b258884604d3ec", "score": "0.6206798", "text": "function page_require_level($require_level){\n global $session;\n $current_user = current_user();\n $login_level = find_by_groupLevel($current_user['user_level']);\n //if user not login\n if (!$session->isUserLoggedIn(true)):\n $session->msg('d','Por favor Iniciar sesión...');\n redirect('index.php', false);\n //if Group status Deactive\n elseif($login_level['group_status'] === '0'):\n $session->msg('d','Este nivel de usuario esta inactivo!');\n redirect('home.php',false);\n //cheackin log in User level and Require level is Less than or equal to\n elseif($current_user['user_level'] <= (int)$require_level):\n return true;\n else:\n $session->msg(\"d\", \"¡Lo siento! no tienes permiso para ver la página.\");\n redirect('home.php', false);\n endif;\n\n }", "title": "" }, { "docid": "f5b8e8328b59af36fae05907d0a666ed", "score": "0.6203798", "text": "public function current_auth_lvl()\n {\n if (!$this->user_is_authenticated())\n return $this->auth_disabled_level();\n return intval($this->session->userdata('user_auth'));\n }", "title": "" }, { "docid": "58aea382177132341daf71a31cd79319", "score": "0.6203297", "text": "public function is_admin() {\n if (session('admin_loggedin') && session('extranetUserName') == '') {\n //admin logged in as a wayfair employee\n $admin = 1;\n } else {\n //either admin logged in as agent or actual agent is logged in\n $admin = 0;\n }\n return $admin;\n }", "title": "" }, { "docid": "04cd045bc4966f63092cc646ea2d3cb2", "score": "0.6196653", "text": "function cot_auth_getlevel($userid, $maingroup = false)\n{\n\tglobal $db, $db_groups, $db_groups_users, $db_users;\n\tif ($maingroup)\n\t{\n\t\treturn (int)$db->query(\"\n\t\t\tSELECT grp_level FROM $db_groups\n\t\t\tINNER JOIN $db_users\n\t\t\tON user_maingrp = grp_id\n\t\t\tWHERE user_id = ?\n\t\t\", array($userid))->fetchColumn();\n\t}\n\telse\n\t{\n\t\treturn (int)$db->query(\"\n\t\t\tSELECT MAX(grp_level) FROM $db_groups\n\t\t\tWHERE grp_id IN (\n\t\t\t\tSELECT gru_groupid\n\t\t\t\tFROM $db_groups_users\n\t\t\t\tWHERE gru_userid = ?\n\t\t\t)\n\t\t\", array($userid))->fetchColumn();\n\t}\n}", "title": "" }, { "docid": "4abf8835091b32f589979f4c26bf43cf", "score": "0.6186973", "text": "function ModeratorsOnly() {\n\t\tglobal $tc_db, $smarty, $tpl_page;\n\t\t\n\t\tif ($this->CurrentUserIsAdministrator()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$results = $tc_db->GetAll(\"SELECT HIGH_PRIORITY `type` FROM `\" . KU_DBPREFIX . \"staff` WHERE `username` = '\" . $_SESSION['manageusername'] . \"' AND `password` = '\" . $_SESSION['managepassword'] . \"' LIMIT 1\");\n\t\t\tforeach ($results as $line) {\n\t\t\t\tif ($line['type'] != 2) {\n\t\t\t\t\texitWithErrorPage('That page is for moderators and administrators only.');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b33ac1e0c90223f74841a22a7d2076d1", "score": "0.61860776", "text": "public static function checkAdminUser() {\n\t\tif( !OC_User::isAdminUser(OC_User::getUser())) {\n\t\t\t$l = OC_L10N::get('lib');\n\t\t\tself::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "f7fa62864bbc60e36c7f80f42b30b268", "score": "0.6184526", "text": "function auth_access(&$args) {\r\n if ($_GET['admin'] == AUTH_ADMIN || $_GET['admin'] == AUTH_ADMIN_LOWER)\r\n return true;\r\n else if ($args[1] == AUTH_EXECUTION)\r\n return true;\r\n else\r\n header(\"HTTP/1.0 403 Forbidden\"); die('Authentication failure.');\r\n}", "title": "" }, { "docid": "161144c3c831af3e3209e6303b909f83", "score": "0.6182204", "text": "public function actionAdminRights()\n {\n $client_ip = arraySafeVal($_SERVER, 'REMOTE_ADDR');\n $valid = isAdminIP($client_ip);\n\n if (arraySafeVal($_SERVER, 'HTTP_X_FORWARDED_FOR', '') != '') {\n debuglog(\"admin access attempt via IP spoofing!\");\n $valid = false;\n }\n\n if ($valid)\n debuglog(\"admin connect from $client_ip\");\n else\n debuglog(\"admin connect failure from $client_ip\");\n\n user()->setState('yaamp_admin', $valid);\n\n $this->redirect(\"/site/common\");\n }", "title": "" }, { "docid": "c7f82901f797897c74b819565d0b5e3f", "score": "0.61803675", "text": "public static function isAdmin()\n {\n return (\\Auth::user()->user_type == 0) ? true : false;\n }", "title": "" }, { "docid": "7bd4b0956fcae265d66b3d34b028704e", "score": "0.61694324", "text": "function CurrentUserLevel() {\r\n\t\treturn $this->CurrentUserLevel;\r\n\t}", "title": "" }, { "docid": "9239f6c54e453f9ba7e1cdf62e357f99", "score": "0.61689293", "text": "function is_admin() {\r\n // - Its presence indicates the admin is logged in.\r\n // - Its value tells which admin for looking up their record.\r\n\tif (!isset($_SESSION['logged_in'])) {return false;}\r\n\tif (!isset($_SESSION['role'])) {return false;}\r\n\tif (is_super_admin() == true) {return true;}\r\n return ($_SESSION['logged_in'] and $_SESSION['role'] == 'ADMIN');\r\n }", "title": "" }, { "docid": "0481ee70f0ba3f092453843b453512e8", "score": "0.61654276", "text": "function checkPermission($usertype, $pagenm, $permission) {\n if ($usertype == 'a') {\n $flag = 0;\n $sadm_page = array('subadmin');\n if (in_array($pagenm, $sadm_page)) {\n $flag = 1;\n } else {\n $getval = getValFromTbl('id', 'adminrole', 'id IN (' . $permission . ') AND pagenm=\"' . $pagenm . '\"');\n if ($getval == 0)\n $flag = 1;\n }\n if ($flag == 1) {\n\n $_SESSION['notice'] = NOTPER;\n redirectPage(SITE_URL . get_language_url() . 'admin/dashboard');\n exit;\n }\n }\n}", "title": "" }, { "docid": "1f5635a85647a438177131063175802c", "score": "0.61648005", "text": "function is_GodAdmin(){\n $info = $this->_model->Auth_model->getInfo($this->userdata(\"aid\"));\n\t\t\n if($this->is_Login() && $info['radminsuper']==1 && $info['name']=='God'){\n return TRUE;\n }\n else{\n return FALSE;\n }\n }", "title": "" }, { "docid": "ec8c614520cd3fe3f810b1ed8aa84e14", "score": "0.616021", "text": "public function isAdmin();", "title": "" }, { "docid": "ec8c614520cd3fe3f810b1ed8aa84e14", "score": "0.616021", "text": "public function isAdmin();", "title": "" }, { "docid": "91e57884782f925495e8b2cf81713214", "score": "0.6157313", "text": "public function isAdmin()\r\n {\r\n return ($this->level == 9) ? true : false;\r\n }", "title": "" }, { "docid": "f4d29e83aa16363808d9888630184f6b", "score": "0.61551565", "text": "function permLevel($rankText = false)\n{\n global $dfPDO;\n global $user_data;\n\n if ($rankText == false) {\n if (logged_in()) {\n $sth = $dfPDO->query('SELECT rank FROM accounts WHERE user_id = ' . $user_data['user_id']);\n $rankText = $sth->fetch(PDO::FETCH_COLUMN);\n } else {\n return 0;\n }\n }\n switch ($rankText) {\n case 'WebDev':\n return 9;\n break;\n case 'Owner':\n return 8;\n break;\n case 'Admin':\n return 7;\n break;\n case 'Mod':\n return 6;\n break;\n case 'JrMod':\n return 5;\n break;\n case 'Expert':\n return 4;\n break;\n case 'Helper':\n return 3;\n break;\n case 'JrHelper':\n return 2;\n break;\n default:\n if (logged_in()) {\n return 1;\n } else {\n return 0;\n }\n }\n}", "title": "" }, { "docid": "2a6258bf5bfe4c4682dafb2a3ef86135", "score": "0.61522806", "text": "function access() {\n return user_access('administer comments');\n }", "title": "" }, { "docid": "2fc54a3745cfffe06c682da5fb741a43", "score": "0.6151427", "text": "function CurrentUserLevel() {\r\n\tglobal $Security;\r\n\treturn (isset($Security)) ? $Security->CurrentUserLevelID() : @$_SESSION[EW_SESSION_USER_LEVEL_ID];\r\n}", "title": "" }, { "docid": "25d467e2f1564251af260edd409bab78", "score": "0.61505866", "text": "protected function seclevel($modulename) {\n \n $levelofsec = decode(GetSessionParam('UserSecID'));\n \n $sec = GetGlobal('__DPCSEC');\n $sec2 = GetGlobal('__DPCSEC2');\t \n //echo count($loc),'>>>';\n\t //print_r($this->local_security);\n\t \n\t //EXPERIMENT\n\t //if (isset($sec2[$modulename])) {\n\t /*if ($sec2=$this->local_security[$modulename]) {\n \n $parts = explode(\";\",$sec2);\n\t echo \"<br>\",$modulename,\"<br>\",implode(',',$parts); \n\t if ($parts[$levelofsec+1] >= $parts[0])\n\t return 1;//allow\n\t else\n\t return 0;//deny\t \n\t }\n else*/if (isset($sec[$modulename])) {\n //echo \"<br>\",$modulename,\"<br>\"; \n $parts = explode(\";\",$sec[$modulename]);\n\t \n\t if ($parts[$levelofsec+1] >= $parts[0])\n\t return 1;//allow\n\t else\n\t return 0;//deny\n }\n\t \n return 1; //default allow\n }", "title": "" }, { "docid": "0a4b554d750e53da6e7be5c0e427f26b", "score": "0.6147411", "text": "public function isAdmin(){\n return $this->type === \"admin\";\n }", "title": "" }, { "docid": "f5f3cddcf2ea5e2cf3344ce35e6b8b02", "score": "0.61463845", "text": "public function getLevel(){\n return bbs_getuserlevel($this->userid);\n }", "title": "" }, { "docid": "f2af5fc1456b28ffd3621b0bd5561991", "score": "0.61455745", "text": "private function _permissions_check()\n\t{\n\t\t// super admins always can\n\t\t$can_access = (ee()->session->userdata('group_id') == '1');\n\n\t\tif ( ! $can_access)\n\t\t{\n\t\t\t// get the group_ids with access\n\t\t\t$result = ee()->db->select('module_member_groups.group_id')\n\t\t\t\t->from('module_member_groups')\n\t\t\t\t->join('modules', 'modules.module_id = module_member_groups.module_id')\n\t\t\t\t->where('modules.module_name',$this->name)\n\t\t\t\t->get();\n\n\t\t\tif ($result->num_rows())\n\t\t\t{\n\t\t\t\tforeach ($result->result_array() as $r)\n\t\t\t\t{\n\t\t\t\t\tif (ee()->session->userdata('group_id') == $r['group_id'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$can_access = TRUE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( ! $can_access)\n\t\t{\n\t\t\tshow_error(lang('unauthorized_access'), 403);\n\t\t}\n\t}", "title": "" }, { "docid": "c870825a0ceaeb86b592b624d5d05074", "score": "0.6143576", "text": "public static function getAccess()\n {\n /*\n ACCESS_GUEST - for guests only,\n ACCESS_ALL - everyone,\n ACCESS_MEMBER - only for registered users )\n */\n return self::ACCESS_ALL;\n }", "title": "" }, { "docid": "12816816e1b3562a675463b7d9eff727", "score": "0.6132715", "text": "public function access($minPrivilegeLevel){\n\t\t$minPrivilegeLevel=strtolower($minPrivilegeLevel);\n\t\t\n\t\tif(sessioned('permissions'))$_SESSION['permissions']=strtolower($_SESSION['permissions']);\n\t\telse $_SESSION['permissions']='x';\n\t\t\n\t\t$hierarchy='xuca';//hierarchy, from lowest to highest\n\t\t\n\t\tif(count($minPrivilegeLevel)!==1)error(\"Invalid permission level '$minPrivilegeLevel'\");\n\t\tif(!sessioned('email'))$nUser=0;\n\t\telse $nUser=strpos($hierarchy,$_SESSION['permissions']);\n\t\t$nAllowed=strpos($hierarchy,$minPrivilegeLevel);\n\t\t\n\t\tif($nUser===false)error(\"Invalid session permission level '{$_SESSION[\"permissions\"]}'\");\n\t\tif($nAllowed===false)error(\"Invalid input permission level '$minPrivilegeLevel'\");\n\t\t\n\t\telse return $nUser>=$nAllowed;\n\t}", "title": "" }, { "docid": "780d8bfecb83e6f417a78a56753db21a", "score": "0.61289346", "text": "private function checkIfIsAdmin()\n {\n \n if($this->get('security.context')->getToken()->getUser() != \"anon.\")\n {\n $user = $this->get('security.context')->getToken()->getUser();\n if($user->getAccessLvl() == 100)\n {\n \n return true;\n }\n else\n {\n \n return $this->redirect($this->generateUrl('torgovorot_torg_homepage'));\n }\n }\n else\n {\n return $this->redirect($this->generateUrl('torgovorot_torg_homepage'));\n }\n \n }", "title": "" }, { "docid": "649ebae7cbf19c8c75762806756b3cfa", "score": "0.61249757", "text": "public function isAdmin()\n\t{\n\t\treturn $this->userType->nom == \"Admin\";\n\t}", "title": "" }, { "docid": "db1578d50834fb99cc3856908b9627ad", "score": "0.6123999", "text": "function set_page_access($access_level) {\r\n\t\t$player_logged_in_id = false;\r\n\t\t$player_id = false;\r\n\t\t$game_id = false;\r\n\t\t$player = false;\r\n\t\t$game = false;\r\n\t\t\r\n\t\tif ($access_level == 'member' || $access_level == 'player' || $access_level == 'admin') {\r\n\t\t\t// Make sure the user is logged in\r\n\t\t\tif (!isset($_SESSION['player_logged_in'])) {\r\n\t\t\t\theader(\"Location: index.php?message=must_login&referer=\" . $_SERVER['REQUEST_URI']);\r\n\t\t\t\texit();\r\n\t\t\t} else {\r\n\t\t\t\t$player_logged_in_id = $_SESSION['player_logged_in'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($access_level == 'player' || $access_level == 'admin') {\r\n\t\t\t// Make sure there is a player_id or game_id in the query string\r\n\t\t\tif (!empty($_GET['game_id']) || !empty($_GET['player_id'])) {\r\n\t\t\t\tif (!empty($_GET['game_id'])) {\r\n\t\t\t\t\t$game_id = trim($_GET['game_id']);\r\n\t\t\t\t\t$game = games_by_id($game_id);\r\n\t\t\t\t}\r\n\t\t\t\tif (!empty($_GET['player_id'])) {\r\n\t\t\t\t\t$player_id = trim($_GET['player_id']);\r\n\t\t\t\t\t$player = players_by_id($player_id);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\theader(\"Location: access_denied.php?message=unauthorized\");\r\n\t\t\t\texit();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Make sure the game and player are valid\r\n\t\t\tif (!$player && !$game) {\r\n\t\t\t\theader(\"Location: access_denied.php?message=unauthorized\");\r\n\t\t\t\texit();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($access_level == 'admin') {\r\n\t\t\t// Make sure the user has admin access\r\n\t\t\tif ($_SESSION['player_access'] != 'admin') {\r\n\t\t\t\theader(\"Location: access_denied.php?message=admin_only\");\r\n\t\t\t\texit();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Set global variables to be accessed outside the function\r\n\t\t$GLOBALS['player_logged_in_id'] = $player_logged_in_id;\r\n\t\t$GLOBALS['player_id'] = $player_id;\r\n\t\t$GLOBALS['game_id'] = $game_id;\r\n\t\t$GLOBALS['player'] = $player;\r\n\t\t$GLOBALS['game'] = $game;\r\n\t}", "title": "" }, { "docid": "57cc20308223e2b5d5524e761c3f75df", "score": "0.6121326", "text": "public function setAccessLvl($username){\n\t\t\n\t\tinclude_once(\"core/lib/User.php\");\n\t\t\n\t\t//Setup user class\n\t\t$user = new User();\n\t\t\n\t\t//Collect the access level from the system\n\t\t$lvl = $user->accessLvl($username);\n\t\t\n\t\t//Sets the access level\n\t\t$_SESSION['access_lvl'] = $lvl;\n\t\t\n\t\t//Sets the username for reference\n\t\t$_SESSION['username'] = $username;\n\t}", "title": "" }, { "docid": "bde5b170efaaac2b600d93452df86078", "score": "0.610981", "text": "public static function mustBeAdmin(){\n $conn = Db::getConnection();\n $stm = $conn->prepare(\"SELECT * FROM Users WHERE username = :username\");\n $stm->bindValue(':username', $_SESSION['username']);\n $stm->execute();\n $user = $stm->fetch();\n //var_dump($user);\n if(!$user){\n header(\"Location: index.php\");\n } \n if ($user['admin']!=1){\n header(\"Location: index.php\");\n }\n \n }", "title": "" }, { "docid": "1a21a01265c8132ff00b2d4353de954f", "score": "0.6108299", "text": "public function checkAccessRights()\n {\n $myConfig = $this->getConfig();\n\n $blIsAuth = false;\n\n $sUserID = oxRegistry::getSession()->getVariable(\"auth\");\n\n // deleting admin marker\n oxRegistry::getSession()->setVariable(\"malladmin\", 0);\n oxRegistry::getSession()->setVariable(\"blIsAdmin\", 0);\n oxRegistry::getSession()->deleteVariable(\"blIsAdmin\");\n $myConfig->setConfigParam('blMallAdmin', false);\n //#1552T\n $myConfig->setConfigParam('blAllowInheritedEdit', false);\n\n if ($sUserID) {\n // escaping\n $oDb = oxDb::getDb();\n $sRights = $oDb->getOne(\"select oxrights from oxuser where oxid = \" . $oDb->quote($sUserID));\n\n if ($sRights != \"user\") {\n // malladmin ?\n if ($sRights == \"malladmin\") {\n oxRegistry::getSession()->setVariable(\"malladmin\", 1);\n $myConfig->setConfigParam('blMallAdmin', true);\n\n //#1552T\n //So far this blAllowSharedEdit is Equal to blMallAdmin but in future to be solved over rights and roles\n $myConfig->setConfigParam('blAllowSharedEdit', true);\n\n $sShop = oxRegistry::getSession()->getVariable(\"actshop\");\n if (!isset($sShop)) {\n oxRegistry::getSession()->setVariable(\"actshop\", $myConfig->getBaseShopId());\n }\n $blIsAuth = true;\n } else {\n // Shopadmin... check if this shop is valid and exists\n $sShopID = $oDb->getOne(\"select oxid from oxshops where oxid = \" . $oDb->quote($sRights));\n if (isset($sShopID) && $sShopID) {\n // success, this shop exists\n\n oxRegistry::getSession()->setVariable(\"actshop\", $sRights);\n oxRegistry::getSession()->setVariable(\"currentadminshop\", $sRights);\n oxRegistry::getSession()->setVariable(\"shp\", $sRights);\n\n // check if this subshop admin is evil.\n if ('chshp' == oxRegistry::getConfig()->getRequestParameter('fnc')) {\n // dont allow this call\n $blIsAuth = false;\n } else {\n $blIsAuth = true;\n\n $aShopIdVars = array('actshop', 'shp', 'currentadminshop');\n foreach ($aShopIdVars as $sShopIdVar) {\n if ($sGotShop = oxRegistry::getConfig()->getRequestParameter($sShopIdVar)) {\n if ($sGotShop != $sRights) {\n $blIsAuth = false;\n break;\n }\n }\n }\n }\n }\n }\n // marking user as admin\n oxRegistry::getSession()->setVariable(\"blIsAdmin\", 1);\n }\n }\n\n return $blIsAuth;\n }", "title": "" }, { "docid": "d33d4c9f43582797c5e7633a4561514f", "score": "0.60984707", "text": "function getRoleAccess($role){\n if($role==\"administrador\"){\n return 0;\n }else if($role==\"editor\"){\n return 1;\n }else{ // lector\n return -1;\n }\n}", "title": "" }, { "docid": "7ea4437fa066f797ef41a8664155d936", "score": "0.6094821", "text": "public function index(){\n if(Auth::user()->accesslevel == 1){\n echo 'you are logged in as Admin';\n }\n elseif (Auth::user()->accesslevel == 2) {\n echo 'you are logged in a Staff member';\n }\n elseif (Auth::user()->accesslevel == 3){\n return view('client.medhistory');\n }\n\n //return view('/');\n }", "title": "" }, { "docid": "63482946edd0f24c8579a4315aaebd88", "score": "0.6090056", "text": "function isAdmin()\n\t{\n\t\t$CI \t=& get_instance();\n\t\treturn $CI->session->userdata('usertype') == 'admin'? TRUE: FALSE;\n\t}", "title": "" }, { "docid": "9bbd1109b054de47d5135d8e89ab7e5c", "score": "0.60886407", "text": "function has_read_access($type)\n{\n // Allow people without a stored session to read\n $iUserLevel = (int) 0;\n $iStaffResort = (int) 0;\n $blnSponsor = FALSE;\n if (isset($GLOBALS[\"objSrcUser\"]))\n {\n $objSrcUser = &$GLOBALS[\"objSrcUser\"];\n $iUserLevel = $objSrcUser->get_stat(LEVEL);\n $iStaffResort = $objSrcUser->get_stat(ALLIANCE);\n if ($iStaffResort > 10)\n $iStaffResort = (int) 0;\n // Dragon Lair\n if (get_sponsor_badge($objSrcUser->get_userid()) != '')\n $blnSponsor = TRUE;\n }\n\n switch($type)\n {\n case 1: // staff101\n $iReqLevel = 2;\n $iReqResort = 0;\n break;\n case 4: // lno\n $iReqLevel = 3;\n $iReqResort = 2;\n break;\n case 5: // ops\n $iReqLevel = 3;\n $iReqResort = 3;\n break;\n case 6: // dev\n $iReqLevel = 3;\n $iReqResort = 1;\n break;\n default:\n $iReqLevel = 0;\n $iReqResort = 0;\n break;\n }\n\n // 1: allow admins,\n // 2: allow players+mods,\n // 3: Allow staff in their own forum,\n // 4: Allow sponsors in dragon forum\n if ($iUserLevel >= 5 ||\n ($iUserLevel >= $iReqLevel && $iReqResort == 0 && $type != 8) ||\n ($iUserLevel >= $iReqLevel && $iStaffResort == $iReqResort && $type != 8) ||\n ($blnSponsor == TRUE && $type == 8))\n return TRUE;\n else\n return FALSE;\n}", "title": "" }, { "docid": "2ea06394cc48b89d9e6e37459e31bec8", "score": "0.60850215", "text": "function adminOuSuperadmin()\n\t{\n\t\t$utilisateur = $this->utilisateur;\n\n\t\t$db_query = $this->db->prepare(\"SELECT statut FROM $this->tableAdmin WHERE pseudo = BINARY '$utilisateur' \");\n\t\t$db_query->execute();\n\t\t$verif = $db_query->fetch(PDO::FETCH_ASSOC);\n\t\t\n\t\tif($verif['statut'] == \"superAdmin\")\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "ff9d90a6a09c347f13afd4a7f6cc65d9", "score": "0.6082841", "text": "public function getPerm($pos){\n return ($this->userlevel & (1<<$pos))?1:0;\n }", "title": "" }, { "docid": "3d0fd53984403f18dd52790c8adc92ae", "score": "0.6077667", "text": "function permiso_administrador()\n {\n if($this->session->userdata('usuario_rol') != '1')\n {\n redirect('tpoadminv1/securecms/sin_permiso');\n }\n }", "title": "" }, { "docid": "2dc19b207f2be437394b0b655219a68a", "score": "0.6077424", "text": "function user_privileges(){\n\tif (isset($_SESSION['admin_id'])) {\n\t//check user authentication\n\tif($this->MDashboard->getRoalAuth($path='user_privileges',$_SESSION['user_role_id'])){\n\t//if true do nothing\n\t}else{\n\t$this->session->set_userdata('erroruseraccess', ' The user cannot access user privileges management page.');\t\n\tredirect('/admin/','location');\t\n\t}\n\t$data['main'] = 'admin/user/user_privileges';\n\t$data['title'] = \"Property Mgt System | Admin Dashboard\";\n\t$data['logo']=$this-> CompanyDetails-> getLogo(); //get company logo\n\t$data['feedcount'] = $this-> Admin_feedback-> feedbackCount();\n\t$data['feedhead'] = $this-> Admin_feedback-> feedheader();\n\t$data['orderscount'] = $this-> Admin_orders-> ordersCount();\n $data['reviewscount'] = $this-> Admin_store-> reviewsCount();\n\t$data['designordercount'] = $this-> Admin_design_orders-> designordersCount();\t\t\t\n\t\t//get the \"log in\" admin informations\n $data['user_data'] = $this-> MDashboard-> getUserInfo($_SESSION['admin_id']);\n\t$data['admin_userprivileges'] = $this->Admin_user-> getAllUserprivileges();\n\t$data['admin_userrole'] = $this->Admin_user-> getAllUserrole();\n\t//$data['admin_userprivilegesname'] = $this->Admin_user-> getAllUserprivilegesname();\n\t$data['admin_usermenu'] = $this->Admin_user-> getAllUsermenu();\n\t$this-> load-> vars($data);\n\t$this -> load -> view('admin/dashboard_template');\n\t}else{\n\tredirect('admin/login', 'location');\n\t}\n }", "title": "" } ]
a27aad9b7d63da5fc697651187655c7a
Permalinks for detail page END Ajax init
[ { "docid": "0f793b3484e4ebb38cc5b3f683d94de3", "score": "0.0", "text": "function test_ajax_scripts() {\n\n\nwp_localize_script( 'mainAuto_js', 'ajax', array(\n 'url' => admin_url( 'admin-ajax.php' )\n) );\n\n}", "title": "" } ]
[ { "docid": "82eae4dff1528df56a6df3adf0944955", "score": "0.67936033", "text": "public function setup_pageURL() {\n\t\t\t$pagenbr = Paginator::generate_pagenbr($this->pageurl);\n\t\t\t$this->pageurl->path = DplusWire::wire('config')->pages->ajax.\"load/sales-history/\";\n\t\t\t$this->pageurl->query->remove('display');\n\t\t\t$this->pageurl->query->remove('ajax');\n\t\t\t$this->paginationinsertafter = 'sales-history';\n\t\t\t$this->pageurl = Paginator::paginate_purl($this->pageurl, $pagenbr, $this->paginationinsertafter);\n\t\t}", "title": "" }, { "docid": "f04d97e10970f7ec0ad5077906daf199", "score": "0.5982176", "text": "function load_ajax_content() {\n // And must sanitize the data.\n $pid = intval($_POST['post_id']);\n $the_query = new WP_Query(array(\n 'p' => $pid\n ));\n\n if ($the_query->have_posts()) {\n while ( $the_query->have_posts() ) {\n $the_query->the_post();\n \n $title = get_the_title();\n $imageUrl = wp_get_attachment_url( get_post_thumbnail_id($post->ID), 'thumbnail' );\n $pageUrl = get_field('page_url');\n $getPostLink = get_post_permalink();\n $conceptNote = get_field('concept_note');\n\n $data = $title.\"~\".$getPostLink.\"~\".$conceptNote.\"~\".$imageUrl.\"~\".$pageUrl;\n\n }\n }\n else {\n \n $data = '<div id=\"postdata\">'.__('Didnt find anything', THEME_NAME).'</div>';\n }\n wp_reset_postdata();\n\n echo $data;\n die();\n}", "title": "" }, { "docid": "c37bf3c417186c346c7b9f3ee3840ab8", "score": "0.58966833", "text": "public function ajax_url() {\n\t\t?>\n\t\t<script type=\"text/javascript\">\n\t\t\tvar papi = papi || {};\n\t\t\tpapi.ajaxUrl = '/papi-ajax/';\n\t\t</script>\n\t\t<?php\n\t}", "title": "" }, { "docid": "3514b9da3b6697ecd834c83aeb09a27c", "score": "0.582533", "text": "function news_permalink_setup($id,$date,$tab,$section,$title,$profile='') {\n\tif(empty($id) || !is_numeric($id) || empty($date) || empty($tab) || empty($section) || empty($title)) return NULL;\n\n\t$return = array(); $url_array = array();\n\t$title_type = 'full article';\n\t$class_array = array('url','permalink','bookmark'); $rel_array = array('bookmark');\n\t$title_attr = '&#8220;'.$title.'&#8221;';\n\tif(strtolower($section)=='hot-topic' && !empty($profile)) {\n\t\t$url_array[] = $profile;\n\t\t$url_array[] = formatDate($date,'long-url');\n\t\t$url_array[] = $tab;\n\t\t//$return['link'] = $profile.formatDate($date,'long-url').$tab;\n\t\t$class_array[] = 'hot-topic';\n\t}\n\telseif(strtolower($section)=='eshot') {\n\t\t$url_array[] = 'eshots';\n\t\t$url_array[] = formatDate($date,'eshot-url');\n\t\t$url_array[] = $tab;\n\t\t//$return['link'] = '/eshots/'.formatDate($date,'eshot-url').$tab;\n\t\t$title_type = 'eshot';\n\t\t$class_array[] = 'eshot';\n\t}\n\telseif(strtolower($section)=='tags') {\n\t\t$url_array[] = 'news';\n\t\t$url_array[] = 'tags';\n\t\t$url_array[] = $tab;\n\t\t//$return['link'] = '/news/tags/'.$tab;\n\t\t$title_type = 'articles';\n\t\t$rel_array[] = 'tag';\n\t\t$title_attr = 'the tag &#8220;'.$title.'&#8221;';\n\t}\n\telse {\n\t\t//$url_array[] = 'news';\n\t\tif($section=='articles') $section = 'news';\n\t\t$url_array[] = $section;\n\t\t$url_array[] = formatDate($date,'long-url');\n\t\t$url_array[] = $tab;\n\t\t//$return['link'] = '/news/'.$section.formatDate($date,'long-url').$tab;\n\t}\n\t$link_title = 'Read the '.$title_type.' for '.$title_attr;\n\n\t$return['safe'] = $tab;\n\t$return['array'] = $url_array;\n\t$return['link'] = url_create($url_array);\n\t$return['identifier'] = 'id-'.$id.'-'.trim($tab,'/');\n\t$return['atom-id'] = 'tag:'.preg_replace('#http://(www.)?#','','http://creation.trovster.com').','.formatDate($date,'iso8601').':'.$return['link'];\n\t$return['anchor-not-closed-no-text'] = '<a href=\"'.$return['link'].'\"'.addAttributes($link_title,'',$class_array,$rel_array).'>';\n\t$return['anchor-not-closed'] = $return['anchor-not-closed-no-text'].$title;\n\t$return['anchor'] = $return['anchor-not-closed'].'</a>';\n\n\t$class_array[] = 'preview';\n\t$return['preview']['link'] = $return['link'].'?preview=true';\n\t$return['preview']['anchor-not-closed-no-text'] = '<a href=\"'.$return['preview']['link'].'\"'.addAttributes($link_title,'',$class_array,$rel_array).'>';\n\t$return['preview']['anchor-not-closed'] = $return['preview']['anchor-not-closed-no-text'].$title;\n\t$return['preview']['anchor'] = $return['preview']['anchor-not-closed'].'</a>';\n\n\t//$return['continue']['link'] = '/news/'.$section.$tab;\n\t//$return['continue']['anchor'] = '<a href=\"'.$return['continue']['link'].'\">'.$title.'</a>';\n\n\treturn $return;\n}", "title": "" }, { "docid": "9a7b05fc96a43eed22947241f6eac15d", "score": "0.582509", "text": "public function category_ajax() {\n $blog_model = $this->loadModel('blogmodel');\n $categoryUrl = URL_PARAMETER1;\n // $url_parameter1 = URL_PARAMETER1;\n if (!empty($categoryUrl)) {\n $onepost = $blog_model->getAllPostByCategory($categoryUrl);\n require 'application/views/blog/onecategory.php';\n } else {\n $categorys = $blog_model->getAllCategory();\n require 'application/views/blog/category.php';\n }\n // require 'application/views/_templates/' . TEMPLATE . '/footer.php';\n }", "title": "" }, { "docid": "343174896cae598e8009573d67ed15bd", "score": "0.5802132", "text": "function hype_print_portfolio_permalinks( $ajax_load = false, $page_number = 0, $terms = array() ) {\n $wp_query = hype_get_portfolio_posts( $ajax_load, $page_number, $terms );\n\n if ( $wp_query->have_posts() ) {\n while ( $wp_query->have_posts() ) {\n $wp_query->the_post();\n get_template_part( 'content', 'portfolio' );\n }\n }\n}", "title": "" }, { "docid": "d6db3f7c9b16b36b5bae86a0762ad10d", "score": "0.5766808", "text": "function misha_loadmore_ajax_handler(){\n\t$args = json_decode( stripslashes( $_POST['query'] ), true );\n\t$args['paged'] = $_POST['page'] + 1; // we need next page to be loaded\n\t$args['post_status'] = 'publish';\n \n\t// it is always better to use WP_Query but not here\n\tquery_posts( $args );\n \n\tif( have_posts() ) :\n \n\t\t// run the loop\n\t\twhile( have_posts() ): the_post();\n \n\t\t\t// look into your theme code how the posts are inserted, but you can use your own HTML of course\n\t\t\t// do you remember? - my example is adapted for Twenty Seventeen theme\n\t\t\tget_template_part( 'template-parts/post-loop');\n\t\t\t// for the test purposes comment the line above and uncomment the below one\n\t\t\t// the_title();\n \n \n\t\tendwhile;\n \n\tendif;\n\tdie; // here we exit the script and even no wp_reset_query() required!\n}", "title": "" }, { "docid": "bed9d0a2ea3e40529556784c3508c066", "score": "0.57580584", "text": "function sample_items_ajax_display() {\n global $data_index;\n\n // If a call to the API is made, execute thta API call\n if (isset($_GET[SAMPLE_ITEMS_AJAX_ID])) {\n return sample_items_ajax_api();\n }\n\n // Otherwise, get the id of the page and check if it is the right one\n $id = sample_items_ajax_get_page_id();\n\n if ($id == SAMPLE_ITEMS_AJAX_SLUG) {\n $data_index->title = sample_items_ajax_i18n('PLUGIN_TITLE');\n $data_index->content = sample_items_ajax_render_page();\n }\n}", "title": "" }, { "docid": "c5178e1a58ee1469faa9c8dab04e0684", "score": "0.5722523", "text": "function anime_add_pages() { ?>\n <script type=\"text/javascript\">\n jQuery(document).ready( function () { \n jQuery(\"#publishing-action input[name = 'publish']\").click(function(){\n var page_title = jQuery(\"input[name = 'post_title']\").val(); \n \n var data = {\n 'action': 'add_new_page',\n 'page_title': page_title\n };\n var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';\n $.post(ajaxurl, data, function(response) {\n }); \n });\n }); \n </script>\n<?php }", "title": "" }, { "docid": "ec5b453c8478fe77285715396e91170c", "score": "0.5668682", "text": "public function cat_ajax() {\n\n // data start\n $perpage = 4;\n $page = 1;\n if (!empty($_GET[\"page\"]) && $_GET[\"page\"] != 'undefined') {\n $page = $_GET[\"page\"];\n }\n $cateid = $_GET[\"cateid\"];\n\n // echo $page;\n $start = ($page - 1) * $perpage;\n if ($start < 0)\n $start = 0;\n\n $condition_array = array('status' => 'publish', 'FIND_IN_SET(\"' . $cateid . '\",blog_category_id)!=' => '0');\n $blog_detail = $this->common->select_data_by_condition('blog', $condition_array, $data = '*', $short_by = 'id', $order_by = 'desc', $limit = $perpage, $offset = $start, $join_str = array());\n $blog_detail1 = $this->common->select_data_by_condition('blog', $condition_array, $data = '*', $short_by = 'id', $order_by = 'desc', $limit = '', $offset = '', $join_str = array());\n\n if (empty($_GET[\"total_record\"])) {\n $_GET[\"total_record\"] = count($blog_detail1);\n }\n\n $blog_data = '';\n $blog_data .= '<input type = \"hidden\" class = \"page_number\" value = \"' . $page . '\" />';\n $blog_data .= '<input type = \"hidden\" class = \"catid\" value = \"' . $cateid . '\" />';\n $blog_data .= '<input type = \"hidden\" class = \"total_record\" value = \"' . $_GET[\"total_record\"] . '\" />';\n $blog_data .= '<input type = \"hidden\" class = \"perpage_record\" value = \"' . $perpage . '\" />';\n\n // data end\n\n foreach ($blog_detail as $blog) {\n\n $blog_data .= '<div class=\"blog_main_o\">';\n $blog_data .= '<div class=\"date_blog_left\">\n <div class=\"blog-date-change\">\n <div class=\"blog-month blog-picker\">\n <span class=\"blog_monthd\">';\n\n $date_time = new DateTime($blog['created_date']);\n $month = $date_time->format('M') . PHP_EOL;\n $blog_data .= $month;\n\n $blog_data .= ' </span>\n </div>\n <div>\n <span class=\"blog_mdate\">';\n\n $date = new DateTime($blog['created_date']);\n $blog_data .= $date->format('d') . PHP_EOL;\n\n $blog_data .= '</span>\n </div>\n <div class=\"blog-year blog-picker\">\n <span class=\"blog_moyear\" >';\n\n $year = new DateTime($blog['created_date']);\n $blog_data .= $year->format('Y') . PHP_EOL;\n\n $blog_data .= '</span>\n </div>\n </div>\n <div class=\"blog-left-comment\">\n <div class=\"blog-comment-count\">\n <a>';\n $condition_array = array('status' => 'approve', 'blog_id' => $blog['id']);\n $blog_comment = $this->common->select_data_by_condition('blog_comment', $condition_array, $data = '*', $short_by = 'id', $order_by = 'desc', $limit = 5, $offset, $join_str = array());\n $blog_data .= count($blog_comment);\n\n $blog_data .= '</a>\n </div>\n <div class=\"blog-comment\">\n <a>Comments</a>\n </div>\n </div>\n </div>\n <div class=\"date_blog_right\">\n <div class=\"blog_post_main\">\n <div class=\"blog_inside_post_main\">\n <div class=\"blog_main_post_first_part\">\n <div class=\"blog_main_post_img\">';\n $blog_data .= '<a target=\"_blank\" href=\"' .\n base_url('blog/' . $blog['blog_slug']) . '\"> <img src=\"' . base_url($this->config->item('blog_main_upload_path') . $blog['image']) . '\" alt=\"' . $blog['image'] . '\" ></a>';\n $blog_data .= '</div>\n </div>\n <div class=\"blog_main_post_second_part\">\n <div class=\"blog_class_main_name\">\n <span>\n <a target=\"_blank\" href=\"' . base_url('blog/' . $blog['blog_slug']) . '\">\n <h1>' . $blog['title'] . '</h1>\n </a>\n </span>\n </div>\n <div class=\"blog_class_main_by\">\n <span>\n </span>\n </div>\n <div class=\"blog_class_main_desc \">\n <span class=\"dot_span_desc\">';\n\n $num_words = 75;\n $words = array();\n $words = explode(\" \", $blog['description'], $num_words);\n $shown_string = \"\";\n\n if (count($words) == 75) {\n $words[74] = \" ...... \";\n }\n\n $shown_string = implode(\" \", $words);\n $blog_data .= $shown_string;\n\n $blog_data .= '</span>\n </div>\n <div class=\"blog_class_main_social\">\n <div class=\"left_blog_icon fl\">\n <ul class=\"social_icon_bloag fl\">\n <li>';\n\n $title = urlencode('\"' . $blog['title'] . '\"');\n $url = urlencode(base_url('blog/' . $blog['blog_slug']));\n $summary = urlencode('\"' . $blog['description'] . '\"');\n $image = urlencode(base_url($this->config->item('blog_main_upload_path') . $blog['image']));\n\n\n $blog_data .= '<a class=\"fbk\" id=\"facebook_link\" url_encode=\"' . $url . '\" url=\"' . base_url('blog/' . $blog['blog_slug']) . '\" title=\"Facebook\" summary=\"' . $summary . '\" image=\"' . $image . '\"> \n <span class=\"social_fb\"></span>\n </a>\n </li>\n <li>';\n\n\n $blog_data .= '<a href=\"javascript:void(0)\" title=\"Google +\" id=\"google_link\" url_encode=\"' . $url . '\" url=\"' . base_url('blog/' . $blog['blog_slug']) . '\">\n <span class=\"social_gp\"></span>\n </a>';\n\n $blog_data .= '<a href=\"javascript:void(0)\" title=\"linkedin\" id=\"linked_link\" url_encode=\"' . $url . '\" url=\"' . base_url('blog/' . $blog['blog_slug']) . '\">\n <span class=\"social_lk\"></span></a>\n </li>\n <li>';\n $blog_data .= '<a href=\"javascript:void(0)\" title=\"twitter\" id=\"twitter_link\" url_encode=\"' . $url . '\" url=\"' . base_url('blog/' . $blog['blog_slug']) . '\">\n <span class=\"social_tw\"></span></a>\n </li>';\n $blog_data .= '</ul>\n </div>';\n\n $blog_data .= '<div class=\"fr blog_view_link\">';\n $blog_data .= \"<a title='Read more' href='\" .base_url('blog/' . $blog['blog_slug']) . \"' target='_blank'> Read more <i class='fa fa-long-arrow-right' aria-hidden='true'></i>\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\";\n }\n\n $record = $_GET[\"total_record\"] / $perpage;\n\n if ($page > $record) {\n // $lod_message = '<button class=\"loadcatbutton\">No more blog available</button>'; \n } else {\n $lod_message = '<button class=\"catbutton\">Load More ... </button>';\n }\n\n echo json_encode(array(\n 'blog_data' => $blog_data,\n 'load_msg' => $lod_message\n ));\n }", "title": "" }, { "docid": "ad2a64f86c30ec8a3871114716ac939a", "score": "0.55900615", "text": "public function init_ajax() {\r\n\t\tif ( rgpost( 'view' ) == 'gf_results_' . $this->_slug ) {\r\n\t\t\trequire_once( GFCommon::get_base_path() . '/tooltips.php' );\r\n\t\t\trequire_once( 'class-gf-results.php' );\r\n\t\t\t$gf_results = new GFResults( $this->_slug, $this->get_results_page_config() );\r\n\t\t\tadd_action( 'wp_ajax_gresults_get_results_gf_results_' . $this->_slug, array( $gf_results, 'ajax_get_results' ) );\r\n\t\t\tadd_action( 'wp_ajax_gresults_get_more_results_gf_results_' . $this->_slug, array( $gf_results, 'ajax_get_more_results' ) );\r\n\t\t} elseif ( $this->method_is_overridden( 'get_locking_config' ) ) {\r\n\t\t\trequire_once( GFCommon::get_base_path() . '/includes/locking/class-gf-locking.php' );\r\n\t\t\trequire_once( 'class-gf-addon-locking.php' );\r\n\t\t\t$config = $this->get_locking_config();\r\n\t\t\tnew GFAddonLocking( $config, $this );\r\n\t\t}\r\n\r\n\t\tif ( $this->has_plugin_settings_page() && $this->current_user_can_any( $this->_capabilities_settings_page ) ) {\r\n\t\t\tadd_filter( 'plugin_action_links', array( $this, 'plugin_settings_link' ), 10, 2 );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "99bc394762dd1a048d3d3e7f0993adeb", "score": "0.55849487", "text": "function xbv_loadmore_ajax_handler() {\n\t$args = json_decode( stripslashes( $_POST['query'] ), true );\n\t$args['paged'] = $_POST['page'] + 1; // we need next page to be loaded\n\t$args['post_status'] = 'publish';\n \n\tquery_posts( $args );\n\n\tif( have_posts() ) :\n\t\twhile( have_posts() ): the_post();\n\t\t\tget_template_part( 'template-parts/archive/content', get_post_type() );\n\t\tendwhile;\n\tendif;\n die;\n}", "title": "" }, { "docid": "1b3b6416d0b1e0006cc1dfe27f68613d", "score": "0.55185246", "text": "public function init()\n {\n $pageSetup = new Application_Model_PageNavigation();\n\n // Get the action\n $action = Zend_Controller_Front::getInstance()->getRequest()->getActionName();\n\n if (!('sitemap' == $action)) {\n\n $this->view->adAllowed = 0x0;\n\n $pageAlias = $pageSetup->getPageByAlias($action);\n\n // Set the title and meta tags\n $this->view->headTitle($pageAlias['title']);\n $this->view->headMeta()->appendName('description', $pageAlias['desc'])\n ->appendName('keywords', $pageAlias['keywords'])\n ->appendHttpEquiv('Content-Type', $pageAlias['httpequiv']);\n\n $this->view->headScript()\n ->appendFile('/js/script.js')\n ->appendFile('/js/google-ana.js')\n ->appendFile('/js/syntaxhighlighter/scripts/XRegExp.js')\n ->appendFile('/js/syntaxhighlighter/scripts/shCore.js')\n ->appendFile('/js/syntaxhighlighter/scripts/shAutoloader.js')\n ->appendFile('/js/syntaxhighlighter/scripts/shBrushPhp.js')\n ->appendFile('/js/syntaxhighlighter/scripts/shBrushVb.js');\n $this->view->headLink()->appendStylesheet('/js/syntaxhighlighter/styles/shCore.css')\n ->appendStylesheet('/js/syntaxhighlighter/styles/shThemeDefault.css');\n $this->view->jQuery()\n ->addJavascriptFile('/js/jquery/lightbox/js/jquery.lightbox-0.5.min.js')\n ->addJavascriptFile('/js/jquery/jquery-ui-1.8.13.custom.min.js')\n ->addJavascriptFile('/js/lightbox.id.js')\n ->addJavascriptFile('/js/accordion.id.js')\n ->addStyleSheet('/js/jquery/lightbox/css/jquery.lightbox-0.5.css');\n }\n }", "title": "" }, { "docid": "4e9e1683a9c81820436665a5a74b7539", "score": "0.55112505", "text": "function init_quick($data) {\n parent::init_quick($data);\n if (empty($data->pageid)) {\n //if no pageid then the user is viewing a collection of blog entries\n $this->id = 0; //set blog id to 0\n }\n }", "title": "" }, { "docid": "5798fd2f621faf73913066e7bd98ce9a", "score": "0.55048877", "text": "public function init(){\n\n $this->view->addHelperPath(DIR_HELPER , 'View_Helper') ;\n $this->layout = $this->view->layout();\n $this->layout->setLayout( \"front/default\" ) ;\n $this->lang = $this->_getParam('lang', 'ru');\n $this->layout->lang = $this->lang;\n\n if ($this->_hasParam('reindex')){\n $this->_forward('reindex');\n }\n $id = $this->_getParam('id');\n $this->view->placeholder('id_page')->set($id);\n $this->_owner_page = $page = Pages::getInstance()->find($id)->current();\n\n if (!is_null($page)){\n if ($page->published==0){\n $this->_redirect('/404');\n }\n $options = PagesOptions::getInstance()->getPageOptions($id);\n }\n\t}", "title": "" }, { "docid": "0eb314586132da7ca1643c919d09e539", "score": "0.54969776", "text": "public function detail() {\n $news_slug = $this->uri->segment(3);\n if ($news_slug == \"\") {\n redirect(base_url() . \"invalidpage\");\n } else {\n $data[\"resultset\"] = $this->new_model->getIndividualNew($news_slug,'slug');\n }\n $data[\"master_title\"] = \"News Detail\";\n $data[\"master_body\"] = \"detail\";\n $this->load->theme('home_layout', $data);\n }", "title": "" }, { "docid": "43205e8c27c2fbc167910fe3f22eca81", "score": "0.5484609", "text": "private function __construct() {\n\t\t//add_filter( 'post_rewrite_rules', array( $this, 'add_permastructs' ) );\n\n\t\t// parse the generated links\n\t\t//add_filter( 'post_type_link', array( $this, 'parse_permalinks' ), 10, 4 );\n\n\t\tadd_action( 'wp_head', array( $this, 'add_css'), 40);\n\t\tadd_action( 'wp_footer', array( $this, 'add_js'), 40);\n\n\t}", "title": "" }, { "docid": "dc5c406ae7d289650c5cf2b9734265a0", "score": "0.5463998", "text": "public function ajax_find_posts() {\n\t\tif (\n\t\t\tdefined( 'DOING_AJAX' )\n\t\t\t&& DOING_AJAX\n\t\t\t&& isset( $_POST['cmb2_attached_search'], $_POST['retrieved'], $_POST['action'], $_POST['search_types'] )\n\t\t\t&& 'find_posts' == $_POST['action']\n\t\t\t&& ! empty( $_POST['search_types'] )\n\t\t) {\n\t\t\t// This is not working until we fix the user query bit.\n\t\t\tif ( ! empty( $_POST['query_users'] ) ) {\n\t\t\t\tadd_action( 'pre_get_users', array( $this, 'modify_query' ) );\n\t\t\t} else {\n\t\t\t\tadd_action( 'pre_get_posts', array( $this, 'modify_query' ) );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8a455fdfa2eadf7093faae9858b82a6c", "score": "0.54609835", "text": "function page()\r\n\t{\r\n\t\t//Load dynamic page content\r\n\t\t$content =& model::create('content');\r\n\t\tif(ctype_digit($this->params['url_params']))\r\n\t\t\t$content->find($this->params['url_params']);\r\n\t\telse\r\n\t\t\t$content->find_by_field('url_name',$this->params['url_params']);\r\n\t\t\r\n\t\tif($content->id == null)\r\n\t\t\t$content->find(ERROR_404_CONTENT_ID);\r\n\t\t\t\r\n\t\t$this->template_data['content'] = $content->fields_as_associative_array();\t\r\n\t\r\n\t\t$this->breadcrumb[] = array('page/'.$content->url_name => $content->title);\r\n\t}", "title": "" }, { "docid": "9227bf93de0a3f650efb0cd1ea495deb", "score": "0.5456575", "text": "function admin_index() {\n $this->checkSessionAdmin('Admin');\n $this->layout = 'admin';\n /* $pages = $this->Content->find('threaded',array(\n 'conditions'=>array(\n 'OR'=>array(\n array('parent_id'=>'0'),\n array('type'=>'3')\n \n )\n )\n )\n );*/ \n $pages = $this->Content->find('threaded');\n $this->set('pages',$pages);\n //echo '<pre>';print_r($pages);\n \n /*if(empty($pages)) {\n $this->Session->setFlash('There are no pages to display', 'default', array('class'=>'bad'));\n }else{\n $this->set('page_count', count($pages));\n $this->set('pages', $this->_getListDepth($pages));\n }*/\n }", "title": "" }, { "docid": "1aed6c72c82a7ab958a6c0480d043fc6", "score": "0.5424518", "text": "function ajax_handler_body() {\n\tlist( $client, $dir, $options ) = \\Sgdg\\Frontend\\Page\\get_context();\n\n\t$ret = array();\n\t// phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\tif ( isset( $_GET['path'] ) && '' !== $_GET['path'] ) {\n\t\t// phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t$ret['path'] = path_names( $client, explode( '/', sanitize_text_field( wp_unslash( $_GET['path'] ) ) ), $options );\n\t}\n\t// phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t$page = isset( $_GET['page'] ) ? max( 1, intval( $_GET['page'] ) ) : 1;\n\t$remaining = $options->get( 'page_size' ) * $page;\n\t$ret = array_merge( $ret, \\Sgdg\\Frontend\\Page\\get_page( $client, $dir, 0, $remaining, $options ) );\n\twp_send_json( $ret );\n}", "title": "" }, { "docid": "55f3dd1c3b54d0170f9e417095c9673c", "score": "0.541981", "text": "public function init()\n\t\t{\n\t\t\tif ($this->mCurrentPage == 'Albums'){\n\t\t\t\t//$this->mAlbums = Collection::GetAlbums();\t\n\t\t\t\t$this->mAlbums = Collection::GetAlbumsInCollection($this->mPage,$this->mrTotalPages);\n\t\t\t\t$basicURL = '?op=' . $_SESSION['CurrentPage'];\n\t\t\t\t\t\t\t\t\n\t\t\t\tif ($this->mrTotalPages > 1){\n\t\t\t\t\t// Build the Next link\n\t\t\t\t\tif ($this->mPage < $this->mrTotalPages)\t\t\t\t\t{\n\t\t\t\t\t\t$nextPage = $this->mPage + 1;\n\t\t\t\t\t\t$this->mLinkToNextPage = $basicURL. '&Page=' . $nextPage;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// TODO: Build the Previous link\n\t\t\t\t\tif ($this->mPage > 1)\t\t\t\t\t{\n\t\t\t\t\t\t$nextPage = $this->mPage - 1;\n\t\t\t\t\t\t$this->mLinkToPreviousPage = $basicURL. '&Page=' . $nextPage;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t// Build links to all pages\n\t\t\t\tfor ($i = 1; $i <= $this->mrTotalPages; $i++) {\n\t\t\t\t\t$this->mAlbumListPages[] = $basicURL. '&Page=' . $i; \n\t\t\t\t}\n\t\t\n\t\t\t\t\n\t\t\t} elseif ($this->mCurrentPage == 'Home')\t{\n\t\t\t\t$this->mAlbums = Collection::GetLatestAlbums();\t\t\n\t\t\t} elseif ($this->mCurrentPage == 'Details') {\n\t\t\t\t//$this->mAlbums = Collection::GetArtistAlbums();\t\n\t\t\t\t\n\t\t\t\t$artist = Collection::GetAlbumArtist($this->mAlbumID);\n\t\t\t\t$this->mAlbums = Collection::GetArtistAlbums($artist);\t\t\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "016dc4c3d143b73fa0d6ac2e3ae252e0", "score": "0.53888166", "text": "public function admin_pages() {\n\t\n\t}", "title": "" }, { "docid": "7e1c3ae2b1ee7067c37cb05edde35be7", "score": "0.536798", "text": "private function parseUrl () {\r\n\t\tif(!$this->isLoggedIn()) {\r\n\t\t\t$this->includeLogin();\r\n\t\t\texit();\r\n\t\t}\r\n\r\n\t\t$page = $_GET['page'];\r\n\t\tif($page == 'logout') {\r\n\t\t\tplugin('admin_logout');\r\n\t\t}\r\n\r\n\t\tif(empty($page)) {\r\n\t\t\t$page = Settings::get('admin', 'homepage', true);\r\n\t\t\t$_GET['page'] = $page;\r\n\t\t}\r\n\r\n\t\t$this->current = $page;\r\n\t}", "title": "" }, { "docid": "35aeca60ff27ad85b651a7af53ba8661", "score": "0.5367308", "text": "public function __construct() {\n\t\tif (!ci()->input->is_ajax_request()) {\n\t\t\t/* create a new page request if not ajax (ie in page requests) */\n\t\t\tself::$token_set = sha1(uniqid());\n\n\t\t\t/* save it for each ajax request */\n\t\t\tci()->session->set_userdata('widget_token',self::$token_set);\n\t\t} else {\n\t\t\tself::$token_set = ci()->session->userdata('widget_token');\n\t\t}\n\n\t\t/*\n\t\tadd it to a page variable incase we want to add it manually\n\t\tadd the dynamic ajax requester\n\t\t*/\n\t\tci()->page\n\t\t\t->data('widget_token',self::$token_set)\n\t\t\t->script('$(function(){$(\\'command\\').each(function(){var t=this;$.post(\\''.$this->handler_url.'\\',{\"command\":$(this).wrap(\\'<span>\\').parent().html()},function(responds){$(t).parent().html(responds);});});});');\n\t}", "title": "" }, { "docid": "59653a07daf1dcd71a13be6603eca0f7", "score": "0.53594786", "text": "function NAMESPACE_get_all_pages() {\n\tglobal $post;\n\t$is_ajax = 1;\n\n\t$post_array = [];\n\t$posts = NAMESPACE_get_posts('page');\n\n\tforeach ( $posts as $post ) : setup_postdata( $post );\n\t\tob_start();\n\t\t\tinclude( locate_template( 'template-parts/content-page.php'));\n\t\t$buffer = ob_get_clean();\n\n\t\t$post_array['post-' . get_the_ID()] = $buffer;\n\tendforeach;\n\n\techo json_encode($post_array);\n\n\tdie();\n}", "title": "" }, { "docid": "a11bce535c0380a02c830be858642563", "score": "0.5357689", "text": "function parse_data($posts) {\n foreach ($posts as $post) {\n $post->url = get_permalink($post->ID);\n $post->edit_url = get_admin_url() . 'post.php?post=' . $post->ID . '&action=edit';\n }\n return $posts;\n}", "title": "" }, { "docid": "a4c8b97440d823e33870587683e8cbaa", "score": "0.53469414", "text": "function xbv_ajax_scripts() { \n //* For Ajax / Load more\n global $wp_query; \n wp_register_script( 'xbv_ajax', get_stylesheet_directory_uri() . '/assets/scripts/ajax.js', array('jquery'), rand(10,1000), 1 );\n \n // Variables for Load more\n wp_localize_script( 'xbv_ajax', 'xbv_default_params', array(\n 'ajaxurl' => site_url() . '/wp-admin/admin-ajax.php' // WordPress AJAX\n ) );\n\n // Variables for Load more\n wp_localize_script( 'xbv_ajax', 'xbv_loadmore_params', array(\n 'ajaxurl' => site_url() . '/wp-admin/admin-ajax.php', // WordPress AJAX\n 'posts' => json_encode( $wp_query->query_vars ), // Loop variables\n 'current_page' => get_query_var( 'paged' ) ? get_query_var('paged') : 1,\n 'max_page' => $wp_query->max_num_pages\n ) );\n\n wp_enqueue_script( 'xbv_ajax' );\n //* End Ajax / Load more\n}", "title": "" }, { "docid": "dc37329e67bd2d7daa4a8f088557a0f7", "score": "0.5338512", "text": "private function initPage() {\n\t\t$loans = SettingsServices::getLoans(VCDUtils::getUserID(), false);\n\t\t$movieList = $this->doGetMyMovieList($loans);\n\t\t\n\t\t$results = array();\n\t\tforeach ($movieList as $obj) {\n\t\t\t$results[$obj->getId()] = $obj->getTitle() . ' / ' . $obj->showMediaTypes();\n\t\t}\n\t\t$this->assign('myMovieList',$results);\n\t\t\n\t\t\n\t\t// Populate the borrowers list\n\t\t$this->doBorrowers(true);\n\t\t\n\t\t// Populate the movies in loan list\n\t\t$this->doLoanList($loans);\n\t\t\n\t}", "title": "" }, { "docid": "65a6971736bc4232d396606116f38c35", "score": "0.5327489", "text": "function loadmore_ajax_handler(){\n $args = json_decode( stripslashes( $_POST['query'] ), true );\n $args['paged'] = $_POST['page'] + 1; \n $args['post_status'] = 'publish';\n \n \n query_posts( $args );\n \n if( have_posts() ) :\n \n \n while( have_posts() ): the_post();\n get_template_part( 'blocks/default/loop', 'default' );\n \n endwhile;\n \n endif;\n die; \n}", "title": "" }, { "docid": "1be5b76aa5f5b624f6fc465827a756c5", "score": "0.5326222", "text": "function my_action_javascript() { ?>\r\n\t<script type=\"text/javascript\" >\r\n\tjQuery(document).ready(function($) {\r\n\t\tvar page = 2;\r\n\t\tvar post_count = jQuery(\"#posts\").data('count');\r\n\t\tvar ajaxurl = \"<?php echo admin_url('admin-ajax.php'); ?>\";\r\n\t\tjQuery(\"#load-post\").click(function(){\r\n\t\t\tvar data = {\r\n\t\t\t\t'action': 'my_action',\r\n\t\t\t\t'page': page\r\n\t\t\t};\r\n\t\tjQuery.post(ajaxurl, data, function(response) {\r\n\t\t\tjQuery(\"#posts\").append(response);\r\n\t\t\t\tif (post_count == page) {\r\n\t\t\t\t\tjQuery(\"#load-post\").hide();\r\n\t\t\t\t}\r\n\t\t\t\t\tconsole.log(page++);\t\r\n\t\t});\r\n\t });\r\n\t});\r\n\t</script> <?php\r\n}", "title": "" }, { "docid": "c49fe338d96df3f38e738ad2413b8989", "score": "0.5319171", "text": "public function initPage(): void\n {\n // Register settings.\n $this->registerSettings();\n\n // Set page as current.\n $this->setSettingsPage(self::SLUG);\n }", "title": "" }, { "docid": "723c61a68d8beec7c8a6b46bb97b5263", "score": "0.53106296", "text": "function foodbakery_import_setup_pages_handle( $obj ) {\r\n\t\t$homepage = get_page_by_path( $obj->homepage_slug );\r\n\r\n\t\tif ( ! empty( $homepage->ID ) ) {\r\n\t\t\tupdate_option( 'page_on_front', $homepage->ID );\r\n\t\t\tupdate_option( 'show_on_front', 'page' );\r\n\t\t\t$obj->action_return = true;\r\n\t\t} else {\r\n\t\t\t$obj->action_return = false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6e95574cc59d5332e1aad6647d776e22", "score": "0.5301253", "text": "function get_permalink( )\n {\n\t\t$thispage= get_post( );\n\t\tif (empty($thispage->post_name)) return '';\n\t\t$thispermalink = '/' . $thispage->post_name . '/';\n\t\tforeach( get_ancestors( $thispage->ID , 'page' ) as $thisancestorid ) {\n\t\t\t$thisancestor = get_post( $thisancestorid );\n\t\t\t$thispermalink = '/' . $thisancestor->post_name . $thispermalink;\t\t\n\t\t}\n\t\t\n\t\treturn $thispermalink;\n\t}", "title": "" }, { "docid": "cde15ae75ce794d8ef09704f4aa72a46", "score": "0.52840513", "text": "function init() {\r\n\t\tadd_filter( 'get_shortlink', array( $this, 'shortlink' ), 10, 4 );\r\n\r\n\t\t// Get the short URL for Sharedaddy\r\n\t\tadd_filter( 'sharing_permalink', array( $this, 'sharing_permalink' ), 10, 3 );\r\n\t}", "title": "" }, { "docid": "10e688a0e5f951958dd6bfbe82996aab", "score": "0.5282527", "text": "private function loadResourceForDetailPage()\n {\n $this->data['css'][] = asset('/vendor/bower_components/AdminLTE/plugins/select2/select2.min.css');\n $this->data['js'][] = asset('/vendor/bower_components/AdminLTE/plugins/select2/select2.full.min.js');\n }", "title": "" }, { "docid": "efdea0ef81010e357d8fd7044a6be986", "score": "0.5278252", "text": "function tryInitPage() {\n $content = $this->get(str_replace('_','/',$this->api->page));\n if(!$content)return;\n /*\n if(is_null($content))return;\n */\n\n\n if(!$this->target){\n $this->target=$this->api->layout ?: $this->api;\n }\n\n $page = $this->api->page_object = $this->target->add($this->page_class, ['title'=>$content['title']]);\n }", "title": "" }, { "docid": "515723845eb1108df29a1ca5063f57dd", "score": "0.527755", "text": "private function wikilink_callback($matches) {\r\n global $wpdb, $post, $pages;\r\n\r\n // $link: $title#$anchor\r\n // $title: the post title\r\n // $anchor: the user defined anchor or some heading\r\n // $desc: the displayed text\r\n $while = $matches[0];\r\n $link = $matches[1];\r\n $desc = $matches[2];\r\n list($title, $anchor) = split('#', $link); \r\n\r\n // set desc if desc is empty\r\n $desc = $desc ? $desc : $link;\r\n\r\n // compute url\r\n if ($title && $this->options['wpwiki_wiki_site']) {\r\n $url = $this->options['wpwiki_wiki_site'].$title.($anchor ? '#'.$anchor : $anchor);\r\n }\r\n else {\r\n // get the post nad post url\r\n if ($title) // link to other post\r\n $the_post = $this->get_post_from_title($title);\r\n else // link to this post\r\n $the_post = $post;\r\n \r\n if ($the_post == null) {\r\n \t$url = $this->options['wpwiki_error_page'];\r\n }\r\n else {\r\n \t$url = get_permalink($the_post->ID);\r\n\t\t\t\techo \"URL = \".$url;\r\n \t// append anchor to url\r\n \tif ($anchor) {\r\n\t // find anchor from headings\r\n \t $pagenum = 1;\r\n\r\n \t// determine the pages of the post\r\n \tif ($this->is_toc_id($anchor)) {\r\n\t $url .= '#'.$anchor;\r\n \t}\r\n \telse {\r\n\t $tmp = preg_replace_callback($this->regex['preformatted'][0], array($this, $this->regex['preformatted'][1]), $the_post->post_content);\r\n \t$the_pages = explode('<!--nextpage-->', $this->encode(array($tmp)));\r\n \tlist($anchor_txt, $anchor_num) = $this->split_anchor($anchor);\r\n\r\n\t foreach ($the_pages as $p) {\r\n \t// match headings\r\n \t$index = preg_match_all('/^(={1,6})\\s*'.preg_quote($anchor_txt).'\\s*\\1(?:\\s*|$)$/m', $p, $tmp);\r\n \tif ($index >= $anchor_num) {\r\n\t $anchor = $this->sanitize_id($anchor_num > 1 ? $anchor_txt.'_'.$anchor_num : $anchor_txt);\r\n \tbreak;\r\n \t}\r\n \telse if (preg_match('/id=\"'.preg_quote($anchor).'\"/', $p)) { // match user defined id\r\n\t break;\r\n \t}\r\n \t$anchor_num -= $index;\r\n \t$pagenum++;\r\n \t}\r\n\r\n \tif ($pagenum <= count($the_pages)) \r\n\t $url = $this->append_pagenum_anchor($url, $pagenum, $anchor);\r\n \t}\r\n \t}\r\n \t}\r\n }\r\n\r\n $ret = \"<a href=\\\"{$url}\\\">{$desc}</a>\";\r\n\r\n return $ret;\r\n }", "title": "" }, { "docid": "7bbe299ffb019bf3ad5ef2bb17623436", "score": "0.52660656", "text": "function netvlix_set_permalink(){\n\tglobal $wp_rewrite;\n $wp_rewrite->set_permalink_structure('/%category%/%postname%/');\n}", "title": "" }, { "docid": "64e1bb31fdd4cba6d5c0c1ef8f78d041", "score": "0.5255647", "text": "public function blog_ajax() {\n\n // data start\n $perpage = 4;\n $page = 1;\n if (!empty($_GET[\"page\"]) && $_GET[\"page\"] != 'undefined') {\n $page = $_GET[\"page\"];\n }\n // echo $page;\n $start = ($page - 1) * $perpage;\n if ($start < 0)\n $start = 0;\n\n $searchword = trim($this->input->get('searchword'));\n\n if($searchword){ \n\n $search_split = explode(\" \",$searchword);\n foreach ($search_split as $key => $value) {\n \n $search_condition = \"(title LIKE '%$value%')\";\n $contition_array = array('status' => 'publish');\n $bolg_data[] = $this->common->select_data_by_search('blog', $search_condition, $contition_array, $data = 'id', $sortby = '', $orderby = '', $limit = '', $offset = '');\n\n $search_condition = \"(description LIKE '%$value%')\";\n $contition_array = array('status' => 'publish');\n $bolg_data_des[] = $this->common->select_data_by_search('blog', $search_condition, $contition_array, $data = 'id', $sortby = '', $orderby = '', $limit = '', $offset = '');\n }\n $unique = array_merge($bolg_data, $bolg_data_des);\n $blog_unique1 = array_reduce($unique, 'array_merge', array()); \n $blog_unique = array_unique($blog_unique1, SORT_REGULAR);\n \n foreach ($blog_unique as $key => $value) {\n \n $condition_array = array('id' => $value['id']);\n $blog_val1[] = $this->common->select_data_by_condition('blog', $condition_array, $data = '*', $sort_by = 'id', $order_by = 'asc', $limit = '', $offset = '', $join_str = array());\n\n }\n $blog_detail1 = array_reduce($blog_val1, 'array_merge', array()); \n $blog_detail = array_slice($blog_detail1, $start, $perpage);\n\n\n }else{ \n $condition_array = array('status' => 'publish');\n $blog_detail = $this->common->select_data_by_condition('blog', $condition_array, $data = '*', $short_by = 'id', $order_by = 'desc', $limit = $perpage, $offset = $start, $join_str = array());\n $blog_detail1 = $this->common->select_data_by_condition('blog', $condition_array, $data = '*', $short_by = 'id', $order_by = 'desc', $limit = '', $offset = '', $join_str = array());\n }\n \n if (empty($_GET[\"total_record\"])) {\n $_GET[\"total_record\"] = count($blog_detail1);\n }\n\n $blog_data = '';\n $blog_data .= '<input type = \"hidden\" class = \"page_number\" value = \"' . $page . '\" />';\n $blog_data .= '<input type = \"hidden\" class = \"total_record\" value = \"' . $_GET[\"total_record\"] . '\" />';\n $blog_data .= '<input type = \"hidden\" class = \"perpage_record\" value = \"' . $perpage . '\" />';\n\n // data end\n\n foreach ($blog_detail as $blog) {\n\n $blog_data .= '<div class=\"blog_main_o\">';\n //$blog_data .= $blog['id'];\n $blog_data .= '<div class=\"date_blog_left\">\n <div class=\"blog-date-change\">\n <div class=\"blog-month blog-picker\">\n <span class=\"blog_monthd\">';\n\n $date_time = new DateTime($blog['created_date']);\n $month = $date_time->format('M') . PHP_EOL;\n $blog_data .= $month;\n\n $blog_data .= ' </span>\n </div>\n <div>\n <span class=\"blog_mdate\">';\n\n $date = new DateTime($blog['created_date']);\n $blog_data .= $date->format('d') . PHP_EOL;\n\n $blog_data .= '</span>\n </div>\n <div class=\"blog-year blog-picker\">\n <span class=\"blog_moyear\" >';\n\n $year = new DateTime($blog['created_date']);\n $blog_data .= $year->format('Y') . PHP_EOL;\n\n $blog_data .= '</span>\n </div>\n </div>\n <div class=\"blog-left-comment\">\n <div class=\"blog-comment-count\">\n <a>';\n $condition_array = array('status' => 'approve', 'blog_id' => $blog['id']);\n $blog_comment = $this->common->select_data_by_condition('blog_comment', $condition_array, $data = '*', $short_by = 'id', $order_by = 'desc', $limit, $offset, $join_str = array());\n\n //echo \"<pre>\"; print_r($blog_comment); die();\n $blog_data .= count($blog_comment);\n\n $blog_data .= '</a>\n </div>\n <div class=\"blog-comment\">\n <a>Comments</a>\n </div>\n </div>\n </div>\n <div class=\"date_blog_right\">\n <div class=\"blog_post_main\">\n <div class=\"blog_inside_post_main\">\n <div class=\"blog_main_post_first_part\">\n <div class=\"blog_main_post_img\">';\n $blog_data .= '<a target=\"_blank\" href=\"' .\n base_url('blog/' . $blog['blog_slug']) . '\"> <img src=\"' . base_url($this->config->item('blog_main_upload_path') . $blog['image'] .'?ver='.time()) . '\" alt=\"' . $blog['image'] . '\"></a>';\n $blog_data .= '</div>\n </div>\n <div class=\"blog_main_post_second_part\">\n <div class=\"blog_class_main_name\">\n <span>\n <a target=\"_blank\" href=\"' . base_url('blog/' . $blog['blog_slug']) . '\">\n <h1>' . $blog['title'] . '</h1>\n </a>\n </span>\n </div>\n <div class=\"blog_class_main_by\">\n <span>\n </span>\n </div>\n <div class=\"blog_class_main_desc \">\n <span class=\"dot_span_desc\">';\n\n $num_words = 75;\n $words = array();\n $words = explode(\" \", $blog['description'], $num_words);\n $shown_string = \"\";\n\n if (count($words) == 75) {\n $words[74] = \" ...... \";\n }\n\n $shown_string = implode(\" \", $words);\n $blog_data .= $shown_string;\n\n $blog_data .= '</span>\n </div>\n <div class=\"blog_class_main_social\">\n <div class=\"left_blog_icon fl\">\n <ul class=\"social_icon_bloag fl\">\n <li>';\n\n $title = urlencode('\"' . $blog['title'] . '\"');\n $url = urlencode(base_url('blog/' . $blog['blog_slug']));\n $summary = urlencode('\"' . $blog['description'] . '\"');\n $image = urlencode(base_url($this->config->item('blog_main_upload_path') . $blog['image']));\n\n $blog_data .= '<a class=\"fbk\" id=\"facebook_link\" url_encode=\"' . $url . '\" url=\"' . base_url('blog/' . $blog['blog_slug']) . '\" title=\"Facebook\" summary=\"' . $summary . '\" image=\"' . $image . '\"> \n <span class=\"social_fb\"></span>\n </a>\n </li>\n <li>';\n\n\n $blog_data .= '<a href=\"javascript:void(0)\" title=\"Google +\" id=\"google_link\" url_encode=\"' . $url . '\" url=\"' . base_url('blog/' . $blog['blog_slug']) . '\">\n <span class=\"social_gp\"></span>\n </a>';\n\n $blog_data .= '<a href=\"javascript:void(0)\" title=\"linkedin\" id=\"linked_link\" url_encode=\"' . $url . '\" url=\"' . base_url('blog/' . $blog['blog_slug']) . '\">\n <span class=\"social_lk\"></span></a>\n </li>\n <li>';\n $blog_data .= '<a href=\"javascript:void(0)\" title=\"twitter\" id=\"twitter_link\" url_encode=\"' . $url . '\" url=\"' . base_url('blog/' . $blog['blog_slug']) . '\">\n <span class=\"social_tw\"></span></a>\n </li>';\n $blog_data .= '</ul>\n </div>';\n $blog_data .= '<div class=\"fr blog_view_link\">';\n $blog_data .= '<a title=\"Read more\" href=\"' .base_url('blog/' . $blog['blog_slug']) . '\" target=\"_blank\"> Read more <i class=\"fa fa-long-arrow-right\" aria-hidden=\"true\"></i>\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>';\n }\n\n $record = $_GET[\"total_record\"] / $perpage;\n\n if ($page > $record) {\n // $lod_message = '<button class=\"loadmore\">No more blog available</button>'; \n } else {\n // $lod_message = '<img src=\" '.base_url('assets/images/loader.gif?ver='.time()).'\" alt=\"'.'LOADERIMAGE'.'\"/>';\n $lod_message = '<button class=\"loadmore\">See More ...</button>';\n }\n\n echo json_encode(array(\n 'blog_data' => $blog_data,\n 'load_msg' => $lod_message\n ));\n }", "title": "" }, { "docid": "da454dc2bb0950cbc4a11498c34b9a75", "score": "0.5255144", "text": "private function __construct() {\n \t//$this->posts_per_page = get_option('posts_per_page');\n \t\n\t\t$this->get_all_feeds();\n\t\t\n\t\t$this->display_html();\n\t\t\n\t\t\n\n\t}", "title": "" }, { "docid": "6c14e5b1c55b2bb07fdbb56db7e86006", "score": "0.5248776", "text": "function wp_link_robot_create_linkpage() {\r\n\tglobal $wpdb;\r\n\tglobal $wp_query;\r\n\tglobal $table_prefix;\r\n\t$output = '';\r\n\t$pageslugname = trim(get_option('wp_link_robot_pageslug'));\r\n\t\r\n\t$aUrl = explode('/', $_SERVER['REQUEST_URI']);\r\n\r\n \r\n if(in_array($pageslugname, $aUrl)){\r\n \r\n $show_category = ($wp_query->query_vars['link_robot_category'])?$wp_query->query_vars['link_robot_category']:$_GET['link_robot_category'];\r\n $show_subcategory = ($wp_query->query_vars['link_robot_subcategory'])?$wp_query->query_vars['link_robot_subcategory']:$_GET['link_robot_subcategory'];\r\n $show_link_catdesc = get_option('wp_link_robot_showcategorydescription');\r\n \r\n if( !isset( $show_category ) || ( $show_category=='' ) ){\r\n $all_cats = $wpdb->get_results(\"SELECT * FROM `\".$table_prefix.\"eblex_categories` WHERE `visible`=1\");\r\n $counts = $wpdb->get_results(\"\r\n SELECT \r\n `\".$table_prefix.\"eblex_categories`.`id`,\r\n count(`\".$table_prefix.\"eblex_links`.`title`) as `count` \r\n FROM `\".$table_prefix.\"eblex_categories` \r\n LEFT JOIN `\".$table_prefix.\"eblex_links` ON `\".$table_prefix.\"eblex_links`.`category`=`\".$table_prefix.\"eblex_categories`.`id` \r\n WHERE visible='1' AND `active`='1' AND `status`='1' GROUP BY `\".$table_prefix.\"eblex_links`.`category`\");\r\n }\r\n if(isset( $show_category ) && !isset( $show_subcategory )){\r\n $all_cats = $wpdb->get_results(\"SELECT * FROM `\".$table_prefix.\"eblex_categories` WHERE `visible`=1 AND `parent` IN (SELECT `id` FROM `\".$table_prefix.\"eblex_categories` WHERE `nicename`='\".$show_category.\"')\");\r\n $counts = $wpdb->get_results(\"\r\n SELECT \r\n `\".$table_prefix.\"eblex_categories`.`id`,\r\n count(`\".$table_prefix.\"eblex_links`.`title`) as `count` \r\n FROM `\".$table_prefix.\"eblex_categories` \r\n LEFT JOIN `\".$table_prefix.\"eblex_links` ON `\".$table_prefix.\"eblex_links`.`category`=`\".$table_prefix.\"eblex_categories`.`id` \r\n WHERE visible='1' AND `active`='1' AND `status`='1' GROUP BY `\".$table_prefix.\"eblex_links`.`category`\");\r\n }\r\n if(isset($all_cats) && !empty($all_cats)){\r\n $catcounts = array();\r\n foreach($counts as $count)\r\n $catcounts[$count->id] = $count->count;\r\n \r\n \r\n foreach($all_cats as $category){\r\n if(strlen($category->id) > 1) // we're not showing the root directory\r\n if((!isset($category->parent)||($category->parent=='')||($category->parent=='0'))||(isset( $show_category ) && !isset( $show_subcategory ))){\r\n \r\n $suboutput = ''; $gotsub = false;\r\n foreach($all_cats as $subcategory){\r\n if($subcategory->parent==$category->id){\r\n $gotsub = true;\r\n if(isset($catcounts[$subcategory->id])){\r\n $suboutput .= '<div class=\"catbox\">';\r\n \r\n $suboutput .= '&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"'.get_option('siteurl') . '/wp-content/plugins/wp-link-robot/images/folder.gif\" alt=\"&gt;\" width=\"16\" height=\"15\" border=\"0\"/>&nbsp;';\r\n if (isset($pageslugname)&&($pageslugname!=''))\r\n $suboutput .= '<a href=\"'.get_option('home').'/'.$pageslugname.'/'.$category->nicename . '/'.$subcategory->nicename . '\">'.$subcategory->title . '</a>';\r\n else\r\n if (strpos($_SERVER['REQUEST_URI'],'?')===false)\r\n $suboutput .= '<a href=\"'.$_SERVER['REQUEST_URI'].'?link_robot_category='.$category->nicename . '&link_robot_subcategory='.$subcategory->nicename . '\">'.$subcategory->title . '</a>';\r\n else\r\n $suboutput .= '<a href=\"'.$_SERVER['REQUEST_URI'].'&link_robot_category='.$category->nicename . '&link_robot_subcategory='.$subcategory->nicename . '\">'.$subcategory->title . '</a>';\r\n if (isset($catcounts[$subcategory->id])) $suboutput .= ' ('.$catcounts[$subcategory->id].')';\r\n \r\n $suboutput .= '<br />';\r\n $suboutput .= '</div>';\r\n }\r\n }\r\n }\r\n \r\n if(((strlen($suboutput)>0)&&($gotsub===true))||( isset($catcounts[$category->id]) )){ \r\n $output .= '<div class=\"catbox\">';\r\n $output .= '<img src=\"'.get_option('siteurl') . '/wp-content/plugins/wp-link-robot/images/folder.gif\" alt=\"&gt;\" width=\"16\" height=\"15\" border=\"0\"/>&nbsp;';\r\n if (isset($pageslugname)&&($pageslugname!='')){\r\n if (isset($catcounts[$category->id])) $output .= '<a class=\"catlink\" href=\"'.get_option('\thome').'/'.$pageslugname.'/'.$category->nicename . '\">'.$category->title . '</a>';\r\n else $output .= $category->title;\r\n }\r\n else\r\n if (strpos($_SERVER['REQUEST_URI'],'?')===false)\r\n $output .= '<a class=\"catlink\" href=\"'.$_SERVER['REQUEST_URI'].'?link_robot_category='.$category->nicename . '\">'.$category->title . '</a>';\r\n else\r\n $output .= '<a class=\"catlink\" href=\"'.$_SERVER['REQUEST_URI'].'&link_robot_category='.$category->nicename . '\">'.$category->title . '</a>';\r\n \r\n if (isset($catcounts[$category->id])) $output .= ' ('.$catcounts[$category->id].')';\r\n //else $output .= '(0)';\r\n \r\n if(($show_link_catdesc==\"1\")&&(!empty($category->description))) $output .= ' - '.stripslashes($category->description);\r\n $output .= '<br />';\r\n $output .= '</div>';\r\n $output .=$suboutput;\r\n }\r\n }\r\n }\r\n // place the links from root here:\r\n }\r\n\r\n //else\r\n if(!isset($show_category)||($show_category=='')) $show_category = 'root';\r\n {\r\n $show_page = 1;\r\n $links_per_page = get_option('wp_link_robot_linksperpage');\r\n if(isset($wp_query->query_vars['link_robot_page'])){\r\n $show_page = $wp_query->query_vars['link_robot_page'];\r\n } \r\n \r\n $show_link_desc = get_option('wp_link_robot_description');\r\n $show_link_url = get_option('wp_link_robot_url');\r\n \r\n $show_which = ($show_subcategory)?$show_subcategory:$show_category;\r\n $links_from = ($show_page-1)*$links_per_page;\r\n $links = $wpdb->get_results(\"SELECT \r\n `\".$table_prefix.\"eblex_categories`.`title` as `category_title`,\r\n `\".$table_prefix.\"eblex_categories`.`nicename` as `nicename`,\r\n `\".$table_prefix.\"eblex_links`.`title` as `link_title`,\r\n `\".$table_prefix.\"eblex_links`.`description` as `link_description`,\r\n `\".$table_prefix.\"eblex_links`.`url` as `link_url`\r\n FROM `\".$table_prefix.\"eblex_categories` \r\n LEFT JOIN `\".$table_prefix.\"eblex_links` ON `\".$table_prefix.\"eblex_links`.`category`=`\".$table_prefix.\"eblex_categories`.`id` \r\n WHERE `\".$table_prefix.\"eblex_categories`.`nicename`='\".$show_which.\"' AND `\".$table_prefix.\"eblex_links`.`active`='1' AND `\".$table_prefix.\"eblex_links`.`status`='1'\r\n LIMIT \".$links_from.\",\".$links_per_page);\r\n \r\n if($show_category != 'root'){\r\n if(isset($show_subcategory)){\r\n if (isset($pageslugname)&&($pageslugname!='')){\r\n $output .= '<br /><div class=\"catbox\"><a class=\"catlink\" href=\"'.get_option('\thome').'/'.$pageslugname.'/'.$show_category . '\">&laquo; Back</a></div>';\r\n }\r\n else\r\n if (strpos($_SERVER['REQUEST_URI'],'?')===false)\r\n $output .= '<br /><div class=\"catbox\"><a class=\"catlink\" href=\"'.$_SERVER['REQUEST_URI'].'?link_robot_category='.$show_category . '\">&laquo; Back</a></div>';\r\n else{\r\n $newurl = str_replace('&link_robot_subcategory='.$show_subcategory, '', $_SERVER['REQUEST_URI']);\r\n $newurl = str_replace('link_robot_subcategory='.$show_subcategory, '', $newurl);\r\n $output .= '<br /><div class=\"catbox\"><a class=\"catlink\" href=\"'.$newurl. '\">&laquo; Back</a></div>';\r\n }\r\n }\r\n else{\r\n if (isset($pageslugname)&&($pageslugname!='')){\r\n $output .= '<br /><div class=\"catbox\"><a class=\"catlink\" href=\"'.get_option('\thome').'/'.$pageslugname.'\">&laquo; Back</a></div>';\r\n }\r\n else\r\n if (strpos($_SERVER['REQUEST_URI'],'?')===false)\r\n $output .= '<br /><div class=\"catbox\"><a class=\"catlink\" href=\"'.$_SERVER['REQUEST_URI'].'\">&laquo; Back</a></div>';\r\n else{\r\n $newurl = str_replace('&link_robot_category='.$show_category, '', $_SERVER['REQUEST_URI']);\r\n $newurl = str_replace('link_robot_category='.$show_category, '', $newurl);\r\n $output .= '<br /><div class=\"catbox\"><a class=\"catlink\" href=\"'.$newurl.'\">&laquo; Back</a></div>';\r\n }\r\n }\r\n }\r\n $output .= '<br />';\r\n /* $dir_name = get_option('wp_link_robot_name');\r\n if($show_category != 'root') $output .= '<h2>Links inside: '.$links[0]->category_title . '</h2>';\r\n else $output .= '<h2>Links inside: '.$dir_name . '</h2>';\r\n */ \r\n $linkbox = 1;\r\n \r\n foreach($links as $link){\r\n if(strpos($link->link_url,'http://')===false) $linkurl = 'http://'.$link->link_url;\r\n else $linkurl = $link->link_url;\r\n $output .= '<div class=\"linkbox'.$linkbox.'\">';\r\n $output .= '<a class=\"plink\" target=\"_blank\" href=\"'.$linkurl.'\">'.$link->link_title.'</a>';\r\n $output .= '<br />';\r\n if ($show_link_url==\"1\") $output .= '<span class=\"purl\">'.$link->link_url.'</span><br />';\r\n if ($show_link_desc==\"1\") $output .= $link->link_description;\r\n $output .= '</div>';\r\n $output .= '<br />';\r\n $linkbox = ($linkbox)%2+1;\r\n }\r\n\r\n $show_pagination = true;\r\n $iLinkCount = intval($wpdb->get_var(\"SELECT count(*) FROM `\".$table_prefix.\"eblex_categories` \r\n LEFT JOIN `\".$table_prefix.\"eblex_links` ON `\".$table_prefix.\"eblex_links`.`category`=`\".$table_prefix.\"eblex_categories`.`id` \r\n WHERE `\".$table_prefix.\"eblex_categories`.`nicename`='\".$show_which.\"' AND `\".$table_prefix.\"eblex_links`.`active`='1' AND `\".$table_prefix.\"eblex_links`.`status`='1'\"));\r\n // show pagination at the bottom\r\n if($iLinkCount <= $links_per_page) $show_pagination = false;\r\n if($show_pagination){\r\n $strPageUrl = '/'.$pageslugname;\r\n if($show_category) $strPageUrl .= '/'.$show_category;\r\n if($show_subcategory) $strPageUrl .= '/'.$show_subcategory;\r\n $next_page = $show_page+1;\r\n $prev_page = $show_page-1;\r\n \r\n $output .= '<p>';\r\n // previous page arrow\r\n if($prev_page > 0) $output .= '<a href=\"'.$strPageUrl.'/'. $prev_page .'\">&laquo;</a>';\r\n $output .= \"&nbsp;&nbsp;\";\r\n\r\n // showing the page numbers \r\n for($k=0; $k < $iLinkCount/$links_per_page; $k++){\r\n $page = $k+1;\r\n $pagenumber = '<a href=\"'.$strPageUrl.'/';\r\n if ($page > 1) $pagenumber .= $page; // don't use number if poiting to the first page\r\n $pagenumber .= '\"';\r\n if ($page==$show_page) \r\n $pagenumber .= ' style=\"font-weight:bold\"'; // use bold on the actual page\r\n $pagenumber .= '>'.$page.'</a>';\r\n \r\n $output .= $pagenumber . \"&nbsp;&nbsp;\";\r\n } \r\n \r\n // next page arrow\r\n if (($next_page-1)*$links_per_page < $iLinkCount)\r\n $output .= '<a href=\"'.$strPageUrl.'/'. $next_page .'\">&raquo;</a>';\r\n $output .= '</p>';\r\n }\r\n\r\n }\r\n }\r\n\treturn $output;\r\n}", "title": "" }, { "docid": "58b42a5084f1aa2e3857bc459cf644e9", "score": "0.52478385", "text": "public function _paginateDetails($url='')\n\t{\n\t\tif($this->_ajax)\n\t\t{\n\t\t\t$href = \"javascript:void(0)\";\n\t\t}\n\t\t$this->_pageLinks = \"<div class=\\\"pagelinks\\\">\";\n\t\tif($this->_totalRecords > PAGE_LIMIT)\n\t\t{\n\t\t\tif(isset($this->_pageNo))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->_pageNo = 1;\n\t\t\t}\n\t\t if(!$url)\n\t\t\t $this->_currentPage();\n\t\t\telse\n\t\t\t $this->_currPage = $url;\n\t\t\t \n\t\t\tif($this->_pageNo == 1)\n\t\t\t{\t\t\t\n\t\t\t\t//$this->_pageLinks .= \"<span class=\\\"pageprevdead\\\">上頁 </span>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->_prevPage = $this->_pageNo - 1;\n\t\t\t\t$this->_pageLinks .= \"<a class=\\\"pageprevlink\\\" href='\".($href?$href:$this->_currPage.\"&page=\" . $this->_prevPage ).\"' r=\\\"\" . $this->_currPage .\"&page=\" . $this->_prevPage . \"\\\">上頁 </a>\";\n\t\t\t}\n\t\t\t$this->_totalPages = ceil($this->_totalRecords/PAGE_LIMIT);\n\t\t\t$this->_range = PAGE_RANGE;\n\t\t\tif($this->_range == 0 || $this->_range == \"\")\n\t\t\t{\n\t\t\t\t$this->_range = 7;\n\t\t\t}\n\t\t\t$this->_leftRange = max(1, $this->_pageNo - (($this->_range - 1)/2));\n\t\t\t$this->_rightRange = min($this->_totalPages, $this->_pageNo + (($this->_range - 1)/2));\n\t\t\tif(($this->_rightRange - $this->_leftRange) < ($this->_range - 1))\n\t\t\t{\n\t\t\t\tif($this->_leftRange == 1)\n\t\t\t\t{\n\t\t\t\t\t$this->_rightRange = min($this->_leftRange + ($this->_rightRange - 1), $this->_totalPages);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->_leftRange = max($this->_rightRange - ($this->_range - 1), 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($this->_leftRange > 1)\n\t\t\t{\n\t\t\t\t$this->_pageLinks .= \"..\"; \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->_pageLinks .= \"&nbsp;&nbsp;\";\n\t\t\t}\n\t\t\t\n\t\t\tfor($i=1;$i<=$this->_totalPages;$i++)\n\t\t\t{\n\t\t\t\tif($i == $this->_pageNo)\n\t\t\t\t{\n\t\t\t\t\t$this->_pageLinks .= \"<span class=\\\"pagenumdead\\\">$i</span>\"; \n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif($this->_leftRange<=$i && $i<=$this->_rightRange)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_pageLinks .= \"<a class=\\\"pagenumlink\\\" href='\".($href?$href:$this->_currPage.\"&page=\" . $i ).\"'\" . \"r=\\\"\" . $this->_currPage . \"&page=\" . $i . \"\\\">\" . $i . \"</a>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tif($this->_rightRange < $this->_totalPages)\n\t\t\t{\n\t\t\t\t$this->_pageLinks .= \"..\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->_pageLinks .= \"&nbsp;&nbsp;\";\n\t\t\t}\n\t\t\n\t\t\tif(($this->_totalRecords - (PAGE_LIMIT * $this->_pageNo)) > 0)\n\t\t\t{\n\t\t\t\t$this->_nextPage = $this->_pageNo + 1;\n\t\t\t\t$this->_pageLinks .= \"<a class=\\\"pagenextlink\\\" href='\".($href?$href:$this->_currPage.\"&page=\" . $this->_nextPage ).\"' r=\\\"\" . $this->_currPage . \"&page=\" . $this->_nextPage . \"\\\"> 下頁</a>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//$this->_pageLinks .= \"<span class=\\\"pagenextdead\\\"> 下頁</span>\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//$this->_pageLinks .= \"<span class=\\\"pageprevdead\\\">上頁 \" . \"</span>&nbsp;&nbsp;\";\n\t\t\t//$this->_pageLinks .= \"<span class=\\\"pagenextdead\\\"> \" . \" 下頁</span>&nbsp;&nbsp;\";\n\t\t}\n\t\t$this->_pageLinks .= \"</div>\";\n\t\treturn $this->_pageLinks;\n\t}", "title": "" }, { "docid": "9847b8270f1771c5404cab75a4900443", "score": "0.52424276", "text": "public function __construct()\n {\n $baseurl = explode('/',$_SERVER['REQUEST_URI']);\n $id = $baseurl[3];\n //load required models\n $categoryModel = new categoryModel();\n $additionalModel = new additionalModel();\n //create page data objects\n $pagedata = new stdClass();\n //get list of catagories\n $pagedata->catagories = $categoryModel->getListOfCategorys();\n\n // on post update\n if ($_POST) {\n // upsert locations\n $object = new stdClass();\n $object->id = empty($_POST[\"id\"]) ? null : htmlspecialchars($_POST[\"id\"]);\n $object->typeid = htmlspecialchars($_POST[\"typeid\"]);\n $object->label = htmlspecialchars($_POST[\"label\"]);\n $additionalModel->upsertAdditionalFields($object);\n // PRG Redirect\n header('Location: /admin/complete');\n exit;\n }\n $pagedata->title = \"Add Additional Fields\";\n $pagedata->details = \"Please update the details for your changes.\";\n // if not add ticket get ticket details\n if ($id !== \"add\") {\n $pagedata->title = \"Modify Additional Fields\";\n $pagedata->reportResults = $additionalModel->getAdditionalFieldsById($id);\n }\n\n //render page\n require_once \"views/adminModifyAdditionalView.php\";\n\n }", "title": "" }, { "docid": "25736484ccd4bdca5f93135e8062cf45", "score": "0.5239245", "text": "public function selectAjax() {\n if (isset($_GET['id'])) {\n $mapper = new NewsMapper();\n $news = $mapper->fetchById($_GET['id']);\n echo $news->getTitle() . \"|\" . $news->getText() . \"|\" . $news->getId();\n }\n }", "title": "" }, { "docid": "c8648d57da90c588b7b664f974f320c3", "score": "0.52381027", "text": "public static function ajax_tree()\n\t{\n\t\tetemplate_widget_tree::send_quote_json(self::tree_data(!empty($_GET['id']) ? $_GET['id'] : '/'));\n\t}", "title": "" }, { "docid": "cd16235ae74bc3af0c9eed2e919c826a", "score": "0.5237337", "text": "function get_footer() { ?>\n <script src=\"<?php echo(BLOG_FOLDER); ?>admin/js/jquery.query-object.js\"></script>\n <script>\t\t\n\t\tvar infinite = true;\n var next_page = <?php echo(((isset($_GET['page']) && is_numeric($_GET['page']) && $_GET['page'] > 1) ? $_GET['page'] : 1) + 1); ?>;;\n var loading = false;\n var no_more_posts = false;\n $(function() {\n function load_next_page() {\n\t\t\t\tvar qstring = $.query.set(\"page\", next_page).toString();\n $.ajax({\n url: qstring,\n success: function (res) {\n next_page++;\n var result = $.parseHTML(res);\n\t\t\t\t\t\tvar articles = $(result).find('div#allpageposts').find('article.post:not(.single)');\n if (articles.length < 1) {\n no_more_posts = true;\n } else {\n\t\t\t\t\t\t\t$('div#allpageposts').append(articles);\n }\n loading = false;\n }\n });\n }\n\t\t\t\n\t\t\tfunction checkScroll(){\n\t\t\t\tvar dist_from_bottom = $(document).height() - (window.innerHeight + $(window).scrollTop());\n\t\t\t\t\n\t\t\t\tif($(window).scrollTop() == 0 && dist_from_bottom == 0){\n\t\t\t\t\tloading = true;\n setTimeout(load_next_page,10);\n\t\t\t\t}\n\t\t\t\tconsole.log(dist_from_bottom);\n\t\t\t\tif (infinite && (loading != true && !no_more_posts) && dist_from_bottom <= 200 ) {\n // Sometimes the scroll function may be called several times until the loading is set to true.\n // So we need to set it as soon as possible\n loading = true;\n setTimeout(load_next_page,10);\n }\n\t\t\t}\n\n $(window).scroll(function() {\n checkScroll();\n });\n\t\t\tcheckScroll();\n });\n </script>\n<?php\n\n}", "title": "" }, { "docid": "0dee5120189ae7bc1d34ed2e7739a71d", "score": "0.5230202", "text": "function set_permalinks() {\n global $wp_rewrite;\n $wp_rewrite->set_permalink_structure( '/%category%/%postname%/' );\n}", "title": "" }, { "docid": "ef69f793fbc11366bd15b6fa44aba2fb", "score": "0.5227527", "text": "public function load_settings_page() {\n\t\twp_enqueue_style( 'tml-custom-user-links-admin', plugins_url( 'css/custom-user-links-admin.css', __FILE__ ) );\n\t\twp_enqueue_script( 'tml-custom-user-links-admin', plugins_url( 'js/custom-user-links-admin.js', __FILE__ ), array( 'wp-lists', 'postbox', 'jquery-ui-sortable' ) );\n\t}", "title": "" }, { "docid": "f659dbc1aeef9d0e7718261360e7b787", "score": "0.522535", "text": "function data() {\n\t\t return array(\n\t\t\t // Check against an odd redirect\n\t\t\t array( '/page/2/', '/page/2/', 20385 ),\n\t\t\t // The page designated as the front page should redirect to the front of the site\n\t\t\t array( '/front-page/', '/' ),\n\t\t\t array( '/blog-page/?paged=2', '/blog-page/page/2/' ),\n\t\t );\n\t}", "title": "" }, { "docid": "e9f356a6130bd84e1d6be4e22652c332", "score": "0.52223307", "text": "public static function addAjaxUrlJs()\n {\n ?>\n\n <script\n type=\"text/javascript\">var ajaxurl = '<?php echo admin_url('admin-ajax.php', is_ssl() ? 'admin' : 'http'); ?>';</script>\n <?php\n }", "title": "" }, { "docid": "c1e9c2f6ca955a714b8aff69f131cf20", "score": "0.5217888", "text": "public function index(){ \r\n //$this->data['about_us'] = $this->_get_about_us();\r\n echo $this->data['base_url'];exit;\r\n $this->portfolio_slider();\r\n }", "title": "" }, { "docid": "f205c7db5caac4d8bb3528b57071795f", "score": "0.5217738", "text": "function _fix_links_callback_post($m)\n\t{\n\t\treturn 'index.php?page=topicview&type=findpost&id='.strval(import_id_remap_get('post',strval($m[2]),true));\n\t}", "title": "" }, { "docid": "cecfa1749d5f8afb95d875c81c1c1c13", "score": "0.5208787", "text": "function propane($slug)\n {\n $this->layout = 'front_default'; \n $this->Session->write('selectedMenu','propane');\n $pageCont=$this->Content->find('all',array('conditions'=>array('slug'=>$slug)));\n \n \n \n $pageParent=$this->Content->findById($pageCont[0]['Content']['parent_id']);\n \n if($pageParent['Content']['parent_id']!=0)\n {\n $pageOfSubCat=$this->Content->findById($pageParent['Content']['parent_id']);\n $this->set('pageOfSubCat',$pageOfSubCat); \n }\n else\n {\n $pageOfSubCat=$this->Content->findById($pageParent['Content']['parent_id']);\n $this->set('pageOfSubCat',$pageOfSubCat); \n }\n \n if($pageCont[0]['Content']['type']==3)\n { \n if( $pageParent['Content']['parent_id']!=0 and $pageOfSubCat['Content']['id']==15)\n {\n $this->Session->write('selectedMenu','services');\n } \n else if($pageParent['Content']['parent_id']==0 and $pageParent['Content']['id']==28)\n {\n $this->Session->write('selectedMenu','ExistingCust');\n }\n else if($pageParent['Content']['parent_id']==0 and $pageParent['Content']['id']==63)\n {\n $this->Session->write('selectedMenu','appliances');\n } \n else if($pageParent['Content']['parent_id']==0 and $pageParent['Content']['id']==51)\n {\n $this->Session->write('selectedMenu','propane');\n } \n else if($pageParent['Content']['parent_id']==0 and $pageParent['Content']['id']==58)\n {\n $this->Session->write('selectedMenu','family');\n } \n }\n\n \n \n $this->set('pageParent',$pageParent);\n $this->set('pageContent',$pageCont[0]); \n \n \n }", "title": "" }, { "docid": "fc15cfe592b2c5c1136110e126b3ff9a", "score": "0.52065873", "text": "function createInfoLink() {\n $destination = $GLOBALS['TSFE']->id . ',' . $this->controller->configurations->get('ajaxPageType'); \n $link = tx_div::makeInstance('tx_lib_link');\n $link->destination($destination);\n $link->designator($this->getDesignator());\n $link->parameters(array('namespace' => $this->controller->parameters->get('namespace'),\n 'uid' => $this->controller->parameters->get('uid'),\n 'action' => 'ajax',\n 'request' => 'getInfo'));\n $link->noHash();\n\n return '<span id=\"siwiki-panel-info\"></span>\n <script type=\"text/javascript\">\n YAHOO.util.Event.onAvailable(\"siwiki-panel-info\", function(){\n var panel4 = new YAHOO.widget.Panel(\"panel4\", { visible:false, draggable:true, close:true, width: \"300px\" } );\n function onButtonClick(){\n YAHOO.util.Connect.asyncRequest(\"GET\", \"'.$link->makeUrl(false).'\", \n {\n success : function(o) {\n try {\n var messages = YAHOO.lang.JSON.parse(o.responseText);\n }\n catch (e) {\n //console.log(\"json parse error: e\");\n }\n var body = new String();\n for(key in messages) {\n body += key +\" \"+messages[key]+\"<br />\";\n }\n panel4.setHeader(\"%%%info%%%\");\n panel4.setBody(body);\n panel4.setFooter(\"%%%infoFooter%%%\");\n panel4.render(\"siwiki-panel-info\");\n },\n failure:function(o) {\n if(!YAHOO.util.Connect.isCallInProgress(o)) {\n //console.log(\"ajax connection failed\");\n }\n }\n }); \n YAHOO.util.Event.onContentReady(\"panel4\", function() { \n panel4.show();\n });\n } \n var info = new YAHOO.widget.Button({id:\"siwiki-menu-info\", title:\"%%%info%%%\", container:\"siwiki-menu-items\", onclick: { fn: onButtonClick } });\n });\n </script>'; \n }", "title": "" }, { "docid": "51ec8014091ff91ba7439b0fe9145ef1", "score": "0.5203678", "text": "function pmwAjaxUrl()\r\n{\r\n\treturn get_template_directory_uri() . '/requests/pmw_ajax.php';\r\n}", "title": "" }, { "docid": "bb8cc215f0e68e6007381933140cd7cc", "score": "0.52033556", "text": "public function page_init()\n {\n }", "title": "" }, { "docid": "1e7e61c747b50ea5f3ba37624c24c2fb", "score": "0.5202449", "text": "function fetch_random_projects_callback() {\n check_ajax_referer( 'my-special-string', 'security' );\n\n $args = array(\n 'post_type' => 'project',\n 'posts_per_page' => 3,\n 'orderby' => 'rand'\n );\n\n $posts = get_posts($args);\n foreach($posts as $post){\n $post->permalink = get_permalink($post->ID);\n $post->claim = get_field('content1',$post->ID);\n }\n echo json_encode($posts);\n\n wp_die();\n\n\n }", "title": "" }, { "docid": "ff1e10d080d84e43dad9edae15611b56", "score": "0.5202063", "text": "public function ajax_rel_search()\n\t{\n\t\t/*$stream_slug = $this->CI->input->post('stream_slug');\n\t\t$title_column = $this->CI->input->post('title_column');\n\n\t\t$results = $this->CI->db->limit(6)\n\t\t\t->select(\"id, {$title_column}\")\n\t\t\t->like($title_column, $this->CI->input->post('search_term'))\n\t\t\t->get($this->CI->config->item('stream_prefix').$stream_slug)\n\t\t\t->result();\n\n\t\techo '<ul class=\"streams_dropdown\">';\n\n\t\tforeach($results as $result):\n\n\t\techo '<li><a class=\"'.$stream_slug.'_autocomplete_item\" id=\"'.$result->id.'\" name=\"'.$result->$title_column.'\">'.$result->$title_column.'</a></li>';\n\n\t\tendforeach;\n\n\t\techo '<ul>';*/\n\t}", "title": "" }, { "docid": "2494b3f4d69503137c55237fe74aac77", "score": "0.51988906", "text": "function chaya_fetch_page($slug){\n \n\t$page = new WP_Query( array( \n \t\t'pagename' => $slug\n\t));\n\n \n\t// The Loop\n\tif ( $page->have_posts() ) :\n\t\twhile ( $page->have_posts() ) : $page->the_post();\n\t\t\tget_template_part('content');\n\t\tendwhile;\n\tendif;\n \n\t// Reset Post Data\n\twp_reset_postdata();\n}", "title": "" }, { "docid": "e3dfd18efa5a243653eaeec5534ce6ce", "score": "0.51955277", "text": "function init_album_review_pages()\n {\n $reviewpost = array(\n 'comment_status' => 'open',\n 'ping_status' => 'closed' ,\n 'post_date' => date('Y-m-d H:i:s'),\n 'post_name' => 'album_review',\n 'post_status' => 'publish' ,\n 'post_title' => 'Album Reviews',\n 'post_type' => 'page',\n );\n\n //insert page and save the id\n $newreview = wp_insert_post( $reviewpost, false );\n //save the id in the database\n update_option( 'newpage', $newreview);\n }", "title": "" }, { "docid": "ee5a4bff827e48169c2404f04c4bb74f", "score": "0.5192805", "text": "function on_load_page()\n {\n //wordpress specific js files\n wp_enqueue_script('common');\n wp_enqueue_script('wp-lists');\n wp_enqueue_script('postbox');\n wp_enqueue_script('jquery-form');\n\n //configuration sections\n add_meta_box('elasticsearch_server_configuration_section', 'Server Configurations', array(&$this, 'on_server_conf'), $this->pagehook, 'normal', 'core');\n add_meta_box('elasticsearch_indexing_operation_section', 'Indexing Operations', array(&$this, 'on_indexing_operations_conf'), $this->pagehook, 'normal', 'core');\n add_meta_box('elasticsearch_indexing_configuration_section', 'Indexing Configurations', array(&$this, 'on_indexing_conf'), $this->pagehook, 'normal', 'core');\n add_meta_box('elasticsearch_search_result_configuration_section', 'Search Result Configurations', array(&$this, 'on_search_result_conf'), $this->pagehook, 'normal', 'core');\n add_meta_box('elasticsearch_autocomplete_configuration_section', 'Autocomplete Configurations', array(&$this, 'on_autocomplete_conf'), $this->pagehook, 'normal', 'core');\n }", "title": "" }, { "docid": "23a38f74eab5ef83799ff26941bc7997", "score": "0.51901543", "text": "function TEMPLATE_blog_link()\n{\n $blog_id = get_option('page_for_posts' );\n\n echo get_permalink( $blog_id );\n}", "title": "" }, { "docid": "7adad25aad3261fcef788dd398d5d344", "score": "0.51857007", "text": "public function init()\n \t{\n \t\t// Initialize Post Type\n\t\t\t$this->slug = get_option(setting_portal);\n \t\t$this->template_url_init();\n \t}", "title": "" }, { "docid": "94981ef9ec2496588f5928c95b5c278a", "score": "0.517339", "text": "function testimonial() {\n\n $data['page_title'] = \"Testimonial\";\n\n $data['pages'] = $this->pages_model->get_Allpage('testimonials', 'status', 'Publish');\n \n// if ($link == 'content') {\n// $data['current'] = 7;\n// } else {\n// $data['current'] = 8;\n// }\n $data['current'] = 13;\n //$data['sub_current'] = 2;\n\n $this->template->load('template', 'testimonial_list', $data);\n }", "title": "" }, { "docid": "16050b0b38af67d82475555890fdd82a", "score": "0.5172953", "text": "function af_ajax_url_script() {\n\t\n\twp_localize_script('frontend-fields', 'af_ajax',\n\t\tarray( 'url' => admin_url('admin-ajax.php') )\n\t);\n}", "title": "" }, { "docid": "5c0f0282dc693d7fe894b5b52fb37a35", "score": "0.51727563", "text": "public function page_init()\n\t{ \n\t\tregister_setting(\n\t\t\t'leaguewp_options', // Option group\n\t\t\t'leaguewp_option', // Option name\n\t\t\tarray( $this, 'sanitize' ) // Sanitize\n\t\t);\n\n\t\tadd_settings_section(\n\t\t\t'homepage_section', // ID\n\t\t\t'Homepage', // Title\n\t\t\tnull, // Callback array( $this, 'print_section_info' )\n\t\t\t'leaguewp-setting-admin' // Page\n\t\t); \n\n\t\tadd_settings_field(\n\t\t\t'homepage_callout_text', // ID\n\t\t\t'Homepage Callout Text', // Title \n\t\t\tarray( $this, 'homepage_callout_text_callback' ), // Callback\n\t\t\t'leaguewp-setting-admin', // Page\n\t\t\t'homepage_section' // Section \n\t\t); \n\n\t\t// add_settings_field(\n\t\t// 'title', \n\t\t// 'Title', \n\t\t// array( $this, 'title_callback' ), \n\t\t// 'leaguewp-setting-admin', \n\t\t// 'homepage_section'\n\t\t// ); \n\t}", "title": "" }, { "docid": "27058a853b17ae0aa7a35e5c26ce1186", "score": "0.5172721", "text": "public function __construct() {\n\t\tparent::__construct(\n\t \t\t'sjs_single_post', // Base ID\n\t\t\t'Single Post/Page', // Name\n\t\t\tarray( 'description' => __( 'Include a single post or page in a widget area', 'text_domain' ), ) // Args\n\t\t);\n\t}", "title": "" }, { "docid": "5a5e6e15817e30fd5b67b0843fa5a8a4", "score": "0.51689315", "text": "public function init()\n\t{\n\t\t//is this a post display page? If so, then filter the content\n\t\tif( is_single() )\n\t\t\tadd_filter( 'the_content', array(&$this, 'render_foo_single_post' ) );\n\t}", "title": "" }, { "docid": "bcae06a24fd0537f7ab7813ad4d6c5e2", "score": "0.51681006", "text": "public function init()\n\t{\n\t\t// Get rewrite\n\t\t$sRewrite = Tools::getValue('cms_rewrite', false);\n\n\t\tif ($sRewrite)\n\t\t{\n\t\t\t$iIdCms = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('\n\t\t\t\tSELECT `id_cms`\n\t\t\t\tFROM `'._DB_PREFIX_.'cms_lang`\n\t\t\t\tWHERE `link_rewrite` = \\''.$sRewrite.'\\'\n\t\t\t\tAND `id_lang` = '.Context::getContext()->language->id\n\t\t\t);\n\n\t\t\tif ($iIdCms)\n\t\t\t\t$_GET['id_cms'] = $iIdCms;\n\t\t}\n\n\t\t// Get rewrite\n\t\t$sRewriteCategory = Tools::getValue('cms_category_rewrite', false);\n\n\t\tif ($sRewriteCategory)\n\t\t{\n\t\t\t$iIdCmsCategory = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('\n\t\t\t\tSELECT `id_cms_category`\n\t\t\t\tFROM `'._DB_PREFIX_.'cms_category_lang`\n\t\t\t\tWHERE `link_rewrite` = \\''.$sRewriteCategory.'\\'\n\t\t\t\tAND `id_lang` = '.Context::getContext()->language->id\n\t\t\t);\n\n\t\t\tif ($iIdCmsCategory)\n\t\t\t\t$_GET['id_cms_category'] = $iIdCmsCategory;\n\t\t}\n\n\t\tparent::init();\n\t}", "title": "" }, { "docid": "2a1d38b9805e380ad7a9cc28639128c4", "score": "0.516752", "text": "function front_page_listing($count,$uid,$sort_type,$option,$page=1) { //Return list of posts on front page\n\tglobal $db;\n\t$output = \"\";\t\n\t$default = DEFAULT_AVATAR;\n\t$posts = $db->array_load_all('POST');\n\t$posts = array_filter($posts, array(new Filter(1), 'filter_current'));\n\tif ($option == 'All courses') {\n\t\t$posts = $posts;\n\t} elseif ($option == 'My courses') {\n\t\t$posts = array_filter($posts, array(new Filter(true), 'filter_course_belonged'));\n\t} elseif ($option == 'Other courses') {\n\t\t$posts = array_filter($posts, array(new Filter(false), 'filter_course_belonged'));\n\t}\n\tsort($posts);\n\tfor ($p = 0; $p < count($posts); $p++) {\n\t\t$posts[$p]['comments_count'] = count_comments($posts[$p]['Post_ID']);\n\t}\n\tusort($posts,$sort_type);\n\t$pagination = new pagination($posts,$page,$count,5);\n\t$pagination->setShowFirstAndLast(true);\n\t$pagination->setMainSeperator(\"\");\n\t$posts = $pagination->getResults();\n\t$output .= '<div class=\"paging\">'.$pagination->getLinks().'</div>';\n\t$output .= '<div class=\"posts\">';\n\tfor ($i = 0; $i < count($posts); $i++) {\n\t\tif ($posts[$i]['Post_ID']) {\n\t\t\t$pid = $posts[$i]['Post_ID'];\n\t\t\t$output .= view_post($pid,$uid);\n\t\t\t$output .= ($i != (count($posts)-1)) ? '<hr>': \"\";\n\t\t}\n\t}\n\t$output .= '</div>';\n\t$output .= '<div class=\"paging\">'.$pagination->getLinks().'</div>';\n\t$output .= '<script>\n\t\t\t\tfunction turnPage(page) {\n\t\t\t\t\t$(\"#feeds\").load(\"/triggers/paging_front.php\",{count:'.$count.',option:\"'.$option.'\",page:page});\n\t\t\t\t}\n\t\t\t\t$(\"select#option\").change(function(){\n\t\t\t\t\t$(\"#feeds\").load(\"/triggers/filter_front.php\",{option:$(this).val()});\n\t\t\t\t});\n\t\t\t\t</script>';\n\treturn $output;\n}", "title": "" }, { "docid": "7c876aa754a40ddec0523f181a743800", "score": "0.5164416", "text": "public function lb_ajax_update_live_blog(){\n\t\tif(is_home()){\n\t\t\treturn;\n\t\t}\n\t\twp_reset_postdata();\n\t\t\n\t\t//TODO: Here is an odd issue, why the id is displaying in the template?\n\t\t/*\n\t\t$post_id = the_ID();\n\t\tif(!$this->is_liveblog_post($post_id)){\n\t\t\treturn;\n\t\t}\n\t\t*/\n\t?>\n\t\t<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js\"></script>\n\t\t<script type=\"text/javascript\" >\n\t\tjQuery(document).ready(function(){\t\t\t\t\n\t\t\tlb_ajax_update_live_blog();\t\t\t\t\t\n\t\t});\n\t\t\n\t\tfunction lb_ajax_update_live_blog(){\n\t\t\tvar entry_html = '';\n\t\t\tjQuery('.lb-entry').remove();\n\t\t\tvar data = {'action': 'lb_update_live_blog', 'post_id': <?php the_ID(); ?>};\n\t\t\tjQuery.post(\n\t\t\t\t\"<?php echo admin_url('admin-ajax.php'); ?>\",\n\t\t\t\tdata,\n\t\t\t\tfunction(response) {\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tvar posts = JSON.parse(response);\n\t\t\t\t\t\n\t\t\t\t\tjQuery.each(posts, function(index, value){\n\t\t\t\t\t\tentry_html += '<div class=\"lb-entry\"><div style=\"float: left;\"><b>'+ value['author'] + '</b></div> \\\n\t\t\t\t\t\t <div style=\"float: right; font-size: 12px; color: grey;\">' + value['date'] +'</div>\\\n\t\t\t\t\t\t <div style=\"clear: both; margin-bottom: 10px;\">' + value['content'] + '</div> \\\n\t\t\t\t\t\t <hr /></div>';\t\t\t\t\t\t\n\t\t\t\t\t});\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tjQuery('.entry-content').append(entry_html);\n\t\t\t});\t\n\t\t\tsetTimeout(lb_ajax_update_live_blog, 60000);\t\t\t\t\t\n\t\t}\n\t\t</script>\n\t<?php\n\t\treturn;\n\t}", "title": "" }, { "docid": "0d9533df0fcdc7f12e02d67535e551d2", "score": "0.51638454", "text": "public static function set_ajax_url( $specialization = '', $handle = 'agrilife-faculty-search' ) {\n\n\t\t$url = array(\n\t\t\t'ajax' => esc_url( self::$ajax_url . '?specialization=' . $specialization ),\n\t\t);\n\n\t\twp_localize_script( $handle, 'url', $url );\n\n\t}", "title": "" }, { "docid": "a03184813ecec027db055e79e933d8dc", "score": "0.51636654", "text": "public function urlblogchecker()\n\t{\n\t\tif (!$this->input->is_ajax_request()) {\n\t\t\texit('No direct script access allowed');\n\t\t} \n\t\techo $this->Blog_model->freeUrlCheck($_POST['title']);\n\t}", "title": "" }, { "docid": "a8dc4ed9c44944641ea3ee873566a17b", "score": "0.5162015", "text": "function set_page_info($arr='')\n{\n\tif(!isset(extra()->page)) {\n\t\textra()->page['title'] = 'Extra';\n\t}\n\n\tif(isset(extra()->page)) {\n\t\t$arr = extra()->page;\n\n\t\t?>\n\t\t<script>\n\t\t$(document).ready(function(){ \n\n\t\t\t<?php if(is_array(@$arr['nav'])) {\n\t\t\t\t\tforeach($arr['nav'] as $nav)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!isset($nav['url']) or $nav['url'] == ''):\n\t\t\t\t\t\t\tif(!extra_is_mobile()) { \n\t\t\t\t\t\t\t\t?> $(\".extra-breadcrumb\").append( '<li class=\"active\"><?php echo $nav['name']; ?></li>' ); <?php\n\t\t\t\t\t\t\t} else {}\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\tif(extra_is_mobile()) {\n\t\t\t\t\t\t\t\t?> $(\".extra-breadcrumb\").html( '<li><a href=\"<?php echo $nav['url']; ?>\"><i class=\"fa fa-chevron-left\"></i> <?php echo $nav['name']; ?></a></li>' ); <?php\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t?> $(\".extra-breadcrumb\").append( '<li><a href=\"<?php echo $nav['url']; ?>\"><?php echo $nav['name']; ?></a></li>' ); <?php\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tendif;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(!isset($arr['title'])) { $arr['title'] = 'Deneme'; }\n\n\t\t\t\tif(isset($arr['title'])) {\n\t\t\t\t\tif(strlen($arr['title']) < 1) { $arr['title'] = 'Extra'; }\n\t\t\t\t\t?>\n\t\t\t\t\t\t$('h3.page-title').html('<?php echo $arr[\"title\"]; ?>');\n\t\t\t\t\t\tdocument.title = '<?php echo $arr[\"title\"]; if($arr[\"title\"] != 'Extra') { echo ' | Extra';} ?>';\n\t\t\t\t\t<?php\n\t\t\t\t}\n\n\t\t\t?>\n\n\t\t\t$('[substring]').each(function() {\n\t\t\t\t$(this).text($(this).text().substring(0,$(this).attr('substring') ));\n\t\t\t});\n\n\t\t\t<?php if(extra_is_mobile()): ?>\n\t\t\t\t$('[substring-xs]').each(function() {\n\t\t\t\t\t$(this).text($(this).text().substring(0,$(this).attr('substring-xs') ));\n\t\t\t\t});\n\t\t\t<?php endif; ?>\n\n\n\n\t\t}); </script> <?php\n\t} else {\n\t\treturn false;\n\t}\n\n}", "title": "" }, { "docid": "8989be01b7f3e7fa03d81a1709ee1fad", "score": "0.51614416", "text": "public function init__add_custom_ajax_endpoints() {\n\n\t\tadd_rewrite_tag( '%' . static::$ubc_press_ajax_tag . '%', '([^&]+)' );\n\t\tadd_rewrite_rule(\n\t\t\tstatic::$ubc_press_ajax_tag . '/(.+?)/?$',\n\t\t\t'index.php?' . static::$ubc_press_ajax_tag . '=$matches[1]',\n\t\t\t'top'\n\t\t);\n\t\tif ( isset( $_REQUEST['q'] ) && strpos( $_REQUEST['q'], static::$ubc_press_ajax_tag ) === 1 ) {\n\t\t\t$this->ajax( str_replace( '/' . static::$ubc_press_ajax_tag . '/', '', $_REQUEST['q'] ) );\n\t\t}\n\n\t}", "title": "" }, { "docid": "e39cbc3a1365a53c954be44fe20485d9", "score": "0.515237", "text": "function socialLinks($page = 1)\n {\n $this->load->library(\"Ajaxlist\");\n $theList = new Ajaxlist();\n $config = array(\n 'total_rows'=>0,\n 'listID'=>\"my-data-list\",\n 'headers'=>array(\n array(\n 'label'=>_l(\"Title\", $this),\n 'content'=>\"title\",\n ),\n array(\n 'label'=>_l(\"Icon\", $this),\n 'function'=>function($_data) {\n return \"<i class='fab fa-{$_data['class']}'></i>\";\n }\n ),\n array(\n 'label'=>_l(\"URL\", $this),\n 'function'=>function($_data) {\n return \"<a target='_blank' href='{$_data['url']}'>{$_data['url']}</a>\";\n }\n ),\n array(\n 'label'=>\"\",\n 'theme'=>\"open_btn\",\n 'url'=>ADMIN_URL.'socialLinksForm/$content',\n 'content'=>\"id\",\n ),\n array(\n 'label'=>\"\",\n 'theme'=>\"delete_btn\",\n 'url'=>ADMIN_URL.'socialLinksDelete/$content',\n 'content'=>\"id\",\n ),\n ),\n 'ajaxURL'=>ADMIN_URL.\"socialLinks\",\n 'per_page'=>15,\n 'page'=>$page,\n );\n $conditions = null;\n $config['total_rows'] = $this->Social_links_model->getCount($conditions);\n $theList->setOptions($config);\n if($this->input->is_ajax_request()){\n $data = $this->Social_links_model->getAll($conditions, $config['per_page'], $config['page']);\n echo $theList->ajaxData($data);\n return;\n }\n $this->data['title'] = _l(\"Social Links\", $this);\n $this->data['sub_title'] = _l(\"List\", $this);\n $this->data['data_list'] = $this->Nodcms_admin_model->getSocialLinks();\n $this->data['breadcrumb']=array(\n array('title'=>$this->data['title']),\n );\n $this->data['actions_buttons'] = array(\n 'add' => ADMIN_URL.\"socialLinksForm\",\n );\n $this->data['page'] = \"social_links\";\n $this->data['the_list'] = $theList->getPage();\n $this->data['content'] = $this->load->view($this->mainTemplate.\"/data_list\",$this->data, true);\n $this->load->view($this->frameTemplate,$this->data);\n }", "title": "" }, { "docid": "fd2f6c43d93c906e55dc3c1ee45e8545", "score": "0.51496774", "text": "public function ajax_get_content() {\n\n\t\t\tif ( ! function_exists( 'jet_engine' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tadd_filter( 'jet-engine/listing/grid/posts-query-args', array( $this, 'add_query_args' ), 10, 2 );\n\t\t\tadd_filter( 'jet-engine/listing/grid/custom-settings', array( $this, 'add_settings' ), 10, 2 );\n\n\t\t\tif ( jet_engine()->has_elementor() ) {\n\t\t\t\tif ( ! class_exists( 'Elementor\\Jet_Listing_Grid_Widget' ) ) {\n\t\t\t\t\tif ( version_compare( jet_engine()->get_version(), '2.0', '<' ) ) {\n\t\t\t\t\t\trequire_once jet_engine()->plugin_path( 'includes/listings/static-widgets/grid.php' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\trequire_once jet_engine()->plugin_path( 'includes/components/elementor-views/static-widgets/grid.php' );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tElementor\\Plugin::instance()->frontend->start_excerpt_flag( null );\n\n\t\t\t\t$widget = new Elementor\\Jet_Listing_Grid_Widget( array() );\n\t\t\t\t$widget->render_posts();\n\t\t\t} else {\n\t\t\t\t$attributes = isset( $_REQUEST['settings'] ) ? $_REQUEST['settings'] : array();\n\t\t\t\t$render = jet_engine()->listings->get_render_instance( 'listing-grid', $attributes );\n\n\t\t\t\t$render->render();\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "6ad5a8fc9c394b2ed7a1652a03aeb9f4", "score": "0.5147929", "text": "function yz_profile_posts_comments_pagination() {\n\n // Profile Ajax Pagination Script\n wp_enqueue_script( 'yz-pagination', YZ_PA . 'js/yz-pagination.min.js', array( 'jquery') , YZ_Version, true );\n\n wp_localize_script( 'yz-pagination', 'ajaxpagination',\n array(\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'query_vars' => json_encode( array( 'yz_user' => bp_displayed_user_id() ) )\n )\n );\n\n}", "title": "" }, { "docid": "33b2271aa3758907f701e5922b7dd8c7", "score": "0.5145253", "text": "public function parseUrl()\n\t{\n\n $this->expandDomainPathInfo();\n $params = parent::parseUrl();\n\t\t$code = $params['code'];\n $cms = $this->Application->Modules['cms'];\n/*\n if ($this->getResolvePaths() && $params['path'])\n {\n if ($c = $cms->getContainerByPath($params['path']))\n {\n $params['code'] = $c->uid;\n $params['page'] == 'NormalPage';\n }\n \n }\n if ((!isset($params['page']) || $params['page'] == 'NormalPage') && !$code)\n {\n $c = $cms->getContainer($this->getRequest()->getBaseUrl());\n $code = $c->uid;\n $params['code'] = $code;\n $params['page'] == 'NormalPage';\n }\n */Prado::trace('URL MAPPING '.$code.' '.$params['page'],'Json');\n if ($params['page'] && $code)\n\t\t{\n\t\t\t\n\t\t\t$c = $cms->getContainer($code);\n if (!$c)\n {\n $codeshort = str_ireplace($this->getRequest()->getUrl()->getHost().'/','',$code);\n Prado::trace('CODESHORT '.$codeshort,'Json');\n $c = $cms->getContainer($codeshort);\n }\n if ($c) {\n $params['page'] = $c->TypeData['pagePath'];\n $tdParams = $c->TypeData['pageParams'];\n if (is_array($tdParams)) foreach($tdParams as $k=>$v)\n {\n if (!$this->Request->contains($k) && !isset($params[$k]))\n $params[$k]=$v;\n }\n\n }\n\t\t$params['code'] = $code;\n\t\t}\n\t\treturn $params;\n\t}", "title": "" }, { "docid": "9efdbf60ec1d4cec848dac50bb17ce90", "score": "0.5140357", "text": "function navt_list_page() {\n wp_deregister_script('jquery');\n wp_deregister_script('prototype');\n wp_deregister_script('scriptaculous');\n\n wp_print_scripts(array('navt_admin')); ?>\n\n<script type=\"text/javascript\">\n//<![CDATA[\nvar navtpath = '<?php navt_output_url();?>';\n//]]>\n</script>\n<?php printf(\"<!-- %s v%s -->\\n\", NAVT_SCRIPTNAME, NAVT_SCRIPTVERS); ?>\n<link type=\"text/css\" rel=\"stylesheet\" href=\"<?php navt_output_url(); ?>/css/navt.css\" media=\"screen\"/>\n<?php\nif(isset($_REQUEST['navtrestorerequest'])) {?>\n <link type=\"text/css\" rel=\"stylesheet\" href=\"<?php navt_output_url(); ?>/css/restore.css\" media=\"screen\"/>\n<?php } ?>\n<!--[if lt IE 7]><link rel=\"stylesheet\" href=\"<?php navt_output_url();?>/css/navtIe6.css\" type=\"text/css\" media=\"screen\" /><![endif]-->\n<!--[if IE 7]><link rel=\"stylesheet\" href=\"<?php navt_output_url();?>/css/navtIe7.css\" type=\"text/css\" media=\"screen\" /><![endif]-->\n <?php\n }", "title": "" }, { "docid": "cbd88730e47675d9cb0b229445e5481c", "score": "0.5136661", "text": "private function setURL()\n\t{\n\t\t$this->url = sanitize_text_field($_POST['page']);\n\t}", "title": "" }, { "docid": "fbb58e6f55d94eebfa80d8b9ea371c31", "score": "0.5134998", "text": "public function loadModal()\n {\n $data = Page::find($this->modelId);\n $this->title = $data->title;\n $this->slug = $data->slug;\n $this->context = $data->context;\n $this->isSetToBeDefaultHomePage= !$data->is_default_home ? null : true ;\n $this->isSetToBeDefaultNotFoundPage =!$data->is_default_not_found ? null : true ; \n\n }", "title": "" }, { "docid": "1289e5afe2b86b8fd5b6c1905a853f9e", "score": "0.51332825", "text": "function sjf_lje_ajax() {\n \n \t// We are expecting a post var for 'action'.\n if( ! isset( $_POST[ 'action' ] ) ) { return false; }\n\t\tif( $_POST[ 'action' ] != 'sjf_lje_ajax' ) { return false; }\n\n\t\t// We are expecting a post var for 'log'.\n\t\tif( ! isset( $_POST[ 'log' ] ) ) { return false; }\n\n\t\t// Sanitize the log data.\n\t\t$log = wp_kses_post( $_POST[ 'log' ] );\n\n\t\t// Grab the name of the logs page.\n\t\t$post_name = $this -> log_page_slug;\n\n\t\t// Grab the object for the logs page.\n\t\t$log_page = get_page_by_path( $post_name );\n\t\tif( ! $log_page ) { return false; }\n\n\t\t// Grab the ID for the logs page.\n\t\t$post_id = absint( $log_page -> ID );\n\n\t\t// Grab the content for the logs page.\n\t\t$post_content = wp_kses_post( $log_page -> post_content );\n\n\t\t// Add this log entry to the content.\n\t\t$post_content .= '<p>' . $log . '</p>';\n\n\t\t// Update the post.\n\t\t$post = array(\n\t\t\t'ID'\t\t\t=> $post_id,\n\t\t\t'post_content'\t=> $post_content,\n\t\t);\n\t\t$updated = wp_update_post( $post );\n\n\t\t// This is necessary to avoid outputting a \"0\" after any ajax call in WordPress.\n\t\tdie();\n\n }", "title": "" }, { "docid": "43cc09dec92de5de1572d7d84cf4cee8", "score": "0.51296216", "text": "public static function initHooks() {\n\t\t$m = self::pw('modules')->get('DpagesMii');\n\n\t\t$m->addHook('Page(pw_template=loti)::documentListUrl', function($event) {\n\t\t\t$page = $event->object;\n\t\t\t// $itemID = $event->arguments(0);\n\t\t\t// $type = $event->arguments(1);\n\t\t\t// $reference = $event->arguments(2);\n\t\t\t//\n\t\t\t// $url = new Purl(Documents::documentsUrl($itemID, 'ACT'));\n\t\t\t// $url->query->set('type', $type);\n\t\t\t// $url->query->set('reference', $reference);\n\t\t\t// $event->return = $url->getUrl();\n\t\t\t$event->return = $page->url;\n\t\t});\n\t}", "title": "" }, { "docid": "964b1d4609f1e5691b8db07637ef6179", "score": "0.51282716", "text": "final function fill_posts() { \n if( $this->request( 'type' ) && $this->request( 'type' ) == 'category' ) {\n if( $this->request( 'last' ) ) { \n $this->posts = $this->select( array( \"select\" => \"*\", \"from\" => \"item\", \"where\" => \"status=1 AND type='post' AND category='\" . $this->request( 'id' ) . \"' AND id < \" . $this->request( 'last' ) . \" ORDER BY id ASC\") ); \n } else { \n $this->posts = $this->select( array( \"select\" => \"*\", \"from\" => \"item\", \"where\" => \"status=1 AND type='post' AND category='\" . $this->request( 'id' ) . \"' ORDER BY id ASC\") ); \n } \n } elseif( $this->request( 'type' ) && $this->request( 'type' ) == 'search' ) { \n if( $this->request( 'last' ) ) { \n $this->posts = $this->select( array( \"select\" => \"*\", \"from\" => \"item\", \"where\" => \"status=1 AND type IN ('page','post') AND ( title LIKE '%\" . htmlentities( $this->request( 'term' ) ) . \"%' OR content LIKE '%\" . htmlentities( $this->request( 'term' ) ) . \"%' ) AND id < \" . $this->request( 'last' ) . \" ORDER BY id ASC\") ); \n } else { \n $this->posts = $this->select( array( \"select\" => \"*\", \"from\" => \"item\", \"where\" => \"status=1 AND type IN ('page','post') AND ( title LIKE '%\" . htmlentities( $this->request( 'term' ) ) . \"%' OR content LIKE '%\" . htmlentities( $this->request( 'term' ) ) . \"%' ) ORDER BY id ASC\") ); \n } \n } else { \n if( $this->request( 'last' ) ) { \n $this->posts = $this->select( array( \"select\" => \"*\", \"from\" => \"item\", \"where\" => \"status=1 AND type='post' AND id < \" . $this->request( 'last' ) . \" ORDER BY id ASC\") ); \n } else { \n $this->posts = $this->select( array( \"select\" => \"*\", \"from\" => \"item\", \"where\" => \"status=1 AND type='post' ORDER BY id ASC\") ); \n } \n } \n $this->post_count = sizeof( $this->posts ); \n }", "title": "" }, { "docid": "33db7ed0fa13d733b935178ed75af59f", "score": "0.5125221", "text": "function hmp_add_link_to_get_pages( $data, $arg ) {\n\n\t$found = false;\n\tforeach( debug_backtrace() as $call ) {\n\n\t\tif( $call['function'] == 'wp_list_pages' ) {\n\t\t\t$args = wp_parse_args( $call['args'][0] );\n\n\t\t\tif( !isset( $args['child_of'] ) || !$args['child_of'] )\n\t\t\t\t$found = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif( !$found )\n\t\treturn $data;\n\n\t$menu_order = (int) get_option('hmp_portfolio_menu_order', 0);\n\n\t$item = (object) array(\n\t\t'ID' => 987654321,\n\t\t'post_name' => 'portfolio',\n\t\t'post_title' => get_option( 'hmp_title', 'Portfolio' ) ,\n\t\t'menu_order' => $menu_order,\n\t\t'post_parent' => 0\n\t);\n\n\tif( $menu_order === 0 ) {\n\t\tarray_unshift( $data, $item );\n\t} else {\n\t\t$data = array_merge( array_slice( $data, 0, $menu_order ), array( $item ), array_slice( $data, $menu_order ) );\n\t}\n\n\t//set the queried object for wp_query here to make current_page work in wp_list_pages\n\tglobal $wp_query;\n\n\tif( !empty($wp_query->is_portfolio) || !empty($wp_query->is_portfolio_single) ) {\t\n\t\t$wp_query->queried_object = $item;\n\t\t$wp_query->queried_object_id = $item->ID;\n\t}\n\t\n\treturn $data;\n}", "title": "" }, { "docid": "10af74bb86f3acb845ec5b873c0b262f", "score": "0.512193", "text": "public function page_init() {\t\t\n\t\tregister_setting(\n\t\t\t'sro_option_group', // Option group\n\t\t\t'sro_options', // Option name\n\t\t\tarray( $this, 'sanitize' ) // Sanitize\n\t\t);\n\n\t\tadd_settings_section(\n\t\t\t'server_section', // ID\n\t\t\t'', // Title\n\t\t\tarray( $this, 'print_server_instructions' ), // Callback\n\t\t\t'sro-settings' // Page\n\t\t); \n\n\t\tadd_settings_field(\n\t\t\t'server_url', // ID\n\t\t\t'Server URL', // Title \n\t\t\tarray( $this, 'server_callback' ), // Callback\n\t\t\t'sro-settings', // Page\n\t\t\t'server_section' // Section\t\t \n\t\t);\t \n\t\tadd_settings_field(\n\t\t\t'depts_url', // ID\n\t\t\t'Departments URL', // Title \n\t\t\tarray( $this, 'depts_callback' ), // Callback\n\t\t\t'sro-settings', // Page\n\t\t\t'server_section' // Section\t\t \n\t\t);\t \n\t\tadd_settings_field(\n\t\t\t'server_altmetrics_url', // ID\n\t\t\t'Server Altmetrics URL', // Title \n\t\t\tarray( $this, 'server_altmetrics_callback' ), // Callback\n\t\t\t'sro-settings', // Page\n\t\t\t'server_section' // Section\t\t \n\t\t);\t \n\n\n\t\tadd_settings_section(\n\t\t\t'query_section', // ID\n\t\t\t'', // Title\n\t\t\tarray( $this, 'print_query_instructions' ), // Callback\n\t\t\t'sro-settings' // Page\n\t\t); \n\n\t\tadd_settings_field(\n\t\t\t'query_extra', \n\t\t\t'Query Extra Paramaters', \n\t\t\tarray( $this, 'query_extra_callback' ), \n\t\t\t'sro-settings', \n\t\t\t'query_section'\n\t\t);\t \n\t}", "title": "" }, { "docid": "cd1ac6a52f15ede93ef6449e8698987d", "score": "0.511825", "text": "function __construct(){\n\t\tadd_action( 'admin_menu', array( $this, 'remove_links' ) );\n\t\n\t\t//Set the array for additional fields\n\t\t$this->additional_fields = json_decode( get_option('link_additional_fields'), true );\n\t\n\n\t\t//Add the jquery\n\t\tadd_action( 'admin_print_scripts', array( $this, 'admin_scripts') );\n\t\tadd_action( 'admin_print_styles', array( $this, 'admin_style' ) );\n\t\tif( isset( $_GET['page'] ) && $_GET['page']=='simple-link-settings' ){\n\t\t\t//Bring in the scripts for the setting page only\n\t\t\tadd_action( 'admin_print_scripts', array( $this, 'settings_scripts' ) );\n\t\t}\n\t\t\n\t\t\n\t\t//Image uploader mod\n\t\tadd_action( 'admin_head-media-upload-popup', array( $this, 'upload_mod') );\n\t\t\n\t\t//The LInk Ordering page\n\t\tadd_action( 'admin_menu', array( $this, 'sub_menu' ) );\n\t\t\n\t\t//The Meta Boxes\n\t\tadd_action( 'admin_menu', array( $this, 'meta_boxes'));\n\t\t\n\t\t\n\t\t//Add the function to an ajax request to sort the links in the list\n\t\tadd_action('wp_ajax_simple_links_sort_children', array( $this, 'ajax_sort') );\n\t\t\n\t\t//Ajax request to import links\n\t\tadd_action('wp_ajax_simple_links_import_links', array( $this, 'import_links') );\n\t\t\n\t\t\n\t\t//Add Contextual help to the necessary screens\n\t\tadd_action( \"load-simple_link_page_simple-link-settings\", array( $this, 'help' ) );\n\t\tadd_action( \"load-{$GLOBALS['pagenow']}\", array( $this, 'help' ) );\n\t\t\n\t\t\n\t\t//Add the shortcode button the MCE editor\n\t\tadd_action( 'init', array( $this, 'mce_button' ) );\n\t\t\n\t\t\n\t\t//Add the filter to the Links Post list\n\t\tadd_action('restrict_manage_posts', array( $this, 'posts_list_cat_filter') );\n\t\tadd_filter('request', array( $this, 'post_list_query_filter') );\n\n\t\t\n\t\t//Post List Columns Mod\n\t\tadd_filter( 'manage_simple_link_posts_columns', array( $this, 'post_list_columns' ) );\n\t\tadd_filter( 'manage_simple_link_posts_custom_column', array( $this, 'post_list_columns_output'), 0, 2 );\n\t\n\t}", "title": "" }, { "docid": "72f215ccf185ce109f989d4b3f342daa", "score": "0.51174116", "text": "public function AjaxPagination(){\n\n $dados = filter_input_array(INPUT_POST, FILTER_DEFAULT);\n\n wp_send_json( ['teste'=>1] );\n /*\n if(empty($dados)) die('error data');\n\n\n $output = [\n 'data' => 0,\n 'page' => ++$dados['page']\n ];\n\n /**\n * @param 1 - string nonce\n * @param 2 - nome do acao no momento da geração do nonce pela função wp_nonce_field\n\n if(wp_verify_nonce($dados['nonce'], 'wpmg-ajax-pagination')) die('nonce error');\n\n $options = get_option( $this->_option_name );\n\n $args = [\n 'post_type' => $options['type'],\n 'order' => $options['order'],\n 'orderby' => $options['orderby'] ,\n 'posts_per_page' => $options['posts_per_page'] ,\n 'paged' => $dados['page'] ,\n 'post_status' => $options['post_status'],\n 'suppress_filters' => true //PROPRIEDADE NECESSARIA PARA USAR WP_QUERY COM AJAX ** NAO REMOVER **\n ];\n\n $rs = $this->query->setArgs($args)->getResults();\n\n $output['no_more'] = ($rs->max_num_pages == $dados['page'] || $rs->max_num_pages == 0) ? true : false;\n\n $results = [];\n\n if ( $rs ) {\n\n while ( $rs->have_posts() ) : $rs->the_post();\n\n\n $vars['ID'] = get_the_ID();\n $vars['title'] = get_the_title();\n $vars['permalink'] = get_the_permalink();\n\n\n if( null != $options['tax'] ) {\n $tax_terms = get_the_terms($vars['ID'], $options['tax'] );\n\n $seguimentos = [];\n if(!empty($tax_terms)){\n foreach ($tax_terms as $tx){\n $seguimentos[] = \"<a href='?wpmg_tax={$tx->slug}'>{$tx->name}</a>\";\n }\n }\n $vars['seguimentos'] = implode(' | ', $seguimentos);\n\n }\n\n $vars['customFields'] = $options['acf'] ? WP_Masonry_Grid_Static::getACFCustomFields($options['acf'], $vars['ID'] ) : '';\n\n $results[] = $this->view->render('frontend/loop_masonry', $vars);\n\n endwhile;\n\n }\n\n $output['query'] = $rs;\n $output['args'] = $this->query->getQueryArgs();\n $output['data'] = $results;\n\n wp_reset_query();\n\n wp_send_json( $output );\n*/\n }", "title": "" }, { "docid": "89572135cf2308425a88d2d7b1d8af11", "score": "0.5116248", "text": "private function addPageSingle()\n\t{\n\t\t$slug = sprintf( '%s-%s', $this->slug, $this->defaultTabIdx );\t\t\n\t\t$this->hooknames[] = add_options_page( $this->pageTitle, $this->menuTitle, 'manage_options', $slug, array( &$this, 'showPage' ) );\n\t\t$this->uri = admin_url( sprintf( 'options-general.php?page=%s', $slug ) );\t\t\n\t}", "title": "" }, { "docid": "a071ba525739d94a58afdb0cd3ef5448", "score": "0.5110321", "text": "function theme_islandora_webform_links(array $vars) {\n drupal_add_library('system', 'drupal.ajax');\n drupal_add_css(drupal_get_path('module', 'islandora_webform') . '/css/islandora_webform.css');\n\n $webforms = $vars['webform_data'];\n $object = $vars['islandora_object'];\n $pid = $object->id;\n module_load_include('inc', 'islandora_webform', 'includes/utilities');\n\n $output = '<div id=\"islandora_webform_object_tag_links\">';\n\n $destination = drupal_get_destination();\n\n $webform_link_options = array(\n 'html' => TRUE,\n 'query' => array(\n 'pid' => $pid,\n $destination,\n ),\n );\n\n $tag_link_options = array(\n 'attributes' => array(\n 'class' => array(\n 'tag-link',\n 'use-ajax',\n ),\n ),\n 'html' => TRUE,\n 'query' => array(\n $destination,\n\n ),\n );\n $untag_link_options = array(\n 'attributes' => array(\n 'class' => array(\n 'untag-link',\n 'use-ajax',\n ),\n ),\n 'html' => TRUE,\n 'query' => array(\n $destination,\n ),\n );\n\n foreach ($webforms as $webform) {\n $jqid = 'iw_iwebform_links_' . $webform->entity_id;\n $output .= '<div id=\"' . $jqid . '\" class=\"webform-links-wrapper\"><div class=\"webform-links\">';\n // Lets load the node.\n $webform_node_data = node_load($webform->entity_id)->webform;\n $inline = module_exists('webform_ajax') && isset($webform_node_data['webform_ajax']) ? $webform_node_data['webform_ajax'] != WEBFORM_AJAX_NO_AJAX : FALSE;\n if ($inline) {\n $link_mode = 'inline';\n $webform_link_options['attributes']['class'] = array('webform-link', 'use-ajax');\n unset($webform_link_options['query']['destination']);\n }\n else {\n $link_mode = 'normal';\n $webform_link_options['attributes']['class'] = array('webform-link');\n $webform_link_options['attributes']['target'] = '_islandora_webform_page';\n }\n\n if ($webform->scope != 'tagged') {\n $output .= islandora_webform_theme_webform_link($webform, $webform_link_options, $link_mode);\n }\n else {\n // Determine if this webform is tagged to this object.\n module_load_include('inc', 'islandora_webform', 'includes/tag_object');\n $tagged = islandora_webform_is_webform_tagged($object, $webform->entity_id);\n\n // If so, add the webform link and the remove-tag link for content\n // managers.\n if ($tagged) {\n $output .= islandora_webform_theme_webform_link($webform, $webform_link_options, $link_mode);\n\n $path = 'islandora_webform/' . $webform->entity_id . '/untag_object/' . $pid . '/nojs';\n\n $untag_link_options['query']['tok'] = drupal_get_token('untag_link_' . $pid . '_' . $webform->entity_id);\n\n // drupal_valid_path() checks to see if the current user has access to\n // the add/remove tag links.\n if (drupal_valid_path($path, TRUE)) {\n $tag_link_options['query'] = $destination;\n $untag_link = l(t('<- remove this link'), $path, $untag_link_options);\n\n $output .= ' ' . $untag_link;\n }\n }\n else {\n // Otherwise, add the add-tag link for managers.\n $path = 'islandora_webform/' . $webform->entity_id . '/tag_object/' . $pid . '/nojs';\n\n // Add a token to the query.\n $tag_link_options['query']['tok'] = drupal_get_token('tag_link_' . $pid . '_' . $webform->entity_id);\n\n // Check access.\n if (drupal_valid_path($path, TRUE)) {\n $tag_link = l(t('add webform link: \"%title\"', array('%title' => $webform->link_text)), $path, $tag_link_options);\n\n $output .= $tag_link;\n }\n }\n }\n $output .= '</div></div>';\n }\n\n $output .= '</div>';\n\n return $output;\n}", "title": "" }, { "docid": "cbad3127c2c5e8d77c3ecce904f199a2", "score": "0.5104369", "text": "function primer_get_posts_url() {\n\n\t$url = ( 'page' === get_option( 'show_on_front' ) ) ? get_permalink( (int) get_option( 'page_for_posts' ) ) : null;\n\n\t/**\n\t * Filter the posts page URL.\n\t *\n\t * @since 1.0.0\n\t *\n\t * @var string\n\t */\n\treturn (string) apply_filters( 'primer_posts_url', $url );\n\n}", "title": "" }, { "docid": "6134847bbe03182989c0eccf0673428f", "score": "0.5104311", "text": "public function parseUrls()\n {\n $content = $this->_data;\n // convert internal urls to SEO friendly URLs\n $regex = '#href=\"index.php\\?([^\"]*)#m';\n $content = preg_replace_callback($regex, array($this, 'replaceUrl'), $content);\n\n // prefix the protocol to src, href and poster tags inserted by the editor.\n // This ensures images and links to media content will work on subdomains.\n $base = Yii::$app->homeUrl;\n $protocols = '[a-zA-Z0-9]+:';\n $regex = '#(src|href|poster)=\"(?!/|'.$protocols.'|\\#|\\')([^\"]*)\"#m';\n $content = preg_replace($regex, \"$1=\\\"$base\\$2\\\"\", $content);\n $this->_data = $content;\n }", "title": "" }, { "docid": "d3eedd5f8c6dfd80ebbe90429287288e", "score": "0.510084", "text": "public function initializePage()\n\t{\n\t\tadd_submenu_page('theme-options', self::$pageName, self::$pageName, 'manage_options', 'socialmedia-options', [$this, 'display']);\n\t}", "title": "" }, { "docid": "d63a56d11550be4bdd915e5b0df7667c", "score": "0.5096228", "text": "public function setPagesLinks(){\n $max = $this->getMax();\n $page = $this->getPage();\n\n echo \"<div class='content'>\";\n if(self::onPage < $max) {\n if ($page > 1) {\n $this->printLinksDown($page);\n }\n echo \" \" . $page;\n }\n\n if($page < ($max / self::onPage)) {\n $this->printLinksUp($page, $max);\n }\n echo \"</div>\";\n }", "title": "" }, { "docid": "5dc45cd1a4ff263996d858f5db7b32fc", "score": "0.50948364", "text": "function post_page_meta_box() {\n\n\t\t$content_page_type = array( 'post', 'page' );\n\t\n\t\tforeach ( $content_page_type as $screen ) {\n\t\t\tadd_meta_box(\n\t\t\t\t\t\t'quick_links_sc_index_meta_box', // $id\n\t\t\t\t\t\t'Quick Links Section', // $title\n\t\t\t\t\t\tarray($this, 'quick_links_sc_index_meta_box'), // $callback\n\t\t\t\t\t\t$screen, // $page\n\t\t\t\t\t\t'normal', // $context\n\t\t\t\t\t\t'high' // $priority\n\t\t\t); \n\t\t}\n\n\t\twp_enqueue_script( \n\t\t\t'qlsc_post',\n\t\t\tplugins_url('/admin/js/post.js', dirname(__FILE__)) \n\t\t);\n\t\t\n\t}", "title": "" }, { "docid": "9691066598bdb4b29ba3872aa89f06bf", "score": "0.5092776", "text": "function load_morepost(){\n //echo \"action is clear\";die;\nglobal $wpdb;\nglobal $paged; global $args;\n$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;\n$args= null;\n$offset = $_POST[\"set_offset\"];\n$ppp = $_POST[\"ppp\"];\nheader(\"Content-Type: text/html\");\n$args = array(\n 'post_type' => 'post',\n\t'posts_per_page'=>$ppp,\n\t'offset' => $offset,\n\t'paged' => $paged,\n 'post_status' => 'publish',\n\t);\n\n\t$query = new WP_Query( $args );\n\t$i=1;\n\tif($query-> have_posts()){\n\twhile ($query->have_posts()) : $query->the_post(); \n?>\n\n\t\t<div class=\"single-post\">\n\t\t\t<div class=\"post-title\">\n\t\t\t <a href=\"<?php the_permalink() ;?>\"><h1><?php the_title();?></h1></a>\n\t\t\t</div>\n\t\t\t<div class=\"featured-image\">\n\t\t\t\t<?php the_post_thumbnail();?>\n\t\t\t\t<div class=\"read-more\"><a href=\"<?php the_permalink() ;?>\">Read More</a></div>\n\t\t\t</div>\n\t\t\t<div class=\"post-excerpt\">\n\t\t\t\t<p><?php the_excerpt(); ?></p>\n\t\t\t</div>\t\t\t\n\t\t\t<div class=\"post-author-meta\">\n\t\t\t\t<a href=\"#\"><?php echo get_post_meta(get_the_id() ,'my_magzine' ,true) ;?></a>\n\t\t\t\t<span class=\"post-date\"> / <?php the_date();?> / </span>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php \n\t\t$i++;\n\t\tendwhile; \n\t\twp_reset_query();\n\t}\n\telse {\n\techo '<div class=\".no-more-post\"><p>No more post available</p></div>';\n\t}\n die(0);\n}", "title": "" }, { "docid": "ee0d91d9a0d2a706bc0ff15a52aa0e0b", "score": "0.5089779", "text": "function setup_postdata($post) {\n\tglobal $id, $postdata, $authordata, $day, $page, $pages, $multipage, $more, $numpages, $wp_query;\n\tglobal $pagenow;\n\n\t$id = $post->ID;\n\n\t$authordata = get_userdata($post->post_author);\n\n\t$day = mysql2date('d.m.y', $post->post_date);\n\t$currentmonth = mysql2date('m', $post->post_date);\n\t$numpages = 1;\n\t$page = get_query_var('page');\n\tif ( !$page )\n\t\t$page = 1;\n\tif ( is_single() || is_page() )\n\t\t$more = 1;\n\t$content = $post->post_content;\n\tif ( preg_match('/<!--nextpage-->/', $content) ) {\n\t\tif ( $page > 1 )\n\t\t\t$more = 1;\n\t\t$multipage = 1;\n\t\t$content = str_replace(\"\\n<!--nextpage-->\\n\", '<!--nextpage-->', $content);\n\t\t$content = str_replace(\"\\n<!--nextpage-->\", '<!--nextpage-->', $content);\n\t\t$content = str_replace(\"<!--nextpage-->\\n\", '<!--nextpage-->', $content);\n\t\t$pages = explode('<!--nextpage-->', $content);\n\t\t$numpages = count($pages);\n\t} else {\n\t\t$pages[0] = $post->post_content;\n\t\t$multipage = 0;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "ba19720620384f877ec639ea2467591c", "score": "0.50872123", "text": "public function __construct(){\n if(count($this->parseUrl()) == 1 ){\n //chama o metodo do index\n $this->index();\n }\n }", "title": "" }, { "docid": "b40a7410a77f6fa84cca7f2a7bcf32ca", "score": "0.5087142", "text": "public function search_ajax(){\n\t\t$title = $this->input->post('title');\n if (isset($_POST['sortable'])) {\n $this->plan_model->save_order($_POST['sortable']);\n }\n \n // Fetch all pages\n\t\t$this->db->like('title',$title);\n $this->data['pages'] = $this->plan_model->get_nested($this->data['content_language_id']);\n\t\t//echo $this->db->last_query();\n \n // Load view\n $this->load->view($this->_subView.'order_ajax', $this->data);\n }", "title": "" } ]
7b6f7397b2a25e0c219d6b952b8af335
Retorna una opcion del filtro
[ { "docid": "3250cd4a03115dff901a5a045c7fbc75", "score": "0.0", "text": "function getFiltroOption($f_key,$es_pais = false) \n {\n if (!$es_pais)\n return '<option value=\"'. $this->filtro($f_key).'\" selected=\"selected\">'. $this->getFiltroString($f_key).'</option>';\n return '<option value=\"'. $this->filtro($f_key).'\" selected=\"selected\">'.$es_pais['descripcion'].'</option>';\n }", "title": "" } ]
[ { "docid": "6c4adea0ba1aa2ba23d52f97aedff3d6", "score": "0.7224273", "text": "public function getFilter();", "title": "" }, { "docid": "6c4adea0ba1aa2ba23d52f97aedff3d6", "score": "0.7224273", "text": "public function getFilter();", "title": "" }, { "docid": "6c4adea0ba1aa2ba23d52f97aedff3d6", "score": "0.7224273", "text": "public function getFilter();", "title": "" }, { "docid": "bf8d1f1068c035b5a68e028bf17e657c", "score": "0.70773625", "text": "public function applyFilter();", "title": "" }, { "docid": "bf8d1f1068c035b5a68e028bf17e657c", "score": "0.70773625", "text": "public function applyFilter();", "title": "" }, { "docid": "ba34496211a431732965ad8b85a6a8a9", "score": "0.697822", "text": "protected function getFilter()\n {\n \t$filtros = \" 1 = 1 \";\n if (Session::getInstance()->get($this->namefilter)!=\"\") {\n $filters =(object)Session::getInstance()->get($this->namefilter);\n if ($filters->log_usuario != '') {\n $filtros = $filtros.\" AND log_usuario LIKE '%\".$filters->log_usuario.\"%'\";\n }\n if ($filters->log_tipo != '') {\n $filtros = $filtros.\" AND log_tipo ='\".$filters->log_tipo.\"'\";\n }\n if ($filters->log_fecha != '') {\n $filtros = $filtros.\" AND log_fecha LIKE '%\".$filters->log_fecha.\"%'\";\n }\n if ($filters->log_log != '') {\n $filtros = $filtros.\" AND log_log LIKE '%\".$filters->log_log.\"%'\";\n }\n\t\t}\n return $filtros;\n }", "title": "" }, { "docid": "8c5523dd5f8beac30b0dd49f3e2838ea", "score": "0.6923556", "text": "public function getFiltro() {\n return $this->filtro;\n }", "title": "" }, { "docid": "75099842f62a879dcfbea75cb5efaaa3", "score": "0.689554", "text": "public function computeFilter(){\r\n\t\t\t$this->oSystem->getLogger()->debug( \"Aplicando filtro \" . get_class($this) );\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_estado'] )\r\n\t\t\t\t$this->filtroSQL .= \" cli.estado='$_REQUEST[_estado]'\";\r\n\t\t\telse\r\n\t\t\t\t$this->filtroSQL .= \" cli.estado NOT IN ('XXX')\";\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_id_cliente'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND cli.id=\\\"$_REQUEST[_id_cliente]\\\"\";\r\n\t\t\t\r\n\t\t\tif ( !$_REQUEST['_id_cliente'] && $_REQUEST['_cliente'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND (cli.nombre LIKE '%$_REQUEST[_cliente]%' OR cli.razon LIKE '%$_REQUEST[_cliente]%')\";\t\t\t\r\n\t\t\t\t\r\n\t\t\tif ( $_REQUEST['_email'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND cli.email LIKE '%$_REQUEST[_email]%'\";\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_telefono'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND telefono LIKE '%$_REQUEST[_telefono]%'\";\r\n\t\t\t\t\r\n\t\t\tif ( $_REQUEST['_desde'] ){\r\n\t\t\t\t$desde = substr($_REQUEST['_desde'], 6).'-'.substr($_REQUEST['_desde'], 3,2).'-'.substr($_REQUEST['_desde'], 0,2);\r\n\t\t\t\t$this->filtroSQL .= \" AND falta >= '$desde'\";\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\tif ( $_REQUEST['_hasta'] ){\r\n\t\t\t\t$desde = substr($_REQUEST['_hasta'], 6).'-'.substr($_REQUEST['_hasta'], 3,2).'-'.substr($_REQUEST['_hasta'], 0,2);\r\n\t\t\t\t$this->filtroSQL .= \" AND falta <= '$desde'\";\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t$this->filtroSQL .= ' ORDER BY cli.nombre';\r\n\t\t\t\t\r\n\t\t}", "title": "" }, { "docid": "fd8224df7589c70c6abf660f6e9e384e", "score": "0.6859527", "text": "protected function getFilter()\n {\n \t$filtros = \" 1 = 1 \";\n if (Session::getInstance()->get($this->namefilter)!=\"\") {\n $filters =(object)Session::getInstance()->get($this->namefilter);\n\t\t}\n return $filtros;\n }", "title": "" }, { "docid": "29fa395d4ef1d4ebf258868a751311b2", "score": "0.68519473", "text": "public function filter(): Filter ;", "title": "" }, { "docid": "103bf7e523b4093e496e4c57e4997307", "score": "0.6606978", "text": "abstract public function filter();", "title": "" }, { "docid": "dd7fb6e1af27477defc1831d1b788e46", "score": "0.6503522", "text": "public function getFilterName(): string;", "title": "" }, { "docid": "4380ec7ef8b26fa982037d331223ac50", "score": "0.6470526", "text": "function getFilters();", "title": "" }, { "docid": "c425f8c8b5ca5a0d79fa152c91981d5c", "score": "0.6454742", "text": "public function get_filter_name(): string;", "title": "" }, { "docid": "b577c085cf342c16dd1be4ed54b1343a", "score": "0.6413564", "text": "function get_listado_filtro($where=null){\n $con=\"select sigla,descripcion from unidad_acad \";\n $con = toba::perfil_de_datos()->filtrar($con);\n $resul=toba::db('designa')->consultar($con);\n $condicion=' WHERE 1=1 ';\n if(count($resul)==1){//si esta asociado a un perfil de datos de unidad acad\n $condicion.=\" and uni_acad='\".$resul[0]['sigla'].\"'\"; \n }\n \n if(!is_null($where)){//aplico el filtro\n $condicion.=' and '.$where;\n }\n \n $sql=\"select t_n.id_norma,t_n.nro_norma,t_n.tipo_norma,t_n.emite_norma,t_n.fecha,quien_emite_norma,nombre_tipo,t_n.uni_acad,link\n from norma t_n\n LEFT OUTER JOIN tipo_emite b ON (t_n.emite_norma=b.cod_emite)\n LEFT OUTER JOIN tipo_norma_exp c ON (t_n.tipo_norma=c.cod_tipo)\".$condicion \n ;\n\n return toba::db('designa')->consultar($sql);\n }", "title": "" }, { "docid": "02f3a97804726d3585639ebb8adf5d1c", "score": "0.63698983", "text": "public function hasFilter(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "02f3a97804726d3585639ebb8adf5d1c", "score": "0.63698983", "text": "public function hasFilter(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "d8340ee2165dfe274ae7f2f270ce5c57", "score": "0.635478", "text": "public function createFilter()\r\n\t{\r\n\t\t$filter = \"c.\" . $this->filterField . \">=-1\";\r\n\t\treturn $filter;\r\n\r\n\t}", "title": "" }, { "docid": "1d74d55c6c4c9c0c140fd19006a114cf", "score": "0.6351741", "text": "protected static function getFilterConditions(){ return array(); }", "title": "" }, { "docid": "a3007a2f038ad684dbdc7deb23f1cb4e", "score": "0.6342067", "text": "public function filter($filter);", "title": "" }, { "docid": "3a81830a0cb88ef358eb069e5a95c4d1", "score": "0.63321435", "text": "public function getFilter(){\n\t\treturn $this->filter;\n\t}", "title": "" }, { "docid": "70d017195d09edf9be3fdff1fad9eafc", "score": "0.63321155", "text": "function filter()\n {\n return di()->get('filter');\n }", "title": "" }, { "docid": "468c44b61729a1fa40f9fdd8058c314f", "score": "0.6328261", "text": "function request_get_filter() {\n $result=array('SQL'=>'','description'=>'');\n $session=(isset($_SESSION[_SESSION_FILTER])?$_SESSION[_SESSION_FILTER]:array());\n foreach($session as $filter) {\n $value=$filter['value'];\n if ($filter['value']!=''&& isset($filter['field'])) {\n if (is_array($value)) {\n $res='';$desc='';\n foreach($value as $key => $val) {\n if ($val <>0) {\n $res.=($res<>''?', ':'').$key; //compone la lista delle chiavi per la struttura IN ( )\n $desc.= ($desc<>''?'+':'').$filter['label'][$key];\n }\n }\n if ($res <> '') {\n $result['SQL'].= ($result['SQL']<>''?' AND ':'').$filter['field'].' IN ('.$res.') ';\n $result['description'].= ($result['description']!==''?'<i> con </i>':'').$filter['field_label'].' in <strong>'.$desc.'</strong> ';\n }\n }\n else {\n $result['SQL'].= ($result['SQL']<>''?' AND ':'').$filter['field'].'='.$value.' ';\n //TODO: la select gerarchica da problemi con questo tipo di ettichette andrebbe resa a due soli livelli\n $result['description'].= ($result['description']!==''?'<i> con </i>':'').$filter['field_label'].'=<strong>'.(isset($filter['label'])?$filter['label'][$value]:$value).'</strong> ';\n }\n $result['description'].='<br>';\n }\n }\n return $result;\n\n}", "title": "" }, { "docid": "cfd0f52ee0ec1cb478af65c336bf68f0", "score": "0.6308819", "text": "function filtroComercial($opcion) \n{\n\tif ($opcion=='COMERCIAL') {\n\t\t$filtro = \" AND h.producto='COMERCIAL' \";\n\t}\n\telseif ($opcion=='NATURAL') {\n\t\t$filtro = \" AND h.producto!='COMERCIAL' \";\n\t}\n\telse {\n\t\t$filtro = \" \";\n\t}\n\n\treturn $filtro;\n}", "title": "" }, { "docid": "ab647456b80a894105ba22c20b0c9b24", "score": "0.6294016", "text": "function stvoriFilter(){\n\t$filter[]=array();\n\t$i=0;\n\t\n\t//contains -- prvo iz xml, drugo iz trazilice\n\tif(isset($_REQUEST['ime'])){\n\t\t$filter[$i] = \"[ime[contains(php:functionString('mb_strtolower',text()),'\".mb_strtolower($_GET['ime']).\"')]]\";\t\n\t\t$i++;\n\t}\n\t\n\tif(isset($_REQUEST['prezime'])){\n\t\t$filter[$i] = \"[prezime[contains(php:functionString('mb_strtolower',text()),'\".mb_strtolower($_GET['prezime']).\"')]]\";\t\n\t\t$i++;\n\t}\n\t\n\tif(isset($_REQUEST['godinar'])){\n\t\tif ($_GET['godinar'] != \"odaberi\"){\n\t\t\t$filter[$i] = \"[godinar[contains(php:functionString('mb_strtolower',text()),'\".mb_strtolower($_GET['godinar']).\"')]]\";\t\n\t\t\t$i++;\n\t\t}\n\t}\n\t\n\tif(isset($_REQUEST['govpodrucje'])){\n\t\tif ($_GET['govpodrucje'] == 'englesko'){\n\t\t\t$filter[$i] = \"[drzavarod/@govpodrucje='englesko']\";\n\t\t\t$i++;\n\t\t}\n\t\telse {\n\t\t\t$filter[$i] = \"[drzavarod/@govpodrucje='drugo']\";\n\t\t\t$i++;\n\t\t}\n\t}\n\t\n\tif(isset($_REQUEST['mjestorod'])){\n\t\t$filter[$i] = \"[mjestorod[contains(php:functionString('mb_strtolower',text()),'\".mb_strtolower($_GET['mjestorod']).\"')]]\";\t\n\t\t$i++;\n\t}\n\t\n\tif(isset($_REQUEST['drzavarod'])){\n\t\t$filter[$i] = \"[drzavarod[contains(php:functionString('mb_strtolower',text()),'\".mb_strtolower($_GET['drzavarod']).\"')]]\";\t\n\t\t$i++;\n\t}\n\t\n\tif(isset($_REQUEST['nagrade'])){\n\t\t$filter[$i]=\"[nagrade[contains(php:functionString('mb_strtolower',text()),'\".mb_strtolower($_GET['nagrade']).\"')]]\";\n\t\t$i++;\n\t}\n\t\n\tif(isset($_REQUEST['nominacije'])){\n\t\t$filter[$i]=\"[nominacije[contains(php:functionString('mb_strtolower',text()),'\".mb_strtolower($_GET['nominacije']).\"')]]\";\n\t\t$i++;\n\t}\n\t\n\tif(isset($_REQUEST['wiki'])){\n\t\t$filter[$i] = \"[wiki[contains(php:functionString('mb_strtolower',text()),'\".mb_strtolower($_GET['wiki']).\"')]]\";\t\n\t\t$i++;\n\t}\n\t\n\tif(isset($_REQUEST['id'])){\n\t\t$filter[$i] = \"[contains(@id,'\".mb_strtolower($_GET['id']).\"')]\";\t\n\t\t$i++;\n\t}\n\t\n\tif(isset($_REQUEST['hrnaslov'])){\n\t\t$filter[$i] = \"[film/naslov/hrnaslov[contains(php:functionString('mb_strtolower',text()),'\".mb_strtolower($_GET['hrnaslov']).\"')]]\";\t\n\t\t$i++;\n\t}\n\t\n\tif(isset($_REQUEST['engnaslov'])){\n\t\t$filter[$i] = \"[film/naslov/engnaslov[contains(php:functionString('mb_strtolower',text()),'\".mb_strtolower($_GET['engnaslov']).\"')]]\";\t\n\t\t$i++;\n\t}\n\t\n\tif(isset($_REQUEST['nije_eng'])){\n\t\tif(isset($_REQUEST['izvnaslov'])){\n\t\t\t$filter[$i] = \"[film/naslov/izvnaslov[contains(php:functionString('mb_strtolower',text()),'\".mb_strtolower($_GET['izvnaslov']).\"')]]\";\t\n\t\t\t$i++;\n\t\t}\n\t}\n\t\n\tif(isset($_REQUEST['godinaf'])){\n\t\tif ($_GET['godinaf'] != \"odaberi\"){\n\t\t\t$filter[$i] = \"[film/godinaf[contains(php:functionString('mb_strtolower',text()),'\".mb_strtolower($_GET['godinaf']).\"')]]\";\t\n\t\t\t$i++;\n\t\t}\n\t}\n\t\n\tif(isset($_REQUEST['najbolji'])){\n\t\t$filter[$i] = \"[film[boolean(najbolji)]]\";\t\n\t\t$i++;\n\t}\n\t\n\tif(isset($_REQUEST['jezik'])){\n\t\t$filter[$i] = \"[film/jezik[contains(php:functionString('mb_strtolower',text()),'\".mb_strtolower($_GET['jezik']).\"')]]\";\t\n\t\t$i++;\n\t}\n\t\n\tif(isset($_REQUEST['zanr'])){\n\t\t$zanrovi=$_REQUEST['zanr'];\n\t\t$brzanrova=count($zanrovi);\n\t\t$filter[$i] = \"[film[zanr[contains(php:functionString('mb_strtolower',text()),'\".mb_strtolower($zanrovi[0]).\"')]]\";\n\t\tfor ($x=1; $x<$brzanrova; $x++){\n\t\t\t$filter[$i].=\" and film[zanr[contains(php:functionString('mb_strtolower',text()),'\".mb_strtolower($zanrovi[$x]).\"')]]\";\n\t\t}\n\t\t$filter[$i].=\"]\";\n\t\t\n\t\t$i++;\n\t}\n\t\n\t//prebaci ih sve u jedan filter string\n\t$sfilter=\"\";\n\tfor ($x=0; $x<$i; $x++){\n\t\t$sfilter.=$filter[$x];\n\t}\n\treturn $sfilter;\n}", "title": "" }, { "docid": "60d06750b25aba1bc9d353c51a413c6f", "score": "0.6285274", "text": "function getFilter()\r\n {\r\n $this->headFilter;\r\n }", "title": "" }, { "docid": "b37435c5c83628aca4945b0ab65e2f2d", "score": "0.62698203", "text": "private function filters() {\n\n\t}", "title": "" }, { "docid": "1a4a49fa92f670761376a86e9c0a33ce", "score": "0.62692535", "text": "function get_filter($form){\r\n $output='';\r\n if (!isset($form['filter'])) return $output;\r\n foreach ($form['filter'] as $element => $content){\r\n if (is_array($content)&&isset($content['#type'])){\r\n switch ($content['#type']){\r\n case'select':\r\n \t if($content['#default_value']<>-1) $output.= ($output<>''?' AND ':'').$content['#SQL_FIELD'].'='.$content['#options'][$content['#default_value']];\r\n \t break;\r\n case'checkboxes':\r\n foreach($content['#default_value'] as $key=>$val) {\r\n if ($val <>0) $res.=($res<>''?', ':'').$key; //compone la lista delle chiavi per la struttura IN ( )\r\n }\r\n if ($res<>'') $output.= ($output<>''?' AND ':'').$content['#SQL_FIELD'].' IN ('.$res.') ';\r\n break;\r\n case 'radios':\r\n if (is_array($content['#SQL_FIELD'])) $output.= ($output<>''&&$content['#SQL_FIELD'][$content['#default_value']]<>''?' AND ':'').$content['#SQL_FIELD'][$content['#default_value']];\r\n else $output.= ($output<>''?' AND ':'').$content['#SQL_FIELD'].'='.$content['#default_value'];\r\n break;\r\n }\r\n }\r\n }\r\n return $output;\r\n}", "title": "" }, { "docid": "7ebac2d6ab00d41df6784ab208256db5", "score": "0.62619245", "text": "function get_filter($filters){\n\t$where = $group = \"\";\n\tif($filters) {\n\t\t$fil = json_decode($filters,true); \n\t\tif($fil[\"rules\"]!=null) { \n\n\t\t\tforeach ( $fil[\"rules\"] as $rule_key => $rule) {\n\t\t\t\t$searchField = $rule[\"field\"];\n\t\t\t\t$searchOper = $rule[\"op\"];\n\t\t\t\t$searchString = $rule[\"data\"];\n\t\t\t\tif($rule_key != 0) $groupOp = $fil[\"groupOp\"];\n\t\t\t\t\n\t\t\t\tif ($_POST['_search'] == 'true') {\n\t\t\t $ops = array(\n\t\t\t 'eq'=>'=', \n\t\t\t 'ne'=>'<>',\n\t\t\t 'lt'=>'<', \n\t\t\t 'le'=>'<=',\n\t\t\t 'gt'=>'>', \n\t\t\t 'ge'=>'>=',\n\t\t\t 'bw'=>'LIKE',\n\t\t\t 'bn'=>'NOT LIKE',\n\t\t\t 'in'=>'LIKE', \n\t\t\t 'ni'=>'NOT LIKE', \n\t\t\t 'ew'=>'LIKE', \n\t\t\t 'en'=>'NOT LIKE', \n\t\t\t 'cn'=>'LIKE', \n\t\t\t 'nc'=>'NOT LIKE' \n\t\t\t );\n\t\t\t foreach ($ops as $key=>$value){\n\t\t\t if ($searchOper==$key) {\n\t\t\t $ops = $value;\n\t\t\t }\n\t\t\t }\n\t\t\t if($searchOper == 'eq' ) $searchString = $searchString;\n\t\t\t if($searchOper == 'bw' || $searchOper == 'bn') $searchString .= '%';\n\t\t\t if($searchOper == 'ew' || $searchOper == 'en' ) $searchString = '%'.$searchString;\n\t\t\t if($searchOper == 'cn' || $searchOper == 'nc' || $searchOper == 'in' || $searchOper == 'ni') $searchString = '%'.$searchString.'%';\n\n\t\t\t $where .= $groupOp;\n\t\t\t\t\t\n\t\t\t //$where .= \"$searchField $ops '$searchString'\"; \n\t\t\t\t\t$where .= \" $searchField $ops '\".$searchString.\"' \"; \n\n\t\t\t }\n\t\t\t}\n\t\t} \n\t}\n\treturn $where;\n}", "title": "" }, { "docid": "d0bb2f505f552986277a96ca07178822", "score": "0.62604195", "text": "function _filter_get_where(array $filter)\n\t{\n\t\t$where = parent::_filter_get_where($filter);\n\t\t//pr($filter);\n\t\tforeach (array('id','type') as $key) {\n\t\t\tif (isset($filter[$key]) && $filter[$key] != -1) {\n\t\t\t\t//echo '<br>key='.$key.', v='.$filter[$key];\n\t\t\t\t$this->_filter_parse_where($key, $filter);\n\t\t\t}\n\t\t}\n\t\tif (isset($filter['status']))\n\t\t{\n\t\t\t$v = ($filter['status']) ;//? 'on' : 'off';\n\t\t\t$where[$this->table.'.'.'status'] = config('status_'.$v, 'main');\n\t\t}\n\t\tif (isset($filter['title']))\n\t\t{\n\t\t\t$this->search('page', 'title', $filter['title']);\n\t\t}\n\t\t//=== Su ly loc theo ngay tao\n\t\t// 1: tu ngay - den ngay\n\t\tif (isset($filter['created']) && isset($filter['created_to'])) {\n\t\t\t$where[$this->table . '.created >='] = is_numeric($filter['created']) ? $filter['created'] : get_time_from_date($filter['created']);\n\t\t\t$where[$this->table . '.created <='] = is_numeric($filter['created_to']) ? $filter['created_to'] : get_time_from_date($filter['created_to']) + 24 * 60 * 60;// phai cong them 1 ngay de thoi gian no la cuoi cua ngay hien thoi\n\t\t} //2: tu ngay\n\t\telseif (isset($filter['created'])) {\n\t\t\t$where[$this->table . '.created >='] = is_numeric($filter['created']) ? $filter['created'] : get_time_from_date($filter['created']);\n\t\t} //3: den ngay\n\t\telseif (isset($filter['created_to'])) {\n\t\t\t$where[$this->table . '.created <='] = is_numeric($filter['created_to']) ? $filter['created_to'] : get_time_from_date($filter['created_to']) + 24 * 60 * 60;// phai cong them 1 ngay de thoi gian no la cuoi cua ngay hien thoi\n\t\t}\n\n\t\t// hien thi san pham phia ngoai\n\t\tif (isset($filter['show'])) {\n\t\t\t$where[$this->table . '.status'] = '1';\n\t\t}\n\t\treturn $where;\n\t\treturn $where;\n\t}", "title": "" }, { "docid": "b44c9bc8189c08e3314c71caa3d0bc4c", "score": "0.6247339", "text": "protected function getFilters()\n { \n $filters = parent::getFilters(); \n $filters['internado_id'] = sfContext::getInstance()->getRequest()->getParameter('internado_id');\n return $filters;\n }", "title": "" }, { "docid": "d26f2fa020d80b0c2fded70b729214d0", "score": "0.62151986", "text": "function filter($results);", "title": "" }, { "docid": "a1c1b9f9e0306dcb2f6e919aec4b8f2a", "score": "0.6191358", "text": "function filtro($f_key) {\n $filtro = '';\n if (isset($_SESSION['filtro'][$this->key][$f_key]))\n $filtro = $_SESSION['filtro'][$this->key][$f_key];\n if (isset($_GET[$f_key])) \n {\n $filtro = $_GET[$f_key];\n }\n $_SESSION['filtro'][$this->key][$f_key] = $filtro;\n return $filtro;\n }", "title": "" }, { "docid": "592bb2207b94925380ab9127c5047677", "score": "0.6148225", "text": "public function getDataFilter() {\n\n $tool = new Tools();\n $tool->dbc = $this->dbc;\n\n $USERID = $_SESSION['USERID'];\n $PERFIL = $_SESSION['PROFILE'];\n $tabla = $this->getTable();\n\n $query = \"select valor from tbl_filtro_categoria where cuenta_id = $this->cuentaID and perfil = '$PERFIL' and userid = $USERID and tabla = '$tabla' \";\n\n $result = $tool->simple_db($query);\n\n if ($tool->getNreg() > 0)\n return $result;\n else\n return 0;\n }", "title": "" }, { "docid": "0379594a59124455d79a9aa1efd001a3", "score": "0.61392707", "text": "function _getFilter($filter, $aliasmap, $current='') \n {\n return $this->caller->getFilter($filter, $aliasmap, $current);\n }", "title": "" }, { "docid": "172d60e549e88322f82f7ab00bb4886d", "score": "0.613346", "text": "abstract public function filter($value);", "title": "" }, { "docid": "5aaa9ac351ee7cf2d3c2d33f79c18bd1", "score": "0.61183906", "text": "public function filters() \n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "25d1f09e4875c3f8afa15bec0ca091c9", "score": "0.6083792", "text": "function filterTentor(){\n\t\t$res = $this->JK_model->getFilterSelectTentor($_GET['q']); echo json_encode($res);\n\t}", "title": "" }, { "docid": "f6236c31fff277b74b844fa021d9ec38", "score": "0.60819066", "text": "protected function applicaFiltro()\n\t\t{\n\t\tif (!is_array( $_GET[\"watbl_fc\"][$this->nome]))\n\t\t\treturn;\n\t\t\t\n\t\t$where = \"\";\n\t\tforeach( $_GET[\"watbl_fc\"][$this->nome] as $idx => $nomeCampo)\n\t\t\t{\n\t\t\t$col = $this->colonne[$nomeCampo];\n\t\t\tif (!$col || $this->dammiIndiceFiltroColonna($col) !== $idx)\n\t\t\t\tcontinue;\n\n\t\t\t$nomeCampo = $col->aliasDi ? $col->aliasDi : $col->nome;\n\t\t\t$operatore = $this->dammiModoFiltroColonna($idx);\n\t\t\t$valore = $this->dammiSqlValore($col, $this->dammiValoreFiltroColonna($idx), $operatore);\n\t\t\t$where .= ($where ? \" AND \" : '') . \n\t\t\t\t\t\t($col->aliasDi ? $col->aliasDi : $col->nome) .\n\t\t\t\t\t\t$operatore . $valore;\n\t\t\t}\n\n\t\tif (!$where)\n\t\t\treturn;\n\t\t\t\n\t\t$this->filtroAttivo = true;\n\t\t$this->WhereClause = (!$this->WhereClause ? \"WHERE\" : \"$this->WhereClause AND\") . \" $where\";\n\t\t\t\n\t\t}", "title": "" }, { "docid": "a267c243b4d51b8164c2baa9a852e0c4", "score": "0.60533035", "text": "function getFilter($filter, $aliasmap, $current='') \n {\n global $blogid, $catid, $memberid, $archive;\n \n $fparams = explode(' ', $filter);\n \n if (! is_array($current)) {\n $current = array(\n 'blogid' => $blogid,\n 'catid' => $catid,\n 'memberid' => $memberid,\n 'arcdate' => $archive,\n );\n }\n \n $filters = array();\n foreach ($fparams as $fil) {\n //replace '@' to current id\n if (substr($fil, -1, 1) == '@') {\n preg_match('/^([a-z]+?)[!=<>]/', $fil, $match); //pick up left side\n if ($current[ $match[1] ]) {\n $fil = substr($fil, 0, -1) . $current[ $match[1] ];\n }\n else continue; //if current key/value is not defined, skip it.\n }\n \n //replace because it can't use aliases in WHERE clause.\n $fil = str_replace($aliasmap['search'], $aliasmap['replace'], $fil);\n \n $match = null;\n preg_match('/^([a-zA-Z0-9(),._-]+?)(<>|>=|<=|!=|=~|!~|[=<>])(.+?)$/', $fil, $match);\n \n if (isset($match[1]) and isset($match[2]) and isset($match[3])) {\n if ($match[2] == '=~') $match[2] = ' LIKE ';\n if ($match[2] == '!~') $match[2] = ' NOT LIKE ';\n \n if (strpos($match[3], '|')) { //multiple values\n $values = explode('|', $match[3]);\n $f = array();\n foreach ($values as $v) {\n $f[] = $match[1] . $match[2] .'\"'. sql_real_escape_string($v) .'\"';\n }\n if ($match[2] == '<>' or $match[2] == '!=' or $match[2] == '!~') $cond = ' AND '; //'NOT' condition\n else $cond = ' OR '; //normal condition\n $fil = '(' . join($cond, $f) . ')';\n $filters[] = $fil;\n }\n else { //single value \n $fil = $match[1] . $match[2] .'\"'. sql_real_escape_string($match[3]) .'\"';\n $filters[] = $fil;\n }\n }\n else {\n //wrong filter. skip it.\n }\n }\n return join(' AND ', $filters);\n }", "title": "" }, { "docid": "4d7d5a8073ac666174a5896681c95db0", "score": "0.60481024", "text": "public function getFiltrados($filtroNombre){\r\n\t\treturn R::find('color','where nombre like ? order by nombre',['%'.$filtroNombre.'%']);\r\n\t}", "title": "" }, { "docid": "04a5d71ed47ea260f7bc39a60c72a5e4", "score": "0.60463834", "text": "public function filtro() {\r\n\t\tif (Input::hasPost('articulos')) {\r\n\r\n\t\t\t$articulos = new Articulos(Input::post('articulos'));\n\t\t\t$this->lista = $articulos->filtro($id);\n\t\t}\n\t}", "title": "" }, { "docid": "7c3bf6855b396357a4fb140cf62a5d2b", "score": "0.6038182", "text": "abstract public function getFilters(): array;", "title": "" }, { "docid": "7c22bc43a4f01bcb3c90ef8a79612323", "score": "0.60345787", "text": "function getFilterRequest($filter){\n\t$filters = array(\n\t\t\"all\" => '',\n\t\t\"todo\" => ' WHERE `task_ended_on` IS NULL',\n\t\t\"done\" => ' WHERE `task_ended_on` IS NOT NULL AND `task_ended_on` < `task_end`',\n\t\t\"late\" => ' WHERE `task_ended_on` IS NOT NULL AND `task_ended_on` > `task_end`'\n\t);\n\treturn $filters[$filter];\n}", "title": "" }, { "docid": "07382ee09ed7c812f9c22345ce7e067e", "score": "0.60336757", "text": "public function availableFilters();", "title": "" }, { "docid": "03ff4bff1ad71277365f9e9a82f05b5b", "score": "0.6025051", "text": "public function getFilter() {\n return array(\n 'id-starts-with' => $this->papaya()->session->values->get(\n array($this, 'search', 'id-starts-with'), NULL\n ),\n 'status' => $this->papaya()->session->values->get(\n array($this, 'search', 'status'), NULL\n ),\n 'data-contains' => $this->papaya()->session->values->get(\n array($this, 'search', 'data-contains'), NULL\n ),\n 'time-from' => $this->papaya()->session->values->get(\n array($this, 'search', 'time-from'), NULL\n ),\n 'time-to' => $this->papaya()->session->values->get(\n array($this, 'search', 'time-to'), NULL\n ),\n 'task-guid' => $this->papaya()->session->values->get(\n array($this, 'search', 'task-guid'), NULL\n )\n );\n }", "title": "" }, { "docid": "df4a0be708d2217f708f640969e6d68d", "score": "0.6018375", "text": "abstract protected function getFilterMapping();", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.60009664", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.60009664", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.60009664", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.60009664", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.60009664", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.60009664", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.60009664", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.60009664", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.60009664", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.60009664", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.60009664", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.60009664", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.60009664", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.60009664", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "d93e662696cd281d0eb3aca098aa5917", "score": "0.60009664", "text": "public function getFilter()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "007bab5288b363878af4ce9369f931c1", "score": "0.5995145", "text": "public function getFiltrados($filtroUsuario,$filtroDatosTexto){\r\n\t\treturn R::find('texto','where datos_texto like ? and usuario_id like ? order by id',['%'.$filtroDatosTexto.'%','%'.$filtroUsuario.'%']);\r\n\t}", "title": "" }, { "docid": "84a4ee46317dcb6c2d1930159a76e922", "score": "0.59919053", "text": "function MkOperationFilter($key)\n\t{\n\t\t// refactored: body of function moved to CLearnHelper class\n\t\treturn (CLearnHelper::MkOperationFilter($key));\n\t}", "title": "" }, { "docid": "96eee9633f8ed130fb7e6a45af7e11f4", "score": "0.59866875", "text": "private function get_filters() {\n\t\treturn array_intersect_key( $this->query_args, $this->filters );\n\t}", "title": "" }, { "docid": "0ac797a18ff9e9bc16b9bd0fcf6f007a", "score": "0.598649", "text": "public function getFiltered() {\n \n return $this->_filtered ? $this->_filtered : 0;\n\n }", "title": "" }, { "docid": "61f47bebf22754b3a677e2ee5b8381ac", "score": "0.59772635", "text": "protected function filter()\n {\n $request = $this->getRequest();\n $session = $request->getSession();\n $filterForm = $this->createForm(new ClienteFilterType());\n $em = $this->getDoctrine()->getManager();\n $queryBuilder = $em->getRepository('ContadoresBundle:Cliente')->createQueryBuilder('e');\n\n // Solo entidades activas\n $queryBuilder = $em->getRepository('ContadoresBundle:Cliente')->createQueryBuilder('d')\n ->andWhere('d.activo = ?1')\n ->setParameter(1, true)\n ;\n\n // Reset filter\n if ($request->get('filter_action') == 'reset') {\n $session->remove('ClienteControllerFilter');\n }\n\n // Filter action\n if ($request->get('filter_action') == 'filter') {\n // Bind values from the request\n $filterForm->bind($request);\n\n if ($filterForm->isValid()) {\n // Build the query from the given form object\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n // Save filter to session\n $filterData = $filterForm->getData();\n $session->set('ClienteControllerFilter', $filterData);\n }\n } else {\n // Get filter from session\n if ($session->has('ClienteControllerFilter')) {\n $filterData = $session->get('ClienteControllerFilter');\n $filterForm = $this->createForm(new ClienteFilterType(), $filterData);\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n }\n }\n\n return array($filterForm, $queryBuilder);\n }", "title": "" }, { "docid": "43ee346b8cb44dc9a445a4c276f05cdf", "score": "0.59769464", "text": "function AdvancedSearchWhere() {\n\t\tglobal $Security, $contadores;\n\t\t$sWhere = \"\";\n\t\t$this->BuildSearchSql($sWhere, $contadores->id, FALSE); // id\n\t\t$this->BuildSearchSql($sWhere, $contadores->op, FALSE); // op\n\t\t$this->BuildSearchSql($sWhere, $contadores->zona, FALSE); // zona\n\t\t$this->BuildSearchSql($sWhere, $contadores->descripcion, FALSE); // descripcion\n\t\t$this->BuildSearchSql($sWhere, $contadores->programa, FALSE); // programa\n\t\t$this->BuildSearchSql($sWhere, $contadores->diahasta, FALSE); // diahasta\n\t\t$this->BuildSearchSql($sWhere, $contadores->objetivo, FALSE); // objetivo\n\t\t$this->BuildSearchSql($sWhere, $contadores->op2, FALSE); // op2\n\t\t$this->BuildSearchSql($sWhere, $contadores->horahasta, FALSE); // horahasta\n\t\t$this->BuildSearchSql($sWhere, $contadores->material, FALSE); // material\n\t\t$this->BuildSearchSql($sWhere, $contadores->orden, FALSE); // orden\n\n\t\t// Set up search parm\n\t\tif ($sWhere <> \"\") {\n\t\t\t$this->SetSearchParm($contadores->id); // id\n\t\t\t$this->SetSearchParm($contadores->op); // op\n\t\t\t$this->SetSearchParm($contadores->zona); // zona\n\t\t\t$this->SetSearchParm($contadores->descripcion); // descripcion\n\t\t\t$this->SetSearchParm($contadores->programa); // programa\n\t\t\t$this->SetSearchParm($contadores->diahasta); // diahasta\n\t\t\t$this->SetSearchParm($contadores->objetivo); // objetivo\n\t\t\t$this->SetSearchParm($contadores->op2); // op2\n\t\t\t$this->SetSearchParm($contadores->horahasta); // horahasta\n\t\t\t$this->SetSearchParm($contadores->material); // material\n\t\t\t$this->SetSearchParm($contadores->orden); // orden\n\t\t}\n\t\treturn $sWhere;\n\t}", "title": "" }, { "docid": "c3076a415635ae767161578dca126072", "score": "0.596931", "text": "function GetFilterList() {\n\t\tglobal $UserProfile;\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\t\t$sSavedFilterList = \"\";\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_neonato->AdvancedSearch->ToJson(), \",\"); // Field id_neonato\n\t\t$sFilterList = ew_Concat($sFilterList, $this->apellidopaterno->AdvancedSearch->ToJson(), \",\"); // Field apellidopaterno\n\t\t$sFilterList = ew_Concat($sFilterList, $this->apellidomaterno->AdvancedSearch->ToJson(), \",\"); // Field apellidomaterno\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nombre->AdvancedSearch->ToJson(), \",\"); // Field nombre\n\t\t$sFilterList = ew_Concat($sFilterList, $this->ci->AdvancedSearch->ToJson(), \",\"); // Field ci\n\t\t$sFilterList = ew_Concat($sFilterList, $this->fecha_nacimiento->AdvancedSearch->ToJson(), \",\"); // Field fecha_nacimiento\n\t\t$sFilterList = ew_Concat($sFilterList, $this->dias->AdvancedSearch->ToJson(), \",\"); // Field dias\n\t\t$sFilterList = ew_Concat($sFilterList, $this->semanas->AdvancedSearch->ToJson(), \",\"); // Field semanas\n\t\t$sFilterList = ew_Concat($sFilterList, $this->meses->AdvancedSearch->ToJson(), \",\"); // Field meses\n\t\t$sFilterList = ew_Concat($sFilterList, $this->discapacidad->AdvancedSearch->ToJson(), \",\"); // Field discapacidad\n\t\t$sFilterList = ew_Concat($sFilterList, $this->resultado->AdvancedSearch->ToJson(), \",\"); // Field resultado\n\t\t$sFilterList = ew_Concat($sFilterList, $this->observaciones->AdvancedSearch->ToJson(), \",\"); // Field observaciones\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoprueba->AdvancedSearch->ToJson(), \",\"); // Field tipoprueba\n\t\t$sFilterList = ew_Concat($sFilterList, $this->resultadprueba->AdvancedSearch->ToJson(), \",\"); // Field resultadprueba\n\t\t$sFilterList = ew_Concat($sFilterList, $this->recomendacion->AdvancedSearch->ToJson(), \",\"); // Field recomendacion\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_tipodiagnosticoaudiologia->AdvancedSearch->ToJson(), \",\"); // Field id_tipodiagnosticoaudiologia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nombrediagnotico->AdvancedSearch->ToJson(), \",\"); // Field nombrediagnotico\n\t\t$sFilterList = ew_Concat($sFilterList, $this->resultadodiagnostico->AdvancedSearch->ToJson(), \",\"); // Field resultadodiagnostico\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipotratamiento->AdvancedSearch->ToJson(), \",\"); // Field tipotratamiento\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoderivacion->AdvancedSearch->ToJson(), \",\"); // Field tipoderivacion\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nombreespcialidad->AdvancedSearch->ToJson(), \",\"); // Field nombreespcialidad\n\t\t$sFilterList = ew_Concat($sFilterList, $this->observaciones1->AdvancedSearch->ToJson(), \",\"); // Field observaciones1\n\t\t$sFilterList = ew_Concat($sFilterList, $this->fecha->AdvancedSearch->ToJson(), \",\"); // Field fecha\n\t\tif ($this->BasicSearch->Keyword <> \"\") {\n\t\t\t$sWrk = \"\\\"\" . EW_TABLE_BASIC_SEARCH . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Keyword) . \"\\\",\\\"\" . EW_TABLE_BASIC_SEARCH_TYPE . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Type) . \"\\\"\";\n\t\t\t$sFilterList = ew_Concat($sFilterList, $sWrk, \",\");\n\t\t}\n\t\t$sFilterList = preg_replace('/,$/', \"\", $sFilterList);\n\n\t\t// Return filter list in json\n\t\tif ($sFilterList <> \"\")\n\t\t\t$sFilterList = \"\\\"data\\\":{\" . $sFilterList . \"}\";\n\t\tif ($sSavedFilterList <> \"\") {\n\t\t\tif ($sFilterList <> \"\")\n\t\t\t\t$sFilterList .= \",\";\n\t\t\t$sFilterList .= \"\\\"filters\\\":\" . $sSavedFilterList;\n\t\t}\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\n\t}", "title": "" }, { "docid": "db0a21fceabe2bbdcd15112671b6355b", "score": "0.5966268", "text": "function shh_newFilter($options);", "title": "" }, { "docid": "1d66e374f33b5ff06d6d3f95f5033bfd", "score": "0.59548444", "text": "public function getFilters(): array;", "title": "" }, { "docid": "1469caa083471dbf3d5de7d257223599", "score": "0.5944189", "text": "public function getCriteria();", "title": "" }, { "docid": "1469caa083471dbf3d5de7d257223599", "score": "0.5944189", "text": "public function getCriteria();", "title": "" }, { "docid": "e0985e36155127a8d4266cfad70c654c", "score": "0.5930014", "text": "public function filter(){\r\n\t\t\t$this->pagina = 1;\r\n\t\t\t$this->filtroSQL = \"SELECT p.long_name pais, pro.provincia, pf.long_name fpais, prof.provincia fprovincia, cli.* \r\n\t\t\t\tFROM clientes cli LEFT JOIN pais p ON (cli.id_pais=p.id) LEFT JOIN provincias pro ON (cli.id_provincia=pro.id) \r\n\t\t\t\tLEFT JOIN pais pf ON (cli.f_id_pais=pf.id) LEFT JOIN provincias prof ON (cli.f_id_provincia=prof.id) WHERE\";\r\n\t\t\t$this->computeFilter();\r\n\t\t\t$this->listAll();\r\n\t\t}", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.592911", "text": "public function getFilters();", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.592911", "text": "public function getFilters();", "title": "" }, { "docid": "845f9f549866aae35dba94be2b3e052d", "score": "0.592165", "text": "function key_filter_or(array $filter /*. ,$filter .*/) {\n\t\t$args = func_get_args ();\n\t\tarray_unshift ( $args, 'or' );\n\t\treturn call_user_func_array ( array (\n\t\t\t\t$this,\n\t\t\t\t'key_filter_operator' \n\t\t), $args );\n\t}", "title": "" }, { "docid": "1aa1d67580547ba42f84f73d84bb7f1e", "score": "0.590687", "text": "function RestoreFilterList() {\n\n\t\t// Return if not reset filter\n\t\tif (@$_POST[\"cmd\"] <> \"resetfilter\")\n\t\t\treturn FALSE;\n\t\t$filter = json_decode(@$_POST[\"filter\"], TRUE);\n\t\t$this->Command = \"search\";\n\n\t\t// Field id_neonato\n\t\t$this->id_neonato->AdvancedSearch->SearchValue = @$filter[\"x_id_neonato\"];\n\t\t$this->id_neonato->AdvancedSearch->SearchOperator = @$filter[\"z_id_neonato\"];\n\t\t$this->id_neonato->AdvancedSearch->SearchCondition = @$filter[\"v_id_neonato\"];\n\t\t$this->id_neonato->AdvancedSearch->SearchValue2 = @$filter[\"y_id_neonato\"];\n\t\t$this->id_neonato->AdvancedSearch->SearchOperator2 = @$filter[\"w_id_neonato\"];\n\t\t$this->id_neonato->AdvancedSearch->Save();\n\n\t\t// Field apellidopaterno\n\t\t$this->apellidopaterno->AdvancedSearch->SearchValue = @$filter[\"x_apellidopaterno\"];\n\t\t$this->apellidopaterno->AdvancedSearch->SearchOperator = @$filter[\"z_apellidopaterno\"];\n\t\t$this->apellidopaterno->AdvancedSearch->SearchCondition = @$filter[\"v_apellidopaterno\"];\n\t\t$this->apellidopaterno->AdvancedSearch->SearchValue2 = @$filter[\"y_apellidopaterno\"];\n\t\t$this->apellidopaterno->AdvancedSearch->SearchOperator2 = @$filter[\"w_apellidopaterno\"];\n\t\t$this->apellidopaterno->AdvancedSearch->Save();\n\n\t\t// Field apellidomaterno\n\t\t$this->apellidomaterno->AdvancedSearch->SearchValue = @$filter[\"x_apellidomaterno\"];\n\t\t$this->apellidomaterno->AdvancedSearch->SearchOperator = @$filter[\"z_apellidomaterno\"];\n\t\t$this->apellidomaterno->AdvancedSearch->SearchCondition = @$filter[\"v_apellidomaterno\"];\n\t\t$this->apellidomaterno->AdvancedSearch->SearchValue2 = @$filter[\"y_apellidomaterno\"];\n\t\t$this->apellidomaterno->AdvancedSearch->SearchOperator2 = @$filter[\"w_apellidomaterno\"];\n\t\t$this->apellidomaterno->AdvancedSearch->Save();\n\n\t\t// Field nombre\n\t\t$this->nombre->AdvancedSearch->SearchValue = @$filter[\"x_nombre\"];\n\t\t$this->nombre->AdvancedSearch->SearchOperator = @$filter[\"z_nombre\"];\n\t\t$this->nombre->AdvancedSearch->SearchCondition = @$filter[\"v_nombre\"];\n\t\t$this->nombre->AdvancedSearch->SearchValue2 = @$filter[\"y_nombre\"];\n\t\t$this->nombre->AdvancedSearch->SearchOperator2 = @$filter[\"w_nombre\"];\n\t\t$this->nombre->AdvancedSearch->Save();\n\n\t\t// Field ci\n\t\t$this->ci->AdvancedSearch->SearchValue = @$filter[\"x_ci\"];\n\t\t$this->ci->AdvancedSearch->SearchOperator = @$filter[\"z_ci\"];\n\t\t$this->ci->AdvancedSearch->SearchCondition = @$filter[\"v_ci\"];\n\t\t$this->ci->AdvancedSearch->SearchValue2 = @$filter[\"y_ci\"];\n\t\t$this->ci->AdvancedSearch->SearchOperator2 = @$filter[\"w_ci\"];\n\t\t$this->ci->AdvancedSearch->Save();\n\n\t\t// Field fecha_nacimiento\n\t\t$this->fecha_nacimiento->AdvancedSearch->SearchValue = @$filter[\"x_fecha_nacimiento\"];\n\t\t$this->fecha_nacimiento->AdvancedSearch->SearchOperator = @$filter[\"z_fecha_nacimiento\"];\n\t\t$this->fecha_nacimiento->AdvancedSearch->SearchCondition = @$filter[\"v_fecha_nacimiento\"];\n\t\t$this->fecha_nacimiento->AdvancedSearch->SearchValue2 = @$filter[\"y_fecha_nacimiento\"];\n\t\t$this->fecha_nacimiento->AdvancedSearch->SearchOperator2 = @$filter[\"w_fecha_nacimiento\"];\n\t\t$this->fecha_nacimiento->AdvancedSearch->Save();\n\n\t\t// Field dias\n\t\t$this->dias->AdvancedSearch->SearchValue = @$filter[\"x_dias\"];\n\t\t$this->dias->AdvancedSearch->SearchOperator = @$filter[\"z_dias\"];\n\t\t$this->dias->AdvancedSearch->SearchCondition = @$filter[\"v_dias\"];\n\t\t$this->dias->AdvancedSearch->SearchValue2 = @$filter[\"y_dias\"];\n\t\t$this->dias->AdvancedSearch->SearchOperator2 = @$filter[\"w_dias\"];\n\t\t$this->dias->AdvancedSearch->Save();\n\n\t\t// Field semanas\n\t\t$this->semanas->AdvancedSearch->SearchValue = @$filter[\"x_semanas\"];\n\t\t$this->semanas->AdvancedSearch->SearchOperator = @$filter[\"z_semanas\"];\n\t\t$this->semanas->AdvancedSearch->SearchCondition = @$filter[\"v_semanas\"];\n\t\t$this->semanas->AdvancedSearch->SearchValue2 = @$filter[\"y_semanas\"];\n\t\t$this->semanas->AdvancedSearch->SearchOperator2 = @$filter[\"w_semanas\"];\n\t\t$this->semanas->AdvancedSearch->Save();\n\n\t\t// Field meses\n\t\t$this->meses->AdvancedSearch->SearchValue = @$filter[\"x_meses\"];\n\t\t$this->meses->AdvancedSearch->SearchOperator = @$filter[\"z_meses\"];\n\t\t$this->meses->AdvancedSearch->SearchCondition = @$filter[\"v_meses\"];\n\t\t$this->meses->AdvancedSearch->SearchValue2 = @$filter[\"y_meses\"];\n\t\t$this->meses->AdvancedSearch->SearchOperator2 = @$filter[\"w_meses\"];\n\t\t$this->meses->AdvancedSearch->Save();\n\n\t\t// Field discapacidad\n\t\t$this->discapacidad->AdvancedSearch->SearchValue = @$filter[\"x_discapacidad\"];\n\t\t$this->discapacidad->AdvancedSearch->SearchOperator = @$filter[\"z_discapacidad\"];\n\t\t$this->discapacidad->AdvancedSearch->SearchCondition = @$filter[\"v_discapacidad\"];\n\t\t$this->discapacidad->AdvancedSearch->SearchValue2 = @$filter[\"y_discapacidad\"];\n\t\t$this->discapacidad->AdvancedSearch->SearchOperator2 = @$filter[\"w_discapacidad\"];\n\t\t$this->discapacidad->AdvancedSearch->Save();\n\n\t\t// Field resultado\n\t\t$this->resultado->AdvancedSearch->SearchValue = @$filter[\"x_resultado\"];\n\t\t$this->resultado->AdvancedSearch->SearchOperator = @$filter[\"z_resultado\"];\n\t\t$this->resultado->AdvancedSearch->SearchCondition = @$filter[\"v_resultado\"];\n\t\t$this->resultado->AdvancedSearch->SearchValue2 = @$filter[\"y_resultado\"];\n\t\t$this->resultado->AdvancedSearch->SearchOperator2 = @$filter[\"w_resultado\"];\n\t\t$this->resultado->AdvancedSearch->Save();\n\n\t\t// Field observaciones\n\t\t$this->observaciones->AdvancedSearch->SearchValue = @$filter[\"x_observaciones\"];\n\t\t$this->observaciones->AdvancedSearch->SearchOperator = @$filter[\"z_observaciones\"];\n\t\t$this->observaciones->AdvancedSearch->SearchCondition = @$filter[\"v_observaciones\"];\n\t\t$this->observaciones->AdvancedSearch->SearchValue2 = @$filter[\"y_observaciones\"];\n\t\t$this->observaciones->AdvancedSearch->SearchOperator2 = @$filter[\"w_observaciones\"];\n\t\t$this->observaciones->AdvancedSearch->Save();\n\n\t\t// Field tipoprueba\n\t\t$this->tipoprueba->AdvancedSearch->SearchValue = @$filter[\"x_tipoprueba\"];\n\t\t$this->tipoprueba->AdvancedSearch->SearchOperator = @$filter[\"z_tipoprueba\"];\n\t\t$this->tipoprueba->AdvancedSearch->SearchCondition = @$filter[\"v_tipoprueba\"];\n\t\t$this->tipoprueba->AdvancedSearch->SearchValue2 = @$filter[\"y_tipoprueba\"];\n\t\t$this->tipoprueba->AdvancedSearch->SearchOperator2 = @$filter[\"w_tipoprueba\"];\n\t\t$this->tipoprueba->AdvancedSearch->Save();\n\n\t\t// Field resultadprueba\n\t\t$this->resultadprueba->AdvancedSearch->SearchValue = @$filter[\"x_resultadprueba\"];\n\t\t$this->resultadprueba->AdvancedSearch->SearchOperator = @$filter[\"z_resultadprueba\"];\n\t\t$this->resultadprueba->AdvancedSearch->SearchCondition = @$filter[\"v_resultadprueba\"];\n\t\t$this->resultadprueba->AdvancedSearch->SearchValue2 = @$filter[\"y_resultadprueba\"];\n\t\t$this->resultadprueba->AdvancedSearch->SearchOperator2 = @$filter[\"w_resultadprueba\"];\n\t\t$this->resultadprueba->AdvancedSearch->Save();\n\n\t\t// Field recomendacion\n\t\t$this->recomendacion->AdvancedSearch->SearchValue = @$filter[\"x_recomendacion\"];\n\t\t$this->recomendacion->AdvancedSearch->SearchOperator = @$filter[\"z_recomendacion\"];\n\t\t$this->recomendacion->AdvancedSearch->SearchCondition = @$filter[\"v_recomendacion\"];\n\t\t$this->recomendacion->AdvancedSearch->SearchValue2 = @$filter[\"y_recomendacion\"];\n\t\t$this->recomendacion->AdvancedSearch->SearchOperator2 = @$filter[\"w_recomendacion\"];\n\t\t$this->recomendacion->AdvancedSearch->Save();\n\n\t\t// Field id_tipodiagnosticoaudiologia\n\t\t$this->id_tipodiagnosticoaudiologia->AdvancedSearch->SearchValue = @$filter[\"x_id_tipodiagnosticoaudiologia\"];\n\t\t$this->id_tipodiagnosticoaudiologia->AdvancedSearch->SearchOperator = @$filter[\"z_id_tipodiagnosticoaudiologia\"];\n\t\t$this->id_tipodiagnosticoaudiologia->AdvancedSearch->SearchCondition = @$filter[\"v_id_tipodiagnosticoaudiologia\"];\n\t\t$this->id_tipodiagnosticoaudiologia->AdvancedSearch->SearchValue2 = @$filter[\"y_id_tipodiagnosticoaudiologia\"];\n\t\t$this->id_tipodiagnosticoaudiologia->AdvancedSearch->SearchOperator2 = @$filter[\"w_id_tipodiagnosticoaudiologia\"];\n\t\t$this->id_tipodiagnosticoaudiologia->AdvancedSearch->Save();\n\n\t\t// Field nombrediagnotico\n\t\t$this->nombrediagnotico->AdvancedSearch->SearchValue = @$filter[\"x_nombrediagnotico\"];\n\t\t$this->nombrediagnotico->AdvancedSearch->SearchOperator = @$filter[\"z_nombrediagnotico\"];\n\t\t$this->nombrediagnotico->AdvancedSearch->SearchCondition = @$filter[\"v_nombrediagnotico\"];\n\t\t$this->nombrediagnotico->AdvancedSearch->SearchValue2 = @$filter[\"y_nombrediagnotico\"];\n\t\t$this->nombrediagnotico->AdvancedSearch->SearchOperator2 = @$filter[\"w_nombrediagnotico\"];\n\t\t$this->nombrediagnotico->AdvancedSearch->Save();\n\n\t\t// Field resultadodiagnostico\n\t\t$this->resultadodiagnostico->AdvancedSearch->SearchValue = @$filter[\"x_resultadodiagnostico\"];\n\t\t$this->resultadodiagnostico->AdvancedSearch->SearchOperator = @$filter[\"z_resultadodiagnostico\"];\n\t\t$this->resultadodiagnostico->AdvancedSearch->SearchCondition = @$filter[\"v_resultadodiagnostico\"];\n\t\t$this->resultadodiagnostico->AdvancedSearch->SearchValue2 = @$filter[\"y_resultadodiagnostico\"];\n\t\t$this->resultadodiagnostico->AdvancedSearch->SearchOperator2 = @$filter[\"w_resultadodiagnostico\"];\n\t\t$this->resultadodiagnostico->AdvancedSearch->Save();\n\n\t\t// Field tipotratamiento\n\t\t$this->tipotratamiento->AdvancedSearch->SearchValue = @$filter[\"x_tipotratamiento\"];\n\t\t$this->tipotratamiento->AdvancedSearch->SearchOperator = @$filter[\"z_tipotratamiento\"];\n\t\t$this->tipotratamiento->AdvancedSearch->SearchCondition = @$filter[\"v_tipotratamiento\"];\n\t\t$this->tipotratamiento->AdvancedSearch->SearchValue2 = @$filter[\"y_tipotratamiento\"];\n\t\t$this->tipotratamiento->AdvancedSearch->SearchOperator2 = @$filter[\"w_tipotratamiento\"];\n\t\t$this->tipotratamiento->AdvancedSearch->Save();\n\n\t\t// Field tipoderivacion\n\t\t$this->tipoderivacion->AdvancedSearch->SearchValue = @$filter[\"x_tipoderivacion\"];\n\t\t$this->tipoderivacion->AdvancedSearch->SearchOperator = @$filter[\"z_tipoderivacion\"];\n\t\t$this->tipoderivacion->AdvancedSearch->SearchCondition = @$filter[\"v_tipoderivacion\"];\n\t\t$this->tipoderivacion->AdvancedSearch->SearchValue2 = @$filter[\"y_tipoderivacion\"];\n\t\t$this->tipoderivacion->AdvancedSearch->SearchOperator2 = @$filter[\"w_tipoderivacion\"];\n\t\t$this->tipoderivacion->AdvancedSearch->Save();\n\n\t\t// Field nombreespcialidad\n\t\t$this->nombreespcialidad->AdvancedSearch->SearchValue = @$filter[\"x_nombreespcialidad\"];\n\t\t$this->nombreespcialidad->AdvancedSearch->SearchOperator = @$filter[\"z_nombreespcialidad\"];\n\t\t$this->nombreespcialidad->AdvancedSearch->SearchCondition = @$filter[\"v_nombreespcialidad\"];\n\t\t$this->nombreespcialidad->AdvancedSearch->SearchValue2 = @$filter[\"y_nombreespcialidad\"];\n\t\t$this->nombreespcialidad->AdvancedSearch->SearchOperator2 = @$filter[\"w_nombreespcialidad\"];\n\t\t$this->nombreespcialidad->AdvancedSearch->Save();\n\n\t\t// Field observaciones1\n\t\t$this->observaciones1->AdvancedSearch->SearchValue = @$filter[\"x_observaciones1\"];\n\t\t$this->observaciones1->AdvancedSearch->SearchOperator = @$filter[\"z_observaciones1\"];\n\t\t$this->observaciones1->AdvancedSearch->SearchCondition = @$filter[\"v_observaciones1\"];\n\t\t$this->observaciones1->AdvancedSearch->SearchValue2 = @$filter[\"y_observaciones1\"];\n\t\t$this->observaciones1->AdvancedSearch->SearchOperator2 = @$filter[\"w_observaciones1\"];\n\t\t$this->observaciones1->AdvancedSearch->Save();\n\n\t\t// Field fecha\n\t\t$this->fecha->AdvancedSearch->SearchValue = @$filter[\"x_fecha\"];\n\t\t$this->fecha->AdvancedSearch->SearchOperator = @$filter[\"z_fecha\"];\n\t\t$this->fecha->AdvancedSearch->SearchCondition = @$filter[\"v_fecha\"];\n\t\t$this->fecha->AdvancedSearch->SearchValue2 = @$filter[\"y_fecha\"];\n\t\t$this->fecha->AdvancedSearch->SearchOperator2 = @$filter[\"w_fecha\"];\n\t\t$this->fecha->AdvancedSearch->Save();\n\t\t$this->BasicSearch->setKeyword(@$filter[EW_TABLE_BASIC_SEARCH]);\n\t\t$this->BasicSearch->setType(@$filter[EW_TABLE_BASIC_SEARCH_TYPE]);\n\t}", "title": "" }, { "docid": "7d25243c17a5824c5196712d633f6bdd", "score": "0.5891103", "text": "function filter_type($result)\n{\n\tswitch ($result){\n case 1: \n return \"By Keyword\";\n\tcase 2:\n\t\treturn \"By Title\";\n\tcase 3:\n\t\treturn \"By Category\";\n\tcase 4:\n\t\treturn \"By User\";\n\tcase 5:\n\t\treturn \"By Playlist\";\n\t}\n}", "title": "" }, { "docid": "04c547fd66c98fc3164f6f340090f456", "score": "0.58825517", "text": "public function getFilterType(Request $request);", "title": "" }, { "docid": "669931fb80942889e1189124bef2cdf7", "score": "0.58774704", "text": "function getQueryByFilter( $parameters ) {\n\t$where = \"\";\n\t$aWhere = array();\n\tif ( isset($parameters[\"filters\"]) ):\n\t\t$keyAnt = \"\";\n\t\tforeach ($parameters[\"filters\"] as $key => $v):\n\t\t\t$not = false;\n\t\t\tif ( isset($parameters[\"filters\"][$key][\"fg\"]) ):\n\t\t\t\t$not = strtolower($parameters[\"filters\"][$key][\"fg\"]) == \"true\";\n\t\t\tendif;\n\t\t\t$notStr = ( $not ? \"NOT \" : \"\" );\n\t\t\tif ( $key == \"X\" ):\n\t\t\t\t$where .= \" AND ca.TP_SEXO \".$notStr.\"IN\";\n\t\t\telseif ( $key == \"U\" ):\n\t\t\t\t$where .= \" AND ca.ID_UNIDADE \".$notStr.\"IN\";\n\t\t\telseif ( $key == \"T\" ):\n\t\t\t\t$where .= \" AND ca.ID_CAD_MEMBRO \".$notStr.\"IN\";\n\t\t\telseif ( $key == \"C\" ):\n\t\t\t\t$where .= \" AND ap.TP_ITEM = 'CL' AND ap.ID \".$notStr.\"IN\";\n\t\t\telseif ( $key == \"E\" ):\n\t\t\t\t$where .= \" AND ap.TP_ITEM = 'ES' AND ap.CD_AREA_INTERNO <> 'ME' AND ap.ID \".$notStr.\"IN\";\n\t\t\telseif ( $key == \"M\" ):\n\t\t\t\t$where .= \" AND ap.TP_ITEM = 'ES' AND ap.CD_AREA_INTERNO = 'ME' AND ap.ID \".$notStr.\"IN\";\n elseif ( $key == \"IN\" ):\n $where .= \" AND ap.TP_ITEM = 'MT' AND ap.CD_AREA_INTERNO = 'TEMPO' AND ap.ID \".$notStr.\"IN\";\n elseif ( $key == \"A\" ):\n\t\t\t\t$where .= \" AND ap.CD_AREA_INTERNO \".$notStr.\"IN\";\n\t\t\telse:\n\t\t\t\t$where .= \" AND\";\n\t\t\tendif;\n\n\t\t\t$prim = true;\n\t\t\t$where .= \" (\";\n\t\t\tif ( is_array( $parameters[\"filters\"][$key][\"vl\"] ) ):\n\t\t\t\tforeach ($parameters[\"filters\"][$key][\"vl\"] as $value):\n\t\t\t\t\tif ( $key == \"G\" ):\n\t\t\t\t\t\tif ( $value == \"3\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ca.CD_FANFARRA IS \".( !$not ? \"NOT NULL\" : \"NULL\");\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ca.CD_CARGO \". ( empty($value) ? \"IS \".$notStr.\"NULL\" : $notStr.\"LIKE '$value%'\");\n\t\t\t\t\t\tendif;\n\t\t\t\t\telseif ( $key == \"IC\" ):\n\t\t\t\t\t\tif ( $value == \"0\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"cc.FG_COMPRA = 'S'\";\n\t\t\t\t\t\telseif ( $value == \"1\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"cc.FG_COMPRA = 'N'\";\n\t\t\t\t\t\telseif ( $value == \"2\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"cc.FG_ENTREGUE = 'S'\";\n\t\t\t\t\t\telseif ( $value == \"3\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"cc.FG_ENTREGUE = 'N'\";\n\t\t\t\t\t\telseif ( $value == \"4\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"cc.FG_PREVISAO = 'S'\";\n\t\t\t\t\t\telseif ( $value == \"5\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"(cc.FG_COMPRA = 'N' AND cc.FG_PREVISAO = 'N')\";\n\t\t\t\t\t\tendif;\n\t\t\t\t\telseif ( $key == \"HA\" ):\n\t\t\t\t\t\tif ( $value == \"0\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ah.DT_CONCLUSAO IS \".( !$not ? \"NULL\" : \"NOT NULL\");\n\t\t\t\t\t\telseif ( $value == \"1\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ah.DT_CONCLUSAO IS NOT NULL AND ah.DT_AVALIACAO IS \".( !$not ? \"NULL\" : \"NOT NULL\");\n\t\t\t\t\t\telseif ( $value == \"2\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"YEAR(ah.DT_AVALIACAO) \".( !$not ? \" = \" : \" <> \").\" YEAR(NOW())\";\n\t\t\t\t\t\telseif ( $value == \"3\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ah.DT_CONCLUSAO IS NOT NULL AND ah.DT_AVALIACAO IS NOT NULL AND ah.DT_INVESTIDURA IS \".( !$not ? \"NULL\" : \"NOT NULL\");\n\t\t\t\t\t\telseif ( $value == \"4\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"YEAR(ah.DT_INVESTIDURA) \".( !$not ? \" = \" : \" <> \").\" YEAR(NOW())\";\n\t\t\t\t\t\telseif ( $value == \"5\" ):\n\t\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"YEAR(ah.DT_AVALIACAO) \".( !$not ? \" < \" : \" <> \").\" YEAR(NOW())\";\n\t\t\t\t\t\tendif;\n\t\t\t\t\telseif ( $key == \"Z\" ):\n\t\t\t\t\t\t$where .= (!$prim ? \" OR \" : \"\") .\"ap.TP_ITEM \". ( empty($value) ? \"IS \".$notStr.\"NULL\" : $notStr.\"LIKE '$value%'\");\n\t\t\t\t\telseif ( empty($value) ):\n\t\t\t\t\t\t$aWhere[] = \"NULL\";\n\t\t\t\t\t\t$where .= (!$prim ? \",\" : \"\" ).\"?\";\n\t\t\t\t\telse:\n\t\t\t\t\t\t$aWhere[] = $value;\n\t\t\t\t\t\t$where .= (!$prim ? \",\" : \"\" ).\"?\";\n\t\t\t\t\tendif;\n\t\t\t\t\t$prim = false;\n\t\t\t\tendforeach;\n\t\t\telse:\n\t\t\t\t$aWhere[] = \"$notStr\".\"NULL\";\n\t\t\t\t$where .= \"?\";\n\t\t\tendif;\n\t\t\t$where .= \")\";\n\t\tendforeach;\n\tendif;\n\n\n\n\t$query = \"\n\t\tSELECT DISTINCT\n\t\t\tah.ID,\n\t\t\tca.ID_CAD_PESSOA,\n\t\t\tca.NM,\n\t\t\tah.DT_INICIO,\n\t\t\tap.TP_ITEM,\n\t\t\tap.CD_ITEM_INTERNO,\n\t\t\tta.DS,\n\t\t\tap.DS_ITEM\n\t\tFROM CON_ATIVOS ca\n\t\tINNER JOIN APR_HISTORICO ah ON (ah.ID_CAD_PESSOA = ca.ID_CAD_PESSOA AND ah.DT_INVESTIDURA IS NULL)\n\t\tINNER JOIN TAB_APRENDIZADO ap ON (ap.ID = ah.ID_TAB_APREND)\n\t\t LEFT JOIN TAB_TP_APRENDIZADO ta ON (ta.ID = ap.TP_ITEM)\n\t\t LEFT JOIN CON_COMPRAS cc ON (cc.ID_CAD_PESSOA = ah.ID_CAD_PESSOA AND cc.ID_TAB_APREND = ah.ID_TAB_APREND)\n\t\tWHERE 1=1 $where\n\t ORDER BY ca.NM, ap.CD_ITEM_INTERNO, ah.DT_INICIO\n\t\";\n\n\treturn CONN::get()->execute( $query, $aWhere );\n}", "title": "" }, { "docid": "f03aedcddfe7189c4d5d4b42b8b4d48c", "score": "0.5876718", "text": "public function getFilter()\n {\n return $this->getLimitationFilter() ?: $this->option('filter');\n }", "title": "" }, { "docid": "82877a8aa2569f0f08519aa9d9844ec6", "score": "0.5869023", "text": "public function filter()\n {\n foreach ($this->filters as $filter) {\n $this->value = $filter->filter($this->value);\n }\n\n return $this->value;\n }", "title": "" }, { "docid": "1607c803f586045285995e92079c4d47", "score": "0.58557165", "text": "public function getFilter() {\n\t\treturn $this->filter;\n\t}", "title": "" }, { "docid": "1607c803f586045285995e92079c4d47", "score": "0.58557165", "text": "public function getFilter() {\n\t\treturn $this->filter;\n\t}", "title": "" }, { "docid": "1607c803f586045285995e92079c4d47", "score": "0.58557165", "text": "public function getFilter() {\n\t\treturn $this->filter;\n\t}", "title": "" }, { "docid": "1607c803f586045285995e92079c4d47", "score": "0.58557165", "text": "public function getFilter() {\n\t\treturn $this->filter;\n\t}", "title": "" }, { "docid": "d21e5230e1bb5d20e4138156783635d7", "score": "0.58532876", "text": "public function filter($query);", "title": "" }, { "docid": "23e824de1b274b05866d8d33ca47d10c", "score": "0.58475024", "text": "public function filter($input);", "title": "" }, { "docid": "27546655358ff3c7dcdc319ec4378a37", "score": "0.5836577", "text": "private function DataFilter()\n {\n $this->_Filter = new phpCriteria();\n\n return $this->_Filter;\n\n }", "title": "" }, { "docid": "3f45c249e7d73feb7c06dc38edbce99e", "score": "0.58323765", "text": "public function execute() {\n return call_user_func_array([$this,'filter'],func_get_args());\n }", "title": "" }, { "docid": "d03b0237ebdaae7a5ec4e0254b4e4423", "score": "0.5830449", "text": "function key_filter(array $filter /*. ,$filter .*/) {\n\t\t$args = func_get_args ();\n\t\tarray_unshift ( $args, 'and' );\n\t\treturn call_user_func_array ( array (\n\t\t\t\t$this,\n\t\t\t\t'key_filter_operator' \n\t\t), $args );\n\t}", "title": "" }, { "docid": "00751b3b53d42fe115c0b3f760d6a154", "score": "0.58283937", "text": "protected function performFilter()\n {\n $argObj = $this->AccessArgs;\n $comparison = $argObj->selectComparison($argObj->valueOf('filterOperator'));\n\n $set = collection($this->ResultIterator);\n return $set->filter(function ($entity, $key) use ($argObj, $comparison) {\n $actual = $argObj->accessNodeObject('filter')->value($entity);\n return $comparison($actual, $argObj->valueOf('filterValue'));\n })->toArray();\n }", "title": "" }, { "docid": "6fb2022aa335ea1eef7695ca268d8625", "score": "0.5824133", "text": "public function searchCriteria();", "title": "" }, { "docid": "f46d6e7d02766c0f3343ea3976691199", "score": "0.5823645", "text": "protected function _getFilter()\n { \n // define filter\n return array(\n array('field' => 'container_id', 'operator' => 'specialNode', 'value' => 'all'),\n array('field' => 'summary' , 'operator' => 'contains', 'value' => 'minimal task by PHPUnit'),\n array('field' => 'due' , 'operator' => 'within', 'value' => 'dayThis'),\n );\n }", "title": "" }, { "docid": "0ec9b57e1b7879e39ed63fd829d9bce9", "score": "0.5822939", "text": "protected function getStandardFilter(){\n\t\tif(isset($_GET['filterfor'])) {\n\t\t\t$filterKey = Convert::raw2sqL($_GET['filterfor']);\n\t\t}\n\t\telse {\n\t\t\t$filterKey = $this->MyDefaultFilter();\n\t\t}\n\t\t$filter = $this->getFilterOptionSQL($filterKey);\n\t\tif(is_array($filter)) {\n\t\t\t$this->allProducts = $this->allProducts->Filter($filter);\n\t\t}\n\t\telseif(is_string($filter) && strlen($filter) > 2) {\n\t\t\t$this->allProducts = $this->allProducts->Where($filter);\n\t\t}\n\t\treturn $this->allProducts;\n\t}", "title": "" }, { "docid": "02c0550ee7c53e2bd76f338dc55d5dd9", "score": "0.5816549", "text": "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'accessControl',\n\t\t\t'checkLan + create',\n\t\t\t'checkEditPermissions + update, delete',\n\t\t);\n\t}", "title": "" }, { "docid": "4eb3072caea0afbb80a4ac1cf7da9a49", "score": "0.58137435", "text": "public function applyCriteria();", "title": "" }, { "docid": "167b6c83442b9bbb51de4277449703aa", "score": "0.5811227", "text": "function studentFilter($filtre, $data){\r\n // On initialise la requete\r\n global $pdo, $requestSqlAllStudents;\r\n $requestSql = $requestSqlAllStudents;\r\n // on applique le filtre voulu\r\n if ($filtre === \"search\"){\r\n $data = \"%\".$data.\"%\";\r\n }\r\n $requestSql .= ($filtre === \"search\") ? \" WHERE stu_firstname LIKE :data OR stu_lastname LIKE :data OR stu_email LIKE :data OR cit_name LIKE :data\" : \"\";\r\n $requestSql .= ($filtre === \"session\") ? \" WHERE session_ses_id = :data\" : \"\";\r\n // On éxécute la requete\r\n $pdoStatementFilter = $pdo->prepare($requestSql);\r\n $pdoStatementFilter->bindValue(':data', $data, PDO::PARAM_STR);\r\n if ($pdoStatementFilter->execute() === false){\r\n print_r($pdoStatementFilter->errorInfo());\r\n exit();\r\n }\r\n return $pdoStatementFilter->fetchAll(PDO::FETCH_ASSOC); // On retourne le résultat\r\n}", "title": "" }, { "docid": "c5ec5b8daafce12be98d7e1011be14bf", "score": "0.5806323", "text": "public abstract function getFilters (): array;", "title": "" }, { "docid": "a09d498e39a84cc24c05cdb0da3806c5", "score": "0.5803693", "text": "protected function getFilters()\n { \n $filters = parent::getFilters(); \n $filters['internado_id'] = is_object($this->hcps_internado) ? $this->hcps_internado->getId() : array();\n return $filters;\n }", "title": "" } ]
19467f0ced11dc01a072c6cdc81bb305
retorna um array de dados
[ { "docid": "3c59a8603403784d9718b1b3a76e6852", "score": "0.0", "text": "public function buscarTodosUsuarios(){\n $conexao = new Conexao();\n $buscar = $conexao->abrirConexao()->prepare(\"SELECT * FROM tb_usuarios\");\n if($buscar->execute() === true){\n return $buscar->fetchAll();\n }else{\n return false;\n }\n }", "title": "" } ]
[ { "docid": "c492d016fabd248d1931ff0ee46b11af", "score": "0.7910217", "text": "public function getArray(){\n\t\tmysql_data_seek($this->result, 0); \n\t\t$data = array(); \n\t\twhile($row = mysql_fetch_array($this->result)){\n\t\t\t$data[] = $row;\n\t\t}\n\t\treturn($data);\n\t}", "title": "" }, { "docid": "30a3fd6be8ac91f044658922d2c9ef9d", "score": "0.78620166", "text": "public function getArray();", "title": "" }, { "docid": "f3b2aaace9de9bc1c3ff55ee19257522", "score": "0.7712687", "text": "function getAllAsArray(){\n\t\t\t\n\t\t\t$diarios=$this->findAll(\"\", \"\", \"Diario.nom_diario asc\", \"\", \"\", -1);\n\t\t\t$array_diarios=array();\n\t\t\tforeach($diarios as $v){\n\t\t\t\t$array_diarios+=array($v['Diario']['cod_diario'] => $v['Diario']['nom_diario']);\n\t\t\t}\n\t\t\treturn $array_diarios;\n\t\t}", "title": "" }, { "docid": "c1edf91f487156718f2db44fe776dcaa", "score": "0.76094306", "text": "function Get_ArrayDatos()\n{\t\n\t$sql = \"SELECT SGD_CAU_DESCRIP AS DESCRIP, SGD_CAU_CODIGO AS ID FROM SGD_CAU_CAUSAL ORDER BY 1\";\n\t$rs = $this->cnn->Execute($sql);\n\tif (!$rs)\n\t\t$this->vector = false;\n\telse\n\t{\t$it = 0;\n\t\twhile (!$rs->EOF)\n\t\t{\t$vdptosv[$it]['ID'] = $rs->fields['ID'];\n\t\t\t$vdptosv[$it]['NOMBRE'] = $rs->fields['DESCRIP'];\n\t\t\t$it += 1;\n\t\t\t$rs->MoveNext();\n\t\t}\n\t\t$rs->Close();\n\t\t$this->vector = $vdptosv;\n\t\tunset($rs); unset($sql);\n\t}\n\treturn $this->vector;\n}", "title": "" }, { "docid": "f9d531f984b6cfb685b9bc0f00a2b2d7", "score": "0.75682515", "text": "public function getData(): array;", "title": "" }, { "docid": "f9d531f984b6cfb685b9bc0f00a2b2d7", "score": "0.75682515", "text": "public function getData(): array;", "title": "" }, { "docid": "f9d531f984b6cfb685b9bc0f00a2b2d7", "score": "0.75682515", "text": "public function getData(): array;", "title": "" }, { "docid": "f9d531f984b6cfb685b9bc0f00a2b2d7", "score": "0.75682515", "text": "public function getData(): array;", "title": "" }, { "docid": "f9d531f984b6cfb685b9bc0f00a2b2d7", "score": "0.75682515", "text": "public function getData(): array;", "title": "" }, { "docid": "f9d531f984b6cfb685b9bc0f00a2b2d7", "score": "0.75682515", "text": "public function getData(): array;", "title": "" }, { "docid": "f9d531f984b6cfb685b9bc0f00a2b2d7", "score": "0.75682515", "text": "public function getData(): array;", "title": "" }, { "docid": "f9d531f984b6cfb685b9bc0f00a2b2d7", "score": "0.75682515", "text": "public function getData(): array;", "title": "" }, { "docid": "34fe5603e9576d37654516b5e9f4c8f9", "score": "0.75090927", "text": "private function getData() {\n return [\n $this->getRow(1, \"Josue\", \"\", \"1989\", \"M\",1),\n $this->getRow(2, \"Mario\", \"\", \"1989\", \"M\",1), \n $this->getRow(3, \"Kael\", \"\", \"1989\", \"M\",2), \n ];\n }", "title": "" }, { "docid": "3f3bf8ac6544166f67f408f0fa9c1211", "score": "0.74989223", "text": "public function asArray();", "title": "" }, { "docid": "3f3bf8ac6544166f67f408f0fa9c1211", "score": "0.74989223", "text": "public function asArray();", "title": "" }, { "docid": "022dd50803d62370769d4b58aa5a4d96", "score": "0.73808265", "text": "private function _as_array(){\n\t\t\t\t$this->handler->setFetchMode(PDO::FETCH_ASSOC);\n\t\t\t\t$this->handler->execute();\n\t\t\t\t\n\t\t\t\t$return = array();\n\t\t\t\t$i = 0;\n\t\t\t\t\n\t\t\t\twhile($row = $this->handler->fetch()){\n\t\t\t\t\t$return[$i] = $row;\n\t\t\t\t\t\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\n\t\t\t\t$this->num_results = $i;\n\t\t\t\t\n\t\t\t\treturn $return;\n\t\t\t}", "title": "" }, { "docid": "34f5777f254387f69b1ce9ba18a10c63", "score": "0.73541075", "text": "public function to_array(){\n\t\t\t$datos=get_object_vars($this);\n\t\t\treturn $datos;\n\t\t}", "title": "" }, { "docid": "d0a65ea326810f504ade4ec0f7d6e1f8", "score": "0.7328332", "text": "public function toArray(){\n if (is_null($this->_DataResult)) {\n return array();\n }else{\n return $this->_DataResult;\n }\n }", "title": "" }, { "docid": "bced15c6403dd792a68cef8223f9ad49", "score": "0.7323038", "text": "public function getData() : array\n {\n\n return $this->rows;\n }", "title": "" }, { "docid": "379bf9028fca35d940b1e6ac4ae0b400", "score": "0.7302565", "text": "public function getArray() {\n\t\treturn $this->load(true);\n\t}", "title": "" }, { "docid": "77d72000f83a4ea950f702670dbaa3bf", "score": "0.7292442", "text": "public function getDataForList(): array;", "title": "" }, { "docid": "301859e96e51bf89cd9d73d7cefb7725", "score": "0.7287828", "text": "public function toArray(){\n\t\t\t$datos = array($this->idPersona, $this->nombre, $this->apellido, $this->edad, $this->genero, $this->fechaNac,$this->imagen);\n\t\t\treturn $datos;\n\t\t}", "title": "" }, { "docid": "c1768380afb0c8ae548f7cbc64decdb9", "score": "0.727749", "text": "function datos_consultas_array($result){\n\t$dato = array();\n\twhile ($fila = mysql_fetch_assoc($result)) { \n\t\t$dato[] = $fila ; \n\t}\t\n\treturn $dato;\n}", "title": "" }, { "docid": "6565b5d1a88b2b2b5bbc6ae7f52ede9f", "score": "0.7271465", "text": "public function data(): array;", "title": "" }, { "docid": "9eb691ab856b271f92ec22344707e026", "score": "0.7237867", "text": "function arr($sql=''){\n\t\t\n\t\t$this->exec($sql);\n\t\t\n\t\t$arr = array();\n\t\t$n = $this->get_selected_rows_count();\n\t\tfor($i=0; $i<$n; $i++){\n\t\t\t$arr[] = $this->row();\n\t\t}\n\t\tmysql_free_result($this->_result);\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "76bf06119aaec76b369e856df893c130", "score": "0.72316563", "text": "public function &fetchAllArray(): array\n {\n // init\n $data = [];\n\n if ($this->is_empty()) {\n return $data;\n }\n\n $this->reset();\n\n /** @noinspection PhpAssignmentInConditionInspection */\n while ($row = $this->fetch_assoc()) {\n $data[] = $this->cast($row);\n }\n\n return $data;\n }", "title": "" }, { "docid": "16fc6f29fa0d1121791789f01a302186", "score": "0.7218268", "text": "public function get_data() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "16fc6f29fa0d1121791789f01a302186", "score": "0.7218268", "text": "public function get_data() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "5cd2acd1d86bf3c137e3a6a8f7b0728e", "score": "0.7207764", "text": "public function getData()\n {\n return [];\n }", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.72041667", "text": "public function toArray();", "title": "" }, { "docid": "0a04d02ee51c83e8b1db7cd6587758fb", "score": "0.7188154", "text": "public function toArray(){\t\t\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "1ca384e34d541e5f2b5cfe70d106e1db", "score": "0.7186815", "text": "function ejecutaConsultaArray($sql)\n{\n\t\t$datos=[];\n\t\t$resultset=ejecutaConsulta($sql);\n\t\twhile($fila=$resultset->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$datos[]=$fila;\n\t\t}\n\t\treturn $datos;\n\n\n}", "title": "" }, { "docid": "302979d0adb150c4f7c26e39bf12a2a9", "score": "0.7173022", "text": "public function getData()\n {\n return $this->db->table('divisi')\n ->get()\n ->getResultArray();\n }", "title": "" }, { "docid": "35a865decf81ff348ae294b15b9f50bd", "score": "0.71622777", "text": "public function getData() {\n return [];\n }", "title": "" }, { "docid": "9758cfb64eb9d2ce19774a92146fea14", "score": "0.7150703", "text": "public function toArray(){\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "11e12ed7f2605e6fa500c29c031d19e0", "score": "0.7136609", "text": "public abstract function toArray();", "title": "" }, { "docid": "11e12ed7f2605e6fa500c29c031d19e0", "score": "0.7136609", "text": "public abstract function toArray();", "title": "" }, { "docid": "6da50ce351d0f8af8a5328f2c4b565c2", "score": "0.7126995", "text": "public function read() : array\n {\n\n // Lvd.\n $array = [];\n\n // Get results.\n $result = $this->call();\n\n // Go through every record and put it into final array.\n while (( $record = $result->fetch_assoc() ) !== null) {\n $array[] = $record;\n }\n\n return $array;\n }", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.7087389", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.7087389", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.7087389", "text": "public function toArray() {}", "title": "" }, { "docid": "7b50018de9ec1c8645a74310e77d08ed", "score": "0.70834935", "text": "public function as_array()\n\t{\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "beed8679d95f128c4fa3cd03c817fd86", "score": "0.70823073", "text": "public function getDataArray(){\n #To make sure getters triggered{\n $data = array();\n\n foreach($this->_data as $property => $value){\n $data[$property] = $this->$property;\n\n if( is_object($data[$property]) && $data[$property] instanceof _interface\\GetDataArray ){\n $data[$property] = $data[$property]->getDataArray();\n\n }elseif( is_object($data[$property]) ){\n $obj = new DocObject($data[$property]);\n $data[$property] = $obj->getDataArray();\n }\n }//foreach()\n #}\n\n return $data;\n }", "title": "" }, { "docid": "6eec5a6dea45ee556e8ce9c6a04aed79", "score": "0.7080877", "text": "function getArrayDatas(){\n\t\t\t\n\t\t\t$this->setArrayData('units_id',$this->getUnitId());\n\t\t\t$this->setArrayData('categories_id',$this->getCategoryId());\n\t\t\t$this->setArrayData('products_code',$this->getProductCode());\n\t\t\t$this->setArrayData('products_name',$this->getName());\n\t\t\t$this->setArrayData('products_desc',$this->getDesc());\n\t\t\t$this->setArrayData('products_qty',$this->getProductQty());\n\t\t\t$this->setArrayData('products_cost',$this->getProductCost());\n\t\t\t$this->setArrayData('products_price',$this->getProductPrice());\n\t\t\n\t\t\treturn $this->getArrayData();\n\t\t\t\n }", "title": "" }, { "docid": "db8813f0170bd442856f9bf238662be0", "score": "0.70658", "text": "public function getAllArr()\n\t{\n\t\t$sql = \"SELECT * FROM gastos_tipo where status='active';\";\n\t\t$res = $this->db->query($sql);\n\t\t$set = array();\n\t\tif(!$res){ die(\"Error getting result\"); }\n\t\telse{\n\t\t\twhile ($row = $res->fetch_assoc())\n\t\t\t\t{ $set[] = $row; }\n\t\t}\n\t\treturn $set;\n\t}", "title": "" }, { "docid": "26c921b0c11b1992cfac378188615716", "score": "0.7053919", "text": "public function dataToArray()\n {\n\n return array(\n 'title' => $this->title,\n 'content' => $this->content,\n 'date' => $this->date,\n 'author' => $this->author,\n 'imagenames' => $this->imagenames,\n 'id' => $this->id,\n 'table' => $this->table,\n );\n }", "title": "" }, { "docid": "ca5d5f93cd6036ffb204d143a6aa6eb4", "score": "0.70488113", "text": "protected function getData()\n {\n return [];\n }", "title": "" }, { "docid": "ca5d5f93cd6036ffb204d143a6aa6eb4", "score": "0.70488113", "text": "protected function getData()\n {\n return [];\n }", "title": "" }, { "docid": "07c850f02681fc62e6b2f5cddc8e53d9", "score": "0.7046633", "text": "public static function get():array{\n $consulta=\"SELECT * FROM acciones\"; //preparar la consulta\n return DB::selectAll($consulta,'Accion');\n }", "title": "" }, { "docid": "3fa0d2054d5c49e204c7acf78e2ad72b", "score": "0.70405966", "text": "public function getassocarray()\n{\n\tunset($this->rows);\n\tunset($this->results);\n if($this->querytype==\"select\")\n {\n\t$this->results = array();\n\n\twhile ($this->rows = $this->select->fetchAll(PDO::FETCH_ASSOC))\n {\n $this->results=$this->rows;\n }\n\t return $this->results;\n }else{\n throw new Exception(\"O método getassocarray é somente suportado em select\",1010);\n }\n}", "title": "" }, { "docid": "4d7a51dda22a7e9d644b361be510bcbc", "score": "0.7039735", "text": "public function toArray():array;", "title": "" }, { "docid": "e972115a9253510d36115e2e73c23c66", "score": "0.70373076", "text": "public function obtenerArray() {\n return $this->xls->getActiveSheet()->toArray();\n }", "title": "" }, { "docid": "6596f1c7857350b5f1e98adb5b6d4d81", "score": "0.7030876", "text": "public function getGetData(): array\n {\n return $this->getData;\n }", "title": "" }, { "docid": "8ede2583972fbdebaaed4e9ca51b761d", "score": "0.7021446", "text": "function _readArray(){\n\t\t$_Result=array();\n\t\tglobal $_ArrTable;\n\t\tglobal $_CursorPos;\n\t\t//check if the Array is emtpy\n\t\tif(!empty($_ArrTable)){\t\n\t\t\t$_Result=$_ArrTable[$_CursorPos];\n\t\t}\n\t\t\n\t\treturn $_Result;\n\t}", "title": "" }, { "docid": "ad00ff794a41427fae39e29fc5048d4f", "score": "0.702111", "text": "public function toArray() : array;", "title": "" }, { "docid": "c3a88850c2c6b965041b499aaa0dcced", "score": "0.70121187", "text": "public function getData(): array\n {\n $data = [];\n \n foreach ($this->fields as $name => $field) {\n $data[$name] = $field->getData();\n }\n \n return $data;\n }", "title": "" }, { "docid": "5cb5333e92aa8ffb16573146d1926312", "score": "0.69975543", "text": "private function _as_array(){\n\t\t\t$this->handler->setFetchMode(PDO::FETCH_ASSOC);\n\t\t\t\n\t\t\tif(false === $this->handler->execute()){\n\t\t\t\t$this->setError($this->handler->errorInfo()[2]);\n\t\t\t}\n\t\t\t\n\t\t\t$return = array();\n\t\t\t$i = 0;\n\t\t\t\n\t\t\twhile($row = $this->handler->fetch()){\n\t\t\t\t$return[$i] = $row;\n\t\t\t\t\n\t\t\t\t$i++;\n\t\t\t}\n\n\t\t\t$this->num_results = $i;\n\n\t\t\t//an error occurred\n\t\t\tif(is_array($this->getError())){\n\t\t\t\t$error = new Error();\n\t\t\t\t$error->raise(404, $this->getError());\n\n\t\t\t\treturn $error;\n\t\t\t}\n\n\t\t\treturn $return;\n\t\t}", "title": "" }, { "docid": "2067cfd29970c5d1e6bf8d5a05e3ff25", "score": "0.6994274", "text": "public function dataToArray() {\n\t\t$data = array();\n\t\t$data['date_range'] = $this->date_range;\n\t\t$data['start_time'] = $this->start_time;\n\t\t$data['end_time'] = $this->end_time;\n\t\t$data['tz_modifier'] = $this->tz_modifier;\n\t\t$data['offer_id'] = $this->offer_id;\n\t\t$data['campaign_id'] = $this->campaign_id;\n\t\t$data['event_id'] = $this->event_id;\n\t\t$data['group_id'] = $this->group_id;\n\t\t$data['column_id'] = $this->column_id;\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "1900c6ac2551694eff9d7f12a7db1ffc", "score": "0.69917977", "text": "public function toArray()\n {\n return (array) ($this->_data);\n }", "title": "" }, { "docid": "7d439b1d85de415ac246ae326e182193", "score": "0.69807327", "text": "public function fetchArray();", "title": "" }, { "docid": "7d439b1d85de415ac246ae326e182193", "score": "0.69807327", "text": "public function fetchArray();", "title": "" }, { "docid": "21d1f86c01900d4705083c214b12a01c", "score": "0.6976925", "text": "private function genArray() {\n $arrData = array();\n $arrTables = Information::getAllTables();\n foreach ($arrTables as $arrTable) {\n $table = $arrTable[0];\n $arrFields = Information::getDataTable($table);\n $pkname = $this->getArrFieldsPrimary($arrFields);\n if (!is_null($pkname)) {\n $arrData[$table]['fields'] = $arrFields;\n $arrData[$table]['pk'] = $pkname;\n }\n }\n return $arrData;\n }", "title": "" }, { "docid": "5a64e0fcb0658a40c596750be14b153e", "score": "0.69644856", "text": "public function convertData():array {\n // create new array\n $data = [];\n\n // loop through data\n for($i = 0; $i < count($this->collection); $i++){\n $data[$i]['id'] = $this->collection[$i]->getId();\n $data[$i]['name'] = $this->collection[$i]->getName();\n }\n\n // return converted data\n return $data;\n }", "title": "" }, { "docid": "06c1b508112d0600e5184ad511a6ee62", "score": "0.6958346", "text": "public function get_array_db(){\n $query = $this->db->get($this->table);\n return $query->result();\n }", "title": "" }, { "docid": "31e9e81a547ab04c0d9876b6862c5d64", "score": "0.6947275", "text": "public function getArray() {\n return array(\n self::DB_ID => $this->get_id(),\n self::DB_USER => $this->get_user_id(),\n self::DB_PRIV => $this->get_private(),\n self::DB_TITLE => $this->get_title(),\n self::DB_DESTRIPTION => $this->get_description(),\n self::DB_CREATION => $this->get_creation_time()\n );\n }", "title": "" }, { "docid": "5741aeba63e9587f2443e87158fee63d", "score": "0.69467413", "text": "public function toArray(): array {\n return $this->execute()->fetchAll(\\PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69404334", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69404334", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69404334", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69404334", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69404334", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69404334", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69404334", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69404334", "text": "public function toArray(): array;", "title": "" } ]
36073df9486da7dc1522d89801f5830a
for analysis not offered
[ { "docid": "adc8283fec8a04961d7a2d56ae53eb0b", "score": "0.0", "text": "public function actionAdd_not_offer()\n {\n $model = new Pstcanalysis;\n\n $rstlId = (int) Yii::$app->user->identity->profile->rstl_id;\n if($rstlId > 0) {\n $requestId = (int) Yii::$app->request->get('request_id');\n $testnameId = (int) Yii::$app->request->get('testname_id');\n $sampleQuery = Pstcsample::find()->where('pstc_request_id = :requestId', [':requestId' => $requestId]);\n \n $sampleDataProvider = new ActiveDataProvider([\n 'query' => $sampleQuery,\n 'pagination' => false,\n ]);\n\n $methods = !empty($this->listReferralMethodreference($testnameId)) ? $this->listReferralMethodreference($testnameId) : [];\n\n $methodrefDataProvider = new ArrayDataProvider([\n //'key'=>'testname_method_id',\n 'allModels' => $methods,\n 'pagination' => [\n 'pageSize' => 10,\n ],\n //'pagination'=>false,\n ]);\n\n if(Yii::$app->request->post()) {\n\n $connection = Yii::$app->db;\n $transaction = $connection->beginTransaction();\n $postData = Yii::$app->request->post();\n $pstcData = Yii::$app->request->post('Pstcanalysis');\n\n $analysisSave = 0;\n $saveSampleUpdate = 1;\n foreach ($postData['sample_ids'] as $sample) {\n\n $sampleUpdate = Pstcsample::findOne($sample);\n if(empty($sampleUpdate->sampletype_id)) {\n $sampleUpdate->sampletype_id = !empty($pstcData['sampletype_id']) ? (int) $pstcData['sampletype_id'] : NULL;\n if($sampleUpdate->save(false)) {\n $saveSampleUpdate = 1;\n } else {\n $transaction->rollBack();\n $saveSampleUpdate = 0;\n }\n }\n\n $testnameId = (int) $pstcData['testname_id'];\n $methodrefId = (int) $postData['method_id'];\n $test = $this->getReferralTestnameOne($testnameId);\n $method = $this->getReferralMethodrefOne($methodrefId);\n\n $analysis = new Pstcanalysis();\n $analysis->pstc_sample_id = (int) $sample;\n $analysis->rstl_id = (int) $rstlId;\n $analysis->pstc_id = (int) Yii::$app->user->identity->profile->pstc_id;\n $analysis->testname_id = (int) $testnameId;\n $analysis->testname = $test->test_name;\n $analysis->method_id = (int) $methodrefId;\n $analysis->method = $method->method;\n $analysis->reference = $method->reference;\n $analysis->fee = $method->fee;\n $analysis->quantity = 1;\n $analysis->testcategory_id = 0;\n $analysis->sampletype_id = (int) $pstcData['sampletype_id'];\n $analysis->created_at = date('Y-m-d H:i:s');\n $analysis->updated_at = date('Y-m-d H:i:s');\n\n if(!$analysis->save(false)){\n goto analysisfail;\n } else {\n $analysisSave = 1;\n }\n }\n\n if($analysisSave == 1 && $saveSampleUpdate == 1) {\n $transaction->commit();\n Yii::$app->session->setFlash('success', \"Analysis successfully saved.\");\n return $this->redirect(['/pstc/pstcrequest/view', 'id' => $requestId]);\n } else {\n goto analysisfail;\n }\n analysisfail: {\n $transaction->rollBack();\n Yii::$app->session->setFlash('error', \"Analysis failed to save!\");\n return $this->redirect(['/pstc/pstcrequest/view', 'id' => $requestId]);\n }\n }\n } else {\n return $this->redirect(['/site/login']);\n }\n\n if (Yii::$app->request->isAjax) {\n return $this->renderAjax('_formNotoffered', [\n 'model' => $model,\n 'sampletype' => $this->listReferralSampletype(),\n 'testname' => $this->listReferralTestname(),\n 'sampleDataProvider' => $sampleDataProvider,\n 'methodrefDataProvider' => $methodrefDataProvider,\n ]);\n } else {\n return $this->renderAjax('_formNotoffered', [\n 'model' => $model,\n 'sampletype' => $this->listReferralSampletype(),\n 'testname' => $this->listReferralTestname(),\n 'sampleDataProvider' => $sampleDataProvider,\n 'methodrefDataProvider' => $methodrefDataProvider,\n ]);\n }\n }", "title": "" } ]
[ { "docid": "3782b8b9f5d005bf5bb083206f20d97b", "score": "0.5982864", "text": "public function testElementGetAnalyses()\r\n {\r\n\r\n }", "title": "" }, { "docid": "5fb3559df20b011a1fa4d849d50dd309", "score": "0.593046", "text": "public function firstGlobalAnalysis(){\n\t\t$this->updateAvailableMentalNumbers();\n\t\t$this->findFinalAnswer();\n\t\t$this->find_simpl_for();\n\t}", "title": "" }, { "docid": "d7d6154e5a7833b067b9926fa7bfdce4", "score": "0.5819103", "text": "protected function analyze(): void\n {\n }", "title": "" }, { "docid": "bfa7322c2910b8c378180cce611918d5", "score": "0.5769211", "text": "public function smell();", "title": "" }, { "docid": "afb9239c5981d327775e334a4353c318", "score": "0.56249785", "text": "function getStatistics()\n \t{\n \t}", "title": "" }, { "docid": "8fee6c2accb7f6d221279da5bbd31676", "score": "0.55402696", "text": "abstract public function _getResult();", "title": "" }, { "docid": "b0cc34a9048833a17d8373fb6440d33b", "score": "0.550406", "text": "public function abonar2()\n\n {\n\n }", "title": "" }, { "docid": "6bd4da74d996bf2ab4f36e750d5a9d33", "score": "0.54658556", "text": "abstract protected function _gather();", "title": "" }, { "docid": "1fc0c3f4be6e77c7f55921174bd7fc10", "score": "0.54475623", "text": "public function testStreamSetGetPlotAdHoc()\r\n {\r\n\r\n }", "title": "" }, { "docid": "2b1ad5fe7eca7f6b1e6071bbd4b0570d", "score": "0.54469883", "text": "function informanalysts() {\r\n }", "title": "" }, { "docid": "66c78660a28cf01bc69b060e7dc4ccea", "score": "0.5396121", "text": "public function runAlgorithm(){\n Algorithm::calulateTreatmentphase(Algorithm::getNewTreatmentPhase(),Algorithm::getTreatmentPhase());\n Algorithm::calulateCancerType(Algorithm::getNewCancerType(),Algorithm::getCancerType());\n Algorithm::calulateGender(Algorithm::getNewGender(),Algorithm::getGender());\n Algorithm::calulateReligion(Algorithm::getNewReligion(),Algorithm::getReligion());\n Algorithm::calulateTreatmentCity(Algorithm::getNewTreatementCity(),Algorithm::getTreatementCity());\n Algorithm::calulateTreatmentCity(Algorithm::getNewTreatementState(),Algorithm::getTreatementState());\n Algorithm::calulateRole(Algorithm::getNewRole(),Algorithm::getRole());\n Algorithm::calulateAge(Algorithm::getNewAge(),Algorithm::getAge());\n\n return Algorithm::getpoints(); // The highest total points is 225 points - which means that both applicants have everything in common.\n}", "title": "" }, { "docid": "5838374b9216bb27d89efa3bf1586ae8", "score": "0.5390456", "text": "abstract function getSummary();", "title": "" }, { "docid": "3fe7867c91f3152c3e36536565c75f47", "score": "0.5384388", "text": "abstract public function result(AnalysisResult $result);", "title": "" }, { "docid": "384d64b92f70dde4b0228eb801833a6f", "score": "0.5381033", "text": "public function testElementCreateAnalysis()\r\n {\r\n\r\n }", "title": "" }, { "docid": "23c02409c4c93b2d30b835f2f0557d7d", "score": "0.53807694", "text": "public function algorithm();", "title": "" }, { "docid": "69bc0ef972f9742faddfe3b86f4f923e", "score": "0.5346", "text": "public function annonces()\n {\n \n }", "title": "" }, { "docid": "ab7538b7679c09e4869087e58ff9fd26", "score": "0.5282391", "text": "protected function _evaluate(){\n\t}", "title": "" }, { "docid": "d0be24956767743a76b405685ff4ed67", "score": "0.52676386", "text": "abstract protected function core();", "title": "" }, { "docid": "bdf033fc110b8ecc3ec35bf3453a59b6", "score": "0.5265765", "text": "private function statistic_items()\n {\n }", "title": "" }, { "docid": "5f4c5f99dc534d24211c0ffab2ddfcac", "score": "0.52514887", "text": "public function get_statistics()\n {\n }", "title": "" }, { "docid": "e8b595081cc9b61550c5f6e6567a6529", "score": "0.5187048", "text": "function pocitajtb() {\n}", "title": "" }, { "docid": "c26ed7ea02e26613b045ca6908b4e4c4", "score": "0.51851964", "text": "public function ranking(){\n // cargar informacion de la Historico Calificación Tecnicos Sidesoft \n \n }", "title": "" }, { "docid": "77de0d6b0cd5111ca19942cce252f910", "score": "0.51615727", "text": "abstract function getInformation();", "title": "" }, { "docid": "61af9e267ae488bedb90d84e9f57c505", "score": "0.515347", "text": "public function stepIUnderstandTheMeaning() {\n }", "title": "" }, { "docid": "8cc92b523a99f7a874f3fe4af8c29db5", "score": "0.5147528", "text": "public abstract function isStatisfied();", "title": "" }, { "docid": "5e5e8e984abdeea3a6b259db7963b1c2", "score": "0.5143206", "text": "abstract protected function preProcess();", "title": "" }, { "docid": "e7d8e37334b0baf77601d6c22b33e1d1", "score": "0.5129833", "text": "public function use_result () {}", "title": "" }, { "docid": "30aeca7ef6ab975b6f958eff1f61fb1a", "score": "0.5128541", "text": "function fill_actual_situation()\n {\n// RENEWED 19.11.2005 MAV : Rss of Yahoo changed\n $this->acttext = $this->parser->output[0][child][0][child][12][child][5][attrs][TEXT]; // OK\n// $this->acttemp = $this->parser->output[0][child][0][child][12][child][5][attrs][TEMP]; // OK\n $this->acttemp = $this->parser->output[0][child][0][child][0][child][12][child][5][attrs][TEMP]; // OK\n// $this->acttime = $this->parser->output[0][child][0][child][0][child][12][child][5][attrs][TEMP]; // OK\n $this->acttime = $this->parser->output[0][child][0][child][0][child][12][child][5][attrs][DATE]; // OK\n $this->imageurl = \"n/a\"; // was the yahoo logo (nt left supported)\n// $this->actcode = $this->parser->output[0][child][0][child][12][child][5][attrs][CODE]; // OK\n $this->actcode = $this->parser->output[0][child][0][child][0][child][12][child][5][attrs][CODE]; // OK\n }", "title": "" }, { "docid": "67f4a01437917ab142bfdc49613188f4", "score": "0.51263267", "text": "public static function _desc() { return 'Benchmarking of the system'; }", "title": "" }, { "docid": "d71f33ddfe19b7b0cfcdf85f547981ce", "score": "0.51261914", "text": "function findUnprocessed();", "title": "" }, { "docid": "7ca01686a160832a89ba4934cc99e308", "score": "0.5121825", "text": "abstract public function report();", "title": "" }, { "docid": "d9a0f6f17042263f418a7ba2a070047c", "score": "0.5112996", "text": "public function sanction() {\n \n }", "title": "" }, { "docid": "555d72270759fbba371bf4cd184f5403", "score": "0.51118433", "text": "abstract public function describe();", "title": "" }, { "docid": "e21f8c642fa27a609bb3a29bdd6941f6", "score": "0.5111728", "text": "public function more_results () {}", "title": "" }, { "docid": "e21f8c642fa27a609bb3a29bdd6941f6", "score": "0.5111728", "text": "public function more_results () {}", "title": "" }, { "docid": "90e08ea5be5e8af48f9191bc0e21b6bd", "score": "0.51065344", "text": "public function preProcessing() {\r\n\t}", "title": "" }, { "docid": "bc28e566255f9d6edf79a57375e6190a", "score": "0.5099675", "text": "protected function processar() {\n }", "title": "" }, { "docid": "fa4218ac53b5651953ccff10e3d1d84a", "score": "0.5098062", "text": "function getSummary();", "title": "" }, { "docid": "22ca97742f2eebe7c2dda7c3de77e16a", "score": "0.50885594", "text": "public function getUsage();", "title": "" }, { "docid": "cbf3ce698db44e1f12255cc9dd526030", "score": "0.5080194", "text": "protected function extractAll()\n {\n }", "title": "" }, { "docid": "e0bb3ba32010be0674f93a7f57037236", "score": "0.50665975", "text": "function specified() {}", "title": "" }, { "docid": "057d708cf41d5842ada9d4643acb7b67", "score": "0.5064483", "text": "public function get_analysis() {\n return $this->get_factcheck_meta( 'analysis' );\n }", "title": "" }, { "docid": "ea5187193b4cd8a2add81980e1191af6", "score": "0.50527865", "text": "abstract protected function getResults();", "title": "" }, { "docid": "dcf24eca7ab09e53e8ad7441a3d33d5b", "score": "0.50423086", "text": "function misses();", "title": "" }, { "docid": "cc767dcae97bc2bab552df60c483e250", "score": "0.5042296", "text": "private function require_necessities() {\n\t\t\t\n\t\t}", "title": "" }, { "docid": "5e1634ad85a83aa80ce008c7f8e9d090", "score": "0.5029005", "text": "public function report();", "title": "" }, { "docid": "e2e300d91619f0a3d9060ba24c28f32d", "score": "0.50239694", "text": "public function get_test_result()\n {\n }", "title": "" }, { "docid": "dec842d2329be7d9d76919116421b870", "score": "0.5018895", "text": "private function addReportMisc() {\t\t$nonNFCs = Information::getValues('classId_non_nfc');\n\t\tif (count($nonNFCs) > 0) {\n\t\t\tReport::addReport(\n\t\t\t\t'rep_latin_non_nfc',\n\t\t\t\t'nonLatin_category', REPORT_LEVEL_WARNING, \n\t\t\t\tlang('rep_latin_non_nfc'),\n\t\t\t\tlang('rep_latin_non_nfc_expl', count($nonNFCs), Language::format(Utils::codesFromValArray($nonNFCs), LANG_FORMAT_OL_CODE)),\n\t\t\t\tlang('rep_latin_non_nfc_todo'),\n\t\t\t\tlang('rep_latin_non_nfc_link')\n\t\t\t);\n\t\t}\n\t\t\n\t\t// INFO: <b> tags found in source\n\t\t$bTags = $this->doc->getElementsByTagName('b');\n\t\t$count = 0;\n\t\tif ($bTags->length > 0) {\n\t\t\tforeach ($bTags as $bTag) {\n\t\t\t\tif (! $bTag->hasAttributes() || $bTag->attributes->getNamedItem('class') == null) {\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($count > 0)\n\t\t\t\tReport::addReport(\n\t\t\t\t\t'rep_markup_tags_no_class_b',\n\t\t\t\t\t'markup_category', REPORT_LEVEL_INFO, \n\t\t\t\t\tlang('rep_markup_tags_no_class_b', 'b'),\n\t\t\t\t\tlang('rep_markup_tags_no_class_b_expl', 'b', $bTags->length, $count),\n\t\t\t\t\tlang('rep_markup_tags_no_class_b_todo', 'b'),\n\t\t\t\t\tlang('rep_markup_tags_no_class_b_link')\n\t\t\t\t);\n\t\t}\n\t\t\n\t\t// INFO: <i> tags found in source\n\t\t$iTags = $this->doc->getElementsByTagName('i');\n\t\t$count = 0;\n\t\tif ($iTags->length > 0) {\n\t\t\tforeach ($iTags as $iTag) {\n\t\t\t\tif (! $iTag->hasAttributes() || $iTag->attributes->getNamedItem('class') == null) {\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($count > 0)\n\t\t\t\tReport::addReport(\n\t\t\t\t\t'rep_markup_tags_no_class_i',\n\t\t\t\t\t'markup_category', REPORT_LEVEL_INFO, \n\t\t\t\t\tlang('rep_markup_tags_no_class_i', 'i'),\n\t\t\t\t\tlang('rep_markup_tags_no_class_i_expl', 'i', $iTags->length, $count),\n\t\t\t\t\tlang('rep_markup_tags_no_class_i_todo', 'i'),\n\t\t\t\t\tlang('rep_markup_tags_no_class_i_link')\n\t\t\t\t);\n\t\t}\n\n\t\t// ERROR: <bdo> tag without dir\n\t\t$foundTags = $this->doc->getElementsByTagName('bdo');\n\t\t$count = 0;\n\t\tif ($foundTags->length > 0) {\n\t\t\tforeach ($foundTags as $tag) {\n\t\t\t\tif (! $tag->hasAttributes() || $tag->attributes->getNamedItem('dir') == null) {\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($count > 0)\n\t\t\t\tReport::addReport(\n\t\t\t\t\t'rep_markup_bdo_no_dir',\n\t\t\t\t\t'markup_category', REPORT_LEVEL_ERROR, \n\t\t\t\t\tlang('rep_markup_bdo_no_dir', 'b'),\n\t\t\t\t\tlang('rep_markup_bdo_no_dir_expl', 'b', $foundTags->length, $count),\n\t\t\t\t\tlang('rep_markup_bdo_no_dir_todo', 'b'),\n\t\t\t\t\tlang('rep_markup_bdo_no_dir_link')\n\t\t\t\t);\n\t\t}\n\n\t\t// ERROR: <bdo> tag with dir=auto\n\t\t$foundTags = $this->doc->getElementsByTagName('bdo'); \n\t\t$count = 0;\n\t\tif ($foundTags->length > 0) {\n\t\t\tforeach ($foundTags as $tag) { \n\t\t\t\tif ($tag->hasAttributes() && $tag->attributes->getNamedItem('dir')->value == \"auto\") {\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($count > 0)\n\t\t\t\tReport::addReport(\n\t\t\t\t\t'rep_markup_bdo_auto',\n\t\t\t\t\t'markup_category', REPORT_LEVEL_ERROR, \n\t\t\t\t\tlang('rep_markup_bdo_auto', 'b'),\n\t\t\t\t\tlang('rep_markup_bdo_auto_expl', 'b', $foundTags->length, $count),\n\t\t\t\t\tlang('rep_markup_bdo_auto_todo', 'b'),\n\t\t\t\t\tlang('rep_markup_bdo_auto_link')\n\t\t\t\t);\n\t\t}\n\n\n\t\t\n\t\t// ERROR: Invalid named character references for directional controls\n\t\tif (preg_match_all('/(&lre;)|(&rle;)|(&pdf;)|(&rli;)|(&lri;)|(&fsi;)|(&pdi;)/i', $this->markup, $foundEntities)) {\n\t\t\t$resultStr = '';\n\t\t\t$entityList = array_count_values($foundEntities[0]);\n\t\t\tforeach ($entityList as $key => $val) {\n\t\t\t\t$resultStr .= '&amp;'.substr($key,1,3).'; ('.$val.') &#xA0; ';\n\t\t\t\t}\n\t\t\tif ($resultStr)\n\t\t\t\tReport::addReport(\n\t\t\t\t\t'rep_markup_bogus_dir_entities',\n\t\t\t\t\t'markup_category', REPORT_LEVEL_ERROR, \n\t\t\t\t\tlang('rep_markup_bogus_dir_entities'),\n\t\t\t\t\tlang('rep_markup_bogus_dir_entities_expl', $resultStr),\n\t\t\t\t\tlang('rep_markup_bogus_dir_entities_todo'),\n\t\t\t\t\tlang('rep_markup_bogus_dir_entities_link')\n\t\t\t\t);\n\t\t\t}\n\t\t\n\t\n\t\t// WARNING: Found Unicode code points for directional controls\n\t\t$found = 0;\n\t\tif ($this->doc->dirControls != null) {\n\t\t\tforeach ($this->doc->dirControls as $key => $val) {\n\t\t\t\tif ($key[0] != '#' && $key[0] != '&' && $val > 0) { $found += $val; }\n\t\t\t\t}\n\t\t\tif ($found > 0) {\n\t\t\t\tReport::addReport(\n\t\t\t\t\t'rep_markup_dir_control_codes',\n\t\t\t\t\t'markup_category', REPORT_LEVEL_WARNING, \n\t\t\t\t\tlang('rep_markup_dir_control_codes'),\n\t\t\t\t\tlang('rep_markup_dir_control_codes_expl', $found),\n\t\t\t\t\tlang('rep_markup_dir_control_codes_todo'),\n\t\t\t\t\tlang('rep_markup_dir_control_codes_link')\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\n\t\t// INFO: Found escape sequences for paired directional controls\n\t\t$found = 0;\n\t\tif ($this->doc->dirControls != null) {\n\t\t\tforeach ($this->doc->dirControls as $key => $val) {\n\t\t\t\tif ($key[0] == '#' && $val > 0) { $found += $val; }\n\t\t\t\t}\n\t\t\tif ($found > 0) {\n\t\t\t\tReport::addReport(\n\t\t\t\t\t'rep_markup_dir_escapes',\n\t\t\t\t\t'markup_category', REPORT_LEVEL_INFO, \n\t\t\t\t\tlang('rep_markup_dir_escapes'),\n\t\t\t\t\tlang('rep_markup_dir_escapes_expl', $found),\n\t\t\t\t\tlang('rep_markup_dir_escapes_todo'),\n\t\t\t\t\tlang('rep_markup_dir_escapes_link')\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\n\t\t// ERROR: Unpaired directional controls found\n\t\t$startCodes = $this->doc->dirControls['lre']+\n\t\t\t\t\t\t$this->doc->dirControls['#lre']+\n\t\t\t\t\t\t$this->doc->dirControls['rle']+\n\t\t\t\t\t\t$this->doc->dirControls['#rle']+\n\t\t\t\t\t\t$this->doc->dirControls['fsi']+\n\t\t\t\t\t\t$this->doc->dirControls['#fsi']+\n\t\t\t\t\t\t$this->doc->dirControls['lri']+\n\t\t\t\t\t\t$this->doc->dirControls['#lri']+\n\t\t\t\t\t\t$this->doc->dirControls['rli']+\n\t\t\t\t\t\t$this->doc->dirControls['#rli']+\n\t\t\t\t\t\t$this->doc->dirControls['lro']+\n\t\t\t\t\t\t$this->doc->dirControls['#lro']+\n\t\t\t\t\t\t$this->doc->dirControls['rlo']+\n\t\t\t\t\t\t$this->doc->dirControls['#rlo'];\n\t\t$endCodes = $this->doc->dirControls['pdf']+\n\t\t\t\t\t\t$this->doc->dirControls['#pdf']+\n\t\t\t\t\t\t$this->doc->dirControls['pdi']+\n\t\t\t\t\t\t$this->doc->dirControls['#pdi'];\n\t\tif ($startCodes != $endCodes) {\n\t\t\tReport::addReport(\n\t\t\t\t'rep_markup_dir_unbalanced',\n\t\t\t\t'markup_category', REPORT_LEVEL_WARNING, \n\t\t\t\tlang('rep_markup_dir_unbalanced'),\n\t\t\t\tlang('rep_markup_dir_unbalanced_expl'),\n\t\t\t\tlang('rep_markup_dir_unbalanced_todo'),\n\t\t\t\tlang('rep_markup_dir_unbalanced_link')\n\t\t\t);\n\t\t}\n\n\t\n\t\t// ERROR: Escaped characters addressing control code range\n\t\t$failures = array();\n\t\tfor ($e=0;$e<9;$e++) {\n\t\t\tif (isset($this->doc->numEscapes[$e])) $failures[] = array($e,$this->doc->numEscapes[$e]);\n\t\t\t}\n\t\tfor ($e=11;$e<13;$e++) {\n\t\t\tif (isset($this->doc->numEscapes[$e])) $failures[] = array($e,$this->doc->numEscapes[$e]);\n\t\t\t}\n\t\tfor ($e=14;$e<31;$e++) {\n\t\t\tif (isset($this->doc->numEscapes[$e])) $failures[] = array($e,$this->doc->numEscapes[$e]);\n\t\t\t}\n\t\tfor ($e=128;$e<160;$e++) {\n\t\t\tif (isset($this->doc->numEscapes[$e])) $failures[] = array($e,$this->doc->numEscapes[$e]);\n\t\t\t}\n\t\t$str = '';\n\t\tforeach ($failures as $val) {\n\t\t\t$str .= '&amp;#'.$val[0].'; / &amp;#x'.dechex($val[0]).';<sup>('.$val[1].') </sup><br/>';\t\n\t\t\t}\n\t\tif (count($failures) > 0) {\n\t\t\tReport::addReport(\n\t\t\t\t'rep_markup_control_escapes',\n\t\t\t\t'markup_category', REPORT_LEVEL_ERROR, \n\t\t\t\tlang('rep_markup_control_escapes'),\n\t\t\t\tlang('rep_markup_control_escapes_expl', $str),\n\t\t\t\tlang('rep_markup_control_escapes_todo'),\n\t\t\t\tlang('rep_markup_control_escapes_link')\n\t\t\t);\n\t\t}\n\n\t\t//print((preg_match_all('/[\\x00-\\x1F]|[\\x80-\\x9F]/', $this->markup, $foundEntities)));\n\t\t//print_r($foundEntities);\n\n\n\t\t// ERROR: Incorrect values used for translate attribute\n\t\t$xlateNodes = $this->doc->getNodesWithAttr('translate');\n\t\tif (count($xlateNodes) > 0) {\n\t\t\t$invalidxlateNodes = array_filter($xlateNodes, function ($array) {\n\t\t\t\tif (is_array($array['values'])) { $array['values'] = implode(' ',$array['values']); }\n\t\t\t\t$array['values'] = strtolower($array['values']);\n\t\t\t\tif ($array['values']=='yes' || $array['values']=='no') { return false; }\n\t\t\t\treturn true;\n\t\t\t\t});\n\t\t\tif (count($invalidxlateNodes) > 0)\n\t\t\t\tReport::addReport(\n\t\t\t\t\t'rep_markup_translate_incorrect',\n\t\t\t\t\t'dir_category', REPORT_LEVEL_ERROR, \n\t\t\t\t\tlang('rep_markup_translate_incorrect'),\n\t\t\t\t\tlang('rep_markup_translate_incorrect_expl', Language::format(Utils::codesFromValArray($invalidxlateNodes), LANG_FORMAT_OL_CODE)),\n\t\t\t\t\tlang('rep_markup_translate_incorrect_todo'),\n\t\t\t\t\tlang('rep_markup_translate_incorrect_link')\n\t\t\t\t);\n\t\t}\n\n\n\n\n\n\t}", "title": "" }, { "docid": "483dfe6a3432c314217f16344a44a8be", "score": "0.50132704", "text": "function getascent() {}", "title": "" }, { "docid": "483dfe6a3432c314217f16344a44a8be", "score": "0.50132704", "text": "function getascent() {}", "title": "" }, { "docid": "3f75ec9f98b5c3a042ea61cc91cd5477", "score": "0.49992415", "text": "public function showIgnored() {\n\n }", "title": "" }, { "docid": "daef62c7ed132a4bf6e35a6ba955ddb5", "score": "0.49927285", "text": "function Define_Results() {\r\n\r\n\tif ($this->tot['img'] > 0) {\r\n\t\tif ($this->tot['img'] > $this->tot['alt_img']) {\r\n\t\t\t$this->pto[1101] = 'mal';\r\n\t\t\t$this->res_11_mal++;\r\n\t\t\t\r\n\t\t\tif ($isemag)\r\n\t\t\t{\r\n\t\t\t\t$this->pto['11101e'] = 'mal';\r\n\t\t\t\t$this->res_111_mal++;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->pto[1101] = 'duda';\r\n\t\t\t$this->res_11_duda++;\r\n\r\n\t\t\tif ($isemag)\r\n\t\t\t{\r\n\t\t\t\t$this->pto['11101e'] = 'duda';\r\n\t\t\t\t$this->res_111_duda++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif ($this->tot['input_image'] > 0) {\r\n\t\tif ($this->tot['input_image'] > $this->tot['alt_input']) {\r\n\t\t\t$this->pto[1102] = 'mal';\r\n\t\t\t$this->res_11_mal++;\r\n\t\t\t\r\n\t\t\tif ($isemag)\r\n\t\t\t{\r\n\t\t\t\t$this->pto['11102e'] = 'mal';\r\n\t\t\t\t$this->res_111_mal++;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->pto[1102] = 'duda';\r\n\t\t\t$this->res_11_duda++;\r\n\r\n\t\t\t\t\t\tif ($isemag)\r\n\t\t\t{\r\n\t\t\t\t$this->pto['11102e'] = 'duda';\r\n\t\t\t\t$this->res_111_duda++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif ($this->tot['area'] > 0) {\r\n\t\tif ($this->tot['area'] > $this->tot['alt_area']) {\r\n\t\t\t$this->pto[1103] = 'mal';\r\n\t\t\t$this->res_11_mal++;\r\n\t\t\t\r\n\t\t\tif ($isemag)\r\n\t\t\t{\r\n\t\t\t\t$this->pto['11103e'] = 'mal';\r\n\t\t\t\t$this->res_111_mal++;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->pto[1103] = 'duda';\r\n\t\t\t$this->res_11_duda++;\r\n\t\t\t\r\n\t\t\tif ($isemag)\r\n\t\t\t{\r\n\t\t\t\t$this->pto['11103e'] = 'duda';\r\n\t\t\t\t$this->res_111_duda++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// 1104 Script_body en This_Page\r\n\r\n\tif ($this->tot['embed'] > 0) {\r\n\t\t$this->elem_prog++;\r\n\t\tif ($this->tot['embed'] > $this->tot['noembed']) {\r\n\t\t\t$this->pto[1105] = 'mal';\r\n\t\t\t$this->res_11_mal++;\r\n\t\t\t\r\n\t\t\tif ($isemag)\r\n\t\t\t{\r\n\t\t\t\t$this->pto['12102e'] = 'mal';\r\n\t\t\t\t$this->res_121_mal++;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->pto[1105] = 'duda';\r\n\t\t\t$this->res_11_duda++;\r\n\t\t\t\r\n\t\t\tif ($isemag)\r\n\t\t\t{\r\n\t\t\t\t$this->pto['12102e'] = 'duda';\r\n\t\t\t\t$this->res_121_duda++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// 1106 Applet en This_Page\r\n\t// 1107 Object en This_Page\r\n\t// 1108 Iframe en This_Page\r\n\t// 1109 hrefson en This_Page\r\n\t// 1110 hrefapp en This_Page\r\n\r\n\tif ($this->tot['frame'] > 0) {\r\n\t\tif ($this->tot['noframes'] > 0) {\r\n\t\t\tif ($this->tot['noframe_vacio'] > 0) {\r\n\t\t\t\t$this->pto[1111] = 'mal';\r\n\t\t\t\t$this->res_11_mal++;\r\n\t\t\t\t$this->pto[6502] = 'mal';\r\n\t\t\t\t$this->pto[65] = 'mal';\r\n\t\t\t\tif (($this->tot['longdesc_frame'] == 0) && ($this->tot['frame'] > $this->tot['titulo_frame'])) {\r\n\t\t\t\t\t$this->pto[122] = 'mal';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->pto[122] = 'duda';\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->pto[1111] = 'duda';\r\n\t\t\t\t$this->res_11_duda++;\r\n\t\t\t\t$this->pto[6502] = 'duda';\r\n\t\t\t\t$this->pto[65] = 'duda';\r\n\t\t\t\t$this->pto[122] = 'duda';\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->pto[1111] = 'mal';\r\n\t\t\t$this->res_11_mal++;\r\n\t\t\t$this->pto[6502] = 'mal';\r\n\t\t\t$this->pto[65] = 'mal';\r\n\t\t\tif (($this->tot['longdesc_frame'] == 0) && ($this->tot['frame'] > $this->tot['titulo_frame'])) {\r\n\t\t\t\t$this->pto[122] = 'mal';\r\n\t\t\t} else {\r\n\t\t\t\t$this->pto[122] = 'duda';\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($this->tot['frame'] > $this->tot['titulo_frame']) {\r\n\t\t\t$this->pto[121] = 'mal';\r\n\t\t} else {\r\n\t\t\t$this->pto[121] = 'duda';\r\n\t\t}\r\n\t}\r\n\r\n\tif ($this->res_11_mal > 0) {\r\n\t\t$this->pto[11] = 'mal';\r\n\t} else if ($this->res_11_duda > 0) {\r\n\t\t$this->pto[11] = 'duda';\r\n\t}\r\n\t\r\n\tif ($isemag)\r\n\t{\r\n\t\tif ($this->res_111_mal > 0) {\r\n\t\t\t$this->pto['111e'] = 'mal';\r\n\t\t} else if ($this->res_111_duda > 0) {\r\n\t\t\t$this->pto['111e'] = 'duda';\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->res_121_mal > 0) {\r\n\t\t\t$this->pto['121e'] = 'mal';\r\n\t\t} else if ($this->res_11_duda > 0) {\r\n\t\t\t$this->pto['121e'] = 'duda';\r\n\t\t}\r\n\t}\r\n\r\n\t// 12 ismap en This_Page\r\n\r\n\t// 1301 Embed en This_Page\r\n\t// 1302 Object en This_Page\r\n\t// 1303 hrefapp en This_Page\r\n\r\n\tif (($this->pto[1301]=='duda') || ($this->pto[1302]=='duda') || ($this->pto[1303]=='duda')) {\r\n\t\t$this->pto[13] = 'duda';\r\n\t}\r\n\r\n\t// 1401 Embed en This_Page\r\n\t// 1402 Object en This_Page\r\n\t// 1403 hrefapp en This_Page\r\n\r\n\tif (($this->pto[1401]=='duda') || ($this->pto[1402]=='duda') || ($this->pto[1403]=='duda')) {\r\n\t\t$this->pto[14] = 'duda';\r\n\t}\r\n\r\n\tif ($this->tot['usemap'] > 0) {\r\n\t\tforeach ($this->tot['areas'] as $k => $v) {\r\n\t\t\tif (!in_array($v,$this->hrefa)) {\r\n\t\t\t\t$this->tot['area_sin_red']++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($this->tot['area_sin_red'] == 0) {\r\n\t\t\t$this->pto[15] = 'bien';\r\n\t\t} else {\r\n\t\t\t$this->pto[15] = 'mal';\r\n\t\t}\r\n\t}\r\n\r\n\tif ($this->tot['hay_estilos'] == 1) { // Hay estilos\r\n\t\t// Punto 3202\r\n\t\t$url_css = 'http://jigsaw.w3.org/css-validator/validator?uri='.urlencode(URL).'&warning=no&profile=css2&output=soap12';\r\n\t\t$file_css = @fopen($url_css, \"r\");\r\n\t\tif ($file_css) {\r\n\t\t\twhile (!feof($file_css)) {\r\n\t\t\t\t$res_css .= stripslashes(fread($file_css, 8192));\r\n\t\t\t}\r\n\t\t\tfclose($file_css);\r\n\t\t}\r\n\t\tif (preg_match(\"@\\<m:validity\\>(.*)\\</m:validity\\>@i\", $res_css, $errcss)) {\r\n\t\t\tif ($errcss[1] == 'true') {\r\n\t\t\t\t$this->pto[3202] = 'bien';\r\n\t\t\t} else {\r\n\t\t\t\t$this->pto[3202] = 'mal';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->tot['hay_estilos'] = 1;\r\n\t}\r\n\r\n\t// 31 Applet, embed, img, object en This_Page\r\n\tif ($this->pto[31] != 'duda') {\r\n\t\t$this->pto[31] = 'bien';\r\n\t}\r\n\r\n\t// Si hay una DTD (y sólo una)\r\n\t// abre la página del validador W3C y lee el resultado\r\n\tif ($this->tot['!doctype'] == 1) {\r\n\t\t$url_val = 'http://validator.w3.org/check?uri='.urlencode(URL);\r\n\t\t$file_val = @fopen($url_val, \"r\");\r\n\t\tif ($file_val) {\r\n\t\t\twhile (!feof($file_val)) {\r\n\t\t\t\t$res_val .= stripslashes(fread($file_val, 8192));\r\n\t\t\t}\r\n\t\t\tfclose($file_val);\r\n\t\t}\r\n\t\tpreg_match(\"@<h2(.*?)class=\\\"(invalid|valid)\\\">This Page Is( <strong>not</strong>)? Valid <a [^>]*>(.*)</a> ([a-zA-Z]+)\\!</h2>@i\", $res_val, $tempv);\r\n\t\t$this->tot['dtd_version'] = $tempv[4].' '.$tempv[5];\r\n\t\tif (preg_match(\"@<strong>not</strong>@i\", $res_val)) {\r\n\t\t\t$this->pto[3201] = 'mal';\r\n\t\t} else if (preg_match(\"@This Page Is Valid@i\", $res_val)) {\r\n\t\t\t$this->pto[3201] = 'bien';\r\n\t\t} else {\r\n\t\t\t$this->pto[3201] = 'duda';\r\n\t\t}\r\n\t} else {\r\n\t\t$this->pto[3201] = 'mal';\r\n\t}\r\n\r\n\t// 3202 - CSS validator\r\n\r\n\tif (($this->pto[3201] == 'bien') && (($this->pto[3202] == 'bien') || ($this->pto[3202] == 'na'))) {\r\n\t\t$this->pto[32] = 'bien';\r\n\t} else if (($this->pto[3201] == 'mal') || ($this->pto[3202] == 'mal')) {\r\n\t\t$this->pto[32] = 'mal';\r\n\t}\r\n\r\n\tif ($this->tot['hay_estilos'] == 1) {\r\n\t\tif ($this->tot['table'] > 0) {\r\n\t\t\t$this->pto[3301] = 'duda';\r\n\t\t} else {\r\n\t\t\t$this->pto[3301] = 'bien';\r\n\t\t}\r\n\t} else {\r\n\t\tif ($this->tot['table'] > 0) {\r\n\t\t\t$this->pto[3301] = 'mal';\r\n\t\t} else {\r\n\t\t\t$this->pto[3301] = 'bien';\r\n\t\t}\r\n\t}\r\n\r\n\tif ($this->tot['b'] + $this->tot['basefont'] + $this->tot['center'] + $this->tot['font'] + $this->tot['i'] + $this->tot['s'] + $this->tot['strike'] + $this->tot['u'] > 0) {\r\n\t\t$this->pto[3302] = 'mal';\r\n\t} else {\r\n\t\t$this->pto[3302] = 'bien';\r\n\t}\r\n\tif ($this->tot['attr_pres'] > 0) {\r\n\t\t$this->pto[3303] = 'mal';\r\n\t} else {\r\n\t\t$this->pto[3303] = 'bien';\r\n\t}\r\n\tif (($this->pto[3301]=='mal') || ($this->pto[3302]=='mal') || ($this->pto[3303]=='mal')) {\r\n\t\t$this->pto[33] = 'mal';\r\n\t} else if ($this->pto[3301]=='duda') {\r\n\t\t$this->pto[33] = 'duda';\r\n\t} else {\r\n\t\t$this->pto[33] = 'bien';\r\n\t}\r\n\r\n\tif ($this->tot['htmlabs'] > 0) {\r\n\t\t$this->pto[3401] = 'mal';\r\n\t}\r\n\r\n\tif ($this->tot['cssabs'] + $this->tot['cssfontpx'] > 0) {\r\n\t\t$this->pto[3402] = 'mal';\r\n\t} else {\r\n\t\t$this->pto[3402] = 'bien';\r\n\t}\r\n\r\n\tif (($this->pto[3401] == 'mal') || ($this->pto[3402] == 'mal')) {\r\n\t\t$this->pto[34] = 'mal';\r\n\t}\r\n\r\n\tif ($this->tot['h1'] + $this->tot['h2'] + $this->tot['h3'] + $this->tot['h4'] + $this->tot['h5'] + $this->tot['h6'] == 0) {\r\n\t\t$this->pto[35] = 'mal';\r\n\t} else if (($this->tot['horden'] > 0) || ($this->tot['h1'] == 0)) {\r\n\t\t$this->pto[35] = 'duda';\r\n\t} else {\r\n\t\t$this->pto[35] = 'bien';\r\n\t}\r\n\r\n\tif (($this->tot['li'] > 0) && ($this->tot['ol']+$this->tot['ul'] == 0)) {\r\n\t\t$this->pto[36] = 'mal';\r\n\t} else if (($this->tot['dt']+$this->tot['dd'] > 0) && ($this->tot['dl'] == 0)) {\r\n\t\t$this->pto[36] = 'mal';\r\n\t}\r\n\r\n\t// 3.7 - Siempre duda\r\n\t// 4.1 - Siempre duda\r\n\t// 4.2 - Siempre duda\r\n\r\n\tif ($this->tot['lang_pri']) {\r\n\t\tif (($this->tot['xhtml'] > 0) && (!$this->tot['lang_xml'])) {\r\n\t\t\t$this->pto[43] = 'mal';\r\n\t\t} else if (($this->tot['lang_xml']) && ($this->tot['lang_xml'] != $this->tot['lang_pri'])) {\r\n\t\t\t$this->pto[43] = 'mal';\r\n\t\t} else {\r\n\t\t\t$this->pto[43] = 'bien';\r\n\t\t}\r\n\t} else {\r\n\t\tif (stristr($this->tot['!doctype'],'XHTML 1.1')) {\r\n\t\t\tif ($this->tot['lang_xml']) {\r\n\t\t\t\t$this->pto[43] = 'mal';\r\n\t\t\t} else {\r\n\t\t\t\t$this->pto[43] = 'bien';\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->pto[43] = 'mal';\r\n\t\t}\r\n\t}\r\n\r\n\tif ($this->tot['table'] > 0) {\r\n\t\t$this->pto[51] = 'duda';\r\n\t\t$this->pto[52] = 'duda';\r\n\t\t$this->pto[53] = 'duda';\r\n\t\tif ($this->tot['th'] > 0) {\r\n\t\t\t$this->pto[54] = 'duda';\r\n\t\t\t$this->pto[56] = 'duda';\r\n\t\t\tif ($this->tot['summary'] > 0) {\r\n\t\t\t\t$this->pto[55] = 'duda';\r\n\t\t\t} else {\r\n\t\t\t\t$this->pto[55] = 'mal';\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->pto[54] = 'bien';\r\n\t\t\tif ($this->tot['summary'] > 0) {\r\n\t\t\t\t$this->pto[55] = 'mal';\r\n\t\t\t} else {\r\n\t\t\t\t$this->pto[55] = 'duda';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->pto[103] = 'duda';\r\n\t} else {\r\n\t\t$this->pto[53] = 'bien';\r\n\t}\r\n\r\n\t// 5.2 - Tablas - Con punto 5.1\r\n\t// 5.3 - Tablas - Con punto 5.1\r\n\t// 5.4 - Tablas - Con punto 5.1\r\n\t// 5.5 - Tablas - Con punto 5.1\r\n\t// 5.6 - Tablas - Con punto 5.1\r\n\r\n\tif ($this->tot['style'] + $this->tot['css_externa'] + $this->tot['attr_style'] > 0) {\r\n\t\t$this->pto[61] = 'duda';\r\n\t}\r\n\r\n\t// 6201 script en This_Page\r\n\t// 6202 frame en This_Page\r\n\r\n\tif (($this->pto[6201]=='duda') && ($this->pto[6202]=='duda')) {\r\n\t\t$this->pto[62] = 'duda';\r\n\t}\r\n\r\n\t// 6301 href_javascript en This_Page\r\n\t// 6302 Scripts en This_Page\r\n\t// 6303 embed y object en This_Page\r\n\t// 6304 Applet en This_Page\r\n\r\n\tif ($this->tot['a'] > 0) {\r\n\t\tif ($this->pto[6301] == 'mal') {\r\n\t\t\t$this->pto[63] = 'mal';\r\n\t\t} else {\r\n\t\t\t$this->pto[6301] = 'duda';\r\n\t\t\t$this->pto[63] = 'duda';\r\n\t\t}\r\n\t}\r\n\r\n\tif ($this->tot['event_ondblclick'] + $this->tot['event_onmouseover'] + $this->tot['event_onmousemove'] + $this->tot['event_onmouseout'] > 0) {\r\n\t\t$this->pto[64] = 'mal';\r\n\t\t$this->pto[8101] = 'mal';\r\n\t\t$this->pto[81] = 'mal';\r\n\t\t$this->pto[93] = 'mal';\r\n\t} else if ($this->tot['event_onclick'] + $this->tot['event_onmousedown'] + $this->tot['event_onmouseup'] + $this->tot['event_onkeypress'] + $this->tot['event_onkeydown'] + $this->tot['event_onkeyup'] > 0) {\r\n\t\tif (($this->tot['event_onclick'] != $this->tot['event_onkeypress']) || ($this->tot['event_onkeydown'] != $this->tot['event_onmousedown']) || ($this->tot['event_onkeyup'] != $this->tot['event_onmouseup'])) {\r\n\t\t\t$this->pto[64] = 'mal';\r\n\t\t\t$this->pto[8101] = 'mal';\r\n\t\t\t$this->pto[81] = 'mal';\r\n\t\t} else {\r\n\t\t\t$this->pto[64] = 'duda';\r\n\t\t\t$this->pto[8101] = 'duda';\r\n\t\t}\r\n\t\t$this->pto[93] = 'mal';\r\n\t} else if ($this->tot['event_onload'] + $this->tot['event_onfocus'] + $this->tot['event_onblur'] + $this->tot['event_onsubmit'] + $this->tot['event_onreset'] + $this->tot['event_onselect'] + $this->tot['event_onchange'] + $this->tot['event_onunload'] > 0) {\r\n\t\t$this->pto[64] = 'bien';\r\n\t\t$this->pto[8101] = 'bien';\r\n\t\t$this->pto[93] = 'bien';\r\n\t}\r\n\r\n\t// 6501 Script en This_Page\r\n\t// 6502 - Marcos - Con punto 1111\r\n\r\n\tif ($this->tot['script'] + $this->elem_prog > 0) {\r\n\t\t$this->pto[71] = 'duda';\r\n\t\t$this->pto[72] = 'duda';\r\n\t\t$this->pto[73] = 'duda';\r\n\t\t$this->pto[7402] = 'duda';\r\n\t\t$this->pto[7502] = 'duda';\r\n\t\t$this->pto[10102] = 'duda';\r\n\t} else {\r\n\t\t$this->pto[71] = 'bien';\r\n\t\t$this->pto[72] = 'bien';\r\n\t\t$this->pto[73] = 'bien';\r\n\t\t$this->pto[7402] = 'bien';\r\n\t\t$this->pto[7502] = 'bien';\r\n\t\t$this->pto[10102] = 'bien';\r\n\t}\r\n\r\n\tif ($this->tot['img'] > 0) {\r\n\t\t$this->pto[72] = 'duda';\r\n\t\t$this->pto[73] = 'duda';\r\n\t}\r\n\r\n\tif ($this->tot['blink'] > 0) {\r\n\t\t$this->pto[72] = 'mal';\r\n\t}\r\n\r\n\tif ($this->tot['marquee'] > 0) {\r\n\t\t$this->pto[73] = 'mal';\r\n\t}\r\n\r\n\tif ($this->pto[7401] != 'mal') {\r\n\t\t$this->pto[7401] = 'bien';\r\n\t\tif ($this->pto[7402] == 'duda') {\r\n\t\t\t$this->pto[74] = 'duda';\r\n\t\t} else {\r\n\t\t\t$this->pto[74] = 'bien';\r\n\t\t}\r\n\t}\r\n\r\n\tif ($this->pto[7501] != 'mal') {\r\n\t\t$this->pto[7501] = 'bien';\r\n\t\tif ($this->pto[7502] == 'duda') {\r\n\t\t\t$this->pto[75] = 'duda';\r\n\t\t} else {\r\n\t\t\t$this->pto[75] = 'bien';\r\n\t\t}\r\n\t}\r\n\r\n\t// 8101 - Eventos - Con punto 6.4\r\n\t// 8102 Embed en This_Page\r\n\t// 8103 Applet en This_Page\r\n\t// 8104 Object en This_Page\r\n\r\n\tif ($this->pto[8101]=='duda') {\r\n\t\t$this->pto[81] = 'duda';\r\n\t} else if ($this->pto[8101]=='bien') {\r\n\t\tif (($this->pto[8102]=='duda') || ($this->pto[8103]=='duda') || ($this->pto[8104]=='duda')) {\r\n\t\t\t$this->pto[81] = 'duda';\r\n\t\t} else if (($this->pto[8102]=='na') && ($this->pto[8103]=='na') && ($this->pto[8104]=='na')) {\r\n\t\t\t$this->pto[81] = 'bien';\r\n\t\t}\r\n\t} else {\r\n\t\tif (($this->pto[8102]=='duda') || ($this->pto[8103]=='duda') || ($this->pto[8104]=='duda')) {\r\n\t\t\t$this->pto[81] = 'duda';\r\n\t\t}\r\n\t}\r\n\r\n\tif (($this->tot['usemap'] > 0) && ($this->pto[91] != 'mal')) {\r\n\t\t$this->pto[91] = 'bien';\r\n\t}\r\n\r\n\t// 9201 ismap en This_Page\r\n\r\n\tif ($this->elem_prog > 0) {\r\n\t\t$this->pto[9202] = 'duda';\r\n\t}\r\n\r\n\tif (($this->pto[9201]=='duda') || ($this->pto[9202]=='duda')) {\r\n\t\t$this->pto[92] = 'duda';\r\n\t}\r\n\r\n\t// 9.3 - Eventos - Con punto 6.4\r\n\t// 9.4 - Siempre duda\r\n\r\n\tif ($this->tot['attr_accesskey'] > 0) {\r\n\t\t$this->pto[95] = 'bien';\r\n\t} else {\r\n\t\t$this->pto[95] = 'mal';\r\n\t}\r\n\r\n\tif ($this->tot['attr_target'] > 0) {\r\n\t\t$this->pto[10101] = 'duda';\r\n\t} else {\r\n\t\t$this->pto[10101] = 'bien';\r\n\t}\r\n\r\n\t// 10.2 script, progr con 7.1\r\n\r\n\tif (($this->pto[10101] == 'bien') && ($this->pto[10102] == 'bien')) {\r\n\t\t$this->pto[101] = 'bien';\r\n\t} else {\r\n\t\t$this->pto[101] = 'duda';\r\n\t}\r\n\r\n\t$form_label = $this->tot['input_label'] + $this->tot['select'] + $this->tot['textarea'];\r\n\tif ($form_label > 0) {\r\n\t\tif ($form_label > $this->tot['label']) {\r\n\t\t\t$this->pto[102] = 'mal';\r\n\t\t\t$this->pto[124] = 'mal';\r\n\t\t} else {\r\n\t\t\t$this->pto[102] = 'duda';\r\n\t\t\tif ($this->tot['label'] > $this->tot['attr_for']) {\r\n\t\t\t\t$this->pto[124] = 'mal';\r\n\t\t\t} else {\r\n\t\t\t\t$this->pto[124] = 'duda';\r\n\t\t\t\tforeach ($this->tot['for_id'] as $f) {\r\n\t\t\t\t\tif (!in_array($f, $this->tot['id_for'])) {\r\n\t\t\t\t\t\t$this->pto[124] = 'mal';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// 103 - Tablas col. - Con punto 5.1\r\n\r\n\tif ($this->tot['input_text'] + $this->tot['textarea'] > 0) {\r\n\t\tif ($this->tot['input_vacio'] > 0) {\r\n\t\t\t$this->pto[104] = 'mal';\r\n\t\t} else {\r\n\t\t\t$this->pto[104] = 'bien';\r\n\t\t}\r\n\t}\r\n\r\n\tif ($this->tot['a'] > 1) {\r\n\t\tif ($this->tot['a_adya'] > 0) {\r\n\t\t\t$this->pto[105] = 'mal';\r\n\t\t} else {\r\n\t\t\t$this->pto[105] = 'bien';\r\n\t\t}\r\n\t}\r\n\r\n\tif ($this->tot['dtd']) {\r\n\t\tif (preg_match(\"@(XHTML|HTML 4.01)@i\",$this->tot['dtd'])) {\r\n\t\t\t$this->tot['dtd_nueva']++;\r\n\t\t} else if (preg_match(\"@HTML (2.0|3.0|3.2|4.0)@i\",$this->tot['dtd'])) {\r\n\t\t\t$this->tot['dtd_vieja']++;\r\n\t\t\t$this->pto[111] = 'mal';\r\n\t\t}\r\n\t}\r\n\tif ($this->tot['!doctype'] == 0) { $this->pto[111] = 'mal'; }\r\n\tif ($this->tot['applet'] + $this->tot['embed'] + $this->tot['blink'] + $this->tot['marquee'] + $this->tot['flash'] > 0) {\r\n\t\t$this->pto[111] = 'mal';\r\n\t}\r\n\r\n\t$this->tot['elem_deprec'] = $this->tot['applet'] + $this->tot['basefont'] + $this->tot['center'] + $this->tot['dir'] + $this->tot['font'] + $this->tot['isindex'] + $this->tot['menu'] + $this->tot['s'] + $this->tot['strike'] + $this->tot['u'];\r\n\r\n\tif ($this->tot['elem_deprec'] > 0) {\r\n\t\t$this->pto[11201] = 'mal';\r\n\t} else {\r\n\t\t$this->pto[11201] = 'bien';\r\n\t}\r\n\r\n\tif ($this->tot['attr_deprec'] > 0) {\r\n\t\t$this->pto[11202] = 'mal';\r\n\t} else {\r\n\t\t$this->pto[11202] = 'bien';\r\n\t}\r\n\r\n\tif (($this->pto[11201]=='bien') && ($this->pto[11202]=='bien')) {\r\n\t\t$this->pto[112] = 'bien';\r\n\t} else {\r\n\t\t$this->pto[112] = 'mal';\r\n\t}\r\n\r\n\t// 11.3 Duda\r\n\t// 11.4 Duda\r\n\t// 12.1 marcos\r\n\t// 12.2 marcos\r\n\r\n\t$bloques = $this->tot['h1'] + $this->tot['h2'] + $this->tot['h3'] + $this->tot['h4'] + $this->tot['h5'] + $this->tot['h6'] + $this->tot['p'] + $this->tot['ol'] + $this->tot['ul'] + $this->tot['dl'];\r\n\tif ($bloques == 0) {\r\n\t\t$this->pto[123] = 'mal';\r\n\t}\r\n\r\n\t// 12.4 - Con punto 10.2\r\n\t// 13.1 A en This_Page\r\n\t// 13.2/13.3/13.4/13.5/13.6/13.7/13.8/13.9 y 13.10 Duda\r\n\t// 14.1/14.2 y 14.3 Duda\r\n\r\n\t}", "title": "" }, { "docid": "50c140848a9d6b963320061a5d4a6a9b", "score": "0.4990118", "text": "function loaddata() { }", "title": "" }, { "docid": "727ba5c98f863405e0c1c683e6a991ec", "score": "0.49833772", "text": "protected function get_explanation()\n {\n }", "title": "" }, { "docid": "727ba5c98f863405e0c1c683e6a991ec", "score": "0.49828422", "text": "protected function get_explanation()\n {\n }", "title": "" }, { "docid": "13d7235cbacc4370c8b510d484bccb6a", "score": "0.49784458", "text": "public function isUsed()\n {\n }", "title": "" }, { "docid": "24451d975f7e7a26c6085f2db43e0a3e", "score": "0.49765822", "text": "function getProcessed();", "title": "" }, { "docid": "a24edac3e1a897f63168350e8847c94a", "score": "0.49762273", "text": "protected function _dochecks()\n {\n }", "title": "" }, { "docid": "965da376f63eee63b94d0334bf2d6e6a", "score": "0.49728096", "text": "public function abonar3()\n\n {\n\n\n\n }", "title": "" }, { "docid": "55bc6ed0ce6a75247324c52cf12ed6e9", "score": "0.49727333", "text": "abstract function suggestedSolutions ();", "title": "" }, { "docid": "a00453a1d3044c896debd4017c876a60", "score": "0.4970919", "text": "public function soul();", "title": "" }, { "docid": "4bb55d871a3ba53fc22e86d27f6c5039", "score": "0.49699467", "text": "public function stamina();", "title": "" }, { "docid": "6fd460ee12665a8d4066ec27279a3782", "score": "0.49649388", "text": "function getAnalysis( $word, $id, $time, $cluster )\n\t{\n\t\tglobal $Cl_root_path, $basic_gui, $userdata;\n\t\t\n\t\t$path = $Cl_root_path . 'Tag_data/' . $userdata[ 'user_id' ] . '/' . $time;\n\t\tif ( !is_dir( $path ) )\n\t\t{\n\t\t\t$path = $Cl_root_path . 'cache/' . $time;\n\t\t}\n\t\t\n\t\t$statistics = \"$path/statistics_$id\" . phpEx;\n\t\t$statistics = unserialize( file_get_contents( $statistics ) );\n\t\t\n\t\t$statisticsHash = \"$path/statisticshash_$id\" . phpEx;\n\t\t$statisticsHash = unserialize( file_get_contents( $statisticsHash ) );\n\t\t\n\t\t$word = urldecode( $word );\n\t\t\n// \t\techo intval( $cluster );\n\t\t\n\t\tif ( $cluster )\n\t\t{\n\t\t\t$word = explode( ' ', $word );\n\t\t\t$glue = '\\s+';\n\t\t}else\n\t\t{\n\t\t\t$word = explode( '<plus> + </plus>', $word );\n\t\t\t$glue = '\\b.*?\\b';\n\t\t}\n\t\t\n\t\tinclude( $path . '/filehash' . phpEx );\n\t\t$dir = 'dir' . basename( $inputHash[ $id ][ 'target' ] );\n\t\t$lang = $inputHash[ $id ][ 'language' ];\n\t\t\n\t\t$where = array();\n\t\t$where[ 0 ] = $this->_getWhere( $word[ 0 ], $lang, $statistics, $statisticsHash );\n// \t\t$where[ 0 ] = $statistics[ $statisticsHash[ $word[ 0 ] ] ][ 'where' ];\n\t\t$min = count( $where[ 0 ] );\n\t\t$Count = $min;\n\t\tfor ( $i = 1; $i < count( $word ); $i++ )\n\t\t{\n\t\t\t$where[ $i ] = $this->_getWhere( $word[ $i ], $lang, $statistics, $statisticsHash );\n// \t\t\t$where[ $i ] = $statistics[ $statisticsHash[ $word[ $i ] ] ][ 'where' ];\n\t\t\t$c = count( $where[ $i ] );\n\t\t\t$Count += $c;\n\t\t\tif ( $c < $min )\n\t\t\t{\n\t\t\t\t$min = $c;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$splitters = array( 'en' => '#\\W+#', 'sl' => '#[^\\p{L}]+#u' );\n\t\t\n\t\t$text = file_get_contents( \"$path/$dir/content.xml\" );\n\t\t$textSplit = preg_split( $splitters[ $lang ], str_replace( \"'\", '', $this->xml_entity_decode( file_get_contents( \"$path/$id.txt\" ) ) ) );\n\t\t\n\t\t$Sentences = array();\n\t\t$Paragraphs = array();\n\t\t\n\t\t$abbreviations = array( 'Dr.', 'prof.', 'A.D.', 'B.C.', 'mr.', 'mrs.', 'ms.', 'g.', 'ga.' );\n\n\t\t$abbreviations = implode( '|', $abbreviations );\n\t\tpreg_match_all( \"#(?<=>|[.?!]\\s)\\p{Lu}($abbreviations|[\\p{L}\\s\\p{Po}\\p{Pc}\\p{Pd}\\p{Pi}\\p{Ps}\\p{S}\\p{M}\\p{N}]|<text:s/>)+([.?!]|(?=</))#Uum\", \n\t\t\tstr_replace( array( '«', '»' ), '', $text ), $sentences );\n\t\tpreg_match_all( \"#<text:p.*>.+</text:p>#Usm\", $text, $paragraphs );\n\t\t\n// \t\tprint_R( $sentences );\n\t\t$html = '';\n\t\t\n\t\tfor ( $i = 0; $i < $min; $i++ )\n\t\t{\n\t\t\t$wrd = array();\n\t\t\tfor ( $k = 0; $k < count( $where ); $k++ )\n\t\t\t{\n\t\t\t\t$wrd[] = $textSplit[ $where[ $k ][ $i ] ];\n\t\t\t}\n\t\t\t$wrd = implode( $glue, $wrd );\n// \t\t\techo $i . '::' . $wrd . \"\\n\";\n// \t\t\tprint_R( $sentences );\n// \t\t\tdie();\n\t\t\tfor ( $j = 0; $j < count( $sentences[ 0 ] ); $j++ )\n\t\t\t{\n\t\t\t\t$sentence = $sentences[ 0 ][ $j ];\n\t\t\t\tif ( strpos( $sentence, '<' ) !== FALSE )\n\t\t\t\t{\n\t\t\t\t\t$sentences[ 0 ][ $j ] = preg_replace( '#<.*?>#', '', $sentence );\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\tif ( preg_match( \"#\\b$wrd\\b#\", $sentence ) )\n\t\t\t\t{\n// \t\t\t\t\techo \"pling\\n\";\n\t\t\t\t\t$item = $sentence;\n\t\t\t\t\t\n\t\t\t\t\tif ( !$cluster )\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ( explode( $glue, $wrd ) as $w )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$item = preg_replace( \"#(\\b)($w)(\\b)#\", '$1<result>$2</result>$3', $item );\n\t\t\t\t\t\t}\n\t\t\t\t\t}else\n\t\t\t\t\t{\n\t\t\t\t\t\t$item = preg_replace( \"#(\\b)($wrd)(\\b)#\", '$1<result>$2</result>$3', $item );\n\t\t\t\t\t}\n\t\t\t\t\t$item .= '<br /><br />';\n\t\t\t\t\t$Sentences[] = $item;\n\t\t\t\t\tunset( $sentences[ 0 ][ $j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor ( $j = 0; $j < count( $paragraphs[ 0 ] ); $j++ )\n\t\t\t{\n\t\t\t\t$paragraph = $paragraphs[ 0 ][ $j ];\n\t\t\t\tif ( strpos( $paragraph, '<' ) !== FALSE )\n\t\t\t\t{\n\t\t\t\t\t$paragraphs[ 0 ][ $j ] = preg_replace( '#<.*?>#', '', $paragraph );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( preg_match( \"#\\b$wrd\\b#i\", $paragraph ) )\n\t\t\t\t{\n\t\t\t\t\t$item = $paragraph;\n\t\t\t\t\tif ( !$cluster )\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ( explode( $glue, $wrd ) as $w )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$item = preg_replace( \"#(\\b)($w)(\\b)#\", '$1<result>$2</result>$3', $item );\n\t\t\t\t\t\t}\n\t\t\t\t\t}else\n\t\t\t\t\t{\n\t\t\t\t\t\t$item = preg_replace( \"#(\\b)($wrd)(\\b)#\", '$1<result>$2</result>$3', $item );\n\t\t\t\t\t}\n\t\t\t\t\t$item .= '<br /><br />';\n\t\t\t\t\t$Paragraphs[] = $item;\n\t\t\t\t\tunset( $paragraphs[ 0 ][ $j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$scroll = '<img src=\"' . $basic_gui->get_URL() . '/template/TagCloud/images/uparrow.png\" onmouseover=\"startScrollResult( \\'%1$s\\', -10 )\" onmouseout=\"stopScrollResult( \\'%1$s\\' )\" />' . \n\t\t\t\t'<img src=\"' . $basic_gui->get_URL() . '/template/TagCloud/images/downarrow.png\" onmouseover=\"startScrollResult( \\'%1$s\\', 10 )\" onmouseout=\"stopScrollResult( \\'%1$s\\' )\" />';\n\t\t\n\t\t$analysis = ( count( $where ) > 1 ) ? $this->lang[ 'Analysis_founds' ] : $this->lang[ 'Analysis_found' ];\n\t\t$Count = ( count( $where ) > 1 ) ? count( $Paragraphs ) : $Count;\n\t\t\n\t\t$html .= '<img src=\"' . $basic_gui->get_URL() . '/template/TagCloud/images/close.png\" style=\"float: right; cursor: pointer; margin: 5px; margin-bottom: -100%\" onclick=\"closeWhatever()\" />';\n\t\t$html .= '<h1>' . implode( '+', $word ) . '</h1>';\n\t\t$html .= '<p>' . sprintf( $analysis, $Count, count( $Sentences ), count( $Paragraphs ) ) . '</p>';\n\t\t$html .= '<h2>' . $this->lang[ 'Analysis_sentences' ] . ':</h2>' . sprintf( $scroll, 'analysisS' );\n\t\t$html .= '<p class=\"result\" id=\"analysisS\" ondblclick=\"changeScroll( \\'analysisS\\' )\">' . implode( $Sentences ) . '</p>';\n\t\t$html .= '<h2>' . $this->lang[ 'Analysis_paragraphs' ] . ':</h2>' . sprintf( $scroll, 'analysisP' );\n\t\t$html .= '<p class=\"result\" id=\"analysisP\" ondblclick=\"changeScroll( \\'analysisP\\' )\">' . implode( $Paragraphs ) . '</p>';\n\t\t\n\t\treturn array( $html );\n\t}", "title": "" }, { "docid": "661abfb1a04a2fcda7fcc8f3add2d313", "score": "0.49639535", "text": "function visualize() {\r\n\t\tdie(\"Implementation is to be provided by descendant class.\");\r\n\t}", "title": "" }, { "docid": "c0fc48474ef5d0c571ef080e78a3b211", "score": "0.49603924", "text": "public function optimize();", "title": "" }, { "docid": "4d992f3d1253f36d0a3be2812215f595", "score": "0.4959387", "text": "public function historize()\n {\n }", "title": "" }, { "docid": "0516be717705eb5016753ea1f8c229af", "score": "0.4958214", "text": "protected function is_applicable()\n {\n }", "title": "" }, { "docid": "9d4110219384e1ae683c5b2bed85c2cf", "score": "0.49543244", "text": "public function get_warnings () {}", "title": "" }, { "docid": "bbbe5de8320b9d06ddc0cdbc5a7976e2", "score": "0.49482754", "text": "public function Instgram()\n {\n\n }", "title": "" }, { "docid": "6354cc10cf0f0d0e3689ad7ec7285d0c", "score": "0.49352497", "text": "public function passes();", "title": "" }, { "docid": "b1f87f16fdc05a4994aebe351d5f9b2e", "score": "0.49345636", "text": "public function estadisticas(){\n }", "title": "" }, { "docid": "af51b2e039d3e5f092ae0aebf86b93e7", "score": "0.49170485", "text": "public function preProcess();", "title": "" }, { "docid": "ec18d299dba47ea8ed3141b6b06d0c0a", "score": "0.49138328", "text": "public function stats(): array;", "title": "" }, { "docid": "3143fef98759b1ea57a36a35bf6292e1", "score": "0.4907788", "text": "public function run()\n {\n //\n $factsList = [\n ['acids', 'nitric acid', 'name', 'HNO3', 'formula'],\n ['acids', 'sulfuric acid', 'name', 'H2SO4', 'formula'],\n ['acids', 'hydrochloric acid', 'name', 'HCl', 'formula'],\n ['acids', 'hydrobromic acid', 'name', 'HBr', 'formula'],\n ['acids', 'hydroiodic acid', 'name', 'HI', 'formula'],\n ['acids', 'hydrofluoric acid', 'name', 'HF', 'formula'],\n ['acids', 'chloric acid', 'name', 'HClO3', 'formula'],\n ['acids', 'perchloric acid', 'name', 'HClO4', 'formula'],\n ['acids', 'acetic acid', 'name', 'HC2H3O2', 'formula'],\n ['commonCompound', 'ammonia', 'name', 'NH3', 'formula'],\n ['commonCompound', 'water', 'name', 'H2O', 'formula'],\n ['commonCompound', 'methane', 'name', 'CH4', 'formula'],\n ['commonCompound', 'ozone', 'name', 'O3', 'formula'],\n ['commonCompound', 'nitric oxide', 'name', 'NO', 'formula'],\n ['commonCompound', 'nitrous oxide', 'name', 'N2O', 'formula'],\n ['numerical constant', 'water', 'density', '1', 'g/mL'],\n ['conversion factor', '1', 'mL', '1', 'cm^3']];\n\n $ionsList = [['polyatomic ions','nitrate','name', 'NO3-1', 'formula'],\n ['polyatomic ions','nitrite','name', 'NO2-1', 'formula'],\n ['polyatomic ions','ammonium','name', 'NH4+1', 'formula'],\n ['polyatomic ions','sulfate','name', 'SO4-2', 'formula'],\n ['polyatomic ions','sulfite','name', 'SO3-2', 'formula'],\n ['polyatomic ions','phosphate','name', 'PO4-3', 'formula'],\n ['polyatomic ions','cyanide','name', 'CN-1', 'formula'],\n ['polyatomic ions','hydroxide','name', 'OH-1', 'formula'],\n ['polyatomic ions','peroxide','name', 'O2-2', 'formula'],\n ['polyatomic ions','acetate','name', 'C2H3O2-1', 'formula'],\n ['polyatomic ions','perchlorate','name', 'ClO4-1', 'formula'],\n ['polyatomic ions','chlorate','name', 'ClO3-1', 'formula'],\n ['polyatomic ions','chlorite','name', 'ClO2-1', 'formula'],\n ['polyatomic ions','hypochlorite','name', 'ClO-1', 'formula'],\n ['polyatomic ions','perbromate','name', 'BrO4-1', 'formula'],\n ['polyatomic ions','bromate','name', 'BrO3-1', 'formula'],\n ['polyatomic ions','bromite','name', 'BrO2-1', 'formula'],\n ['polyatomic ions','hypobromite','name', 'BrO-1', 'formula'],\n ['polyatomic ions','periodate','name', 'IO4-1', 'formula'],\n ['polyatomic ions','iodate','name', 'IO3-1', 'formula'],\n ['polyatomic ions','iodite','name', 'IO2-1', 'formula'],\n ['polyatomic ions','hypoiodite','name', 'IO-1', 'formula'],\n ['polyatomic ions','carbonate','name', 'CO3-2', 'formula'],\n ['polyatomic ions','bicarbonate','name', 'HCO3-1', 'formula'],\n ['polyatomic ions','bisulfate','name', 'HSO4-1', 'formula'],\n ['polyatomic ions','azide','name', 'N3-1', 'formula']];\n\n $elementsList = [['elementSymbol', 'hydrogen', 'name', 'H', '1'],\n ['elementSymbol', 'helium', 'name', 'He', '2'],\n ['elementSymbol', 'lithium', 'name', 'Li', '3'],\n ['elementSymbol', 'beryllium', 'name', 'Be', '4'],\n ['elementSymbol', 'boron', 'name', 'B', '5'],\n ['elementSymbol', 'carbon', 'name', 'C', '6'],\n ['elementSymbol', 'nitrogen', 'name', 'N', '7'],\n ['elementSymbol', 'oxygen', 'name', 'O', '8'],\n ['elementSymbol', 'fluorine', 'name', 'F', '9'],\n ['elementSymbol', 'bromine', 'name', 'Br', '10'],\n ['elementSymbol', 'iodine', 'name', 'I', '11'],\n ['elementSymbol', 'sodium', 'name', 'Na', '12'],\n ['elementSymbol', 'magnesium', 'name', 'Mg', '13'],\n ['elementSymbol', 'aluminum', 'name', 'Al', '14'],\n ['elementSymbol', 'silicon', 'name', 'Si', '15'],\n ['elementSymbol', 'phosphorus', 'name', 'P', '16'],\n ['elementSymbol', 'sulfur', 'name', 'S', '17'],\n ['elementSymbol', 'chlorine', 'name', 'Cl', '18'],\n ['elementSymbol', 'argon', 'name', 'Ar', '19'],\n ['elementSymbol', 'potassium', 'name', 'K', '20'],\n ['elementSymbol', 'calcium', 'name', 'Ca', '21'],\n ['elementSymbol', 'titanium', 'name', 'Ti', '22'],\n ['elementSymbol', 'iron', 'name', 'Fe', '23'],\n ['elementSymbol', 'copper', 'name', 'Cu', '24'],\n ['elementSymbol', 'mercury', 'name', 'Hg', '25'],\n ['elementSymbol', 'silver', 'name', 'Ag', '26'],\n ['elementSymbol', 'gold', 'name', 'Au', '27'],\n ['elementSymbol', 'tin', 'name', 'Sn', '28'],\n ['elementSymbol', 'lead', 'name', 'Pb', '29'],\n ['elementSymbol', 'zinc', 'name', 'Zn', '30'],\n ['elementGroup', 'hydrogen', 'name', 'H', '1'],\n ['elementGroup', 'helium', 'name', 'He', '2'],\n ['elementGroup', 'lithium', 'name', 'Li', '3'],\n ['elementGroup', 'beryllium', 'name', 'Be', '4'],\n ['elementGroup', 'boron', 'name', 'B', '5'],\n ['elementGroup', 'carbon', 'name', 'C', '6'],\n ['elementGroup', 'nitrogen', 'name', 'N', '7'],\n ['elementGroup', 'oxygen', 'name', 'O', '8'],\n ['elementGroup', 'fluorine', 'name', 'F', '9'],\n ['elementGroup', 'bromine', 'name', 'Br', '10'],\n ['elementGroup', 'iodine', 'name', 'I', '11'],\n ['elementGroup', 'sodium', 'name', 'Na', '12'],\n ['elementGroup', 'magnesium', 'name', 'Mg', '13'],\n ['elementGroup', 'aluminum', 'name', 'Al', '14'],\n ['elementGroup', 'silicon', 'name', 'Si', '15'],\n ['elementGroup', 'phosphorus', 'name', 'P', '16'],\n ['elementGroup', 'sulfur', 'name', 'S', '17'],\n ['elementGroup', 'chlorine', 'name', 'Cl', '18'],\n ['elementGroup', 'argon', 'name', 'Ar', '19'],\n ['elementGroup', 'potassium', 'name', 'K', '20'],\n ['elementGroup', 'calcium', 'name', 'Ca', '21'],\n ['elementGroup', 'titanium', 'name', 'Ti', '22'],\n ['elementGroup', 'iron', 'name', 'Fe', '23'],\n ['elementGroup', 'copper', 'name', 'Cu', '24'],\n ['elementGroup', 'mercury', 'name', 'Hg', '25'],\n ['elementGroup', 'silver', 'name', 'Ag', '26'],\n ['elementGroup', 'gold', 'name', 'Au', '27'],\n ['elementGroup', 'tin', 'name', 'Sn', '28'],\n ['elementGroup', 'lead', 'name', 'Pb', '29'],\n ['elementGroup', 'zinc', 'name', 'Zn', '30'],\n ['elementCharge', 'hydrogen', 'name', 'H', '1'],\n ['elementCharge', 'helium', 'name', 'He', '2'],\n ['elementCharge', 'lithium', 'name', 'Li', '3'],\n ['elementCharge', 'beryllium', 'name', 'Be', '4'],\n ['elementCharge', 'boron', 'name', 'B', '5'],\n ['elementCharge', 'carbon', 'name', 'C', '6'],\n ['elementCharge', 'nitrogen', 'name', 'N', '7'],\n ['elementCharge', 'oxygen', 'name', 'O', '8'],\n ['elementCharge', 'fluorine', 'name', 'F', '9'],\n ['elementCharge', 'bromine', 'name', 'Br', '10'],\n ['elementCharge', 'iodine', 'name', 'I', '11'],\n ['elementCharge', 'sodium', 'name', 'Na', '12'],\n ['elementCharge', 'magnesium', 'name', 'Mg', '13'],\n ['elementCharge', 'aluminum', 'name', 'Al', '14'],\n ['elementCharge', 'silicon', 'name', 'Si', '15'],\n ['elementCharge', 'phosphorus', 'name', 'P', '16'],\n ['elementCharge', 'sulfur', 'name', 'S', '17'],\n ['elementCharge', 'chlorine', 'name', 'Cl', '18'],\n ['elementCharge', 'argon', 'name', 'Ar', '19'],\n ['elementCharge', 'potassium', 'name', 'K', '20'],\n ['elementCharge', 'calcium', 'name', 'Ca', '21'],\n ['elementCharge', 'titanium', 'name', 'Ti', '22'],\n ['elementCharge', 'iron', 'name', 'Fe', '23'],\n ['elementCharge', 'copper', 'name', 'Cu', '24'],\n ['elementCharge', 'mercury', 'name', 'Hg', '25'],\n ['elementCharge', 'silver', 'name', 'Ag', '26'],\n ['elementCharge', 'gold', 'name', 'Au', '27'],\n ['elementCharge', 'tin', 'name', 'Sn', '28'],\n ['elementCharge', 'lead', 'name', 'Pb', '29'],\n ['elementCharge', 'zinc', 'name', 'Zn', '30']\n ];\n\n for ($i = 0 ; $i < count($factsList) ; ++$i) {\n DB::table('facts')->insert([\n 'group_name' => $factsList[$i][0],\n 'key' => $factsList[$i][3],\n 'key_name' => $factsList[$i][4],\n 'prop' => $factsList[$i][1],\n 'prop_name' => $factsList[$i][2]\n ]);\n }\n for ($i = 0 ; $i < count($ionsList) ; ++$i) {\n DB::table('facts')->insert([\n 'group_name' => $ionsList[$i][0],\n 'key' => $ionsList[$i][3],\n 'key_name' => $ionsList[$i][4],\n 'prop' => $ionsList[$i][1],\n 'prop_name' => $ionsList[$i][2]\n ]);\n }\n for ($i = 0 ; $i < count($elementsList) ; ++$i) {\n DB::table('facts')->insert([\n 'group_name' => $elementsList[$i][0],\n 'key' => $elementsList[$i][3],\n 'key_name' => $elementsList[$i][4],\n 'prop' => $elementsList[$i][1],\n 'prop_name' => $elementsList[$i][2]\n ]);\n }\n }", "title": "" }, { "docid": "ce60d3a42f1ab09bd03175e3ab09152f", "score": "0.49042663", "text": "public function getExplain() {\n return NULL;\n }", "title": "" }, { "docid": "e1b7d2818e37e52a35dc227a0e7cd11d", "score": "0.4899287", "text": "protected function get_feature_flag()\n {\n }", "title": "" }, { "docid": "e1b7d2818e37e52a35dc227a0e7cd11d", "score": "0.4899182", "text": "protected function get_feature_flag()\n {\n }", "title": "" }, { "docid": "1ebd402e39b886bca014d45158804729", "score": "0.4898996", "text": "function optimize() { /* {{{ */\n\t}", "title": "" }, { "docid": "8cee4a78c539317e94bcc2161944fdcf", "score": "0.4894506", "text": "protected function issueUsageWarnings() {\n\t\tif (!$this->accumulateVisited) {\n\t\t\tYii::log(Yii::t('yii','Sources have not been accumulated in \"{class}\".', array('{class}'=>__CLASS__)),CLogger::LEVEL_WARNING);\t\t\t\n\t\t}\n\t\t\n\t\tif (count($this->sourceList) == 0) {\n\t\t\tYii::log(Yii::t('yii','No sources defined in \"{class}\".', array('{class}'=>__CLASS__)),CLogger::LEVEL_WARNING);\t\t\t\n\t\t}\n\t\n\t\tif (count($this->tokenList) == 0) {\n\t\t\tYii::log(Yii::t('yii','Sources have produced no tokens \"{class}\".', array('{class}'=>__CLASS__)),CLogger::LEVEL_WARNING);\t\t\t\n\t\t}\n\t\t\n\t\t$countCheck = count($this->blackList) +\n\t\t\t\t\t\t\tcount($this->blackListFile) +\n\t\t\t\t\t\t\tcount($this->blackListRegularExpression) +\n\t\t\t\t\t\t\tcount($this->blackListRegularExpressionFile);\t\t\t\t\t\t\t\n\t\tif (($countCheck) and (!$this->blackListVisited)) {\n\t\t\tYii::log(Yii::t('yii','Blacklist defined but not used in \"{class}\".', array('{class}'=>__CLASS__)),CLogger::LEVEL_WARNING);\t\t\t\n\t\t}\n\n\t\t$countCheck = count($this->whiteList) +\n\t\t\t\t\t\t\tcount($this->whiteListFile) +\n\t\t\t\t\t\t\tcount($this->whiteListRegularExpression) +\n\t\t\t\t\t\t\tcount($this->whiteListRegularExpressionFile);\n\t\tif (($countCheck) and (!$this->whiteListVisited)) {\n\t\t\tYii::log(Yii::t('yii','Whitelist defined but not used in \"{class}\".', array('{class}'=>__CLASS__)),CLogger::LEVEL_WARNING);\t\t\t\n\t\t}\n\n\t\t$countCheck = \tcount($this->substitutionList) + \n\t\t\t\t\t\t\tcount($this->substitutionListFile) +\n\t\t\t\t\t\t\tcount($this->substitutionListRegularExpression) +\n\t\t\t\t\t\t\tcount($this->substitutionListRegularExpressionFile);\n\t\tif (($countCheck) and (!$this->substitutionListVisited)) {\n\t\t\tYii::log(Yii::t('yii','Substitution List defined but not used in \"{class}\".', array('{class}'=>__CLASS__)),CLogger::LEVEL_WARNING);\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "33e2421270c86d2b55305f73fd3fb12b", "score": "0.48924187", "text": "function main()\n {\n ;\n }", "title": "" }, { "docid": "79f03ea7947094aff9f8fdc1ab2f1eae", "score": "0.48883826", "text": "function tractament () {\n\t\t\n\t}", "title": "" }, { "docid": "0646066e0b8780824e83325c404ef79b", "score": "0.48826748", "text": "abstract public function usage() : string;", "title": "" }, { "docid": "b77608201b230870738c26d38ba0ff76", "score": "0.48780042", "text": "function resetResult(){\n $this->target = array();\n $this->total_target = array();\n $this->target_defined = array();\n $this->target_defined_by_col = array();\n\n $this->dataChange = array();\n $this->actual_change = array();\n $this->actual = array();//Actual GA + actual change\n $this->total_actual = array();\n\n //Acutal prev\n $this->actual_prev = array();\n $this->total_actual_prev = array();\n\n //Actual prev\n $this->actual_prevY = array();\n $this->total_actual_prevY = array();\n\n //Prospective\n $this->prospective = array();\n $this->total_prospective = array();\n\n //Prospective Prev\n $this->prospective_prev = array();\n $this->total_prospective_prev = array();\n\n //Prospective prevY\n $this->prospective_prevY = array();\n $this->total_prospective_prevY = array();\n\n //Phần tram của từng cột riêng lẻ\n $this->ratio_actual_target = array();\n $this->ratio_actual_prev = array();\n $this->ratio_actual_prevY = array();\n $this->ratio_prospective_target = array();\n $this->ratio_prospective_prev = array();\n $this->ratio_prospective_prevY = array();\n\n $this->total_ratio_actual_target = array();\n $this->total_ratio_actual_prev = array();\n $this->total_ratio_actual_prevY = array();\n $this->total_ratio_prospective_target = array();\n $this->total_ratio_prospective_prev = array();\n $this->total_ratio_prospective_prevY = array();\n\n //Column total display\n $this->col_target = array();\n $this->col_actual = array();\n $this->col_prev = array();\n $this->col_prevY = array();\n $this->col_prospective = array();\n\n //Column total display (ratio)\n $this->col_ratio_actual_target = array();\n $this->col_ratio_actual_prev = array();\n $this->col_ratio_actual_prevY = array();\n\n $this->col_ratio_prospective_target = array();\n $this->col_ratio_prospective_prev = array();\n $this->col_ratio_prospective_prevY = array();\n $this->col_icon_status = array();\n }", "title": "" }, { "docid": "d3aaac642a14b6fc83933ae171d3344d", "score": "0.48603022", "text": "abstract protected function doGetStats();", "title": "" }, { "docid": "34b93b9a353dc231366f41f8c0777912", "score": "0.48530933", "text": "public function metrics(): array;", "title": "" }, { "docid": "eac1fdfee6c19e6f2309540d06fbd0e6", "score": "0.48509505", "text": "public function support()\n {\n\n }", "title": "" }, { "docid": "b034cda5d4ffb22c0926916fa474209d", "score": "0.48503768", "text": "public function visits();", "title": "" }, { "docid": "9c9e94efec3041d75ffab2a788bbe485", "score": "0.48466304", "text": "public function totalDescentProvider(): array\n {\n // load data from file\n $fileUtility = new GpxFileUtility();\n $gpx = $fileUtility->loadTrackFromFile(\"C:\\\\Temp\\\\test.gpx\");\n // get track points\n $track = $gpx->listTracks()[0];\n // return test data\n return [\n [$track, 77.2]\n ];\n }", "title": "" }, { "docid": "9b8e050cb4f8f03dcf541d0fec9d593c", "score": "0.4841696", "text": "private function upgrade_153()\n {\n }", "title": "" }, { "docid": "1628eada00d1f462a9ed57810d3126e6", "score": "0.48375103", "text": "public function testStreamSetGetSummariesAdHoc()\r\n {\r\n\r\n }", "title": "" }, { "docid": "d5ac5a8fd57fb4b6fe6302c31e969d6a", "score": "0.4829414", "text": "function doAlgorithm()\n {\n echo 'Display super'.PHP_EOL;\n }", "title": "" }, { "docid": "3038365dbf9e03413159968e109bb513", "score": "0.4828357", "text": "public function getPerifericos()\r\n {\r\n }", "title": "" }, { "docid": "7c8a8cf3f19c0a7f00a29ab1c031f8f5", "score": "0.48282674", "text": "public function result_metadata () {}", "title": "" }, { "docid": "3d1c60caad13e77194edc7cf1d8e479b", "score": "0.48183745", "text": "private function internalMethod() {}", "title": "" }, { "docid": "a75183e9e65c215997e14fe39de484c3", "score": "0.48152927", "text": "public function stats() : object;", "title": "" }, { "docid": "f03cdc696acf84b39a019426130193cf", "score": "0.4813949", "text": "public function testSerieDetails()\n {\n }", "title": "" }, { "docid": "bdc54e9307921f1a338e421ec3ad6891", "score": "0.48118955", "text": "protected function extract_mass() {\n\t\t// each space resource performs this function differently\n\t}", "title": "" }, { "docid": "9b8bb5e1811456785b2936b66bc4cea3", "score": "0.48110956", "text": "public function testStreamSetGetRecordedAdHoc()\r\n {\r\n\r\n }", "title": "" }, { "docid": "3d08b67cf756791e295f02b06559ebb6", "score": "0.48086995", "text": "public function testGetGs1128LabelByFilter()\n {\n }", "title": "" }, { "docid": "58f5a147e5200baaeca6a3780416e0e4", "score": "0.48076788", "text": "function getdescent() {}", "title": "" }, { "docid": "58f5a147e5200baaeca6a3780416e0e4", "score": "0.48076788", "text": "function getdescent() {}", "title": "" } ]
a984d12e5dbe435e51b1211f61288531
Define the destiny airport with the result obtained previously
[ { "docid": "ada947ef51617c99b3572d2b44e2102e", "score": "0.69587076", "text": "private function defineDestinyAirport(): void\n {\n try {\n $parameters = [\n 'javax.faces.partial.ajax' => 'true',\n 'javax.faces.source' => 'form:destinationId',\n 'javax.faces.partial.execute' => 'form:destinationId',\n 'javax.faces.behavior.event' => 'blur',\n 'javax.faces.partial.event' => 'blur',\n 'form' => 'form',\n 'form:originId_input' => $this->originAirport,\n 'form:j_idt30' => $this->collect,\n 'form:collectCepId' => $this->senderZipCode,\n 'form:destinationId_input' => $this->destinyAirport,\n 'form:j_idt84_input' => 'ALL',\n 'form:j_idt98_input' => 'TAM',\n 'form:j_idt110' => 'P',\n 'form:accordionDC_active' => '0',\n 'form:table_dim_scrollState' => '0,0',\n 'javax.faces.ViewState' => $this->viewStateLogin,\n ];\n\n $promise = $this->client->requestAsync('POST',\n 'https://mycargomanager.appslatam.com/eBusiness-web-1.0-view/private/CreateQuotation.jsf',\n [\n 'form_params' => $parameters,\n 'headers' => $this->mainHeader\n ])->then(function() {\n $this->defineDelivery();\n });\n $promise->wait();\n } catch (RequestException $e) {\n $this->result->status = 'ERROR';\n $this->result->errors[] = 'Curl Error: ' . $e->getMessage();\n }\n }", "title": "" } ]
[ { "docid": "0589e3c485625f767185e55437f90364", "score": "0.6323176", "text": "private function defineOriginAirport(): void\n {\n try {\n $parameters = [\n 'javax.faces.partial.ajax' => 'true',\n 'javax.faces.source' => 'form:originId',\n 'javax.faces.partial.execute' => 'form:originId',\n 'javax.faces.behavior.event' => 'blur',\n 'javax.faces.partial.event' => 'blur',\n 'form' => 'form',\n 'form:originId_input' => $this->originAirport,\n 'form:j_idt84_input' => 'ALL',\n 'form:j_idt98_input' => 'TAM',\n 'form:j_idt110' => 'P',\n 'form:accordionDC_active' => '0',\n 'form:table_dim_scrollState' => '0,0',\n 'javax.faces.ViewState' => $this->viewStateLogin,\n ];\n\n $promise = $this->client->requestAsync('POST',\n 'https://mycargomanager.appslatam.com/eBusiness-web-1.0-view/private/CreateQuotation.jsf',\n [\n 'form_params' => $parameters,\n 'headers' => $this->mainHeader\n ])->then(function() {\n $this->defineCollect();\n });\n $promise->wait();\n } catch (RequestException $e) {\n $this->result->status = 'ERROR';\n $this->result->errors[] = 'Curl Error: ' . $e->getMessage();\n }\n\n }", "title": "" }, { "docid": "7187926b187b963d0f5a17f26df9dd72", "score": "0.60982275", "text": "public function populateAirport($airport) {\n\n\t\t// Build $url\n\t\tif(mb_strlen($airport)==3) {\n\t\t\t$url = $this->url.\"?iata=\".$airport;\n\t\t} elseif(mb_strlen($airport)==4) {\n\t\t\t$url = $this->url.\"?icao=\".$airport;\n\t\t} else {\n\t\t\t$this->_logError(__FUNCTION__, \"Invalid airport code: \".$airport);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Run Service\n\t\t$rc = $this->_APICall($url);\n\t\tif($rc==false) {\n\t\t\t$this->_logError(__FUNCTION__, \"API Call Failed\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// $this->fillRecord();\n\t\t$this->response = json_decode($this->response, true);\n\t\t\n\t\t// No airport found\n\t\tif(isset($this->response['error'])) {\n\t\t\tif(isset($this->response['error']['text']))\n\t\t\t\t$desc = $this->response['error']['text'];\n\t\t\telse\n\t\t\t\t$desc = \"airport [\".$airport.\"] not found\";\n\t\t\t$this->_logError(__FUNCTION__, $desc);\n\t\t\treturn false;\n\t\t}\n\t\t$record = array(\n\t\t\t$this->response['id'],\n\t\t\t$this->response['iata'],\n\t\t\t$this->response['icao'],\n\t\t\t$this->response['name'],\n\t\t\t$this->response['location'],\n\t\t\t$this->response['street_number'],\n\t\t\t$this->response['street'],\n\t\t\t$this->response['city'],\n\t\t\t$this->response['country'],\n\t\t\t$this->response['postal_code'],\n\t\t\t$this->response['phone'],\n\t\t\t$this->response['latitude'],\n\t\t\t$this->response['longitude'],\n\t\t\t$this->response['uct'],\n\t\t\t$this->response['website']\n\t\t);\n\t\t$this->fillRecord($record);\n\n\t}", "title": "" }, { "docid": "56905cfa12e32ac141362c8ee8df3dac", "score": "0.5946367", "text": "private function get_airports()\n\t{\n return $this->dataHandler->get_airports();\n\t}", "title": "" }, { "docid": "18ea70fd5b148be6c26e1b3e76b2e5a6", "score": "0.5866303", "text": "public function toAirport()\n {\n return $this->belongsTo(\"App\\Models\\Airport\", \"arrival_airport_id\");\n }", "title": "" }, { "docid": "fa45f60847eaed158d5e66f39a8431ed", "score": "0.56827474", "text": "function b1n_regAddAirport($sql, &$ret_msgs, $reg_data, $reg_config)\n{\n if($reg_data['apt_timezone'] > 0 && !strstr($reg_data['apt_timezone'], '+'))\n {\n $reg_data['apt_timezone'] = '+' . $reg_data['apt_timezone']; \n }\n\n $reg_data['apt_icao'] = strtoupper($reg_data['apt_icao']);\n $reg_data['apt_iata'] = strtoupper($reg_data['apt_iata']);\n\n return b1n_regAdd($sql, $ret_msgs, $reg_data, $reg_config, \"airport\", \"Airport\");\n}", "title": "" }, { "docid": "45b770df3eb309624df1c375edc9532c", "score": "0.55105543", "text": "public function getGeoTargetAirport()\n {\n return $this->geo_target_airport;\n }", "title": "" }, { "docid": "b58b8a32f85a4dfda77cb25a1b823b7d", "score": "0.5490273", "text": "public function fromAirport()\n {\n return $this->belongsTo(\"App\\Models\\Airport\", \"departure_airport_id\");\n }", "title": "" }, { "docid": "b3186f8cb9be4bbc4aabcffd1a187033", "score": "0.5419854", "text": "public function aaiGetAirportsServedList($airport_code, $type = '') {\n $database = DB::dbInstance();\n \n $airport_code = strtoupper($airport_code);\n $flight_to = array();\n\n // get airports list for the airport, choose all airport codes from last 14 days\n // so we get all posible airport codes to which flights are available\n $tbl = variable_get('aai_fids_active_table', 'aai_fids_data_log');\n $condition_flds = array();\n if ($type == 'departure') {\n $condition_flds = array(\n 'LOCAL_AIRPORT' => $airport_code,\n 'SCHED_DATE' => array(\"DATE_SUB(NOW(), INTERVAL 2 WEEK)\", '>=', 'where'),\n 'ARRIVAL_DEPARTURE_FLAG' => 2,\n );\n } else if ($type == 'arrival') {\n $condition_flds = array(\n 'SCHED_DATE' => array(\"DATE_SUB(NOW(), INTERVAL 2 WEEK)\", '>=', 'where'),\n //'LOCAL_AIRPORT' => array(\"$airport_code\", 'LIKE', 'OR'),\n 'LOCAL_AIRPORT' => array(\"$airport_code\", 'LIKE'),\n 'ARRIVAL_DEPARTURE_FLAG' => 1,\n );\n } else {\n $condition_flds = array(\n 'SCHED_DATE' => array(\"DATE_SUB(NOW(), INTERVAL 2 WEEK)\", '>=', 'where'),\n 'LOCAL_AIRPORT' => array(\"$airport_code\", 'LIKE'),\n );\n }\n $flds_to_select = array('SOURCE_DESTINATION');\n $airports_rs = $database->dbConditionalSelect($tbl, $condition_flds, $flds_to_select);\n \n if (is_array($airports_rs)) {\n // get array holding all airport names\n $aai_airport_codes = unserialize(variable_get('airport_codes'));\n foreach ($airports_rs as $value) {\n foreach ($value as $fld => $vv) {\n $codes = $vv;\n if (strpos($codes, ',') != FALSE) {\n $codes = explode(',', $codes);\n foreach ($codes as $cods) {\n if (!array_key_exists($cods, $flight_to)) {\n $cods = strtoupper($cods);\n $airport_name = $this->aaiGetAirportNameFromCode($cods);\n $flight_to[$cods] = $airport_name;\n }\n }\n } else {\n if (!array_key_exists($codes, $flight_to)) {\n $cods = strtoupper($codes);\n $airport_name = $this->aaiGetAirportNameFromCode($cods);\n $flight_to[$cods] = $airport_name;\n }\n }\n }\n }\n }\n $flight_to = array_unique($flight_to);\n\n return $flight_to;\n }", "title": "" }, { "docid": "ff4b6355a19b8018ac9e99c3304868db", "score": "0.5408547", "text": "public function aaiGetAirportWeather($airport_name) {\n $airport_name = ucwords($airport_name);\n $airport_iata = $this->aaiGetAirportTermDetails($airport_name, array('field_airport_code'));\n $airport_iata = 'JAI'; //strtoupper($airport_iata['field_airport_code']);\n\n // check if airport weather detail exists in cache\n $cache_weather_data = cache_get('aaiAirportWeather:'.$airport_iata);\n\n // if data is not cached or expires\n if (!$cache_weather_data || (time() > $cache_weather_data->expire)) {\n // get airport LAT LONG\n $aai_airports = unserialize(variable_get('airport_codes'));\n $current_airport_data = $aai_airports[$airport_iata];\n $airport_lat = $current_airport_data['lat'];\n $airport_lng = $current_airport_data['lng'];\n\n $weather_api_key = variable_get('weather_api_key');\n $weather_url = variable_get('weather_api_url');\n\n $url = $weather_url . \"/lat=$airport_lat&lon=$airport_lng&APPID=$weather_api_key&units=metric\";\n $connect = curl_init();\n // Set URL and other appropriate options.\n curl_setopt($connect, CURLOPT_URL, $url);\n curl_setopt($connect, CURLOPT_RETURNTRANSFER, TRUE);\n // Grab URL and pass it to the browser.\n $result_json = curl_exec($connect);\n $weather_data = json_decode($result_json);\n \n // temporary weather data\n $weather_data = json_decode('{\"coord\":{\"lon\":77.22,\"lat\":28.63},\"weather\":[{\"id\":741,\"main\":\"Fog\",\"description\":\"fog\",\"icon\":\"50d\"}],\"base\":\"stations\",\"main\":{\"temp\":17.62,\"pressure\":1020,\"humidity\":93,\"temp_min\":15,\"temp_max\":20},\"visibility\":350,\"wind\":{\"speed\":1.5,\"deg\":270},\"clouds\":{\"all\":0},\"dt\":1480656600,\"sys\":{\"type\":1,\"id\":7809,\"message\":0.0062,\"country\":\"IN\",\"sunrise\":1480642048,\"sunset\":1480679628},\"id\":1273840,\"name\":\"Connaught Place\",\"cod\":200}');\n\n // set expiry time for cache\n $expire = time() + (60*60*2);\n\n // cache airport weather data\n cache_set('aaiAirportWeather:'.$airport_iata, $weather_data, 'cache', $expire);\n\n // watchdog entry\n $this->aaiWatchdog(\"New weather data cache set for $airport_name | $airport_iata\", WATCHDOG_INFO);\n return $weather_data;\n }\n\n return $cache_weather_data;\n }", "title": "" }, { "docid": "43f7abc6ef76fd6f431df8612c018d15", "score": "0.531665", "text": "public function aaiGetAirportsScheduleList($airport_code, $type = '') {\n $database = DB::dbInstance();\n $airport_code = strtoupper($airport_code);\n $flight_to = array();\n $tbl = 'aai_fids_schedule';\n $condition_flds = array();\n if ($type == 'departure') {\n $condition_flds = array(\n 'local_airport' => $airport_code,\n );\n } \n if ($type == 'arrival') {\n $condition_flds = array(\n 'local_airport' => $airport_code,\n );\n } \n $flds_to_select = array('SOURCE_DESTINATION', 'local_airport');\n $airports_rs = $database->dbConditionalSelect($tbl, $condition_flds, $flds_to_select);\n if (is_array($airports_rs)) {\n // get array holding all airport names\n $aai_airport_codes = unserialize(variable_get('airport_codes'));\n foreach ($airports_rs as $value) {\n foreach ($value as $fld => $vv) {\n $codes = $vv;\n if (strpos($codes, ',') != FALSE) {\n $codes = explode(',', $codes);\n foreach ($codes as $cods) {\n if (!array_key_exists($cods, $flight_to)) {\n $cods = strtoupper($cods);\n $airport_name = $this->aaiGetAirportNameFromCode($cods);\n $flight_to[$cods] = $airport_name;\n }\n }\n } else {\n if (!array_key_exists($codes, $flight_to)) {\n $cods = strtoupper($codes);\n $airport_name = $this->aaiGetAirportNameFromCode($cods);\n $flight_to[$cods] = $airport_name;\n } \n }\n }\n }\n }\n return $flight_to;\n }", "title": "" }, { "docid": "f889a30b717c1e7439a2534024e0ab9a", "score": "0.53027475", "text": "function get_airport_code_list() {\r\n\r\n $term = $this->input->get('term'); //retrieve the search term that autocomplete sends\r\n $term = trim(strip_tags($term));\r\n $result = array();\r\n $flagpath = base_url().'extras/custom/'.CURRENT_DOMAIN_KEY.'/images/flags/'; \r\n $__airports = $this->flight_model->get_airport_list($term)->result();\r\n if (valid_array($__airports) == false) {\r\n $__airports = $this->flight_model->get_airport_list('')->result();\r\n }\r\n // debug($__airports);exit;\r\n $airports = array();\r\n foreach ($__airports as $airport) {\r\n // debug($airport);exit;\r\n // $county_code = $this->flight_model->get_county_code($airport->country);\r\n $airports['label'] = $airport->airport_city . ', ' . $airport->country . ' (' . $airport->airport_code . ')';\r\n $airports['value'] = $airport->airport_city . ' (' . $airport->airport_code . ')';\r\n $airports['id'] = $airport->origin;\r\n $airports['country_code'] = $flagpath.strtolower($airport->CountryCode).'.png'; \r\n if (empty($airport->top_destination) == false) {\r\n $airports['category'] = 'Top cities';\r\n $airports['type'] = 'Top cities';\r\n } else {\r\n $airports['category'] = 'Search Results';\r\n $airports['type'] = 'Search Results';\r\n }\r\n\r\n array_push($result, $airports);\r\n }\r\n $this->output_compressed_data($result);\r\n }", "title": "" }, { "docid": "cf5bab38b386e6b9c1e817c22a0e26fb", "score": "0.52968305", "text": "public function airports($airport=''){\n\t\t$response = file_get_contents('https://wacky.jlparry.com/info/airports/'.$airport);\n $data = [];\n\t\t$data = json_decode($response, true);\n\n return $data;\n }", "title": "" }, { "docid": "be5638aecfead997b4ee31e8a32fc045", "score": "0.5256263", "text": "public function planificationAction(){\n\t\t$tableDestination = new TDestination;\n\t\t$destinationRequest = $tableDestination\t->select()\n\t\t\t\t\t\t\t\t\t\t\t\t->where('plannification = 0')\n\t\t\t\t\t\t\t\t\t\t\t\t->orwhere('periodicite != \"Vol unique\"');\n\t\t$destinations = $tableDestination->fetchAll($destinationRequest);\n\n\t\t$tabDestination = array();\n\n\t\t$mois = date(\"m\", time());\n $jour = date(\"d\", time());\n $an = date(\"Y\", time());\n\n //on cree un timestamp de la date d'aujourd'hui\n\t\t$date = mktime(0,0,0, $mois, $jour, $an);\n\n\t\t//nous sert à indexer le tableau\n\t\t$i=0;\n\n\t\tforeach ($destinations as $destination) {\n\n\t\t\tif($destination->periodicite != \"Vol unique\"){\n\n\t\t\t\t//appel à la fonction pour trouver le nombre de jour d'ecart\n\t\t\t\t$date_vol = $this->find_date_vol($date, $destination->periodicite);\n\n\t\t\t\t$minuteD = date(\"i\", $destination->heure_dep);\n\t\t\t\t$heureD = date(\"H\", $destination->heure_dep);\n\t\t\t\t$mois = date(\"m\", $date_vol);\n\t\t $jour = date(\"d\", $date_vol);\n\t\t $an = date(\"Y\", $date_vol);\n\n\t\t //on cree un timestamp pour la date de depart du vol\n\t\t\t\t$date_vol_dep = mktime($heureD,$minuteD,0, $mois, $jour, $an);\n\n\t\t\t\t$minuteA = date(\"i\", $destination->heure_arr);\n\t\t\t\t$heureA = date(\"H\", $destination->heure_arr);\n\n\t\t\t\t$heure = $heureA - $heureD;\n\t\t\t\tif($heure < 0)\n\t\t\t\t\t$heure += 24;\n\t\t\t\t$minute = $minuteA - $minuteD;\n\t\t\t\tif($heure < 0)\n\t\t\t\t\t$heure += 60;\n\n\t\t\t\t//on cree le timestamp de la date d'arrivee du vol\n\t\t\t\t$date_vol_arr = $date_vol_dep + $heure*60*60 + $minute*60;\n\n\t\t\t\t//pour afficher sur 4 semaines le vol periodique\n\t\t\t\tfor ($j=0; $j < 4; $j++) {\n\n\t\t\t\t\t$test = 0;\n\t\t\t\t\t//nous permet de verifier que le vol n'est pas deja planifier\n\t\t\t\t\t$tableVol = new TVols;\n\t\t\t\t\t$volRequest = $tableVol\t->select()\n\t\t\t\t\t\t\t\t\t\t\t->where('id_destination = ?',$destination->id_destination);\n\t\t\t\t\t$vols = $tableVol->fetchAll($volRequest);\n\n\t\t\t\t\tforeach ($vols as $vol) {\n\t\t\t\t\t\tif($vol->heure_dep == $date_vol_dep)\n\t\t\t\t\t\t\t$test += 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tif($test == 0){\n\t\t\t\t\t\t$tabDestination[$i]['id_destination'] = $destination->id_destination;\n\t\t\t\t\t\t$tabDestination[$i]['numero_vol'] = $destination->numero_vol;\n\t\t\t\t\t\t$tabDestination[$i]['tri_aero_dep'] = $destination->tri_aero_dep;\n\t\t\t\t\t\t$tabDestination[$i]['tri_aero_arr'] = $destination->tri_aero_arr;\n\t\t\t\t\t\t$tabDestination[$i]['heure_dep'] = $date_vol_dep;\n\t\t\t\t\t\t$tabDestination[$i]['heure_arr'] = $date_vol_arr;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t\t//on incremente d'une semaine pour pouvoir avoir les dates sur 4 semaines\n\t\t\t\t\t$date_vol_dep += 7*24*60*60;\n\t\t\t\t\t$date_vol_arr += 7*24*60*60;\n\t\t\t\t}\n\t\t\t//si le vol n'est pas periodique\n\t\t\t}else{\n\t\t\t\t$tabDestination[$i]['id_destination'] = $destination->id_destination;\n\t\t\t\t$tabDestination[$i]['numero_vol'] = $destination->numero_vol;\n\t\t\t\t$tabDestination[$i]['tri_aero_dep'] = $destination->tri_aero_dep;\n\t\t\t\t$tabDestination[$i]['tri_aero_arr'] = $destination->tri_aero_arr;\n\t\t\t\t$tabDestination[$i]['heure_dep'] = $destination->heure_dep;\n\t\t\t\t$tabDestination[$i]['heure_arr'] = $destination->heure_arr;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\n\t\t$this->view->destination = $tabDestination;\n\t}", "title": "" }, { "docid": "fe7851bd4d689b8b44169ac159cafb3e", "score": "0.52169156", "text": "public function addAirport($code, $stop)\n \t{\n \t$exist_airport = $this->getDoctrine()->getRepository('FlyingMainBundle:AirportsAdded')->findBy(array(/*'stop' => $stop, */'code' => $code)); // ATENCAO: se certo aeroporto e' uma escala, ja nao pode ser origem, e vice-versa\n\n \tif (count($exist_airport)==0) {\n \t\t$one_airport = new AirportsAdded();\n\t\t\t$one_airport->setCode($code);\n\t\t\t$one_airport->setStop($stop);\n\t\t $em = $this->getDoctrine()->getManager();\n\t\t\t$em->persist($one_airport);\n\n\t\t\t// verifica se ha voos inactivos com esse aeroporto (na origem ou no destino)\n \t\t\n \t\t$flights_to_recover = $this->getDoctrine()->getRepository('FlyingMainBundle:Flights')->findBy(array('origin' => $code, 'active' => false));\n \t\tforeach ($flights_to_recover as $flight_to_recover) {\n \t\t\t$flight_to_recover->setActive(true);\n \t\t}\n\n \t\t$flights_to_recover = $this->getDoctrine()->getRepository('FlyingMainBundle:Flights')->findBy(array('destination' => $code, 'active' => false));\n \t\tforeach ($flights_to_recover as $flight_to_recover) {\n \t\t\t$flight_to_recover->setActive(true);\n \t\t}\n \t}\n\n \treturn;\n }", "title": "" }, { "docid": "0b2e429b565ac7fc0ad80785b7675035", "score": "0.52083", "text": "public function destination_reached()\n\t{\n\t\tglobal $Mysql, $User;\n\t\t\n\t\t// Is this fleet reaching its target or its home?\n\t\tif ( $this->home_x_coord == $this->to_x_coord &&\n\t\t\t\t $this->home_y_coord == $this->to_y_coord )\n\t\t{\n\t\t\t// This fleet just arrived back home.\n\t\t\t\n\t\t\t// If this fleet is carrying any resources, add them to the colony.\n\t\t\tload_class('Colony');\n\t\t\t$home_colony = Colony::get_colony_at($this->home_x_coord, $this->home_y_coord);\n\t\t\t$this->get_cargo();\n\t\t\t$home_colony->add_resources($this->cargo);\n\t\t\t$home_colony->save_data();\n\t\t\t$this->cargo = new Resource_Bundle(0,0,0,0);\n\t\t\t\n\t\t\t// Merge its ships into the home fleet if one exists.\n\t\t\t$fleets_here = Fleet::fleets_at($this->home_x_coord, $this->home_y_coord, $this->owner);\n\t\t\tif ( !empty($fleets_here) )\n\t\t\t{\n\t\t\t\t$home_fleet = $fleets_here[0];\n\t\t\t\t$home_fleet->get_ships();\n\t\t\t\t$this->get_ships();\n\t\t\t\tforeach ( $this->ships as $type => $fship )\n\t\t\t\t{\n\t\t\t\t\tif ( isset($home_fleet->ships[$type]) )\n\t\t\t\t\t\t$home_fleet->ships[$type]->count += $fship->count;\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$home_fleet->ships[$type] = new Fleet_Ship([\n\t\t\t\t\t\t\t'type' => $fship->type,\n\t\t\t\t\t\t\t'count' => $fship->count]);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$home_fleet->save_ships();\n\t\t\t\t$this->delete();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// No fleet at home. Make this the home fleet.\n\t\t\t\t$this->current_x_coord = $this->home_x_coord;\n\t\t\t\t$this->current_y_coord = $this->home_y_coord;\n\t\t\t\t$this->traveling = 0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Perform the action for this fleet's mission(s).\n\t\t\t$mission = Fleet::$objectives1[$this->primary_objective];\n\t\t\t\n\t\t\t// TODO: more missions to add:\n\t\t\t//\t\t mine asteroid, collect energy from star\n\t\t\t\n\t\t\tif ( $mission == 'hold_position' )\n\t\t\t{\n\t\t\t\t$this->current_x_coord = $this->to_x_coord;\n\t\t\t\t$this->current_y_coord = $this->to_y_coord;\n\t\t\t\t$this->traveling = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( $mission == 'attack' )\n\t\t\t\t{\n\t\t\t\t\t$mf1 = new Mega_Fleet([$this]);\n\t\t\t\t\t// Retrieve the fleets that are already in the destination sector.\n\t\t\t\t\t$away_fleets = Fleet::fleets_at($this->to_x_coord, $this->to_y_coord);\n\t\t\t\t\t// See which away_fleets will be participating in the fight.\n\t\t\t\t\t$participating_away_fleets = array();\n\t\t\t\t\tforeach ( $away_fleets as $away_fleet )\n\t\t\t\t\t{\n\t\t\t\t\t\t$mission = Fleet::$objectives2[$away_fleet->primary_objective];\n\t\t\t\t\t\tif ( $mission == 'defend_object' || $mission == 'attack_visitors'\n\t\t\t\t\t\t\t\t|| $mission == 'attack_if_attacked' )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$participating_away_fleets[] = $away_fleet;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$mf2 = new Mega_Fleet($participating_away_fleets);\n\t\t\t\t\t\n\t\t\t\t\t// FIGHT!\n\t\t\t\t\tMega_Fleet::fleet_battle($mf1, $mf2);\n\t\t\t\t\t$battle_report_qry = \"INSERT INTO `alerts` (`id`, `player_id`, `timestamp`, `alert_type`, `alert_contents`) VALUES (NULL, '\".$User->id.\"', '\".time().\"', '0', 'Battle completed. No stats available at this time. (unlockable feature)')\";\n\t\t\t\t\t$Mysql->query($battle_report_qry);\n\t\t\t\t}\n\t\t\t\telse if ( $mission == 'scout' )\n\t\t\t\t{\n\t\t\t\t\t// Retrieve world objects, colonies in this sector.\n\t\t\t\t\t$objects_to_cache = [];\n\t\t\t\t\t$a_colony = Colony::get_colony_at($this->to_x_coord, $this->to_y_coord);\n\t\t\t\t\tif ( $a_colony )\n\t\t\t\t\t{\n\t\t\t\t\t\t$objects_to_cache[] = $a_colony;\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\t\t\t\t\t// Retrieve world objects for this sector, and \n\t\t\t\t\t// generate a new object(s) if the region has not been explored.\n\t\t\t\t\tload_class('World_Object');\n\t\t\t\t\t$objects_here = World_Object::scout($this->to_x_coord, $this->to_y_coord);\n\t\t\t\t\t\n\t\t\t\t\t// Add objects to the array of objects to cache.\n\t\t\t\t\tforeach ($objects_here as $world_object) {\n\t\t\t\t\t\t// Only save certain data about this object to the cache.\n\t\t\t\t\t\t$objects_to_cache[] = array(\n\t\t\t\t\t\t\t\"type\" => $world_object->type, \n\t\t\t\t\t\t\t\"x_coord\" => $world_object->x_coord,\n\t\t\t\t\t\t\t\"y_coord\" => $world_object->y_coord, \n\t\t\t\t\t\t\t\"owner\" => $world_object->owner,\n\t\t\t\t\t\t\t\"building_type\" => $world_object->building_type\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Serialize the array for caching.\n\t\t\t\t\t$new_cache_str = serialize($objects_to_cache);\n\t\t\t\t\t\n\t\t\t\t\t// Cache what this scout found.\n\t\t\t\t\t$Mysql->query(\"INSERT INTO `player_tiles_cache`\n\t\t\t\t\t\tSET `player_id` = '\". $User->id .\"', \n\t\t\t\t\t\t\t`x_coord` = '\". $this->to_x_coord .\"',\n\t\t\t\t\t\t\t`y_coord` = '\". $this->to_y_coord .\"',\n\t\t\t\t\t\t\t`player_has_vision` = 0,\n\t\t\t\t\t\t\t`cache` = '\". $new_cache_str .\"',\n\t\t\t\t\t\t\t`cache_time` = '\". time() .\"'\n\t\t\t\t\t\tON DUPLICATE KEY UPDATE\n\t\t\t\t\t\t\t`cache` = '\". $new_cache_str .\"',\n\t\t\t\t\t\t\t`cache_time` = '\". time() .\"'\");\n\t\t\t\t}\n\t\t\t\telse if ( $mission == 'collect_resources' )\n\t\t\t\t{\n\t\t\t\t\tload_class('World_Object');\n\t\t\t\t\t\n\t\t\t\t\t// Make sure there is an object here to collect resources from.\n\t\t\t\t\t$wobs = World_Object::scout($this->to_x_coord, $this->to_y_coord);\n\t\t\t\t\t\n\t\t\t\t\tif ( !empty($wobs) )\n\t\t\t\t\t{\n\t\t\t\t\t\t// Grab the world-object at this location.\n\t\t\t\t\t\t$wob = $wobs[0];\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Calculate this fleet's aggregate stats.\n\t\t\t\t\t\t$this->battle_prep();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Ask the wob for a resource bundle.\n\t\t\t\t\t\t$yield = $wob->yield_resources($this->stats['capacity']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Save this cargo to the DB so that it can be\n\t\t\t\t\t\t// added to the colony's resources when the fleet arrives home.\n\t\t\t\t\t\t$Mysql->query(\"INSERT INTO `fleet_cargo`\n\t\t\t\t\t\tSET `fleet_id` = '\". $this->id .\"',\n\t\t\t\t\t\t\t`food` = '\". $yield->food .\"',\n\t\t\t\t\t\t\t`water` = '\". $yield->water .\"',\n\t\t\t\t\t\t\t`metal` = '\". $yield->metal .\"',\n\t\t\t\t\t\t\t`energy` = '\". $yield->energy .\"'\n\t\t\t\t\t\tON DUPLICATE KEY UPDATE\n\t\t\t\t\t\t\t`food` = `food` + '\". $yield->food .\"',\n\t\t\t\t\t\t\t`water` = `water` + '\". $yield->water .\"',\n\t\t\t\t\t\t\t`metal` = `metal` + '\". $yield->metal .\"',\n\t\t\t\t\t\t\t`energy` = `energy` + '\". $yield->energy .\"'\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Reverse this fleet's direction.\n\t\t\t\t\n\t\t\t\t// Calculate travel distance.\n\t\t\t\t$travel_distance = hex_distance(\n\t\t\t\t\t\t$this->from_x_coord, \n\t\t\t\t\t\t$this->from_y_coord,\n\t\t\t\t\t\t$this->to_x_coord, $this->to_y_coord);\n\t\t\t\t// Calculate fleet speed.\n\t\t\t\t$this->calculate_speed();\n\t\t\t\t// Calculate travel duration.\n\t\t\t\t$travel_duration = $this->travel_time($travel_distance);\n\t\t\t\t\n\t\t\t\t// Send the fleet back home.\n\t\t\t\t$this->from_x_coord = $this->to_x_coord;\n\t\t\t\t$this->from_y_coord = $this->to_y_coord;\n\t\t\t\t$this->to_x_coord = $this->home_x_coord;\n\t\t\t\t$this->to_y_coord = $this->home_y_coord;\n\t\t\t\t$this->departure_time = $this->arrival_time;\n\t\t\t\t$this->arrival_time = $this->departure_time + $travel_duration;\n\t\t\t\t$this->primary_objective = 1;\n\t\t\t\t\n\t\t\t\t// Create a new job for the return trip.\n\t\t\t\t// See which colony's job queue to put this in.\n\t\t\t\tload_class('Colony');\n\t\t\t\t$colony = Colony::get_colony_at($this->home_x_coord, $this->home_y_coord);\n\t\t\t\t$Mysql->query(\"INSERT INTO `job_queue` SET\n\t\t\t\t\t`colony_id` = '\". $colony->id .\"',\n\t\t\t\t\t`type` = 3,\n\t\t\t\t\t`product_id` = '\". $this->id .\"',\n\t\t\t\t\t`product_type` = 1,\n\t\t\t\t\t`start_time` = \". $this->departure_time .\",\n\t\t\t\t\t`duration` = '\". $travel_duration .\"',\n\t\t\t\t\t`completion_time` = '\". $this->arrival_time .\"'\");\n\t\t\t\t\n\t\t\t\t// TODO: possible complication: a fleet is out attacking but is scheduled to return\n\t\t\t\t// before an attack hits that fleet's home but the job queue doesn't contain the\n\t\t\t\t// fleet's return job until after its attack job is processed.\n\t\t\t\t// Cron?\n\t\t\t\t// alternative: enter both the going and returning jobs at the same time.\n\t\t\t\t// Alternative: complete each job in order and as it gets completed, \n\t\t\t\t//\t\t\tre-query the job table to find the next job to execute.\n\t\t\t}\n\t\t}\n\t\t$this->save_data();\n\t}", "title": "" }, { "docid": "21f41b863f0b2c4e37736417b1d99b92", "score": "0.5119755", "text": "abstract protected function giveCity();", "title": "" }, { "docid": "bdc8f09a4bdebb374d980158bd0a71da", "score": "0.51036465", "text": "public function run()\n {\n DB::table('runways')->insert([ 'airport_id' => 1, 'designator' => '16', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 159, 'length' => 7310, 'elevation' => 11, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.759063888889, 'arrival_lon' => 20.881227777778, 'departure_lat' => 37.74323888888889, 'departure_lon' => 20.887141944444444 ]);\n DB::table('runways')->insert([ 'airport_id' => 1, 'designator' => '34', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 339, 'length' => 7310, 'elevation' => 12, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.74323888888889, 'arrival_lon' => 20.887141944444444, 'departure_lat' => 37.75906388888889, 'departure_lon' => 20.881227777777777 ]);\n DB::table('runways')->insert([ 'airport_id' => 2, 'designator' => '03', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 30, 'length' => 5791, 'elevation' => 785, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 38.103271944444444, 'arrival_lon' => 23.779496944444446, 'departure_lat' => 38.11401388888889, 'departure_lon' => 23.787735833333333 ]);\n DB::table('runways')->insert([ 'airport_id' => 2, 'designator' => '21', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 210, 'length' => 5791, 'elevation' => 785, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 38.11401388888889, 'arrival_lon' => 23.787735833333333, 'departure_lat' => 38.103271944444444, 'departure_lon' => 23.779496944444446 ]);\n DB::table('runways')->insert([ 'airport_id' => 3, 'designator' => '10', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 101, 'length' => 8005, 'elevation' => 9, 'ils' => 1, 'ils_frequency' => 109.5, 'glidepath' => '3.0', 'arrival_lat' => 40.521971944444445, 'arrival_lon' => 22.959055833333334, 'departure_lat' => 40.51669388888889, 'departure_lon' => 22.986971944444445 ]);\n DB::table('runways')->insert([ 'airport_id' => 3, 'designator' => '16', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 163, 'length' => 7907, 'elevation' => 14, 'ils' => 1, 'ils_frequency' => 110.3, 'glidepath' => '3.0', 'arrival_lat' => 40.530277777777776, 'arrival_lon' => 22.96758277777778, 'departure_lat' => 40.509166944444445, 'departure_lon' => 22.974305833333332 ]);\n DB::table('runways')->insert([ 'airport_id' => 3, 'designator' => '28', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 281, 'length' => 8005, 'elevation' => 19, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 40.51669388888889, 'arrival_lon' => 22.986971944444445, 'departure_lat' => 40.521971944444445, 'departure_lon' => 22.959055833333334 ]);\n DB::table('runways')->insert([ 'airport_id' => 3, 'designator' => '34', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 343, 'length' => 7907, 'elevation' => 22, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 40.509166944444445, 'arrival_lon' => 22.974305833333332, 'departure_lat' => 40.530277777777776, 'departure_lon' => 22.96758277777778 ]);\n DB::table('runways')->insert([ 'airport_id' => 4, 'designator' => '02', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 17, 'length' => 8038, 'elevation' => 1151, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 35.18184388888889, 'arrival_lon' => 25.322552777777776, 'departure_lat' => 35.202238888888886, 'departure_lon' => 25.331466944444443 ]);\n DB::table('runways')->insert([ 'airport_id' => 4, 'designator' => '20', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 197, 'length' => 8038, 'elevation' => 1089, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 35.202238888888886, 'arrival_lon' => 25.331466944444443, 'departure_lat' => 35.18184388888889, 'departure_lon' => 25.322552777777776 ]);\n DB::table('runways')->insert([ 'airport_id' => 5, 'designator' => '10C', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 99, 'length' => 9810, 'elevation' => 483, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 38.342421944444446, 'arrival_lon' => 23.549930833333335, 'departure_lat' => 38.33674194444445, 'departure_lon' => 23.581552777777777 ]);\n DB::table('runways')->insert([ 'airport_id' => 5, 'designator' => '28C', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 279, 'length' => 9810, 'elevation' => 453, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 38.33674194444445, 'arrival_lon' => 23.581552777777777, 'departure_lat' => 38.342421944444446, 'departure_lon' => 23.549930833333335 ]);\n DB::table('runways')->insert([ 'airport_id' => 6, 'designator' => '17', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 173, 'length' => 9849, 'elevation' => 13, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 38.97956388888889, 'arrival_lon' => 24.486499722222224, 'departure_lat' => 38.96126388888889, 'departure_lon' => 24.48805777777778 ]);\n DB::table('runways')->insert([ 'airport_id' => 6, 'designator' => '35', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 353, 'length' => 9849, 'elevation' => 39, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 38.96126388888889, 'arrival_lon' => 24.48805777777778, 'departure_lat' => 38.97956388888889, 'departure_lon' => 24.486499722222224 ]);\n DB::table('runways')->insert([ 'airport_id' => 7, 'designator' => '05', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 46, 'length' => 6804, 'elevation' => 376, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 35.210191944444446, 'arrival_lon' => 26.092452777777776, 'departure_lat' => 35.22208888888889, 'departure_lon' => 26.110021944444444 ]);\n DB::table('runways')->insert([ 'airport_id' => 7, 'designator' => '23', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 226, 'length' => 6804, 'elevation' => 316, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 35.22208888888889, 'arrival_lon' => 26.110021944444444, 'departure_lat' => 35.210191944444446, 'departure_lon' => 26.092452777777776 ]);\n DB::table('runways')->insert([ 'airport_id' => 8, 'designator' => '16L', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 156, 'length' => 6972, 'elevation' => 123, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.408163888888886, 'arrival_lon' => 25.474924722222223, 'departure_lat' => 36.390260833333336, 'departure_lon' => 25.483341944444444 ]);\n DB::table('runways')->insert([ 'airport_id' => 8, 'designator' => '16R', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 156, 'length' => 6962, 'elevation' => 126, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.407713888888885, 'arrival_lon' => 25.47346888888889, 'departure_lat' => 36.389835833333336, 'departure_lon' => 25.481871944444446 ]);\n DB::table('runways')->insert([ 'airport_id' => 8, 'designator' => '34L', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 336, 'length' => 6962, 'elevation' => 57, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.389835833333336, 'arrival_lon' => 25.481871944444446, 'departure_lat' => 36.407713888888885, 'departure_lon' => 25.47346888888889 ]);\n DB::table('runways')->insert([ 'airport_id' => 8, 'designator' => '34R', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 336, 'length' => 6972, 'elevation' => 53, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.390260833333336, 'arrival_lon' => 25.483341944444444, 'departure_lat' => 36.408163888888886, 'departure_lon' => 25.474924722222223 ]);\n DB::table('runways')->insert([ 'airport_id' => 9, 'designator' => '18', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 178, 'length' => 3543, 'elevation' => 225, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.427910833333335, 'arrival_lon' => 24.950085833333333, 'departure_lat' => 37.41818583333333, 'departure_lon' => 24.949785833333333 ]);\n DB::table('runways')->insert([ 'airport_id' => 9, 'designator' => '36', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 358, 'length' => 3543, 'elevation' => 236, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.41818583333333, 'arrival_lon' => 24.949785833333333, 'departure_lat' => 37.427910833333335, 'departure_lon' => 24.950085833333333 ]);\n DB::table('runways')->insert([ 'airport_id' => 10, 'designator' => '09', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 91, 'length' => 6706, 'elevation' => 19, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.68978888888889, 'arrival_lon' => 26.901355833333334, 'departure_lat' => 37.688455833333336, 'departure_lon' => 26.923666944444445 ]);\n DB::table('runways')->insert([ 'airport_id' => 10, 'designator' => '27', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 271, 'length' => 6706, 'elevation' => 11, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.688455833333336, 'arrival_lon' => 26.923666944444445, 'departure_lat' => 37.68978888888889, 'departure_lon' => 26.901355833333334 ]);\n DB::table('runways')->insert([ 'airport_id' => 11, 'designator' => '02', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 17, 'length' => 5341, 'elevation' => 9, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 39.17095583333333, 'arrival_lon' => 23.500885833333335, 'departure_lat' => 39.184325, 'departure_lon' => 23.506824722222223 ]);\n DB::table('runways')->insert([ 'airport_id' => 11, 'designator' => '20', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 197, 'length' => 5341, 'elevation' => 54, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 39.184325, 'arrival_lon' => 23.506824722222223, 'departure_lat' => 39.17095583333333, 'departure_lon' => 23.500885833333335 ]);\n DB::table('runways')->insert([ 'airport_id' => 12, 'designator' => '13', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 130, 'length' => 4200, 'elevation' => 110, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 40.536430833333334, 'arrival_lon' => 23.019878333333335, 'departure_lat' => 40.529540555555556, 'departure_lon' => 23.030864444444443 ]);\n DB::table('runways')->insert([ 'airport_id' => 12, 'designator' => '31', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 310, 'length' => 4200, 'elevation' => 110, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 40.529540555555556, 'arrival_lon' => 23.030864444444443, 'departure_lat' => 40.536430833333334, 'departure_lon' => 23.019878333333335 ]);\n DB::table('runways')->insert([ 'airport_id' => 13, 'designator' => '11', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 109, 'length' => 10984, 'elevation' => 429, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 35.536875, 'arrival_lon' => 24.133977777777776, 'departure_lat' => 35.525725, 'departure_lon' => 24.168280833333334 ]);\n DB::table('runways')->insert([ 'airport_id' => 13, 'designator' => '29', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 289, 'length' => 10984, 'elevation' => 490, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 35.525725, 'arrival_lon' => 24.168280833333334, 'departure_lat' => 35.536875, 'departure_lon' => 24.133977777777776 ]);\n DB::table('runways')->insert([ 'airport_id' => 14, 'designator' => '18R', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 180, 'length' => 10997, 'elevation' => 37, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 38.16450777777778, 'arrival_lon' => 21.426613888888888, 'departure_lat' => 38.13798888888889, 'departure_lon' => 21.424746944444443 ]);\n DB::table('runways')->insert([ 'airport_id' => 14, 'designator' => '36L', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 360, 'length' => 10997, 'elevation' => 46, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 38.13798888888889, 'arrival_lon' => 21.424746944444443, 'departure_lat' => 38.16450777777778, 'departure_lon' => 21.426613888888888 ]);\n DB::table('runways')->insert([ 'airport_id' => 15, 'designator' => '07', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 67, 'length' => 10844, 'elevation' => 18, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.400285833333335, 'arrival_lon' => 28.068874722222223, 'departure_lat' => 36.41043277777778, 'departure_lon' => 28.103510833333335 ]);\n DB::table('runways')->insert([ 'airport_id' => 15, 'designator' => '25', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 247, 'length' => 10844, 'elevation' => 18, 'ils' => 1, 'ils_frequency' => 110.3, 'glidepath' => '3.0', 'arrival_lat' => 36.41043277777778, 'arrival_lon' => 28.103510833333335, 'departure_lat' => 36.400285833333335, 'departure_lon' => 28.068874722222223 ]);\n DB::table('runways')->insert([ 'airport_id' => 16, 'designator' => '08', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 76, 'length' => 7874, 'elevation' => 203, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.38111083333333, 'arrival_lon' => 28.095555833333332, 'departure_lat' => 36.384996944444445, 'departure_lon' => 28.122221944444444 ]);\n DB::table('runways')->insert([ 'airport_id' => 16, 'designator' => '26', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 256, 'length' => 7874, 'elevation' => 139, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.384996944444445, 'arrival_lon' => 28.122221944444444, 'departure_lat' => 36.38111083333333, 'departure_lon' => 28.095555833333332 ]);\n DB::table('runways')->insert([ 'airport_id' => 17, 'designator' => '07L', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 65, 'length' => 9419, 'elevation' => 9, 'ils' => 1, 'ils_frequency' => 110.9, 'glidepath' => '2.75', 'arrival_lat' => 38.92071388888889, 'arrival_lon' => 20.7495, 'departure_lat' => 38.929860833333336, 'departure_lon' => 20.77861083333333 ]);\n DB::table('runways')->insert([ 'airport_id' => 17, 'designator' => '25R', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 245, 'length' => 9419, 'elevation' => 11, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 38.929860833333336, 'arrival_lon' => 20.77861083333333, 'departure_lat' => 38.92071388888889, 'departure_lon' => 20.7495 ]);\n DB::table('runways')->insert([ 'airport_id' => 18, 'designator' => '15', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 146, 'length' => 3245, 'elevation' => 143, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.58379194444444, 'arrival_lon' => 26.372610833333333, 'departure_lat' => 36.57606388888889, 'departure_lon' => 26.37811888888889 ]);\n DB::table('runways')->insert([ 'airport_id' => 18, 'designator' => '33', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 326, 'length' => 3245, 'elevation' => 165, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.57606388888889, 'arrival_lon' => 26.37811888888889, 'departure_lat' => 36.58379194444444, 'departure_lon' => 26.372610833333333 ]);\n DB::table('runways')->insert([ 'airport_id' => 19, 'designator' => '17', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 170, 'length' => 2625, 'elevation' => 127, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.01355777777778, 'arrival_lon' => 25.127566944444446, 'departure_lat' => 37.007218888888886, 'departure_lon' => 25.12861388888889 ]);\n DB::table('runways')->insert([ 'airport_id' => 19, 'designator' => '35', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 350, 'length' => 2625, 'elevation' => 86, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.007218888888886, 'arrival_lon' => 25.12861388888889, 'departure_lat' => 37.01355777777778, 'departure_lon' => 25.127566944444446 ]);\n DB::table('runways')->insert([ 'airport_id' => 20, 'designator' => '18', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 177, 'length' => 2953, 'elevation' => 11, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.084375, 'arrival_lon' => 25.368196944444446, 'departure_lat' => 37.07713277777778, 'departure_lon' => 25.36803888888889 ]);\n DB::table('runways')->insert([ 'airport_id' => 20, 'designator' => '36', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 357, 'length' => 2953, 'elevation' => 11, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.07713277777778, 'arrival_lon' => 25.36803888888889, 'departure_lat' => 37.084375, 'departure_lon' => 25.368196944444446 ]);\n DB::table('runways')->insert([ 'airport_id' => 21, 'designator' => '14', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 144, 'length' => 7894, 'elevation' => 58, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 39.06644694444444, 'arrival_lon' => 26.591666944444444, 'departure_lat' => 39.05277777777778, 'departure_lon' => 26.60261388888889 ]);\n DB::table('runways')->insert([ 'airport_id' => 21, 'designator' => '32', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 324, 'length' => 7894, 'elevation' => 21, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 39.05277777777778, 'arrival_lon' => 26.60261388888889, 'departure_lat' => 39.06644694444444, 'departure_lon' => 26.591666944444444 ]);\n DB::table('runways')->insert([ 'airport_id' => 22, 'designator' => '08', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 81, 'length' => 3527, 'elevation' => 15, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.69631388888889, 'arrival_lon' => 24.470480833333333, 'departure_lat' => 36.697068888888886, 'departure_lon' => 24.478938888888887 ]);\n DB::table('runways')->insert([ 'airport_id' => 22, 'designator' => '26', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 261, 'length' => 3527, 'elevation' => 10, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.697068888888886, 'arrival_lon' => 24.478938888888887, 'departure_lat' => 36.69631388888889, 'departure_lon' => 24.470480833333333 ]);\n DB::table('runways')->insert([ 'airport_id' => 23, 'designator' => '16', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 157, 'length' => 6240, 'elevation' => 395, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.44325277777778, 'arrival_lon' => 25.344657777777776, 'departure_lat' => 37.42708277777778, 'departure_lon' => 25.351813888888888 ]);\n DB::table('runways')->insert([ 'airport_id' => 23, 'designator' => '34', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 337, 'length' => 6240, 'elevation' => 388, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.42708277777778, 'arrival_lon' => 25.351813888888888, 'departure_lat' => 37.44325277777778, 'departure_lon' => 25.344657777777776 ]);\n DB::table('runways')->insert([ 'airport_id' => 24, 'designator' => '08', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 80, 'length' => 3953, 'elevation' => 12, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.97933888888889, 'arrival_lon' => 23.357941944444445, 'departure_lat' => 37.98087777777778, 'departure_lon' => 23.37158888888889 ]);\n DB::table('runways')->insert([ 'airport_id' => 24, 'designator' => '26', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 260, 'length' => 3953, 'elevation' => 12, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.98087777777778, 'arrival_lon' => 23.37158888888889, 'departure_lat' => 37.97933888888889, 'departure_lon' => 23.357941944444445 ]);\n DB::table('runways')->insert([ 'airport_id' => 25, 'designator' => '08R', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 78, 'length' => 9709, 'elevation' => 239, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 39.64674194444444, 'arrival_lon' => 22.441592777777778, 'departure_lat' => 39.65389972222222, 'departure_lon' => 22.48952388888889 ]);\n DB::table('runways')->insert([ 'airport_id' => 25, 'designator' => '26L', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 258, 'length' => 9709, 'elevation' => 227, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 39.65389972222222, 'arrival_lon' => 22.48952388888889, 'departure_lat' => 39.64674194444444, 'departure_lon' => 22.441592777777778 ]);\n DB::table('runways')->insert([ 'airport_id' => 26, 'designator' => '04R', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 41, 'length' => 9895, 'elevation' => 13, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 39.90719694444444, 'arrival_lon' => 25.22434388888889, 'departure_lat' => 39.92700583333333, 'departure_lon' => 25.248471944444443 ]);\n DB::table('runways')->insert([ 'airport_id' => 26, 'designator' => '22L', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 221, 'length' => 9895, 'elevation' => 13, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 39.92700583333333, 'arrival_lon' => 25.248471944444443, 'departure_lat' => 39.90719694444444, 'departure_lon' => 25.22434388888889 ]);\n DB::table('runways')->insert([ 'airport_id' => 27, 'designator' => '14', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 140, 'length' => 3320, 'elevation' => 8, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.188675, 'arrival_lon' => 26.796632777777777, 'departure_lat' => 37.18254388888889, 'departure_lon' => 26.802163888888888 ]);\n DB::table('runways')->insert([ 'airport_id' => 27, 'designator' => '32', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 320, 'length' => 3320, 'elevation' => 33, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.18254388888889, 'arrival_lon' => 26.802163888888888, 'departure_lat' => 37.188675, 'departure_lon' => 26.796632777777777 ]);\n DB::table('runways')->insert([ 'airport_id' => 28, 'designator' => '14', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 140, 'length' => 5978, 'elevation' => 2050, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 40.290977777777776, 'arrival_lon' => 21.836577777777777, 'departure_lat' => 40.27916388888889, 'departure_lon' => 21.848180833333334 ]);\n DB::table('runways')->insert([ 'airport_id' => 28, 'designator' => '32', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 320, 'length' => 5978, 'elevation' => 1968, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 40.27916388888889, 'arrival_lon' => 21.848180833333334, 'departure_lat' => 40.290977777777776, 'departure_lon' => 21.836577777777777 ]);\n DB::table('runways')->insert([ 'airport_id' => 29, 'designator' => '10', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 98, 'length' => 3330, 'elevation' => 770, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.96439388888889, 'arrival_lon' => 26.93511388888889, 'departure_lat' => 36.962516944444445, 'departure_lon' => 26.946268888888888 ]);\n DB::table('runways')->insert([ 'airport_id' => 29, 'designator' => '28', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 278, 'length' => 3330, 'elevation' => 731, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.962516944444445, 'arrival_lon' => 26.946268888888888, 'departure_lat' => 36.96439388888889, 'departure_lon' => 26.93511388888889 ]);\n DB::table('runways')->insert([ 'airport_id' => 30, 'designator' => '05R', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 51, 'length' => 9843, 'elevation' => 9, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 40.906302777777775, 'arrival_lon' => 24.604980833333332, 'departure_lat' => 40.921657777777774, 'departure_lon' => 24.634282777777777 ]);\n DB::table('runways')->insert([ 'airport_id' => 30, 'designator' => '23L', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 231, 'length' => 9843, 'elevation' => 18, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 40.921657777777774, 'arrival_lon' => 24.634282777777777, 'departure_lat' => 40.906302777777775, 'departure_lon' => 24.604980833333332 ]);\n DB::table('runways')->insert([ 'airport_id' => 31, 'designator' => '09', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 88, 'length' => 3221, 'elevation' => 20, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 35.421527777777776, 'arrival_lon' => 26.904591944444444, 'departure_lat' => 35.42115777777778, 'departure_lon' => 26.915391944444444 ]);\n DB::table('runways')->insert([ 'airport_id' => 31, 'designator' => '27', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 268, 'length' => 3221, 'elevation' => 25, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 35.42115777777778, 'arrival_lon' => 26.915391944444444, 'departure_lat' => 35.421527777777776, 'departure_lon' => 26.904591944444444 ]);\n DB::table('runways')->insert([ 'airport_id' => 32, 'designator' => '17', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 165, 'length' => 7785, 'elevation' => 6, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 39.608893888888886, 'arrival_lon' => 19.91033277777778, 'departure_lat' => 39.59206694444445, 'departure_lon' => 19.91465277777778 ]);\n DB::table('runways')->insert([ 'airport_id' => 32, 'designator' => '35', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 345, 'length' => 7785, 'elevation' => 6, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 39.59206694444445, 'arrival_lon' => 19.91465277777778, 'departure_lat' => 39.608893888888886, 'departure_lon' => 19.91033277777778 ]);\n DB::table('runways')->insert([ 'airport_id' => 33, 'designator' => '12', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 121, 'length' => 7870, 'elevation' => 37, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 35.42650777777778, 'arrival_lon' => 27.136210833333333, 'departure_lat' => 35.41576888888889, 'departure_lon' => 27.15523888888889 ]);\n DB::table('runways')->insert([ 'airport_id' => 33, 'designator' => '30', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 301, 'length' => 7870, 'elevation' => 62, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 35.41576888888889, 'arrival_lon' => 27.15523888888889, 'departure_lat' => 35.42650777777778, 'departure_lon' => 27.136210833333333 ]);\n DB::table('runways')->insert([ 'airport_id' => 34, 'designator' => '14', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 145, 'length' => 7841, 'elevation' => 412, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.803716944444446, 'arrival_lon' => 27.084018888888888, 'departure_lat' => 36.78545777777778, 'departure_lon' => 27.098224722222223 ]);\n DB::table('runways')->insert([ 'airport_id' => 34, 'designator' => '32', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 325, 'length' => 7841, 'elevation' => 373, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.78545777777778, 'arrival_lon' => 27.098224722222223, 'departure_lat' => 36.803716944444446, 'departure_lon' => 27.084018888888888 ]);\n DB::table('runways')->insert([ 'airport_id' => 35, 'designator' => '03', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 28, 'length' => 984, 'elevation' => 713, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 40.53050177574321, 'arrival_lon' => 22.967509031295776, 'departure_lat' => 40.50899474991066, 'departure_lon' => 22.974284291267395 ]);\n DB::table('runways')->insert([ 'airport_id' => 35, 'designator' => '12', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 118, 'length' => 1968, 'elevation' => 713, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 38.13917638888889, 'arrival_lon' => 23.94888472222222, 'departure_lat' => 38.136290555555554, 'departure_lon' => 23.953927222222223 ]);\n DB::table('runways')->insert([ 'airport_id' => 35, 'designator' => '21', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 208, 'length' => 984, 'elevation' => 713, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 40.53050177574321, 'arrival_lon' => 22.967509031295776, 'departure_lat' => 40.50899474991066, 'departure_lon' => 22.974284291267395 ]);\n DB::table('runways')->insert([ 'airport_id' => 35, 'designator' => '30', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 298, 'length' => 1968, 'elevation' => 713, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 38.136290555555554, 'arrival_lon' => 23.953927222222223, 'departure_lat' => 38.13917638888889, 'departure_lon' => 23.94888472222222 ]);\n DB::table('runways')->insert([ 'airport_id' => 36, 'designator' => '17R', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 165, 'length' => 8868, 'elevation' => 26, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.08039388888889, 'arrival_lon' => 22.022596944444444, 'departure_lat' => 37.05645277777778, 'departure_lon' => 22.028180833333334 ]);\n DB::table('runways')->insert([ 'airport_id' => 36, 'designator' => '35L', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 345, 'length' => 8868, 'elevation' => 16, 'ils' => 1, 'ils_frequency' => 111.3, 'glidepath' => '3.0', 'arrival_lat' => 37.05645277777778, 'arrival_lon' => 22.028180833333334, 'departure_lat' => 37.08039388888889, 'departure_lon' => 22.022596944444444 ]);\n DB::table('runways')->insert([ 'airport_id' => 37, 'designator' => '13', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 134, 'length' => 2618, 'elevation' => 488, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.14434194444444, 'arrival_lon' => 29.573360833333332, 'departure_lat' => 36.13903083333334, 'departure_lon' => 29.57933277777778 ]);\n DB::table('runways')->insert([ 'airport_id' => 37, 'designator' => '31', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 314, 'length' => 2618, 'elevation' => 457, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.13903083333334, 'arrival_lon' => 29.57933277777778, 'departure_lat' => 36.14434194444444, 'departure_lon' => 29.573360833333332 ]);\n DB::table('runways')->insert([ 'airport_id' => 38, 'designator' => '14', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 143, 'length' => 7992, 'elevation' => 32, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 38.1291, 'arrival_lon' => 20.49280277777778, 'departure_lat' => 38.11293583333333, 'departure_lon' => 20.50646888888889 ]);\n DB::table('runways')->insert([ 'airport_id' => 38, 'designator' => '32', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 323, 'length' => 7992, 'elevation' => 50, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 38.11293583333333, 'arrival_lon' => 20.50646888888889, 'departure_lat' => 38.1291, 'departure_lon' => 20.49280277777778 ]);\n DB::table('runways')->insert([ 'airport_id' => 39, 'designator' => '02', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 23, 'length' => 4793, 'elevation' => 1045, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.26811083333333, 'arrival_lon' => 23.0132, 'departure_lat' => 36.279966944444446, 'departure_lon' => 23.02027777777778 ]);\n DB::table('runways')->insert([ 'airport_id' => 39, 'designator' => '20', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 203, 'length' => 4793, 'elevation' => 1043, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 36.279966944444446, 'arrival_lon' => 23.02027777777778, 'departure_lat' => 36.26811083333333, 'departure_lon' => 23.0132 ]);\n DB::table('runways')->insert([ 'airport_id' => 40, 'designator' => '12', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 123, 'length' => 8852, 'elevation' => 2167, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 40.45243277777778, 'arrival_lon' => 21.269938888888888, 'departure_lat' => 40.43938583333333, 'departure_lon' => 21.29362777777778 ]);\n DB::table('runways')->insert([ 'airport_id' => 40, 'designator' => '30', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 303, 'length' => 8852, 'elevation' => 2119, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 40.43938583333333, 'arrival_lon' => 21.29362777777778, 'departure_lat' => 40.45243277777778, 'departure_lon' => 21.269938888888888 ]);\n DB::table('runways')->insert([ 'airport_id' => 41, 'designator' => '09', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 92, 'length' => 8905, 'elevation' => 78, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 35.34070777777778, 'arrival_lon' => 25.166410833333334, 'departure_lat' => 35.33901083333333, 'departure_lon' => 25.19093277777778 ]);\n DB::table('runways')->insert([ 'airport_id' => 41, 'designator' => '12', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 123, 'length' => 5138, 'elevation' => 50, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 35.34388583333333, 'arrival_lon' => 25.173357777777777, 'departure_lat' => 35.335524722222225, 'departure_lon' => 25.187235833333332 ]);\n DB::table('runways')->insert([ 'airport_id' => 41, 'designator' => '27', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 272, 'length' => 8905, 'elevation' => 82, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 35.33901083333333, 'arrival_lon' => 25.19093277777778, 'departure_lat' => 35.34070777777778, 'departure_lon' => 25.166410833333334 ]);\n DB::table('runways')->insert([ 'airport_id' => 41, 'designator' => '30', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 303, 'length' => 5138, 'elevation' => 115, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 35.335524722222225, 'arrival_lon' => 25.187235833333332, 'departure_lat' => 35.34388583333333, 'departure_lon' => 25.173357777777777 ]);\n DB::table('runways')->insert([ 'airport_id' => 42, 'designator' => '14', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 139, 'length' => 7881, 'elevation' => 1550, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 39.70580777777778, 'arrival_lon' => 20.813232777777777, 'departure_lat' => 39.689685833333336, 'departure_lon' => 20.829718888888888 ]);\n DB::table('runways')->insert([ 'airport_id' => 42, 'designator' => '32', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 319, 'length' => 7881, 'elevation' => 1558, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 39.689685833333336, 'arrival_lon' => 20.829718888888888, 'departure_lat' => 39.70580777777778, 'departure_lon' => 20.813232777777777 ]);\n DB::table('runways')->insert([ 'airport_id' => 43, 'designator' => '15', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 148, 'length' => 4551, 'elevation' => 58, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.68828888888889, 'arrival_lon' => 26.343325, 'departure_lat' => 37.67729694444444, 'departure_lon' => 26.35078888888889 ]);\n DB::table('runways')->insert([ 'airport_id' => 43, 'designator' => '33', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 328, 'length' => 4551, 'elevation' => 74, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.67729694444444, 'arrival_lon' => 26.35078888888889, 'departure_lat' => 37.68828888888889, 'departure_lon' => 26.343325 ]);\n DB::table('runways')->insert([ 'airport_id' => 44, 'designator' => '01', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 8, 'length' => 4957, 'elevation' => 8, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 38.3378, 'arrival_lon' => 26.13936888888889, 'departure_lat' => 38.34936388888889, 'departure_lon' => 26.141846944444445 ]);\n DB::table('runways')->insert([ 'airport_id' => 44, 'designator' => '19', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 188, 'length' => 4957, 'elevation' => 9, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 38.34936388888889, 'arrival_lon' => 26.141846944444445, 'departure_lat' => 38.3378, 'departure_lon' => 26.13936888888889 ]);\n DB::table('runways')->insert([ 'airport_id' => 45, 'designator' => '18', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 178, 'length' => 8983, 'elevation' => 129, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 38.07615583333333, 'arrival_lon' => 23.55598277777778, 'departure_lat' => 38.05213583333333, 'departure_lon' => 23.556057777777777 ]);\n DB::table('runways')->insert([ 'airport_id' => 45, 'designator' => '36', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 358, 'length' => 8983, 'elevation' => 20, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 38.05213583333333, 'arrival_lon' => 23.556057777777777, 'departure_lat' => 38.07615583333333, 'departure_lon' => 23.55598277777778 ]);\n DB::table('runways')->insert([ 'airport_id' => 46, 'designator' => '08', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 79, 'length' => 9052, 'elevation' => 83, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 39.21764388888889, 'arrival_lon' => 22.778668888888888, 'departure_lat' => 39.22132777777778, 'departure_lon' => 22.81026388888889 ]);\n DB::table('runways')->insert([ 'airport_id' => 46, 'designator' => '26', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 259, 'length' => 9052, 'elevation' => 19, 'ils' => 1, 'ils_frequency' => 110.9, 'glidepath' => '2.5', 'arrival_lat' => 39.22132777777778, 'arrival_lon' => 22.81026388888889, 'departure_lat' => 39.21764388888889, 'departure_lon' => 22.778668888888888 ]);\n DB::table('runways')->insert([ 'airport_id' => 47, 'designator' => '13', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 130, 'length' => 5906, 'elevation' => 27, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 40.65606888888889, 'arrival_lon' => 22.48031888888889, 'departure_lat' => 40.646080833333336, 'departure_lon' => 22.497310833333334 ]);\n DB::table('runways')->insert([ 'airport_id' => 47, 'designator' => '31', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 310, 'length' => 5906, 'elevation' => 27, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 40.646080833333336, 'arrival_lon' => 22.497310833333334, 'departure_lat' => 40.65606888888889, 'departure_lon' => 22.48031888888889 ]);\n DB::table('runways')->insert([ 'airport_id' => 48, 'designator' => '03L', 'preferred_arrival' => 1, 'preferred_departure' => 0, 'heading' => 34, 'length' => 12467, 'elevation' => 255, 'ils' => 1, 'ils_frequency' => 110.5, 'glidepath' => '3.0', 'arrival_lat' => 37.923677777777776, 'arrival_lon' => 23.920935833333335, 'departure_lat' => 37.94670583333333, 'departure_lon' => 23.942835833333334 ]);\n DB::table('runways')->insert([ 'airport_id' => 48, 'designator' => '03R', 'preferred_arrival' => 0, 'preferred_departure' => 1, 'heading' => 34, 'length' => 13123, 'elevation' => 271, 'ils' => 1, 'ils_frequency' => 111.1, 'glidepath' => '3.0', 'arrival_lat' => 37.925935833333334, 'arrival_lon' => 23.945510833333334, 'departure_lat' => 37.9504, 'departure_lon' => 23.96878583333333 ]);\n DB::table('runways')->insert([ 'airport_id' => 48, 'designator' => '21L', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 214, 'length' => 13123, 'elevation' => 303, 'ils' => 1, 'ils_frequency' => 111.1, 'glidepath' => '3.0', 'arrival_lat' => 37.9504, 'arrival_lon' => 23.96878583333333, 'departure_lat' => 37.925935833333334, 'departure_lon' => 23.945510833333334 ]);\n DB::table('runways')->insert([ 'airport_id' => 48, 'designator' => '21R', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 214, 'length' => 12467, 'elevation' => 282, 'ils' => 1, 'ils_frequency' => 110.5, 'glidepath' => '3.0', 'arrival_lat' => 37.94670583333333, 'arrival_lon' => 23.942835833333334, 'departure_lat' => 37.923677777777776, 'departure_lon' => 23.920935833333335 ]);\n DB::table('runways')->insert([ 'airport_id' => 49, 'designator' => '07', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 70, 'length' => 8471, 'elevation' => 10, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 40.85234388888889, 'arrival_lon' => 25.941475, 'departure_lat' => 40.859175, 'departure_lon' => 25.97074388888889 ]);\n DB::table('runways')->insert([ 'airport_id' => 49, 'designator' => '25', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 250, 'length' => 8471, 'elevation' => 24, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 40.859175, 'arrival_lon' => 25.97074388888889, 'departure_lat' => 40.85234388888889, 'departure_lon' => 25.941475 ]);\n DB::table('runways')->insert([ 'airport_id' => 50, 'designator' => '16', 'preferred_arrival' => 1, 'preferred_departure' => 1, 'heading' => 162, 'length' => 10171, 'elevation' => 31, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.934332777777776, 'arrival_lon' => 21.287832777777776, 'departure_lat' => 37.90708277777778, 'departure_lon' => 21.29733277777778 ]);\n DB::table('runways')->insert([ 'airport_id' => 50, 'designator' => '34', 'preferred_arrival' => 0, 'preferred_departure' => 0, 'heading' => 342, 'length' => 10171, 'elevation' => 55, 'ils' => 0, 'ils_frequency' => 0, 'glidepath' => '3.0', 'arrival_lat' => 37.90708277777778, 'arrival_lon' => 21.29733277777778, 'departure_lat' => 37.934332777777776, 'departure_lon' => 21.287832777777776 ]);\n }", "title": "" }, { "docid": "cc9ffe3821c1808f7f6660fce98e1cb1", "score": "0.50341666", "text": "public function setAirport($icao)\n {\n if (strlen($icao) != 4) {\n throw new RuntimeException('invalid ICAO code');\n }\n $this->icao = strtoupper($icao);\n $this->cacheFile = \"metar-{$this->icao}.txt\";\n }", "title": "" }, { "docid": "db9c4c132afc904632232390c1d913aa", "score": "0.50034827", "text": "public function useAirConditioner()\n\t{\n\t\t$this->temperature -= self::TEMP_VARIANCE;\n\t}", "title": "" }, { "docid": "c8529055e6c41117812c3191a2c26540", "score": "0.49778733", "text": "public function aaiGetAirportFooterMenu() {\n $arg_0 = arg(0);\n $airport_name = arg(2);\n\n $arg_2 = arg(1);\n \n if(empty(arg(2))) {\n $airport_name = arg(1);\n }\n $database = DB::dbInstance();\n $lang = $this->aaiCurrentLang();\n $airport_tid = $this->aaiGetTermID(ucwords($airport_name), 'Airport');\n // get airport specific node of the respective bundle\n $tbl = 'field_data_field_related_airport';\n $condition_flds = array('entity_type' => 'node',\n 'bundle' => 'airports',\n 'deleted' => 0,\n 'field_related_airport_tid' => $airport_tid,\n //'language' => $lang,\n );\n $flds_to_select = array('entity_id');\n $rs = $database->dbConditionalSelect($tbl, $condition_flds, $flds_to_select);\n $node_id = $rs[0]['entity_id'];\n $tbl2 = 'field_data_field_airport_information';\n $condition_flds2 = array('bundle' => 'airports',\n 'entity_id' => $node_id,\n 'language' => $lang,\n );\n $flds_to_select2 = array('field_airport_information_value','field_airport_information_revision_id');\n $result = $database->dbConditionalSelect($tbl2, $condition_flds2, $flds_to_select2);\n\n $url = '';\n foreach ($result as $key => $value) {\n \n $url = \"/content/introduction\";\n $tbl3 = 'field_revision_field_information_type';\n $condition_flds3 = array('entity_id' => $value['field_airport_information_value'],\n 'revision_id' => $value['field_airport_information_revision_id'],\n 'language' => $lang,\n );\n $flds_to_select3 = array('field_information_type_value');\n $rows = $database->dbConditionalSelect($tbl3, $condition_flds3, $flds_to_select3);\n \n foreach($rows as $value){\n //out($value['field_information_type_value']);\n if($value['field_information_type_value'] == 'cargo'){\n $url = $arg_0.'/cargo/'.$airport_name;\n break;\n }\n else{\n $url = '/services/cargo/aaiclas';\n break;\n }\n if($value['field_information_type_value'] == 'term-condition'){\n $term_val = 'resuls_found';\n break;\n }\n }\n /*if ($url != '/content/introduction') {\n break;\n }*/\n }\n \n // set active class for menu\n $active_media_center = $active_faq = $active_cargo = $active_complaint = $active_feedback = $active_terms_conditions = '';\n\n // menu icon default class\n $menu_class_default = 'air-menu';\n\n // check for active menu\n switch($arg_2) {\n case 'terms-conditions' :\n $active_terms_conditions = 'active';\n break;\n case 'faq' :\n $active_faq = 'active'; \n break;\n case 'cargo' :\n $active_cargo = 'active';\n break;\n case 'complaint' :\n $active_complaint = 'active';\n break;\n case 'feedback' :\n $active_feedback = 'active';\n break;\n default :\n $active_media_center = 'active';\n }\n\n // formulate menu links array \n $menu_links = array();\n $menu_links['media_center'] = array('Media Center', 'air_media', \"$arg_0/image-gallery/$airport_name\");\n $menu_links['faq'] = array('Faq', 'air_faq', \"$arg_0/faq/$airport_name\");\n $menu_links['cargo'] = array('Cargo', 'air_cargo', $url);\n // $menu_links['complaint'] = array('Complaint', 'air_complaint', \"$arg_0/complaint/$airport_name\");\n // $menu_links['feedback'] = array('Feedback', 'air_feedback', \"$arg_0/feedback/$airport_name\");\n if(isset($term_val)){\n $menu_links['terms_conditions'] = array('Terms & Conditions', 'air_terms_conditions', \"$arg_0/terms-conditions/$airport_name\");\n }\n // loop through links to build menu items\n $menu = \"<ul class = 'menu'>\";\n foreach ($menu_links as $k => $v) {\n $menu_active = ${'active_' . $k};\n\n $menu_label = $v[0];\n $menu_icon = $v[1];\n $menu_lnk = $v[2];\n\n $menu .= \"<li class = '$menu_active'>\";\n //$menu .= \"<i class='$menu_class_default $menu_icon'></i>\";\n $menu .= l(t(\"$menu_label\"), $menu_lnk);\n \n \n $menu .= \"</li>\";\n unset($menu_lnk);\n unset($menu_label);\n unset($menu_icon);\n }\n $menu .= \"</ul>\";\n return $menu;\n }", "title": "" }, { "docid": "8f861e156bc94b78b45872a389bf365d", "score": "0.49611944", "text": "function AirfarePrice($request) {\n $start = microtime(true);\n try {\n $this->client->uri = 'http://www.sita.aero/PTS/fare/2005/11/PriceRQ';\n $Segments = $FareCurrencySelection = $PriceRequestInformation = '';\n $RPH = 0;\n foreach ($request['segments'] as $leg) {\n $airports = WtDB::Ref()->AirportsRows(new WtFuncArgs(array(\n 'codes' => WtFunc::removeEmptyValues(array($leg['first_departure_airport'], $leg['first_arrival_airport'], $leg['second_arrival_airport'], $leg['third_arrival_airport'])),\n 'fields' => \"a.code, a.country\",\n 'map' => 'code')));\n\n for ($i = 0; $i < $leg['segments']; $i++) {\n switch ($i) {\n case 0:\n $pref = 'first';\n break;\n case 1:\n $pref = 'second';\n break;\n case 2:\n $pref = 'third';\n break;\n }\n $RPH++;\n $Segments .= '<OriginDestinationOption><FlightSegment ArrivalDateTime=\"' . $leg[$pref . '_arrival_date'] . 'T' . $leg[$pref . '_arrival_time']\n . '\" DepartureDateTime=\"' . $leg[$pref . '_departure_date'] . 'T' . $leg[$pref . '_departure_time'] . '\" StopQuantity=\"' . 0\n . '\" FlightNumber=\"' . $leg[$pref . '_flight_number'] . '\" ResBookDesigCode=\"' . $leg[$pref . '_booking_class'] . '\" RPH=\"' . $RPH . '\">'\n . '<DepartureAirport LocationCode=\"' . $leg[$pref . '_departure_airport'] . '\"/>'\n . '<ArrivalAirport LocationCode=\"' . $leg[$pref . '_arrival_airport'] . '\"/>'\n . '<MarketingAirline Code=\"' . $leg[$pref . '_marketing_airline'] . '\"/>'\n . '</FlightSegment></OriginDestinationOption>';\n }\n\n $pref = $leg['stops'] == 2 ? 'third' : ($leg['stops'] == 1 ? 'second' : 'first');\n if (($leg['first_departure_airport'] == 'SIP' && $airports[$leg[$pref . '_arrival_airport']]['country'] == 'RU') ||\n ($leg[$pref . '_arrival_airport'] == 'SIP' && $airports[$leg['first_departure_airport']]['country'] == 'RU') ||\n ($this->CityCode == 'SIP')\n ) {\n $FareCurrencySelection = 'FareCurrencySelection=\"RUB\"';\n// $FareCurrencySelection = 'CurrencyConversionCode=\"RUB\"';\n// if ($this->CityCode == 'SIP') {\n// $PriceRequestInformation = '<PriceRequestInformation CurrencyCode=\"RUB\"/>';\n// }\n }\n }\n\n $AirTravelerAvail = '<PassengerTypeQuantity Code=\"ADT\" Quantity=\"1\" RPH=\"1\"/>';\n $AirTravelerAvail .= $request['child_qty'] > 0 ? '<PassengerTypeQuantity Code=\"CNN\" Quantity=\"1\" RPH=\"1\"/>' : '';\n $AirTravelerAvail .= $request['infant_qty'] > 0 ? '<PassengerTypeQuantity Code=\"INF\" Quantity=\"1\" RPH=\"1\"/>' : '';\n $priceRequestInformation = '';\n $additionalPriceRQData = '<AdditionalPriceRQData ' . $FareCurrencySelection . ' MaxResponses=\"10\" DoNotIncludeFBCInHFC=\"true\" PointOfTicketing=\"' . $this->CityCode . '\"/>';\n\n $faresBasis = array();\n foreach ($request['segments'] as $segment) { // Проверяем есть ли код тарифа за одно отдаем его в ФФ\n if ($segment['first_fare_basis'] != null) {\n $faresBasis[] = $segment['first_fare_basis'];\n }\n if ($segment['second_fare_basis'] != null) {\n $faresBasis[] = $segment['second_fare_basis'];\n }\n if ($segment['third_fare_basis'] != null) {\n $faresBasis[] = $segment['third_fare_basis'];\n }\n }\n\n if (empty($faresBasis)) { // Если нет тарифа, то что-то не так с поиском было.\n $this->longQueryLog($start, 'AirfarePrice no fare');\n return array('status' => 'error', 'message' => FuncLang::value('lbl_gabriel_error_fasebase'));\n }\n\n $faresFF = array('BS', 'FL');\n if (in_array($request['segments']['0']['fare_family'], $faresFF)) { // Если тариф ФФ, то делаем преоценку для ФФ\n $priceRequestInformation = '<PriceRequestInformation PricingSource=\"Both\"/>';\n $additionalSegmentInfo = '';\n $i = 1;\n foreach ($faresBasis as $one) {\n $additionalSegmentInfo = $additionalSegmentInfo .\n '<AdditionalSegmentInfo SegmentRPH=\"'.$i.'\" FareReference=\"'. $one .'\" />';\n $i++;\n }\n\n $additionalPriceRQData = '\n <AdditionalPriceRQData ' . $FareCurrencySelection . ' MaxResponses=\"10\" DoNotIncludeFBCInHFC=\"true\" PointOfTicketing=\"' . $this->CityCode . '\">\n <AdditionalSegmentInfos>'\n . $additionalSegmentInfo .\n '</AdditionalSegmentInfos>\n </AdditionalPriceRQData>';\n }\n\n $reqPayloadString = '<OTA_AirPriceRQ xmlns=\"http://sita.aero/SITA_AirDemandTicketRQ/3/0\">'\n . $this->AirfarePOS .\n '<AirItinerary><OriginDestinationOptions>' . $Segments . '</OriginDestinationOptions></AirItinerary>\n <TravelerInfoSummary>\n '. $priceRequestInformation .'\n <AirTravelerAvail>' . $AirTravelerAvail . '</AirTravelerAvail>'\n . $PriceRequestInformation .\n '</TravelerInfoSummary>\n </OTA_AirPriceRQ>'.\n $additionalPriceRQData;\n\n $this->client->SITA_AirfarePriceRQ(new SoapVar($reqPayloadString, XSD_ANYXML));\n $result = $this->client->__getLastResponse();\n\n $result = str_replace('common:', '', $result);\n\n $result = XML2Array::createArray($result);\n $result = isset($result['SOAP-ENV:Envelope']['SOAP-ENV:Body']) ? $result['SOAP-ENV:Envelope']['SOAP-ENV:Body'] : $result['Envelope']['Body'];\n $this->writeLog('SITA_AirfarePriceRQ', 'AirfarePrice', $result);\n\n $warnings = @$result['sita:SITA_AirfarePriceRS']['ota:OTA_AirPriceRS']['ota:Warnings']['ota:Warning'];\n if (empty($result['sita:SITA_AirfarePriceRS']['ota:OTA_AirPriceRS']['ota:PricedItineraries']) && !empty($warnings)) {\n $message = '';\n $warnings = isset($warnings['@value']) ? array($warnings) : $warnings;\n foreach ($warnings as $warning) {\n $message .= $warning['@value'] . \"<br/>\";\n }\n $this->longQueryLog($start, 'AirfarePrice Warning');\n return array('status' => 'error', 'message' => $message);\n }\n\n $errors = @$result['sita:SITA_AirfarePriceRS']['ota:OTA_AirPriceRS']['ota:Errors']['ota:Error'];\n if (empty($result['sita:SITA_AirfarePriceRS']['ota:OTA_AirPriceRS']['ota:PricedItineraries']) && !empty($errors)) {\n $message = '';\n $errors = isset($errors['@value']) ? array($errors) : $errors;\n foreach ($errors as $error) {\n $message .= $error['@value'] . \"<br/>\";\n }\n $this->longQueryLog($start, 'AirfarePrice error');\n return array('status' => 'error', 'message' => $message);\n }\n\n $PricedItinerary = array();\n $AirfarePrices = array(\n 'AdultBaseFare' => 0,\n 'ChildBaseFare' => 0,\n );\n\n $PricedItineraries = isset($result['sita:SITA_AirfarePriceRS']['ota:OTA_AirPriceRS']['ota:PricedItineraries']['ota:PricedItinerary']['ota:AirItinerary']) ? array($result['sita:SITA_AirfarePriceRS']['ota:OTA_AirPriceRS']['ota:PricedItineraries']['ota:PricedItinerary']) : $result['sita:SITA_AirfarePriceRS']['ota:OTA_AirPriceRS']['ota:PricedItineraries']['ota:PricedItinerary'];\n foreach ($PricedItineraries as $price) {\n $FareBreakdown = $price['ota:AirItineraryPricingInfo']['ota:PTC_FareBreakdowns']['ota:PTC_FareBreakdown'];\n $FareInfo = $price['ota:AirItineraryPricingInfo']['ota:FareInfos']['ota:FareInfo'];\n $References = isset($FareInfo['ota:TPA_Extensions']) ? $FareInfo['ota:TPA_Extensions']['sita:SITA_FareInfoExtension']['sita:References'] : $FareInfo[0]['ota:TPA_Extensions']['sita:SITA_FareInfoExtension']['sita:References'];\n switch ($FareBreakdown['ota:PassengerTypeQuantity']['@attributes']['Code']) {\n case 'ADT':\n $prefix = 'Adult';\n break;\n case 'CNN':\n $prefix = 'Child';\n break;\n case 'INF':\n $prefix = 'Infant';\n break;\n }\n\n if (isset($AirfarePrices[$prefix . 'TotalFare']) && $AirfarePrices[$prefix . 'TotalFare'] < $FareBreakdown['ota:PassengerFare']['ota:TotalFare']['@attributes']['Amount']) {\n continue;\n }\n\n $AirfarePrices['PTC'][$price['@attributes']['SequenceNumber']] = $FareBreakdown['ota:PassengerTypeQuantity']['@attributes']['Code'] == 'CNN' ? 'CHD' : $FareBreakdown['ota:PassengerTypeQuantity']['@attributes']['Code'];\n if ($prefix == 'Adult') {\n $AirfarePrices['Ref1'] = $References['sita:Ref1'];\n $AirfarePrices['FareBasisCode'] = $FareBreakdown['ota:FareBasisCodes']['ota:FareBasisCode'];\n $AirfarePrices['TicketTimeLimit'] = $price['ota:TicketingInfo']['@attributes']['TicketTimeLimit'];\n $AirfarePrices['Currency'] = $FareBreakdown['ota:PassengerFare']['ota:TotalFare']['@attributes']['CurrencyCode'];\n }\n\n $AirfarePrices[$prefix . 'TotalFare'] = $FareBreakdown['ota:PassengerFare']['ota:TotalFare']['@attributes']['Amount'];\n if ($FareBreakdown['ota:PassengerFare']['ota:BaseFare']['@attributes']['CurrencyCode'] == $this->provider['currency']) {\n $AirfarePrices[$prefix . 'BaseFare'] = $FareBreakdown['ota:PassengerFare']['ota:BaseFare']['@attributes']['Amount'];\n } elseif (isset($FareBreakdown['ota:PassengerFare']['ota:EquivFare']) &&\n $FareBreakdown['ota:PassengerFare']['ota:EquivFare']['@attributes']['CurrencyCode'] == $this->provider['currency']\n ) {\n $AirfarePrices[$prefix . 'BaseFare'] = $FareBreakdown['ota:PassengerFare']['ota:EquivFare']['@attributes']['Amount'];\n } else {\n $AirfarePrices[$prefix . 'BaseFare'] = $FareBreakdown['ota:PassengerFare']['ota:BaseFare']['@attributes']['Amount'];\n if (isset($FareBreakdown['ota:PassengerFare']['ota:BaseFare']['@attributes']['Rate'])) {\n $AirfarePrices[$prefix . 'BaseFare'] *= $FareBreakdown['ota:PassengerFare']['ota:BaseFare']['@attributes']['Rate'];\n }\n }\n\n $priceInfo = array();\n $Taxes = array();\n if (isset($FareBreakdown['ota:PassengerFare']['ota:Taxes'])) {\n $AirfarePrices[$prefix . 'TaxAmount'] = 0;\n $PassengerTax = isset($FareBreakdown['ota:PassengerFare']['ota:Taxes']['ota:Tax']['@attributes']) ? array($FareBreakdown['ota:PassengerFare']['ota:Taxes']['ota:Tax']) : $FareBreakdown['ota:PassengerFare']['ota:Taxes']['ota:Tax'];\n foreach ($PassengerTax as $tax) {\n if (!is_array($tax) || isset($Taxes[$tax['@attributes']['TaxCode']])) {\n// continue;\n }\n $Taxes[$tax['@attributes']['TaxCode']] = array(\n 'TaxCode' => $tax['@attributes']['TaxCode'],\n// 'Amount' => $tax['@attributes']['Amount'],\n 'Currency' => $tax['@attributes']['CurrencyCode']\n );\n $Taxes[$tax['@attributes']['TaxCode']]['Amount'] += $tax['@attributes']['Amount'];\n $AirfarePrices[$prefix . 'TaxAmount'] += $tax['@attributes']['Amount'];\n }\n }\n if ($prefix == 'Adult') {\n $AirfarePrices['Taxes'] = $Taxes;\n }\n// $priceInfo['Notes'] = $price['ota:Notes'];\n $priceInfo['Ref2'] = $References['sita:Ref2'];\n\n $AirfarePrices['PassengersRef'][$prefix] = $priceInfo;\n\n $PricedItinerary[$prefix] = $price;\n }\n $AirfarePrices['TotalFare'] = ($AirfarePrices['AdultBaseFare'] * $request['adult_qty']) + ($AirfarePrices['ChildBaseFare'] * $request['child_qty']) + ($AirfarePrices['InfantBaseFare'] * $request['infant_qty']);\n $AirfarePrices['TotalTax'] = ($AirfarePrices['AdultTaxAmount'] * $request['adult_qty']) + ($AirfarePrices['ChildTaxAmount'] * $request['child_qty']) + ($AirfarePrices['InfantTaxAmount'] * $request['infant_qty']);\n\n if (isset($result['sita:SITA_AirfarePriceRS']['sita:AdditionalPriceRSData'])) {\n $Itineraries = isset($result['sita:SITA_AirfarePriceRS']['sita:AdditionalPriceRSData']['sita:AdditionalItinerariesData']['sita:AdditionalItineraryData']['sita:AdditionalSegmentInfos']) ? array($result['sita:SITA_AirfarePriceRS']['sita:AdditionalPriceRSData']['sita:AdditionalItinerariesData']['sita:AdditionalItineraryData']) : $result['sita:SITA_AirfarePriceRS']['sita:AdditionalPriceRSData']['sita:AdditionalItinerariesData']['sita:AdditionalItineraryData'];\n foreach ($Itineraries as $itinerary) {\n $PTC = $AirfarePrices['PTC'][$itinerary['@attributes']['SequenceNumber']];\n $SegmentInfos = isset($itinerary['sita:AdditionalSegmentInfos']['sita:AdditionalSegmentInfo']['sita:RebookResBookDesigCodes']) ? array($itinerary['sita:AdditionalSegmentInfos']['sita:AdditionalSegmentInfo']) : $itinerary['sita:AdditionalSegmentInfos']['sita:AdditionalSegmentInfo'];\n foreach ($SegmentInfos as $segment) {\n $segNum = $segment['@attributes']['SegmentRPH'];\n $AirfarePrices['Baggage'][$PTC][$segNum] = $segment['@attributes']['FreeBaggageAllowance'];\n $AirfarePrices['AdditionalSegmentInfos'][$PTC][$segNum] = $segment['@attributes'];\n }\n }\n }\n\n $AirfarePrices['PricedItinerary'] = serialize(array_merge($PricedItinerary, $AirfarePrices));\n\n//dump_die($AirfarePrices);\n $this->longQueryLog($start, 'AirfarePrice');\n return isset($result['sita:SITA_AirfarePriceRS']['ota:OTA_AirPriceRS']['ota:Success']) ? $AirfarePrices : false;\n } catch (SoapFault $exception) {\n $this->writeException('AirfarePrice', $exception);\n $this->longQueryLog($start, 'AirfarePrice exception');\n return false;\n }\n }", "title": "" }, { "docid": "7072d4fc522982f0d0834d6a364fe0d6", "score": "0.4949202", "text": "function testValidDestinationAirports()\n {\n $invalid = 0;\n foreach ($this->flights->all() as $flight) {\n if (array_search($flight->departureAirport, $this->valid_airports) === false){\n $invalid++;\n }\n }\n $this->assertEquals(0, $invalid, \"Improper departure airport\");\n }", "title": "" }, { "docid": "a878a7aaaaae60f4d7edece336f181fe", "score": "0.49411324", "text": "function AirAvail($request) {\n $start = microtime(true);\n try {\n $this->client->uri = 'http://sita.aero/SITA_AirAvailRQ/3/0';\n\n $BookingClassPref = '';\n /* switch ($request['class']) {\n case 'E': $classes = array('Y','B','H','K','L','M','Q','S','T','O','V','W','G','I','X');\n break;\n case 'B': $classes = array('C','D','J','I','Z');\n break;\n case 'F': $classes = array('F','P','A','J');\n break;\n }\n foreach ($classes as $class) {\n $BookingClassPref .= '<BookingClassPref ResBookDesigCode=\"' . $class . '\"/>';\n }*/\n\n $offers = array();\n for ($i = 1; $i <= $request['flight_qty']; $i++) {\n $origin_code = $request['departure_city_' . $i] ? $request['departure_city_' . $i] : $request['departure_airport_' . $i];\n $destination_code = $request['arrival_city_' . $i] ? $request['arrival_city_' . $i] : $request['arrival_airport_' . $i];\n $Segment =\n// '<OriginDestinationInformation RPH=\"' . $i . '\">\n '<OriginDestinationInformation>\n <DepartureDateTime>' . $request['date_' . $i] . '</DepartureDateTime>\n <OriginLocation LocationCode=\"' . $origin_code . '\"/>\n <DestinationLocation LocationCode=\"' . $destination_code . '\"/>\n </OriginDestinationInformation>';\n $SeatsRequested = $request['adult_qty'] + $request['child_qty'];\n// $SeatsRequested += $request['infant_qty'];\n\n $reqPayloadString = $this->POS\n . $Segment\n . '<TravelerInfoSummary><SeatsRequested>'\n . $SeatsRequested\n . '</SeatsRequested></TravelerInfoSummary>'\n . '<TravelPreferences><VendorPref Code=\"S7\"/>' . $BookingClassPref . '</TravelPreferences>';\n\n $this->client->OTA_AirAvailRQ(new SoapVar($reqPayloadString, XSD_ANYXML));\n $result = $this->client->__getLastResponse();\n $result = str_replace('common:', '', $result);\n $result = XML2Array::createArray($result);\n\n $result = $result['SOAP-ENV:Envelope']['SOAP-ENV:Body'];\n $this->writeLog('OTA_AirAvailRQ', 'AirAvail', $result);\n\n $results = $result['OTA_AirAvailRS']['OriginDestinationOptions']['OriginDestinationOption'];\n foreach ($results as $segment) {\n\n if (isset($segment['FlightSegment']['@attributes'])) {\n $segment['FlightSegment'] = array($segment['FlightSegment']);\n }\n $Legs = array();\n foreach ($segment['FlightSegment'] as $leg) {\n\n if ($leg['MarketingAirline']['@attributes']['Code'] != 'S7') {\n continue;\n }\n if ($leg['@attributes']['Ticket'] != 'eTicket') {\n continue;\n }\n $FlightSegment = array(\n 'RPH' => $leg['@attributes']['RPH'],\n 'DepartureDateTime' => $leg['@attributes']['DepartureDateTime'],\n 'ArrivalDateTime' => $leg['@attributes']['ArrivalDateTime'],\n 'FlightNumber' => $leg['@attributes']['FlightNumber'],\n 'StopQuantity' => $leg['@attributes']['StopQuantity'],\n 'Ticket' => $leg['@attributes']['Ticket'],\n 'DepartureAirport' => $leg['DepartureAirport']['@attributes']['LocationCode'],\n 'ArrivalAirport' => $leg['ArrivalAirport']['@attributes']['LocationCode'],\n 'Equipment' => $leg['Equipment']['@attributes']['AirEquipType'],\n 'MarketingAirline' => $leg['MarketingAirline']['@attributes']['Code'],\n 'MarketingCabin' => $leg['MarketingCabin']['@attributes']['Meal']\n );\n /* $bookClass = array();\n foreach($leg['BookingClassAvail'] as $class) {\n if (intval($class['@attributes']['ResBookDesigQuantity']) < $SeatsRequested) continue;\n $bookClass[$class['@attributes']['ResBookDesigCode']] = array(\n 'RPH' => $class['@attributes']['RPH'],\n 'ResBookDesigCode' => $class['@attributes']['ResBookDesigCode'],\n 'ResBookDesigQuantity' => $class['@attributes']['ResBookDesigQuantity'],\n 'ResBookDesigStatusCode' => $class['@attributes']['ResBookDesigStatusCode']\n );\n }\n $FlightSegment['BookingClassAvail'] = $bookClass;\n $FlightSegment['BookingClassAvail'] = array_keys($bookClass);*/\n $Legs[] = $FlightSegment;\n }\n\n if (!empty($Legs)) {\n $offer = array(\n 'direction' => $i,\n 'segments' => $Legs\n );\n $offers[] = $offer;\n }\n }\n }\n\n $this->longQueryLog($start, 'AirAvail');\n return isset($result['OTA_AirAvailRS']['Success']) ? $offers : false;\n } catch (SoapFault $exception) {\n $this->writeException('AirAvail', $exception);\n $this->longQueryLog($start, 'AirAvail exception');\n return false;\n }\n }", "title": "" }, { "docid": "5a3e54daa1f0e295a683b3468e02dacb", "score": "0.49311036", "text": "private function wating_segment_time($arrival_airport_city, $departure_airport_city, $arrival_datetime, $departure_datetime) {\r\n $departure_datetime = date('Y-m-d H:i:s', strtotime($departure_datetime));\r\n $arrival_datetime = date('Y-m-d H:i:s', strtotime($arrival_datetime));\r\n //Get TimeZone of Departure and Arrival Airport\r\n $departure_timezone_offset = $GLOBALS['CI']->flight_model->get_airport_timezone_offset($departure_airport_city, $departure_datetime);\r\n $arrival_timezone_offset = $GLOBALS['CI']->flight_model->get_airport_timezone_offset($arrival_airport_city, $arrival_datetime);\r\n // echo $departure_airport_city;\r\n // echo \"<br/>\";\r\n // echo $arrival_airport_city;\r\n // echo \"<br/>\";\r\n // debug($departure_timezone_offset);\r\n // echo \"<br/>\";\r\n // debug($arrival_timezone_offset);exit;\r\n //Converting TimeZone to Minutes\r\n $departure_timezone_offset = $this->convert_timezone_offset_to_minutes($departure_timezone_offset);\r\n $arrival_timezone_offset = $this->convert_timezone_offset_to_minutes($arrival_timezone_offset);\r\n //Getting Total time difference between 2 airports\r\n $timezone_offset = ($arrival_timezone_offset - $departure_timezone_offset);\r\n //Calculating the Waiting time between 2 segments\r\n $current_segment_arr = strtotime($arrival_datetime);\r\n $next_segment_dep = strtotime($departure_datetime);\r\n $segment_waiting_time = ($next_segment_dep - $current_segment_arr);\r\n\r\n //Converting into minutes\r\n $segment_waiting_time = ($segment_waiting_time) / 60; //Converting into minutes\r\n //Updating the total duration with time zone offset difference\r\n $segment_waiting_time = ($segment_waiting_time + $timezone_offset);\r\n return $segment_waiting_time;\r\n }", "title": "" }, { "docid": "311eed2c8e35fa9369bc2f4db0f9c364", "score": "0.4929332", "text": "public function setDestAccount($account){\r\n\t\t$account = explode('/',$account);\r\n\t\t//$this->bank = $account[1]; //ba\r\n\t\tif(strpos($account[0], '-')!==false){\r\n\t\t\t$number = explode('-', $account[0]);\r\n\t\t\t$this->dest_account_pre = $number[0];\r\n\t\t\t$this->dest_account = $number[1];\r\n\t\t} else {\r\n\t\t\t$this->account_number = $account[0];\r\n\t\t}\r\n\t\t\r\n\t\treturn $this;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "c6fe62c2df56f6cb454fc25220f7ef0e", "score": "0.4906583", "text": "public function arrival(string $city)\n {\n return $this->airport('city', $city, 'arrival');;\n }", "title": "" }, { "docid": "8131f556cfa64d6099e93a256d6386b9", "score": "0.48945776", "text": "public function saveAirports()\n\t{\n\t\tJRequest::checkToken() or jexit(JText::_('JInvalid_Token'));\n\n\t\t// Initialise some variables\n\t\t$app\t\t= JFactory::getApplication();\n\t\t\t\t\t\t\t\t\n\t\t$model = $this->getModel('HotelProfile');\n\t\t\t\t\t\t\n\t\t$result = $model->saveAirports();\n\t\t\n\t\t$post = JRequest::get('post');\t\n\n\t\tif( $post['tmpl'] == 'component' )\n\t\t{\n\t\t\t$this->setRedirect('index.php?option=com_sfs&view=close&tmpl=component&closetype=airport');\n\t\t\treturn true;\n\t\t}\t\t\t\n\t\t\n\t\tif ($result) {\t\t\t\t\t\n\t\t\n\t\t\tif( isset($post['save_close']) ) {\n\t\t\t\t$this->setRedirect(JRoute::_('index.php?option=com_sfs&view=hotelprofile&layout=formmealplans&Itemid=111', false));\n\t\t\t}else if( isset($post['save_next']) ) {\n\t\t\t\t$this->setRedirect(JRoute::_('index.php?option=com_sfs&view=hotelprofile&layout=formmealplans&Itemid=111', false));\t\n\t\t\t}else{\n\t\t\t\t$this->setRedirect(JRoute::_('index.php?option=com_sfs&view=hotelprofile&layout=formmealplans&Itemid=111', false));\n\t\t\t}\t\n\n\t\t\t$this->setRedirect(JRoute::_('index.php?option=com_sfs&view=hotelprofile&layout=formmealplans&Itemid=111', false));\t\t\n\t\t\treturn true;\t\t\t\n\t\t}\t\t\t\t\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_sfs&view=hotelprofile&layout=formairports&Itemid=113', false));\n\t\t\t\t\t\t\n\t}", "title": "" }, { "docid": "ef554c50810856e45886c0c7a98740e6", "score": "0.48651215", "text": "public function aaiThemeFIDSOutput($flight_data = array(), $type, $home_airport_code) {\n if (!count($flight_data)) {\n return FALSE;\n }\n\n // set the fields that will be available for display\n $selected_flds = array();\n switch ($type) {\n case 'arrival':\n $selected_flds = array(\n 'ARRIVAL_DEPARTURE_FLAG',\n 'FLIGHT_NUMBER',\n 'SOURCE_DESTINATION',\n 'VIA',\n 'SCHED_DATE',\n 'SCHED_TIME', \n 'EST_DATE',\n 'EST_TIME', \n 'ACT_DATE',\n 'ACT_TIME', \n 'TERMINAL', \n 'GATES',\n 'BELT_NUMBER', \n 'FLIGHT_STATUS',\n 'INTERNATIONAL_DOMESTIC_FLAG',\n 'AIRLINE_CODE',\n\n );\n\n $tbl_base_structure = \"<thead>\n <tr>\n <th rowspan='2'>\" . t('Flight No') . \" </th>\n <th rowspan='2'>\" . t('Source') . \" </th>\n <th rowspan='2'>\" . t('Via') . \" </th>\n <th colspan='3'>\" . t('Arrival') . \"</th> \n <th rowspan='2'>\" . t('Terminal') . \" </th>\n <th rowspan='2'>\" . t('Belt Number') . \"</th> \n <th rowspan='2'>\" . t('Status') . \"</th> \n </tr>\n <tr>\n <th>\" . t('Scheduled') . \"</th>\n <th>\" . t('Estimated') . \"</th>\n <th>\" . t('Actual') . \"</th>\n </tr>\n </thead>\n <tfoot>\n <tr>\n <th>\" . t('Flight No') . \"</th>\n <th>\" . t('Source') . \"</th>\n <th>\" . t('Via') . \"</th>\n <th>\" . t('Scheduled') . \"</th>\n <th>\" . t('Estimated') . \"</th>\n <th>\" . t('Actual') . \"</th> \n <th>\" . t('Terminal') . \"</th>\n <th>\" . t('Belt Number') . \"</th>\n <th>\" . t('Status') . \"</th>\n </tr>\n </tfoot>\";\n $out = \"<table id='aai-fids-result-tbl-arv' class='aai-fids-tbl table table-bordered display'>\";\n break;\n case 'departure':\n $selected_flds = array(\n 'ARRIVAL_DEPARTURE_FLAG',\n 'FLIGHT_NUMBER',\n 'SOURCE_DESTINATION',\n 'VIA',\n 'SCHED_DATE',\n 'SCHED_TIME', \n 'EST_DATE',\n 'EST_TIME',\n 'ACT_DATE',\n 'ACT_TIME',\n 'TERMINAL',\n 'GATES',\n 'BELT_NUMBER',\n 'FLIGHT_STATUS',\n 'INTERNATIONAL_DOMESTIC_FLAG',\n 'AIRLINE_CODE',\n );\n\n $tbl_base_structure = \"<thead>\n <tr>\n <th rowspan='2'>\" . t('Flight No') . \" </th>\n <th rowspan='2'>\" . t('Destination') . \" </th>\n <th rowspan='2'>\" . t('Via') . \" </th>\n <th colspan='3'>\" . t('Departure') . \"</th> \n <th rowspan='2'>\" . t('Terminal') . \" </th>\n <th rowspan='2'>\" . t('Belt Number') . \"</th> \n <th rowspan='2'>\" . t('Status') . \"</th> \n </tr>\n <tr> \n <th>\" . t('Scheduled') . \"</th>\n <th>\" . t('Estimated') . \"</th>\n <th>\" . t('Actual') . \"</th>\n </tr>\n </thead>\n <tfoot>\n <tr>\n <th>\" . t('Flight No') . \"</th>\n <th>\" . t('Destination') . \"</th>\n <th>\" . t('Via') . \"</th>\n <th>\" . t('Scheduled') . \"</th>\n <th>\" . t('Estimated') . \"</th>\n <th>\" . t('Actual') . \"</th> \n <th>\" . t('Terminal') . \"</th>\n <th>\" . t('Belt Number') . \"</th> \n <th>\" . t('Status') . \"</th>\n </tr>\n </tfoot>\";\n $out = \"<table id='aai-fids-result-tbl-dep' class='aai-fids-tbl table table-bordered display'>\";\n break;\n }\n\n // formulate the output structure\n $out .= $tbl_base_structure;\n $out .= \"<tbody>\";\n foreach ($flight_data as $data) {\n $out .= \"<tr>\";\n if ($type == 'arrival') {\n foreach ($selected_flds as $fld) {\n $fld_val = trim($data[$fld]);\n switch ($fld) {\n case 'AIRLINE_CODE':\n $airline = $this->aaiGetAirportNameFromCode($fld_val); \n break; \n case 'FLIGHT_NUMBER':\n $out .= \"<td>\" . t($airline.$fld_val) . \"</td>\";\n break;\n case 'SOURCE_DESTINATION':\n $tmp = $this->aaiGetAirportNameFromCode($fld_val);\n $out .= \"<td>\" . t($tmp) . \"</td>\";\n break;\n case 'VIA':\n $tmp = $this->aaiGetAirportNameFromCode($fld_val);\n $out .= \"<td>\" . t($tmp) . \"</td>\";\n break;\n case 'SCHED_DATE':\n $date = $fld_val;\n // $out .= \"<td>\" . t($fld_val) . \"</td>\";\n break;\n case 'SCHED_TIME':\n $newstr = substr_replace($fld_val, \":\", 2, 0);\n if($newstr == \"\"){ $newstr = \"00\";}\n $out .= \"<td>\" . t($newstr) . \"</td>\"; \n break; \n case 'EST_DATE':\n $date = $fld_val;\n // $out .= \"<td>\" . t($fld_val) . \"</td>\";\n break;\n case 'EST_TIME':\n $newstr = substr_replace($fld_val, \":\", 2, 0);\n if($newstr == \"\"){ $newstr = \"00\";}\n $out .= \"<td>\" . t($newstr) . \"</td>\"; \n break; \n case 'ACT_DATE':\n $date = $fld_val;\n // $out .= \"<td>\" . t($fld_val) . \"</td>\";\n break;\n case 'ACT_TIME':\n $newstr = substr_replace($fld_val, \":\", 2, 0);\n if($newstr == \"\") { $newstr = \"00\";}\n $out .= \"<td>\" . t($newstr) . \"</td>\"; \n break; \n case 'TERMINAL':\n $out .= \"<td>\" . t($fld_val) . \"</td>\";\n break;\n case 'FLIGHT_STATUS': \n if ($fld_val == '1') {\n $out .= \"<td>ON TIME</td>\";\n } elseif ($fld_val == '2') {\n $out .= \"<td>ARRIVED</td>\";\n } elseif ($fld_val == '3') {\n $out .= \"<td>DEPARTED</td>\";\n } elseif ($fld_val == '4') {\n $out .= \"<td>CHECK IN OPEN</td>\";\n } elseif ($fld_val == '5') {\n $out .= \"<td>SECURITY CHECK</td>\";\n } elseif ($fld_val == '6') {\n $out .= \"<td>GATE OPEN</td>\";\n } elseif ($fld_val == '7') {\n $out .= \"<td>FINAL CALL</td>\";\n } elseif ($fld_val == '8') {\n $out .= \"<td>DELAYED</td>\";\n } elseif ($fld_val == '9') {\n $out .= \"<td>CANCELLED</td>\";\n } else {\n $out .= \"<td></td>\";\n }\n break; \n case 'BELT_NUMBER':\n $out .= \"<td>\" . t($fld_val) . \"</td>\";\n break;\n }\n }\n } else {\n // departure flights FIDS search\n foreach ($selected_flds as $fld) {\n $fld_val = trim($data[$fld]);\n switch ($fld) {\n case 'AIRLINE_CODE':\n $airline = $this->aaiGetAirportNameFromCode($fld_val);\n break;\n case 'FLIGHT_NUMBER':\n $out .= \"<td>\" . t($airline.$fld_val) . \"</td>\";\n break;\n case 'SOURCE_DESTINATION':\n $tmp = $this->aaiGetAirportNameFromCode($fld_val);\n $out .= \"<td>\" . t($tmp) . \"</td>\";\n break;\n case 'VIA':\n $tmp = $this->aaiGetAirportNameFromCode($fld_val);\n $out .= \"<td>\" . t($tmp) . \"</td>\";\n break;\n case 'SCHED_DATE':\n $date = $fld_val;\n // $out .= \"<td>\" . t($fld_val) . \"</td>\";\n break;\n case 'SCHED_TIME':\n $newstr = substr_replace($fld_val, \":\", 2, 0);\n if($fld_val == 0) { $newstr = \"00:00\"; }\n $out .= \"<td>\" . t($newstr) . \"</td>\"; \n break;\n case 'EST_DATE':\n $date = $fld_val;\n // $out .= \"<td>\" . t($fld_val) . \"</td>\";\n break;\n case 'EST_TIME':\n $newstr = substr_replace($fld_val, \":\", 2, 0);\n if($fld_val == 0) { $newstr = \"00:00\"; }\n $out .= \"<td>\" . t($newstr) . \"</td>\";\n break;\n case 'ACT_DATE':\n $date = $fld_val;\n // $out .= \"<td>\" . t($fld_val) . \"</td>\";\n break;\n case 'ACT_TIME':\n $newstr = substr_replace($fld_val, \":\", 2, 0);\n if($fld_val == 0) { $newstr = \"00:00\"; }\n $out .= \"<td>\" . t($newstr) . \"</td>\";\n break;\n case 'FLIGHT_STATUS':\n if ($fld_val == '1') {\n $out .= \"<td>ON TIME</td>\";\n } elseif ($fld_val == '2') {\n $out .= \"<td>ARRIVED</td>\";\n } elseif ($fld_val == '3') {\n $out .= \"<td>DEPARTED</td>\";\n } elseif ($fld_val == '4') {\n $out .= \"<td>CHECK IN OPEN</td>\";\n } elseif ($fld_val == '5') {\n $out .= \"<td>SECURITY CHECK</td>\";\n } elseif ($fld_val == '6') {\n $out .= \"<td>GATE OPEN</td>\";\n } elseif ($fld_val == '7') {\n $out .= \"<td>FINAL CALL</td>\";\n } elseif ($fld_val == '8') {\n $out .= \"<td>DELAYED</td>\";\n } elseif ($fld_val == '9') {\n $out .= \"<td>CANCELLED</td>\";\n } elseif ($fld_val == '0') {\n $out .= \"<td>N/A</td>\";\n } else {\n $out .= \"<td> </td>\";\n }\n break;\n case 'GATES':\n $out .= \"<td>\" . t($fld_val) . \"</td>\";\n break;\n case 'TERMINAL':\n $out .= \"<td>\" . t($fld_val) . \"</td>\";\n break;\n }\n }\n }\n $out .= \"</tr>\";\n }\n\n $out .= \"</tbody></table>\";\n if ($type == 'arrival') {\n $out .= \"<script>jQuery('#aai-fids-result-tbl-arv').DataTable();</script>\";\n } else {\n $out .= \"<Script>jQuery('#aai-fids-result-tbl-dep').DataTable();</script>\";\n }\n return $out;\n }", "title": "" }, { "docid": "aa3a4c962d6900268f532aa3617e6a90", "score": "0.48620638", "text": "public function airports()\n {\n return $this->hasMany('App\\Airport', 'id');\n }", "title": "" }, { "docid": "28e474158131c7c09e8243dc2dad782c", "score": "0.48408663", "text": "function setupCity()\n {\n $occupied_locations = [];\n\n // city center\n do {\n $center_x_location = bga_rand(1, 6);\n $center_y_location = bga_rand(1, 6);\n $center_location = $center_y_location * 8 + $center_x_location;\n } while (in_array($center_location, $occupied_locations));\n $occupied_locations[] = $center_location;\n $house_tile_type_id = $this->city_tile_type_ids['house'];\n $sql = \"INSERT INTO tokens (card_id, card_type, card_type_arg, card_location, card_location_arg) VALUES (0, 'tile' , $house_tile_type_id, 'city', $center_location)\";\n $this->DbQuery($sql);\n\n $sql = \"INSERT INTO tokens (card_type, card_type_arg, card_location, card_location_arg) VALUES \";\n $values = [];\n \n // roads\n $horizontal_road_row_size = 8;\n $top_horizontal_road_id = $center_y_location * 17 + $center_x_location;\n $bottom_horizontal_road_id = ($center_y_location + 1) * 17 + $center_x_location;\n $left_vertical_road_id = $center_y_location * 17 + $center_x_location + $horizontal_road_row_size;\n $right_vertical_road_id = $left_vertical_road_id + 1;\n $values[] = \"('road', -1, 'city', $top_horizontal_road_id)\";\n $values[] = \"('road', -1, 'city', $bottom_horizontal_road_id)\";\n $values[] = \"('road', -1, 'city', $left_vertical_road_id)\";\n $values[] = \"('road', -1, 'city', $right_vertical_road_id)\";\n\n // mountains\n $mountain_tile_type_id = $this->city_tile_type_ids['mountain'];\n for ($i = 0; $i < $this->city_tiles[$this->city_tile_type_ids['mountain']]['count']; $i++) {\n do {\n $mountain_x_location = bga_rand(1, 6);\n $mountain_y_location = bga_rand(1, 6);\n $mountain_location = $mountain_y_location * 8 + $mountain_x_location;\n } while (in_array($mountain_location, $occupied_locations));\n $occupied_locations[] = $mountain_location;\n $values[] = \"('tile', $mountain_tile_type_id, 'city', $mountain_location)\";\n }\n $sql .= implode(',', $values);\n $this->DbQuery($sql);\n }", "title": "" }, { "docid": "c67e00524232340cfa671de415a37781", "score": "0.48311368", "text": "function get_airport_city_list(){\r\n $term = $this->input->get('term'); //retrieve the search term that autocomplete sends\r\n $term = trim(strip_tags($term));\r\n $result = array();\r\n\r\n $__airports = $this->car_model->get_airport_list($term)->result();\r\n if (valid_array($__airports) == false) {\r\n $__airports = $this->car_model->get_airport_list('')->result();\r\n }\r\n // debug($__airports);exit;\r\n $airports = array();\r\n foreach ($__airports as $airport) {\r\n $airports['label'] = $airport->Airport_Name_EN.','.$airport->Country_Name_EN;\r\n // $airports['value'] = $airport->airport_city . ' (' . $airport->airport_code . ')';\r\n $airports['id'] = $airport->origin;\r\n $airports['airport_code'] = $airport->Airport_IATA;\r\n $airports['category'] = 'Search Results';\r\n $airports['type'] = 'Search Results';\r\n array_push($result, $airports);\r\n }\r\n \r\n $city_list = $this->car_model->get_city_list($term)->result();\r\n if (valid_array($city_list) == false) {\r\n $city_list = $this->car_model->get_city_list('')->result();\r\n }\r\n foreach($city_list as $city){ //debug($city_list);exit;\r\n if($city->City_ID != \"\"){\r\n $city_result['label'] = $city->City_Name_EN.' City/Downtown,'.$city->Country_Name_EN;\r\n $city_result['id'] = $city->origin;\r\n $city_result['airport_code'] = $city->Airport_IATA;\r\n $city_result['country_id'] = $city->Country_ISO;\r\n if (empty($city->top_destination) == false) {\r\n $city_result['category'] = 'Top cities';\r\n $city_result['type'] = 'Top cities';\r\n } else {\r\n $city_result['category'] = 'Search Results';\r\n $city_result['type'] = 'Search Results';\r\n }\r\n array_push($result,$city_result);\r\n }\r\n }\r\n \r\n $this->output_compressed_data($result);\r\n }", "title": "" }, { "docid": "c175a3d8f3f75d749e8c06afb0740b42", "score": "0.48253956", "text": "public function aaiGetFilghtScheduleDetail($airport_code, $condition = array(), $expand_airport_code = 0){\n $database = DB::dbInstance();\n $local_airport_code = strtoupper($airport_code);\n $day_week = date('w', strtotime($condition['from_date']));\n if($day_week == '0'){\n $day_week = '7';\n }\n if($condition['arrival_departure'] == 'departure'){\n $arrival_departure_flag = '2';\n }else{\n $arrival_departure_flag = '1';\n }\n $from_dt = $to_date = '';\n $tbl = 'aai_fids_schedule';\n $expression = '';\n $con_flds = array();\n $fld_to_select = array();\n $limit = array();\n $destination_airport = $condition['destination_airport_code'];\n if($condition['arrival_departure'] == 'departure'){\n $query = db_select('aai_fids_schedule', 'afs');\n $query->fields('afs', array('airline_code','frequency','sched_time','flight_number', 'source_destination_airport','eff_dt_from','eff_dt_till'));\n $query->condition('local_airport', $local_airport_code);\n $query->condition('arrival_departure_flag', $arrival_departure_flag);\n $query->condition('source_destination', $condition['destination_airport_code']);\n $query->condition('eff_dt_from', $condition['from_date'],'<=');\n $query->condition('eff_dt_till', $condition['from_date'],'>=');\n $query->condition('frequency', '%'.db_like($day_week). '%', 'LIKE');\n $results = $query->execute()->fetchAll();\n $flight_schedule_result = array();\n foreach($results as $flightDetails){\n $flight_schedule_result[$flightDetails->flight_number]['frequency'] = $flightDetails->frequency;\n $flight_schedule_result[$flightDetails->flight_number]['flight_number'] = $flightDetails->flight_number;\n $flight_schedule_result[$flightDetails->flight_number]['source_destination_airport'] = $flightDetails->source_destination_airport;\n $flight_schedule_result[$flightDetails->flight_number]['eff_dt_from'] = $flightDetails->eff_dt_from;\n $flight_schedule_result[$flightDetails->flight_number]['eff_dt_till'] = $flightDetails->eff_dt_till;\n $flight_schedule_result[$flightDetails->flight_number]['sched_time'] = $flightDetails->sched_time;\n $flight_schedule_result[$flightDetails->flight_number]['airline_code'] = $flightDetails->airline_code;\n }\n return $flight_schedule_result;\n } \n \n if($condition['arrival_departure'] == 'arrival'){\n $query = db_select('aai_fids_schedule', 'afs');\n $query->fields('afs', array('airline_code','frequency','sched_time','flight_number','source_destination_airport','eff_dt_from','eff_dt_till'));\n $query->condition('local_airport', $local_airport_code);\n $query->condition('arrival_departure_flag', $arrival_departure_flag);\n $query->condition('source_destination', $condition['local_airport_code']);\n $query->condition('eff_dt_from', $condition['from_date'],'<=');\n $query->condition('eff_dt_till', $condition['from_date'],'>=');\n $query->condition('frequency', '%'.db_like($day_week). '%', 'LIKE');\n $results = $query->execute()->fetchAll();\n $flight_schedule_result = array();\n foreach($results as $flightDetails){\n $flight_schedule_result[$flightDetails->flight_number]['frequency'] = $flightDetails->frequency;\n $flight_schedule_result[$flightDetails->flight_number]['flight_number'] = $flightDetails->flight_number;\n $flight_schedule_result[$flightDetails->flight_number]['source_destination_airport'] = $flightDetails->source_destination_airport;\n $flight_schedule_result[$flightDetails->flight_number]['eff_dt_from'] = $flightDetails->eff_dt_from;\n $flight_schedule_result[$flightDetails->flight_number]['eff_dt_till'] = $flightDetails->eff_dt_till;\n $flight_schedule_result[$flightDetails->flight_number]['sched_time'] = $flightDetails->sched_time;\n $flight_schedule_result[$flightDetails->flight_number]['airline_code'] = $flightDetails->airline_code;\n }\n return $flight_schedule_result;\n } \n }", "title": "" }, { "docid": "b1790eaa31705d9c9870badbc84dc3c8", "score": "0.48018363", "text": "public function getAirItinerary()\n {\n return $this->airItinerary;\n }", "title": "" }, { "docid": "ea5be777772e82df17a41d990e8abd66", "score": "0.47705534", "text": "public function plan()\n {\n $fromLocationId = $toLocationId = $timeMode = $at = $vehicleTypes = $walkSpeed = $maximumWalkingDistanceM = $serviceTypes = $fareTypes = null;\n extract($this->request->query);\n\n $passedArg = explode(\"/\", $this->passedArgs[0]);\n $fromLocationId = $passedArg[0];\n $toLocationId = $passedArg[1];\n\n $obj = $this->travel_api_client->plan($fromLocationId, $toLocationId, $timeMode, $at, $vehicleTypes, $walkSpeed, $maximumWalkingDistanceM, $serviceTypes, $fareTypes);\n\n $this->set('response', $obj);\n }", "title": "" }, { "docid": "4a7e0026ec313359cb4bdcc3a442dfa3", "score": "0.47633034", "text": "public function aaiGetAirlinesServedList($airport_code, $type = '') {\n $database = DB::dbInstance();\n\n $airport_code = strtoupper($airport_code);\n $flight_to = array();\n // get airports list for the airport, choose all airport codes from last 14 days\n // so we get all posible airport codes to which flights are available\n $tbl = 'aai_fids_data_log';\n $condition_flds = array(\n 'LOCAL_AIRPORT' => $airport_code,\n 'SCHED_DATE' => array(\"DATE_SUB(NOW(), INTERVAL 2 WEEK)\", '>=', 'where'),\n );\n\n $flds_to_select = array('SOURCE_DESTINATION', 'AIRLINE_CODE');\n $airports_rs = $database->dbConditionalSelect($tbl, $condition_flds, $flds_to_select);\n \n if (is_array($airports_rs)) {\n // get array holding all airport names\n $aai_airport_codes = unserialize(variable_get('airport_codes'));\n foreach ($airports_rs as $value) {\n $flight_num[] = $value['AIRLINE_CODE'];\n }\n }\n\n $flight_num = array_unique($flight_num);\n\n return $flight_num;\n }", "title": "" }, { "docid": "9b7f218ea8a6b77bb41c5e63b472c77a", "score": "0.47235405", "text": "public function getFlight($which) {\n $db = new DBAccess();\n $fleet = new Fleetdata();\n $origin;\n $dest;\n $plane;\n \n foreach($db->getAirports() as $airport){\n if($airport[\"id\"] === $this->flights[$which]->getOrigin()){\n $origin = $airport;\n } elseif($airport[\"id\"] === $this->flights[$which]->getDestination()){\n $dest = $airport;\n }\n }\n \n $plane = $fleet->getPlane($this->flights[$which]->getAirplane()); \n \n return array('deptPort'=>$origin[\"airport\"],\n 'deptCity'=>$origin[\"community\"],\n 'arrPort'=>$dest[\"airport\"],\n 'arrCity'=>$dest[\"community\"],\n 'deptTime'=>$this->flights[$which]->getDeparturetime(),\n 'arrTime'=>$this->flights[$which]->getArrivaltime(),\n 'airplane'=>$plane[\"model\"],\n 'deptId'=>$origin[\"id\"],\n 'arrId'=>$dest[\"id\"]);\n \n }", "title": "" }, { "docid": "ec3fc51408bb9f69ee0577f05d935c32", "score": "0.4712976", "text": "public function flightSelection($match_id, Request $request) {\n if(!$request->session()->has(\"cart_match\")){\n return redirect(url());\n }\n //dd($request->session()->get(\"cart_flight\"));\n $match = Match::findorFail($match_id);\n\n $airports = Airportlist::where(\"showinsearch\", \"=\",1)\n ->whereNotIn(\"id\", [$match->getStadium->nearest_airport])\n ->whereHas(\"flightFrom\", function ($q){\n $q->where(\"flightmode\", \"=\", 1);\n $q->where(\"departure_date\", \">=\", date(\"Y-m-d\"));\n })\n ->orWhereHas(\"flightTo\", function ($q){\n $q->where(\"flightmode\", \"=\", 2);\n $q->where(\"departure_date\", \">=\", date(\"Y-m-d\"));\n })\n ->orderby(\"title\", \"asc\")\n ->get();\n //dd($airports);\n $from_airport = \"\";\n $to_airport = $match->getStadium->nearest_airport;\n $from = $match->getStadium->getNearestAirport->flightTo(function ($q) {\n $q->where(\"departure_date\", \">=\", date(\"Y-m-d\"));\n\n })->first();\n $from_airport = $from->from;\n return view('voetbaltrips_frontend.flight', [\n \"match_id\" => $match_id,\n \"match\" => $match,\n \"airports\" => $airports,\n \"from_airport\" => $from_airport,\n \"to_airport\" => $to_airport\n ]);\n }", "title": "" }, { "docid": "c2a05cdfe0de4e08f62820b7b9ab0c7a", "score": "0.4679967", "text": "public function getSegmentArrivalAirportCode()\n {\n return $this->SegmentArrivalAirportCode;\n }", "title": "" }, { "docid": "d752e125d06b4b657686f9f9af9f9871", "score": "0.46700016", "text": "public function aaiGetFilghtDetail($airport_code, $condition = array(), $expand_airport_code = 0) {\n $database = DB::dbInstance();\n $airport_code = strtoupper($airport_code);\n $from_dt = $to_date = '';\n $tbl = variable_get('aai_fids_active_table');\n $expression = '';\n $con_flds = array();\n $fld_to_select = array();\n $limit = array();\n\n // add airport code condition\n // $con_flds['FIDS_DELETE_FLAG'] = 0;\n // check whether flight is arriving or departing\n $arr_dep = strtolower($condition['arrival_departure']);\n\n if ($arr_dep == 'departure') {\n $con_flds['LOCAL_AIRPORT'] = \"$airport_code\";\n $con_flds['ARRIVAL_DEPARTURE_FLAG'] = 2;\n \n } else {\n $con_flds['ARRIVAL_DEPARTURE_FLAG'] = 1;\n $con_flds['LOCAL_AIRPORT'] = \"$airport_code\";\n }\n\n foreach ($condition as $k => $v) {\n switch($k) {\n case 'arrival_departure':\n if (!empty($v) && !is_null($v)) {\n $v = strtolower($v);\n $fld_to_select = array(\n 'LOCAL_AIRPORT',\n 'ARRIVAL_DEPARTURE_FLAG',\n 'INTERNATIONAL_DOMESTIC_FLAG',\n 'AIRLINE_CODE',\n 'FLIGHT_NUMBER',\n 'SOURCE_DESTINATION',\n 'VIA',\n 'VIA1',\n 'SCHED_DATE',\n 'SCHED_TIME',\n 'EST_DATE',\n 'EST_TIME',\n 'ACT_DATE',\n 'ACT_TIME',\n 'FLIGHT_STATUS',\n 'TERMINAL',\n 'GATES',\n 'COUNTERS',\n 'BELT_NUMBER',\n 'dateval',\n ); \n }\n break;\n case 'flight_number':\n if (!empty($v) && !is_null($v)) {\n $v = strtoupper($v);\n\n // flight number condition is dependent on arrival/departure flight\n $con_flds['FLIGHT_NUMBER'] = \"$v\";\n }\n break;\n case 'flight_type':\n if (!empty($v) && !is_null($v)) {\n $v = strtoupper($v);\n\n // flight type condition is dependent on arrival/departure flight\n $arr_dep = strtolower($condition['arrival_departure']);\n $con_flds['ARRIVAL_DEPARTURE_FLAG'] = \"$v\";\n }\n break;\n case 'from_date':\n if (!empty($v) && !is_null($v)) {\n $from_dt = $v;\n }\n break;\n case 'ACT_TIME':\n /*if (!empty($v) && !is_null($v)) {\n $to_date = $v;\n }*/\n $v = strtoupper($v);\n break;\n case 'TERMINAL':\n /*if (!empty($v) && !is_null($v)) {\n $to_date = $v;\n }*/\n $v = strtoupper($v);\n break; \n case 'destination_airport_code':\n // get all flights where searched airport is part of travel route,\n // for flights departing from home airport\n $v = strtoupper($v);\n $con_flds['source_destination'] = array(\"$v\", 'LIKE', 'OR');\n break;\n case 'local_airport_code':\n // to search for flights arriving from a given airport to home airport\n $v = strtoupper($v);\n $con_flds['LOCAL_AIRPORT'] = $airport_code;\n break;\n case 'limit':\n if (!empty($v) && !is_null($v)) {\n $limit = array(0, $v);\n }\n break;\n }\n }\n \n // add query condition for date range\n if ($from_dt == '') { // || $to_date == '') {\n $arr_dep = strtolower($condition['arrival_departure']);\n $con_flds['ACT_DATE'] = array(\"DATE_SUB(NOW(), INTERVAL 48 HOUR)\", '>=', 'where');\n $con_flds['~!ACT_DATE'] = array(\"DATE_ADD(NOW(), INTERVAL 48 HOUR)\", '<=', 'where');\n } else {\n $search_date = $from_dt;\n $tmp = explode('-', $search_date);\n $tmp = mktime(0, 0, 0, $tmp[1], $tmp[2] + 1, $tmp[0]);\n $search_date2 = date('Y-m-d', $tmp);\n $arr_dep = strtolower($condition['arrival_departure']);\n $con_flds['ACT_DATE'] = array($search_date, '>=');\n $con_flds['~!ACT_DATE'] = array($search_date2, '<=');\n }\n\n // set order by clause\n $groupby = '';\n // set orderby clause\n $orderas = 'DESC';\n\n $arr_dep = strtolower($condition['arrival_departure']);\n $orderby = 'ACT_DATE';\n\n // execute query and get result\n $rs = $database->dbSelectWithExpression($tbl,$expression,$con_flds,$fld_to_select,$groupby,$orderby,$orderas,$limit); \n // check if airport code is to be replaced with airport name \n if ($expand_airport_code) {\n $code_key = '';\n $code_key = 'SOURCE_DESTINATION';\n\n $airport_names = '';\n $selected_codes = $rs[$code_key];\n if (strpos($selected_codes, ',') != FALSE) {\n $selected_codes = explode(',', $selected_codes);\n foreach ($selected_codes as $v) {\n if ($airport_names == '') {\n $airport_names = $this->aaiGetAirportNameFromCode($v);\n } else {\n $airport_names .= ', ' . $this->aaiGetAirportNameFromCode($v);\n }\n }\n } else {\n $airport_names = $this->aaiGetAirportNameFromCode($v);\n }\n\n $rs[$code_key] = $airport_names;\n }\n\n return $rs;\n }", "title": "" }, { "docid": "c32457d2ff79952ffdc42be33f526f72", "score": "0.4653606", "text": "protected function giveCity()\n\t{\n\t\treturn \"Tepeto\";\n\t}", "title": "" }, { "docid": "4787775c00082284d91e8a89ae92431a", "score": "0.4653302", "text": "public function fill_up() {\n // Stop the car by setting the current speed to 0\n $this->current_speed = 0;\n // Set the gas back to 100\n $this->gas = 100;\n\n $this->dashboard();\n }", "title": "" }, { "docid": "80b3370b996b15362f6047a506dd9c18", "score": "0.4652742", "text": "public function setSegmentDepartureAirportCode(string $value): self\n {\n $this->SegmentDepartureAirportCode = $value;\n\n return $this;\n }", "title": "" }, { "docid": "1aee69e36e103554c842889115d2ba42", "score": "0.4634831", "text": "public function __construct($departureTime, $origin, $dest, $seats, $car)\n {\n $this->_rideNO = $rideNO;\n $this->_depatureTime = $depatureTime;\n $this->_origin = $origin;\n $this->_dest = $dest;\n $this->_seats = $seats;\n $this->_car = $car;\n\n }", "title": "" }, { "docid": "107eb64ba9299c92c338409a28b34236", "score": "0.46296826", "text": "public function testRouteAirportToRelation()\n {\n $route = $this->getValidRoute();\n $route->airportTo()->dissociate();\n $this->assertEquals(0, $route->airportTo()->count());\n $this->assertFalse($route->save());\n\n $route->airport_to_id = 99999999;\n $this->assertFalse($route->save());\n\n $airportTo = factory(\\App\\Airport::class)->create();\n $route->airportTo()->associate($airportTo);\n $this->assertEquals(1, $route->airportTo()->count());\n $this->assertTrue($route->airportTo()->first()->is($airportTo));\n }", "title": "" }, { "docid": "dbef5455d12e29d9d788e0837e8cc53d", "score": "0.46272007", "text": "public function aaiGetFIDSTabs() {\n $in_or_out = arg(3);\n $airport_name = ucwords(arg(2));\n $airport_code = $this->aaiGetAirportTermDetails($airport_name, array('field_airport_code'));\n $airport_code = $airport_code['field_airport_code'];\n //$airport_code = 'TRV';\n $hidden_fld_acode = base64_encode($airport_code);\n\n $title = t(\"$airport_name Flights Detail\");\n\n $out .= \"<div id='tabs'>\n <ul>\n <li id = 'aai-depart-info'><a href='#departure-tab'>\" . t('Departure Flight') . \"</a></li>\n <li id = 'aai-arrival-info'><a href='#arrival-tab'>\" . t('Arrival Flight') . \"</a></li>\n <li id = 'aai-airline-info'><a href='#airline-info-tab'>\" . t('Airlines Information') . \"</a></li>\n </ul> \n <div id='departure-tab'>\n <div class='row'><div class='col-md-12'>\n <div class='col-md-3'> <label class = 'form-lable'>\" . t('Date') . \"</label>\n <input type = 'date' id = 'fids-from-date' value = \" . date(\"d-m-Y\") . \" />\n </div>\";\n $airports_served = $this->aaiGetAirportsServedList($airport_code, 'departure');\n if (count($airports_served)) { \n $out .= \"<div class='col-md-3'><label class = 'form-lable'>\" . t('Destination Airport') . \"</label>\";\n $out .= \"<select name='airports' id='fids-airport'>\";\n $out .= \"<option value=0>--\" . t('Please Select') . \"--</option>\";\n foreach ($airports_served as $a_code => $a_name) {\n $out .= \"<option value = $a_code>\" . t($a_code) . ' - ' . t($a_name) . \"</option>\";\n }\n $out .= \"</select></div>\";\n }\n $out .= \"<div class='col-md-3'><label class = 'form-lable'>\" . t('Flight No') . \".</label>\";\n $out .= \"<input type = 'text' id = 'fids-flight-no' placeholder='Flight No.' /></div>\";\n $out .= \"<div class='form-group '><input id = 'fids-search-btn' type = 'button' value = \" . t('Search') . \" onclick = 'javascript:get_fids_flight_details(\\\"departure\\\");'></div>\";\n $out .= \"<img id='aai-throbber' src='/sites/all/modules/custom/airports/img/throbber.gif' />\";\n $out .= \"</div></div><div class = 'fids-result-wrapper'>\n <div id='fids-data-count'></div>\n <div id='fids-data'></div>\n </div>\";\n $out .= \"</div>\n <div id='arrival-tab'>\n <div class='row'><div class='col-md-12'>\n <div class='col-md-3 '><label class = 'form-lable'>\" . t('Date') . \"</label>\n <input type = 'date' id = 'fids-from-date' value = \" . date(\"d-m-Y\") . \" /></div>\";\n\n $airports_served = $this->aaiGetAirportsServedList($airport_code, 'arrival');\n\n if (count($airports_served)) {\n $out .= \" <div class='col-md-3'><label class = 'form-lable'>\" . t('Source Airport') . \"</label>\";\n $out .= \"<select name='airports' id='fids-airport'>\";\n $out .= \"<option value=0>--\" . t('Please Select') . \"--</option>\";\n foreach ($airports_served as $a_code => $a_name) {\n $out .= \"<option value = $a_code>\" . t($a_code) . ' - ' . t($a_name) . \"</option>\";\n }\n $out .= \"</select></div> \";\n }\n $out .= \"<div class='col-md-3'><label class = 'form-lable'>\" . t('Flight No') . \".</label>\";\n $out .= \"<input type = 'text' id = 'fids-flight-no' placeholder='Flight No.'/></div> \";\n $out .= \" <div class='col-md-2'><input id = 'fids-search-btn1' type = 'button' value = \" . t('Search') . \" onclick = 'javascript:get_fids_flight_details(\\\"arrival\\\");'></div> \";\n $out .= \"<img id='aai-throbber' src='/sites/all/modules/custom/airports/img/throbber.gif' />\";\n $out .=\"</div></div>\";\n $out .= \"<div class = 'fids-result-wrapper1'>\n <div id='fids-data-count1'></div>\n <div id='fids-data1'></div>\n </div>\";\n $out .= \" </div>\n <div id='airline-info-tab'></div>\n </div><input type='hidden' id = 'fids-home-airport' value=$hidden_fld_acode />\";\n \n return \"<div class='page-title'>$title</div>\" . $out;\n }", "title": "" }, { "docid": "4e7641bef3fe274f2325dab3aa485181", "score": "0.46255738", "text": "private function createFlight($flight, $input)\n {\n\n $flight->setDepartureDate($input['departure_date']);\n $flight->setStatus($input['status']);\n if ($this->checkIfFieldExists($input, 'price')) {\n $flight->setAmount($input['price']);\n }\n\n if ($this->checkIfFieldExists($input, 'departure_time')) {\n\n $flight->setDepartureTime($input['departure_time']);\n $flight->setDepartureMinTime(null);\n $flight->setDepartureMaxTime(null);\n\n } else if ($this->checkIfFieldExists($input, 'departure_min_time') && $this->checkIfFieldExists($input, 'departure_max_time')) {\n\n $flight->setDepartureTime(null);\n $flight->setDepartureMinTime($input['departure_min_time']);\n $flight->setDepartureMaxTime($input['departure_max_time']);\n\n } else {\n return null;\n }\n\n //check if the plane was settled\n if ($this->checkIfFieldExists($input, 'plane_id')) {\n $planeService = $this->getService('Plane');\n $plane = $planeService->find($input['plane_id']);\n $flight->setPlane($plane);\n }\n\n //assign the origin and destination place\n $placeService = $this->getService('Place');\n $origin = $placeService->find($input['origin']);\n $destination = $placeService->find($input['destination']);\n $flight->setOrigin($origin);\n $flight->setDestination($destination);\n\n //set the current user (fetched with the token request)\n $user = $this->getCurrentUser();\n $flight->setUser($user);\n\n return $flight;\n }", "title": "" }, { "docid": "2d4e279277bac0645122f91c42363131", "score": "0.46202737", "text": "public function aaiGetAirportList($term_id, $term_details = array()) {\n $database = DB::dbInstance();\n $tbl3 = 'field_data_field_region';\n $condition_flds3 = array('field_region_tid' => $term_id,\n 'bundle' => 'auto_created_voc9_635',\n );\n $flds_to_select3 = array('entity_id');\n $rows = $database->dbConditionalSelect($tbl3, $condition_flds3, $flds_to_select3);\n foreach($rows as $value){\n $airports_list[] = $value['entity_id'];\n } \n return $airports_list;\n }", "title": "" }, { "docid": "2831cfe2883efc812123946fdc64559b", "score": "0.46017194", "text": "public function addAirway(Airway $air)\n {\n $this->airways->add($air);\n $air->patient = $this;\n $air->run = $this->run->id;\n $air->shift = $this->shift->id;\n $air->student = $this->student->id;\n $air->subject = $this->subject->id;\n }", "title": "" }, { "docid": "490e5e185efe5c046b0f1b9fa4a5ec0c", "score": "0.45956814", "text": "public function airlines()\n {\n return $this->hasMany('App\\AirportAirline', 'airport_id');\n }", "title": "" }, { "docid": "fefb9fa6734e632d8fe0b41394d99333", "score": "0.45863482", "text": "public function fillWithGas();", "title": "" }, { "docid": "cf48797773faab5a6632f9d5ecb48c01", "score": "0.45777872", "text": "public function getSegmentDepartureAirportCode()\n {\n return $this->SegmentDepartureAirportCode;\n }", "title": "" }, { "docid": "ad7864b5ac56a3fff02f80069c468620", "score": "0.45723787", "text": "public function showRapportInter()\n {\n\n }", "title": "" }, { "docid": "fff101c3832274e3140446a6cddc5374", "score": "0.45673823", "text": "function cdrcost_destinations() {\n\treturn null;\n}", "title": "" }, { "docid": "b53e0d2d84095c1fbd0ed509329d888c", "score": "0.4557759", "text": "public function aaiGetAirportMenu() {\n $arg_0 = arg(0);\n $airport_name = arg(2);\n\n $arg_2 = arg(1);\n \n if(empty(arg(2))) {\n $airport_name = arg(1);\n }\n\n // set active class for menu\n $active_home = $active_flights = $active_pas_info = $active_transport = \n $active_city_info = $active_fact_sheet = $active_sec_info = '';\n\n // menu icon default class\n $menu_class_default = 'air-menu';\n\n // check for active menu\n switch($arg_2) {\n case $airport_name :\n $active_home = 'active';\n break;\n case 'flights' :\n $active_flights = 'active';\n break;\n case 'passenger-info' :\n $active_pas_info = 'active';\n break;\n case 'transport' :\n $active_transport = 'active';\n break;\n case 'city-info' :\n $active_city_info = 'active';\n break;\n case 'fact-sheet' :\n $active_fact_sheet = 'active';\n break;\n case 'security-info' :\n $active_sec_info = 'active';\n break;\n default :\n $active_home = 'active';\n }\n\n // formulate menu links array \n $menu_links = array();\n $menu_links['home'] = array('Home', 'air_home', \"$arg_0/$airport_name\");\n $menu_links['flights'] = array('Flights', 'air_plane', \"$arg_0/flights/$airport_name\");\n $menu_links['pas_info'] = array('Passenger Information', 'air_passenger', \"$arg_0/passenger-info/$airport_name\");\n $menu_links['transport'] = array('Transport', 'air_transport', \"$arg_0/transport/$airport_name\");\n $menu_links['city_info'] = array('City Information', 'air_citiinfo', \"$arg_0/city-info/$airport_name\");\n $menu_links['fact_sheet'] = array('Fact Sheet', 'air_factsheet', \"$arg_0/fact-sheet/$airport_name\");\n $menu_links['sec_info'] = array('Security Information', 'air_security', \"$arg_0/security-info/$airport_name\");\n\n // loop through links to build menu items\n $menu = \"<ul class = 'menu'>\";\n foreach ($menu_links as $k => $v) {\n $menu_active = ${'active_' . $k};\n\n $menu_label = $v[0];\n $menu_icon = $v[1];\n $menu_lnk = $v[2];\n\n $menu .= \"<li class = '$menu_active'>\";\n $menu .= \"<i class='$menu_class_default $menu_icon'></i>\";\n $menu .= l(t(\"$menu_label\"), $menu_lnk);\n $menu .= \"</li>\";\n unset($menu_lnk);\n unset($menu_label);\n unset($menu_icon);\n }\n $menu .= \"</ul>\";\n return $menu;\n }", "title": "" }, { "docid": "dfdae7f8f6ebaee30327defb0f71e71a", "score": "0.45577502", "text": "public function aaiAirportDetails($from_menu = 1, $request = array()) {\n $lang = $this->aaiCurrentLang();\n $details_exist = 0;\n\n // get arguments and structure output accordingly\n if ($from_menu) {\n $content_type = arg(1);\n $airport_name = arg(2);\n $airport_tid = 0;\n\n // bundle to check for airport detail\n $airport_bundle = array(\n 'transport' => 'airport_transportation',\n 'city-info' => 'airport_city_information',\n 'passenger-info' => 'airport_passenger_information_fa',\n );\n\n // check if airport details exist/added\n $bundle = $airport_bundle[$content_type];\n $details_exist = $this->aaiAirportExists($airport_name, $bundle);\n\n if (count($details_exist)) {\n if ($details_exist['language'] != $lang) {\n $lang = $details_exist['language'];\n $_SESSION['airport_lang'] = $lang;\n } else {\n unset($_SESSION['airport_lang']);\n }\n\n $details_exist = $details_exist['entity_id'];\n\n // get airport tid\n $airport_tid = $this->aaiGetTermID(ucwords($airport_name), 'Airport');\n\n //get vocab name and first item in term list\n switch (strtolower($content_type)) {\n case 'transport' :\n $vocab_name = 'Airport Transports';\n $vid_ary = $this->aaiGetVocabDetailByName($vocab_name, array('vid'));\n $vid = $vid_ary['vid'];\n // details to check if what all terms data is available\n $fc_fld = 'field_transportation';\n $term_fld = 'field_transportation_type';\n break;\n case 'city-info' :\n $vocab_name = 'Airport City Information';\n $vid_ary = $this->aaiGetVocabDetailByName($vocab_name, array('vid'));\n $vid = $vid_ary['vid'];\n // details to check if what all terms data is available\n $fc_fld = 'field_city_info';\n $term_fld = 'field_city_info_type';\n break;\n case 'passenger-info' :\n $vocab_name = 'Airport Passenger Info';\n $vid_ary = $this->aaiGetVocabDetailByName($vocab_name, array('vid'));\n $vid = $vid_ary['vid'];\n // details to check if what all terms data is available\n $fc_fld = 'field_passenger_info';\n $term_fld = 'field_passenger_info_type';\n break;\n }\n\n // get all terms for which data is available\n $frst_term_name = $frst_term_tid = '';\n $all_terms_ary = taxonomy_get_tree($vid);\n $allowed_terms_tid = array();\n\n $data_for_terms = $this->aaiGetTermsForWhichDataIsAvailable($details_exist, $fc_fld, $term_fld, $lang);\n\n // check if any data is added, if yes then get terms to be shown on\n // left sub menu\n if (count($data_for_terms)) {\n foreach ($data_for_terms as $val) {\n foreach ($all_terms_ary as $index => $v) {\n if ($v->tid == $val) {\n $parent_exists = $v->parents[0];\n if ($parent_exists) {\n $allowed_terms_tid[$index] = $parent_exists;\n } else {\n $allowed_terms_tid[$index] = $val;\n }\n break;\n }\n }\n }\n // sort the array on key\n ksort($allowed_terms_tid);\n $tmp_ary = array_values($allowed_terms_tid);\n $frst_term_tid = $tmp_ary[0];\n }\n\n $tab_tid = $frst_term_tid;\n $tab_vocab = strtolower(str_replace(' ', '-', $vocab_name));\n }\n } else { // if its ajax call\n $content_type = $request['type'];\n $airport_name = $request['airport'];\n $airport_tid = $this->aaiGetTermID(ucwords($airport_name), 'Airport');\n $tab_term_name = $request['tt'];\n $tab_vocab = $request['vocab'];\n $vocab_name = ucwords(str_replace('-', ' ', $tab_vocab));\n // get vid\n $vid_ary = $this->aaiGetVocabDetailByName($vocab_name, array('vid'));\n $vid = $vid_ary['vid'];\n\n // get the tab term id\n $tab_vocab_mac_name = strtolower(str_replace('-', '_', $tab_vocab));\n $tab_vocab_ary = $this->aaiGetTermIdFromName(ucwords($tab_term_name), $tab_vocab_mac_name);\n $tab_tid = $tab_vocab_ary[0];\n\n // in case of internal redirection, its clear that airport details will be\n // available\n $details_exist = 1;\n // set lang variable, according to the language for which\n // content is available\n if (isset($_SESSION['airport_lang'])) {\n $lang = $_SESSION['airport_lang'];\n }\n }\n\n // If no detail found for the airport, redirect user to page-not-found\n if (!$details_exist) {\n $tmp = ucwords($airport_name);\n drupal_set_message( t('Data not available for @airport airport.', array('@airport' => $tmp)) );\n unset($tmp);\n drupal_goto('page-not-found');\n exit;\n }\n\n // get airport section details\n //$airport_details = $this->aaiGetAirportTabDetail($content_type, $airport_tid, $tab_tid, $lang);\n\n // THEME THE OUTPUT\n $inner_detail = \"\";\n if (count($airport_details)) {\n foreach ($airport_details as $ary) {\n $inner_detail .= \"<div class = 'aai-airport-detail-row col-md-12'>\";\n // array variable to get field values, so it can be rearranged\n $data_row = array();\n $data_row[] = '';\n\n foreach ($ary as $col_fld => $v) {\n if (strpos($col_fld, '_type')) {\n /*$type = taxonomy_term_load($v);\n $type = t($type->name);\n $data_row['type'] = \"<div class = 'aai-facility-type col-md-9'>\" . $type . \"</div>\";*/\n } else if (strpos($col_fld, '_title')) {\n $data_row['title'] = \"<div class = 'aai-facility-type title'>\" . t($v) . \"</div>\";\n } else if (strpos($col_fld, '_image')) {\n $img_uri = $v;\n $config = array(\n \"style_name\" => \"medium\",\n \"path\" => $img_uri,\n \"height\" => NULL,\n \"width\" => NULL,\n );\n $img = theme_image_style($config);\n $data_row['img'] = \"<div class = 'aai-facility-img col-md-3'>\" . $img . \"</div>\";\n } else {\n $data_row[] = \"<div class = 'aai-facility-desc col-md-9'>\" . t($v) . \"</div>\";\n }\n }\n\n // set the records in order/chronology for display\n if (isset($data_row['title'])) {\n $inner_detail .= $data_row['title'];\n }\n if (isset($data_row['img'])) {\n $inner_detail .= $data_row['img'];\n }\n foreach ($data_row as $ky => $vl) {\n if ($ky != 'title' && $ky != 'img' && $ky !== 0) {\n $inner_detail .= $vl;\n }\n }\n unset($data_row);\n\n $inner_detail .= \"</div>\";\n }\n }\n\n if (!$from_menu) {\n return $inner_detail;\n }\n\n // build left sub-menu\n $sub_menu = \"\";\n $taxonomy_tree = taxonomy_get_tree($vid);\n if (count($taxonomy_tree)) {\n $sub_menu .= \"<div class = 'aai-submenu-wrapper'>\";\n $sub_menu .= \"<ul>\";\n $first_item = 1;\n\n foreach ($taxonomy_tree as $indx => $value) {\n $parent_exists = $value->parents[0];\n if (!$parent_exists) {\n // check if term exists in list of terms for which data is\n // available in DB.\n $term_id = $value->tid;\n if (array_search($term_id, $allowed_terms_tid) !== FALSE) {\n $name = t($value->name);\n if ($first_item) {\n $sub_menu .= \"<li class = 'active'>\";\n $first_item = 0;\n } else {\n $sub_menu .= \"<li class = >\";\n }\n\n $sub_menu .= \"<a onclick = \\\"javascript:aai_get_tab_detail(this, '$airport_name', '$content_type', '$tab_vocab', '$name');\\\">$name</a>\";\n $sub_menu .= \"</li>\";\n }\n }\n }\n $sub_menu .= \"</ul></div>\";\n }\n\n // club the entities to formulate output\n $output = \"<div class = 'aai-section-detail-wrapper'>\";\n $output .= \"<div class = 'aai-submenu-main-container col-md-3'>\";\n $output .= $sub_menu;\n $output .= \"</div>\";\n $output .= \"<div class = 'aai-section-details col-md-9'>\";\n $output .= $inner_detail;\n $output .= \"</div>\";\n $output .= \"</div>\";\n\n return $output;\n }", "title": "" }, { "docid": "928b2dc614f1e564ebd8c8385976cc05", "score": "0.45407653", "text": "function destination($lat,$lon, $bearing, $distance,$units=\"mi\") {\n\t $radius = strcasecmp($units, \"km\") ? 3963.19 : 6378.137;\n\t $rLat = deg2rad($lat);\n\t $rLon = deg2rad($lon);\n\t $rBearing = deg2rad($bearing);\n\t $rAngDist = $distance / $radius;\n\n\t $rLatB = asin(sin($rLat) * cos($rAngDist) + \n\t cos($rLat) * sin($rAngDist) * cos($rBearing));\n\n\t $rLonB = $rLon + atan2(sin($rBearing) * sin($rAngDist) * cos($rLat), \n\t cos($rAngDist) - sin($rLat) * sin($rLatB));\n\n\t return array(\"lat\" => rad2deg($rLatB), \"lon\" => rad2deg($rLonB));\n\t}", "title": "" }, { "docid": "835b4455496ab6de0d468e585f87e897", "score": "0.45342976", "text": "public function airplane($airplane=''){\n\t\t$response = file_get_contents('https://wacky.jlparry.com/info/airplane/'.$airplane);\n $data = [];\n\t\t$data = json_decode($response, true);\n\n return $data;\n }", "title": "" }, { "docid": "76c040a1a9eac084e99778b06656f6fc", "score": "0.45331877", "text": "public function setSegmentDepartureAirportName($value): self\n {\n $this->SegmentDepartureAirportName = $value;\n\n return $this;\n }", "title": "" }, { "docid": "97c9e0a846c1b774054cd04a41cb8afa", "score": "0.45330256", "text": "public function __construct(Airplane $airplane, Airport $fromAirport, Airport $toAirport, array $fields)\n {\n $this->airplane = $airplane;\n $this->fromAirport = $fromAirport;\n $this->toAirport = $toAirport;\n $this->fields = $fields;\n }", "title": "" }, { "docid": "ea9fb72036d052d28c0178cfb4aee686", "score": "0.45280242", "text": "public function imprimeDestino()\n {\n printf('El destino del pasajero %d es (%d, %d)<br />', $this->id, $this->x, $this->y);\n }", "title": "" }, { "docid": "793c16df5a5a2d2e3234e4771b7267ce", "score": "0.45259616", "text": "public function getTravelAirCostsAttribute()\n {\n return $this->program->travel_air_costs;\n }", "title": "" }, { "docid": "7124c3b52d3f6bd96a4cda6bbaaf29ea", "score": "0.45166764", "text": "function checkFlatTripnew($Source_point_Address, $Destination_point_Address,$iVehicleTypeId) {\n\tglobal $generalobj,$obj;\n\t$returnArr = array();\n \n $returnArr['eFlatTrip']=\"No\";\n\t$returnArr['Flatfare']=0;\n\treturn $returnArr;\n}", "title": "" }, { "docid": "efd0b326acb537d74cbf0aac1d342324", "score": "0.45057026", "text": "public function setSegmentArrivalAirportCode(string $value): self\n {\n $this->SegmentArrivalAirportCode = $value;\n\n return $this;\n }", "title": "" }, { "docid": "75760a448ca6b468ce1bd8fbd7b90520", "score": "0.44925988", "text": "public function airtable()\n {\n\n PoliticianOrganization::truncate();\n $airtable = new Airtable(array(\n 'api_key' => 'keyIvQZcMYmjNbtUO',\n 'base' => 'appkzwotOzqU65CKW',\n ));\n\n $request = $airtable->getContent( 'Organizations' );\n\n do {\n\n\n $response = $request->getResponse();\n\n $airtable_response = json_decode( $response, TRUE );\n\n foreach ( $airtable_response['records'] as $record ) {\n\n $organization = new PoliticianOrganization();\n $organization->recordid = $record[ 'id' ];\n\n $organization->organization = isset($record['fields']['Organization'])?$record['fields']['Organization']:null;\n $organization->organizationid = isset($record['fields']['Organization ID'])?$record['fields']['Organization ID']:null;\n $organization->type = isset($record['fields']['Type'])?$record['fields']['Type']:null;\n $organization->tags = isset($record['fields']['Tags'])? implode(\",\", $record['fields']['Tags']):null; \n $organization->email = isset($record['fields']['Email'])?$record['fields']['Email']:null;\n\n $organization->twitter = isset($record['fields']['Twitter'])?$record['fields']['Twitter']:null;\n $organization->website = isset($record['fields']['Website'])?$record['fields']['Website']:null;\n $organization->facebook = isset($record['fields']['Facebook'])?$record['fields']['Facebook']:null;\n $organization->phone = isset($record['fields']['Phone'])?$record['fields']['Phone']:null;\n\n $organization->address = isset($record['fields']['Address'])?$record['fields']['Address']:null;\n $organization->endorsement_log = isset($record['fields']['Endorsement Log'])? implode(\",\", $record['fields']['Endorsement Log']):null; \n\n $organization->description = isset($record['fields']['Description'])?$record['fields']['Description']:null; \n $organization->notes = isset($record['fields']['Notes'])?$record['fields']['Notes']:null;\n $organization ->save();\n }\n \n }\n while( $request = $response->next() );\n\n $date = date(\"Y/m/d H:i:s\");\n $airtable = Airtable_politicians::where('table_name', '=', 'Politician_organizations')->first();\n $airtable->total_records = PoliticianOrganization::count();\n $airtable->last_synced = $date;\n $airtable->save();\n }", "title": "" }, { "docid": "92c8c9a5799e66a6658ae25d8a27c6c3", "score": "0.44922686", "text": "private function setAirpassToEmail($results) {\n \tforeach($results as $key => $val) {\n \t\tif($val['type'] === 'Airpass')\n \t\t\t$val['type'] = 'Email';\n\t\t}\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "ba28deea7861a59c52747d340b8c7327", "score": "0.44870633", "text": "public function allow_air() {\n\t\treturn $this->air == self::YN_TRUE;\n\t}", "title": "" }, { "docid": "a0fcaa30885e13d11d27f66a076e94c2", "score": "0.44789845", "text": "public function waterSupplyOther(){\n //It will apply the query into the database and return the data\n $var = \"Domicilios_Particulares_Permanentes.Por_Abastecimento_de_Agua.Outra_Forma.Total\";\n $cityOther = new CitiesController();\n $otherSupply = $cityOther->selectData(array(\n $var => true,\n 'Municipio' => true,\n \"_id\" => false));\n\n //Make other water supply's average and z-values\n $zTransform = new ZtransformController();\n $otherSupplyAvg = array();\n for($i = 0; $i < sizeof($otherSupply); $i++){\n //Select data of each city\n $otherSupplyValues = $otherSupply[$i][\"Domicilios_Particulares_Permanentes\"][\"Por_Abastecimento_de_Agua\"][\"Outra_Forma\"][\"Total\"];\n //Make the average and save it in an array\n $otherSupplyAvg = array_merge($otherSupplyAvg, array($otherSupply[$i][\"Municipio\"] => $zTransform->calculateAverage($otherSupplyValues,sizeof($otherSupply))));\n }\n //Calculate and return Z-values\n return $zTransform->zTransformation($otherSupplyAvg);\n }", "title": "" }, { "docid": "878c08226562ce0fcc7190ad23656cb7", "score": "0.44776145", "text": "private function createMetar($airport, $parser)\n {\n if(! preg_match('/No METAR available/', $this->curl->response)) {\n $metar = new \\Metar();\n $metar->facility = $airport;\n $metar->raw = trim($this->curl->response);\n $metar->time = (int) $parser->getZuluTime();\n $metar->wind_direction = $parser->getWindDirection();\n $metar->wind_speed = $parser->getWindSpeed();\n $metar->wind_gusts = $parser->getWindGusts();\n $metar->visibility = $parser->getVisibility();\n $metar->sky = json_encode($parser->getCloudCover());\n $metar->temp = $parser->getTemperature();\n $metar->dewpoint = $parser->getDewpoint();\n $metar->altimeter = $parser->getQNH();\n if($metar->save()) {\n echo \"$airport saved!\\n\";\n } else {\n die($metar->getErrors());\n }\n }\n }", "title": "" }, { "docid": "60214589ece979a9ead83efb4d3c7641", "score": "0.44771728", "text": "public function setGeoTargetAirport($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\StringValue::class);\n $this->geo_target_airport = $var;\n\n return $this;\n }", "title": "" }, { "docid": "daada071fce38d6fc639ea02b1ebfddc", "score": "0.44761577", "text": "public function icao_from(string $icao)\n {\n return $this->airport('icao', $icao, 'departure');\n }", "title": "" }, { "docid": "ab022f6853cb12c991ddf6b8da945b7f", "score": "0.44579738", "text": "public function get_dairy_farm_info() {\n\t\t\t$area_id = $this->input->post('area_id');\n\t\t\t$zone_id = $this->input->post('zone_id');\n\t\t\t\n\t\t\tif($this->create_buildings_model->is_owner_of_area($area_id) == 1) {\n\t\t\t\t/*-------------------------- \n\t\t\t\t\tEXPENSES AND PROFITS \n\t\t\t\t----------------------------*/\n\t\t\t\t\n\t\t\t\t/* GETS expenses and profits on the area */\n\t\t\t\t$sum_expenses = $this->Restaurant_model->money_spent_on_area($area_id);\n\t\t\t\t$sum_profits = $this->Restaurant_model->profits_on_area($area_id);\t\t\n\t\t\t\t/* NUMBER FROMATING */\n\t\t\t\t$expenses = number_format($sum_expenses, 0, '.', ' ');\n\t\t\t\t$profits = number_format($sum_profits, 0, '.', ' ');\n\t\t\t\t$pechalba = number_format($sum_profits-$sum_expenses, 0, '.', ' ');\n\t\t\t\t\n\t\t\t\t/*************************** \n\t\t\t\tEND OF profits and expenses\n\t\t\t\t***************************/\n\t\t\t\t\n\t\t\t\t/*-- SQLq --*/\n\t\t\t\t$this->db->select(\"*\");\n\t\t\t\t$this->db->from('farming_dairy_farm');\n\t\t\t\t$this->db->join('area_owners', 'area_owners.ao_area_id=farming_dairy_farm.df_area_id');\n\t\t\t\t$this->db->where(\"df_user_id = $this->user_id AND df_area_id = $area_id\");\n\t\t\t\t\n\t\t\t\t$q_get_df = $this->db->get();\n\t\t\t\t$row_df = $q_get_df->row_array();\n\t\t\t\t/** END OF SQLq **/\n\t\t\t\t\n\t\t\t\t/*--- MILK PRODUCTION ---*/\n\t\t\t\t$row_df['is_finished'] = 0;\n\t\t\t\t$row_df['dfd_milk_producing'] = 0;\n\t\t\t\t$q_milk_production = $this->db->get_where('farming_df_milk', array('dfd_milk_user_id' => $this->user_id, 'dfd_milk_area_id' => $area_id));\n\t\t\t\tif($q_milk_production->num_rows() >= 1) {\n\t\t\t\t\t$now \t\t\t= date(time()); \n\t\t\t\t\t$row_milk = $q_milk_production->row_array();\n\t\t\t\t\tif($now > $row_milk['dfd_milk_date_end']) { // has finished\n\t\t\t\t\t\t$row_df['milk_production'] = 0;\n\t\t\t\t\t\tif($row_milk['dfd_milk_producing'] == 1) {\n\t\t\t\t\t\t\t$row_df['is_finished'] = 1;\n\t\t\t\t\t\t\t$row_df['dfd_milk_producing'] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$row_df['milk_production'] \t= 1;\n\t\t\t\t\t\t$row_df['milk_prod_finish'] = date( \"H:i:s\", $row_milk['dfd_milk_date_end']);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$row_df['milk_production'] = 0;\n\t\t\t\t}\n\t\t\t\t/*--- END OF MILK PRODUCTON ---*/\n\t\t\t\n\t\t\t\t/*---------------------------------------------------------------------- \n\t\t\t\t\tCALCULATING THE CAPACITY OF HOW MANY COWS CAN LIVE IN THE DAIRY FARM \n\t\t\t\t----------------------------------------------------------------------*/\n\t\t\t\t$row_df['cow_capacity'] = round($row_df['df_space_builded']/15);\n\t\t\t\t\n\t\t\t\t$row_df['money_spent'] = $expenses;\n\t\t\t\t$row_df['money_earned'] = $profits;\n\t\t\t\t$row_df['pechalba'] = $pechalba;\n\t\t\t\t\n\t\t\t\treturn $row_df;\n\t\t\t} else {\n\t\t\t\texit();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "28b9206e6e446bfcd105cc611346702f", "score": "0.44551256", "text": "public function aaiAirportExists($airport_name, $bundle = 'airports') {\n $lang = $this->aaiCurrentLang();\n\n // get database class instance\n $database = DB::dbInstance();\n\n // get airport Term ID\n $vocab_det = array('vid', 'machine_name');\n $airport_vocab_det_ary = $this->aaiGetVocabDetailByName('Airport', $vocab_det);\n $airport_vocab_mac_name = $airport_vocab_det_ary['machine_name'];\n $airport_tid_ary = $this->aaiGetTermIdFromName($airport_name, $airport_vocab_mac_name);\n $airport_tid = $airport_tid_ary[0];\n\n // check if node/data exists for current airport.\n $tbl = 'field_data_field_related_airport';\n $conditions = array('entity_type' => 'node',\n 'bundle' => $bundle,\n 'deleted' => 0,\n 'field_related_airport_tid' => $airport_tid,\n 'language' => $lang,\n );\n $fld_name = array('entity_id', 'language');\n $details_exist = $database->dbConditionalSelect($tbl, $conditions, $fld_name);\n\n $res = array();\n if (count($details_exist)) {\n $res['entity_id'] = $details_exist[0]['entity_id'];\n $res['language'] = $details_exist[0]['language'];\n } else if ($lang != 'en') {\n $conditions['language'] = 'en';\n $details_exist = $database->dbConditionalSelect($tbl, $conditions, $fld_name);\n if (count($details_exist)) {\n $res['entity_id'] = $details_exist[0]['entity_id'];\n $res['language'] = $details_exist[0]['language'];\n }\n }\n\n return $res;\n }", "title": "" }, { "docid": "ab6405819168f58b64206df55f355887", "score": "0.44545162", "text": "public function testSetArrivalLocation()\n {\n\n $location = $lg = \"\";\n $retVal = $this->boardingCard->setArrivalLocation($location,$lg);\n $this->assertEquals(1,$retVal,\"Test for invalid location and language\");\n\n $location = \"\";\n $lg = \"en\";\n $retVal = $this->boardingCard->setArrivalLocation($location,$lg);\n $this->assertEquals(2,$retVal,\"Test for invalid location and valid language\");\n\n\n $location = \"dubai\";\n $lg = \"en\";\n $retVal = $this->boardingCard->setArrivalLocation($location,$lg);\n $this->assertEquals(0,$retVal,\"Test for valid location and valid language\");\n\n }", "title": "" }, { "docid": "e6076d168ac61ebaabaef44883530a61", "score": "0.44522637", "text": "public function getSegmentArrivalAirportName()\n {\n return $this->SegmentArrivalAirportName;\n }", "title": "" }, { "docid": "061d99058b4083a9070030359e6f0b23", "score": "0.44401857", "text": "public function getTransferAirportListing($airportObj)\n {\n $this->requestBody = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'\n .'<CityDiscovery ProcessType=\"Airports\">'\n .'<POS>'\n .'<Source AgentSine=\"'.$this->HTTP_USERNAME.'\" AgentDutyCode=\"'.$this->HTTP_PASSWORD.'\">'\n .'</Source>'\n .'</POS>'\n .'<TransferCity>'.$airportObj->getCity()->getName().'</TransferCity>'\n .'<TransferCountry>'.$airportObj->getCountry()->getCode().'</TransferCountry>'\n .'</CityDiscovery>';\n\n $arr = $this->cityDiscoveryNormalizer->getDesiredXmlArray('getTransferAirportListing');\n $arr['useTransfersUrl'] = true;\n\n $result = $this->getXmlResponse($this->requestBody, $arr);\n return $result;\n }", "title": "" }, { "docid": "c126989f6ea7c99d817b9fbe26afc588", "score": "0.4439649", "text": "protected function setDestination() {\n switch ($this->_project->entity_table) {\n case 'civicrm_event':\n $path = 'civicrm/event/info';\n $query = \"reset=1&id={$this->_project->entity_id}\";\n break;\n }\n\n $this->_destination = CRM_Utils_System::url($path, $query);\n }", "title": "" }, { "docid": "d32ff2ae491aa91b81af3f34e4bc665e", "score": "0.44344375", "text": "abstract public function city();", "title": "" }, { "docid": "5767016456e532e1243dba08ec4dba31", "score": "0.44290808", "text": "public function airlines($airline=''){\n\t\t$response = file_get_contents('https://wacky.jlparry.com/info/airlines/'.$airline);\n $data = [];\n\t\t$data = json_decode($response, true);\n\n return $data;\n }", "title": "" }, { "docid": "ee3049436ea860ecf7e4e08e18bc7927", "score": "0.44252008", "text": "protected function makeTeam()\n {\n $fullSchedule = $this->full();\n $teamSchedule = [];\n foreach($fullSchedule as $round => $matchups) {\n foreach($matchups as $matchup) {\n $team1 = $matchup[0];\n $team2 = $matchup[1];\n $teamSchedule[$team1][$round] = ['team' => $team2, 'home' => false];\n $teamSchedule[$team2][$round] = ['team' => $team1, 'home' => true];\n }\n }\n $this->team = $teamSchedule;\n }", "title": "" }, { "docid": "e2c3c4ede58e92cc1d565eb7ea0b1e86", "score": "0.44247422", "text": "public function testFilterByAirline()\n {\n $data = (object) [\n 'callsign' => 'BAW2566',\n ];\n\n $this->dataFilter->icao = 'BAW';\n $this->assertTrue($this->dataFilter->filterByAirline($data));\n\n $this->dataFilter->icao = 'DAH';\n $this->assertFalse($this->dataFilter->filterByAirline($data));\n }", "title": "" }, { "docid": "265b8125998c78a2fc6351a91cbac2e6", "score": "0.44222304", "text": "public function getArstcity()\n {\n return $this->arstcity;\n }", "title": "" }, { "docid": "aafb719ea70e0bdd6d7ba901ae4c93f2", "score": "0.44167548", "text": "function get_airport_code_list_for_voice_speach($term) {\r\n \r\n // $term = $this->input->get('term'); //retrieve the search term that autocomplete sends\r\n $term = trim(strip_tags($term));\r\n \r\n $result = array();\r\n\r\n $__airports = $this->flight_model->get_airport_list($term)->result();\r\n $airports = array();\r\n foreach ($__airports as $airport) {\r\n $airports['label'] = $airport->airport_city . ', ' . $airport->country . ' (' . $airport->airport_code . ')';\r\n $airports['value'] = $airport->airport_city . ' (' . $airport->airport_code . ')';\r\n $airports['id'] = $airport->origin;\r\n if (empty($airport->top_destination) == false) {\r\n $airports['category'] = 'Top cities';\r\n $airports['type'] = 'Top cities';\r\n } else {\r\n $airports['category'] = 'Search Results';\r\n $airports['type'] = 'Search Results';\r\n }\r\n\r\n array_push($result, $airports);\r\n }\r\n \r\n echo $result[0]['value'].'|'.$result[0]['id'];\r\n \r\n }", "title": "" }, { "docid": "3a7447477c42eb02e5d05dbc6967a900", "score": "0.44036552", "text": "public function setSegmentArrivalAirportName($value): self\n {\n $this->SegmentArrivalAirportName = $value;\n\n return $this;\n }", "title": "" }, { "docid": "f45210e77290d7eb5ef829020651aead", "score": "0.4392709", "text": "public function giveRide($newDepature, $newOrigin, $newDest, $newSeats, $newCar)\n {\n ++$this->_rideNO;\n $this->_depatureTime = $newDepature;\n $this->_origin = $newOrigin;\n $this->_dest = $newDest;\n $this->_seats = $newSeats;\n $this->_car = $newCar;\n }", "title": "" }, { "docid": "efe8d016f908f7279089be0e8883cfce", "score": "0.4392266", "text": "public function createOutMoveTransitionSchedule() {\n\n $move_len = count($this->transition_out_schedule);\n for ($i = 0; $i < $move_len-1; $i++) {\n $feedrate = $this->transition_out_schedule[$i]['feedrate']; // Use the END feedrate\n $s_travel = $this->transition_out_schedule[$i+1]['s_angle'] - $this->transition_out_schedule[$i]['s_angle']; // Use the difference in angle\n $z_angle = ($this->transition_out_schedule[$i]['z_angle'] + $this->transition_out_schedule[$i+1]['z_angle'])/2; // Use the START z_angle\n \n $cf_angle = $this->transition_out_schedule[$i]['cf_angle']; // USe the START cf_angle\n \n $this->transition_out_move[$i]['feedrate'] = $feedrate;\n $this->transition_out_move[$i]['s_travel'] = $s_travel;\n $this->transition_out_move[$i]['z_angle'] = $z_angle * $this->fudge_factor;\n $this->transition_out_move[$i]['cf_angle'] = $cf_angle;\n $this->transition_out_move[$i]['x_travel'] = 0;\n } \n\n }", "title": "" }, { "docid": "d21ce4da3257f67eb4879b8089e0b185", "score": "0.43894342", "text": "public function airportArrival(): BelongsTo {\n return $this->belongsTo(Airport::class, 'arriv_id');\n }", "title": "" }, { "docid": "6220573de7f3e905515b6b5a6606f4f2", "score": "0.43725684", "text": "public function getDestination();", "title": "" }, { "docid": "c40893f1199ed2c485b3346b62682a82", "score": "0.43700927", "text": "public function plan_url()\n {\n $fromLocationId = $toLocationId = $timeMode = $at = $vehicleTypes = $walkSpeed = $maximumWalkingDistanceM = $serviceTypes = $fareTypes = null;\n extract($this->request->query);\n\n $passedArg = explode(\"/\", $this->passedArgs[0]);\n $fromLocationId = $passedArg[0];\n $toLocationId = $passedArg[1];\n\n $obj = $this->travel_api_client->plan_url($fromLocationId, $toLocationId, $timeMode, $at, $vehicleTypes, $walkSpeed, $maximumWalkingDistanceM, $serviceTypes, $fareTypes);\n\n $this->set('response', $obj);\n }", "title": "" }, { "docid": "f151180e5f14b4c416908dcfc1bb1643", "score": "0.43685737", "text": "public function testSetDepartureLocation()\n {\n\n $location = $lg = \"\";\n $retVal = $this->boardingCard->setDepartureLocation($location,$lg);\n $this->assertEquals(1,$retVal,\"Test for invalid location and language\");\n\n $location = \"\";\n $lg = \"en\";\n $retVal = $this->boardingCard->setDepartureLocation($location,$lg);\n $this->assertEquals(2,$retVal,\"Test for invalid location and valid language\");\n\n\n $location = \"dubai\";\n $lg = \"en\";\n $retVal = $this->boardingCard->setDepartureLocation($location,$lg);\n $this->assertEquals(0,$retVal,\"Test for valid location and valid language\");\n\n }", "title": "" }, { "docid": "6d038e3087f02093b7b953b541e21655", "score": "0.43631247", "text": "public function getAddress(){\n\t\t\t $this->setRquery(\"SELECT * FROM amistiAddress WHERE userID=?\",array($this->UID));\n\t\t\t $res = $this->getRquery();\n\t\t\t $this->homeTown = $res[0]['addressHomeTown'];\n\t\t\t $this->country = $res[0]['addressCountry'];\n\t\t\t $this->curCity= $res[0]['addressCurCity'];\n\t\t\t $this->curCountry= $res[0]['addressCurCountry'];\n\t\t\t $this->curAddressTime= $res[0]['addressCurTime'];\n\t\t\t \n\t\t }", "title": "" }, { "docid": "8a15fd6388a6ffe2fb550ec15f6b8742", "score": "0.43529335", "text": "public function prepare()\n\t{\n\n\t\t// $this->remote = 'https://api.flightstats.com/flex/airlines/rest/v1/json/all?appId=f34e426f&appKey=02b7ea830924c9ca7c04f81296944e29&extendedOptions=includeNewFields';\n\t\t$this->path = storage_path('data/airports/airlines.json');\n\t\t$this->table = 'x_airlines';\n\t\t$this->before = 'truncate';\n\t\t$this->dataKey = 'airlines';\n\t\t$this->rowLimit = 1;\n\n\t}", "title": "" }, { "docid": "cf8129a349eab6101b9eef921fb9c13a", "score": "0.4352419", "text": "public function airportDepart(): BelongsTo {\n return $this->belongsTo(Airport::class, 'depart_id');\n }", "title": "" }, { "docid": "51faf52cfd7f29d059c4321291934991", "score": "0.4350482", "text": "public function generateIndividual() {\n // Loop through all our destination cities and add them to our tour\n for ($cityIndex = 0; $cityIndex < TourManager::numberOfCities(); $cityIndex++) {\n $this->setCity($cityIndex, TourManager::getCity($cityIndex));\n }\n // Randomly reorder the tour\n shuffle($this->tour);\n }", "title": "" }, { "docid": "510fb8fc7bb96c8a021a28868ea15e53", "score": "0.43490323", "text": "public function setSegmentArrivalAirportTerminalID($value): self\n {\n $this->SegmentArrivalAirportTerminalID = $value;\n\n return $this;\n }", "title": "" }, { "docid": "389fd852e716b7af1058ddfda1836886", "score": "0.43471625", "text": "public function getAirport($icao)\n {\n try {\n $airport = $this->client->getAirport($icao);\n $airport->location = $airport->city;\n $airport->timezone = $airport->tz;\n\n return $airport;\n } catch (HttpException $e) {\n Log::error($e);\n return [];\n }\n }", "title": "" }, { "docid": "3f021e290f2b0c46a733a82b8fb8fcd7", "score": "0.4343896", "text": "public function getDestinations(): array;", "title": "" }, { "docid": "9b92e24021c7e1e5934fbd80f9bfb64e", "score": "0.43426222", "text": "public function setSegmentDepartureAirportTerminalID($value): self\n {\n $this->SegmentDepartureAirportTerminalID = $value;\n\n return $this;\n }", "title": "" }, { "docid": "afc80553d49724f5b582257b052c543d", "score": "0.4341225", "text": "public function destination() {\n \n $ch = curl_init();\n \n \tcurl_setopt_array($ch, array(\n\t\t\tCURLOPT_PORT => \"10101\",\n \t\tCURLOPT_URL => \"http://apiv2.jne.co.id:10101/tracing/api/dest/key/\" . $this->input->get(\"q\"),\n \t\tCURLOPT_RETURNTRANSFER => true,\n \t\tCURLOPT_ENCODING => \"\",\n \t\tCURLOPT_MAXREDIRS => 10,\n \t\tCURLOPT_TIMEOUT => 30,\n \t\tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n \t\tCURLOPT_CUSTOMREQUEST => \"POST\",\n \t\tCURLOPT_POSTFIELDS => \"username=MERRYRIANA&api_key=a8ce2585afb6346262831bc265f4beee\", // start here jne\n \t\tCURLOPT_HTTPHEADER => array(\n\t\t\t\t\"cache-control: no-cache\",\n \t\t\t\"content-type: application/x-www-form-urlencoded\"\n \t\t),\n \t));\n \n \t$result = curl_exec($ch);\n \t$err = curl_error($ch);\n \n \tif ($err) {\n\t\t\techo \"cURL Error #:\" . $err;\n \t // echo json_encode(array('error' => 'err'));\n\t\t} else {\n \t echo json_encode($result);\n \t // echo json_encode(array('querynya' => $this->input->get(\"q\")));\n \t // echo $result;\n \t}\n \tcurl_close($ch);\n }", "title": "" }, { "docid": "86a7176d7569868339afbb170f972a27", "score": "0.43395495", "text": "public function createShipmentAndGetWaybill();", "title": "" }, { "docid": "f81413be8cd4d12cdb7e4a22ad5d7217", "score": "0.43303895", "text": "public function __construct()\n {\n $data = 'https://raw.githubusercontent.com/jpatokal/openflights/master/data/planes.dat';\n $fileData = fopen($data, 'r');\n while(($line = fgetcsv($fileData)) !== false) {\n $s[] = $line;\n }\n for($i = 1; $i < count($s); $i++) {\n if(Aircraft::where('icao', $s[$i][2])->exists()) continue;\n $airport = new Aircraft(); \n $airport->icao = $s[$i][2];\n $airport->iata = $s[$i][1];\n $airport->name = $s[$i][0];\n $airport->save();\n }\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "b0de06605e56ed547820f439f4bf1fde", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n $update_Home= Home::find($id);\n $request->validate([\n 'description'=>'required',\n 'Location'=>'required',\n 'Time'=>'required',\n\n ]);\n $update_Home->description=$request->get('description');\n $update_Home->Location=$request->get('Location');\n $update_Home->Time=$request->get('Time');\n $update_Home->save();\n\n return redirect()->action('HomeController@list')->with('message','Update Home page content Successfully!');\n\n }", "title": "" } ]
[ { "docid": "3a50a43d393625d85bd96071942ad788", "score": "0.75714874", "text": "public function updateResource(ResourceInterface $resource);", "title": "" }, { "docid": "43d7f9bca361bad6cdea5587611546b3", "score": "0.75074047", "text": "public function updated(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "bde449baf550552e043ec18452e05f5c", "score": "0.69665116", "text": "function update($resource, $content)\n {\n }", "title": "" }, { "docid": "cfdd7ff8fee991c8b9d8fd881fbe63cb", "score": "0.6921532", "text": "public function update(resource $resource) {\n $stmt = $this->db->prepare(\"UPDATE resource set id=?,name=?,description=?,quantity=?,type=? where id=?\");\n $stmt->execute(array($resource->getIdresource(), $resource->getName(),$resource->getDescription(),\n $resource->getQuantity(),$resource->getType(),$resource->getIdresource()));\n }", "title": "" }, { "docid": "64141ab468cf691ac341537b76914234", "score": "0.6896673", "text": "public function updateStream($resource);", "title": "" }, { "docid": "5a9d8f35441b3d765b8c94eeefcd24bd", "score": "0.65327597", "text": "public function update(Request $request, Resource $resource)\n {\n //\n // $this->authorize('update',Resource::class);\n // $input=$request->all();\n // $resource->update('$input');\n // return redirect('resource/'.$resource->id);\n return response()->json($resource);\n }", "title": "" }, { "docid": "5ff58e3b0cb8ed2ef95e5bfb0eb3a3dc", "score": "0.64138347", "text": "public function update(AccountInterface $account, Account $resource);", "title": "" }, { "docid": "df6c7acef4541105b5bc3ce3650d59f5", "score": "0.6403721", "text": "public function updateResourceById(Request $request, $id = 0);", "title": "" }, { "docid": "c36ab864eb8fe4e400b9bf654b24e104", "score": "0.6334678", "text": "public function updateStream($path, $resource, array $config = []);", "title": "" }, { "docid": "4f7d45ebcaeb64448ba69a2728df7cc9", "score": "0.63236964", "text": "public function update(Request $request, $resourceId)\n {\n $resource = $this->resource->find($resourceId);\n\n $this->validate($request, [\n 'title' => 'required|unique:resources,title,' . $resourceId . '|max:255',\n 'slug' => 'required|unique:resources,title,' . $resourceId . '|max:255',\n 'model' => 'required|unique:resources,title,' . $resourceId . '|max:255',\n 'namespace' => 'required|max:255',\n 'order_column' => 'required|integer',\n 'order_direction' => 'required|in:asc,desc',\n 'icon' => 'required'\n ]);\n\n $resource->update($request->all());\n\n return redirect()->back()->with('success', 'Resource updated');\n }", "title": "" }, { "docid": "55e27ae867b72d70d9595d52e540084d", "score": "0.62870395", "text": "public function updateStream($path, $resource, $config = []);", "title": "" }, { "docid": "5a25947b768e68926672b730228d725c", "score": "0.627197", "text": "public function update(Request $request, Resource $resource)\n {\n $validatedData = $request->validate([\n 'content' => 'required',\n 'topic' => [\n 'required',\n Rule::unique(\"resources\",'topic')->ignore($resource->topic,'topic')],\n ]);\n $content = $validatedData['content'];\n $dom = new \\DomDocument();\n $dom->loadHtml($content, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);\n $images = $dom->getElementsByTagName('img');\n\n foreach($images as $k => $img){\n $data = $img->getAttribute('src');\n if(strpos($data,'base64')!=false){\n list($type, $data) = explode(';', $data);\n list(, $data) = explode(',', $data);\n $data = base64_decode($data);\n\n $image_name= \"/upload/\" . time().$k.'.png';\n $path = public_path() . $image_name;\n file_put_contents($path, $data);\n $img->removeAttribute('src');\n $img->setAttribute('src', $image_name);\n }\n }\n $content = $dom->saveHTML();\n\n $resource->topic = $validatedData['topic'];\n $resource->content = $content;\n $resource->save();\n\n return redirect()->route('resource.show',['resource'=>$resource]);\n }", "title": "" }, { "docid": "248fca12370a0c10f40bb8e9ca995402", "score": "0.62151873", "text": "public function updateStream($path, $resource, Config $config)\n\t{\n $return = parent::updateStream($path, $resource, $config);\n\n $this->commit('updated ' . basename($path));\n\n return $return;\n }", "title": "" }, { "docid": "86d8d34eae4faff07f003c17390ad840", "score": "0.6214479", "text": "function put($resource, $data) {\n\t\t\t$this->_auth();\n\t\t\treturn $this->_request('PUT', $this->_resourcefix($resource), $data);\n\t\t}", "title": "" }, { "docid": "32dfb87cdc4ec45c0bf037618a81f878", "score": "0.61961704", "text": "public function updateStream($path, $resource, Config $config){}", "title": "" }, { "docid": "8630c9391e187dee0ad16562c7859222", "score": "0.61748964", "text": "public function update(Request $request, $class_id, $resource)\n {\n //\n }", "title": "" }, { "docid": "840ed6822df952682e04f5fdbc8605d6", "score": "0.6174421", "text": "public function update(StoreResourceRequest $request, $id)\n {\n $input = [\n 'name' => $request->input('name'),\n 'type' => $request->input('type'),\n 'metadata' => Arr::except($request->validated(), ['name', 'type']),\n ];\n\n if ($request->input('type') === 'pdf') {\n $file = $request->file('file');\n $input['metadata'] += [\n 'size' => $file->getSize(),\n 'ext' => $file->getClientOriginalExtension(),\n 'path' => $file->getClientOriginalName(),\n ];\n }\n\n $resource = Resource::find($id);\n if ($resource && $resource->update($input)) {\n if (isset($file)) {\n $file->move(storage_path('app/pdfs'), $file->getClientOriginalName());\n }\n\n return response()->json(['ok' => true]);\n } else {\n return response()->json(['ok' => false]);\n }\n }", "title": "" }, { "docid": "70667eb6cc902a3a33b32be7cb1f72f1", "score": "0.6109262", "text": "public function updateResource(\\Illuminate\\Http\\Request &$request, &$model): void\n {\n }", "title": "" }, { "docid": "c45baaabe2bd3d4c40a40e6b7d210f05", "score": "0.60513884", "text": "public function updateItem($resource, $id)\n\t{\n\t\t$this->ci->load->model($resource['model'], 'model');\n\n\t\t$postData = $this->ci->input->post(null, true);\n\n\t\t//@todo: Get the fillable fields and run a filter on what was given\n\t\t$this->ci->model->updateItem($id, $postData);\n\n\t\treturn 'Resource updated successfully';\n\t}", "title": "" }, { "docid": "08787fbcdf1f1dfce03ab185d34d1138", "score": "0.6035496", "text": "public function update($resourceId)\n {\n return $this->create();\n }", "title": "" }, { "docid": "6b9157a3a385139440dccde2f158c05b", "score": "0.6028893", "text": "public function update(Request $request, Storage $storage)\n {\n $attributes = $request->validate([\n 'parent_id' => 'nullable|exists:storages,id',\n ]);\n\n if (is_null($attributes['parent_id'])) {\n $storage->makeRoot()\n ->save();\n }\n else {\n $storage->appendToNode(Storage::find($attributes['parent_id']))\n ->save();\n }\n\n if ($request->wantsJson()) {\n return $storage;\n }\n\n return redirect($storage->path);\n }", "title": "" }, { "docid": "44801be6d02cd2bdb1653813581ade94", "score": "0.6010684", "text": "public function update(Request $request, Resource $resource)\n {\n $validatedAttributes = request()->validate([\n 'name' => ['required', 'string', 'max:255'],\n 'field' => ['required', 'string', 'max:255'],\n 'resource_contributor' => ['exists:users,id']\n ]);\n\n $resource_contributor = User::find($validatedAttributes['resource_contributor']);\n $this->authorize('assign', $resource_contributor);\n\n $resource->update($validatedAttributes);\n $resource->assignUser($resource_contributor);\n\n return view('actions.resource.update', compact('resource'));\n }", "title": "" }, { "docid": "2b8a79adbe1af409adcb87f83c9169f6", "score": "0.59985447", "text": "function refresh($resource)\n {\n $this->getCache()->removeItem(get_class($resource) . $resource->getId());\n $resource->_load($resource->getId());\n }", "title": "" }, { "docid": "b6183039ccc289a72430ce694bc84511", "score": "0.59811354", "text": "public function put(Resource\\ResourceInterface $resource)\r\n\t{\r\n\t\t$hash = $this->generateHash($resource->resourceName(), $resource->resourceId(), $resource->params());\r\n\t\t\r\n\t\t$this->storage->put($hash, $resource->contents());\r\n\t\t$this->hashes[$hash] = $hash;\r\n\t\t\r\n\t\treturn $resource;\r\n\t}", "title": "" }, { "docid": "8cd20d00377121b72e7e70d56ae3b421", "score": "0.5978405", "text": "public function update(Request $request, Product $product)\n {\n //Get the product\n $the_product = Product::where('product_id',$product->product_id)->first();\n\n //Update the product\n $product->supplier_id = $request->supplier_id;\n\n //Return product if updated\n if ($product->update()){\n return new ProductResource($product);\n } \n }", "title": "" }, { "docid": "27238afbfd7d5f825910ac95b94767b7", "score": "0.59718364", "text": "public function update(Request $request, $id)\n {\n \n $requestData = $request->all();\n $query = '\"select\":\"*\",\"where\":\"id=' . $id . '\"';\n unset($requestData[\"_token\"]);\n unset($requestData[\"_method\"]);\n $requestData = json_encode($requestData);\n ResourcesService::updateResourcesTable($requestData, $query);\n// $resource = Resource::findOrFail($id);\n// $resource->update($requestData);\n\n return redirect('admin/resources')->with('flash_message', 'Resource updated!');\n }", "title": "" }, { "docid": "df6115717d620432de4e68dabd64c68b", "score": "0.5934917", "text": "public function update(Request $request, $id)\n\t{\n $validator = $this->validate($request, [\n \t//\n ]);\n\n try\n {\n \t$updatedResource = $this->repository->updateResource($id, $request->all());\n\n } catch(\\Exception $exception)\n {\n $this->flashErrorAndReturnWithMessage($exception);\n }\n\n // returns back with success message\n flash()->success('The resource was updated!');\n return redirect()->action('Admin\\Catalogue\\ResourceController@edit', ['resource' => $id]);\n\t}", "title": "" }, { "docid": "308f63a408af64ce6c649c642eeae702", "score": "0.59232825", "text": "public function getResourceUpdates( $resource, $size = SPIGET4PHP_DEFAULT, $page = SPIGET4PHP_DEFAULT, $sort = SPIGET4PHP_DEFAULT, $fields = SPIGET4PHP_DEFAULT )\n {\n $function = 'resources/'.$resource.'/updates';\n $args = [];\n if ( !is_null( $size ) ) $args['size'] = $size;\n if ( !is_null( $page ) ) $args['page'] = $page;\n if ( !is_null( $sort ) ) $args['sort'] = $sort;\n if ( !is_null( $fields ) ) $args['fields'] = implode(',', $fields );\n return $this->getResult( $function, $args );\n }", "title": "" }, { "docid": "91e7d2c538f4decea1e29581b3890506", "score": "0.5894686", "text": "public function update(Request $request, $id)\n {\n \n $validator = Validator::make($request->all(), [\n 'user_id' => 'filled|exists:users,id',\n 'space_id' => 'filled|exists:spaces,id',\n 'capacity_used' => 'filled|integer|between:1,100',\n 'start_date' => 'filled|date_format:Y-m-d',\n 'end_date' => 'filled|date_format:Y-m-d',\n ]);\n\n if ($validator->fails()) {\n\n return response()->json([\n 'status' => false,\n 'message' => $validator->errors()->first(),\n 'error' => $validator->errors(),\n ], 400);\n\n }\n \n try {\n\n DB::beginTransaction();\n\n $storage = MyStorage::where('id', $id)->first();\n\n if (is_null($storage)) {\n\n return response()->json([\n 'status' => false,\n 'message' => 'Storage tidak ditemukan...',\n ], 404);\n\n }\n\n $data = $request->all();\n\n $storage->update($data);\n\n DB::commit();\n\n Activity::onAct($request, 'Update Storage');\n\n return response()->json([\n 'status' => true,\n 'message' => 'Berhasil melakukan perubahan!',\n ], 200);\n\n } catch (Exception $e) {\n\n DB::rollBack();\n\n CustomException::onError($e);\n\n return response()->json([\n 'status' => false,\n 'message' => 'Maaf! Terjadi kesalahan pada sistem...',\n 'error' => $e->getMessage(),\n ], 500);\n\n }\n\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b2b52d5e19d80d8c444bf8a8d2e69616", "score": "0.58864933", "text": "public function update(Product $product,Request $request)\n {\n abort_if(auth()->user()->admin !==1,403);\n $product->update(request(['name','volume','issue','price','stock']));\n if($request->has('pic')) {\n\n $pic = $request->file('pic');\n $extension = $request->file('pic')->getClientOriginalExtension();\n $watermark=Storage::disk('s3')->get('/public/WaterMark.png');\n\n $filename = 'product';\n $normal = Image::make($pic)->resize(250, 250)->insert($watermark)->encode($extension);\n $pixelated = Image::make($pic)->resize(250, 250)->pixelate(20)->encode($extension);\n\n\n Storage::disk('s3')->put('/products/'.\"$product->id\".'/'.\"{$filename}\".'/original', (string)$normal, 'public');\n Storage::disk('s3')->put('/products/'.\"$product->id\".'/'.\"{$filename}\".'/pixelated', (string)$pixelated, 'public');\n\n\n $product = Product::findorFail(\"$product->id\");\n $product->pic = $filename;\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "96f8834f70428b62ee43e045b6155883", "score": "0.5868864", "text": "public function Update( $resourceType, $resourceData ) {\n\n $callerId = 'RemoteAPI->Update: \"'.$resourceType;\n if (!$this->VerifyLoggedIn( $callerId )) {\n return NULL; // error\n }\n if (!$this->VerifyValidResourceType($resourceType)) {\n return NULL;\n }\n if (!isset($resourceData['data']['id'])) {\n return NULL;\n }\n\n $url = $this->endpoint_uri.'/'.$resourceType.'/'.$resourceData['data']['id'];\n $data = http_build_query($resourceData, '', '&');\n $ret = $this->CurlHttpRequest($callerId, $url, 'PUT', $data, true);\n return $ret->response;\n }", "title": "" }, { "docid": "1bae75410baac72a0e8132d92a079593", "score": "0.5863047", "text": "public function updateResourceType(ResourceTypeInterface $resourceType);", "title": "" }, { "docid": "7e791b7f0ac284a4a99b42aa5d49b6f5", "score": "0.58566195", "text": "public function update(Request $request, $id)\n {\n $model = DrugStorage::find($id);\n $model->fill($request->all());\n $model->save();\n\n return redirect('storage');\n }", "title": "" }, { "docid": "c8cfc09f393219dca339ad89d530539a", "score": "0.58513457", "text": "public function putStream($resource);", "title": "" }, { "docid": "9d248a2ed58e7497d523e07caa29e60e", "score": "0.5848729", "text": "public function update(Request $request, UserStorageInfo $userStorageInfo)\n {\n //\n }", "title": "" }, { "docid": "914e8c19a288227da3761458ae873793", "score": "0.5830434", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::find($id);\n $product->update($request);\n if($request->hasFile('image')){\n //store image in amazon bucket\n $file = $request->file('image') ;\n $fileName = time() . '.' . $file->getClientOriginalExtension() ;\n $filePath = $file->getPathName();\n\n $s3 = AWS::createClient('s3');\n $s3->putObject(array(\n 'Bucket' => 'kumashe',\n 'Key' => $fileName,\n 'SourceFile' => $filePath,\n 'ACL' => 'public-read'\n ));\n $image_url = $s3->getObjectUrl('kumashe', $fileName);\n $product->image_url = $image_url;\n }\n\n $product->save();\n return redirect(route('product.show', $id));\n }", "title": "" }, { "docid": "82a1a055157c214f599a7f4a9e118292", "score": "0.58248174", "text": "public function update($id)\n\t{\n\t\t// Get the resource if it has not been provided by the child class\n\t\tif( ! $this->resource->getKey())\n\t\t\t$this->resource = $this->resource->findOrFail($id);\n\n\t\t// NOTE: If you override this method remember to exclude $this->relationships from input!!\n\t\t$input = Input::except(array_keys($this->relationships)); // Less safe, more convenient\n\n\t\t// Transfer input to the resource\n\t\t$this->resource = $this->resource->fill($input);\n\n\t\treturn $this->persist(__FUNCTION__);\n\t}", "title": "" }, { "docid": "8c71ceccf522a25b82a67cb113315aaf", "score": "0.58206964", "text": "public function updateHook($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "ff532344ab178d688587c7da12273ec4", "score": "0.5812807", "text": "public function updateStream($path, $resource, \\League\\Flysystem\\Config $config)\n {\n $this->delete($path);\n\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "402a2d31776495dd28ca9fd3b5783ac2", "score": "0.58027816", "text": "public function update($id, Requests\\EventUpdateRequest $request,Storage $storage) {\n //update values in notice\n $event=Event::find($id);\n $event->name = $request->input('evtname');\n $event->description = $request->input('descrp');\n if($request->file('img')!=null){\n $image = $request->file( 'img' );\n $timestamp = $this->getFormattedTimestamp();\n $savedImageName = $this->getSavedImageName( $timestamp, $image );\n $savedImageName = 'event/'.$savedImageName;\n $imageUploaded = $this->uploadImage( $image, $savedImageName, $storage ); \n if ( $imageUploaded )\n {\n $event->image = $savedImageName;\n }else{\n return redirect('event')\n ->withFlashMessage('Image upload failed!')\n ->withType('danger');\n } \n }\n $event->save();\n return redirect('event')\n ->withFlashMessage('Event Updated successfully!')\n ->withType('success');\n }", "title": "" }, { "docid": "ff0e38a6315c73abcb3ca49b97fa12a2", "score": "0.57795924", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->s_name = $request->name;\n $product->s_caption = $request->caption;\n $product->s_desc = $request->desc;\n $product->n_qty = $request->quantity;\n $product->f_price = $request->price;\n $product->id_creator = $request->creator;\n $product->id_category = $request->category[\"id\"];\n\n $product->save();\n\n return new ProductResource($product);\n }", "title": "" }, { "docid": "a9e0457c38673b4e5d44d30595cc5a66", "score": "0.5776495", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'image' => 'required|image|mimes:jpeg,png,jpg|max:2048',\n ]);\n\n $slider = slider::where('slider_id',$id)->first(); \n $imagename = $slider->image;\n if(!empty($request->file('image'))){\n\n if(Storage::disk('s3')->exists($imagename)) {\n Storage::disk('s3')->delete($imagename);\n }\n $file = $request->file('image');\n $imagename = $file->store('slider', 's3');\n }\n \n $affectedRows = Slider::where('slider_id', $id)\n ->update(array( \n 'image' => $imagename, \n ));\n\n return redirect()->route('slider.index')\n ->with('success','slider updated successfully.');\n }", "title": "" }, { "docid": "dca29547108f9baf476eadad247453f8", "score": "0.57759243", "text": "public function put_update() {\n\t}", "title": "" }, { "docid": "9dd01fe7e0843f2e28de9c41f2993355", "score": "0.57543606", "text": "public function update(Request $request, $id)\n {\n try{\n $obj = Obj::where('id',$id)->first();\n\n $this->authorize('update', $obj);\n\n $obj->update($request->all()); \n\n \n\n /* cache pages */\n $p = explode('/',$obj->slug);\n if(count($p)==1){\n $filename = $obj->slug.'.json';\n }\n else\n {\n $slug = implode('_', $p);\n $filename = $slug.'.json';\n }\n $filepath = $this->cache_path.$filename;\n file_put_contents($filepath, json_encode($obj,JSON_PRETTY_PRINT));\n\n flash('('.$obj->slug.') item is updated!')->success();\n return redirect()->route($this->module.'.view',$obj->slug);\n }\n catch (QueryException $e){\n $error_code = $e->errorInfo[1];\n if($error_code == 1062){\n flash('Some error in updating the record')->error();\n return redirect()->back()->withInput();\n }\n }\n }", "title": "" }, { "docid": "06b241f2e73fc514410ae9f7cf6027c3", "score": "0.574161", "text": "public function update(Request $request, $id)\n {\n\n $section = Section::find($id);\n // if($section->path != $request->path){\n // File::move(public_path().\"\\\\storage\\\\\".$section->path, public_path().'\\\\storage\\\\'.$request->path);\n // }\n $section->update($request->all());\n return redirect()->route('section.show',$section->id)->withSuccess('Saved');\n\n }", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "fc2c8495106e59db92b5cb42b28f371f", "score": "0.57243335", "text": "public function updateStream($path, $resource, Config $config)\n {\n $size = Util::getStreamSize($resource);\n list($ret, $err) = Qiniu_RS_Rput($this->getClient(), $this->bucket, $path, $resource, $size, null);\n if ($err !== null) {\n return false;\n }\n return compact('size', 'path');\n }", "title": "" }, { "docid": "1b2c07e390f355317a98bb6b905544d0", "score": "0.57218975", "text": "public function update_put(){\r\n $response = $this->ProductM->update_product(\r\n $this->put('id'),\r\n $this->put('name'),\r\n $this->put('price')\r\n \r\n );\r\n $this->response($response);\r\n }", "title": "" }, { "docid": "e5dda42fd9bfe8ca4186765bc677c8d8", "score": "0.5709017", "text": "public function update($id)\n\t{\n // No need to update file ...\n\t}", "title": "" }, { "docid": "2fbe11e1a076264bdb0a567721e62b4e", "score": "0.570533", "text": "public function update(Request $request, $id)\n {\n \n $rules = [\n 'name' => ['required', 'alpha'],\n 'price' => ['required', 'min:7'],\n 'quantity' => ['required', 'min:7']\n ];\n\n $data = app('request')->only('name', 'price', 'quantity', 'image');\n \n $validator = app('validator')->make($data, $rules);\n\n if ($validator->fails()) {\n throw new UpdateResourceFailedException('Could not update new product.', $validator->errors());\n }\n $product = Product::findOrFail($id);\n \n $product->update($data);\n\n return $this->response->array($product->toArray());\n\n }", "title": "" }, { "docid": "dd2225fd648a4ac98ff9eed8ac080518", "score": "0.56961733", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'product_name'=>'required',\n 'description'=>'required'\n ]);\n $path=$request->old_image;\n if($request->hasFile('thumbnail')){\n if($request->old_image!=null){\n unlink('storage/'.$request->old_image);\n }\n $path=$request->file('thumbnail')->store('Thumbnials');\n }\n $attachment=$request->old_attachment;\n if($request->hasFile('attachment')){\n if($attachment!=null){\n // unlink('storage/'.$request->old_attachment);\n }\n $attachment=$request->file('attachment')->store('Attachment');\n }\n $data=[\n 'product_name'=>$request->product_name,\n 'attachment'=>$attachment,\n 'description'=>$request->description,\n 'thumbnail'=>$path\n ];\n Product::where('id',$id)->update($data);\n return redirect()->route('listProduct');\n }", "title": "" }, { "docid": "e042cdb98e7ed9891be90f84314686dd", "score": "0.5693665", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n if ($request->hasFile('image')) {\n $image = Storage::putFile('image', $request->file('image'));\n $product->image = $image;\n $product->save();\n }\n if ($request->hasFile('file')) {\n $file = Storage::putFile('file', $request->file('file'));\n $product->file = $file;\n $product->save();\n }\n $product->title = $request->title;\n $product->description = $request->description;\n $product->author = $request->author;\n $product->publisher = $request->publisher;\n $product->category = $request->category;\n $product->price = $request->price;\n if ($product->save()) {\n return redirect()->route('admin.product.index')->with('success', 'Updated');\n } else {\n return redirect()->route('admin.product.index')->with('failure', 'Error');\n }\n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "a9fac208ad1c404c2680e4aef5eb19ae", "score": "0.5679042", "text": "public function updateStream($path, $resource, Config $config)\n\t{\n\t\t$contents = stream_get_contents($resource);\n\t\treturn $this->upload($path, $contents, $config);\n\t}", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "3afef5a69f7281e42edd2ca54eb9c614", "score": "0.56676763", "text": "public function update()\n {\n $this->entity->save($this->getData());\n }", "title": "" }, { "docid": "a41cb37da92977ab0e5d7e802be4ae3d", "score": "0.56617355", "text": "public function update(Request $request, $id)\n {\n \n $this->validate($request , [\n 'name' => 'required|string|unique:products,name,'.$id,\n 'description' => 'required|string',\n 'price' => 'required|integer',\n // 'image'=>'nullable|mimes:png,jpeg,jpg|max:10000',\n ]);\n\n $product = Product::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->user_id = auth('api')->id();\n $product->update();\n\n return AppHttpResponse::responseSuccess(\n Response::HTTP_CREATED,\n \"product updated successfully\",\n new ProductResource($product)\n );\n // return response()->json(['response' => ['status' => 'success', 'message'=> 'Action Successful']]);\n }", "title": "" }, { "docid": "ea216cab3487d4cef55296ff2eb4b922", "score": "0.5660654", "text": "public function update(Request $request, \n string $resource_type_id,\n string $resource_id\n ): JsonResponse {\n if ($this->hasWriteAccessToResourceType((int) $resource_type_id) === false) {\n return \\App\\HttpResponse\\Response::notFoundOrNotAccessible(trans('entities.resource'));\n }\n\n $resource = (new Resource())->instance($resource_type_id, $resource_id);\n\n if ($resource === null) {\n return Response::failedToSelectModelForUpdateOrDelete();\n }\n\n if (count($request->all()) === 0) {\n return \\App\\HttpResponse\\Response::nothingToPatch();\n }\n\n $validator = (new ResourceValidator())->update([\n 'resource_type_id' => (int)$resource_type_id,\n 'resource_id' => (int)$resource_id\n ]);\n\n if ($validator->fails()) {\n return \\App\\HttpResponse\\Response::validationErrors($validator);\n }\n\n $invalid_fields = $this->checkForInvalidFields(\n [\n ...(new Resource())->patchableFields(),\n ...(new ResourceValidator())->dynamicDefinedFields()\n ]\n );\n\n if (count($invalid_fields) > 0) {\n return Response::invalidFieldsInRequest($invalid_fields);\n }\n\n foreach ($request->all() as $key => $value) {\n $resource->$key = $value;\n }\n\n $cache_job_payload = (new \\App\\Cache\\JobPayload())\n ->setGroupKey(\\App\\Cache\\KeyGroup::RESOURCE_UPDATE)\n ->setRouteParameters([\n 'resource_type_id' => $resource_type_id\n ])\n ->setUserId($this->user_id);\n\n try {\n $resource->save();\n\n ClearCache::dispatchSync($cache_job_payload->payload());\n } catch (Exception $e) {\n return Response::failedToSaveModelForUpdate($e);\n }\n\n return Response::successNoContent();\n }", "title": "" }, { "docid": "1eef5ac7d8584e9a4bcc453dbeda2dd1", "score": "0.5651912", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'destination'=>'required',\n 'description'=>'required'\n ]);\n $path=$request->old_image;\n if($request->hasFile('thumbnail')){\n if($request->old_image!=null){\n unlink('storage/'.$request->old_image);\n }\n $path=$request->file('thumbnail')->store('Thumbnials');\n }\n \n $data=[\n 'destination'=>$request->destination,\n 'description'=>$request->description,\n 'thumbnail'=>$path\n ];\n Destination::where('id',$id)->update($data);\n return redirect()->route('listDestination');\n }", "title": "" }, { "docid": "9f187c27268314514c3087be6418037a", "score": "0.5651523", "text": "public function update(Record $record)\n {\n $record_id = $record->meta->record_id;\n $version = $record->meta->version;\n\n $path = $this->conn->uri('v1', 'storage', 'records', 'safe', $record_id, $version);\n try {\n $this->conn->put($path, $this->encrypt_record($record));\n } catch (RequestException $re) {\n if ($re->getResponse()->getStatusCode() === 409) {\n throw new ConflictException(\"Conflict updating record ID {$record_id}\", 'record');\n }\n\n throw $re;\n }\n }", "title": "" }, { "docid": "037102fbe484d03598713e8aa9173254", "score": "0.56507224", "text": "public function update(Request $request, $id)\n {\n \n $request->validate(Product::validateRules());\n \n if ($request->hasFile('image')) {\n $file = $request->file('image');\n $image_path = $file->store('uploads', [\n 'disk' => 'public'\n ]);\n $request->merge([\n 'image_path' => $image_path\n ]);\n }\n \n $product = Product::findOrFail($id);\n\n $this->authorize('update', $product);\n \n $product->update($request->all());\n\n return redirect()->route('products.index')->with('success', 'product ( ' . $product->name . ' ) was Updated.');\n }", "title": "" }, { "docid": "60a1aa5c2edbfc16970b759aff9a6706", "score": "0.5644386", "text": "public function update(Request $request)\n {\n // Get existing product or create a new product\n $product = Product::findOrFail($request->input('id'));\n\n /**\n * set incomming put values to the product\n * This will add or overwrite existing values\n * */\n $product->id = $request->input('id');\n $product->name = $request->input('name');\n $product->price = $request->input('price');\n $product->description = $request->input('description');\n $product->bedrooms = $request->input('bedrooms');\n $product->bathrooms = $request->input('bathrooms');\n $product->status_id = $request->input('status_id');\n // need to add Auth user_id when admin is created\n $product->user_id = $request->input('user_id');\n\n if ($product->save())\n {\n // get product details\n $this->getProductDetails($product);\n \n return new ProductResource($product);\n }\n }", "title": "" }, { "docid": "f191a52f64addfd7234817d041f773d5", "score": "0.5643432", "text": "public function update(Request $request, $id)\n {\n $validate = $request->validate([\n 'title' => 'required',\n 'description' => 'required',\n 'buy' => 'required|numeric',\n 'sell' => 'required|numeric',\n 'image' => 'nullable|file|max:1000',\n ]);\n try {\n $cache = Cache::get('products');\n $currect_product = $cache[$id - 1];\n $current_image = $currect_product['imageName'] ?? false;\n // dd(arra);\n // if current_image not the same as cached image\n if ($request->image && $current_image != $request->file('image')->getClientOriginalName()) {\n Storage::disk('local')->put('public/' . $request->file('image')->getClientOriginalName(), $request->file('image')->getContent());\n $currect_product['imageName'] = $request->file('image')->getClientOriginalName();\n }\n\n $currect_product['title'] = $request->title;\n $currect_product['description'] = $request->description;\n $currect_product['buy'] = $request->buy;\n $currect_product['sell'] = $request->sell;\n $new_cache = array_replace($cache, array(($id - 1) => $currect_product));\n\n Cache::put('products', $new_cache, now()->addHours(2));\n } catch (\\Throwable $th) {\n dd($th);\n return redirect('products')->with('status', 'Error');\n }\n\n return redirect('products')->with('status', 'Saved!');\n }", "title": "" }, { "docid": "b31be5fface7cd996e321be92699b8f6", "score": "0.5629739", "text": "public function putAction( Request $request, ?string $resource ) : Response\n\t{\n\t\t$req = $this->createRequest( $request );\n\t\t$res = ( new Psr17Factory )->createResponse();\n\n\t\treturn $this->createResponse( $this->createClient( $req, $resource )->put( $req, $res ) );\n\t}", "title": "" }, { "docid": "cf8362e081562a5c6bc7cf5dec3e1a4f", "score": "0.5627604", "text": "public function update($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\t\treturn $this->attemptEdit($resource, false);\n\t}", "title": "" }, { "docid": "18418c48891ce4c52909e09e2bb43ebb", "score": "0.56251585", "text": "public function update(Request $request, Product $product)\n {\n // dd($request);\n $slug = ModelHelper::createSlug('\\App\\Models\\Product', $request->title, $product->id);\n $path = public_path().'/storage/products/'.$product->slug;\n\n if ($product->slug != $slug) {\n\n if (file_exists($path)) {\n Storage::move('public/products/'. $product->slug , 'public/products/'.$slug);\n }\n\n $slug = ModelHelper::createSlug('\\App\\Models\\Product', $slug, $product->id);\n \n }\n\n $updateArray = array(\n \"title\" => $request->title, \n \"slug\" => $slug,\n \"sku\" => $request->sku,\n \"price\" => $request->price,\n \"discounted_price\" => isset($request->discounted_price) ? $request->discounted_price : 0,\n \"display\" => isset($request->display) ? $request->display : 0,\n \"featured\" => isset($request->featured) ? $request->featured : 0,\n \"variation_type\" => $request->variation_type,\n \"short_description\" => $request->short_description,\n \"long_description\" => $request->long_description,\n \"stock_status\" => $request->stock_status,\n \"stock_count\" => $request->stock_count,\n \"brand_id\" => $request->brand_id,\n \"tags\" => $request->tags,\n \"updated_by\" => Auth::user()->name,\n \"updated_at\" => date('Y-m-d H:i:s')\n );\n\n $path = public_path().'/storage/products/'.$slug;\n $folderPath = 'public/products/'.$slug;\n\n if (!file_exists($path)) {\n\n Storage::makeDirectory($folderPath,0777,true,true);\n\n if (!is_dir($path.\"/thumbs\")) {\n Storage::makeDirectory($folderPath.'/thumbs',0777,true,true);\n }\n\n }\n\n if ($request->hasFile('image')) {\n //Add the new photo\n $image = $request->file('image');\n $filename = time().'.'.$image->getClientOriginalExtension();\n // Storage::putFileAs($folderPath, new File($image), $filename);\n\n ModelHelper::resize_crop_images(1200, 1200, $image, $folderPath.\"/\".$filename);\n ModelHelper::resize_crop_images(900, 900, $image, $folderPath.\"/thumbs/small_\".$filename);\n ModelHelper::resize_crop_images(600, 600, $image, $folderPath.\"/thumbs/thumb_\".$filename);\n\n $updateArray['image'] = $filename;\n\n $OldFilename = $product->image;\n // dd($OldFilename);\n //Delete the old photo\n Storage::delete($folderPath .\"/\".$OldFilename);\n Storage::delete($folderPath .\"/thumbs/small_\".$OldFilename);\n Storage::delete($folderPath .\"/thumbs/thumb_\".$OldFilename);\n\n }\n\n if ($request->hasFile('other_images')) {\n //Add the new photo\n $otherImages = $request->file('other_images');\n foreach ($otherImages as $key => $other) {\n\n $filename_o = time().$key.'_.'.$other->getClientOriginalExtension();\n // Storage::putFileAs($folderPath, new File($other), $filename_o);\n\n ModelHelper::resize_crop_images(1200, 1200, $other, $folderPath.\"/\".$filename_o);\n ModelHelper::resize_crop_images(900, 900, $other, $folderPath.\"/thumbs/small_\".$filename_o);\n ModelHelper::resize_crop_images(600, 600, $other, $folderPath.\"/thumbs/thumb_\".$filename_o);\n }\n\n }\n\n $product_updated = $product->update($updateArray);\n $variations = $request->variation;\n\n if ($request->variation_type == 1) {\n\n foreach ($variations as $color) {\n\n if (isset($color['id'])) {\n\n // $color_slug = ProductColor::createSlug($product->id, $color['name'], $color['id']);\n\n $product_color = ProductColor::find($color['id']);\n $productColorExists = ProductColor::where([['id', '!=' , $product_color->id], ['product_id' , $product->id], ['color_id', $color['color_id']]])->exists();\n\n if (!$productColorExists) {\n\n ProductColor::where('id', $color['id'])->update([\n 'color_id' => $color['color_id'],\n 'sku' => $color['sku'],\n 'stock_count' => $color['stock_count']\n ]);\n }\n\n }else{\n\n // $color_slug = ProductColor::createSlug($product->id, $color['name']);\n\n $product_color = ProductColor::updateOrCreate(['product_id' => $product->id, 'color_id' => $color['color_id']],\n ['sku' => $color['sku'], 'stock_count' => $color['stock_count']]);\n\n }\n }\n }elseif ($request->variation_type == 2) {\n \n\n foreach ($variations as $color) {\n\n if (isset($color['id'])) {\n\n // $color_slug = ProductColor::createSlug($product->id, $color['name'], $color['id']);\n\n $product_color = ProductColor::find($color['id']);\n\n $productColorExists = ProductColor::where([['id', '!=' , $product_color->id], ['product_id' , $product->id], ['color_id', $color['color_id']]])->exists();\n\n if (!$productColorExists) {\n\n ProductColor::where('id', $color['id'])->update([\n 'color_id' => $color['color_id'],\n 'sku' => $color['sku']\n ]);\n }\n\n $sizes = $color['sizes'];\n\n foreach ($sizes as $size) {\n\n\n if (isset($size['id'])) {\n \n // $size_slug = ProductSize::createSlug($color['id'], $size['name'], $size['id']);\n\n $product_size = ProductSize::find($size['id']);\n\n $sizeExists = ProductSize::where([['id', '!=' , $product_size->id], ['product_color_id', $color['id']], ['size_id' , $size['size_id']] ])->exists();\n // dd($sizeExists);\n if (!$sizeExists) {\n\n ProductSize::where('id', $size['id'])->update([\n 'size_id' => $size['size_id'],\n 'stock_count' => $size['stock_count']\n ]);\n }\n\n\n }else{\n\n // $size_slug = ProductSize::createSlug($color['id'], $size['name']);\n \n $size = ProductSize::updateOrCreate(\n ['product_color_id' => $color['id']],\n ['stock_count' => $size['stock_count']]\n );\n }\n\n }\n\n }else{\n\n // $color_slug = ProductColor::createSlug($product->id, $color['name']);\n\n $product_color = ProductColor::updateOrCreate(['product_id' => $product->id, 'color_id' => $color['color_id']],\n ['sku' => $color['sku']]);\n\n $sizes = $color['sizes'];\n\n foreach ($sizes as $size) {\n\n // $size_slug = Size::createSlug($product_color->id, $size['name']);\n $size = ProductSize::updateOrCreate(\n ['product_color_id' => $product_color->id, 'size_id' => $size['size_id']],\n ['stock_count' => $size['stock_count']]\n );\n }\n }\n\n }\n }\n\n // dd($request);\n if ($product_updated) {\n\n if (isset($request->category_id)) {\n\n $category_ids = $request->category_id;\n\n for ($i=0; $i < count($category_ids); $i++) { \n \n $product->category_products()->updateOrCreate(['product_id' => $product->id, 'category_id' => $category_ids[$i]]);\n }\n\n $product->category_products()->whereNotIn('category_id',$category_ids)->delete();\n \n }else{\n $product->category_products()->delete();\n }\n\n return redirect()->route('admin.products.index')->with('status','Product has been Updated Successfully!');\n\n }else{\n return redirect()->back()->with('error', 'Something Went Wrong!');\n }\n }", "title": "" }, { "docid": "63a101ece5068639dff7800b6376f4af", "score": "0.56169105", "text": "public function updateResource($path, $array)\n {\n return $this->decodeResponseBody($this->sendRequest('PUT', $path, ['Content-Type' => 'application/json'], $array));\n }", "title": "" }, { "docid": "3dc7c7ac4a1b054ffe1cb3bfd7af6977", "score": "0.5615731", "text": "public function update(Request $request, $id)\n {\n try{\n $obj = Obj::where('id',$id)->first();\n $this->authorize('update', $obj);\n\n /* delete file request */\n if($request->get('deletefile')){\n if(Storage::disk('public')->exists($obj->image)){\n Storage::disk('public')->delete($obj->image);\n }\n redirect()->route($this->module.'.show',[$obj->slug]);\n }\n\n /* If file is given upload and store path */\n if(isset($request->all()['file'])){\n $file = $request->all()['file'];\n $path = Storage::disk('public')->putFile('images', $request->file('file'));\n $request->merge(['image' => $path]);\n }\n\n $obj->update($request->all()); \n\n \n\n flash('('.$obj->slug.') category item is updated!')->success();\n return redirect()->route($this->module.'.show',$obj->slug);\n }\n catch (QueryException $e){\n $error_code = $e->errorInfo[1];\n if($error_code == 1062){\n flash('Some error in updating the record')->error();\n return redirect()->back()->withInput();\n }\n }\n }", "title": "" }, { "docid": "8ca029b89aef5b3db9a2e7cfb6429648", "score": "0.5607548", "text": "public function update($resource, $attributes)\n {\n return DB::transaction(function () use ($resource, $attributes) {\n $attributes = $this->updateAttributes($attributes);\n\n /** @var Model $resource */\n $resource = $this->fill($resource, $attributes, true);\n $resource->save();\n\n return $this->updateHook($resource);\n });\n }", "title": "" }, { "docid": "792c302e1e1dd2dd27f767e2c72f24e4", "score": "0.56033003", "text": "public function update(Request $request, $id)\n {\n $food = FoodDrink::find($id);\n// $food->store_id = Auth::guard('store')->user()->id;\n $food->category_id = $request->category_id;\n $food->name = $request->name;\n $food->description = $request->description;\n $food->price = $request->price;\n $image_food=$request->file('image');\n if ($image_food==''){\n $food->image=$request->old_image;\n }else{\n $image_food=$request->file('image');\n $filename=time().'.'.$image_food->getClientOriginalExtension();\n $path='foods/' . $filename;\n Storage::disk('s3')->put($path, file_get_contents($image_food));\n $food->image = Storage::disk('s3')->url($path, $filename);\n }\n\n $food->update();\n return redirect()->route('food.index');\n }", "title": "" }, { "docid": "e78201b45ca654bb496654f8a520fa61", "score": "0.5599671", "text": "public function update(Request $request, $id)\n {\n if ($request->bool12 == 1) {\n\n if ($request->file('images')) {\n $product = Product::create($request->except('image'));\n $this->globalclass->storeMultipleS3($request->file('images'), 'construction/product', $product->id);\n } else {\n Product::create($request->except('image'));\n }\n }\n if ($request->bool12 == 0) {\n $product = Product::find($id);\n if ($request->file('images')) {\n\n $this->globalclass->storeMultipleS3($request->file('images'), 'construction/product', $product->id);\n $product->update($request->except('image','created_by'));\n } else {\n $product->update($request->except('image','created_by'));\n }\n }\n\n return redirect()->away($request->previous_url);\n }", "title": "" }, { "docid": "c289554a52ebaed40c1a4527e6993f7e", "score": "0.5595745", "text": "public function update(Request $request, $id)\n {\n $update = Photo::find($id);\n Storage::delete(\"public/img\" . $update->url);\n $update->url = $request->file(\"url\")->hashName();\n Storage::put(\"public/img\", $request->file(\"url\"));\n $update->save();\n\n return redirect(\"/\");\n }", "title": "" }, { "docid": "feafa85fd136a8bfa7378058dbef8934", "score": "0.55935574", "text": "public function update(StoreQuestion $request, Question $question)\n {}", "title": "" }, { "docid": "e1cccae3c615051b9fc728867ee799d4", "score": "0.55874336", "text": "public function update(StoreSlide $request, Slide $slide){\n $slide->title = $request->input('title');\n $slide->caption = $request->input('caption');\n $slide->target_link = $request->has('target_link')? $request->input('target_link'): $slide->target_link;\n $slide->status = $request->input('status');\n \n if($request->hasFile('image')){\n $image = Storage::put('public/slides', $request->file('image'), 'public');\n $image = explode('/', $image)[2];\n $slide->image_url = $image; \n }\n \n $slide->save();\n\n return redirect()->route('slides.show', ['slide' => $slide]);\n }", "title": "" }, { "docid": "5a0f17e493c29df895c72feb688db7f2", "score": "0.55830574", "text": "public function update(Request $request, $id)\n {\n $stadium = Stadium::find($id);\n $stadium->caption = $request->caption;\n $stadium->abstract= $request->abstract;\n $stadium->capacity = $request->capacity;\n $stadium->slug = $request->slug;\n\n //almacenar imagen\n if ($request->file('picture')){\n $img = $request->slug.'.'.$request->file('picture')->extension();\n $request->file('picture')->storeAs('public/stadiums', $img);\n $stadium->picture = $img; \n } \n $stadium->save();\n return redirect()->route('stadiums.show',compact('stadium')) \n ->with('info','Registro actualizado con éxito');\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "72020ca078f39bec759978049b853e74", "score": "0.5576042", "text": "public function testUpdate()\n {\n $model = factory($this->model)->create();\n\n $this->actingAs($this->actingAs, 'api')\n ->putJson(route($this->route . '.update', [$this->route => $model->id]), factory($this->model)->make()->toArray())\n ->assertStatus(200);\n }", "title": "" }, { "docid": "6dd248caa08f860a85ecdb9e66a6e2e1", "score": "0.55740505", "text": "public function update(Request $request, $id)\n\t{\n\n $product = Product::find($id);\n\n $product->fill($request->input())->save();\n//\n// if($product) {\n// $product->availability = $request->get('availability');\n// $product->save();\n// }\n\n return redirect()->route('admin.index');\n\t}", "title": "" }, { "docid": "2a89d1feac056c7a5193aaa3f0606728", "score": "0.557056", "text": "public function update(FormBuilder $formBuilder, Request $request, $course, Resource $resource)\n {\n //\n $form = $formBuilder->create(\\App\\Forms\\Resource::class);\n\n if (!$form->isValid()) {\n return redirect()->back()->withErrors($form->getErrors())->withInput();\n }\n\n // Do saving and other things...\n $resource->title = $request->title;\n $resource->url = $request->url;\n $resource->publish = $request->has('publish');\n $resource->save();\n\n return redirect()->route('resource.show',['course' => $course, 'resource' => $resource->id ]);\n }", "title": "" }, { "docid": "a542dd937d2be5173cc776afe82a0d09", "score": "0.55695087", "text": "public function update( $id, $data = [] )\n {\n // Find the resource record.\n // \n $record = $this->findById( $id );\n\n // Assign the changes that are to be made to the record.\n // \n $record->fill( $data );\n\n // Save the changes.\n // \n $record->save();\n\n // Now return the record.\n // \n return $record;\n }", "title": "" }, { "docid": "6e61f435eead18e460042aeda1d070b2", "score": "0.5562987", "text": "public function update(Request $request, $id)\n {\n $update = Card::find($id);\n $update->image = $request->file('image')->hashName();\n $update->titre=$request->titre;\n $update->description=$request->description;\n $update->save();\n $request->file('image')->storePublicly('images', 'public');\n Storage::disk('public')->delete('images/' . $update->photo);\n return redirect('/card');\n }", "title": "" }, { "docid": "3a66bafe63974860d7521baf3672343a", "score": "0.5562585", "text": "public function update(Request $request)\n {\n $slider = Slider::findOrFail($request->id);\n $file_route = $slider->img;\n if($request->img != null){\n\n $img = $request->file('img');\n $file_route = $request->nombre.'_'.$img->getClientOriginalName();\n Storage::disk('img-slider')->put($file_route, file_get_contents($img->getRealPath()));\n\n }\n $slider->fill($request->all());\n $slider->img = $file_route;\n\n $slider->save();\n return redirect()->to(route('slider.index'));\n }", "title": "" }, { "docid": "edc97c334b427f1077d50deb0ce82b75", "score": "0.55613524", "text": "public function update($id, Requests\\BlogUpdateRequest $request,Storage $storage) {\n //update values in notice\n $blog=Blog::find($id);\n $blog->blog_title = $request->input('blog_title');\n $blog->blog_cont = $request->input('blog_cont');\n if($request->file('blog_img')!=null){\n $image = $request->file( 'blog_img' );\n $timestamp = $this->getFormattedTimestamp();\n $savedImageName = $this->getSavedImageName( $timestamp, $image );\n $savedImageName = 'blog/'.$savedImageName;\n $imageUploaded = $this->uploadImage( $image, $savedImageName, $storage ); \n if ( $imageUploaded )\n {\n $blog->blog_img = $savedImageName;\n }else{\n return redirect('blog/list')\n ->withFlashMessage('Image upload failed!')\n ->withType('danger');\n } \n }\n $blog->save();\n return redirect('blog/list')\n ->withFlashMessage('Blog Updated successfully!')\n ->withType('success');\n }", "title": "" }, { "docid": "419d7e885f0216bf11f82a55cebe051d", "score": "0.5560277", "text": "public function update(Request $request, $id)\n {\n //\n if (\\Gate::allows('canEdit')){\n \n $old_display_image = Product_Image::where('primary', '=', 1)->where('product_id', '=', $request->product_id)->firstOrFail();\n if($old_display_image){\n $update = $old_display_image->update(['primary' => 0]);\n }\n $request->merge(['primary' => 1]);\n $product = Product_Image::where('id', '=', $id)->firstOrFail();\n $update = $product->update($request->all());\n if($update){\n return ['result'=>'success', 'message' =>'Display Image Changed'];\n }else{\n return ['result'=>'error', 'message' =>'Something went wrong.'];\n }\n }else{\n return ['result'=>'error', 'message' =>'Unauthorized! Access Denied'];\n }\n }", "title": "" }, { "docid": "4637f8f3d3bbdf0659cd1e8b2ab0cf05", "score": "0.5560252", "text": "public function update(BookRequest $request, $id)\n {\n $book = Book::findOrFail($id);\n unlink($book->image);\n $image = $request->file('image');\n $fileName = time().\"-\".$image->getClientOriginalName();\n $image->move('img/book_image', $fileName);\n $book->title = $request->title;\n $book->category_id = $request->category_id;\n $book->author_id = $request->author_id;\n $book->publisher_id = $request->publisher_id;\n $book->stock = $request->stock;\n $book->price = $request->price;\n $book->image = \"img/book_image/\".$fileName;\n $book->save();\n return new BookResource($book);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "ae94acbb17e8336020733d9a108826ef", "score": "0.55557597", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required|string|max:100',\n 'price' => 'required|numeric',\n 'photo_url' => 'nullable|image'\n ]);\n\n $product = \\App\\Product::find($id);\n $product->name = $request->input('name');\n $product->price = $request->input('price');\n\n if ($request->hasFile('photo_url')) {\n Storage::delete($product->photo_url);\n $product->photo_url = $request->file('photo_url')->store('public/products');\n }elseif ($request->has('delete_photo')) {\n Storage::delete($product->photo_url);\n $product->photo_url = null;\n }\n\n $product->save();\n\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "012d802cdd39ad4f48a5d0ab5db49368", "score": "0.55530256", "text": "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "title": "" }, { "docid": "0a6ca94a66cd5d73c054b8f785c5c23a", "score": "0.55519474", "text": "public function update(Request $request, $id)\n {\n $data=array();\n $data['product_name']=$request->product_name;\n $data['product_description']=$request->product_description;\n $data['short_description']=$request->short_description;\n $data['regular_price']=$request->regular_price;\n $data['sale_price']=$request->sale_price;\n $data['quantity']=$request->quantity;\n $data['category_id']=$request->category_id;\n $data['discount']=$request->discount;\n $data['color_id']=$request->color_id;\n $data['size_id']=$request->size_id;\n $data['status']=1;\n $data['featured']=$request->featured;\n $image=$request->newphoto;\n if($image){\n $position = strpos($image,';');\n $sub = substr($image,0,$position);\n $ext=explode('/', $sub)[1];\n\n $name=time().\".\".$ext;\n $img=Image::make($image)->resize(240,200);\n $upload_path='backend/product/';\n $img_url=$upload_path.$name;\n $success=$img->save( $img_url);\n if($success){\n \n $data['photo']=$img_url;\n $img=DB::table('products')->where('id',$id)->first();\n if($img->photo){\n $image_path=$img->photo;\n $done=unlink($image_path);\n $user=DB::table('products')->where('id',$id)->update($data);\n }else{\n $user=DB::table('products')->where('id',$id)->update($data);\n }\n \n }\n\n }else{\n $oldphoto=$request->photo;\n $data['photo']=$oldphoto;\n $user=DB::table('products')->where('id',$id)->update($data);\n\n }\n }", "title": "" }, { "docid": "2e70e3c8c0652c5dc988ab9065e4cb75", "score": "0.5550894", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $request->validate([\n 'sku' => 'required',\n ]);\n $input = $request->all();\n if ($files = $request->file('file')) {\n $request->validate([\n 'image' => 'same:image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n ]);\n if(!empty($product->image))\n {\n $oldPath = public_path('/images/products/');\n $image_path = $oldPath.$product->image;\n unlink($image_path);\n }\n $input['image'] = time().'.'.$files->extension();\n\n $destinationPath = public_path('/images/products/');\n $img = Image::make($files->path());\n\n $img->resize(600, 600, function ($constraint) {\n// $constraint->aspectRatio();\n $constraint->upsize();\n });\n $img->save($destinationPath . $input['image']);\n }\n\n $product->update($input);\n\n return redirect()->route('admin.products.edit', $id);\n\n }", "title": "" }, { "docid": "830e83e40b1643f45a7209542d55934a", "score": "0.5539849", "text": "public function updateObjectStorage($options)\n {\n if (in_array($options['object_id'], $this->storage_ids)) {\n $url = $this->api::OBJECT_STORAGE_URL . \"/\" . $options['object_id'];\n } else {\n throw new InvalidParameterException(\"That Storage ID isn't associated with your account\");\n }\n $ba['label'] = $this->d_label;\n (isset($options['label'])) ? $ba['label'] = $options['label'] : null;\n $body = json_encode($ba);\n return $this->api->makeAPICall('PUT', $url, $body);\n }", "title": "" }, { "docid": "72ad50b45baa578aa7f60f62631ac4a0", "score": "0.5539695", "text": "public function update(Request $request, $id)\n {\n if(!empty($request->imgUrl)){\n $imgUrl=$request->file('imgUrl')->move('public/img/item/',$id.\".tmp\");\n }\n Item::find($id)->update([\n 'name'=>$request->name,\n 'price'=>$request->price,\n 'stock'=>$request->stock,\n 'type'=>$request->type,\n 'desc'=>$request->desc,\n ]);\n return redirect('home');\n }", "title": "" }, { "docid": "1c298f72979588b1c24d4f0e69dfa6b7", "score": "0.5537852", "text": "public function update(Request $request, $id)\n {\n if($request->session()->exists('resources')) {\n $resources = $request->session()->get('resources');\n if(isset($resources[$id])) {\n $resource = $resources[$id];\n $idInput = $request->input('id');\n $nameInput = $request->input('name');\n $ageInput = $request->input('age');\n $resource['id'] = $idInput;\n $resource['name'] = $nameInput;\n $resource['age'] = $ageInput;\n if(isset($resources[$idInput])) {\n return back()->withInput();\n } else {\n unset($resources[$id]);\n $resources[$idInput] = $resource;\n $type = 'success';\n $data['type'] = $type;\n }\n $request->session()->put('resources', $resources);\n return redirect('resources');\n }\n }\n return back()->withInput();\n return redirect('resources')->with('message',$message);\n }", "title": "" } ]
6680506fe619298c8d8c9ee29d29039a
Definicion de variables para ejecucion del procedimiento
[ { "docid": "b92b7dea3edf1e28d171f513b5ab6ecd", "score": "0.0", "text": "function insertarVenta(){\r\n\t\t$this->procedimiento='vef.ft_venta_facturacion_ime';\r\n\t\t$this->transaccion='VF_fact_INS';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\r\n\t\t$this->setParametro('id_dosificacion','id_dosificacion','int4');\r\n\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\r\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\r\n\t\t$this->setParametro('id_punto_venta','id_punto_venta','int4');\r\n\t\t$this->setParametro('id_sucursal','id_sucursal','int4');\r\n\t\t$this->setParametro('id_usuario_cajero','id_usuario_cajero','int4');\r\n\t\t$this->setParametro('id_cliente_destino','id_cliente_destino','int4');\r\n\t\t$this->setParametro('transporte_fob','transporte_fob','numeric');\r\n\t\t$this->setParametro('tiene_formula','tiene_formula','varchar');\r\n\t\t$this->setParametro('cod_control','cod_control','varchar');\r\n\t\t$this->setParametro('estado','estado','varchar');\r\n\t\t$this->setParametro('total_venta_msuc','total_venta_msuc','numeric');\r\n\t\t$this->setParametro('otros_cif','otros_cif','numeric');\r\n\t\t$this->setParametro('nro_factura','nro_factura','int4');\r\n\t\t$this->setParametro('observaciones','observaciones','text');\r\n\t\t$this->setParametro('seguros_cif','seguros_cif','numeric');\r\n\t\t$this->setParametro('comision','comision','numeric');\r\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\r\n\t\t$this->setParametro('id_movimiento','id_movimiento','int4');\r\n\t\t$this->setParametro('transporte_cif','transporte_cif','numeric');\r\n\t\t$this->setParametro('correlativo_venta','correlativo_venta','varchar');\r\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\r\n\t\t$this->setParametro('nro_tramite','nro_tramite','varchar');\r\n\t\t$this->setParametro('tipo_cambio_venta','tipo_cambio_venta','numeric');\r\n\t\t$this->setParametro('a_cuenta','a_cuenta','numeric');\r\n\t\t$this->setParametro('contabilizable','contabilizable','varchar');\r\n\t\t$this->setParametro('nombre_factura','nombre_factura','varchar');\r\n\t\t$this->setParametro('excento','excento','numeric');\r\n\t\t$this->setParametro('valor_bruto','valor_bruto','numeric');\r\n\t\t$this->setParametro('descripcion_bulto','descripcion_bulto','varchar');\r\n\t\t$this->setParametro('id_grupo_factura','id_grupo_factura','int4');\r\n\t\t$this->setParametro('fecha','fecha','date');\r\n\t\t$this->setParametro('nit','nit','varchar');\r\n\t\t$this->setParametro('tipo_factura','tipo_factura','varchar');\r\n\t\t$this->setParametro('seguros_fob','seguros_fob','numeric');\r\n\t\t$this->setParametro('total_venta','total_venta','numeric');\r\n\t\t$this->setParametro('forma_pedido','forma_pedido','varchar');\r\n\t\t$this->setParametro('porcentaje_descuento','porcentaje_descuento','numeric');\r\n\t\t$this->setParametro('hora_estimada_entrega','hora_estimada_entrega','time');\r\n\t\t$this->setParametro('id_vendedor_medico','id_vendedor_medico','varchar');\r\n\t\t$this->setParametro('otros_fob','otros_fob','numeric');\r\n\t\t$this->setParametro('fecha_estimada_entrega','fecha_estimada_entrega','date');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" } ]
[ { "docid": "bfb39c4f5ccda73a91a58dce39b2d0d8", "score": "0.6693724", "text": "function conf()\r\n\t{\r\n\t\t$vinculo_cuadro = $this->dep('cuadro')->evento('en_botonera')->vinculo();\r\n\t\t$vinculo_cuadro->agregar_parametro('nota', 'Este parametro se agrego en PHP');\r\n\t\t$vinculo_cuadro->agregar_parametro('dia', 'lunes');\r\n\t\t//Modifico un vinculo en un boton propio\r\n\t\t$vinculo_propio = $this->evento('abrir_en_ventana')->vinculo();\r\n\t\t$vinculo_propio->agregar_parametro('nota', 'Este parametro se agrego en PHP');\r\n\t\t$vinculo_propio->agregar_parametro('dia', 'miercoles');\r\n\t}", "title": "" }, { "docid": "6744fe91621baae841f70e3c00297e6d", "score": "0.65433645", "text": "private function asignaVariables() {\n\t\tforeach (get_object_vars($this) as $_nombre => $_valor )\n\t\t\t$$_nombre = $_valor;\n\t}", "title": "" }, { "docid": "94c8c089d6a5f30f97da1def01d6a8e8", "score": "0.64995563", "text": "public function setVariables(){\n\t\t// Initial sample storage data\n\t\t$this->input = array(\n\t\t\t\n\t\t\t'name' => 'Bob Tzhebuilder',\n\t\t\t'phone_no' => '0728765432',\n\t\t\t'email' => '[email protected]',\n\t\t\t'physical_address' => '788347 W3-x2 Down.croncrete',\n\t\t\t\n\t\t);\n\n\t\t// Edition sample data\n\t\t$this->inputUpdate = array(\n\t\t\t\n\t\t\t'name' => 'Bob Thebuilder',\n\t\t\t'phone_no' => '0728765432',\n\t\t\t'email' => '[email protected]',\n\t\t\t'physical_address' => '788347 W3-x2 Down.croncrete',\n\t\t\t\t\t\t\n\t\t);\n\t}", "title": "" }, { "docid": "c18720ff1f78ab8e3482ecd07fd3e587", "score": "0.6220499", "text": "private function inicializarParametros() {\r\n \r\n //Verifica se os parametro existem, senão iniciliza todos\r\n\t\t$this->view->parametros->tipo_pessoa = isset($this->view->parametros->tipo_pessoa) ? $this->view->parametros->tipo_pessoa : \"J\" ; \r\n\r\n $this->view->parametros->nm_usuario = $_SESSION['usuario']['nome'];\r\n\r\n //viariavel para popular combo de obrigação Financeira de Desconto\r\n $this->view->parametros->obrigacaoFinanceiraDesconto = $this->dao->buscarObrigacaoFinanceiraDesconto();\r\n\r\n //variavel que seta usuario que icluiu crédito futuro\r\n $this->view->parametros->usuarioInclusaoCreditoFuturo = $this->dao->buscarUsuarioInclusaoCreditoFuturo();\r\n\r\n $this->view->parametros->motivoDoCredito = $this->dao->buscarMotivoDoCredito();\r\n\r\n $this->view->parametros->usuariosAprovadores = $this->dao->obterUsuariosAprovacao($_SESSION['usuario']['depoid']);\r\n \r\n }", "title": "" }, { "docid": "2c3f795eb4ee4eaf41b57979ff664f07", "score": "0.61993957", "text": "public function setVariables(){\n\t\t// Initial sample storage data\n\t\t$this->input = array(\n\t\t\t'patient_number' => '6666',//Must be unique!\n\t\t\t'name' => 'Bob Tzhebuilder',\n\t\t\t'dob' => '1930-07-05',\n\t\t\t'gender' => '0',//male\n\t\t\t'email' => '[email protected]',\n\t\t\t'address' => '788347 W3-x2 Down.croncrete',\n\t\t\t'phone_number' => '+189012402938',\n\t\t);\n\n\t\t// Edition sample data\n\t\t$this->inputUpdate = array(\n\t\t\t'patient_number' => '5555',\n\t\t\t'name' => 'Bob Thebuilder',\n\t\t\t'dob' => '1900-07-05',\n\t\t\t'gender' => '0',//male\n\t\t\t'email' => '[email protected]',\n\t\t\t'address' => '788357 W3-x2 Down.croncrete',\n\t\t\t'phone_number' => '+18966602938',\n\t\t);\n\t}", "title": "" }, { "docid": "6c9f5487fec0e2c09b33608fabe508b4", "score": "0.61815673", "text": "function iniciarsesion(){}", "title": "" }, { "docid": "aec05ec2578843dc6fe0e04db7bfc810", "score": "0.6175637", "text": "public function prepareVars()\n {\n $this->vars['service'] = new Services();\n $this->vars['packages'] = $this->model->packages;\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n $this->vars['weight'] = Weight::orderBy('id')->get();\n $this->vars['postTypes'] = PostType::orderBy('id')->get();\n $this->vars['packageTypes'] = PackageType::orderBy('id')->get();\n $this->vars['insuranceTypes'] = InsuranceType::orderBy('id')->get();\n $this->vars['distributionTimes'] = DistributionTime::orderBy('id')->get();\n $this->vars['specialServices'] = SpecialService::orderBy('id')->get();\n }", "title": "" }, { "docid": "f0d5fa68c9b74a7ac020af4879c8a4d5", "score": "0.6140902", "text": "function services(){\r\n\t\t$this->pid \t\t= $_REQUEST[pid];\r\n\t\t$this->ppwd\t\t= $_REQUEST[ppwd];\r\n//\t\t$this->user_id\t= $_REQUEST[user_id];\r\n\t\t$this->user_id\t= $_REQUEST[userid];\r\n\t}", "title": "" }, { "docid": "cb54582fd88b702498d9ca683b4b6c7c", "score": "0.613406", "text": "public function initVars()\n\n {\n $this->listaProfesores = profesor::getListaProfesor();\n $this->setVar('listaProfesores', $this->listaProfesores);\n }", "title": "" }, { "docid": "71f0b66699eca87ed0872cfbd28c62c6", "score": "0.6060433", "text": "public function __construct() {\n $this->servidor = 'localhost'; \n $this->usuario = 'angel2';\n $this->clave = '1234';\n $this->basedatos = 'contenedor'; //qqk474';\n }", "title": "" }, { "docid": "660832f88e0509d5085c4879c7c08d8f", "score": "0.602319", "text": "function propostas()\r\n{\r\n\r\n$this->database = Database::getDb();\r\n\r\n}", "title": "" }, { "docid": "af3a6f4392427c271aea08c9c7de5113", "score": "0.6022277", "text": "function cl_protprocesso() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"protprocesso\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "3838b50a0bc52a7cedec605802614228", "score": "0.6015663", "text": "protected function apagado()\n {\n }", "title": "" }, { "docid": "a5b5c954c011810f510ce91b306c5043", "score": "0.59968805", "text": "function __construct($lista_variables,$lista_valores){\n\n //asignación de valores de parámetro a los atributos de la clase\n $this->lista_variables = $lista_variables;\n $this->lista_valores=$lista_valores;\n $this->pinta();\n }", "title": "" }, { "docid": "3d6889c7f0e5199dae54c5ec818878a0", "score": "0.59946316", "text": "function cl_processoforopartilha() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"processoforopartilha\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "511020a807259e1a1b0b14e56326c1fb", "score": "0.5979382", "text": "function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id))\n {\n $this->id = $id;\n }\n if (isset($mode))\n {\n $this->mode = $mode;\n }\n if (isset($view_mode))\n {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode))\n {\n $this->edit_mode = $edit_mode;\n }\n if (isset($data_source))\n {\n $this->data_source = $data_source;\n }\n if (isset($tab))\n {\n $this->tab = $tab;\n }\n }", "title": "" }, { "docid": "6487f5e8fc8da1321bebdcf0703581f8", "score": "0.5965972", "text": "function cl_procjurjudicialadvog() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"procjurjudicialadvog\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "824ae06a078c30c5a6d8a298441eb5f2", "score": "0.5962816", "text": "public function Opciones() {\n \n }", "title": "" }, { "docid": "29400c9ccd3cee0493d68c77981b4ab5", "score": "0.59568053", "text": "public function definir_parametros() {\n \tif (session_status() == PHP_SESSION_NONE) {\n \t session_start();\n \t}\n //Si existe $_SESSION['logeado'] volcamos su valor a la variable, si no existe volcamos false. Si vale true es que estamos logeado.\n $logeado = isset($_SESSION['logeado'])? $_SESSION['logeado']: false;\n /*En caso de no este logeado redirigimos al login, en caso contrario le damos la bienvenida*/\n if (!$logeado) {\n return $this->redirect('/');\n }\n\n $this->loadModel('Profesor');\n $idAsignatura = $_GET['idAsig'];\n\n $esCoordinador = $this->Profesor->esCoordinador($idAsignatura, $_SESSION['id']);\n /*En caso de no este logeado redirigimos a index.php, en caso contrario le damos la bienvenida*/\n if (!$esCoordinador) {\n return $this->redirect('/asignaturas/index');\n }\n\n $this->loadModel('Asignatura');\n $nombreAsignatura = $this->Asignatura->cargaAsignatura($idAsignatura)['nombre'];\n\n //Obtenemos los parametros que tienen los examenes de esta asignatura y\n \t// los ponemos en sus respectivas variables\n \t$paramExam = $this->Profesor->selectParametrosAsig($idAsignatura);\n \t$puntosTema = json_decode($paramExam['puntos_tema'], true);\n \t$espaciado = $paramExam['espaciado_defecto'];\n \t$textoInicial = $paramExam['texto_inicial'];\n\n $this->set('idAsignatura', $idAsignatura);\n $this->set('paramExam', $paramExam);\n $this->set('puntosTema', $puntosTema);\n $this->set('espaciado', $espaciado);\n $this->set('textoInicial', $textoInicial);\n $this->set('nombreAsignatura', $nombreAsignatura);\n }", "title": "" }, { "docid": "30800dfca813a4433cd63302792bdc40", "score": "0.5949668", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "30800dfca813a4433cd63302792bdc40", "score": "0.5949668", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "30800dfca813a4433cd63302792bdc40", "score": "0.5949668", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "30800dfca813a4433cd63302792bdc40", "score": "0.5949668", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "30800dfca813a4433cd63302792bdc40", "score": "0.5949668", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "228582e49b9b8a3ea07b4404b599142d", "score": "0.5936984", "text": "public function __construct(){\n\t\t$this->vars = array();\n\t}", "title": "" }, { "docid": "5e19e7e1d2dee3a35729b844148baee4", "score": "0.5925427", "text": "protected function set_params() {}", "title": "" }, { "docid": "f4ed465c3c4d90926ae8f4797622a3b0", "score": "0.592502", "text": "public function __construct()\n {\n $this->variables = [];\n }", "title": "" }, { "docid": "a12b572f0b5c9b6b883e70e618323b8a", "score": "0.591974", "text": "function set_variables() {\n\t\t\n\t\t// Check constants\n\t\tif (!defined('OAUTH_DB_TYPE')) define('DB_TYPE', null);\n\t\tif (!defined('OAUTH_CLASS_PATH')) define('DB_TYPE', 'classes/');\n\t\tif (!defined('OAUTH_INC_PATH')) define('DB_NAME', 'inc/');\n\t\t\n\t\t// Set variables\n\t\t$this->db_type = OAUTH_DB_TYPE;\n\t\t$this->class = OAUTH_CLASS_PATH;\n\t\t$this->inc = OAUTH_INC_PATH;\n\t\t\n\t}", "title": "" }, { "docid": "094d553e71cc293e994b7f7168e0070a", "score": "0.5918291", "text": "private function init(): void\n {\n $name = 'some name';\n $status = 10;\n $this->name = $name;\n $this->status = $status;\n }", "title": "" }, { "docid": "0c73e8bf1787518cbdafc0ee429984b7", "score": "0.5917032", "text": "function cl_conlancaminscrestosapagarnaoprocessados() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conlancaminscrestosapagarnaoprocessados\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "7a93b641143523001b3011d6a360c2c6", "score": "0.59139293", "text": "function __construct() {\n\t\t$this->id_docente;\n\t\t$this->nome_docente;\n\t\t$this->siape_docente;\n\t\t$this->email_docente;\n\t\t$this->efetivo_docente;\n\t}", "title": "" }, { "docid": "30c4c82eb8fedbd970a0749cda4fa173", "score": "0.59109795", "text": "public function promeniStilIvice (){\n\n \t}", "title": "" }, { "docid": "182aa6c68d150e1b74333e4d21deed0b", "score": "0.5907781", "text": "protected function prepareVars()\n {\n }", "title": "" }, { "docid": "d3f9005dab9ec0e6b4307c1d678439eb", "score": "0.59004885", "text": "protected function assignVars() {}", "title": "" }, { "docid": "030c3e9dcfa6c0bbd78ed91b07482b66", "score": "0.5892295", "text": "function cl_avaliacaoestruturafrequencia() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"avaliacaoestruturafrequencia\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "ed2a41dda7acff9c4e684327f4ee7d4c", "score": "0.5882382", "text": "function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }", "title": "" }, { "docid": "891711bec89b04b70477e01d63faa6a9", "score": "0.5880435", "text": "function cl_lab_requisicao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"lab_requisicao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "213be231bd1d881a7fbc360687a9d46e", "score": "0.58575875", "text": "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->etiqueta=$_POST['etiqueta'];\n\t\t$this->padre=$_POST['padre'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->descripcion=$_POST['contenido'];\n\t\t$this->claves=$_POST['claves'];\n\t}", "title": "" }, { "docid": "1d1101895b32e979892226548e00b30f", "score": "0.58344203", "text": "public function setup_variables()\n {\n $this->externalLoggers = array();\n $this->externalDropins = array();\n $this->instantiatedLoggers = array();\n $this->instantiatedDropins = array();\n\n $this->plugin_basename = SIMPLE_HISTORY_BASENAME;\n }", "title": "" }, { "docid": "25dcf9b14fe09c0f15cc41c455209c73", "score": "0.5827609", "text": "function __construct() {\n\t\tparent::__construct();\n\t\t$this->PaiementInscription = ClassRegistry::init('PaiementInscription');\n\t\t$this->Facture = ClassRegistry::init('Facture');\n\t\t$this->Paiement = ClassRegistry::init('Paiement');\n\t}", "title": "" }, { "docid": "6ec0fd628a109dbc270509ece8f39da8", "score": "0.5817168", "text": "protected function initSpecificVariables()\n {\n $this->_setCgFormats(\n array(\n \"NHibernate C# DO\",\n \"NHibernate XML\",\n )\n );\n\n $this->_setCgHandlers(\n array(\n \"_handleNHibernateCSBody\",\n \"_handleNHibernateXMLBody\",\n )\n );\n }", "title": "" }, { "docid": "3582f2967c9eed4696835bfc3de6ed03", "score": "0.5811918", "text": "function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n global $action;\n if (isset($action)) {\n $this->action = $action;\n }\n }", "title": "" }, { "docid": "11143a54d33c3d04df7bf1f86f4e37d7", "score": "0.58117175", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "11143a54d33c3d04df7bf1f86f4e37d7", "score": "0.58117175", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "11143a54d33c3d04df7bf1f86f4e37d7", "score": "0.58117175", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "11143a54d33c3d04df7bf1f86f4e37d7", "score": "0.58117175", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "3c891fdf37d596c31f281a4d821c8c6f", "score": "0.5806991", "text": "public function initData(){\n self::$OFICINAS = revisar_oficinas($this);\n self::$ROLES = revisar_roles($this, 0);\n self::$PRIVILEGIOS = revisar_privilegios($this, 0); \n self::$PERMISOS = revisar_permisos(self::$PRIVILEGIOS, 'operaciones/tipoaeronave');\n }", "title": "" }, { "docid": "e19e5e6cf9f7be4081f6e067dd8eb67b", "score": "0.57959086", "text": "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }", "title": "" }, { "docid": "7ced3f13c667f06be6d07d734f70083d", "score": "0.57927513", "text": "function cl_solicitalog() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"solicitalog\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "3a2cb866bb8cd5457e48945b1cc2e2a8", "score": "0.5784282", "text": "function cl_rhdepend() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhdepend\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "f900bd5d419377f7f92d24e9cdcb35b3", "score": "0.5773645", "text": "function getParams()\r\n {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id = $id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode = $mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode = $view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode = $edit_mode;\r\n }\r\n if (isset($tab)) {\r\n $this->tab = $tab;\r\n }\r\n }", "title": "" }, { "docid": "f5a028cc6b2e3ec3b49305fa01b88c71", "score": "0.57601714", "text": "function cl_conplanoextra() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanoextra\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "a412fee31312dea0570ac14a78d15eac", "score": "0.5758548", "text": "function cl_integracaohorusenvio() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"integracaohorusenvio\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "d6a3706bd5f4fa62d6e1cdca57691c99", "score": "0.5752279", "text": "protected function setMainInstances(){\n\n //dependencia de configuracion principal\n $this->config=$this->container['config'];\n //variables globales de aplicacion\n $this->globals=$this->config->globals();\n //instanciamos gestor de usuarios\n $this->validation['rules']=$this->container['validation-rules'];\n //instanciamos checador de reglas\n $this->validation['check']=$this->container['validation-check'];\n //instanciamos vistas dinamicas de twig\n $this->twig=$this->container['twig'];\n\n }", "title": "" }, { "docid": "95419f5fc05950f0b5cedfc315429a2a", "score": "0.574518", "text": "public function initData(){\n\n self::$OFICINAS = revisar_oficinas($this);\n self::$ROLES = revisar_roles($this, 0);\n self::$PRIVILEGIOS = revisar_privilegios($this, 0); \n self::$PERMISOS = revisar_permisos(self::$PRIVILEGIOS, 'operaciones/aeronave'); \n }", "title": "" }, { "docid": "81c78036af41297e1cdeeb1995eab498", "score": "0.57384425", "text": "function defineVariables() {\n\n // Invoke the dynamic description of the position form\n // if ((int)$this->pos->ID) $this->formDescription = new bList_formDescription($this->pos->ID);\n\n $this->defineVariable(array('_ap_email' => 'E-mail',\n\t\t\t\t'_ap_firstname' => 'First Name',\n\t\t\t\t'_ap_lastname' => 'Last Name',\n\t\t\t\t'_ap_year_of_birth' => 'Year of birth',\n\t\t\t\t'_ap_citizenship' => 'Citizenship',\n\t\t\t\t'_ap_ms_country' => 'Master degree country',\n\t\t\t\t'_ap_ms_institute' => 'Master degree awarded by -SKIP- (Institution)',\n\t\t\t\t'_ap_ms_year' => 'Master degree year',\n\t\t\t\t'_ap_phd_country' => 'PhD degree country',\n\t\t\t\t'_ap_phd_institute' => 'PhD degree awarded by -SKIP- (Institution)',\n\t\t\t\t'_ap_phd_year' => 'PhD degree year',\n\t\t\t\t'_ap_institute' => 'Present Institution',\n\t\t\t\t'_ap_position' => 'Present Position',\n\t\t\t\t'_ap_phone' => 'Phone',\n\t\t\t\t'_ap_place_of_birth' => 'Place of birth',\n\t\t\t\t'_ap_residentship' => 'Country',\n\t\t\t\t'ap_posid' => 'Position',\n\t\t\t\t'ap_rfid' => 'Research field',\n\t\t\t\t'ap_rating' => 'Rating',\n\t\t\t\t'ap_status' => 'Application status',\n\t\t\t\t'ap_ip' => 'Application IP-address',\n\t\t\t\t'ap_advisor_avid' => 'PhD advisor',\n\t\t\t\t'ap_comment' => '&nbsp;',\n\t\t\t\t'ap_avid' => 'ap_avid',\n\t\t\t\t'ap_dossier_url' => 'ap_dossier_url',\n\t\t\t\t'ap_submitdate' => 'ap_submitdate',\n\t\t\t\t'DOSSIER' => 'DOSSIER',\n\t\t\t\t'submitdate' => 'submitdate',\n\t\t\t\t), True);\n\n if ((int)$this->ID) $type = 'isMBE';\n else $type = 'isVITAL';\n\n\n $this->defineTypes(array($type => array('_ap_email',\n\t\t\t\t\t '_ap_firstname',\n\t\t\t\t\t '_ap_lastname')));\n $this->defineTypes(array( 'isMBE'=> array_merge(array(), // array_keys(self::$ap2av),\n\t\t\t\t\t\t array('ap_comment',\n\t\t\t\t\t\t\t 'ap_status',\n\t\t\t\t\t\t\t 'ap_advisor_avid',\n\t\t\t\t\t\t\t '_ap_position',\t\t\t\t\t\t\n\t\t\t\t\t\t\t '_ap_phd_institute',\n\t\t\t\t\t\t\t '_ap_phd_country',\n\t\t\t\t\t\t\t '_ap_phd_year',\n\t\t\t\t\t\t\t '_ap_place_of_birth',\n\t\t\t\t\t\t\t '_ap_phone')),\n\t\t\t //'isVITAL' => array('ap_posid'),\n\t\t\t 'isRO' => array('ap_ip',\n\t\t\t\t\t\t 'ap_submitdate',\n\t\t\t\t\t\t 'ap_dossier_url',\n\t\t\t\t\t\t 'ap_rating',\n\t\t\t\t\t\t 'ap_status' => !$this->isManager(),\n\t\t\t\t\t\t ),\n\t\t\t 'expected_ext'=> array('DOSSIER'=>JAM_docs_ext),\n\t\t\t ));\n // Define the RO & MBE depending the position settings \n // (seem to be wrong...)\n if (!(int)$this->ID && is_object($this->pos)){\n $this->defineTypes(array('isMBE' => array('_ap_ms_year' => !$this->pos->require_MS(),\n\t\t\t\t\t\t'_ap_ms_country' => !$this->pos->require_MS(),\n\t\t\t\t\t\t'_ap_ms_institute' => !$this->pos->require_MS(),\n\t\t\t\t\t\t'_ap_phd_year' => !$this->pos->require_PhD(),\n\t\t\t\t\t\t'_ap_phd_country' => !$this->pos->require_PhD(),\n\t\t\t\t\t\t'_ap_phd_institute'=> !$this->pos->require_PhD())));\n }\n }", "title": "" }, { "docid": "c175aa1ecb0f132a670ddd600727930f", "score": "0.57367945", "text": "public function __construct()\r\n {\r\n //Se asignan los valores a los atributos de la clase a partir de las variables definidas en el fichero de \r\n //configuracion \r\n $this->servidor = SERVIDOR;\r\n $this->puerto = PUERTO_BD;\r\n $this->usuario = USUARIO_BD;\r\n $this->contrasena = CLAVE_BD;\r\n $this->base_datos = NOMBRE_BD;\r\n $this->id_conexion = null;\r\n $this->resultado = null;\r\n\r\n $this->limit = FILAS_POR_PAGINA; \r\n \r\n }", "title": "" }, { "docid": "ba75832785cd83eeab86e8550784f2ae", "score": "0.5736168", "text": "public function __construct(){\n\t\t\t$this->nro_informe_inspeccion = \"\";\n\t\t\t$this->idtsolicitud_certificacion_renovacion = \"\";\n\t\t\t$this->fecha_asignacion = \"\";\n\t\t\t$this->nombre_usu = \"\";\n\t\t\t$this->observacion = \"\";\n\t\t\t$this->estatus = \"\";\n\t\t}", "title": "" }, { "docid": "8e879abe73697c49a0686e877d000547", "score": "0.5734107", "text": "function objetBDDparamInit()\n{\n global $ObjetBDDParam, $DEFAULT_formatdate, $OBJETBDD_debugmode, $FORMATDATE;\n if (! isset($DEFAULT_formatdate)) {\n $DEFAULT_formatdate = \"fr\";\n }\n if (! isset($OBJETBDD_debugmode)) {\n $OBJETBDD_debugmode = 1;\n }\n /**\n * Preparation des parametres pour les classes heritees de ObjetBDD\n */\n if (! isset($ObjetBDDParam)) {\n $ObjetBDDParam = array();\n }\n if (! is_array($ObjetBDDParam)) {\n $ObjetBDDParam = array();\n }\n if (isset($FORMATDATE)) {\n $ObjetBDDParam[\"formatDate\"] = $FORMATDATE;\n } else {\n $ObjetBDDParam[\"formatDate\"] = $DEFAULT_formatdate;\n }\n\n $ObjetBDDParam[\"debug_mode\"] = $OBJETBDD_debugmode;\n $_SESSION[\"ObjetBDDParam\"] = $ObjetBDDParam;\n}", "title": "" }, { "docid": "5a690baab869fd3f30a40203cc182f39", "score": "0.57326573", "text": "public function __construct()\n { //inicializacion de los parametros de la conexion a la base datos mysql\n\n $this->localhost = 'localhost';\n $this->usuario = 'root';\n $this->password = '123456';\n $this->bd = 'PRUEBA';\n }", "title": "" }, { "docid": "d7c248b8ab51250126093da18d614b6a", "score": "0.57318914", "text": "abstract public function getVariatonData();", "title": "" }, { "docid": "90a8854725d5546ac5608a3051bcda66", "score": "0.5729207", "text": "public function __construct()\n {\n //нельзя передавать никакие параметры в конструктор, даже если в событие передаются!!!\n }", "title": "" }, { "docid": "f0d97238dee7c56f5bc7abf4926d72ee", "score": "0.57251596", "text": "public function ejecutarCompra(){\r\n }", "title": "" }, { "docid": "060e23c2e534e032c218e58aeff9babb", "score": "0.56908345", "text": "function cl_empreendimentoatividadeimpacto() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empreendimentoatividadeimpacto\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "87c188ecacc94a55438e1c6a0e7514c7", "score": "0.56761014", "text": "public function __construct()\n {\n// $this->sendEmail = $sendEmail;\n// $this->name = $name;\n// $this->email = $email;\n// $this->message = $message;\n }", "title": "" }, { "docid": "c5ee4aaf6691c84179af89ee9167cdb1", "score": "0.5675898", "text": "public function postProcess(){\n // Stockage en base de donnee des champs abonnnement.\n $this->postProcessAbo();\n\n // Pour manipuler les autres variables addresses, villes etc...\n // il faut contruire une nouvelle methode\n // Exemple : $this->postProcessAddress()\n }", "title": "" }, { "docid": "a29f4f67d3ee9e5c94728d6211a9a9f4", "score": "0.5670591", "text": "function cl_solicita() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"solicita\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "182b921def577d6cc0f89474219d59b9", "score": "0.5660499", "text": "public function DevuelveProductos()\n {\n parent::__construct();\n //estoy ejecutando el constructor de la clase conexion;\n //realmente ejecuta todo el codigo de la conexion\n\n }", "title": "" }, { "docid": "44b9c9552bc25130279e56b440a9a8b4", "score": "0.5658577", "text": "protected function setVars(){\n $this->setGlobals(self::getInitialVars());\n }", "title": "" }, { "docid": "6b607ac821b3ffcb5e3bf5bdd29a23b0", "score": "0.564468", "text": "function init(){\n $this->server = $_SERVER; // real server data\n $this->cookie = $_COOKIE; // real cookie data\n $this->vars = array_merge($_GET, $_POST, $_FILES); // real http data\n }", "title": "" }, { "docid": "846e2381d9a93d9161d92083669d958d", "score": "0.56389064", "text": "private function findVariables()\n {\n if (isset($_POST['documentId'])) {\n $dokument = $this->modelManager->find(Document::class, $_POST['documentId']);\n\n if (!empty($dokument)) {\n $this->order = $dokument->getOrder();\n $this->customer = $dokument->getOrder()->getCustomer();\n return;\n }\n }\n\n if (isset($_POST['orderId'])) {\n $order = $this->modelManager->find(Order::class, $_POST['orderId']);\n\n if (!empty($order)) {\n $this->order = $order;\n $this->customer = $order->getCustomer();\n return;\n }\n }\n\n if (isset($_POST['orderNumber'])) {\n $this->setOrderByNumber($_POST['orderNumber']);\n if (null !== $this->order) {\n $this->customer = $this->order->getCustomer();\n return;\n }\n }\n\n //BatchProcess (1 Order)\n if (isset($_POST['number']) && $this->frontProxy->Request()->getActionName() == 'batchProcess') {\n $this->setOrderByNumber($_POST['number']);\n if (null !== $this->order) {\n $this->customer = $this->order->getCustomer();\n return;\n }\n }\n\n //BatchProcess (Multiple Orders)\n if (isset($_POST['orders'])) {\n $this->setOrderByNumber($_POST['orders'][$this->orderCounter]['number']);\n $this->orderCounter++;\n if (null !== $this->order) {\n $this->customer = $this->order->getCustomer();\n return;\n }\n }\n\n //Registration\n if (isset($_POST['register']['personal']['email'])) {\n $this->setUserByEmail($_POST['register']['personal']['email']);\n }\n }", "title": "" }, { "docid": "2acd2d460610a49063a3848b95c9eb19", "score": "0.5635997", "text": "abstract function init($variables);", "title": "" }, { "docid": "4295da1774e022c1353b8f2f8bc2eb39", "score": "0.5632426", "text": "function __construct()\n {\n $this->id = 0;\n $this->nom = \"\";\n $this->prenom = \"\";\n $this->date_naissance = new DateTime();\n $this->moyen = 0;\n $this->appreciation = \"\";\n $this->id_classe = 0;\n \n }", "title": "" }, { "docid": "0bb14af332b439b4c39bdfc6d77d0af7", "score": "0.56321865", "text": "public function __construct() {\n $this->nombre = \"Antonio Almeida\";\n $this->email = \"[email protected]\";\n }", "title": "" }, { "docid": "8985c98cc8ebf0c699efda3bbceeef6f", "score": "0.5630899", "text": "function requestVars(){\n $this->source = &$_REQUEST; // construct our source as _REQUEST, by default\n }", "title": "" }, { "docid": "81692eb9e780070634f9e70c12c2a4c9", "score": "0.5628358", "text": "function asignar_valores(){\n\t\t$this->titulo=$_POST['titulo'];\n\t\t$this->estrellas=$_POST['estrellas'];\n\t\t$this->comentario=$_POST['comentario'];\n\t\t$this->fecha=$this->convertir_fecha($_POST['fecha']);\n\t}", "title": "" }, { "docid": "38d084d9a810530f04239bc038454e5d", "score": "0.5627734", "text": "public function __construct()\r\n {\r\n $this->id_ruta = mt_rand(0, 10000000);\r\n SessionController::guardarVariable('id_ruta', $this->id_ruta);\r\n SessionController::guardarVariable(\"info\", '');\r\n\r\n if (isset($_POST['x_c']) && isset($_POST['y_c'])) {\r\n $this->controlador = $_POST['x_c'];\r\n $this->metodo = $_POST['y_c'];\r\n Route::index();\r\n } else {\r\n if (isset($_GET['x_c']) && isset($_GET['y_c'])) {\r\n $this->controlador = $_GET['x_c'];\r\n $this->metodo = $_GET['y_c'];\r\n Route::index();\r\n } else {\r\n $msj = array(\"tipo_mensaje\" => \"E9999\", \"mensaje\" => \"No se recibieron las variables!\", \"codigoerror\" => \"9999\", \"mensajeerror\" => \"No se recibieron las variables!\");\r\n return $this->setResponse(json_encode($msj));\r\n }\r\n }\r\n }", "title": "" }, { "docid": "3522888935a605f9e14003c0b62bc53d", "score": "0.56276107", "text": "public function Graficos()\n {\n $this->ini(); //En el constructor se inicializan todos los requerimientos de la clase BD.\n }", "title": "" }, { "docid": "25978d83d9e99479d5acec1fd7f9f21a", "score": "0.5625854", "text": "public function __construct()\n {\n // $this->variable = 1;\n }", "title": "" }, { "docid": "e61590208a38771f09b06e523d2195ac", "score": "0.5625461", "text": "public function __construct(){\n\t\t$this->inputs();\n\t}", "title": "" }, { "docid": "61a93e8c13940ab2d1e8357762300bce", "score": "0.56225705", "text": "public function __construct()\r\n {\r\n $this->setParametrosDinamicosStrategy( new PluginParametrosDinamicosSession() );\r\n }", "title": "" }, { "docid": "b2f3691f0a0e61e2eb762d59f8ae7f29", "score": "0.56174415", "text": "function cl_rhparam() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhparam\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "317a2d489fec1b0a20dcac0d436c9db3", "score": "0.5613033", "text": "public function __construct()\n {\n $this->Session = new Session();\n $this->Views = new View();\n $this->Email = new Email();\n $this->Form = new Form($this);\n $this->Service = new Service();\n $this->Img = new Img();\n $this->Request = new Request();\n \n }", "title": "" }, { "docid": "10b92b602f644f35243618ca29c1d940", "score": "0.5608748", "text": "function __construct(){\n\t\t\t$this->InformacionAduanera = new CFDInformacionAduanera();\n\t\t\t$this->CuentaPredial = new CFDCuentaPredial();\n\t\t}", "title": "" }, { "docid": "4e6535fd152bc31af9427371629bb01c", "score": "0.5604992", "text": "public function __construct() {\n\t\ttry {\n\t\t\t$this->idc = Connexion::connect();\n\n\t\t//les requetes AVEC PARAMETRES sont préparées si la connexion est valide\n\t\t\t$this->reqChangeEtat = $this->idc->prepare('UPDATE vehicule SET etatV=:etatV WHERE numV=:numV;');\n\t\t\t//$this->reqGetEtat = $this->idc->prepare('SELECT etatV from vehicule WHERE numV=:numV;');\n\n\t\t} catch ( PDOException $e ) {\n\t\t\techo \"<h1>probleme access BDD</h1>\";\n\t\t}\n\t}", "title": "" }, { "docid": "d5018ba43b9d23e2473e58ebd9e73bd2", "score": "0.5601371", "text": "function cl_db_syscadproced() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_syscadproced\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "894cdf1e888c98ac330659cb541515ec", "score": "0.55989504", "text": "function cl_pcprocitem() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"pcprocitem\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "75b18c95d5c9a61e72b5b53bfb1142d9", "score": "0.5598943", "text": "private function setup()\n {\n /** Dados extras do Beneficiario **/\n $this->beneficiarioNome = env('BENEFICIARIO_NOME');\n $this->beneficiarioEndereco = env('BENEFICIARIO_ENDERECO');\n $this->beneficiarioCep = env('BENEFICIARIO_CEP');\n $this->beneficiarioUf = env('BENEFICIARIO_UF');\n $this->beneficiarioCidade = env('BENEFICIARIO_CIDADE');\n $this->beneficiarioDocumento = env('BENEFICIARIO_DOCUMENTO');\n\n /** Dados bancarios **/\n $this->beneficiarioAgencia = env('BENEFICIARIO_AGENCIA');\n $this->beneficiarioContaCorrente = env('BENEFICIARIO_CONTACORRENTE');\n $this->beneficiarioPosto = env('BENEFICIARIO_POSTO');\n $this->beneficiarioCarteira = env('BENEFICIARIO_CARTEIRA');\n $this->beneficiarioEspeciedoc = env('BENEFICIARIO_ESPECIEDOC');\n\n $this->beneficiario = new Pessoa(\n [\n 'nome' => $this->beneficiarioNome,\n 'endereco' => $this->beneficiarioEndereco,\n 'cep' => $this->beneficiarioCep,\n 'uf' => $this->beneficiarioUf,\n 'cidade' => $this->beneficiarioCidade,\n 'documento' => $this->beneficiarioDocumento,\n ]\n );\n\n //Inicializando propriedades para garantir que existirao no momento da geracao do boleto\n $this->descDemonstrativo = [];\n $this->instrucoesCobranca = [];\n $this->dataVencimento = new \\Carbon\\Carbon();\n }", "title": "" }, { "docid": "5f0073e80f0de36814e1fb9dccb1b800", "score": "0.5598645", "text": "public function __construct(){\n //this hace referencia al contexto de la clase BD\n $this->host = 'localhost';\n $this->baseDatos = 'makeyourplan';\n $this->usuario = 'root';\n $this->password = '';\n $this->charset = 'utf8';\n }", "title": "" }, { "docid": "f3f5a6427dbba6a2c1d30b0bbb6ba248", "score": "0.5598021", "text": "function cl_empagenotasordem() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empagenotasordem\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "8ddd9c18e699b094dc4a444d35964ed2", "score": "0.5596724", "text": "function cl_empagemod() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empagemod\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "50207dcb443fbfd8f5cd3f392bb4c6ba", "score": "0.55950403", "text": "public function __construct()\n {\n $this->prodi_sekolah = new ProdiSekolah;\n $this->sekolah = new Sekolah;\n $this->program_keahlian = new ProgramKeahlian;\n $this->user = new User;\n }", "title": "" }, { "docid": "9f600bc2d753e81938d8fb83e87c4ffb", "score": "0.5594714", "text": "private function __construct() {\n self::$variable = array();\n }", "title": "" }, { "docid": "aef5acfcae6ef22abcd5b400cb122fb9", "score": "0.5584644", "text": "private function init(){\r\n\t\t\t$this->oLogger = Logger::getRootLogger();\r\n\t\t\t$this->oLogger->debug( \"<------------------------------------------------------------------------>\" );\t\t\t\r\n\t\t\t/** desactivamos log si se solicita en la configuracion */\r\n\t\t\t//if ( OS_MODE!='development' && $this->getConfigSystem()->getKeyData('debug')=='false')\r\n\t\t\t//\t$this->oLogger->shutdown();\r\n\t\t\t\t\t\t\r\n\t\t\t/** conectamos a bbdd */\r\n\t\t\t$this->oConnection->getConnection();\r\n\t\t\tif ( !$this->oConnection->isConnected() )\r\n\t\t\t\tdie (\"Imposible continuar, hay un error en la conexion al servidor de base de datos\");\r\n\t\t\t//$this->oLogger->info( \"Conectando al servidor de datos\");\r\n\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t/** refrescamos datos de la conexion de la sesion */\r\n\t\t\tUtils_OS::registrySession($this->oConnection, array('session'=>$this->idSession,'fecha_actualizacion'=>date(\"Y-m-d H:i:s\"),'id_user'=>((int)$this->oUser->getId()) ));\r\n\r\n\t\t\t/** Recargamos las preferencias/configuracion del sistema si no estamos en modo producción*/\r\n\t\t\t//if ( OS_MODE!='production')\r\n\t\t\t//\t$this->oConfigSystem = new ConfigSystem( Utils_OS::getConfigSystem( $this->oConnection ) );\r\n\t\t\t\r\n\t\t\t/** procesamos la request para determinar que hay que hacer */\r\n\t\t\t$this->getUserRequest();\r\n\t\t}", "title": "" }, { "docid": "753012d7c3e7eece92dc7ad8272bb707", "score": "0.55844635", "text": "function _initialization() {\n if ($this->_debug) trigger_error(\"Докладывает -> \" . get_class($this). \" ! _initialization()\" , E_USER_NOTICE);\n\n /*** MODIFIED CODE BEGIN ***/\n\n $this->_url = \"https://secure.chronopay.com/index_shop.cgi\";\n $this->_method = \"POST\";\n if ($this->_mode == PAYMENT_ENGINE_SEND) {\n $this->makeRequired('product_id', 'order_id', 'amount', 'notify_url', 'decline_url');\n $this->makeOptional('product_name');\n }\n if ($this->_mode == PAYMENT_ENGINE_RECEIVE) {\n\n }\n\n /*** MODIFIED CODE END ***/\n\n if ($this->_debug) trigger_error(\"Отработал <- \" . get_class($this). \" ! _initialization().\" , E_USER_NOTICE);\n }", "title": "" }, { "docid": "111a88a5cf66dd9ad0227b1f47b1fc44", "score": "0.5584204", "text": "function __construct() {\n\t\t$this->parameter_check=False;\n\t\t$this->params_add = array(\"taskname\",\"description\",\"eventid\",\"taskdatetimestart\",\"taskdatetimeend\",\"userid\"); // ,\"resources\",\"dependencies\"\n\t\t$this->params_edit = array(\"taskid\",\"eventid\",\"taskname\",\"description\",\"taskdatetimestart\",\"taskdatetimeend\",\"userid\");\n\t\t$this->vartypes_add = array(\"taskid\"=>\"integer\",\"taskname\"=>\"a-z\",\"description\"=>\"words\",\"eventid\"=>\"integer\",\"taskdatetimestart\"=>\"date\",\"taskdatetimeend\"=>\"date\",\"dependencies\"=>\"int-array\",\"resources\"=>\"csv\",\"dependencies\"=>\"csv\",\"userid\"=>\"numeric\");\n\t\t$this->vartypes_edit = array(\"eventid\"=>\"integer\",\"taskname\"=>\"a-z\",\"description\"=>\"words\",\"taskdatetimestart\"=>\"date\",\"taskdatetimeend\"=>\"date\",\"dependencies\"=>\"int-array\",\"resources\"=>\"csv\",\"dependencies\"=>\"csv\",\"userid\"=>\"numeric\");\n\t\t$this->errors = \"\";\n\t\t$this->debug = false;\n\t}", "title": "" }, { "docid": "b8e2dd2ed877622874fdf0183608ab31", "score": "0.5578161", "text": "public function __construct(){\n\t\t$this->acc_fecha = \"\";\n\t\t$this->acc_origen = \"\";\n\t\t$this->usr_codigo = \"\";\n\t}", "title": "" }, { "docid": "37725772998c3a0d9073160fc49c8a15", "score": "0.5577864", "text": "function gestione_eventi(){\n\t\tforeach($_GET as $k=>$v){\n\t\t\t$this->$k = $v;\n\t\t}\n\t\t$this->standard_layout = true;\n\t\t$this->title = \"Area Riservata\";\n\t\t$this->db = new DBConn();\n\t\t$this->color = \"#F60\";\n\t\t$this->cerca = false;\n\t\t$this->auth = array('eventi');\n\t}", "title": "" }, { "docid": "33b2b6e256c26fa2ed4a62b6ca2ad885", "score": "0.55766237", "text": "function cl_abatimentoprocessoexterno() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"abatimentoprocessoexterno\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "bd39c60eca5b8559c6843f1187e78926", "score": "0.557376", "text": "public function ecrire(){\n \n }", "title": "" }, { "docid": "a92c6d6103a8c1b270d71b8b0ecee633", "score": "0.5573713", "text": "private function setParams(){\n\t\tif(isset($this->nome)) \t\t$this->arr_data['nome'] \t\t= $this->nome;\n\t\tif(isset($this->cpf)) \t\t$this->arr_data['cpf'] \t\t\t= $this->cpf;\n\t\tif(isset($this->rg)) \t\t$this->arr_data['rg'] \t\t\t= $this->rg;\t\n\t\tif(isset($this->end)) \t\t$this->arr_data['end'] \t\t\t= $this->end;\n\t\tif(isset($this->cep)) \t\t$this->arr_data['cep'] \t\t\t= $this->cep;\n\t\tif(isset($this->nr_end)) \t$this->arr_data['nr_end'] \t\t= $this->nr_end;\n\t\tif(isset($this->comp_end)) \t$this->arr_data['comp_end'] \t= $this->comp_end;\n\t\tif(isset($this->cidade_end)) $this->arr_data['cidade_end'] \t= $this->cidade_end;\n\t\tif(isset($this->uf_end)) \t$this->arr_data['uf_end'] \t\t= $this->uf_end;\n\t\tif(isset($this->telefone)) \t$this->arr_data['telefone'] \t= $this->telefone;\n\t\tif(isset($this->email)) \t\t$this->arr_data['email'] \t\t= $this->email;\n\t\tif(isset($this->senha)) \t\t$this->arr_data['senha'] \t\t= $this->senha;\n\t\tif(isset($this->sexo)) \t\t$this->arr_data['sexo'] \t\t= $this->sexo;\n\t\tif(isset($this->nascimento)) $this->arr_data['data_nasc'] \t= $this->nascimento;\n\t\tif(isset($this->news)) \t\t$this->arr_data['news'] \t\t= $this->news;\t\n\t\t//if(isset($this->dt_cad)) \t\t$this->arr_data['dt_cad'] \t\t= $this->dt_cad;\n\t}", "title": "" } ]
de7bc1e5c10bb8a7976345780a8edc81
Falls nach dem Speichern die Positionen neu errechnet werden sollen
[ { "docid": "1a48e8b19b607c669847bf6036d9ae90", "score": "0.541207", "text": "function updatePosition()\r\n\t{\r\n\t\treturn false;\r\n\t}", "title": "" } ]
[ { "docid": "b07057505fa7252429142aa0848be9f2", "score": "0.6812096", "text": "abstract protected function getPositions();", "title": "" }, { "docid": "1c46dd6152b959633fa6ab3ab93680a8", "score": "0.6572314", "text": "function getPosition()\n\t\t{\n\t\t}", "title": "" }, { "docid": "9543094a32c09537b6b9f5e95d33ea90", "score": "0.64255255", "text": "public function getPosition();", "title": "" }, { "docid": "9543094a32c09537b6b9f5e95d33ea90", "score": "0.64255255", "text": "public function getPosition();", "title": "" }, { "docid": "9543094a32c09537b6b9f5e95d33ea90", "score": "0.64255255", "text": "public function getPosition();", "title": "" }, { "docid": "9543094a32c09537b6b9f5e95d33ea90", "score": "0.64255255", "text": "public function getPosition();", "title": "" }, { "docid": "9543094a32c09537b6b9f5e95d33ea90", "score": "0.64255255", "text": "public function getPosition();", "title": "" }, { "docid": "9e704f4d4a0c873cc2e622a688e52e20", "score": "0.6407864", "text": "public abstract function getPosition();", "title": "" }, { "docid": "e9c5b0b8269a080d60bf857292457077", "score": "0.61926836", "text": "public function getPositions();", "title": "" }, { "docid": "dbec2549ccbeb54c5dab3797bae8f314", "score": "0.60228384", "text": "public function offsets();", "title": "" }, { "docid": "b6a5012e9f24a3bab865d6cee1716e6f", "score": "0.59086317", "text": "public function updatePosition()\n {\n }", "title": "" }, { "docid": "33e32e7fcae457634a8e933337110f75", "score": "0.5899884", "text": "public function position() {\r\n\t\treturn array();\r\n\t}", "title": "" }, { "docid": "04dece49f877013e5e1e67386f24ff3c", "score": "0.58289635", "text": "public function getPosition() {\n\t\treturn [ 0, 0 ];\n\t}", "title": "" }, { "docid": "6e1572c939e644962a7424af6f0c19ba", "score": "0.5798022", "text": "public function moveToFirstPosition();", "title": "" }, { "docid": "6e1572c939e644962a7424af6f0c19ba", "score": "0.5798022", "text": "public function moveToFirstPosition();", "title": "" }, { "docid": "e2c8950b0a9386693c36dc06039d6272", "score": "0.5718906", "text": "public function getCurrentPos()\n {\n }", "title": "" }, { "docid": "489d053cfbb740e66efab8fcfa7c9658", "score": "0.5654647", "text": "protected function calculatePosition()\n {\n if (empty($this->pos_abs)) {\n $this->pos_rel = 0;\n return;\n }\n\n // We start on Position one and check the number of result items that\n // are positioned in front of us.\n $pos_rel = 1;\n\n /**\n * @var RaceResultItem $result\n */\n foreach ($this->race->getResults() as $result) {\n if ($result->getPosAbs() && $result->getPosAbs() < $this->pos_abs) {\n $pos_rel++;\n }\n }\n\n $this->pos_rel = $pos_rel;\n }", "title": "" }, { "docid": "26e9d581c907117316bb46ff83211ea7", "score": "0.56455207", "text": "public function getCurrentTextPos()\n {\n }", "title": "" }, { "docid": "823cab31a4ea918cc54be90f85e1c8f3", "score": "0.5642951", "text": "public function pos() {\n return $this->pos;\n }", "title": "" }, { "docid": "de1d9ccff9b327187b04c0f137d420df", "score": "0.5625398", "text": "public function getPosition() {\n\t\treturn [ $this->line, $this->pos ];\n\t}", "title": "" }, { "docid": "26a7a32a23733d18c53ca4c19b29e3ed", "score": "0.5622901", "text": "public function reposition(): void;", "title": "" }, { "docid": "34527470e3e7163b703ae2ef4c6dcfd6", "score": "0.5606739", "text": "public function testFindPosition()\n {\n $result = $this->navigation->findPosition($this->sampleDirections);\n $this->assertEquals(['horizontal' => 15, 'depth' => 10], $result);\n $this->assertEquals(150, $result['horizontal'] * $result['depth']);\n\n // Day 2 Part 1 puzzle inputs\n $result = $this->navigation->findPosition($this->directions);\n $this->assertEquals(['horizontal' => 1971, 'depth' => 830], $result);\n $this->assertEquals(1635930, $result['horizontal'] * $result['depth']);\n }", "title": "" }, { "docid": "a724c5254c77c540bc8f9df78a09e497", "score": "0.5605468", "text": "public function getLookBehind(): int;", "title": "" }, { "docid": "22841dfb81a15149b972b7f93225ebb6", "score": "0.5567781", "text": "public function getPos()\n {\n return $this->pos;\n }", "title": "" }, { "docid": "22841dfb81a15149b972b7f93225ebb6", "score": "0.5567781", "text": "public function getPos()\n {\n return $this->pos;\n }", "title": "" }, { "docid": "7fbe2596586373bcb2a6f2d9cbe44bb9", "score": "0.55645096", "text": "function getPosition($points){\n\t\t\t$score = getFinalScore();\n\t\t\t$pos = 0;\n\t\t\t\n\t\t\tforeach($score as $elemento){\n\t\t\t\t$pos = $elemento['posizione'];\n\t\t\t\tif($points>$elemento['punti']){\n\t\t\t\t\tupdatePosition($points);\n\t\t\t\t\treturn $pos;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tif($points==$elemento['punti'])return $pos;\n\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $pos+1;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "5db5aec49813ea1070c2441ae069774a", "score": "0.5549014", "text": "public function cleanFieldsPositions()\n {\n $fields = $this->nodeType->getFields();\n $i = 1;\n foreach ($fields as $field) {\n $field->setPosition($i);\n $i++;\n }\n\n Kernel::getService('em')->flush();\n\n return $i;\n }", "title": "" }, { "docid": "9f176399f75e26a9824b28bc1bd956f1", "score": "0.5512082", "text": "public function getImagePosition();", "title": "" }, { "docid": "e617d00c622708fb1232c6fc3298c31d", "score": "0.55120766", "text": "public function resetPositions()\r\n {\r\n for($t = 0; $t < sizeof($this->pPositions); $t++)\r\n {\r\n $p = $this->pPositions->getPosition($t);\r\n if($p != null)\r\n {\r\n $p->custom = false;\r\n }\r\n }\r\n $this->invalidate();\r\n }", "title": "" }, { "docid": "3365580503e791120f54187dc88243f6", "score": "0.55015725", "text": "public function GetStartPosition(): int\n {\n }", "title": "" }, { "docid": "d881ce6089c2b05beeaf8e7319e06af8", "score": "0.54987353", "text": "public function points_relais()\n {\n $this->index(4);\n }", "title": "" }, { "docid": "0390783511a74332bcb010ab98a58a7a", "score": "0.5497568", "text": "public function getPos()\n {\n return $this->Pos;\n }", "title": "" }, { "docid": "1ec6f663d0afbba1e6a68686497924db", "score": "0.5489631", "text": "protected function cleanPos()\n {\n // Level 0 is mandatory\n $this->solveLevel_0();\n $this->solveLevel_1();\n }", "title": "" }, { "docid": "00a994fd8809d404f318586a8177cb2a", "score": "0.5479437", "text": "function _get_bean_position() {\n\t\t$position = false;\n\t\tif ($this->_relationship->lhs_table == $this->_bean_table_name && $this->_relationship->lhs_key == $this->_bean_key_name) {\n\t\t\t$position = true;\n\n\t\t}\n\t\tif ($this->_relationship->rhs_table == $this->_bean_table_name && $this->_relationship->rhs_key == $this->_bean_key_name) {\n\t\t\t$position = false;\n\t\t}\n\n\t\tif($this->_swap_sides){\n\t\t\treturn \t!$position;\n\t\t}\n\t\treturn $position;\n\t}", "title": "" }, { "docid": "50f9399d4740fbe238fc69e5a8f50ed1", "score": "0.54609627", "text": "public function zwischenspeichern(){\n \t\n }", "title": "" }, { "docid": "451da4c361ed8193b36fb91ba04d81e4", "score": "0.5441948", "text": "public function rewind()\n {\n $this->posicao = $this->reverso ? count($this->colecao->getItens()) - 1 : 0;\n }", "title": "" }, { "docid": "dc674c1bcf647286306195d7783e71ff", "score": "0.54291517", "text": "public function position( $ss )\n\t{\n\t\treturn $this->set('ss',$ss,false);\n\t}", "title": "" }, { "docid": "a53ca664519820c3abf8eeb8dfaa3a75", "score": "0.5408483", "text": "protected function setPositionIfMissing(): void\n {\n if (null === $this->getPosition()) {\n $this->setNextPosition();\n }\n }", "title": "" }, { "docid": "f87134b525fe13c4ffc4137b6f4dfd46", "score": "0.5396871", "text": "function upgradePosition()\n{\n\tglobal $x,$y,$z,$changementEtage, $deplacementPossible, $btnAppuye, $laby;\n\t\n\t\tif($btnAppuye==0)// Button vert le haut\n\t\t{\n\t\t\tif($_SESSION['orientation']==1) //SUD\n\t\t\t{\n\t\t\t\tif($laby[$z][$y+1][$x]==0)\n\t\t\t\t{\n\t\t\t\t\t$y++;\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y+1][$x]==4){ // On monte a l'etage superieur\n\t\t\t\t\t$z++;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==2){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y+1][$x]==5){ // On descend a l'etage en bas\n\t\t\t\t\t$z--;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==0){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{// Mouvement impossible\n\t\t\t\t\t$deplacementPossible=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($_SESSION['orientation']==2) //NORD\n\t\t\t{\n\t\t\t\tif($laby[$z][$y-1][$x]==0)\n\t\t\t\t{\n\t\t\t\t\t$y--;\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y-1][$x]==4){ // On monte a l'etage superieur\n\t\t\t\t\t$z++;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==2){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y-1][$x]==5){ // On descend a l'etage en bas\n\t\t\t\t\t$z--;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==0){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{// Mouvement impossible\n\t\t\t\t\t$deplacementPossible=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($_SESSION['orientation']==3) //OUEST\n\t\t\t{\n\t\t\t\tif($laby[$z][$y][$x-1]==0)\n\t\t\t\t{\n\t\t\t\t\t$x--;\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y][$x-1]==4){ // On monte a l'etage superieur\n\t\t\t\t\t$z++;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==2){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y][$x-1]==5){ // On descend a l'etage en bas\n\t\t\t\t\t$z--;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==0){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{// Mouvement impossible\n\t\t\t\t\t$deplacementPossible=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($_SESSION['orientation']==4) //EST\n\t\t\t{\n\t\t\t\tif($laby[$z][$y][$x+1]==0)\n\t\t\t\t{\n\t\t\t\t\t$x++;\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y][$x+1]==4){ // On monte a l'etage superieur\n\t\t\t\t\t$z++;\n\t\t\t\t\t$changementEtage=true;\t\n\t\t\t\t\tif($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==2){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\t\t\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y][$x+1]==5){ // On descend a l'etage en bas\n\t\t\t\t\t$z--;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==0){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{// Mouvement impossible\n\t\t\t\t\t$deplacementPossible=false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse if($btnAppuye==1) // Button vers le bas\n\t\t{\n\t\t\tif($_SESSION['orientation']==1) //SUD\n\t\t\t{\n\t\t\t\tif($laby[$z][$y-1][$x] ==0)\n\t\t\t\t{\n\t\t\t\t\t$y--;\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y-1][$x]==4){ // On monte a l'etage superieur\n\t\t\t\t\t$z++;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==2){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y-1][$x]==5){ // On descend a l'etage en bas\n\t\t\t\t\t$z--;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==0){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{// Mouvement impossible\n\t\t\t\t\t$deplacementPossible=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($_SESSION['orientation']==2) //NORD\n\t\t\t{\n\t\t\t\tif($laby[$z][$y+1][$x] ==0)\n\t\t\t\t{\n\t\t\t\t\t$y++;\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y+1][$x]==4){ // On monte a l'etage superieur\n\t\t\t\t\t$z++;\n\t\t\t\t\t$changementEtage=true;\t\n\t\t\t\t\tif($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==2){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y+1][$x]==5){ // On descend a l'etage en bas\n\t\t\t\t\t$z--;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==0){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{// Mouvement impossible\n\t\t\t\t\t$deplacementPossible=false;}\n\t\t\t\t\n\t\t\t}\n\t\t\telse if($_SESSION['orientation']==3) //OUEST\n\t\t\t{\n\t\t\t\tif($laby[$z][$y][$x+1] ==0)\n\t\t\t\t{\n\t\t\t\t\t$x++;\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y][$x+1]==4){ // On monte a l'etage superieur\n\t\t\t\t\t$z++;\n\t\t\t\t\t$changementEtage=true;\t\n\t\t\t\t\tif($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==2){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y][$x+1]==5){ // On descend a l'etage en bas\n\t\t\t\t\t$z--;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==0){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{// Mouvement impossible\n\t\t\t\t\t$deplacementPossible=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($_SESSION['orientation']==4) //EST\n\t\t\t{\n\t\t\t\tif($laby[$z][$y][$x-1] ==0)\n\t\t\t\t{\n\t\t\t\t\t$x--;\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y][$x-1]==4){ // On monte a l'etage superieur\n\t\t\t\t\t$z++;\n\t\t\t\t\t$changementEtage=true;\t\n\t\t\t\t\tif($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==2){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y][$x-1]==5){ // On descend a l'etage en bas\n\t\t\t\t\t$z--;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==0){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{// Mouvement impossible\n\t\t\t\t\t$deplacementPossible=false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}else if($btnAppuye==2) // Button vers la gauche\n\t\t{\n\t\t\tif($_SESSION['orientation']==1) //SUD\n\t\t\t{\n\t\t\t\tif($laby[$z][$y][$x+1] ==0)\n\t\t\t\t{\n\t\t\t\t\t$x++;\n\t\t\t\t}else if($laby[$z][$y][$x+1]==4){ // On monte a l'etage superieur\n\t\t\t\t\t$z++;\n\t\t\t\t\t$changementEtage=true;\t\n\t\t\t\t\tif($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==2){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y][$x+1]==5){ // On descend a l'etage en bas\n\t\t\t\t\t$z--;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==0){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{// Mouvement impossible\n\t\t\t\t\t$deplacementPossible=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($_SESSION['orientation']==2) //NORD\n\t\t\t{\n\t\t\tif($laby[$z][$y][$x-1] ==0)\n\t\t\t\t{\n\t\t\t\t\t$x--;\n\t\t\t\t}else if($laby[$z][$y][$x-1]==4){ // On monte a l'etage superieur\n\t\t\t\t\t$z++;\n\t\t\t\t\t$changementEtage=true;\t\n\t\t\t\t\tif($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==2){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y][$x-1]==5){ // On descend a l'etage en bas\n\t\t\t\t\t$z--;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==0){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{// Mouvement impossible\n\t\t\t\t\t$deplacementPossible=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($_SESSION['orientation']==3) //OUEST\n\t\t\t{\n\t\t\tif($laby[$z][$y+1][$x] ==0)\n\t\t\t\t{\n\t\t\t\t\t$y++;\n\t\t\t\t}else if($laby[$z][$y+1][$x]==4){ // On monte a l'etage superieur\n\t\t\t\t\t$z++;\n\t\t\t\t\t$changementEtage=true;\t\n\t\t\t\t\tif($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==2){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y+1][$x]==5){ // On descend a l'etage en bas\n\t\t\t\t\t$z--;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==0){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{// Mouvement impossible\n\t\t\t\t\t$deplacementPossible=false; \n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($_SESSION['orientation']==4) //EST\n\t\t\t{\n\t\t\t\tif($laby[$z][$y-1][$x] ==0)\n\t\t\t\t{\n\t\t\t\t\t$y--;\n\t\t\t\t}else if($laby[$z][$y-1][$x]==4){ // On monte a l'etage superieur\n\t\t\t\t\t$z++;\n\t\t\t\t\t$changementEtage=true;\t\n\t\t\t\t\tif($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==2){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y-1][$x]==5){ // On descend a l'etage en bas\n\t\t\t\t\t$z--;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==0){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{// Mouvement impossible\n\t\t\t\t\t$deplacementPossible=false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}else if($btnAppuye==3) // Button vers la droite\n\t\t{\n\t\t\tif($_SESSION['orientation']==1) //SUD\n\t\t\t{\n\t\t\t\tif($laby[$z][$y][$x-1] ==0)\n\t\t\t\t{\n\t\t\t\t\t$x--;\n\t\t\t\t}else if($laby[$z][$y][$x-1]==4){ // On monte a l'etage superieur\n\t\t\t\t\t$z++;\n\t\t\t\t\t$changementEtage=true;\t\n\t\t\t\t\tif($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==2){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y][$x-1]==5){ // On descend a l'etage en bas\n\t\t\t\t\t$z--;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==0){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{// Mouvement impossible\n\t\t\t\t\t$deplacementPossible=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($_SESSION['orientation']==2) //NORD\n\t\t\t{\n\t\t\tif($laby[$z][$y][$x+1] ==0)\n\t\t\t\t{\n\t\t\t\t\t$x++;\n\t\t\t\t}else if($laby[$z][$y][$x+1]==4){ // On monte a l'etage superieur\n\t\t\t\t\t$z++;\n\t\t\t\t\t$changementEtage=true;\t\n\t\t\t\t\tif($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==2){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y][$x+1]==5){ // On descend a l'etage en bas\n\t\t\t\t\t$z--;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==0){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{// Mouvement impossible\n\t\t\t\t\t$deplacementPossible=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($_SESSION['orientation']==3) //OUEST\n\t\t\t{\n\t\t\tif($laby[$z][$y-1][$x] ==0)\n\t\t\t\t{\n\t\t\t\t\t$y--;\n\t\t\t\t}else if($laby[$z][$y-1][$x]==4){ // On monte a l'etage superieur\n\t\t\t\t\t$z++;\n\t\t\t\t\t$changementEtage=true;\t\n\t\t\t\t\tif($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==2){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y-1][$x]==5){ // On descend a l'etage en bas\n\t\t\t\t\t$z--;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==0){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{// Mouvement impossible\n\t\t\t\t\t$deplacementPossible=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($_SESSION['orientation']==4) //EST\n\t\t\t{\n\t\t\t\tif($laby[$z][$y+1][$x] ==0)\n\t\t\t\t{\n\t\t\t\t\t$y++;\n\t\t\t\t}else if($laby[$z][$y+1][$x]==4){ // On monte a l'etage superieur\n\t\t\t\t\t$z++;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==2){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\telse if($laby[$z][$y+1][$x]==5){ // On descend a l'etage en bas\n\t\t\t\t\t$z--;\n\t\t\t\t\t$changementEtage=true;\n\t\t\t\t\tif($z==0){\n\t\t\t\t\t\t$_SESSION['orientation']=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if($z==1){\n\t\t\t\t\t\t$_SESSION['orientation']=4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{// Mouvement impossible\n\t\t\t\t\t$deplacementPossible=false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}else if($btnAppuye==4) // Button pour tourner vers la gauche\n\t\t{\n\t\t\tswitch ($_SESSION['orientation']) {\n\t\t\t\tcase 1: $_SESSION['orientation']=4; //Sud = 1; nord = 2; Ouest = 3; Est = 4\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: $_SESSION['orientation']=3;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3: $_SESSION['orientation']=1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4: $_SESSION['orientation']=2;\n\t\t\t\t\tbreak;\t\t\n\t\t\t\tdefault:\n\t\t\t\t\texit();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\n\t\t}else if($btnAppuye==5) // Button pour tourner vers la droite\n\t\t{\n\t\t\tswitch ($_SESSION['orientation']) {\n\t\t\t\tcase 1: $_SESSION['orientation']=3;\t//Sud = 1; nord = 2; Ouest = 3; Est = 4\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: $_SESSION['orientation']=4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3: $_SESSION['orientation']=2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4: $_SESSION['orientation']=1;\n\t\t\t\t\tbreak;\t\t\n\t\t\t\tdefault:\n\t\t\t\t\texit();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\n}", "title": "" }, { "docid": "5374022ada7ad1f7971d7bf86d85b9fa", "score": "0.5390942", "text": "protected function adjustPosition()\n {\n $page = $this->pdf->PageNo();\n\n //Sum with the size of the title band\n if ($page == 1 && isset($this->pdf->title['band']['@attributes']['height'])){\n $this->pdf->position += ($this->pdf->heightBandPrevious + $this->pdf->title['band']['@attributes']['height']);\n } else {\n $this->pdf->position += ($this->pdf->heightBandPrevious + $this->pdf->pageHeader['band']['@attributes']['height']);\n }\n\n }", "title": "" }, { "docid": "2382e19bbabe306bad815528f58e9c1e", "score": "0.53685135", "text": "public function currentPosition();", "title": "" }, { "docid": "f53663fc458ab51e625e001360022a29", "score": "0.53530234", "text": "function getPosition()\n\t{\n\t\treturn $this->position;\n\t}", "title": "" }, { "docid": "8cc175711ed75ad4a6efcfaf13edc406", "score": "0.5339107", "text": "public function getOffset();", "title": "" }, { "docid": "8cc175711ed75ad4a6efcfaf13edc406", "score": "0.5339107", "text": "public function getOffset();", "title": "" }, { "docid": "8cc175711ed75ad4a6efcfaf13edc406", "score": "0.5339107", "text": "public function getOffset();", "title": "" }, { "docid": "8cc175711ed75ad4a6efcfaf13edc406", "score": "0.5339107", "text": "public function getOffset();", "title": "" }, { "docid": "5045e5619891f9cfe2587a1549230956", "score": "0.53188276", "text": "function u() { return $this->move('u',$this->pi);}", "title": "" }, { "docid": "2a763ce87a9e1defd9fe5418d0e3e96b", "score": "0.53126764", "text": "abstract public function getOffset(): int;", "title": "" }, { "docid": "cd8434799911b6019da1b30385ebe81f", "score": "0.529597", "text": "function downgradePosition($points){\n\t\t\n\t\t\t$connection = dbConnect();\n\n\t\t\t$sql = \"UPDATE punteggi SET posizione=posizione-1 WHERE punti<\".$points.\"\";\n\t\t\tmysql_query($sql) or die(\"Errore durante la query SQL: \" . mysql_error());\n\t\t\tmysql_close($connection);\n\t\t}", "title": "" }, { "docid": "62affcc718f06486e1104a335d0ab58c", "score": "0.52928865", "text": "function getPosition()\n {\n return $this->position;\n }", "title": "" }, { "docid": "c9efa622f64ee82498cc2bcc79713e14", "score": "0.5290766", "text": "public function getPosition()\n\t{\n\t\t$message = (albums::$nbItems > 1)\n\t\t\t? __('%s images en attente')\n\t\t\t: __('%s image en attente');\n\t\treturn sprintf($message, albums::$nbItems);\n\t}", "title": "" }, { "docid": "3413eb56af5f1a6529f747b9cd82ff45", "score": "0.52706915", "text": "function getLabelPos()\n\t{\n if(!isset($this->da[\"labelpos\"])){\n $this->setLabelPos();\n }\n\t\treturn $this->da[\"labelpos\"];\n\t}", "title": "" }, { "docid": "fbd7426b36241e6cfd7e73d7d9d6a049", "score": "0.5269039", "text": "function testColocaFicha() {\n // $this->assertEquals('A', $this->ajedrez->devuelvePosicion(0, 0));\n }", "title": "" }, { "docid": "515f34d06bd6fac3d50d8761a711accc", "score": "0.5257578", "text": "public function authorization_position()\n\t{\n\t}", "title": "" }, { "docid": "230cc9b700c11cad92648ef5d98b5263", "score": "0.52548164", "text": "public function getPosition()\n\t{\n\t\t// Image.\n\t\tif (isset($_GET['object_type']) && $_GET['object_type'] == 'image')\n\t\t{\n\t\t\t$position = template::getPosition(\n\t\t\t\t'',\n\t\t\t\t'votes/category',\n\t\t\t\t'votes/image',\n\t\t\t\t'votes/category',\n\t\t\t\tTRUE,\n\t\t\t\tFALSE,\n\t\t\t\t__('galerie'),\n\t\t\t\talbums::$parents,\n\t\t\t\talbums::$infos,\n\t\t\t\tNULL,\n\t\t\t\t' / ',\n\t\t\t\tTRUE\n\t\t\t);\n\t\t}\n\n\t\t// Catégorie.\n\t\telse\n\t\t{\n\t\t\t$position = template::getPosition(\n\t\t\t\t'',\n\t\t\t\t'votes/category',\n\t\t\t\t'votes/category',\n\t\t\t\t'',\n\t\t\t\tTRUE,\n\t\t\t\tFALSE,\n\t\t\t\t__('galerie'),\n\t\t\t\talbums::$parents,\n\t\t\t\talbums::$infos,\n\t\t\t\tNULL,\n\t\t\t\t' / ',\n\t\t\t\tisset($_GET['object_id']) && $_GET['object_id'] > 1\n\t\t\t);\n\t\t}\n\n\t\t// Filtres de recherche.\n\t\t$filters = array(\n\t\t\t'date' => 'date/',\n\t\t\t'ip' => 'ip/',\n\t\t\t'search' => 'search/',\n\t\t\t'user_id' => 'user/'\n\t\t);\n\t\tforeach ($filters as $f => $u)\n\t\t{\n\t\t\tif (isset($_GET[$f]))\n\t\t\t{\n\t\t\t\t$position = preg_replace('`(\\?q=votes/(?:category|image)/\\d+)`',\n\t\t\t\t\t'$1/' . $u . $_GET[$f], $position);\n\t\t\t}\n\t\t}\n\n\t\treturn $position;\n\t}", "title": "" }, { "docid": "d3f3c2501a3b9f5582001f8f83fd4a48", "score": "0.5247135", "text": "public function getPositions()\r\n {\r\n return $this->pPositions;\r\n }", "title": "" }, { "docid": "33aaeffbd38b3cdb17f6a87e5012abdf", "score": "0.52373177", "text": "public function testCantPlaceAt(){\n \n $current = new Position(45,34);\n $entity = new Entity($current,100);\n $current->place($entity);\n \n $target = new Position(5,3);\n $entity2 = new Entity($target,100);\n $target->place($entity2);\n \n $entity->placeAt($target);\n $left = $current->occupied()*1; // exp 1\n $arrived = $target->occupied()*1; // epx 1\n $hash = $entity->position()->x()+$entity->position()->y() + $left+$arrived;\n $this->assertEquals(81,$hash); \n }", "title": "" }, { "docid": "2d9f21c3c9ac19e207db3b0aa1a28bf7", "score": "0.52360684", "text": "protected function resetAllPos()\n {\n foreach($this->fields as $ix => $field){\n if($field['set'] === false){\n $this->fields[$ix]['nr'] = $this->initFieldValues;\n }\n }\n }", "title": "" }, { "docid": "c2a8d12e6be6f7d8bd2ad75f9ef99c66", "score": "0.52268386", "text": "public function livreurs()\n {\n $this->index(0);\n }", "title": "" }, { "docid": "d05f3be26f7698986132e7b1371965a1", "score": "0.52246755", "text": "public function getPositions()\n\t{\n\t\treturn $this->positions;\n\t}", "title": "" }, { "docid": "09afdb76dedfef13d38c7f8d2ed6f342", "score": "0.5206163", "text": "public function tell()\n {\n return $this->position;\n }", "title": "" }, { "docid": "d1696b06899cc25730bf787b87beb2ab", "score": "0.5201914", "text": "public function getPosition()\n\t{\n\t\treturn template::getPosition(\n\t\t\t'',\n\t\t\t'category',\n\t\t\t'image',\n\t\t\t'album',\n\t\t\tTRUE,\n\t\t\tFALSE,\n\t\t\t__('galerie'),\n\t\t\talbums::$parents,\n\t\t\talbums::$infos,\n\t\t\talbums::$parentPage,\n\t\t\t' / ',\n\t\t\tTRUE\n\t\t);\n\t}", "title": "" }, { "docid": "056bf9765c8b0c4d7bb5fe3f1f1436c6", "score": "0.5188823", "text": "public function getFormattedPosition() {\n return $this->position['x'] .' '. $this->position['y'] .' '. $this->direction_reference[$this->position['d']];\n }", "title": "" }, { "docid": "09b1b6953c2114587cb8543cc19e7ece", "score": "0.5168165", "text": "function world_EnPassantCapture($sele_pos, $dest_pos)\n{\n\tglobal $last_move;\n\t\n\t$dest_col = substr($dest_pos, 0, 1);\n\t$dest_row = substr($dest_pos, 1, 1);\n\t\n\tif (world_GetColor($sele_pos) == 'w')\n\t{\n\t\t$last_move[] = $dest_col.($dest_row - 1);\n\t\t$last_move[] = world_GetType($dest_col.($dest_row - 1));\n\t\tworld_SetNull($dest_col.($dest_row - 1));\n\t}\n\telse if (world_GetColor($sele_pos) == 'b')\n\t{\n\t\t$last_move[] = $dest_col.($dest_row + 1);\n\t\t$last_move[] = world_GetType($dest_col.($dest_row + 1));\n\t\tworld_SetNull($dest_col.($dest_row + 1));\n\t}\n}", "title": "" }, { "docid": "bbfa49c17651acc29bf1223d7ed2e225", "score": "0.5165738", "text": "function Position_premier_coup(&$premier_coup_x, &$premier_coup_y, $nb_cases_horizontales, $nb_cases_verticales, &$tableau_affichage)\n{\n echo 'Quel est la position en X de votre premier coup ? (Maximum ' . $nb_cases_horizontales . ')' . PHP_EOL;\n $premier_coup_x = readline();\n\n echo 'Quel est la position en Y de votre premier coup ? (Maximum ' . $nb_cases_verticales . ')' . PHP_EOL;\n $premier_coup_y = readline();\n\n $tableau_affichage[$premier_coup_x-1][$premier_coup_y-1]='R';\n}", "title": "" }, { "docid": "a346a164cd99ee6495e87d9346a7aa44", "score": "0.5162605", "text": "function find_place(){\n \n //to check the winning spot\n for($i=0; $i<9; $i++){\n if($this->position[$i] == '-'){\n $this->newposition = $this->position; \n $this->newposition[$i] = 'x';\n if($this->winner($this->newposition,'x'))\n return $i;\n }\n }\n \n //to theck the competitors's winning spot\n for($i=0; $i<9; $i++){\n if($this->position[$i] == '-') {\n $this->newposition = $this->position;\n $this->newposition[$i] = 'o';\n if($this->winner($this->newposition,'o'))\n return $i; \n }\n }\n \n //to find any blank spot\n while($num = rand(1,9)){\n if($this->position[--$num]=='-')\n return $num;\n \n }\n }", "title": "" }, { "docid": "8563a981bc275adb4122ede65b5e2786", "score": "0.5152478", "text": "public function getPosition(): ?string;", "title": "" }, { "docid": "bb05b700ca4bbdefc899d1f66cbe3d47", "score": "0.5151781", "text": "public function updatePositions()\n\t{\n\t\tif ($this->positionOffset->value > count($this->IDList)) {\n\t\t\tthrow new InvalidValueException(\"Invalid offset.\");\n\t\t}\n\n\t\t$new_positions = &$this->positionOffset->value;\n\n\t\tfor ($i = 0; $i < count($new_positions); $i++) {\n\t\t\tif (($this->positionOffset->value+$i) > count($this->IDList)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$this->IDList[$this->positionOffset->value+$i] = $new_positions[$i];\n\t\t}\n\t}", "title": "" }, { "docid": "a44e0d3ccc9ebed74cf8185997e32abf", "score": "0.5145125", "text": "function Placement_drapeau($coup_x, $coup_y, &$tableau_affichage)\n{\n if($tableau_affichage[$coup_x-1][$coup_y-1] == 'M') // -1 car tableau commence à 0 en php \n {\n $tableau_affichage[$coup_x-1][$coup_y-1] = 'F';\n }\n}", "title": "" }, { "docid": "e53236b94ee52402a5e7a9f387450edf", "score": "0.51388985", "text": "function getPosition() {\n\t\treturn $this->_Position;\n\t}", "title": "" }, { "docid": "f425690c68337dabee531e10809096fe", "score": "0.51252145", "text": "function bottom_position_in_list() {\n\t\t$sql = \"SELECT $this->position_field FROM $this->table WHERE \".$this->scope_condition().\" ORDER BY $this->position_field DESC LIMIT 1\";\n\t\treturn $this->db->query_value($sql);\n\t}", "title": "" }, { "docid": "0d03d4710ecc0a314f61a7b7c29d565f", "score": "0.5124329", "text": "public function removePositions() {\n\t\t// unshift boards\n\t\t$sql = \"SELECT \tparentID, position\n\t\t\tFROM\twbb\".WBB_N.\"_board_structure\n\t\t\tWHERE\tboardID = \".$this->boardID;\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t$sql = \"UPDATE\twbb\".WBB_N.\"_board_structure\n\t\t\t\tSET\tposition = position - 1\n\t\t\t\tWHERE \tparentID = \".$row['parentID'].\"\n\t\t\t\t\tAND position > \".$row['position'];\n\t\t\tWCF::getDB()->sendQuery($sql);\n\t\t}\n\t\t\n\t\t// delete board\n\t\t$sql = \"DELETE FROM\twbb\".WBB_N.\"_board_structure\n\t\t\tWHERE\t\tboardID = \".$this->boardID;\n\t\tWCF::getDB()->sendQuery($sql);\n\t}", "title": "" }, { "docid": "6898b42734a25e941c41c655e6835d06", "score": "0.51219714", "text": "public function getPosition()\n\t{\n\t\t// Image.\n\t\tif (isset($_GET['object_type']) && $_GET['object_type'] == 'image')\n\t\t{\n\t\t\t$position = template::getPosition(\n\t\t\t\t'',\n\t\t\t\t'comments-images/category',\n\t\t\t\t'comments-images/image',\n\t\t\t\t'comments-images/category',\n\t\t\t\tTRUE,\n\t\t\t\tFALSE,\n\t\t\t\t__('galerie'),\n\t\t\t\talbums::$parents,\n\t\t\t\talbums::$infos,\n\t\t\t\tNULL,\n\t\t\t\t' / ',\n\t\t\t\tTRUE\n\t\t\t);\n\t\t}\n\n\t\t// Catégorie.\n\t\telse\n\t\t{\n\t\t\t$position = template::getPosition(\n\t\t\t\t'',\n\t\t\t\t'comments-images/category',\n\t\t\t\t'comments-images/category',\n\t\t\t\t'',\n\t\t\t\tTRUE,\n\t\t\t\tFALSE,\n\t\t\t\t__('galerie'),\n\t\t\t\talbums::$parents,\n\t\t\t\talbums::$infos,\n\t\t\t\tNULL,\n\t\t\t\t' / ',\n\t\t\t\tisset($_GET['object_id']) && $_GET['object_id'] > 1\n\t\t\t);\n\t\t}\n\n\t\t// Filtres de recherche.\n\t\t$filters = array(\n\t\t\t'date' => 'date/',\n\t\t\t'ip' => 'ip/',\n\t\t\t'status' => '',\n\t\t\t'search' => 'search/',\n\t\t\t'user_id' => 'user/'\n\t\t);\n\t\tforeach ($filters as $f => $u)\n\t\t{\n\t\t\tif (isset($_GET[$f]))\n\t\t\t{\n\t\t\t\t$position = preg_replace('`(\\?q=comments-images/(?:category|image)/\\d+)`',\n\t\t\t\t\t'$1/' . $u . $_GET[$f], $position);\n\t\t\t}\n\t\t}\n\n\t\treturn $position;\n\t}", "title": "" }, { "docid": "c8d642fc0c74aec82c93bb82957b1f4c", "score": "0.5119717", "text": "function getWordOrigin($letterNum, $posX, $posY, $dir) {\n if($dir == 0) {\n return [$posX, $posY - $letterNum];\n }\n else {\n return [$posX - $letterNum, $posY];\n }\n}", "title": "" }, { "docid": "31b1c465537c2e116d71bbfef4428980", "score": "0.51105845", "text": "private function getNextPosition() {\n\t\tdo {\n\t\t\tif ($this->bit == -1) {\n\t\t\t\t$this->bit = 0;\n\t\t\t\treturn array('x'=>$this->x, 'y'=>$this->y);\n\t\t\t}\n\t\t\t$x = $this->x;\n\t\t\t$y = $this->y;\n\t\t\t$w = $this->width;\n\t\t\tif ($this->bit == 0) {\n\t\t\t\t$x--;\n\t\t\t\t$this->bit++;\n\t\t\t} else {\n\t\t\t\t$x++;\n\t\t\t\t$y += $this->dir;\n\t\t\t\t$this->bit--;\n\t\t\t}\n\t\t\tif ($this->dir < 0) {\n\t\t\t\tif ($y < 0) {\n\t\t\t\t\t$y = 0;\n\t\t\t\t\t$x -= 2;\n\t\t\t\t\t$this->dir = 1;\n\t\t\t\t\tif ($x == 6) {\n\t\t\t\t\t\t$x--;\n\t\t\t\t\t\t$y = 9;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($y == $w) {\n\t\t\t\t\t$y = $w - 1;\n\t\t\t\t\t$x -= 2;\n\t\t\t\t\t$this->dir = -1;\n\t\t\t\t\tif ($x == 6) {\n\t\t\t\t\t\t$x--;\n\t\t\t\t\t\t$y -= 8;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (($x < 0) or ($y < 0)) {\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t\t$this->x = $x;\n\t\t\t$this->y = $y;\n\t\t} while((ord($this->frame[$y][$x]) & 0x80) != 0);\n\t\treturn array('x'=>$x, 'y'=>$y);\n\t}", "title": "" }, { "docid": "3079e2fa1d60a50b35dbedf7c340ccc3", "score": "0.5108987", "text": "function AbsolutePosition() {\n\t\treturn $this->_currentRow;\n\t}", "title": "" }, { "docid": "41b2e3a6be1742d9204e19b0d50db3fb", "score": "0.5108024", "text": "function doesntInterfere($word, $posX, $posY, $dir) {\n global $table; \n\n if($dir == 0) {\n if(strcmp('X', $table[$posX][$posY - 1]))\n return false;\n\n if(strcmp('X', $table[$posX][$posY + strlen($word)]))\n return false;\n\n for($i = 0; $i < strlen($word); $i++) {\n if(strcmp($word[$i], $table[$posX][$posY + $i]) && strcmp('X', $table[$posX][$posY + $i]))\n return false;\n\n $top3 = 0;\n if(strcmp($table[$posX - 1][$posY + $i - 1], 'X'))\n $top3 += 1;\n if(strcmp($table[$posX - 1][$posY + $i], 'X'))\n $top3 += 1;\n if(strcmp($table[$posX - 1][$posY + $i + 1], 'X'))\n $top3 += 1;\n\n $bot3 = 0;\n if(strcmp($table[$posX + 1][$posY + $i - 1], 'X'))\n $bot3 += 1;\n if(strcmp($table[$posX + 1][$posY + $i], 'X'))\n $bot3 += 1;\n if(strcmp($table[$posX + 1][$posY + $i + 1], 'X'))\n $bot3 += 1;\n \n if($top3 > 1 || $bot3 > 1) {\n return false;\n }\n }\n }\n else {\n if(strcmp('X', $table[$posX - 1][$posY]))\n return false;\n\n if(strcmp('X', $table[$posX + strlen($word)][$posY]))\n return false;\n \n for($i = 0; $i < strlen($word); $i++) {\n if(strcmp($word[$i], $table[$posX + $i][$posY]) && strcmp('X', $table[$posX + $i][$posY]))\n return false;\n\n $top3 = 0;\n if(strcmp($table[$posX + $i - 1][$posY - 1], 'X'))\n $top3 += 1;\n if(strcmp($table[$posX + $i][$posY - 1], 'X'))\n $top3 += 1;\n if(strcmp($table[$posX + $i + 1][$posY - 1], 'X'))\n $top3 += 1;\n\n $bot3 = 0;\n if(strcmp($table[$posX + $i - 1][$posY + 1], 'X'))\n $bot3 += 1;\n if(strcmp($table[$posX + $i][$posY + 1], 'X'))\n $bot3 += 1;\n if(strcmp($table[$posX + $i + 1][$posY + 1], 'X'))\n $bot3 += 1;\n \n if($top3 > 1 || $bot3 > 1) {\n return false;\n }\n }\n }\n \n return true;\n}", "title": "" }, { "docid": "b93fb1a1d9b7a8f5e06b68cfc13e6e30", "score": "0.50972396", "text": "final public function getPosition(): int\n {\n return $this->position;\n }", "title": "" }, { "docid": "1f74a9a4e65786c34e1735483b85dda1", "score": "0.508499", "text": "function portionnerLetableau()\n{\n\tglobal $x,$y,$z,$chaineARetouner,$laby;\n\tif($_SESSION['orientation']==1) /////////////////////////////////////// SUD\n\t{\n\t\t//Ligne de A à G\n\t\tif($y+3<=15) \n\t\t{\n\t\t\t$flagX = $x+3;\n\t\t\tfor ($i=0; $i < 7 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagX>=0 && $flagX <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$y+3][$flagX].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagX--;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 0 0 0 0 \";\n\t\t}\n\t\t//Ligne de H à L\t\n\t\tif($y+2<=15)\n\t\t{\n\t\t\t$flagX = $x+2;\n\t\t\tfor ($i=0; $i < 5 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagX>=0 && $flagX <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$y+2][$flagX].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagX--;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 0 0 \";\n\t\t}\n\t\t//Ligne de M à O\n\t\tif($y+1<=15)\n\t\t{\n\t\t\t$flagX = $x+1;\n\t\t\tfor ($i=0; $i < 3 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagX>=0 && $flagX <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$y+1][$flagX].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagX--;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 \";\n\t\t}\n\t\t//Ligne P à Q\n\t\t$chaineARetouner.= $laby[$z][$y][$x+1].\" \";\n\t\t$chaineARetouner.= $laby[$z][$y][$x-1];\n\t}\n\n\n\tif($_SESSION['orientation']==2) /////////////////////////////////////// NORD\n\t{\n\t\t//Ligne de A à G\n\t\tif($y-3>=0) \n\t\t{\n\t\t\t$flagX = $x-3;\n\t\t\tfor ($i=0; $i < 7 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagX>=0 && $flagX <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$y-3][$flagX].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagX++;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 0 0 0 0 \";\n\t\t}\n\t\t//Ligne de H à L\t\n\t\tif($y-2>=0)\n\t\t{\n\t\t\t$flagX = $x-2;\n\t\t\tfor ($i=0; $i < 5 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagX>=0 && $flagX <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$y-2][$flagX].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagX++;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 0 0 \";\n\t\t}\n\t\t//Ligne de M à O\n\t\tif($y-1>=0)\n\t\t{\n\t\t\t$flagX = $x-1;\n\t\t\tfor ($i=0; $i < 3 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagX>=0 && $flagX <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$y-1][$flagX].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagX++;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 \";\n\t\t}\n\t\t//Ligne P à Q\n\t\t$chaineARetouner.= $laby[$z][$y][$x-1].\" \";\n\t\t$chaineARetouner.= $laby[$z][$y][$x+1];\n\t}\n\n\n\tif($_SESSION['orientation']==3) /////////////////////////////////////// OUEST\n\t{\n\t\t//Ligne de A à G\n\t\tif($x-3>=0) \n\t\t{\n\t\t\t$flagY = $y+3;\n\t\t\tfor ($i=0; $i < 7 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagY>=0 && $flagY <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$flagY][$x-3].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagY--;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 0 0 0 0 \";\n\t\t}\n\t\t//Ligne de H à L\t\n\t\tif($x-2>=0)\n\t\t{\n\t\t\t$flagY = $y+2;\n\t\t\tfor ($i=0; $i < 5 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagY>=0 && $flagY <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$flagY][$x-2].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagY--;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 0 0 \";\n\t\t}\n\t\t//Ligne de M à O\n\t\tif($x-1>=0)\n\t\t{\n\t\t\t$flagY = $y+1;\n\t\t\tfor ($i=0; $i < 3 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagY>=0 && $flagY <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$flagY][$x-1].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagY--;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 \";\n\t\t}\n\t\t//Ligne P à Q\n\t\t$chaineARetouner.= $laby[$z][$y+1][$x].\" \";\n\t\t$chaineARetouner.= $laby[$z][$y-1][$x];\n\t}\n\n\tif($_SESSION['orientation']==4) /////////////////////////////////////// EST\n\t{\n\t\t//Ligne de A à G\n\t\tif($x+3<=15) \n\t\t{\n\t\t\t$flagY = $y-3;\n\t\t\tfor ($i=0; $i < 7 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagY>=0 && $flagY <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$flagY][$x+3].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagY++;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 0 0 0 0 \";\n\t\t}\n\t\t//Ligne de H à L\t\n\t\tif($x+2<=15)\n\t\t{\n\t\t\t$flagY = $y-2;\n\t\t\tfor ($i=0; $i < 5 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagY>=0 && $flagY <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$flagY][$x+2].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagY++;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 0 0 \";\n\t\t}\n\t\t//Ligne de M à O\n\t\tif($x+1<=15)\n\t\t{\n\t\t\t$flagY = $y-1;\n\t\t\tfor ($i=0; $i < 3 ; $i++) \n\t\t\t{ \n\t\t\t\tif($flagY>=0 && $flagY <= 15)\n\t\t\t\t{\n\t\t\t\t\t$chaineARetouner.= $laby[$z][$flagY][$x+1].\" \";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$chaineARetouner.= \"0 \";\n\t\t\t\t}\t\t\t\n\t\t\t\t$flagY++;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$chaineARetouner.=\"0 0 0 \";\n\t\t}\n\t\t//Ligne P à Q\n\t\t$chaineARetouner.= $laby[$z][$y-1][$x].\" \";\n\t\t$chaineARetouner.= $laby[$z][$y+1][$x];\n\t}\n}", "title": "" }, { "docid": "a51fc97e84149df18b90591097019b85", "score": "0.50616276", "text": "public function getImagePositionOffset()\n {\n $positioningParams = explode(\";\", $this->_batchConvert->positioning);\n if (!empty($positioningParams[2])) {\n $positioningId = reset($positioningParams);\n $deliverySpecPositioning = DeliverySpecPositioning::model()->findByPk($positioningId);\n if ($positioningParams[2] == \"4x3\") {\n $imageSubtitleOffset = $deliverySpecPositioning->four_by_three;\n } else {\n $imageSubtitleOffset = $deliverySpecPositioning->sixteen_by_nine;\n }\n } else {\n $imageSubtitleOffset = 0;\n }\n\n return $imageSubtitleOffset;\n }", "title": "" }, { "docid": "25db9405adb69a791007dba8ff58cbc3", "score": "0.5060114", "text": "function updatePosition ( $position, $move ) {\n\n\t$reference = array(\n\t\t\t'a' => 0,\n\t\t\t'b' => 1,\n\t\t\t'c' => 2,\n\t\t\t'd' => 3,\n\t\t\t'e' => 4,\n\t\t\t'f' => 5,\n\t\t\t'g' => 6,\n\t\t\t'h' => 7,\n\t\t\t'1' => 7,\n\t\t\t'2' => 6,\n\t\t\t'3' => 5,\n\t\t\t'4' => 4,\n\t\t\t'5' => 3,\n\t\t\t'6' => 2,\n\t\t\t'7' => 1,\n\t\t\t'8' => 0\n\t\t);\n\n\t$moveSplit = str_split( $move );\n\n\tif ( $move == 'e8c8' && $position[$reference['8']][$reference['e']] === 'k' ) {\n\t\t//black long castle\n\n\t\t$position[$reference['8']][$reference['c']] = 'k';\n\t\t$position[$reference['8']][$reference['d']] = 'r';\n\t\t$position[$reference['8']][$reference['e']] = 0;\n\t\t$position[$reference['8']][$reference['a']] = 0;\n\n\t} else if ( $move == 'e8g8' && $position[$reference['8']][$reference['e']] === 'k' ) {\n\t\t//black short castle\n\n\t\t$position[$reference['8']][$reference['g']] = 'k';\n\t\t$position[$reference['8']][$reference['f']] = 'r';\n\t\t$position[$reference['8']][$reference['e']] = 0;\n\t\t$position[$reference['8']][$reference['h']] = 0;\n\n\t} else if ( $move == 'e1c1' && $position[$reference['1']][$reference['e']] === 'K' ) {\n\t\t//white long castle\n\n\t\t$position[$reference['1']][$reference['c']] = 'K';\n\t\t$position[$reference['1']][$reference['d']] = 'R';\n\t\t$position[$reference['1']][$reference['e']] = 0;\n\t\t$position[$reference['1']][$reference['a']] = 0;\n\n\t} else if ( $move == 'e1g1' && $position[$reference['1']][$reference['e']] === 'K' ) {\n\t\t//white short castle\n\n\t\t$position[$reference['1']][$reference['g']] = 'K';\n\t\t$position[$reference['1']][$reference['f']] = 'R';\n\t\t$position[$reference['1']][$reference['e']] = 0;\n\t\t$position[$reference['1']][$reference['h']] = 0;\n\n\t} else if ( $position[$reference[$moveSplit[1]]][$reference[$moveSplit[0]]] === 'P' \n\t\t&& $moveSplit[0] !== $moveSplit[2]\n\t\t&& $position[$reference[$moveSplit[3]]][$reference[$moveSplit[2]]] === 0 ) {\n\t\t//White en passant\n\n\t\t$position[$reference[$moveSplit[3]]][$reference[$moveSplit[2]]] = 'P';\n\t\t$position[$reference[$moveSplit[3]]+1][$reference[$moveSplit[2]]] = 0;\n\t\t$position[$reference[$moveSplit[1]]][$reference[$moveSplit[0]]] = 0;\n\n\t} else if ( $position[$reference[$moveSplit[1]]][$reference[$moveSplit[0]]] == 'p' \n\t\t&& $moveSplit[0] !== $moveSplit[2]\n\t\t&& $position[$reference[$moveSplit[3]]][$reference[$moveSplit[2]]] === 0 ) {\n\t\t//Black en passant\n\n\t\t$position[$reference[$moveSplit[3]]][$reference[$moveSplit[2]]] = 'p';\n\t\t$position[$reference[$moveSplit[3]]-1][$reference[$moveSplit[2]]] = 0;\n\t\t$position[$reference[$moveSplit[1]]][$reference[$moveSplit[0]]] = 0;\n\t\t\n\t} else if ( count( $moveSplit ) == 5 ) {\n\t\t//promotion\n\t\tif ( $position[$reference[$moveSplit[1]]][$reference[$moveSplit[0]]] === 'P' ) {\n\n\t\t\t$position[$reference[$moveSplit[3]]][$reference[$moveSplit[2]]] = strtoupper( $moveSplit[4] );\n\n\t\t} else {\n\n\t\t\t$position[$reference[$moveSplit[3]]][$reference[$moveSplit[2]]] = strtolower( $moveSplit[4] );\n\n\t\t}\n\n\t\t$position[$reference[$moveSplit[1]]][$reference[$moveSplit[0]]] = 0;\n\n\t} else if ( count( $moveSplit ) == 4 ) {\n\t\t//Normal move\n\t\t$position[$reference[$moveSplit[3]]][$reference[$moveSplit[2]]] = $position[$reference[$moveSplit[1]]][$reference[$moveSplit[0]]];\n\t\t$position[$reference[$moveSplit[1]]][$reference[$moveSplit[0]]] = 0;\n\t}\n\n\treturn $position;\n}", "title": "" }, { "docid": "ff88fa66a9effef9e56858ab6bcf6cde", "score": "0.5052531", "text": "abstract protected function positionWord(Word $word);", "title": "" }, { "docid": "f2b03b121dda93f5cb7c5ca5bacae586", "score": "0.50506043", "text": "public function getPosition()\r\n {\r\n return $this->_position;\r\n }", "title": "" }, { "docid": "88d3b49339ee22561f49fb4b5f20070b", "score": "0.5050484", "text": "function formatPosition($title, $members) {\r # Replace the middle space in <CAPITAL><PERIOD><SPACE><CAPITAL><PERIOD<SPACE>\r # with a THIN SPACE (U+2009, &#8201).\r # This is for cases like \"B. D. Colen\" -> \"B.<THIN SPACE>D. Colen\",\r # \"Bruno B. F. Faviero\" -> \"Bruno B.<THIN SPACE>F. Faviero\", and\r # \"Jonathon E. D. Richmond\" -> \"Jonathan E.<THIN SPACE>D. Richmond PhD\"\r $members = preg_replace(\r '/([A-Z]\\.) ([A-Z]\\. )/',\r '$1' . mb_convert_encoding('&#8201;', 'UTF-8', 'HTML-ENTITIES') . '$2',\r $members);\r\r $seperator = \", \";\r\r # Production positioning hack: replace \"Associate \" with \"Assoc-iateN\",\r # where the hyphen is discretionary (aka soft) and the N is a nonbreaking\r # space. This reduces the liklihood that a line will break as:\r # _DEPARTMENT_\r # Editor: .... Associate\r # Editor: ...\r # and cause confusion or bad copyfitting as a result.\r $title = preg_replace(\r '/Associate /',\r 'Assoc' . mb_convert_encoding('&shy;', 'UTF-8', 'HTML-ENTITIES') .\r 'iate' . mb_convert_encoding('&nbsp;', 'UTF-8', 'HTML-ENTITIES'),\r $title);\r if ($title == '') return join($seperator, $members); // For AdBoard\r if (sizeof($members) > 1 and !preg_match(\"/Staff$/\", $title)) {\r $title = $title . (substr($title, -1) == \"s\" ? \"es\" : \"s\");\r }\r return \"<cTypeface:Bold>$title:<cTypeface:> \" . join($seperator, $members);\r}", "title": "" }, { "docid": "54191e74a28b56224ac92033ca12e020", "score": "0.504881", "text": "function getLetterPos($letterNum, $posX, $posY, $dir) {\n if($dir == 0) {\n return [$posX, $posY + $letterNum]; \n }\n else {\n return [$posX + $letterNum, $posY]; \n }\n}", "title": "" }, { "docid": "6243596b9a920b781f41b2eec0afcbf8", "score": "0.50484306", "text": "public function getPositions() {\r\n return $this->toArray();\r\n }", "title": "" }, { "docid": "53772ae084e0e03c94596b3d383592c9", "score": "0.5036015", "text": "function translatePosition($line)\n{\n global $color, $globalclass;\n\n // The order coordinates appear in the hex is y,z,x\n // Format to floats\n $y = current(unpack('f', correctEndianness(substr($line, 0, 4))));\n $z = current(unpack('f', correctEndianness(substr($line, 4, 4))));\n $x = current(unpack('f', correctEndianness(substr($line, 8, 4))));\n\n setBounds($x, $y, $z);\n\n // output the coords and color index;\n $Label = preg_replace('/P_/', '', $globalclass);\n $Label = preg_replace('/C_/', '', $Label);\n $Label = preg_replace('/_/', '-', $Label);\n return \"$x $y $z \\\"$Label\\\" $color\\r\\n\";\n}", "title": "" }, { "docid": "744fe29e63d08234d026b72df32ec09a", "score": "0.5032417", "text": "function posicion_casilla_elegida($numero_casilla,$tablero){\n\t\t$contador = 0;\n\t\t$numero_fila = 0;\n\t\t$numero_columna = 0;\n\t\tfor( $i=0 ; $i<3 ; $i++){\n\t\t\tfor( $j=0 ; $j<3; ++$j){\n\t\t\t\tif($tablero[$i][$j] == -1){\n\t\t\t\t\t++$contador;\n\t\t\t\t\tif($contador == $numero_casilla){\n\t\t\t\t\t\t$numero_fila = $i;\n\t\t\t\t\t\t$numero_columna = $j;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$posicion[0] = $numero_fila;\n\t\t$posicion[1] = $numero_columna;\n\t\treturn $posicion;\n\t}", "title": "" }, { "docid": "07033e32d7bfd8a628ae1b974edf56f6", "score": "0.5017606", "text": "protected function getPosition() : int\n {\n return $this->position;\n }", "title": "" }, { "docid": "32e8d01526424746b984af4c7a90d44f", "score": "0.50155765", "text": "public function goEast(): void\n {\n $this->x++;\n }", "title": "" }, { "docid": "3ed7cf07d43251e512a3466590f77f81", "score": "0.50123876", "text": "public function getPosition(): int\n {\n return $this->position;\n }", "title": "" }, { "docid": "3ed7cf07d43251e512a3466590f77f81", "score": "0.50123876", "text": "public function getPosition(): int\n {\n return $this->position;\n }", "title": "" }, { "docid": "3ed7cf07d43251e512a3466590f77f81", "score": "0.50123876", "text": "public function getPosition(): int\n {\n return $this->position;\n }", "title": "" }, { "docid": "3ed7cf07d43251e512a3466590f77f81", "score": "0.50123876", "text": "public function getPosition(): int\n {\n return $this->position;\n }", "title": "" }, { "docid": "5bdf3b15d33e23de5189e7ae361f9add", "score": "0.5009895", "text": "function pointLocation() {\n }", "title": "" }, { "docid": "b19023a486577b0c4fa0bd15f5a4d6d4", "score": "0.5008337", "text": "public function getInitPosition(): int\n {\n return 0;\n }", "title": "" }, { "docid": "dafedd0531831dea27c1dc7a8e2efdf8", "score": "0.50004226", "text": "public function getPosition() {\n\t\treturn $this->position;\n\t}", "title": "" }, { "docid": "d625826647017b84d04daf8c4087494e", "score": "0.4996515", "text": "public function getPosition() {\r\n return $this->position;\r\n }", "title": "" }, { "docid": "807f8ec43fecc766ca58a7b223353300", "score": "0.49879742", "text": "function get_sentence_pos ($sentence_array, $pos) {\r\r\n\tfor($i = 0; isset($sentence_array[$i + 1][\"offset\"]) && $sentence_array[$i + 1][\"offset\"] <= $pos; $i++ ) {if ($i == 100)die(\"\\$i is out of control\");}\r\r\n\tfor($j = 0; is_numeric($sentence_array[$i][$j+1]->offset) && $sentence_array[$i][$j+1]->offset + $sentence_array[$i][\"offset\"] <= $pos; $j++ ) {if ($j == 100)die(\"j is crazy\");}\r\r\n\treturn new Sentence_pos($i, $j);\r\r\n}", "title": "" }, { "docid": "ff3cf8767ddbd98cc39e8cdac973dea9", "score": "0.49820003", "text": "private function assign_team_position($teams)\n\t{\n\t\t$skip = true;\n\n\t\tforeach ($teams as $team)\n\t\t{\n\t\t\t$team->position =0;\n\t\t\tif($team->points != 0)\n\t\t\t{\n\t\t\t\t$skip = false;\n\t\t\t}\n\t\t}\n\n\t\tif(!$skip)\n\t\t{\n\t\t\t$index = 0;\n\t\t\tforeach ($teams as $team)\n\t\t\t{\n\t\t\t\tif($index == 0)\n\t\t\t\t{\n\t\t\t\t\t$team->position = ++$index;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif($team->tied_flag != 0 &&\n\t\t\t\t\t $team->tied_flag == $teams[$index-1]->tied_flag &&\n\t\t\t\t\t $team->points == $teams[$index-1]->points)\n\t\t\t\t\t{\n\t\t\t\t\t\t$team->position = $teams[$index-1]->position;\n\t\t\t\t\t\t++$index;\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$team->position = ++$index;\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
10d291afcb0ee153433e644a5c4cff2d
Handle the incoming connections, register them into the connection pool
[ { "docid": "0fffd61570cb3ee46f3c6c1aca8f3e59", "score": "0.64141136", "text": "public function handleConnection()\n {\n return function (ConnectionInterface $connection) {\n echo \"-> Incoming connection from {$connection->getRemoteAddress()}\" . PHP_EOL;\n $this->pool->registerConnection($connection);\n };\n }", "title": "" } ]
[ { "docid": "c10bcfa70c08f50e6ac116b1ad4c9834", "score": "0.6392808", "text": "public function putConnection(): void\n {\n $this->pool->putConn($this->conn);\n }", "title": "" }, { "docid": "d62b9f9761bcacc2ff1ccf99e4aa2932", "score": "0.6304832", "text": "protected function loadConnections()\n {\n $config = $this->getConfig();\n if (!isset($config['connections'])\n || !is_array($config['connections'])\n ) {\n return;\n }\n\n $driver = $this->getDriver();\n $connections = $this->getConnectionHandler();\n $plugins = $this->getPluginHandler();\n $ui = $this->getUi();\n\n foreach ($config['connections'] as $data) {\n $connection = new Phergie_Connection($data);\n $connections->addConnection($connection);\n\n $ui->onConnect($data['host']);\n $driver->setConnection($connection)->doConnect();\n $plugins->setConnection($connection);\n $plugins->onConnect();\n }\n }", "title": "" }, { "docid": "1a4dfb43482460b437b8ec0f87564599", "score": "0.57824194", "text": "protected function _configureConnections()\n {\n $ctx = $this->getContext();\n $confDir = Path::system($ctx->getProjectRoot(), 'conf');\n\n $thisonnectionConfig = new IniConfigProvider();\n $thisonnectionConfig->loadFiles(\n [\n $confDir . DIRECTORY_SEPARATOR . 'defaults' . DIRECTORY_SEPARATOR . 'connections.ini',\n $confDir . DIRECTORY_SEPARATOR . $ctx->getEnvironment() . DIRECTORY_SEPARATOR . 'connections.ini',\n ]\n );\n $datastoreConfig = new IniConfigProvider();\n $datastoreConfig->loadFiles(\n [\n $confDir . DIRECTORY_SEPARATOR . 'defaults' . DIRECTORY_SEPARATOR . 'datastores.ini',\n $confDir . DIRECTORY_SEPARATOR . $ctx->getEnvironment() . DIRECTORY_SEPARATOR . 'datastores.ini',\n ]\n );\n $resolver = new DalResolver($thisonnectionConfig, $datastoreConfig);\n $this->getCubex()->share(DalResolver::class, $resolver);\n $resolver->boot();\n }", "title": "" }, { "docid": "c1e51dfd539d2ff0e0cdc57066af32cf", "score": "0.5779989", "text": "private function bindConnection()\n\t{\n\t\t$this->app->singleton('psychic.conn', function()\n\t\t{\n\t\t\t$defaultConnection = $this->app['config']->get('database.default');\n\t\t\t$connections = $this->app['config']->get('database.connections');\n\t\t\t$connection = $connections[$defaultConnection];\n\t\t\t\n\t\t\t$config = new \\Doctrine\\DBAL\\Configuration();\n\t\t\t$connectionParams = array(\n\t\t\t\t\t'dbname' => $connection['database'],\n\t\t\t\t\t'user' => $connection['username'],\n\t\t\t\t\t'password' => $connection['password'],\n\t\t\t\t\t'host' => $connection['host'],\n\t\t\t\t\t'driver' => 'pdo_mysql',\n\t\t\t);\n\t\t\treturn \\Doctrine\\DBAL\\DriverManager::getConnection($connectionParams, $config);\n\t\t});\n\t}", "title": "" }, { "docid": "af9864ee3727f35ba20b1504e2cccf1a", "score": "0.57797664", "text": "public function getConnectionHandler()\n {\n if (empty($this->connections)) {\n $this->connections = new Phergie_Connection_Handler;\n }\n return $this->connections;\n }", "title": "" }, { "docid": "b3081204b704a21819ec653babb5e23e", "score": "0.5720173", "text": "protected function registerConnectionServices()\n {\n $this->app->singleton('db.factory', function ($app) {\n // hack\n return new ConnectionFactory($app);\n });\n\n $this->app->singleton('db', function ($app) {\n // hack\n return new DatabaseManager($app, $app['db.factory']);\n });\n\n $this->app->bind('db.connection', function ($app) {\n return $app['db']->connection();\n });\n }", "title": "" }, { "docid": "77561f0332aea01859ec0279db658bda", "score": "0.571624", "text": "protected function registerConnection()\n {\n $this->getContainer()->share('queue.connection', function () {\n return $this->getContainer()->get('queue')->connection();\n });\n }", "title": "" }, { "docid": "9406838383209e084b02da08ecf7460d", "score": "0.5650341", "text": "protected function registerConnectionEvents()\n {\n $this->rawConnection->on('data', $this->onConnectionData());\n $this->rawConnection->on('close', $this->onConnectionClose());\n $this->rawConnection->on('end', $this->onConnectionEnd());\n $this->rawConnection->on('error', $this->onConnectionError());\n }", "title": "" }, { "docid": "b1f886beeed395f152585161ae19c362", "score": "0.56487936", "text": "private function doCons() {\n $this->conn = $this->do_connections(\"localhost\", \"taskticketmanijae\", \"root\", \"\");\n }", "title": "" }, { "docid": "19a0652e98e3be8a1ef43f3191d61602", "score": "0.56237656", "text": "private function returnConnection(): void\n {\n if ($this->transaction !== null || $this->transactionLevel > 0) {\n return;\n }\n\n if ($this->connection !== null) {\n $connection = $this->connection;\n $this->connection = null;\n\n $this->pool->push($connection);\n }\n }", "title": "" }, { "docid": "9936eff111ce6cd21b3fdac53e095c91", "score": "0.5602147", "text": "public static function register_connections() {\n\t\tregister_graphql_connection(\n\t\t\t[\n\t\t\t\t'fromType' => 'RootQuery',\n\t\t\t\t'toType' => 'Plugin',\n\t\t\t\t'fromFieldName' => 'plugins',\n\t\t\t\t'resolve' => function ( $root, $args, $context, $info ) {\n\t\t\t\t\treturn DataSource::resolve_plugins_connection( $root, $args, $context, $info );\n\t\t\t\t},\n\t\t\t]\n\t\t);\n\t}", "title": "" }, { "docid": "f54b1103e4c8e1622afc2caa00b5aae1", "score": "0.5591298", "text": "protected function registerConnectionServices()\n {\n // The connection factory is used to create the actual connection instances on\n // the database. We will inject the factory into the manager so that it may\n // make the connections while they are actually needed and not of before.\n $this->app->singleton('db.factory', function ($app) {\n return new ConnectionFactory($app);\n });\n\n // The database manager is used to resolve various connections, since multiple\n // connections might be managed. It also implements the connection resolver\n // interface which may be used by other components requiring connections.\n $this->app->singleton('db', function ($app) {\n return new DatabaseManager($app, $app['db.factory']);\n });\n\n $this->app->bind('db.connection', function ($app) {\n return $app['db']->connection();\n });\n\n $this->app->alias('db', ConnectionResolverInterface::class);\n }", "title": "" }, { "docid": "42b62d7cb93fadd5b3f48648afc41361", "score": "0.5556952", "text": "public function resolveConnection();", "title": "" }, { "docid": "fa3e817aed8fcf47ca0cf907abee15d7", "score": "0.5538439", "text": "protected abstract function getConnection();", "title": "" }, { "docid": "71e73660b94ee44cff9a0c08fae299eb", "score": "0.545198", "text": "protected function registerConnectionResolver(): void\n {\n // todo - PDO or closure\n Connection::resolverFor('mysql', function (\n Closure $connection,\n string $database,\n string $prefix,\n array $config\n ) {\n /** @var DatabaseManager $manager */\n $manager = $this->app->get('db');\n return (new MySqlConnection(\n $connection,\n $database,\n $prefix,\n $config,\n ))->setDatabaseManager($manager);\n });\n }", "title": "" }, { "docid": "9fcadbf1d105475584cdf85967b8eeff", "score": "0.5431537", "text": "public function onOpen(ConnectionInterface $conn)\n{ \n $this->clients->attach($conn);\n}", "title": "" }, { "docid": "745524ad8fb93fdcf1d36624dc684fb3", "score": "0.53727907", "text": "protected function accept()\n {\n Reactor::getInstance()->add($this->server, Reactor::ALL, $this->createConn());\n Reactor::getInstance()->loop();\n }", "title": "" }, { "docid": "945b73dc853961c497b8df94c5cf9aa7", "score": "0.5369913", "text": "public function register()\n\t{\n\t\t// Extend the connections with pdo-via-oci8 drivers by using a yajra\\pdo\\oci8 connector\n\t\tforeach (Config::get('database.connections') as $conn => $config)\n\t\t{\n\t\t\t// Only use configurations that feature a \"pdo-via-oci8\" or \"oci8\" or \"oracle\" driver\n\t\t\tif ( ! isset($config['driver']) || ! in_array($config['driver'], ['pdo-via-oci8', 'oci8', 'oracle']))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$this->app->resolving('db', function ($db)\n\t\t\t{\n\t\t\t\t$db->extend('oracle', function ($config)\n\t\t\t\t{\n\t\t\t\t\t$connector = new Connector();\n\t\t\t\t\t$connection = $connector->connect($config);\n\t\t\t\t\t$db = new Oci8Connection($connection, $config[\"database\"], $config[\"prefix\"]);\n\n\t\t\t\t\t// Like Postgres, Oracle allows the concept of \"schema\"\n\t\t\t\t\tif (isset($config['schema']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$db->setSchema($config['schema']);\n\t\t\t\t\t}\n\n\t\t\t\t\t// set oracle session variables\n\t\t\t\t\t$sessionVars = [\n\t\t\t\t\t\t'NLS_TIME_FORMAT' => 'HH24:MI:SS',\n\t\t\t\t\t\t'NLS_DATE_FORMAT' => 'YYYY-MM-DD HH24:MI:SS',\n\t\t\t\t\t\t'NLS_TIMESTAMP_FORMAT' => 'YYYY-MM-DD HH24:MI:SS',\n\t\t\t\t\t\t'NLS_TIMESTAMP_TZ_FORMAT' => 'YYYY-MM-DD HH24:MI:SS TZH:TZM',\n\t\t\t\t\t\t'NLS_NUMERIC_CHARACTERS' => '.,',\n\t\t\t\t\t];\n\t\t\t\t\t$db->setSessionVars($sessionVars);\n\n\t\t\t\t\treturn $db;\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}", "title": "" }, { "docid": "337d7b395a03cc6b6ff15f5a5595a111", "score": "0.5368601", "text": "public function getConnectionHandlers()\n {\n return $this->connectionHandlers;\n }", "title": "" }, { "docid": "fde6c8e5cd3205447f2daf77cb0863f0", "score": "0.5364343", "text": "public function db_close_connections()\n {\n foreach ($this->cache_db as $db) {\n foreach ($db as $_db) {\n odbc_commit($_db);\n }\n }\n }", "title": "" }, { "docid": "08732aa987e1c0eeec102061638ada4d", "score": "0.53351057", "text": "public function getConnections();", "title": "" }, { "docid": "9b6ef5dfb6b795a70ba32f004e0fea16", "score": "0.5321692", "text": "protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "title": "" }, { "docid": "efc10098ce164adf2a4d596bc9cf730d", "score": "0.53177404", "text": "protected function getConnectionHandlers($name) {\n\n\t\t$connections = $this->app['config']['elasticsearch-handlers.connections'];\n\n\t\treturn array_get($connections, $name, []);\n\t}", "title": "" }, { "docid": "e8afa1d2fa3887886ef623c3f7e745b3", "score": "0.5294081", "text": "public static function register_connections() {\n\n\t\tregister_graphql_connection([\n\t\t\t'fromType' => 'ContentNode',\n\t\t\t'toType' => 'EnqueuedScript',\n\t\t\t'fromFieldName' => 'enqueuedScripts',\n\t\t\t'resolve' => function( $source, $args, $context, $info ) {\n\t\t\t\t$resolver = new EnqueuedScriptsConnectionResolver( $source, $args, $context, $info );\n\t\t\t\treturn $resolver->get_connection();\n\t\t\t},\n\t\t]);\n\n\t\tregister_graphql_connection([\n\t\t\t'fromType' => 'TermNode',\n\t\t\t'toType' => 'EnqueuedScript',\n\t\t\t'fromFieldName' => 'enqueuedScripts',\n\t\t\t'resolve' => function( $source, $args, $context, $info ) {\n\t\t\t\t$resolver = new EnqueuedScriptsConnectionResolver( $source, $args, $context, $info );\n\t\t\t\treturn $resolver->get_connection();\n\t\t\t},\n\t\t]);\n\n\t\tregister_graphql_connection([\n\t\t\t'fromType' => 'RootQuery',\n\t\t\t'toType' => 'EnqueuedScript',\n\t\t\t'fromFieldName' => 'registeredScripts',\n\t\t\t'resolve' => function( $source, $args, $context, $info ) {\n\n\t\t\t\t// The connection resolver expects the source to include\n\t\t\t\t// enqueuedScriptsQueue\n\t\t\t\t$source = new \\stdClass();\n\t\t\t\t$source->enqueuedScriptsQueue = [];\n\t\t\t\tglobal $wp_scripts;\n\t\t\t\tdo_action( 'wp_enqueue_scripts' );\n\t\t\t\t$source->enqueuedScriptsQueue = array_keys( $wp_scripts->registered );\n\t\t\t\t$resolver = new EnqueuedScriptsConnectionResolver( $source, $args, $context, $info );\n\t\t\t\treturn $resolver->get_connection();\n\t\t\t},\n\t\t]);\n\n\t\tregister_graphql_connection([\n\t\t\t'fromType' => 'User',\n\t\t\t'toType' => 'EnqueuedScript',\n\t\t\t'fromFieldName' => 'enqueuedScripts',\n\t\t\t'resolve' => function( $source, $args, $context, $info ) {\n\t\t\t\t$resolver = new EnqueuedScriptsConnectionResolver( $source, $args, $context, $info );\n\t\t\t\treturn $resolver->get_connection();\n\t\t\t},\n\t\t]);\n\n\t}", "title": "" }, { "docid": "fccbc1f1f84a3378a6fa6878947695e5", "score": "0.5291499", "text": "private function conn()\n {\n foreach($this->array as $db_origin => $a){\n try{\n\n $this->conn[$db_origin] = new PDO(\"mysql:host=\".$this->array[$db_origin][\"host\"].\";dbname=\".$this->array[$db_origin][\"database\"], $this->array[$db_origin][\"user\"], $this->array[$db_origin][\"pass\"], array(\\PDO::ATTR_PERSISTENT => true));\n\n }catch(Exception $e){\n print $e->getMessage();\n }\n }\n }", "title": "" }, { "docid": "733d7d192d4df02da63f2e5ac44a2882", "score": "0.5268708", "text": "abstract public function getConnection();", "title": "" }, { "docid": "89b741a6b51b3edb92a28defe7cb6b81", "score": "0.52158463", "text": "protected function getConnectionPool()\n {\n return GeneralUtility::makeInstance(ConnectionPool::class);\n }", "title": "" }, { "docid": "a2ef6173e37ed323108b5d061dea2818", "score": "0.52154654", "text": "function handlePOSTRequest() {\n if (connectToDB()) {\n disconnectFromDB();\n }\n }", "title": "" }, { "docid": "17cef2b1bef872840cfebc6ae4bd721b", "score": "0.51977354", "text": "protected function getConnection(){\r\n\r\n return $this->connectionHandle;\r\n }", "title": "" }, { "docid": "e05b782a60635874c80848037de08f7e", "score": "0.5183729", "text": "protected function registerLdapConnections()\n {\n Container::setDefaultConnection(config('ldap.default', 'default'));\n\n foreach (config('ldap.connections', []) as $name => $config) {\n $connection = new Connection($config);\n\n if (config('ldap.cache.enabled', false)) {\n $this->registerLdapCache($connection);\n }\n\n Container::addConnection($connection, $name);\n }\n }", "title": "" }, { "docid": "8844de5bb0dede6f895e30c967bf5cb8", "score": "0.516841", "text": "abstract protected function _connect();", "title": "" }, { "docid": "7fd2ec05ba521b092204ae71f53ae678", "score": "0.51585305", "text": "private function connect() \n\t{\n\t\ttry {\n\t\t\tif ($this->usepool) {\n\t\t\t\t$this->redis = new \\redisProxy();\n\t\t\t} else {\n\t\t\t\t$this->redis = new \\Redis();\n\t\t\t}\n\n\t\t\t$this->redis->connect(self::$host, self::$port, 0);\n\t\t} catch (\\RedisException $e) {\n\t\t\t$this->dealErrorInfo($e);\n\t\t}\n\t}", "title": "" }, { "docid": "140a89c678fa7e84d0cce769f73cf1ba", "score": "0.51407826", "text": "protected function bindHandlers()\n {\n $this->setStartHandler();\n $this->setRequestHandler();\n $this->setShutdownHandler();\n }", "title": "" }, { "docid": "9cea1995b7c6b156e8bc3031414f88e6", "score": "0.5137306", "text": "public function onOpen(ConnectionInterface $conn) {\n $this->clients->attach($conn);\n $this->users[$conn->resourceId] = $conn;\n\n\n\n // var_dump($this->clients);\n echo \"New connection! With User: ({$conn->resourceId})\\n\";\n }", "title": "" }, { "docid": "bd45f4bfc61ad934924a932c0b85e300", "score": "0.51311964", "text": "public function getConnection() {\n if (!isset($this->pdo)) {\n $host = $this->getConfigs('Hote');\n $user = $this->getConfigs('User');\n $password = $this->getConfigs('Password');\n $db_name = $this->getConfigs('Database');\n $driver = $this->getConfigs('driver');\n $dnsString = '';\n\n if ($driver === 'sqlite') {\n $database = \"Data/$db_name.db\";\n if (!file_exists(dirname($database)))\n mkdir(dirname($database), 0777, true);\n new \\SQLite3($database);\n $dnsString = \"sqlite:/$db_name\";\n }else {\n $dnsString = \"$driver:host=$host;dbname=$db_name\";\n }\n\n try {\n $this->pdo = new PDO($dnsString, $user, $password);\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n if (!isset($this->nbOfSimultaneousConnections) && $driver != 'sqlite') {\n $result = $this->pdo->query(\"SHOW STATUS\");\n\n foreach ($result->fetchAll() as $row)\n if ($row['Variable_name'] === 'Max_used_connections') {\n $this->nbOfSimultaneousConnections = $row['Value'];\n break;\n }\n }\n return 1;\n } catch (PDOException $e) {\n $this->setError(\"Error Db - \", $e->getMessage());\n }\n }\n else\n return 1;\n }", "title": "" }, { "docid": "e43d9dafd10107808776229aaa074485", "score": "0.51278204", "text": "public function handle()\n {\n RepeatGeneralSlot::dispatch()->onConnection('database')->onQueue('repeater');\n RepeatSlotMaker::dispatch()->onConnection('database')->onQueue('repeater');\n }", "title": "" }, { "docid": "fa153c74e6de581fa9c6b57f427b9137", "score": "0.5115509", "text": "public function getConnection()\n {\n return;\n }", "title": "" }, { "docid": "afc011892b5ba6c43c8ab01743cec79f", "score": "0.5097392", "text": "public function onOpen(Connection $connection, Request $request);", "title": "" }, { "docid": "bbf1914d7650772e70bac0a9f14694fc", "score": "0.5080404", "text": "public function starProcessSocket()\n {\n if ($this->strHost == null)\n $this->setHost('desenvphp.local');\n if ($this->strPort == null)\n $this->setPort('8083');\n \n $this->createSocket();\n $this->reuseablePort();\n $this->bindSocketHost();\n $this->listnerSocket();\n $this->listSocketLoop();\n }", "title": "" }, { "docid": "d7f42d09b624dadffa8b05cb672c7213", "score": "0.50675464", "text": "public function getConnection($name);", "title": "" }, { "docid": "413d66cf42ddac2c3ea302c11e2dff60", "score": "0.5064842", "text": "public function getConnection();", "title": "" }, { "docid": "413d66cf42ddac2c3ea302c11e2dff60", "score": "0.5064842", "text": "public function getConnection();", "title": "" }, { "docid": "413d66cf42ddac2c3ea302c11e2dff60", "score": "0.5064842", "text": "public function getConnection();", "title": "" }, { "docid": "413d66cf42ddac2c3ea302c11e2dff60", "score": "0.5064842", "text": "public function getConnection();", "title": "" }, { "docid": "2dfc05772521f05a6b422a437cda5a52", "score": "0.50644326", "text": "abstract function open_connection();", "title": "" }, { "docid": "4a89c0ef955ba663f9a2560ac8617e3f", "score": "0.5057935", "text": "protected function connect()\n\t{\n\t}", "title": "" }, { "docid": "0492407072ec036bffb28ae80a33b552", "score": "0.50508606", "text": "function openMySQLConn(){\n\t\t$this->conn = new ConexionMySQL($this->dataBase);\n\t}", "title": "" }, { "docid": "12ebc5e0a27c0ead218e350fa55ebb46", "score": "0.50356615", "text": "public function getConnection()\n {\n }", "title": "" }, { "docid": "103ce6e946a4c4303bcaf0e05be68a88", "score": "0.50316656", "text": "public function onOpen(ConnectionInterface $conn) {\n $this->clients->attach($conn);\n\n echo \"New connection! ({$conn->resourceId})\\n\";\n array_push($this->registes, new Register($conn->resourceId));\n }", "title": "" }, { "docid": "b5894884dfecd49abf5f7b23f146d0c7", "score": "0.5029307", "text": "private function acceptConnection(): void\n {\n $clientSocket = @stream_socket_accept($this->serverSocket);\n\n if (false !== $clientSocket) {\n stream_set_blocking($clientSocket, false);\n\n $connection = new StreamSocketConnection($clientSocket);\n\n $id = spl_object_hash($connection);\n\n $this->clientSockets[$id] = $clientSocket;\n $this->connections[$id] = $connection;\n }\n }", "title": "" }, { "docid": "61de4876513459f4ed30c0524da85bed", "score": "0.5027073", "text": "public function handle()\n {\n $request = array(\"type\"=>\"subscribe\",\"product_ids\"=>array(\"btc-usd\"),\"channels\"=>array(\"level2\",\"heartbeat\",array(\"name\"=>\"ticker\",\"product_ids\"=>array(\"btc-usd\"))));\n \\Ratchet\\Client\\connect('wss://ws-feed.gdax.com')->then(function($conn) {\n $conn->on('message', function($msg) use ($conn) {\n echo \"Received: {$msg}\\n\";\n //$conn->close();\n });\n\n //$conn->send('subscribe');\n// $conn->on('open', function() use ($conn) {\n// $conn->send(json_encode(array(\"type\"=>\"subscribe\",\"product_ids\"=>array(\"btc-usd\"),\"channels\"=>array(\"heartbeat\"))));\n// });\n $request = array(\"type\"=>\"subscribe\",\"product_ids\"=>array(\"btc-usd\"),\"channels\"=>array(\"matches\",\"heartbeat\",array(\"name\"=>\"ticker\",\"product_ids\"=>array(\"btc-usd\"))));\n $conn->send(json_encode($request));\n }, function ($e) {\n echo \"Could not connect: {$e->getMessage()}\\n\";\n });\n\n\n }", "title": "" }, { "docid": "485a0b22bb2e8be8981e60438e139f78", "score": "0.5010653", "text": "public function register() {\n\t\tset_exception_handler([$this, 'handleException']);\n\t\tset_error_handler([$this, 'handleError']);\n\t\tregister_shutdown_function([$this, 'handleFatalError']);\n\t}", "title": "" }, { "docid": "11bb6f7ca5997f8cb24e5c9243ce1366", "score": "0.50035673", "text": "function getDataBaseConnectionFromPool(){\r\n\t# ...\r\n\tif (!connection) throw new administratorException(\r\n \t\t\"Database connection closed\", # description\r\n\t\t\"ddbb URL: \"+$ddbbURL, # detail\r\n\t\t\"reconnect please\"); # (possible) solution\r\n}", "title": "" }, { "docid": "b2b06f50ad0852c90d46235a4e88df4d", "score": "0.49879393", "text": "private function openConnection()\n {\n $this->reset();\n if(!isset($this->dbh))\n $this->dbh = new \\PDO($this->s_dns, $this->s_username, $this->s_password, array(\\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION)); \n\n \n }", "title": "" }, { "docid": "5c3687709ffe2357d336d9507ca9913a", "score": "0.49820393", "text": "public function Attach()\n {\n set_error_handler(array($this, 'HandleError'));\n set_exception_handler(array($this, 'HandleException'));\n register_shutdown_function(array($this, 'HandleShutdown'));\n }", "title": "" }, { "docid": "1dc56bd6dda646eaf0f46f85fc47f2a5", "score": "0.49819782", "text": "public static function register_connections() {\n\n\t\tregister_graphql_connection( [\n\t\t\t'fromType' => 'ContentType',\n\t\t\t'toType' => 'ContentNode',\n\t\t\t'fromFieldName' => 'contentNodes',\n\t\t\t'connectionArgs' => self::get_connection_args(),\n\t\t\t'queryClass' => 'WP_Query',\n\t\t\t'resolve' => function( PostType $post_type, $args, AppContext $context, ResolveInfo $info ) {\n\n\t\t\t\t$resolver = new PostObjectConnectionResolver( $post_type, $args, $context, $info );\n\t\t\t\t$resolver->set_query_arg( 'post_type', $post_type->name );\n\n\t\t\t\treturn $resolver->get_connection();\n\n\t\t\t},\n\t\t] );\n\n\t\tregister_graphql_connection( [\n\t\t\t'fromType' => 'Comment',\n\t\t\t'toType' => 'ContentNode',\n\t\t\t'queryClass' => 'WP_Query',\n\t\t\t'oneToOne' => true,\n\t\t\t'fromFieldName' => 'commentedOn',\n\t\t\t'resolve' => function( Comment $comment, $args, AppContext $context, ResolveInfo $info ) {\n\t\t\t\tif ( empty( $comment->comment_post_ID ) || ! absint( $comment->comment_post_ID ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t$id = absint( $comment->comment_post_ID );\n\t\t\t\t$resolver = new PostObjectConnectionResolver( $comment, $args, $context, $info, 'any' );\n\n\t\t\t\treturn $resolver->one_to_one()->set_query_arg( 'p', $id )->set_query_arg( 'post_parent', null )->get_connection();\n\t\t\t},\n\t\t] );\n\n\t\tregister_graphql_connection( [\n\t\t\t'fromType' => 'NodeWithRevisions',\n\t\t\t'toType' => 'ContentNode',\n\t\t\t'fromFieldName' => 'revisionOf',\n\t\t\t'description' => __( 'If the current node is a revision, this field exposes the node this is a revision of. Returns null if the node is not a revision of another node.', 'wp-graphql' ),\n\t\t\t'oneToOne' => true,\n\t\t\t'resolve' => function( Post $post, $args, AppContext $context, ResolveInfo $info ) {\n\n\t\t\t\tif ( ! $post->isRevision || ! isset( $post->parentDatabaseId ) || ! absint( $post->parentDatabaseId ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t$resolver = new PostObjectConnectionResolver( $post, $args, $context, $info );\n\t\t\t\t$resolver->set_query_arg( 'p', $post->parentDatabaseId );\n\n\t\t\t\treturn $resolver->one_to_one()->get_connection();\n\n\t\t\t},\n\t\t] );\n\n\t\tregister_graphql_connection(\n\t\t\t[\n\t\t\t\t'fromType' => 'RootQuery',\n\t\t\t\t'toType' => 'ContentNode',\n\t\t\t\t'queryClass' => 'WP_Query',\n\t\t\t\t'fromFieldName' => 'contentNodes',\n\t\t\t\t'connectionArgs' => self::get_connection_args(\n\t\t\t\t\t[\n\t\t\t\t\t\t'contentTypes' => [\n\t\t\t\t\t\t\t'type' => [ 'list_of' => 'ContentTypeEnum' ],\n\t\t\t\t\t\t\t'description' => __( 'The Types of content to filter', 'wp-graphql' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\tnull\n\t\t\t\t),\n\t\t\t\t'resolve' => function( $source, $args, $context, $info ) {\n\t\t\t\t\t$post_types = isset( $args['where']['contentTypes'] ) && is_array( $args['where']['contentTypes'] ) ? $args['where']['contentTypes'] : \\WPGraphQL::get_allowed_post_types();\n\n\t\t\t\t\treturn DataSource::resolve_post_objects_connection( $source, $args, $context, $info, $post_types );\n\t\t\t\t},\n\t\t\t]\n\t\t);\n\n\t\tregister_graphql_connection( [\n\t\t\t'fromType' => 'HierarchicalContentNode',\n\t\t\t'toType' => 'ContentNode',\n\t\t\t'fromFieldName' => 'parent',\n\t\t\t'connectionTypeName' => 'HierarchicalContentNodeToParentContentNodeConnection',\n\t\t\t'description' => __( 'The parent of the node. The parent object can be of various types', 'wp-graphql' ),\n\t\t\t'oneToOne' => true,\n\t\t\t'resolve' => function( Post $post, $args, AppContext $context, ResolveInfo $info ) {\n\n\t\t\t\tif ( ! isset( $post->parentDatabaseId ) || ! absint( $post->parentDatabaseId ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t$resolver = new PostObjectConnectionResolver( $post, $args, $context, $info );\n\t\t\t\t$resolver->set_query_arg( 'p', $post->parentDatabaseId );\n\n\t\t\t\treturn $resolver->one_to_one()->get_connection();\n\n\t\t\t},\n\t\t] );\n\n\t\tregister_graphql_connection( [\n\t\t\t'fromType' => 'HierarchicalContentNode',\n\t\t\t'fromFieldName' => 'children',\n\t\t\t'toType' => 'ContentNode',\n\t\t\t'connectionTypeName' => 'HierarchicalContentNodeToContentNodeChildrenConnection',\n\t\t\t'connectionArgs' => self::get_connection_args(),\n\t\t\t'queryClass' => 'WP_Query',\n\t\t\t'resolve' => function( Post $post, $args, $context, $info ) {\n\n\t\t\t\tif ( $post->isRevision ) {\n\t\t\t\t\t$id = $post->parentDatabaseId;\n\t\t\t\t} else {\n\t\t\t\t\t$id = $post->ID;\n\t\t\t\t}\n\n\t\t\t\t$resolver = new PostObjectConnectionResolver( $post, $args, $context, $info, 'any' );\n\t\t\t\t$resolver->set_query_arg( 'post_parent', $id );\n\n\t\t\t\treturn $resolver->get_connection();\n\n\t\t\t},\n\t\t] );\n\n\t\tregister_graphql_connection( [\n\t\t\t'fromType' => 'HierarchicalContentNode',\n\t\t\t'toType' => 'ContentNode',\n\t\t\t'fromFieldName' => 'ancestors',\n\t\t\t'connectionArgs' => self::get_connection_args(),\n\t\t\t'connectionTypeName' => 'HierarchicalContentNodeToContentNodeAncestorsConnection',\n\t\t\t'queryClass' => 'WP_Query',\n\t\t\t'description' => __( 'Returns ancestors of the node. Default ordered as lowest (closest to the child) to highest (closest to the root).', 'wp-graphql' ),\n\t\t\t'resolve' => function( Post $post, $args, $context, $info ) {\n\t\t\t\t$ancestors = get_ancestors( $post->ID, '', 'post_type' );\n\t\t\t\tif ( empty( $ancestors ) || ! is_array( $ancestors ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t$resolver = new PostObjectConnectionResolver( $post, $args, $context, $info );\n\t\t\t\t$resolver->set_query_arg( 'post__in', $ancestors );\n\n\t\t\t\treturn $resolver->get_connection();\n\t\t\t},\n\t\t] );\n\n\t\t/**\n\t\t * Registers connections for each post_type that has a connection\n\t\t * to a taxonomy that's allowed in GraphQL\n\t\t */\n\t\t$allowed_taxonomies = \\WPGraphQL::get_allowed_taxonomies();\n\n\t\t/**\n\t\t * Register Connections to PostObjects\n\t\t */\n\t\t$allowed_post_types = \\WPGraphQL::get_allowed_post_types();\n\t\tif ( ! empty( $allowed_post_types ) && is_array( $allowed_post_types ) ) {\n\t\t\tforeach ( $allowed_post_types as $post_type ) {\n\n\t\t\t\t$post_type_object = get_post_type_object( $post_type );\n\n\t\t\t\tif ( empty( $post_type_object ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Registers the RootQuery connection for each post_type\n\t\t\t\t */\n\t\t\t\tif ( 'revision' !== $post_type ) {\n\t\t\t\t\tregister_graphql_connection( self::get_connection_config( $post_type_object ) );\n\t\t\t\t}\n\n\t\t\t\tif ( ! in_array( $post_type, [ 'attachment', 'revision' ], true ) ) {\n\t\t\t\t\tregister_graphql_connection( [\n\t\t\t\t\t\t'fromType' => $post_type_object->graphql_single_name,\n\t\t\t\t\t\t'toType' => $post_type_object->graphql_single_name,\n\t\t\t\t\t\t'fromFieldName' => 'preview',\n\t\t\t\t\t\t'connectionTypeName' => ucfirst( $post_type_object->graphql_single_name ) . 'ToPreviewConnection',\n\t\t\t\t\t\t'oneToOne' => true,\n\t\t\t\t\t\t'resolve' => function( Post $post, $args, AppContext $context, ResolveInfo $info ) {\n\n\t\t\t\t\t\t\tif ( $post->isRevision ) {\n\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( empty( $post->previewRevisionDatabaseId ) ) {\n\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$resolver = new PostObjectConnectionResolver( $post, $args, $context, $info, 'revision' );\n\t\t\t\t\t\t\t$resolver->set_query_arg( 'p', $post->previewRevisionDatabaseId );\n\n\t\t\t\t\t\t\treturn $resolver->one_to_one()->get_connection();\n\t\t\t\t\t\t},\n\t\t\t\t\t] );\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Any post type that supports author should have a connection from User->Author\n\t\t\t\t */\n\t\t\t\tif ( true === post_type_supports( $post_type_object->name, 'author' ) ) {\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Registers the User connection for each post_type\n\t\t\t\t\t */\n\t\t\t\t\tregister_graphql_connection(\n\t\t\t\t\t\tself::get_connection_config(\n\t\t\t\t\t\t\t$post_type_object,\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'fromType' => 'User',\n\t\t\t\t\t\t\t\t'resolve' => function( User $user, $args, AppContext $context, ResolveInfo $info ) use ( $post_type_object ) {\n\t\t\t\t\t\t\t\t\t$resolver = new PostObjectConnectionResolver( $user, $args, $context, $info, $post_type_object->name );\n\t\t\t\t\t\t\t\t\t$resolver->set_query_arg( 'author', $user->userId );\n\n\t\t\t\t\t\t\t\t\treturn $resolver->get_connection();\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\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $allowed_taxonomies ) && is_array( $allowed_taxonomies ) ) {\n\t\t\t\t\tforeach ( $allowed_taxonomies as $taxonomy ) {\n\t\t\t\t\t\t// If the taxonomy is in the array of taxonomies registered to the post_type\n\t\t\t\t\t\tif ( in_array( $taxonomy, get_object_taxonomies( $post_type_object->name ), true ) ) {\n\t\t\t\t\t\t\t$tax_object = get_taxonomy( $taxonomy );\n\n\t\t\t\t\t\t\tregister_graphql_connection(\n\t\t\t\t\t\t\t\tself::get_connection_config(\n\t\t\t\t\t\t\t\t\t$post_type_object,\n\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t'fromType' => $tax_object->graphql_single_name,\n\t\t\t\t\t\t\t\t\t\t'resolve' => function( Term $term, $args, AppContext $context, ResolveInfo $info ) use ( $post_type_object ) {\n\t\t\t\t\t\t\t\t\t\t\t$resolver = new PostObjectConnectionResolver( $term, $args, $context, $info, $post_type_object->name );\n\t\t\t\t\t\t\t\t\t\t\t$resolver->set_query_arg( 'tax_query', [\n\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t'taxonomy' => $term->taxonomyName,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'terms' => [ $term->term_id ],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'field' => 'term_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'include_children' => false,\n\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t] );\n\n\t\t\t\t\t\t\t\t\t\t\treturn $resolver->get_connection();\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * If the post_type has revisions enabled, add a connection from the Post Object to revisions\n\t\t\t\t */\n\t\t\t\tif ( true === post_type_supports( $post_type_object->name, 'revisions' ) ) {\n\t\t\t\t\tregister_graphql_connection(\n\t\t\t\t\t\tself::get_connection_config(\n\t\t\t\t\t\t\t$post_type_object,\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'connectionTypeName' => $post_type_object->graphql_single_name . 'ToRevisionConnection',\n\t\t\t\t\t\t\t\t'fromType' => $post_type_object->graphql_single_name,\n\t\t\t\t\t\t\t\t'toType' => $post_type_object->graphql_single_name,\n\t\t\t\t\t\t\t\t'fromFieldName' => 'revisions',\n\t\t\t\t\t\t\t\t'resolve' => function( Post $post, $args, $context, $info ) {\n\t\t\t\t\t\t\t\t\t$resolver = new PostObjectConnectionResolver( $post, $args, $context, $info, 'revision' );\n\t\t\t\t\t\t\t\t\t$resolver->set_query_arg( 'post_parent', $post->ID );\n\n\t\t\t\t\t\t\t\t\treturn $resolver->get_connection();\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}\n\t\t\t}\n\t\t}\n\n\t\t// Register a connection from all taxonomies that are connected to\n\t\tif ( ! empty( $allowed_taxonomies ) && is_array( $allowed_taxonomies ) ) {\n\t\t\tforeach ( $allowed_taxonomies as $taxonomy ) {\n\n\t\t\t\t$tax_object = get_taxonomy( $taxonomy );\n\n\t\t\t\tif ( empty( $tax_object->object_type ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Connection from the Taxonomy to Content Nodes\n\t\t\t\tregister_graphql_connection( self::get_connection_config( $tax_object, [\n\t\t\t\t\t'fromType' => $tax_object->graphql_single_name,\n\t\t\t\t\t'fromFieldName' => 'contentNodes',\n\t\t\t\t\t'toType' => 'ContentNode',\n\t\t\t\t\t'resolve' => function( Term $term, $args, $context, $info ) {\n\n\t\t\t\t\t\t$resolver = new PostObjectConnectionResolver( $term, $args, $context, $info, 'any' );\n\t\t\t\t\t\t$resolver->set_query_arg( 'tax_query', [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'taxonomy' => $term->taxonomyName,\n\t\t\t\t\t\t\t\t'terms' => [ $term->term_id ],\n\t\t\t\t\t\t\t\t'field' => 'term_id',\n\t\t\t\t\t\t\t\t'include_children' => false,\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t] );\n\n\t\t\t\t\t\treturn $resolver->get_connection();\n\n\t\t\t\t\t},\n\t\t\t\t] ) );\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "01229f595684205c0ea99c6112093969", "score": "0.49813363", "text": "function __getConnection();", "title": "" }, { "docid": "e73c18bef5b654c4f0d00f26125a8801", "score": "0.49800143", "text": "public static function getConnectionPoolSize() {\n return count(self::$pool);\n }", "title": "" }, { "docid": "0f0ae42fcc9922e81a57c485cd83b760", "score": "0.49758965", "text": "public static function initialize()\n {\n date_default_timezone_set('Asia/Shanghai');\n PoolManager::getInstance()->register(MysqlPool::class, Config::getInstance()->getConf('MYSQL.POOL_MAX_NUM'));\n }", "title": "" }, { "docid": "6d84a2956e9a0c1e792205a886e35472", "score": "0.49743223", "text": "public function startDB(){\n $this->db = new Conexion();\n $this->conn = $this->db->getConnection(); \n }", "title": "" }, { "docid": "572acb679c6c44662f1c30f658052ddb", "score": "0.49693796", "text": "public static function getConnectionResolver();", "title": "" }, { "docid": "78f79bc1553ffb1c5165a23ddf52ed36", "score": "0.49649504", "text": "public static function initialize()\n {\n date_default_timezone_set('Asia/Shanghai');\n\n $mysql = Config::getInstance()->getConf('MYSQL');\n PoolManager::getInstance()->register(MysqlPool::class, $mysql['POOL_MAX_NUM']);\n }", "title": "" }, { "docid": "1e854737d44f30974327b5103bdc1791", "score": "0.49625412", "text": "public function getConnection(){\n $this->db->getConnection();\n }", "title": "" }, { "docid": "8c996db6b46ba29368b26d7a706da7e7", "score": "0.49522844", "text": "protected function connect()\n {\n if ($this->status === self::STATUS_NEW) {\n $this->status = self::STATUS_CONNECTING;\n\n // @todo do the connection\n }\n }", "title": "" }, { "docid": "1dda71472d7d59ad726298f54d514cfd", "score": "0.494887", "text": "public function handle()\n {\n $pools = Pool::all();\n\n foreach ($pools as $pool) {\n exec(\"ping -c 1 $pool->host\", $output, $retval);\n if ($retval != 0) {\n $pool->is_alive = false;\n } else {\n $pool->is_alive = true;\n }\n $pool->last_checked_at = now();\n $pool->save();\n }\n }", "title": "" }, { "docid": "a8015c327eb4498d0bfa14546a499039", "score": "0.49406174", "text": "protected function _connect() {\r\n if ($this->connection)\r\n return;\r\n\r\n\t\t$this->connection = new PDO(\r\n\t\t\t$this->_dsn(),\r\n\t\t\t$this->cfg->user,\r\n\t\t\t$this->cfg->pass,\r\n\t\t\t$this->cfg->driverOptions);\r\n\t\t\r\n\t\tforeach($this->cfg->conQuery as $q)\r\n\t\t\t$this->connection->query($q);\r\n\r\n\t\t$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t}", "title": "" }, { "docid": "701392cf763711caef52d1a68e97660b", "score": "0.49371865", "text": "public static function addConnection()\n {\n\n // $manager = Doctrine_Manager::getInstance();\n // $bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');\n // $options = $bootstrap->getOptions();\n // $conn2 = $manager->connection($options['doctrine']['imbull'],\n // \"connection1\");\n // $conn2->execute('SHOW TABLES');\n // if ($conn2 === $manager->getCurrentConnection()) {\n // //echo 'jee';\n // return $conn2;\n // }\n\n }", "title": "" }, { "docid": "65bbdb4bf60f03b960cdd987d32e8ab9", "score": "0.49341866", "text": "public abstract function connect();", "title": "" }, { "docid": "65bbdb4bf60f03b960cdd987d32e8ab9", "score": "0.49341866", "text": "public abstract function connect();", "title": "" }, { "docid": "e5b10d790d6a73c5236b6d78b33bbac0", "score": "0.49134383", "text": "public function open()\n {\n /*\n * $this->users=$this->db->query(\"select * from connections\");\n * foreach ($this->users as $row) {\n * $this->userID = $row['userID'];\n * $this->username = $row['username'];\n * $this->emailAddress = $row['emailAddress'];\n * }\n */\n }", "title": "" }, { "docid": "51dda6ea82e9d29da339f5867754ba05", "score": "0.4909291", "text": "function connect()\n {\n // Note: the only reason we keep this variable is for getLastId()\n if (empty($this->db)) {\n $this->db = xarDB::getConn();\n }\n }", "title": "" }, { "docid": "486acaa0ef9571847c0055886924787b", "score": "0.49075958", "text": "private function handleCreate()\n { \n $events = array(\n 'socket_create' => array($this->domain, $this->type, $this->protocol),\n 'socket_bind' => array(&$this->sock, &$this->ip, &$this->port),\n 'socket_getsockname' => array(&$this->sock, &$this->ip, &$this->port),\n 'socket_listen' =>array(&$this->sock),\n );\n\n foreach ($events as $e => $args) {\n $this->exec($e, $args, false);\n }\n\n $this->resetListeners();\n }", "title": "" }, { "docid": "aac12d8ece2f9b17f3e61e0cb0168e26", "score": "0.48951045", "text": "abstract public function connect();", "title": "" }, { "docid": "aac12d8ece2f9b17f3e61e0cb0168e26", "score": "0.48951045", "text": "abstract public function connect();", "title": "" }, { "docid": "aac12d8ece2f9b17f3e61e0cb0168e26", "score": "0.48951045", "text": "abstract public function connect();", "title": "" }, { "docid": "aac12d8ece2f9b17f3e61e0cb0168e26", "score": "0.48951045", "text": "abstract public function connect();", "title": "" }, { "docid": "aac12d8ece2f9b17f3e61e0cb0168e26", "score": "0.48951045", "text": "abstract public function connect();", "title": "" }, { "docid": "3fde0af11c3ec4cf7555384599f68a80", "score": "0.48945972", "text": "abstract protected function initConnection() : AbstractConnection;", "title": "" }, { "docid": "ef8bc9286e0b8d4199da812b788d0688", "score": "0.48909158", "text": "public function onOpen(ConnectionInterface $conn) {\r\n $this->clients->attach($conn);\r\n echo \"New connection! ({$conn->resourceId})\\n\";\r\n }", "title": "" }, { "docid": "3ac2b0ed43215bf280846d3c900f7e17", "score": "0.48891407", "text": "public static function on($connection = null);", "title": "" }, { "docid": "d07f9ce0eb3133583b957f8c191c38a2", "score": "0.48710284", "text": "public function handleRequest()\n {\n $this->router();\n $this->setReporting();\n\n // 设定错误和异常处理\n// register_shutdown_function('Think\\Think::fatalError');\n// set_error_handler('Think\\Think::appError');\n// set_exception_handler('Think\\Think::appException');\n\n }", "title": "" }, { "docid": "110ba2c38fe8687c6eac173c0f17821a", "score": "0.4861689", "text": "function __construct(){\n $this->open_connection();\n }", "title": "" }, { "docid": "4c86f97ffd4311650fa69593651e9bd7", "score": "0.48466828", "text": "public function getConnection()\n {\n return $this->connectionPool->nextConnection();\n }", "title": "" }, { "docid": "6014400e0c7fba48b0ed36e12c9bd34b", "score": "0.48457092", "text": "private static function _closeConnection() {\n foreach ( self::$_dbAdapters as &$dbAdapter ) {\n $dbAdapter->closeConnection ();\n }\n \n self::$_dbAdapters = array ();\n }", "title": "" }, { "docid": "d87f0f2592590c5742bece1ae22400b7", "score": "0.4842252", "text": "function postConnect() { }", "title": "" }, { "docid": "355870466ca050f1411ff2eeaf3283fb", "score": "0.48422396", "text": "private function setConnection()\n {\n $this->_connection = $this->getContainer()->get('doctrine.dbal.default_connection');\n }", "title": "" }, { "docid": "e18c73cb8d6b9ff9e5abdff9a403c160", "score": "0.48143667", "text": "public function handleConnection(ConnectionInterface $connection)\n {\n $this->logger->debug(sprintf('Worker [%s] [%s] Accept connection from %s', $this->worker->getId(),\n $this->worker->getPid(), $connection->getLocalAddress()));\n $this->emit('connection', [$connection]);\n }", "title": "" }, { "docid": "4073352871d7eeb593734b0c74496062", "score": "0.4813487", "text": "public function onOpen(ConnectionInterface $conn) {\r\n echo \"New connection! ({$conn->resourceId})\\n\";\r\n }", "title": "" }, { "docid": "fc903bb0e0621b44400f65c77999d183", "score": "0.48069164", "text": "public function run()\n {\n Scripts::initializeClassLoader($this);\n Scripts::initializeSignalSlot($this);\n Scripts::initializePackageManagement($this);\n\n $this->activeRequestHandler = $this->resolveRequestHandler();\n $this->activeRequestHandler->handleRequest();\n }", "title": "" }, { "docid": "0523fee792d085c531f70894b35257db", "score": "0.48053357", "text": "public function handle(): void\n {\n $this->porter->turnOnService('mysql');\n }", "title": "" }, { "docid": "791028bacbd10d3f050a825cccc0a619", "score": "0.47989368", "text": "public function onOpen(ConnectionInterface $conn) {\n $this->clients->attach($conn);\n echo \"New connection! ({$conn->resourceId})\\n\";\n }", "title": "" }, { "docid": "5be1adec7f19bd82527a50fccad5fdd3", "score": "0.47984204", "text": "public function handle()\n {\n Proxy::each(function ($proxy) {\n\n $this->info('Checking proxy: ' . $proxy->server);\n\n // Check for proxy validity\n try {\n\n $client = new GuzzleClient();\n\n $client->request('GET', 'https://www.instagram.com', [\n 'exceptions' => false,\n 'idn_conversion' => false,\n 'proxy' => $proxy->server,\n 'verify' => true,\n 'timeout' => 10,\n ]);\n\n $this->info('Proxy is valid');\n\n $proxy->is_active = true;\n\n } catch (\\Exception $e) {\n\n $this->error('Proxy is not valid');\n\n Account::where('proxy_id', $proxy->id)->withoutGlobalScopes()->update([\n 'proxy_id' => null,\n ]);\n\n $proxy->is_active = false;\n }\n\n $proxy->save();\n });\n\n }", "title": "" }, { "docid": "f0b328c379f8f5af2e3f897a327b389f", "score": "0.47973418", "text": "private function connect ()\n {\n $this->connectionId = 'DB_CONNECTION_' . md5(implode(',', $this->credentials));\n\n if (defined($this->connectionId) === FALSE) {\n $connection = dibi::connect($this->credentials, $this->connectionId);\n\n // Tracy panel\n if (TRACY === TRUE) {\n $panel = new Dibi\\Bridges\\Tracy\\Panel;\n $panel->register($connection);\n }\n\n define($this->connectionId, TRUE);\n }\n\n $this->connection = dibi::getConnection($this->connectionId);\n }", "title": "" }, { "docid": "a505891dce8e1336ecca4a7983c66571", "score": "0.4795536", "text": "public function close()\n {\n foreach ($this->m_assignedConnections as $connection)\n {\n $connection->close();\n }\n \n foreach ($this->m_availableConnections as $connection)\n {\n $connection->close();\n }\n }", "title": "" }, { "docid": "009e8e5a20217ab999e202e434110cb1", "score": "0.4791986", "text": "function run($databaseManager, $conn, $sessionManager){\n\t\t# Check if the session is already stored\n\t\tif($sessionManager->isCurrentSessionStored(\"attacker\")){\n\t\t\tif($_SERVER[\"REQUEST_METHOD\"] == \"GET\"){\n\n\t\t\t\t# Connection parameters\n $address = \"127.0.0.1\";\n $port = 10000;\n # Don't timeout\n #set_time_limit(30);\n\n /*\n Create socket with:\n AF_INET, meaning IPv4.\n SOCK_STREAM, meaning stream of bytes, not datagrams on\n transport layer.\n SOL_TCP, meaning to use tcp on transport layer.\n */\n $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n if($sock === false){\n echo \"socket_create() failed: reason: \" . socket_strerror(socket_last_error()) . \"\\n\";\n # 500 Internal Server Error\n http_response_code(500);\n\t\t\t\t\treturn false;\n }\n\n\t\t\t\t# Try to bind to port multiple times\n\t\t\t\t$result = socket_bind_loop($sock, $address, $port,\n\t\t\t\t\tSOCKET_BIND_INTERVAL,SOCKET_BIND_MAX_ATTEMPT_NUMBER, DEBUG);\n\n if ($result === false) {\n echo \"socket_bind() failed.\\nReason: ($result) \" . socket_strerror(socket_last_error($sock)) . \"\\n\";\n # 500 Internal Server Error\n http_response_code(500);\n\t\t\t\t\treturn false;\n }\n\n\t\t\t\t/*\n\t\t\t\t$result = false;\n\t\t\t\twhile(!$result){\n\t\t\t\t\tusleep(SOCKET_BIND_INTERVAL);\n\t\t\t\t\t# Disable warnings\n\t\t\t\t\t#error_reporting(E_ALL ^ E_WARNING);\n\t\t\t\t\t# Try to connect to victim\n \t$result = socket_bind($sock, $address, $port);\n\t\t\t\t\t# Enable warnings\n\t\t\t\t\t#error_reporting(E_ALL);\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t/*\n # Assign address and port to socket\n if(socket_bind($sock, $address, $port) === false){\n echo \"socket_bind() failed: reason: \" . socket_strerror(socket_last_error($sock)) . \"\\n\";\n # 500 Internal Server Error\n http_response_code(500);\n\t\t\t\t\treturn 1;\n }\n\t\t\t\t*/\n\n /*\n Start listening on port with backlog of 50. It means that it\n will accept up to 50 connections in the queue and then refuse\n the rest of the connections.\n */\n if (socket_listen($sock, 50) === false) {\n echo \"socket_listen() failed: reason: \" . socket_strerror(socket_last_error($sock)) . \"\\n\";\n # 500 Internal Server Error\n http_response_code(500);\n\t\t\t\t\tsocket_close($sock);\n\t\t\t\t\treturn false;\n }\n\n # Accept socket connection\n if (($msgsock = socket_accept($sock)) === false) {\n echo \"socket_accept() failed: reason: \" . socket_strerror(socket_last_error($sock)) . \"\\n\";\n # 500 Internal Server Error\n http_response_code(500);\n\t\t\t\t\tsocket_close($sock);\n\t\t\t\t\treturn false;\n }\n\n\n # Read command\n $commandOutput = \"\";\n while($out = socket_read($msgsock, 2048)) {\n $commandOutput .= $out;\n }\n\n\t\t\t\techo $commandOutput;\n\n # Close connections\n socket_close($msgsock);\n socket_close($sock);\n\t\t\t}\n }else{\n echo \"Your user is not logged. First login, then enter this page.\";\n // 401 Unauthorized\n http_response_code(401);\n\t\t\treturn false;\n }\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "9860fc446ae9a22abd764e4d3e4caeee", "score": "0.47907224", "text": "private function dbConnectScheduling(){ //database object\n\n $this->mysqliScheduling = getConnScheduling();\n }", "title": "" }, { "docid": "67f1b3beaa69f4f8d32a7ec2451b1098", "score": "0.47756612", "text": "abstract function connect();", "title": "" }, { "docid": "fb1c44bda7b467716f2b95c33dd63a07", "score": "0.47747484", "text": "public function onOpen(ConnectionInterface $conn) {\n $this->clients->attach($conn);\n\n $this->users[$conn->resourceId] = $conn;\n }", "title": "" }, { "docid": "f77bdf643da90d9719e85aa2f12686dd", "score": "0.47721207", "text": "public function connection();", "title": "" }, { "docid": "0019bfd635fcb29cfe906b052fcd03ca", "score": "0.47656322", "text": "private function open_connection() {\r\n $this->conn = new mysqli(self::$db_host, self::$db_user, self::$db_pass, $this->db_name);\r\n }", "title": "" } ]
d03b388b5c2bcd743860d5a3096e1c5d
Execute the console command.
[ { "docid": "1c92ebf774cfd72a6195740111316a30", "score": "0.0", "text": "public function handle()\n {\n $date = $this->option('date');\n list($start, $end) = $this->parseDate($date);\n $dates = $this->getDatesFromRange($start, $end);\n $robots = [];\n foreach ($dates as $date) {\n $file = storage_path('request_logs/robots-' . $date . '.log');\n\n if (!file_exists($file)) {\n $this->warn($file . ' no data ');\n continue;\n }\n $this->info($file . ' importing ');\n\n $this->processFile($file, $robots);\n }\n\n if (empty($robots))\n return;\n\n\n foreach ($robots as $log) {\n RobotsCounterReport::insert($log);\n }\n }", "title": "" } ]
[ { "docid": "737a2b58f497265fe8c017ac97b2ea60", "score": "0.6576041", "text": "public function handle()\n {\n $criteria = $this->argument('criteria');\n $implementation = strtolower( $this->option('implementation') );\n\n $this->populateValuesForProperties( $criteria, $implementation );\n $this->createCriteria();\n\n $this->info('Generating autoload...');\n $this->composer->dumpAutoloads();\n $this->info('Done!');\n }", "title": "" }, { "docid": "4b2711534cf00bca03dcecde7f950705", "score": "0.65680295", "text": "public function handle()\n {\n $xuid = $this->argument('xuid');\n $this->gamer = Gamer::whereXuid($xuid)->first();\n\n $this->getClips($xuid);\n }", "title": "" }, { "docid": "7434adb5193dec2a0ced97ffa7e4390d", "score": "0.63660395", "text": "public function handle()\n {\n $instruction = $this->argument('instruction');\n\n switch ($instruction) {\n case 'add-relations':\n $this->addRelations();\n break;\n case 'drop-relations':\n $this->dropRelations();\n break;\n default:\n break;\n }\n }", "title": "" }, { "docid": "950918930433b25a6b9c0a95c77b7975", "score": "0.62974924", "text": "public function handle()\n {\n $this->generator->generate($this->argument('controller'), $this->option('resource'));\n $this->info(\"{$this->argument('controller')}Rules.php written.\");\n }", "title": "" }, { "docid": "dc4087256cccd51749e87904b69bb1ed", "score": "0.62856096", "text": "public function handle()\n {\n $domain = $this->argument('domain');\n $crawler = new Crawler($domain);\n // dd();\n $crawler->traverse();\n }", "title": "" }, { "docid": "84b99fd89cfeb5d2c60d7938b4be5d3f", "score": "0.62666184", "text": "public function handle()\n {\n $id = $this->argument('id');\n\n $campaign = Campaign::runCampaign($id);\n }", "title": "" }, { "docid": "6e95145d9d73c97c26483460d9e1769c", "score": "0.6242807", "text": "public function handle()\n {\n $name = $this->argument('name');\n\n RepositoryService::ImplementNow($name);\n\n $this->info(\"Repository implemented for model \". $name);\n }", "title": "" }, { "docid": "9b53ad6f620fed41c852e2b263f60ec1", "score": "0.6227593", "text": "public function handle()\n {\n if ($id = $this->argument('id')) {\n $tenant = Tenant::find($id);\n\n if ($tenant) {\n $this->execCommand($tenant);\n }\n\n return;\n }\n\n $companies = Tenant::all();\n\n foreach ($companies as $tenant) {\n $this->execCommand($tenant);\n }\n }", "title": "" }, { "docid": "76ef364f544e9cc7fa04ab232fac7176", "score": "0.6223632", "text": "public function handle()\n {\n $expansionId = $this->argument('expansion');\n $this->import($expansionId);\n }", "title": "" }, { "docid": "fa235affd2c386f301f456c645d6d5c2", "score": "0.62004924", "text": "public function handle() {\n try {\n $this->substitutionService->loadSubstitutions();\n Log::notice('untis:substitutions executed successfully.');\n $this->line('Loaded substitutions from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading substitutions.', ['exception' => $e]);\n $this->error('Error loading substitutions: ' . $e->getMessage());\n }\n }", "title": "" }, { "docid": "33305be874c233ad0527919e43cef9e6", "score": "0.61932784", "text": "public function handle()\n {\n $name = Str::snake(trim($this->input->getArgument('name')));\n\n $this->writeMigration($name);\n }", "title": "" }, { "docid": "6c263bcfc49f84ca2fa037661c01c37f", "score": "0.6190422", "text": "public function handle()\n {\n $this->fetchMaps();\n $this->fetchHeroes();\n $this->info('FetchTranslations: Finished');\n }", "title": "" }, { "docid": "c6abbf82f0f20a54ecc6c7e782bdc05e", "score": "0.61725277", "text": "public function handle()\n {\n $type = $this->argument('arguments');\n switch ($type) {\n case 'start':\n $this->doTask();\n break;\n case 'drop':\n $this->drop();//清空内存表\n break;\n }\n }", "title": "" }, { "docid": "f372b87bb90de6de25a8521aef993b9f", "score": "0.61697465", "text": "public function handle()\n {\n $this->composerUpdate();\n\n if ($this->option('publish') !== 'none') {\n $this->publish();\n }\n }", "title": "" }, { "docid": "1cc3ef955ea6555bd704c31d5b4d2198", "score": "0.61690074", "text": "public function handle()\n {\n $users = $this->getUsers();\n\n if (empty($users)) {\n return $this->error(\"Your application doesn't have any matching users.\");\n }\n\n $this->displayUsers($users);\n }", "title": "" }, { "docid": "ed132344627d5672521cc9b31de2f1b1", "score": "0.6161306", "text": "public function handle()\n {\n $this->mailerCommandStrategy->setInstance($this);\n $this->mailerCommandStrategy->start($this->argument('id'));\n\n // $this->info('The command was successful!');\n // $this->line('Display this on the screen');\n // $this->table(\n // ['Name', 'Email'],\n // Email::all(['name', 'email'])->toArray()\n // );\n }", "title": "" }, { "docid": "aeb80ebb2663e05060238407128343bb", "score": "0.61476076", "text": "public function handle()\n {\n $this->getArguments();\n $this->copyViews();\n }", "title": "" }, { "docid": "acf3139857d0067ce45e4e49ff5691d0", "score": "0.6138296", "text": "public function handle()\r\n {\r\n try {\r\n $output_path = $this->option('output-path');\r\n \r\n\r\n $crud = $this->models->generate([\r\n 'output_path' => $output_path,\r\n ], $this);\r\n\r\n \r\n } catch (\\Exception $ex) {\r\n $this->error($ex->getMessage() . ' on line ' . $ex->getLine() . ' in ' . $ex->getFile());\r\n }\r\n }", "title": "" }, { "docid": "e2515719574fc30d26321a40661424b1", "score": "0.6136875", "text": "public function handle()\n {\n $source_file = $this->argument('source');\n if(!file_exists($source_file)){\n $this->error(\"File '$source_file' doesn\\'t exists!\");\n return;\n }\n\n $this->generateSingleLabels($source_file);\n\n if(!$this->option('no-imposition'))\n $this->imposeForPrinting();\n }", "title": "" }, { "docid": "14b42bc675f1604522c3f2638d1abf32", "score": "0.61302584", "text": "public function handle()\n {\n $uniacid = $this->argument('uniacid');\n\n return $this->synRun($uniacid);\n }", "title": "" }, { "docid": "b709ef0e2ffa14f9f22e56e38721a6c2", "score": "0.6121149", "text": "public function handle()\n {\n try {\n if (!$this->argument('mid')) {\n $this->info(json_encode(UserMail::deleteUserMail($this->argument('uid'))));\n }\n else {\n $this->info(json_encode(UserMail::deleteUserMail($this->argument('uid'), $this->argument('mid'))));\n } \n } catch (Exception $e) {\n $this->error(\"An error occurred\");\n }\n }", "title": "" }, { "docid": "516c9f984dded90027423162f99a13ed", "score": "0.6111937", "text": "public function handle() {\n $this->info(sprintf(\n $this->message,\n $this->cleanFiles('app'),\n 'php'\n ));\n\n if ($this->option('stubs')) {\n $this->callSilent('stub:publish');\n\n $this->info(sprintf(\n $this->message,\n $this->cleanFiles('stubs', 'stub'),\n 'stub'\n ));\n }\n }", "title": "" }, { "docid": "e3ea2341d882744f5fafd38547ba6f79", "score": "0.61040777", "text": "public function handle()\n {\n $fillableArguments = $this->arguments();\n unset($fillableArguments['command']);\n League::create(\n $fillableArguments\n );\n $this->info(\"Created the {$this->argument('name')} league!\");\n }", "title": "" }, { "docid": "73471c5601c7223420484e18c63a429c", "score": "0.6084714", "text": "public function handle()\n {\n $feature = $this->argument('feature');\n $scope = $this->option('scope');\n $this->line('auto generate env: '. $this->builder->build($feature, $scope));\n }", "title": "" }, { "docid": "2335d2877fcc322a31993f3a65caf3c9", "score": "0.6082911", "text": "public function handle() {\n $format = $this->option('format');\n\n $attributes = User::getDefaultAttributes();\n $users = User::all($attributes)->toArray();\n\n switch ($format) {\n case \"human\":\n $headers = array_map('\\AuthGrove\\Models\\User::localizeAttribute', $attributes);\n $this->table($headers, $users);\n break;\n\n case \"json\":\n echo json_encode($users);\n break;\n\n default:\n $this->error(\"Unknown format: $format\");\n }\n }", "title": "" }, { "docid": "17b7f0fb37ac6552b7105415405f7798", "score": "0.6080466", "text": "public function handle()\r\n {\r\n $this->createDirectories();\r\n file_put_contents(\r\n path('app/ViewModels/'.trim($this->argument('name')).'.php'),\r\n $this->compileViewModelTemp(trim($this->argument('name')))\r\n );\r\n $this->makeView();\r\n $this->info('ViewModel created successfully.');\r\n }", "title": "" }, { "docid": "2541144577ad3ade43703ebe4085a49f", "score": "0.6070394", "text": "public function handle()\n {\n $fetcher = new KeywordRankFetcher(Config::get('keywordrank'));\n $position = $fetcher->getPosition($this->argument('url'), $this->argument('keyword'), $this->option('nocache')); //$fetcher->fetchAll();\n\n $this->info(\"Position: \".$position);\n }", "title": "" }, { "docid": "fb2625ba375033476a777df33a953692", "score": "0.606322", "text": "public function handle()\n {\n $name = $this->argument('name');\n $fileName = $name ?? '*';\n try {\n app()->make(CmsService::class)->generate($name);\n $this->info('Successful added data-cms into ' . $fileName . '.blade.php');\n } catch (Exception $e) {\n $this->warn('Failed added data-cms into ' . $fileName . '.blade.php' . PHP_EOL . 'Exception: ' . $e->getMessage());\n }\n }", "title": "" }, { "docid": "a31978af376e3870f5702806359cd7de", "score": "0.6058019", "text": "public function handle()\n {\n $name = trim($this->argument('name'));\n\n $this->call('hms:make:entity', [\n 'name' => $name,\n ]);\n\n $this->call('hms:make:mapping', [\n 'name' => $name,\n ]);\n\n $this->call('hms:make:repository:interface', [\n 'name' => $name,\n ]);\n\n $this->call('hms:make:repository:implementation', [\n 'name' => $name,\n ]);\n\n $this->call('hms:make:factory', [\n 'name' => $name,\n ]);\n }", "title": "" }, { "docid": "bdb64d77c59083c7447c3501a4c0f61d", "score": "0.6054121", "text": "public function handle()\n\t{\n\t\t$name = $this->getInputArgument('name') ?? \"World\";\n\t\t$this->info(\"Hello, {$name}!\");\n\t}", "title": "" }, { "docid": "75c7eca66f69010725c76c7b05680c55", "score": "0.605174", "text": "public function handle()\n {\n $this->info(\"\\nFetching exchange rates...\\n\");\n\n $this->table(['from', 'to', 'rate'], $this->exchangeService->getExchangeRates());\n\n $this->info(\"\\nSuccess. Exchange rates saved into database.\\n\");\n }", "title": "" }, { "docid": "c316e19a3e64c0754ed335d4084f6615", "score": "0.60505044", "text": "public function handle()\n {\n $this->prepareDatabase();\n\n $this->commandRunner->setOutput($this->output);\n\n // Next, we will check to see if a path option has been defined. If it has\n // we will use the path relative to the root of this installation folder\n // so that migrations may be run for any path within the applications.\n $this->commandRunner->markAllCompleted($this->getCommandPaths());\n }", "title": "" }, { "docid": "b79ad5c9c90467b7cacc323897a79f0d", "score": "0.6049823", "text": "public function handle() {\n if(!$this->isInstalled()) {\n $this->warn(\"Laradock is not installed yet. Please execute laradock:install\");\n exit;\n }\n\n $key = $this->argument('key');\n $value = $this->argument('value');\n\n $this->replaceOrAdd(base_path(\"laradock/.env\"), $key, $value);\n }", "title": "" }, { "docid": "ce1dd73cec5a10ad615aa2a2c805f9a9", "score": "0.6045525", "text": "public function handle()\n {\n echo \"Testing RPi using piphp/gpio\";\n $x = $this->argument('x');\n $y = $this->argument('y');\n $product = $x * $y;\n echo \"product is {$product}\";\n }", "title": "" }, { "docid": "fbf829b320d1123de0f52ea14b00ec65", "score": "0.6041056", "text": "public function handle()\n {\n $tag = $this->argument('tag');\n $ttl = $this->option('ttl');\n\n $this->cacheManager->setByTag($tag, $ttl)\n ? $this->info(\"Cache warm-up by tag '$tag' successfully completed!\")\n : $this->error(\"Cache warming up failed for '$tag' tag\");\n }", "title": "" }, { "docid": "b7aad60363f029256cfc29faa2148356", "score": "0.60394603", "text": "public function handle()\n {\n $filename = $this->argument('script');\n\n $arguments = $this->argument('arguments');\n\n $result = \\Python::run($filename, $arguments);\n\n $this->info($result);\n }", "title": "" }, { "docid": "35855168190d98ac08e33da2ca8455a2", "score": "0.6037962", "text": "public function handle()\n {\n $this->parseFile($this->argument('file'));\n $this->checkLists();\n $this->createOrganizations();\n }", "title": "" }, { "docid": "9467ae7e2c78af1e2dee7006cf0c1eee", "score": "0.60361016", "text": "public function handle()\n {\n $user = config('helpers.user_model')::firstWhere('email', $this->argument('userEmail'));\n\n if ($user) {\n $token = $user->createToken('token-name');\n $this->info('Token: ' . $token->plainTextToken);\n } else {\n $this->error(\"Can't find user!\");\n }\n }", "title": "" }, { "docid": "e002c1100091c8941cb53f6dd303cf80", "score": "0.603391", "text": "public function handle()\n {\n $this->runChecks();\n\n $this->path = $this->setting('fivem-path');\n $this->version = $this->setting('fivem-version');\n\n $this->downloadFiles();\n\n $this->setPermissions();\n\n $this->setting('fivem-version', $this->fxVersionNumber);\n $this->info('FiveM has been updated!');\n }", "title": "" }, { "docid": "0048966b5d3a6540bd05bf051ed0f046", "score": "0.6030243", "text": "public function handle()\n {\n $command = $this->option('command');\n $class = $this->option('model');\n if ($class) {\n $model = new $class;\n dump($model->getConnection());\n }\n\n\n if ($command) {\n $this->call($command);\n }\n }", "title": "" }, { "docid": "d41458e8388efe074f56fb2a38aceff7", "score": "0.6029138", "text": "public function handle()\n {\n $this->copyResources($this->option('force'));\n\n $this->copyAndIgnoreConfigFile();\n\n $this->info('Publishing complete.');\n }", "title": "" }, { "docid": "b147aaabaa6081c265629889f13a8e41", "score": "0.601979", "text": "public function handle()\n {\n $this->user = User::find($this->argument('user'));\n\n $orders = $this->user->orders()->whereDoesntHave('articles')->get();\n $this->line($orders->count() . ' orders without articles');\n try {\n $this->processing();\n\n foreach ($orders as $key => $order) {\n $this->line('Order ID: ' . $order->cardmarket_order_id);\n $cardmarketOrder = $this->user->cardmarketApi->order->get($order->cardmarket_order_id);\n Order::updateOrCreateFromCardmarket($this->user->id, $cardmarketOrder['order'], Order::FORCE_UPDATE_OR_CREATE);\n }\n }\n finally {\n $this->processed();\n }\n }", "title": "" }, { "docid": "1473f76365463234a48778542fd0472f", "score": "0.60143125", "text": "public function handle()\n {\n\n $notification = new NotificationService(new SesProvider());\n $user = new User($this->argument('id'));\n\n $message = \"Notificación a \" . $user->getName();\n $resNotify = $notification->notify($user,$message) ? 'true' : 'false'; \n \n $this->info(\n \"\n id: \" . $user->getId() . \"\n email: \" . $user->getEmail() . \"\n message: $message\n result: $resNotify\n \"\n );\n }", "title": "" }, { "docid": "03cb68cd6806c6ef0a1db528126a5cf8", "score": "0.6012107", "text": "public function handle()\n {\n try {\n $match = $this->matchService->getNextUpcompingMatch();\n $this->matchService->simulateMatch($match->id);\n $this->matchService->generateMatch();\n\n $this->info('Match between ' . $match->team_1 . ' and ' . $match->team_2 .' simulated');\n $this->info('A new match has been generated');\n } catch (Exception $e) {\n $this->error($e->getMessage());\n\n }\n \n }", "title": "" }, { "docid": "5af2a5a702f33db03b0698e4440bf206", "score": "0.6007976", "text": "public function handle()\n {\n if (!$leagueId = $this->option('league')){\n foreach ($this->hrefs as $key => $value)\n {\n $this->updateTeams($key);\n }\n }\n else{\n if ($this->updateTeams($leagueId)){\n $this->info('logos were updated');\n }\n else{\n $this->info('there is no league with such id');\n }\n }\n }", "title": "" }, { "docid": "696d65a6fa0e5a70324ff4cdfc52619a", "score": "0.6004888", "text": "public function handle()\n {\n $name = $this->argument('name');\n\n if ( $this->subscriberExists($name) ) {\n return $this->error($this->path($name) . ' already exists!');\n }\n\n $this->createSubscriber($name);\n\n $this->info(\"New event subscriber created in \" . $this->path($name));\n $this->info(\"Don't forget to register the subscriber in app/Providers/EventServiceProvider.php\");\n }", "title": "" }, { "docid": "7ef2bd7f3897856dd6fc3244d369098b", "score": "0.60005534", "text": "public function handle()\n {\n $qrtId = $this->argument('qrt');\n\n if (!$qrtId) {\n $qrt = DB::table('quarters')->orderBy('year', 'desc')->orderBy('quarter_number', 'desc')->first();\n $qrtId = $qrt->id;\n }\n\n $this->send_set_quarter_dates_email($qrtId);\n\n }", "title": "" }, { "docid": "31d376f95374435ccf6e87ba4624b82b", "score": "0.59993094", "text": "public function handle()\n {\n \n $boolean = $this->argument('flag');\n //$this->info(\"Second parameter $boolean.\" );\n // if (is_bool($boolean)) {\n \n $team = Team::find($this->argument('team'));\n\n if ($team) {\n $this->info(\"The boolean for team '$team->name' has been set to $boolean.\" );\n } else {\n $this->error(\"The team you are looking for does not exist.\" );\n }\n\n // } else {\n // $this->error(\"Please provide a boolean in second parameter.\" );\n // }\n\n }", "title": "" }, { "docid": "c7eea1bab992abbaf5fbbcb1f0ecfbb7", "score": "0.5998477", "text": "public function handle()\n {\n $this->installExtensions();\n $this->createMenus();\n $this->info('success!');\n }", "title": "" }, { "docid": "ac18d2be0ec9c1203b2abd22029eb9df", "score": "0.5998195", "text": "public function handle()\n {\n $this->migratePermissions();\n\n $this->updateSuperUserPermissions();\n }", "title": "" }, { "docid": "f9f6e2601311554f784297a6c8ffcec5", "score": "0.5995137", "text": "public function handle()\n {\n $driver = $this->driverRepository->checkout();\n\n $this->info(sprintf('Total records updated %s', $driver));\n }", "title": "" }, { "docid": "1bf717dfc480d15b1fddaaa6052f6147", "score": "0.5994279", "text": "public function handle()\n {\n $userID = $this->argument('user');\n $message = $this->argument('message');\n\n $user = User::where('id', is_int($userID) ? $userID : null)\n ->orWhere('discord_id', $userID)\n ->orWhere('discord', 'ilike', $userID)\n ->orWhere('email', 'ilike', $userID)\n ->firstOrFail();\n\n $this->info(\"Sending discord DM to user $user->name\");\n $this->info(\" ↦ $message\");\n\n $user->notify(new DiscordMessage($message));\n\n }", "title": "" }, { "docid": "900f0097b480497a7176b92b79fa96e6", "score": "0.5993921", "text": "public function fire()\n {\n $users = $this->getUsers($this->argument('limit'), $this->argument('offset'));\n\n echo serialize($users);\n }", "title": "" }, { "docid": "18ac6d0f28700a09fa08e7b66f3ada94", "score": "0.5993752", "text": "public function handle()\n {\n $this->modules->generate($this->argument('name'));\n\n $this->info('Module created successfully');\n }", "title": "" }, { "docid": "a233d48fba7095522b240b173b7e55ba", "score": "0.5992581", "text": "public function handle()\n {\n if( $port = $this->argument('port') ){\n $this->info(\"Lumen development server started on your specified port http://localhost:{$port}/\");\n passthru('\"'.PHP_BINARY.'\"'.\" -S localhost:{$port} -t public\");\n }\n $this->info(\"Lumen development server started on http://localhost:8800/\");\n passthru('\"'.PHP_BINARY.'\"'.\" -S localhost:8800 -t public\");\n }", "title": "" }, { "docid": "fdf7173018ebf081755dc0d7fc436542", "score": "0.5989084", "text": "public function handle(): void\n {\n $this->alert($this->description);\n\n switch ($this->option('resource')) {\n case 'config':\n $this->call('vendor:publish', ['--tag' => 'facilitador-attributes-config', '--force' => $this->option('force')]);\n break;\n case 'migrations':\n $this->call('vendor:publish', ['--tag' => 'facilitador-attributes-migrations', '--force' => $this->option('force')]);\n break;\n default:\n $this->call('vendor:publish', ['--tag' => 'facilitador-attributes-config', '--force' => $this->option('force')]);\n $this->call('vendor:publish', ['--tag' => 'facilitador-attributes-migrations', '--force' => $this->option('force')]);\n break;\n }\n\n $this->line('');\n }", "title": "" }, { "docid": "52cd8623c213399d7d7b699ea6d3286c", "score": "0.59881234", "text": "public function handle()\n {\n if ($this->option('cached')) {\n if (! file_exists($this->cachedFile)) {\n $this->error(\"--cached was specified but the file $this->cachedFile does not exist\");\n\n return;\n }\n\n return file_get_contents($this->cachedFile);\n }\n\n $result = file_put_contents($this->cachedFile, YodleeApi::getProviderAccounts(\n $this->argument('username')\n ));\n $this->info('The command was successful!');\n\n return $result;\n }", "title": "" }, { "docid": "39efac0ae4e2324f8c7a292e2ff2da2b", "score": "0.5988123", "text": "public function handle()\n {\n $user = User::where([ 'email' => $this->argument('email')])->first();\n if($user) {\n\t $this->info(\"Original User Roles: \" . join(\", \", UserTypes::getAllDescriptions($user->roles)));\n\n\t // Grant Admin Role and save\n\t $user->roles |= UserTypes::Admin;\n\t $user->save();\n\n\t $this->info(\"New User Roles: \" . join(\", \", UserTypes::getAllDescriptions($user->roles)));\n } else {\n \t$this->warn(\"No user found for email '\" . $this->argument('email') . \"'\");\n }\n }", "title": "" }, { "docid": "2e3b14bc7b4e6fe61e2de23177180b15", "score": "0.5987391", "text": "public function handle()\n {\n $this->locale = $this->argument('locale');\n $this->path = resource_path(\"lang/{$this->locale}\");\n $this->configPath = config_path('translatable.php');\n $this->langFilesPath = $this->getLanguageFilesPath();\n\n if (! realpath($this->langFilesPath)) {\n return $this->error(\"Could'nt find locale [{$this->locale}]\");\n }\n\n $this->publishLanguageFiles();\n $this->addLocaleToConfig();\n\n $this->line(\"Added locale [<info>{$this->locale}</info>].\");\n }", "title": "" }, { "docid": "618fa76de67207a21fd56661188c13cf", "score": "0.5986865", "text": "public function handle()\n {\n if(!config('app.key'))\n $this->call('key:generate');\n\n if (!file_exists(public_path('storage'))) {\n $this->call('storage:link');\n }\n\n $this->call('vendor:publish', [\n '--provider' => AdminServiceProvider::class\n ]);\n $this->call('vendor:publish', [\n '--provider' => ElfinderServiceProvider::class\n ]);\n\n $this->call('migrate');\n\n $this->call('admin:registerPermissions');\n\n $this->call('admin:build');\n }", "title": "" }, { "docid": "28bdf018e4c316e9d6749364bdbb2577", "score": "0.5985573", "text": "public function handle()\n {\n $relay = Relay::find($this->argument('relay'));\n if (!$relay) {\n $this->error('Unable to find relay');\n return;\n }\n \n $this->info('Enabling relay');\n $relay->enable($this->option('async'));\n }", "title": "" }, { "docid": "e03c3d89ea8957d6c8e7745c25252bc8", "score": "0.59852767", "text": "public function handle()\n {\n $this->processArguments();\n\n $hasDoctrine = interface_exists('Doctrine\\DBAL\\Driver');\n if (!$hasDoctrine) {\n $this->error('Doctrine not installed!');\n $this->info(\"Install it with : \\n composer require doctrine/dbal\");\n return;\n }\n // Get Schema\n $schema = iterator_to_array(GraphQLGenerator::parseModels());\n\n // Generate Model Files\n if ($this->queryOptions['models']) {\n $this->warn('Generating Models');\n\n $this->printOutput(\n GraphQLSchemaGenerator::createModelFiles($schema, $this->queryOptions)\n );\n\n }\n\n if ($this->queryOptions['queries']) {\n $this->warn('Generating Queries');\n\n $this->printOutput(\n GraphQLSchemaGenerator::createQueryFiles($schema, $this->queryOptions)\n );\n }\n\n if ($this->queryOptions['mutations']) {\n $this->warn('Generating Mutations');\n\n $this->printOutput(\n GraphQLSchemaGenerator::createMutationFiles($schema, $this->queryOptions)\n );\n }\n\n\n if ($this->queryOptions['pretty']) {\n\n $this->warn('Running Prettier');\n system('prettier --write graphql/generated/**/*.graphql');\n system('prettier --write graphql/generated/**/**/*.graphql');\n }\n\n }", "title": "" }, { "docid": "ce051af9def6bda5a76d5e72db2f3b07", "score": "0.59843826", "text": "public function handle()\n {\n if ($this->option('silent')) {\n if ($this->option('refresh')) {\n $this->info('Migrating and seeding database...');\n $this->callSilent('migrate:refresh');\n $this->call('db:seed');\n }\n $this->info('Deploying factions silently...');\n $this->callSilent('factions:validate');\n $this->callSilent('factions:fulldeployment');\n } else {\n if ($this->option('refresh')) {\n $this->call('migrate:refresh');\n $this->call('db:seed');\n }\n $this->call('factions:validate');\n $this->call('factions:fulldeployment');\n }\n $this->info('Deployment complete.');\n }", "title": "" }, { "docid": "4432544f68a77aa5aab25e8f0dcaa70a", "score": "0.59835565", "text": "public function handle()\n\t{\n\t\t$this->updateDatabase()\n\t\t\t ->updateGuards()\n\t\t\t ->configCache()\n ->initMigrations()\n\t\t\t ->publishAssets();\n\t}", "title": "" }, { "docid": "c81225bd2988b4e109df8edbb874a1fb", "score": "0.59810543", "text": "public function handle()\n {\n $password = ($this->option('password')) ?:\n $this->secret('Enter a password');\n\n $email = $this->option('email', 'root@localhost');\n\n if (User::where('email', $email)->count() > 0) {\n $this->comment('Account already exists:'.PHP_EOL.' '.$email);\n } else {\n $user = User::create([\n 'name' => $this->option('name'),\n 'email' => $email,\n 'password' => bcrypt($password)\n ]);\n\n if (Permission::all()->isEmpty()) {\n $this->comment('No permissions to give. Run db:seed to seed permissions table.');\n }\n\n $user->permissions()->saveMany(Permission::all());\n\n $this->info('Superuser account created:'.PHP_EOL.' '.$user->email);\n }\n }", "title": "" }, { "docid": "1cd54dde9497b4494f83f110bc1d96ee", "score": "0.5977186", "text": "public function handle()\n {\n $this->info('Publishing all files');\n $this->call('vendor:publish', [\n '--provider' => 'Graphiql\\GraphiqlServiceProvider',\n ]);\n }", "title": "" }, { "docid": "10f0c42d294fec704bc21e2a4fd507d6", "score": "0.59762627", "text": "public function handle()\n {\n $path = $this->argument('path');\n\n if (! file_exists($path)) {\n $this->error('File at given path doen\\'t exist.');\n\n exit(1);\n }\n\n $this->fetchRelated();\n\n DB::transaction(function () use ($path) {\n $this->readFile($path, function ($rows) {\n $this->createSpecies($rows);\n });\n });\n\n $this->info('Done!');\n }", "title": "" }, { "docid": "f0677e9aed789d4253d7a3276de88e73", "score": "0.5973491", "text": "public function handle()\n {\n $basePathKey = $this->argument( 'basePathKey' );\n\n if( $basePathKey )\n return $this->fetchElement( $basePathKey );\n else\n return $this->fetchAll();\n }", "title": "" }, { "docid": "4b4c2efb007511bb6cb3da3963d50fab", "score": "0.5965248", "text": "public function handle()\n {\n $this->comment('Publishing the assets...');\n $this->callSilent('vendor:publish', ['--tag' => 'canvas-assets']);\n\n $this->comment('Publishing the configuration file...');\n $this->callSilent('vendor:publish', ['--tag' => 'canvas-config']);\n\n $this->comment('Running the database migrations...');\n $this->callSilent('migrate');\n\n $this->line('');\n $this->line('<info>[✔]</info> Canvas is installed and ready to use. Enjoy!');\n }", "title": "" }, { "docid": "11c802eb237b508ebeaf452e2fc8a137", "score": "0.5965037", "text": "public function handle()\n {\n try{\n $this->wipe_store_first();\n $countries = $this->get_them();\n $this->seed($countries);\n $this->info(\"Countries Have been seeded successfully.\");\n }catch (\\Exception $e){\n $this->error(\"Error Occurred : \" .+ $e->getMessage());\n }\n }", "title": "" }, { "docid": "d252f0fb93d7b3248edf443a08a0b753", "score": "0.59630203", "text": "public function handle()\n {\n $this->hardWork($this->argument(), $this->option());\n }", "title": "" }, { "docid": "c6b1e0b59e71d5ca4bf4655d497037dd", "score": "0.5960586", "text": "public function handle()\n {\n $this->url = $this->option('url') ?? config('services.lostfilm.episodes.url');\n $this->parser = $this->option('parser');\n\n $last = Episode::latest()->first();\n $this->parse($last);\n\n $this->info('LostFilm Parser Done!');\n }", "title": "" }, { "docid": "cf5abc9c4243450f53251b7a4c761bcd", "score": "0.59552276", "text": "public function handle()\n {\n $email = $this->argument('email');\n $user = User::where('email', $email)->first();\n if(empty($user)){\n $this->error('Could not find the specfied user.');\n }\n else{\n User::where('email', $email)->update(['role' => 'admin']);\n $this->info($email.' is now an Admin.');\n }\n }", "title": "" }, { "docid": "b1850479a5e6fe720dc167d548b868f4", "score": "0.5954389", "text": "public function handle()\n {\n $products = Product::all();\n\n if (/*$this->argument('just_tags')*/ false)\n $this->setTags($products);\n else\n $this->setVariant($products);\n }", "title": "" }, { "docid": "e5225771c7754d976c6b17805f498fff", "score": "0.5952971", "text": "public function handle()\n {\n try {\n Log::debug('Executing GetTwilioLogs command...');\n $callLogsController = new CallLogsController;\n $callLogsController->syncLogs(($this->option('notify') == \"true\"));\n } catch (\\Exception $e) {\n Log::error(\"Error getting Twilio call logs: \" . $e->getMessage());\n }\n }", "title": "" }, { "docid": "97dc6797c191484a7c7412b7c005077f", "score": "0.5951457", "text": "public function handle()\n {\n $this->database = $this->getDatabase($this->input->getOption('database'));\n\n $fileName = $this->argument('dump');\n\n if ($fileName) {\n $this->restoreDump($fileName);\n } else {\n $this->listAllDumps();\n }\n }", "title": "" }, { "docid": "beb2ad1c6f18445344b56bf96dd25089", "score": "0.5951359", "text": "public function handle()\n {\n $this->ensureCurrentTeamIsSet();\n\n /** @var \\Laravel\\Forge\\Resources\\Server $server */\n $server = $this->forge->server(\n $this->config->get('server')\n );\n\n $tags = ! empty($server->tags) ? \" ({$server->tags(',')})\" : null;\n\n $this->successfulStep(\n 'You are currently within the <comment>['.$server->name.']'.$tags.'</comment> server context.'\n );\n }", "title": "" }, { "docid": "08d8033f8c0377dae9b3c30e4faea9b2", "score": "0.59505534", "text": "public function handle()\n {\n if (!Setting::get('media_path')) {\n $this->error(\"Media path hasn't been configured. Exiting.\");\n\n return;\n }\n\n if (!$record = $this->argument('record')) {\n $this->syncAll();\n\n return;\n }\n\n $this->syngle($record);\n }", "title": "" }, { "docid": "a2b07f30242fa24daf287d21553f2f73", "score": "0.59495354", "text": "public function handle()\n {\n $this->line($this->description);\n $email = $this->argument('email');\n $password = $this->argument('password');\n\n $user = $this->userRepo->getByEmail($email);\n if ($user) {\n $this->error('email already existed!');\n return;\n }\n\n $data = [\n 'email' => $email,\n 'password' => $password,\n 'name' => 'Name',\n 'status' => config('user.status.active'),\n ];\n\n if ($user = $this->userRepo->add($data, [])) {\n $this->info('Add user success');\n } else {\n $this->error('Add user failed');\n }\n }", "title": "" }, { "docid": "e3ef3f19a551370d93d857f7f862257b", "score": "0.59477365", "text": "public function handle()\n {\n $service = new SubscriptionService();\n\n $service->updateStatuses();\n }", "title": "" }, { "docid": "0cfe2827b2f5d94945017aecbba6b3f3", "score": "0.5947491", "text": "public function handle()\n {\n $name = $this->argument('name');\n $mark = new Parsedown();\n\n $templatePath = base_path('events/'.$name);\n if (is_dir($templatePath)) {\n $information = file_get_contents($templatePath.'/information.json');\n $information = json_decode($information, true);\n $description = file_get_contents($templatePath.'/description.md');\n $description = $mark->text($description);\n $memo = file_get_contents($templatePath.'/memo.md');\n $memo = $mark->text($memo);\n $template = basename($templatePath);\n\n $information['related_event_ids'] = json_encode($information['related_event_ids'] ?? []);\n\n Event::where('template', $name)\n ->update($information + compact('description', 'template', 'memo'));\n $this->info($template.' is updated');\n }\n }", "title": "" }, { "docid": "31420bed7463f20517d4105fb422d65f", "score": "0.5946661", "text": "public function handle()\n {\n $this->output->title('Generating i18n migration files');\n\n $this->publishMigrations();\n\n $this->output->success('Migration files generated');\n }", "title": "" }, { "docid": "775d6a7e029add7ddab52b074d1341ea", "score": "0.5944441", "text": "public function handle()\n {\n $id = $this->argument('id');\n $find = artikel::find($id);\n \\Notification::route('telegram', env('TELEGRAM_CHANNEL'))->notify(new \\Bageur\\Artikel\\Notifications\\Go($find));\n }", "title": "" }, { "docid": "1f7b065fbe9dace577675a1acbbe0d42", "score": "0.59403765", "text": "public function handle()\n {\n $this->info('Generating favicon...');\n\n try {\n app(FaviconManipulator::class)->generate(\n $this->argument('picture')\n );\n\n $this->info('Favicon has been generated successfully.');\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }", "title": "" }, { "docid": "8a3928e9354c36b3579b04915c175301", "score": "0.5937333", "text": "public function handle()\n {\n $this->_isTestMode = self::MODE_TEST == $this->argument('mode');\n $this->_isFakeMode = self::MODE_FAKE == $this->argument('mode');\n\n if ($this->_isTestMode) {\n $this->alert('Running in test mode! Users will not be notified');\n }\n\n if ($this->_isFakeMode) {\n $this->alert('Running in FAKE mode! Data is located in '.self::FAKE_JSON_PATH);\n\n $users = $this->_getPredefinedFakeUserData($this->argument('limit'));\n $this->_process($users, date_create($this->argument('fakeDate'))->getTimestamp());\n\n exit(0);\n }\n\n $this->info('Running '.__CLASS__.'. Chunk size = '.self::CHUNK_SIZE.\"\\n\");\n\n // find users with positive balance only:\n User::with('notifications')\n ->where('balance', '>', 0)\n ->chunk(self::CHUNK_SIZE, function ($users) {\n $this->_process($users);\n });\n }", "title": "" }, { "docid": "9041beb11722ad8cd2c824a5a276afe6", "score": "0.5937068", "text": "public function handle()\n {\n $this->timer->take();\n $this->alert('Like a boss');\n\n if($this->option('breeze')) {\n if($this->isBreezeExist()) {\n $this->info('call auth breeze install');\n $this->call('breeze:install');\n }\n }\n\n if($this->option('frontend')) {\n $this->info('run building frontend...');\n $this->info(shell_exec('npm install'));\n $this->info(shell_exec('npm run dev'));\n }\n\n $this->info('call migrate:fresh');\n $this->call('migrate:fresh');\n\n\n $this->info('call migrate');\n $this->call('migrate');\n\n $this->info('call seed');\n $this->call('db:seed');\n\n $this->alert('Boss command complete, it took: ' . $this->timer->difference());\n }", "title": "" }, { "docid": "412bf9e12fc8446fe431ebeaee86a51c", "score": "0.5935355", "text": "public function handle()\n {\n $this->checkRequirement();\n\n $data = [\n 'model' => $this->option('model'),\n 'domain' => $this->option('domain'),\n ];\n\n if (!$this->alreadyExists($data)) {\n $this->info(sprintf('Making collection %sCollection...', $data['model']));\n $this->storeStub('collection', $data);\n $this->info(sprintf('Collection %sCollection successfully made!', $data['model']));\n } else {\n $this->error(sprintf('Collection %sCollection already exists!', $data['model']));\n }\n }", "title": "" }, { "docid": "faedd88cace0fdf8001a25e451eb0f57", "score": "0.59353346", "text": "public function handle()\n {\n $store = $this->argument('store');\n\t\tLog::info(\"Get orders job for $store initiated.\");\n\t\t$this->fetchOrders($store);\n\t\tLog::info(\"Get orders job for $store completed.\");\n }", "title": "" }, { "docid": "e6a461c54e25db8cb6793cd56719751c", "score": "0.59346956", "text": "public function handle()\n {\n $this->generateProfit();\n }", "title": "" }, { "docid": "c80594d85186899bba881d9e85fb216a", "score": "0.59342366", "text": "public function handle()\n {\n $this->ensureDatabase();\n $this->importShows();\n $this->loadTracks();\n $this->exportCSV();\n }", "title": "" }, { "docid": "d5e0d9ba08f6b9ffe74c01b234f2886f", "score": "0.5932232", "text": "public function handle()\n {\n $this->setPackageDetails();\n\n try {\n $package = Packagist::getPackage(\"{$this->vendor}/{$this->packageName}\");\n $version = $this->getPackageVersion($package, $this->version);\n $this->installPackage();\n $this->executeCommand();\n } catch (Exception $e) {\n $this->error($e->getMessage());\n\n return;\n }\n }", "title": "" }, { "docid": "192cb7566d14c1d9e6ecc538cedad962", "score": "0.5931026", "text": "public function handle()\n {\n $name = $this->argument('feature');\n $percentage = $this->argument('percentage');\n\n $this->rollout->activatePercentage($name, $percentage);\n\n $this->renderFeatureAsTable($name);\n }", "title": "" }, { "docid": "130acd2483af2a80ad2ba759d85addfa", "score": "0.5928716", "text": "public function handle()\n {\n $type = $this->argument('type');\n $url = $this->argument('url');\n\n $response = Acetone::$type($url);\n Log::debug($response->getReasonPhrase());\n }", "title": "" }, { "docid": "b777cda537f313004d656f41ab4a2b94", "score": "0.59255457", "text": "public function handle()\n {\n $arguments = $this->arguments();\n $options = $this->options();\n $username = $this->ask('What is your name?');\n $password = $this->secret('What is the password?');\n if ($this->confirm('Do you wish to continue? [y|N]')) {\n dd($password);\n }\n dd($username);\n $this->info('Display this on the screen'.$arguments['name'].'===='.$options['user']);\n }", "title": "" }, { "docid": "a92f2e394a5cc263ee62815c18a192de", "score": "0.59192455", "text": "public function handle()\n {\n if (env('APP_ENV') == 'local') {\n // 生成助手文件\n $this->callSilent('ide-helper:generate');\n $this->info('Ide-helper generated successfully.');\n $this->callSilent('ide-helper:meta');\n $this->info('Ide-helper meta generated successfully.');\n \n $this->callSilent('cache:clear');\n $this->info('Enjoy your time!');\n }\n else {\n $this->error('Installed failed.');\n }\n }", "title": "" }, { "docid": "15457e41e193aef91cbf784d2e3ea34e", "score": "0.5919174", "text": "public function handle()\n {\n $action = $this->argument('action');\n $key = $this->options('key');\n if (!in_array($action, ['save', 'list', 'ttl'])) {\n $this->error('Error Arguments');\n exit;\n }\n switch ($action) {\n case 'save':\n $this->saveAllExpireData([$this->model, 'saveExpire']);\n echo \"\\033[0;32mSave successfully\\033[0m\" . PHP_EOL;\n break;\n case 'list':\n $list = $this->getKeySaveCount();\n if (sizeof($list)) {\n foreach ($list as $v) {\n echo \"\\033[0;32mKey: \" . $v['key'] . ' Count: ' . $v['count'] . \"\\033[0m\" . PHP_EOL;\n }\n } else {\n $this->error('No data');\n }\n break;\n case 'ttl':\n $t = $this->ttl($key['key']);\n echo \"\\033[0;32mExpire: \" . $t . \"\\033[0m\" . PHP_EOL;\n break;\n }\n }", "title": "" }, { "docid": "b85b21be5fa00cea4a2179494bc03865", "score": "0.5919063", "text": "public function handle()\n {\n $this->setAllModels();\n $this->setAllRelations($this->models_strtolower);\n\n $this->showTableInConsole($this->models);\n }", "title": "" }, { "docid": "930c615b11477f1ac29ff9a5094c6b94", "score": "0.5915966", "text": "public function handle()\n {\n\n $location = $this->choice('Which namespace shall we save them under?', config('Generator.areas'));\n\n foreach (glob('./' . config('Generator.models') . '/*.php') as $file) {\n $model = basename($file, '.php');\n\n if (!in_array($model, config('Generator.legacyModels'))) {\n\n $this->call('Generator:single', [\n 'model' => $model,\n 'location' => $location,\n ]);\n }\n }\n\n\n if ($this->confirm('Next you will see a list of policy providers to add to the AuthServiceProvider.php, do you wish to continue?')) {\n $this->call('Generator:policy-list');\n };\n\n $this->info('Completed');\n\n }", "title": "" }, { "docid": "a043c6b40426e704111eeb06980f6962", "score": "0.59148306", "text": "public function handle()\n {\n $type = $this->argument('type');\n\n switch ($type) {\n case \"time\" :\n $this->time();\n break;\n default :\n throw new Exception('Empty type commaand.');\n break;\n }\n }", "title": "" }, { "docid": "0d55abab67d6c56006cf5a752faa5066", "score": "0.5914211", "text": "public function handle(): void\n {\n $serviceName = $this->argument('service');\n $this->stringConversionsAndReplace($serviceName);\n $this->components->info($this->getFinalSuccessMessage());\n }", "title": "" }, { "docid": "8263323f43626862c242d09f821ce73a", "score": "0.5913789", "text": "public function handle()\n {\n $this->info('Updating Devel...');\n\n // Seed any new user permissions, attach them to the Root role\n $this->info('Seeding new user permissions...');\n (new UserPermissionsSeeder)->run();\n\n $this->info('---');\n $this->info('Update finished!');\n }", "title": "" } ]
4eb3a61f8b6d4cec63ca422f8bb99185
Fill the given fields for the model.
[ { "docid": "b66378de97ca90df4da958b63768b8ca", "score": "0.5793192", "text": "protected static function fillFields(NovaRequest $request, $model, $fields)\n {\n $fields->filter(function($field) {\n return $field->meta['defaultLast'] ?? false;\n })->each(function($field) use ($request) {\n DefaultableField::cacheLastValue($request, $field);\n });\n\n return parent::fillFields($request, $model, $fields);\n }", "title": "" } ]
[ { "docid": "c2eef09d66b71e4b01461db448dfe963", "score": "0.7132588", "text": "public function fill($fields)\n {\n if (!is_array($fields)) {\n return;\n }\n \n if (isset($fields['ID'])) {\n $this->id = $fields['ID'];\n }\n \n $this->fields = $fields;\n \n $this->fieldsAreFetched = true;\n \n if (method_exists($this, 'afterFill')) {\n $this->afterFill();\n }\n\n $this->original = $this->fields;\n }", "title": "" }, { "docid": "c06f4ae3e593289124745d0bd260f2cc", "score": "0.7030363", "text": "protected function _updatefields() {}", "title": "" }, { "docid": "4e9fb93cdb37b3102bd15c551149ded4", "score": "0.70276225", "text": "protected abstract function setFields();", "title": "" }, { "docid": "63f7f23614a1f6b727f36f9ffea48b9f", "score": "0.6890545", "text": "protected function prepare_fields()\n {\n }", "title": "" }, { "docid": "e53eace2d981ee0c36b1dbdcaf83be7a", "score": "0.6656321", "text": "private function _set_fields()\n {\n @$this->form_data->question_id = 0;\n\n $this->form_data->category_id = 0;\n $this->form_data->sub_category_id = 0;\n $this->form_data->sub_two_category_id = 0;\n $this->form_data->sub_three_category_id = 0;\n $this->form_data->sub_four_category_id = 0;\n\n $this->form_data->ques_text = '';\n $this->form_data->survey_weight = '';\n $this->form_data->ques_type = '';\n $this->form_data->qus_fixed = 0;\n $this->form_data->ques_expiry_date = '';\n\n\n $this->form_data->filter_question = '';\n $this->form_data->filter_category = 0;\n $this->form_data->filter_type = '';\n $this->form_data->filter_expired = '';\n }", "title": "" }, { "docid": "7eb8391576ee9568ecb97fabd5ad7021", "score": "0.664911", "text": "protected function setupFields()\n {\n }", "title": "" }, { "docid": "e0c94a3af65c916db0205dc2c292ac4f", "score": "0.6577755", "text": "public function setFields($fields);", "title": "" }, { "docid": "a5f2b985432dc2d04f00d46b3a46a88a", "score": "0.6491607", "text": "public function setFields($fields = []);", "title": "" }, { "docid": "95ae441225f3133c3a0dc9a640d28484", "score": "0.6465712", "text": "private function _set_fields()\n {\n\t\t$this->form_data = new StdClass;\n $this->form_data->group_id = 0;\n $this->form_data->group_name = '';\n\n $this->form_data->filter_group_name = '';\n }", "title": "" }, { "docid": "d1ab6f2221a8d029bbabf5440c677a58", "score": "0.64518976", "text": "function setFields($fields);", "title": "" }, { "docid": "83ae43738edc57c256c7641b07867e5b", "score": "0.64449674", "text": "public function fillFields(&$params, $fields)\n {\n if (! array_key_exists('fields', $params)) {\n $params = array_merge(compact('fields'), $params);\n }\n }", "title": "" }, { "docid": "f93660d647cfc9f77f31406e6cc8076e", "score": "0.6444316", "text": "function _init_fields()\n\t{\n\t\tif($this->table_name)\n\t\t{\n\t\t\t$this->db_fields = $this->db->list_fields($this->table_name);\n\t\t\t\n\t\t\tforeach($this->db_fields as $field)\n\t\t\t{\n\t\t\t\t$this->{$field} = NULL;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "cd0df506212a5380c08b63aaa2d9ff39", "score": "0.6408978", "text": "public function buildCoreFields(): void\n {\n //====================================================================//\n // Company\n $this->fieldsFactory()->create(SPL_T_VARCHAR)\n ->identifier(\"user_id\")\n ->name(\"User Id\")\n ->description(\"User Id\")\n ->microData(\"http://schema.org/Organization\", \"legalName\")\n ->isReadOnly()\n ;\n //====================================================================//\n // Firstname\n $this->fieldsFactory()->create(SPL_T_VARCHAR)\n ->identifier(\"firstname\")\n ->name(\"First Name\")\n ->microData(\"http://schema.org/Person\", \"familyName\")\n ->isListed()\n ->isLogged()\n ;\n //====================================================================//\n // Lastname\n $this->fieldsFactory()->create(SPL_T_VARCHAR)\n ->identifier(\"lastname\")\n ->name(\"Last Name\")\n ->microData(\"http://schema.org/Person\", \"givenName\")\n ->isListed()\n ->isLogged()\n ;\n //====================================================================//\n // Email\n $this->fieldsFactory()->create(SPL_T_EMAIL)\n ->identifier(\"email\")\n ->name(\"Email\")\n ->microData(\"http://schema.org/ContactPoint\", \"email\")\n ->isRequired()\n ->isPrimary()\n ->isLogged()\n ->isListed()\n ;\n }", "title": "" }, { "docid": "ebbc831741af1d3370f4c4debf3d3cb2", "score": "0.6321641", "text": "protected function fill()\n {\n array_map(function ($field) {\n $defaultValue = isset($this->defaultFields[$field]['defaultValue']) ?\n $this->defaultFields[$field]['defaultValue'] :\n null;\n\n $this->values[$field] = (new $this->defaultFields[$field]['format']($defaultValue))\n ->setPosition($this->defaultFields[$field]['position'])\n ->setLength($this->defaultFields[$field]['length']);\n }, array_keys($this->defaultFields));\n }", "title": "" }, { "docid": "7dfe85a91092bfdafa17ea230a723933", "score": "0.6321252", "text": "protected function buildCoreFields(): void\n {\n //====================================================================//\n // Firstname\n $this->fieldsFactory()->Create(SPL_T_VARCHAR)\n ->Identifier(\"firstname\")\n ->Name(\"First name\")\n ->MicroData(\"http://schema.org/Person\", \"familyName\")\n ->Association(\"firstname\", \"lastname\")\n ->isRequired()\n ->isListed();\n\n //====================================================================//\n // Lastname\n $this->fieldsFactory()->Create(SPL_T_VARCHAR)\n ->Identifier(\"lastname\")\n ->Name(\"Last name\")\n ->MicroData(\"http://schema.org/Person\", \"givenName\")\n ->Association(\"firstname\", \"lastname\")\n ->isRequired()\n ->isListed();\n\n //====================================================================//\n // Email\n $this->fieldsFactory()->Create(SPL_T_EMAIL)\n ->Identifier(\"email\")\n ->Name(\"Email address\")\n ->MicroData(\"http://schema.org/ContactPoint\", \"email\")\n ->Association(\"firstname\", \"lastname\")\n ->isRequired()\n ->isListed();\n }", "title": "" }, { "docid": "7e885d672db42db603bfc5d211f739e7", "score": "0.6311579", "text": "public function fill(array $fields): self\n {\n foreach ($fields as $field => $value) {\n $this->{$field} = $value;\n }\n\n return $this;\n }", "title": "" }, { "docid": "7c4407a3c33c12014a49622070eb79a8", "score": "0.62488323", "text": "public function setFields($fields)\n\t{\n\t\t$this->_fields = FieldLayoutFieldModel::populateModels($fields, 'fieldId');\n\t}", "title": "" }, { "docid": "cdd9f7fb54c840e85f781157520b06d4", "score": "0.6223631", "text": "protected function buildCoreFields(): void\n {\n //====================================================================//\n // Reference\n $this->fieldsFactory()->create(SPL_T_VARCHAR)\n ->identifier(\"increment_id\")\n ->name('Reference')\n ->microData(\"http://schema.org/Invoice\", \"confirmationNumber\")\n ->isReadOnly()\n ->isListed()\n ;\n //====================================================================//\n // Customer Object\n $this->fieldsFactory()->create((string) self::objects()->encode(\"ThirdParty\", SPL_T_ID))\n ->identifier(\"customer_id\")\n ->name('Customer')\n ->microData(\"http://schema.org/Organization\", \"ID\")\n ->isRequired()\n ->isReadOnly()\n ;\n //====================================================================//\n // Customer Email\n $this->fieldsFactory()->create(SPL_T_EMAIL)\n ->identifier(\"customer_email\")\n ->name(\"Email du contact\")\n ->microData(\"http://schema.org/ContactPoint\", \"email\")\n ->isReadOnly()\n ;\n //====================================================================//\n // Order Date\n $this->fieldsFactory()->create(SPL_T_DATETIME)\n ->identifier(\"created_at\")\n ->name(\"Date\")\n ->microData(\"http://schema.org/DataFeedItem\", \"dateCreated\")\n ->isReadOnly()\n ->isListed()\n ;\n }", "title": "" }, { "docid": "9f8daa5ae0ebca798e21631183070093", "score": "0.622077", "text": "protected function __getFieldsModel()\n {\n }", "title": "" }, { "docid": "52ba7e3bdf70e1de9e14a52dc49afb7a", "score": "0.62106717", "text": "protected function initFields( $params )\n {\n foreach ( $this->getFields() as $name => $field )\n {\n if ( isset( $params[$name] ) )\n {\n $field->setValue( $params[$name] );\n }\n }\n }", "title": "" }, { "docid": "30d7ac1082a7b4961e09d26ee77bdcc8", "score": "0.62010264", "text": "function _set_editable_fields()\n\t{\n\t\tif (empty($this->fields))\n\t\t{\n\t\t\t// pull the fields dynamically from the database\n\t\t\t$this->db->cache_on();\n\t\t\t$this->fields = $this->db->list_fields($this->primary_table);\n\t\t\t$this->db->cache_off();\n\t\t}\n\t}", "title": "" }, { "docid": "a6414e1ff31b64f0897eecc32940ecbc", "score": "0.61776024", "text": "abstract protected function createFields();", "title": "" }, { "docid": "cfb76b4d55afe64e9387ea2dbd0c3d74", "score": "0.61591023", "text": "public static function populateModel($values)\n\t{\n\t\tif (isset($values['fields']))\n\t\t{\n\t\t\t$fields = $values['fields'];\n\t\t\tunset($values['fields']);\n\t\t}\n\n\t\t$model = parent::populateModel($values);\n\n\t\tif (isset($fields))\n\t\t{\n\t\t\t$model->setFields($fields);\n\t\t}\n\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "a3292addfcbb7e0c3e3e5a6d449b5639", "score": "0.6125872", "text": "public function prepareFieldsFromTable()\n {\n foreach ($this->columns as $column) {\n $type = $column->getType()->getName();\n\n switch ($type) {\n case 'integer':\n $field = $this->generateIntFieldInput($column, 'integer');\n break;\n case 'smallint':\n $field = $this->generateIntFieldInput($column, 'smallInteger');\n break;\n case 'bigint':\n $field = $this->generateIntFieldInput($column, 'bigInteger');\n break;\n case 'boolean':\n $name = title_case(str_replace('_', ' ', $column->getName()));\n $field = $this->generateField($column, 'boolean', 'checkbox,1');\n break;\n case 'datetime':\n $field = $this->generateField($column, 'datetime', 'date');\n break;\n case 'datetimetz':\n $field = $this->generateField($column, 'dateTimeTz', 'date');\n break;\n case 'date':\n $field = $this->generateField($column, 'date', 'date');\n break;\n case 'time':\n $field = $this->generateField($column, 'time', 'text');\n break;\n case 'decimal':\n $field = $this->generateNumberInput($column, 'decimal');\n break;\n case 'float':\n $field = $this->generateNumberInput($column, 'float');\n break;\n case 'string':\n $field = $this->generateField($column, 'string', 'text');\n break;\n case 'text':\n $field = $this->generateField($column, 'text', 'textarea');\n break;\n default:\n $field = $this->generateField($column, 'string', 'text');\n break;\n }\n\n if (strtolower($field->name) == 'password') {\n $field->htmlType = 'password';\n } elseif (strtolower($field->name) == 'email') {\n $field->htmlType = 'email';\n } elseif (in_array($field->name, $this->timestamps)) {\n $field->isSearchable = false;\n $field->isFillable = false;\n $field->inForm = false;\n $field->inIndex = false;\n }\n\n $this->fields[] = $field;\n }\n }", "title": "" }, { "docid": "f989d75d28bfcde7544e2e09ad258d8b", "score": "0.61213166", "text": "public abstract function createFields();", "title": "" }, { "docid": "c313ddc01a75f28ab4f9100e9130f6ed", "score": "0.61052006", "text": "function set_fields($fields) {\n\t\t$this->fields = $fields;\n\t}", "title": "" }, { "docid": "70b654465b98dc32e46c26add7a76e28", "score": "0.60174567", "text": "abstract protected function loadFields();", "title": "" }, { "docid": "b69adcac86ab0415c1c5993d6192deae", "score": "0.6010242", "text": "public function setData(...$fields) : void;", "title": "" }, { "docid": "06fef171ff78da92c2ce014e95ad6f52", "score": "0.59995496", "text": "private function _populateFormFields() {\n $this->_formFields->username = $_POST['studentUsername'];\n $this->_formFields->password = $_POST['studentPassword'];\n }", "title": "" }, { "docid": "62cb5af67d2da7d6c793289f12e79509", "score": "0.5989437", "text": "protected function prepareFields($fields)\n {\n $fields = KoomehAmenity::get()->sortBy('field')->map(function($amenity) {\n $field = Boolean::class;\n\n if ($amenity->field == 'number') {\n $field = Number::class;\n } \n\n if ($amenity->field == 'text') {\n $field = Text::class;\n } \n\n $fillUsing = function($request, $model, $attribute, $requestAttribute) use ($amenity) {\n if ($value = $request->get($requestAttribute)) {\n return function() use ($model, $value, $amenity) {\n $model->amenities()->attach($amenity->getKey(), compact('value'));\n };\n }\n };\n\n $resolveUsing = function($request, $resource) use ($amenity) {\n $attached = $resource->amenities->find($amenity->getKey());\n\n return data_get($attached, 'pivot.value');\n };\n\n return $field::make($amenity->name, \"amenities_{$amenity->getKey()}\")\n ->required($amenity->required ? true : false)\n ->rules($amenity->required ? 'required' : 'nullable')\n ->fillUsing($fillUsing)\n ->resolveUsing($resolveUsing);\n })->prepend($this->fakeField());\n\n return parent::prepareFields($fields);\n }", "title": "" }, { "docid": "2205054a39aa9e2e64d3000dbc4ec09b", "score": "0.5977491", "text": "protected function _init()\n\t{\n\t\t$this->_fields = array(\n 'id' => new Sprig_Field_Auto,\n \n 'array' => new Sprig_Field_BelongsTo(array(\n\t\t\t\t'model' => 'Site_Array',\n 'column' => 'site_array_id', // $key_id is assumed // Column to be used in the database table for this model\n 'foreign_key' => '_id' // 'id' Is assumed\n\t\t\t)),\n \n 'key' => new Sprig_Field_Char(array(\n\t\t\t\t'empty' => TRUE, // Default FALSE\n\t\t\t)),\n 'val' => new Sprig_Field_Text(array(\n\t\t\t\t'empty' => TRUE, // Default FALSE\n\t\t\t)),\n \n\t\t);\n\t}", "title": "" }, { "docid": "b4e7276a82e805a7be15534f8820e90d", "score": "0.5977412", "text": "private function resetInputFields()\n {\n $this->name = '';\n $this->code = '';\n $this->agency_id = '';\n\n $this->phone = '';\n $this->fax = '';\n\n $this->email = '';\n $this->address = '';\n $this->country = '';\n }", "title": "" }, { "docid": "73c68314ebfeb952d9ec03e6ee8a500d", "score": "0.5975541", "text": "public function fill(Identifiable $model, array $attributes);", "title": "" }, { "docid": "c6713b8dfa4ee142eeb379cd1be1c6d2", "score": "0.5963827", "text": "private function createFields(){\n //Human::log(\"------------- Create fields model \".$this->modelName);\n self::$yetInit[get_class($this)]=true;\n //let's init database.\n $modelName=get_class($this);\n $modelNameManager=$modelName.\"Manager\";\n if(!class_exists($modelNameManager)){\n $modelNameManager=\"DbManager\";\n }\n $rc=new ReflectionClass($modelName);\n $rc->setStaticPropertyValue(\"manager\", new $modelNameManager( $modelName ));\n \n //browse the class properties to find db fields and then store it in a good order (keys first, associations later)\n\t $fields=array();\n foreach ($rc->getProperties() as $field){\n if($field->isPublic()){\n\n\n //get the type from the @var type $field name comment...yes, I'm sure.\n $comments=$field->getDocComment();\n $details=CodeComments::getVariable($comments);\n\n $type=$details[\"type\"];\n $isVector=$details[\"isVector\"];\n $description=$details[\"description\"];\n $fieldName=$field->name;\n\n $fieldObject=$this->getDbField($fieldName,$type,$isVector);\n\n if($fieldObject){\n $fieldObject[\"comments\"]=$description;\n switch($fieldObject[\"type\"]){\n\n case \"OneToOneAssoc\":\n case \"NToNAssoc\":\n //associations at the end\n array_push($fields, $fieldObject);\n break;\n\n default :\n //classic fields at the beginning\n array_unshift($fields, $fieldObject);\n\n }\n\n }\n }\n }\n\t //create the fields\n\t foreach ($fields as $f){\n\t\t$f[\"options\"][Field::COMMENTS]=$f[\"comments\"];\n Field::create($modelName.\".\".$f[\"name\"],$f[\"type\"],$f[\"options\"]);\n //Human::log($this->modelName.\" Create field \".$f[\"name\"]);\n \n\t }\n \n\t //whooho!\n $this->db()->init(); \n }", "title": "" }, { "docid": "e9f378a17d393d8df76ebea326ae4d59", "score": "0.5963055", "text": "public function makeFields()\n {\n }", "title": "" }, { "docid": "ba73ed38dc3d87465dc9a88e0f12ad03", "score": "0.59404284", "text": "public function fillFromRequest(ApiRequest $request)\n {\n $this->fillable($request->getFillableFields());\n $this->fill(array_intersect_key($request->validated(), $this->getAttributes()));\n $this->saveOrFail();\n }", "title": "" }, { "docid": "6daa98b2966d9884e917449c55163c4d", "score": "0.5937671", "text": "public function setDataFields($fields) {\n if (is_array($fields)) {\n foreach ($fields as $key => $value) {\n $this->_fields[$key] = $value;\n }\n }\n }", "title": "" }, { "docid": "62bd15452da2fa28d23bc6e6aa42ca31", "score": "0.5935043", "text": "protected function setRequiredFields()\n {\n $requiredFields = [\n 'transaction_id',\n 'remote_ip',\n 'return_success_url',\n 'return_failure_url',\n 'amount',\n 'currency',\n 'bank_code'\n ];\n\n $this->requiredFields = \\Genesis\\Utils\\Common::createArrayObject($requiredFields);\n\n $requiredFieldValues = [\n 'currency' => [\n 'CNY', 'THB', 'IDR', 'MYR', 'INR'\n ]\n ];\n\n $this->requiredFieldValues = \\Genesis\\Utils\\Common::createArrayObject($requiredFieldValues);\n\n $this->setRequiredFieldsConditional();\n }", "title": "" }, { "docid": "20d14247cb4b1b2e96ca286dce8433cc", "score": "0.59345686", "text": "protected function setRequiredFields()\n {\n $requiredFields = [\n 'expiration_month',\n 'expiration_year',\n 'transaction_unique_id'\n ];\n\n $this->requiredFields = CommonUtils::createArrayObject($requiredFields);\n }", "title": "" }, { "docid": "a9ac3c911d2bec69240dd95174835ad2", "score": "0.5930939", "text": "public function fillFields(TableNode $fields)\n {\n foreach ($fields->getRowsHash() as $field => $value) {\n $this->fillField($field, $value);\n }\n }", "title": "" }, { "docid": "f824a53c310e171205cf9bd397285a1b", "score": "0.5926724", "text": "public function setFields($fields)\n {\n $this->fields = $fields;\n }", "title": "" }, { "docid": "f824a53c310e171205cf9bd397285a1b", "score": "0.5926724", "text": "public function setFields($fields)\n {\n $this->fields = $fields;\n }", "title": "" }, { "docid": "f1c54a64a0c6a4f19b838b4de4abeb94", "score": "0.5911333", "text": "public function prepareFieldset();", "title": "" }, { "docid": "cc7f61470abe5459e1c6f923237eb311", "score": "0.59095347", "text": "public function setFields($fields) {\n\t\t$this->fields = $fields;\n\t}", "title": "" }, { "docid": "455c89536d86736ceda2bcbb4d8b1c0b", "score": "0.58910316", "text": "protected function buildCoreFields(): void\n {\n //====================================================================//\n // Register Product Configurator\n $this->fieldsFactory()->registerConfigurator(\n \"Address\",\n new AddressConfigurator()\n );\n //====================================================================//\n // Customer\n $this->fieldsFactory()->create((string) self::objects()->encode(\"ThirdParty\", SPL_T_ID))\n ->identifier(\"customer_id\")\n ->name(\"Customer\")\n ->microData(\"http://schema.org/Organization\", \"ID\")\n ->isRequired()\n ->isNotTested()\n ;\n //====================================================================//\n // Country ISO Code\n $this->fieldsFactory()->create(SPL_T_COUNTRY)\n ->identifier(\"country_iso\")\n ->name(\"Country ISO (Code)\")\n ->microData(\"http://schema.org/PostalAddress\", \"addressCountry\")\n ->isRequired()\n ;\n }", "title": "" }, { "docid": "00c51465e5f14316e53141bf92de6ac3", "score": "0.5871842", "text": "protected function fields() {\n\t\t\tif (isset($this->vars[\"fields\"])) {\n\t\t\t\tif (!is_array($this->vars[\"fields\"])) {\n\t\t\t\t\t$this->vars[\"fields\"]=array($this->vars[\"fields\"]);\n\t\t\t\t}\n\t\t\t\t$this->mongo_db->select($this->vars[\"fields\"]);\n\t\t\t\t$this->data[\"criteria\"][\"fields\"]=$this->vars[\"fields\"];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0bd12a3803db179fcaeb219d402f9757", "score": "0.58700013", "text": "private function _parseFields()\n {\n // make a new array from the field_types array where all values are ZERO\n $num_types = array_fill_keys(array_keys($this->field_types), 0);\n\n // create a new fillable array\n $fillable = [];\n\n // loop fields\n foreach($this->fields as &$field_config){\n\n // DB FIELD NAME ---------------------------------------------------\n // get the schema type (eg: string, text etc.)\n $type = $this->field_types[$field_config['type']]['schema_type'];\n // create the field name based on the type and count\n $field_config['name'] = $type . (++$num_types[$type]);\n\n // FILLABLE ENTRIES ---------------------------------------------------\n // add a 'fillable' value like \"string1\", \"decimal3\" etc.\n $fillable[] = $field_config['name'];\n \n // VALIDATION RULES --------------------------------------------------\n // get the related rules from either the class fields or the field_types arrays\n $field_rules = isset($field_config['rules']) ? $field_config['rules'] : $this->field_types[$type]['rules']; \n // store\n $this->validation_rules[$field_config['name']] = $field_rules;\n\n // VALIDATION MESSAGES\n // copy all the validation messages from the lang file into a \n // FIELD specific array so we can swap all the attribute names out\n foreach(explode('|', $field_rules) as $field_rule){\n $rule_name = preg_replace('@:.*@','',$field_rule);\n $this->validation_messages[$field_config['name'].'.'.$rule_name] = $this->_swapValidationAttrs($rule_name, $field_config['label'], $field_rules);\n }\n\n }\n\n // merge the dynamic fillable fields with the defaults\n $merged_fillable = array_merge($this->fillable, $fillable);\n\n // set the fillable array using the appropriate parent method\n $this->fillable($merged_fillable);\n\n }", "title": "" }, { "docid": "7160aaedffecbbbeb3289e699564a0e4", "score": "0.58355665", "text": "protected function fillModel(array $data): void\n {\n foreach ($data as $key => $value) {\n if (property_exists($this, $key)) {\n $this->$key = $value;\n }\n }\n }", "title": "" }, { "docid": "ba56c1ba9f983a828fc39aeadfc9deb6", "score": "0.58265376", "text": "function init()\n\t{\n\t\tif ($this->fields)\n\t\t{\n\t\t\t$flds = array();\n\t\t\tforeach(split(',',$this->fields) as $fld)\n\t\t\t{\n\t\t\t\tif (trim($fld)!=null)\n \t\t\t\t$flds[] = trim($fld);\n\t\t\t}\n\t\t\t\n\t\t\t$this->fields = $flds;\n\t\t}\n\t}", "title": "" }, { "docid": "d98109f392c6790d64d2543c01ee616f", "score": "0.58186996", "text": "abstract function setCustomFields();", "title": "" }, { "docid": "69af2dea3ac2ebf097c72e0610ea8858", "score": "0.58094263", "text": "protected function prepareModel()\n\t{\n\t\t// Assign model attributes\t\t\n\t\t$model = $this->orm()->find_one(3);\n\t\t\n\t\tforeach ($this->attributes as $attr)\n\t\t{\n\t\t\tif (isset($model->{$attr}))\n\t\t\t\t$this->{$attr} = $model->{$attr};\n\t\t}\n\t}", "title": "" }, { "docid": "ba05bbd08d95922ed824500471f4f787", "score": "0.58020455", "text": "public function fetch_fields(){}", "title": "" }, { "docid": "341a523c1deee79e2069ecdf9d658680", "score": "0.58008045", "text": "public function mutateFields($fields)\n {\n //...\n }", "title": "" }, { "docid": "85e754d1904db72ab012c371a8175e4b", "score": "0.57986116", "text": "protected function createFormFields() {\n\t}", "title": "" }, { "docid": "f9ad81e3f352aad6b3fd16091bc6f141", "score": "0.57939225", "text": "public function fields($fields)\n\t{\n\t\t$this->adapter->fields($fields);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "0382202572849dfbd68db3f9a74636b0", "score": "0.57883304", "text": "function set_fields($fields) {\r\n\t\tif (is_array ( $fields ))\r\n\t\t\t$this->fields = $fields;\r\n\t}", "title": "" }, { "docid": "160ad2d51485164c8360b85be2d39e93", "score": "0.5784144", "text": "protected function wrap_fields()\n {\n }", "title": "" }, { "docid": "6be3cb788c47f251c5a76fa0c25d28bd", "score": "0.578043", "text": "protected function _createFields(array $fields) {\n $this->fields = $fields;\n }", "title": "" }, { "docid": "e06d3620422c9b329a963898bc0066f6", "score": "0.57789516", "text": "protected function setFields(array $fields)\n {\n $this->fields = $fields;\n\n foreach ($this->fields as $field_name => $field) {\n if ($field->isMapped()) {\n $this->mapped_fields[] = $field_name;\n }\n\n if ($field->isUnique()) {\n $this->unique_fields[] = $field_name;\n }\n\n if ($field->isProtected()) {\n $this->protected_fields[] = $field_name;\n }\n }\n }", "title": "" }, { "docid": "2b21db809d4e6e0b81229022cbc421b8", "score": "0.5774584", "text": "private function resetInputFields(){\n $this->name = '';\n $this->number = '';\n $this->note = '';\n $this->org_id = '';\n $this->street = '';\n $this->code = '';\n $this->location = '';\n $this->phone = '';\n $this->email = '';\n }", "title": "" }, { "docid": "1b5fdec1b90afdf7ccb87d3dff5a71dc", "score": "0.5773868", "text": "protected function initCreatingFields() : void\n\t{\n\n\t\t$this->creating_fields = ['text', 'user_id', 'parent_id'];\n\n\t}", "title": "" }, { "docid": "5d4a34fd22b73ae5acbdd99e1d3a19a3", "score": "0.5773196", "text": "public static function setupCustomFields();", "title": "" }, { "docid": "cf27f448d3838fe2e9db969b7b3ca541", "score": "0.57651174", "text": "static function fill_immapala($model, $meta){\n \n $model->date_until_leave = (array_key_exists('date_until_leave', $meta)? $meta['date_until_leave'] : \"\");\n $model->languages = (array_key_exists('languages', $meta)? implode(\", \", $meta['languages']) : \"\");\n $model->contacts = (array_key_exists('contacts', $meta)? $meta['contacts'] : \"\");\n $model->not_traveler = (array_key_exists('not_traveler', $meta)? $meta['not_traveler'] : \"\");\n $model->coordinates = (array_key_exists('coordinates', $meta)? $meta['coordinates'] : \"\");\n return $model;\n \n \n }", "title": "" }, { "docid": "aecd3c2e25479f1185217eff69c095dc", "score": "0.5754029", "text": "public function augmentDataFromRequest(&$fields_data) {\n //Do nothing for the majority of fields\n }", "title": "" }, { "docid": "deb3ddd699cde3bdbc96dad007380de2", "score": "0.5751814", "text": "protected function resetFields() {\n parent::resetFields();\n $this->textField1 = null;\n $this->textField2 = null;\n $this->refNr = null;\n $this->userData = null;\n }", "title": "" }, { "docid": "d95dbc4de44c44a220d3f9551164fc9c", "score": "0.5750287", "text": "public function prepareFields()\n { \n return collect($this->fields)->map(function($field) {\n return array_merge(['field' => $field['layout']], $field['attributes']);\n });\n }", "title": "" }, { "docid": "37c33604bbf46112199157828d5ac06c", "score": "0.5750221", "text": "protected function setRequiredFields()\n {\n $requiredFields = [\n 'transaction_id',\n 'return_success_url',\n 'return_failure_url',\n 'amount',\n 'currency',\n 'operator',\n 'target',\n 'customer_phone',\n 'billing_country'\n ];\n\n $this->requiredFields = CommonUtils::createArrayObject($requiredFields);\n\n $requiredFieldValues = [\n 'operator' => $this->getAllowedOperators(),\n 'currency' => $this->getAllowedCurrencies(),\n 'billing_country' => $this->getAllowedCountries()\n ];\n\n $this->requiredFieldValuesConditional = CommonUtils::createArrayObject(\n $this->buildRequiredFieldValuesConditional()\n );\n\n $this->requiredFieldValues = CommonUtils::createArrayObject($requiredFieldValues);\n }", "title": "" }, { "docid": "de9b9d636e9b463de8def9644ecb243c", "score": "0.57500833", "text": "private function initFields(array $fields)\n {\n $this->fields = $fields;\n return $this;\n }", "title": "" }, { "docid": "9474da752aea91c2b662ecbcd283c2db", "score": "0.5743805", "text": "public function setFields($fields)\n {\n # Set the variable.\n $this->fields = $fields;\n }", "title": "" }, { "docid": "f131826b49ce3db5a7efd48e211c9077", "score": "0.57399654", "text": "private function _setFieldNames() {\n $this->id = \"id\";\n $this->name = \"name\";\n $this->surveyId = \"survey_id\";\n $this->languageId = \"language_id\";\n $this->deleted = \"deleted\"; \n }", "title": "" }, { "docid": "363cf95de4fa79dacd3e4960e675e45f", "score": "0.5737673", "text": "public function __construct($fields)\n {\n $this->fields = $fields;\n }", "title": "" }, { "docid": "363cf95de4fa79dacd3e4960e675e45f", "score": "0.5737673", "text": "public function __construct($fields)\n {\n $this->fields = $fields;\n }", "title": "" }, { "docid": "87d79cac967c14053e034335bbaf10cd", "score": "0.5736958", "text": "public function useAllFields() {\n $this->__onlyFields = array();\n }", "title": "" }, { "docid": "9a736c4b706fc784c14fc9287cfaffcc", "score": "0.5725682", "text": "public function setFields(array $data);", "title": "" }, { "docid": "fc0e005620416a86856e6589f383a0ff", "score": "0.5723352", "text": "public function setFields($fields)\n\t{\n\t\t$array = (array)$fields;\n\t\tforeach ($array as $key => $value) {\n\t\t\t$this->setField($key, $value);\n\t\t}\n\t}", "title": "" }, { "docid": "98fde86f13b28a17c5815dc6aff39936", "score": "0.57219225", "text": "function update_fields($fields){\n //\n //Get the indexed columns \n //\n //loop through all the columns in this entity \n foreach ($this->entity->columns as $column) {\n //\n //Get the name of the column\n $name= $column->name;\n //\n //if the column is foreign or primary return\n if($column->type==!'primary' || $column->type==!'foreign' ){\n //\n //Test if the column already exist in the fields array\n //first map the columns to get the column names\n $names= array_map(function ($f){return $f->column->name;}, $fields);\n //\n $enn= array_search($name, $names);\n //\n //If the culumn is an indexed column do nothing if false do the following\n if ($enn === false){\n //\n //Test if it is called a name \n if ($name== 'name'){\n //\n array_push($fields, $column);\n }\n //\n //Test if it is called a description \n if ($name== 'description'){\n //\n array_push($fields, $column);\n }\n //\n //Test if it is called a title \n if ($name== 'title'){\n //\n array_push($fields, $column);\n }\n //\n //Test if it is called a id \n if ($name== 'id'){\n //\n array_push($fields, $column);\n }\n }\n }\n }\n //\n //\n return $fields;\n }", "title": "" }, { "docid": "56c3cac275e1c011285bc49805cf0959", "score": "0.57135254", "text": "function dbSetVars() {\n\n foreach ($this->fields() as $f) {\n if ($this->$f === false) continue;\n $this->db->set($f,$this->$f);\n }\n\n }", "title": "" }, { "docid": "d392c2f9efcbe5a4efa2b9dbed7380f0", "score": "0.5707419", "text": "protected function prepareForValidation()\n {\n $this->merge([\n 'nome' => $this->nome,\n 'nascimento' => convertDateToDatabase($this->nascimento),\n 'cpf' => returnOnlyNumbers($this->cpf),\n 'email' => $this->email,\n ]);\n }", "title": "" }, { "docid": "7b8c76aff5487493ad519e73a7b7408e", "score": "0.5700617", "text": "public function set_fields($data)\n\t{\n\t\t//assign new valuse to current data\n\t\tforeach ($data as $key => $value)\n\t\t{\n\t\t\t$key = $this->check_alias($key);\n\n\t\t\tif (array_key_exists($key, $this->data))\n\t\t\t{\n\t\t\t\t//skip field not existing in current table\n\t\t\t\t($this->auto_trim) ? $this->data[$key] = trim($value) : $this->data[$key] = $value;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "055c2c23a2b82432d3db84d02a1c1399", "score": "0.5698319", "text": "public function setDataFromRequest(App\\Request $request)\n\t{\n\t\tforeach ($this->getModule()->getEditableFields() as $fieldName) {\n\t\t\tif ($request->has($fieldName)) {\n\t\t\t\tswitch ($fieldName) {\n\t\t\t\t\tcase 'conditions':\n\t\t\t\t\tcase 'record_limit_conditions':\n\t\t\t\t\t\t$value = \\App\\Json::encode(\\App\\Condition::getConditionsFromRequest($request->getArray($fieldName, \\App\\Purifier::TEXT)));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'default_assign':\n\t\t\t\t\t\t$fieldModel = $this->getFieldInstanceByName($fieldName);\n\t\t\t\t\t\t$value = $request->getByType($fieldName, $fieldModel->get('purifyType'));\n\t\t\t\t\t\t$fieldModel->getUITypeModel()->validate($value, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$fieldModel = $this->getFieldInstanceByName($fieldName);\n\t\t\t\t\t\t$value = $request->getByType($fieldName, $fieldModel->get('purifyType'));\n\t\t\t\t\t\t$fieldUITypeModel = $fieldModel->getUITypeModel();\n\t\t\t\t\t\t$fieldUITypeModel->validate($value, true);\n\t\t\t\t\t\t$value = $fieldModel->getDBValue($value);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$this->set($fieldName, $value);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "fee57afcf83654a26dc86cd0ef745992", "score": "0.5693207", "text": "function setFields($userFields) {\n $this->email = $userFields['email'];\n $this->password = $userFields['password'];\n $this->firstName = $userFields['firstName'];\n $this->lastName = $userFields['lastName'];\n $this->phone = $userFields['phone'];\n }", "title": "" }, { "docid": "80008ddd7e4cd3e0ff3007f0c834a5d8", "score": "0.56927747", "text": "private function setupFieldsAttributes() {\n\n\t\tforeach ( $this->form as $field ) {\n\n\t\t\tif ( ! $field->hasAttribute( 'id' ) ) {\n\t\t\t\t$field->setAttribute( 'id', esc_attr( sanitize_title( $field->getName() ) ) );\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "69e403ad21a1447b205ae2a4f490a36a", "score": "0.5686279", "text": "function createUpdateFields()\n\t{\n\t $insertValues = \"\";\n\t $update_functions = \"\";\n\t $table = Doctrine_Core::getTable($this->tableName)->getColumns();\n\t \n\t foreach ($table as $fielname => $info)\n\t {\n\t if (strtolower($fielname) != 'id' && strtolower($fielname) != 'created_at' && strtolower($fielname) != 'updated_at')\n\t {\n\t $insertValues .= \"if (isset($\".$this->moduleNameVar.\"['\".$fielname.\"'])) {\n\t $\".$this->moduleNameVar.\"_rs->\".$fielname.\" = \\$this->update\".$this->moduleName.ucfirst($fielname).\"($\".$this->moduleNameVar.\"['\".$fielname.\"']);\n\t }\n\t \";\n\t $update_functions .= \"\n protected function update\".ucfirst($this->moduleNameVar).ucfirst($fielname).\"($\".$fielname.\" = '') {\n return $\".$fielname.\";\n }\";\n\t }\n\t }\n\t \n\t $this->update_functions = $update_functions;\n\t $this->updateFromRequestFields = $insertValues;\n\t}", "title": "" }, { "docid": "3470a14168ab7eb93e074916c299fbaa", "score": "0.56788474", "text": "public function setAllFormValues(): void\n {\n foreach ($this->Form()->getFields() as $Field) {\n // Use the Model Field's value if it has the field\n if (isset($this->{$Field->getOriginalName()})) {\n $value = $this->{$Field->getOriginalName()};\n }\n // Use the Field's Default value if it has one\n elseif ($this->Form()->{$Field->getOriginalName()}->default_value != null) {\n $value = $this->Form()->{$Field->getOriginalName()}->default_value;\n }\n // Just use null\n else {\n $value = null;\n }\n\n // If the field has a CustomField object, then try to use it's hook for setting them value.\n if (is_object($Field->CustomField)) {\n try {\n $this->Form()->{$Field->getOriginalName()}->attributes->value = $Field->CustomField->hook_setAllFormValues($Field, $value);\n continue;\n } catch (NotImplementedException $e) {\n }\n }\n\n // If it's a checkbox or otherwise has multi_key set, assume we have a divided string that needs to be made into an array.\n if ($value !== null && ! is_array($value) && ($Field->attributes->type == 'checkbox' || $Field->attributes->multi_key)) {\n $value = explode($this->multi_delimiter, $value);\n }\n\n $this->Form()->{$Field->getOriginalName()}->attributes->value = $value;\n }\n }", "title": "" }, { "docid": "4e3c86deb26d7c18e88c034d48a36e73", "score": "0.5672246", "text": "protected function setFieldOriginalValue()\n {\n// static::doNotSnakeAttributes($this->model);\n\n $values = $this->model->toArray();\n\n $this->builder->fields()->each(function (Field $field) use ($values) {\n $field->setOriginal($values);\n });\n }", "title": "" }, { "docid": "eb57f5ec1c2eb0b67c030402469a14f8", "score": "0.5661422", "text": "protected function setFieldValue($id)\n {\n $relations = $this->getRelations();\n\n $this->model = $this->model->with($relations)->findOrFail($id);\n\n// static::doNotSnakeAttributes($this->model);\n\n $data = $this->model->toArray();\n\n $this->builder->fields()->each(function (Field $field) use ($data) {\n $field->fill($data);\n });\n }", "title": "" }, { "docid": "765ab6a30f94d7b549fc232f1029f8fe", "score": "0.5661058", "text": "public function setFields( array $fields = array() ) {\n $this->fields = $fields;\n return $this;\n }", "title": "" }, { "docid": "4c904152b97f975cb3ff8b868103fcb6", "score": "0.5660093", "text": "public function registerFields()\n {\n }", "title": "" }, { "docid": "3209c4bf8bba267303261fa0fa5f4f2a", "score": "0.56557727", "text": "private function setFields($fields = [])\n {\n foreach ($fields as $key => $input) {\n $name = array_key_exists('name', $input) ? $input['name'] : $key;\n $type = array_key_exists('type', $input) ? $input['type'] : Mystique::TEXT;\n $type_fallback = array_key_exists('type_fallback', $input) ? $input['type_fallback'] : false;\n\n $field = $input;\n if(array_key_exists('type', $field)) {\n unset($field['type']);\n }\n\n if(strpos($type, 'Inputfield') === false) {\n $type = 'Inputfield' . ucfirst($type);\n }\n if($type_fallback && strpos($type_fallback, 'Inputfield') === false) {\n $type_fallback = 'Inputfield' . ucfirst($type_fallback);\n }\n\n if($this->modules->isInstalled($type)) {\n $field['type'] = $type;\n } else if($this->modules->isInstalled($type_fallback)) {\n $field['type'] = $type_fallback;\n }\n\n if(array_key_exists('type', $field)) {\n\n if(array_key_exists('useLanguages', $field) && $field['useLanguages']) {\n $this->languageFields[] = $name;\n }\n\n if(!$type != Mystique::FIELDSET && !$type != Mystique::MARKUP) {\n $value = array_key_exists('value', $field) ? $field['value'] : '';\n if(!$value && array_key_exists('defaultValue', $field)) {\n $value = $field['defaultValue'];\n }\n $this->inputFields[$name] = $value;\n }\n\n if ($type == Mystique::CHECKBOX || $type == Mystique::TOGGLE_CHECKBOX) {\n $this->checkboxFields[] = $name;\n }\n\n if(array_key_exists('children', $field)) {\n $this->setFields($field['children']);\n }\n }\n }\n }", "title": "" }, { "docid": "54becb69813fa846f24dfc79eeb3b788", "score": "0.56555957", "text": "public function setFieldsData(array $fields, SimpleElement $contextElement = null)\n {\n $data = $this->dataMapping($fields);\n $this->_fill($data, $contextElement);\n\n return $this;\n }", "title": "" }, { "docid": "50e0ad95bb43f67023e71b646ab4d846", "score": "0.5650472", "text": "public function setFields(array $fields = [])\r\n {\r\n $this->fields = Transform::fields($fields);\r\n }", "title": "" }, { "docid": "bcd8072cf8d328b92e8d52a4ed72362f", "score": "0.5646364", "text": "public function setFields($fields)\n {\n $this->fields = $fields;\n\n return $this;\n }", "title": "" }, { "docid": "21b5ce9694650a3a791d149a4b07f227", "score": "0.5639279", "text": "protected function makeFillable()\n {\n foreach ($this->getFields() as $key => $field) {\n //Skip column\n if (! ($column = Fields::getColumnType($this, $key)) || ! $column->hasColumn()) {\n continue;\n }\n\n $this->fillable[] = $key;\n }\n\n //Add published_at property\n if ($this->publishable) {\n $this->fillable[] = 'published_at';\n }\n\n //If has relationship, then allow foreign key\n if ($this->getProperty('belongsToModel') != null) {\n $this->fillable = array_merge(array_values($this->getForeignColumn()), $this->fillable);\n }\n\n //If is moddel sluggable\n if ($this->sluggable != null) {\n $this->fillable[] = 'slug';\n }\n }", "title": "" }, { "docid": "b9f9e2cddd602b5e5fa2a77118aa6ade", "score": "0.5633433", "text": "protected function setNullAllAttributes()\n\t{\n\t\tforeach( $this->values as $field=>$value )\n\t\t{\n\t\t\tif( $value == \"real\" ) $this->$field = \"\" ;\n\t\t\telse if( $value == \"int\" ) $this->$field = \"\" ;\n\t\t\telse if( $value == \"date\" ) $this->$field = \"\" ;\n\t\t\telse if( $value == \"string\" ) $this->$field = null ;\n\t\t}\n\t}", "title": "" }, { "docid": "3b729562a8da5145709258a103efea82", "score": "0.5628495", "text": "public function init_fields() {\n\t\t// Override this function in your class and assign the array of sections to $this->fields.\n\t\t_e( 'Override init_fields() in your class.', '{plugin_jump_starter_textdomain}' );\n\t}", "title": "" }, { "docid": "f87d5a298df74aaf800c1c3621c29f07", "score": "0.5625319", "text": "private function setFields()\n\t{\n\t\t$this->fields = array(\n\t\t\t'download' => 'gfpd_download',\n\t\t);\n\t}", "title": "" }, { "docid": "f4022e4424db8922bfff3a2272661b05", "score": "0.5623203", "text": "abstract function fields();", "title": "" }, { "docid": "78397fdfddc08fde871116ee35a77bbc", "score": "0.5619372", "text": "public function withDataFields($fields)\n {\n $this->data = $fields;\n return $this;\n }", "title": "" }, { "docid": "84b58e51df569cbc1d9c530dde435332", "score": "0.5617674", "text": "protected function CreateFields() {\n $dbConnection = Bootstrap::Get ()->GetDbInstance ();\n\n $query = $dbConnection->prepare ( \"DESCRIBE {$this->_tableName}\" );\n try {\n if ($query->execute ()) {\n $tableFields = $query->fetchAll ( \\PDO::FETCH_COLUMN );\n foreach ( $tableFields as $key => $val ) {\n $this->_arFields [] = $val;\n }\n } else {\n var_dump ( $dbConnection->errorInfo () );\n }\n } catch ( \\Exception $e ) {\n echo $e->getMessage ();\n }\n }", "title": "" }, { "docid": "c4e49f924f6ca0b81521fda97a17a447", "score": "0.56170076", "text": "public function fill($model, $setPrimaryKey = true) {\r\n if($setPrimaryKey)\r\n $this->primaryKey = $model->id;\r\n $this->attributes = [\r\n 'title' => $model->header1,\r\n 'content' => $model->text,\r\n ];\r\n }", "title": "" } ]
8205b11e8e2f166fb470f6cdea8cc058
Set the receiver post code
[ { "docid": "5e1cbc337bf7f655d087a39c38b4fc4a", "score": "0.7474241", "text": "public function setReceiverPostCode($receiverPostCode) {\n $this->_receiverPostCode = $receiverPostCode;\n }", "title": "" } ]
[ { "docid": "ddd946e2328d84ff5195e9ea63f3c767", "score": "0.6958026", "text": "public function getReceiverPostCode() {\n return $this->_receiverPostCode;\n }", "title": "" }, { "docid": "79497f8559f6f1b9dacb53d7fc051370", "score": "0.6612787", "text": "public function setSenderPostCode($senderPostCode) {\n $this->_senderPostCode = $senderPostCode;\n }", "title": "" }, { "docid": "1872f084a4a360203af3d64b7f2db6ce", "score": "0.62392384", "text": "public function setPostCode($postCode)\n {\n $this->_postCode = $postCode;\n }", "title": "" }, { "docid": "85b133f9a9fb3f470f4b074e534e91e8", "score": "0.6169837", "text": "public function getSenderPostCode() {\n return $this->_senderPostCode;\n }", "title": "" }, { "docid": "97c6bbc0c32138694a29fe19000ba3f5", "score": "0.6043648", "text": "public function setPostCode($value)\n {\n return $this->set('PostCode', $value);\n }", "title": "" }, { "docid": "9ea0c0f1088efcf0fd01bd7c3c828444", "score": "0.6043592", "text": "public function getPostCode()\n {\n return $this->postCode;\n }", "title": "" }, { "docid": "9450bd6a435e9844a290386e2e06eb11", "score": "0.59943885", "text": "public function getPostCode()\n {\n return $this->_postCode;\n }", "title": "" }, { "docid": "aa225bc1bc64ad247c4c3aaf325ba358", "score": "0.5744148", "text": "public function set_post_frame($post_frame)\n {\n $this->post_frame = $post_frame;\n }", "title": "" }, { "docid": "b52c996d86a8f1b5dc4b0c9f1398b968", "score": "0.56845254", "text": "public function setPostcodes($postcodes)\n\t{\n\n\t\t$this->newPostcodes = array_unique(array_map(\"strtoupper\", array_filter($postcodes)));\n\t}", "title": "" }, { "docid": "1f9d92dc237f8fad82376f548a1b9c5b", "score": "0.56243175", "text": "function setCode($code);", "title": "" }, { "docid": "f94d42ac5890ef0f990baed0d4823c6c", "score": "0.55893064", "text": "public function setCode( $code );", "title": "" }, { "docid": "73282d10f2dfbf672a5243559b3c5ec8", "score": "0.5577011", "text": "function setCode($code) {\r\r\n\t\t$this->code = $code;\r\r\n\t}", "title": "" }, { "docid": "2dc19c02735872e80dcfbf92ff9bee4a", "score": "0.5544925", "text": "public function set_code($code)\n {\n }", "title": "" }, { "docid": "fb5fec0f2baaa9829d18662a8adf3c9d", "score": "0.55404806", "text": "public function route_set_message() {\n $input = json_decode($this->payload, TRUE);\n\n switch ($input['code']) {\n case 'help':\n $this->code_help();\n break;\n case 'say':\n $this->code_say();\n break;\n }\n\n // Let plugins change what we have done.\n $this->invoke_all('__cli/command/' . $input['code']);\n\n return;\n }", "title": "" }, { "docid": "8a6d8a8e348a7390a9354df3bf13cd51", "score": "0.5477619", "text": "function set_postcode( $postcode ) {\n\t\t$_SESSION['customer']['postcode'] = $postcode;\n\t}", "title": "" }, { "docid": "e4bde98f5b2fa8e0c772408d07441cdf", "score": "0.54737717", "text": "public function codePostAction()\r\n {\r\n try {\r\n $budgetData = $this->getRequest()->getPost();\r\n $budgetCode = $budgetData['budget_code'];\r\n $checkoutSession = Mage::getSingleton('checkout/session');\r\n $quote = $checkoutSession->getQuote();\r\n $quoteId = $quote->getId();\r\n $quote->setBudgetCode($budgetCode);\r\n $quote->save();\r\n $quoteModel = Mage::getModel('sales/quote');\r\n $quoteModel->setData($quote)\r\n ->setId($quoteId)\r\n ->save();\r\n $message = $this->__('Your Budget Code has been successfully added.');\r\n $checkoutSession->addSuccess($message);\r\n }\r\n catch(exception $e) {\r\n $message = $this->__('There is some problem in adding the Budget code please try again later.');\r\n $checkoutSession->addError($message);\r\n }\r\n \r\n $this->_redirect('checkout/cart');\r\n }", "title": "" }, { "docid": "47c66cfd477fde2c167b04ca0642df89", "score": "0.54472154", "text": "public function setCode($code);", "title": "" }, { "docid": "47c66cfd477fde2c167b04ca0642df89", "score": "0.54472154", "text": "public function setCode($code);", "title": "" }, { "docid": "47c66cfd477fde2c167b04ca0642df89", "score": "0.54472154", "text": "public function setCode($code);", "title": "" }, { "docid": "47c66cfd477fde2c167b04ca0642df89", "score": "0.54472154", "text": "public function setCode($code);", "title": "" }, { "docid": "ad7df27bb61d54ae57e3cb5fab236d34", "score": "0.54380685", "text": "function set_shipping_postcode( $postcode ) {\n\t\t$_SESSION['customer']['shipping_postcode'] = $postcode;\n\t}", "title": "" }, { "docid": "4309a4ba2762e70cf07df3b40327fb23", "score": "0.54337525", "text": "public function setCode( string $code ) {\n $this->_code = $code;\n }", "title": "" }, { "docid": "23e3dcc7751a2186ab88e1c2cd5bc978", "score": "0.5405276", "text": "function setPostScript($post_script) {\n $this->post_script = $post_script;\n }", "title": "" }, { "docid": "35546979f8d7668537dc8360dcfaaa02", "score": "0.54037106", "text": "public function onGenerateCode()\n {\n $post = post();\n $email = $post['email'];\n $randomString = IdeasShop::generateRandomString(10);\n $user = User::where('email', $email)->first();\n if (!empty($user)) {\n $code = $user->id.'!'.$randomString;//code = user_id + random string\n User::where('email', $email)->update(['reset_password_code'=>$randomString]);//save random string to db\n $mailData = [\n 'code' => $code,//send code to user\n 'url' => url('/forgot-password')\n ];\n $params = [\n 'email' => $email,\n 'name' => '',\n 'subject' => 'ideas.shop::lang.subject.forgot_password',\n 'data' => $mailData,\n 'template' => 'ideas.shop::mail.forgotPassword'\n ];\n IdeasShop::sendMail($params);\n return Redirect::to('/forgot-password');\n } else {\n return Redirect::to('/forgot-password-fail');\n }\n }", "title": "" }, { "docid": "fe9a098fe3d2844984a4b4bfa6233257", "score": "0.539569", "text": "public function set_code($code)\n\t{\n\t\t\t$this->code = $code;\n\t}", "title": "" }, { "docid": "6df08f2e7ff548ba3d7b552774cd293f", "score": "0.5380061", "text": "function process_post()\n{\n\tglobal $g_obj_lock;\n\t\n\tif ( isset( $_POST['Command'] ) && $g_obj_lock->page_lock( PageHandler::get_post_value( 'SerialId' ) ) )\n\t{\n\t\t$command = $_POST['Command'];\n\t \n\t\tswitch ( $command )\n\t\t{\n\t\t\tcase 'Cross Highlighted Plants':\n\t\t\t{\n\t\t\t\ton_cross_handler();\n\t\t\t}\t\n\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\tMessageHandler::add_message( MSG_ERROR, \"Unknown Command\" );\n\t\t\t}\n\t\t\t\n\t\t\tbreak;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "19262c37bc12b33e992977ac8bdd7cdb", "score": "0.5360615", "text": "abstract protected function postHandleCommandCode();", "title": "" }, { "docid": "0f64195e819fec10a81a201c929211f4", "score": "0.53151625", "text": "public function setCode($code){\n $this->code = $code;\n }", "title": "" }, { "docid": "15fc2d46d30c72d7b3fe9503303360e4", "score": "0.52976966", "text": "public function setPostcode(int $postcode = null)\n {\n $this->set('postcode', $postcode, 'formation');\n }", "title": "" }, { "docid": "d61a2fca77be2f29da26fe51d19df91b", "score": "0.5270406", "text": "function set_code($code)\r\n {\r\n $this->set_default_property(self :: PROPERTY_CODE, $code);\r\n }", "title": "" }, { "docid": "fa5a492e9b432a6143ffe34fc2125969", "score": "0.5262659", "text": "public function setCode( $value );", "title": "" }, { "docid": "f6671b0534cdb7e0afa7ef553fb2df89", "score": "0.52601534", "text": "public function setCode($code) {\n\t\t$this->code = $code;\n\t}", "title": "" }, { "docid": "a9de3b9231c910b3e448fffd700e5dca", "score": "0.52498484", "text": "protected function sendModifier($modifier_code, $is_down) {\n $variables = array(\n 'value' => $modifier_code,\n 'isdown' => $is_down,\n );\n $this->execute(\"POST\", \"/session/:sessionId/modifier\", $variables);\n }", "title": "" }, { "docid": "b18523bbaa0079535613ebbbc407e5c2", "score": "0.5244027", "text": "public function setCode($code) {\n\t\t$this->moufManager->setCode($this->getIdentifierName(), $code);\n\t}", "title": "" }, { "docid": "45a89fe8a6d6914aab44c59574071e82", "score": "0.5232008", "text": "public function get_valid_postcodes()\n {\n }", "title": "" }, { "docid": "4dd2e6bd675004bbdad52341605f3ad1", "score": "0.51759636", "text": "public function setCode(?string $code): static;", "title": "" }, { "docid": "23a4fe87b4145bc1f4ba6d4f6a0c3f58", "score": "0.5170519", "text": "public static function set_post_values($data) {\n\t\tself::$post_values = $data;\n\t}", "title": "" }, { "docid": "68554b77475dcd3e1b5e05e313bba5dc", "score": "0.516168", "text": "public function getHook() {\n return static::POST_CODE_UPDATE;\n }", "title": "" }, { "docid": "62f09411141e1763c8123eb90cd2a1fc", "score": "0.51595414", "text": "public function setCode($code)\n {\n $this->code = $code;\n }", "title": "" }, { "docid": "62f09411141e1763c8123eb90cd2a1fc", "score": "0.51595414", "text": "public function setCode($code)\n {\n $this->code = $code;\n }", "title": "" }, { "docid": "62f09411141e1763c8123eb90cd2a1fc", "score": "0.51595414", "text": "public function setCode($code)\n {\n $this->code = $code;\n }", "title": "" }, { "docid": "62f09411141e1763c8123eb90cd2a1fc", "score": "0.51595414", "text": "public function setCode($code)\n {\n $this->code = $code;\n }", "title": "" }, { "docid": "4e88f290183553bad26b114b3f8ab454", "score": "0.5146983", "text": "public function setCode($value);", "title": "" }, { "docid": "4f4eea56a3abd97eca5060f99876fb2f", "score": "0.513775", "text": "private function _setMessage($code, $message)\n {\n $this->_message[$code] = $message;\n }", "title": "" }, { "docid": "24abcb8d4f0ebfce68a30e5d3761e56d", "score": "0.5136947", "text": "public function changePostalCodeAction() {\n\n $result = array();\n $webservbt = array();\n $postcode = $this->getRequest()->getPost('mappostalcode');\n $shippingMethod = $this->getRequest()->getPost('shipping_method');\n\n $shippingMethodCode = explode(\"_\", $shippingMethod);\n $shippingMethodCode = $shippingMethodCode[0];\n\n if ($postcode) {\n $quote = Mage::getSingleton('checkout/session')->getQuote();\n $address = $quote->getShippingAddress();\n $address->setPostcode($postcode)\n ->save()\n ->setCollectShippingRates(true);\n\n $helper = Mage::helper('chronorelais/webservice');\n $webservbt = $helper->getPointsRelaisByCp($postcode);\n\n }\n if ($webservbt) {\n $this->loadLayout('checkout_onepage_shippingchronorelais');\n $result['goto_section'] = 'shipping-method';\n $result['update_section'] = array(\n 'name' => 'shipping-method-'.$shippingMethod,\n 'html' => $this->_getChronoRelaisHtml($shippingMethodCode)\n );\n $result['relaypoints'] = $webservbt;\n } else {\n $result['error'] = true;\n $result['message'] = $this->__('No point relay is associated with this postcode');\n }\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n }", "title": "" }, { "docid": "d2fae985db3d6ff57d2e13d09761083b", "score": "0.5131921", "text": "public function setCode($code) {\n $this->code = $code;\n }", "title": "" }, { "docid": "d2fae985db3d6ff57d2e13d09761083b", "score": "0.5131921", "text": "public function setCode($code) {\n $this->code = $code;\n }", "title": "" }, { "docid": "cb2dde48fcada9472b918c00297d4c0f", "score": "0.513027", "text": "public function setReasonCode($code);", "title": "" }, { "docid": "8d775c1f4d7f0ead92b08de91fd95004", "score": "0.5124322", "text": "public function set_post_data($data = array())\n {\n }", "title": "" }, { "docid": "0ae7b5f91248c14261ffa66c7326d12e", "score": "0.51152825", "text": "public function setArguments_POST ()\n\t{\n\t\t$this->args\t= $_POST;\n\t}", "title": "" }, { "docid": "dec6507512da847f41f5ae5f3245f523", "score": "0.5108232", "text": "function process_post()\n{\n\tglobal $g_obj_lock;\n\t\n\tif ( isset( $_POST['Command'] ) && $g_obj_lock->page_lock( PageHandler::get_post_value( 'SerialId' ) ) )\n\t{\n\t\t$str_command = $_POST['Command'];\n\t\t\n\t\tswitch ( $str_command )\n\t\t{\n\t\t\tcase 'Create New Problem':\n\t\t\t{\n\t\t\t\ton_create_handler();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'Copy':\n\t\t\t{\n\t\t\t\ton_copy_handler();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\tMessageHandler::add_message( MSG_ERROR, \"Unknown Command\" );\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "671a24d40c9207309b956e505015c98b", "score": "0.50934595", "text": "public function ponumberPostAction()\r\n {\r\n try {\r\n $poData = $this->getRequest()->getPost();\r\n $poCode = $poData['po_number'];\r\n $checkoutSession = Mage::getSingleton('checkout/session');\r\n $quote = $checkoutSession->getQuote();\r\n $quoteId = $quote->getId();\r\n $quote->setPoNumber($poCode);\r\n $quote->save();\r\n $quoteModel = Mage::getModel('sales/quote');\r\n $quoteModel->setData($quote)\r\n ->setId($quoteId)\r\n ->save();\r\n $message = $this->__('PO Number is successfully saved');\r\n $checkoutSession->addSuccess($message);\r\n }\r\n catch(exception $e) {\r\n $message = $this->__('Po Number is not saved.');\r\n $checkoutSession->addError($message);\r\n }\r\n \r\n $this->_redirect('checkout/cart');\r\n }", "title": "" }, { "docid": "8f69cbb70e522f1a18f26ab5270f97ed", "score": "0.50853425", "text": "public function setPostCode($postCode)\n {\n $this->postCode = $postCode;\n\n return $this;\n }", "title": "" }, { "docid": "1daa33e6d804ceafd63a871cf467f396", "score": "0.5082602", "text": "public function setup_post( $post = null ) {\n\t\t$this->event = $this->get_post_event_data( $post );\n\t}", "title": "" }, { "docid": "76b5ec0dc132fdf8f9a905b0931007bd", "score": "0.5072383", "text": "private function _add_code_to_uri()\n {\n $this->code = config('easypay.code') ? config('easypay.code') : false;\n\n $this->_add_uri_param('s_code', $this->code);\n }", "title": "" }, { "docid": "d2de9ce8691317d3f6a3b0638f90cbb7", "score": "0.5053953", "text": "public function validatePromocodePost(){\n\t\t$promocode = request::unsignedPost('messagePromoCode');\n\t\t$productid = request::unsignedPost('param1');\n\t\techo json_encode(promoHelper::isValidCode($promocode,$productid));\n\t}", "title": "" }, { "docid": "8295cd7acafcbfa1efb7b9ec0308260f", "score": "0.504757", "text": "function setPostalCode($postal_code)\n\t{\n\t\t$this->_modified = true;\n\t\t$this->postal_code = $postal_code;\n\t}", "title": "" }, { "docid": "aeb6c05e106516d28533c01c9e843de0", "score": "0.50218064", "text": "public function setDeliveryPostcode($deliveryPostcode)\n {\n return $this->setData(self::DELIVERY_POSTCODE, $deliveryPostcode);\n }", "title": "" }, { "docid": "bc88ff7df56fe1845f6e794bd8c379e3", "score": "0.5007468", "text": "public function canBeRedeemed($code);", "title": "" }, { "docid": "8340a7894c1b3b950fb30aa5bbc13d25", "score": "0.50009215", "text": "protected function setResponseCode()\n {\n http_response_code($this->statusCode);\n }", "title": "" }, { "docid": "bef7d9b33df6cedf6b9aac79bc3fff5d", "score": "0.49969518", "text": "public static function register_post_status()\n {\n }", "title": "" }, { "docid": "bae6650032b06d8d0b022db5e8bce8d5", "score": "0.49837247", "text": "public function usePostcode()\n {\n return Mage::getStoreConfigFlag(self::XML_PATH_USE_POSTCODE);\n }", "title": "" }, { "docid": "745b43d5c5ba0a5ae26b3b70df18087b", "score": "0.49799648", "text": "public function setPostcode($postcode) {\n\t\t$this->postcode = $postcode;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "8dcf32be94e44235b7144d8bbb6acb80", "score": "0.49714342", "text": "protected function setMethodPost()\n {\n $this->method = \"post\";\n }", "title": "" }, { "docid": "1d3259354307207063a5c809905a0971", "score": "0.49617818", "text": "public function setCodePostale($codePostale)\n {\n $this->codePostale = $codePostale;\n\n return $this;\n }", "title": "" }, { "docid": "913693a43f9198ae703d4de81145d041", "score": "0.49612615", "text": "public function setCode($code)\n\t{\n\t\t// Make sure the code is not empty and is an integer.\n\t\tif (empty($code) || !is_int($code))\n\t\t{\n\t\t\techo \"ERROR: Code must be an integer and not empty.\\n\";\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure the length of code is no greater than CODE_LENGTH.\n\t\tif ($this->getLength($code) != self::CODE_LENGTH)\n\t\t{\n\t\t\techo \"ERROR: Code length must be 6 digit long.\\n\";\n\t\t\treturn;\n\t\t}\n\n\t\t$this->code = $code;\n\t}", "title": "" }, { "docid": "e7ad163b50163d19ea61ed43bf9e4ddb", "score": "0.49603146", "text": "public function post()\n\t{\n\t\t\n\t\t$this->plugin->setResponse( \"this is post data\" );\n\t}", "title": "" }, { "docid": "0204857c42e4cf9d3b5858c1937ade3e", "score": "0.4958478", "text": "function sendVotingCode()\n\t\t{//_9_5_1_5e60209_1149418011859_453831_1378\n\t\t\t$sms = new SMS();\n\t\t\t$codesms = \"Uw stemcode, bestaande uit 8 cijfers en letters, is \".$this->votingCode.\". Powered by hetnieuwestemmen.nl: One Mobile, One Vote\";\n\t\t\tVoter::dump(\"+ Message: $codesms\");\n\t\t\treturn $sms->sendMessage($this->phonenumber->Format(),$codesms);\n\t\t}", "title": "" }, { "docid": "8c7b87b5d09faf9df43d56b3b66b7fab", "score": "0.49553442", "text": "public function testSetCode()\n {\n $code = Phergie_Event_Response::ERR_NOSUCHNICK;\n $this->event->setCode($code);\n $this->assertSame($code, $this->event->getCode());\n }", "title": "" }, { "docid": "36e71dd32addd1284cf256dfb15e354a", "score": "0.49539986", "text": "public function setDialCode($value);", "title": "" }, { "docid": "3824cc5024f100e153f89226dd545578", "score": "0.4949636", "text": "public function setTraderPostcode($traderPostcode)\n {\n $this->traderPostcode = $traderPostcode;\n return $this;\n }", "title": "" }, { "docid": "351a891ffb33065f23c2fce08e01f21b", "score": "0.49479842", "text": "public function setCode(int $code)\n\t{\n\t\t$this->code = $code;\n\t}", "title": "" }, { "docid": "b9e39d42c5decac9e8262d8ffe2a09ee", "score": "0.49461457", "text": "protected function set_status($code)\n {\n }", "title": "" }, { "docid": "459b9abb7a3a1df8ff5bd23b49dcf09b", "score": "0.49440923", "text": "public function trackCustom($code);", "title": "" }, { "docid": "ab0352bf71bb7c992590ad3c9f2e1d93", "score": "0.49382222", "text": "private function setPayorType(){\n\t\t$this->_payorType = $this->_settings['storeOwnerPays'] ? \"RECIPIENT\" : \"SENDER\";\n\t}", "title": "" }, { "docid": "c4209f91ff28cb416d9c8818122c5251", "score": "0.4937212", "text": "public function setResponseCode($response_code){\n $this->response_code = $response_code;\n }", "title": "" }, { "docid": "b9717ca8576a0b412542242f60845fe0", "score": "0.49369174", "text": "public function setCode($code)\n\t{\n $this->_aCodeFragments[] = $code;\n\t}", "title": "" }, { "docid": "aac734b9833243c6cadd383b2a0a88dd", "score": "0.49368197", "text": "function SetCode($code, $dbupdate = true)\r\n\t{\r\n\t\treturn $this->UpdateValue ( 'code', $code, $dbupdate );\r\n\t}", "title": "" }, { "docid": "c44bc761759c4bd3ca054e925a7a4701", "score": "0.49292624", "text": "public function set_status($code)\n {\n }", "title": "" }, { "docid": "c44bc761759c4bd3ca054e925a7a4701", "score": "0.49288556", "text": "public function set_status($code)\n {\n }", "title": "" }, { "docid": "79de8029ff9abb731b10e1b2bdc987e9", "score": "0.49248114", "text": "public static function set_post_status_on_rejection() {\n\t\t// Bail if post isn't being updated.\n\t\tif ( empty( $_POST ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Bail if not editing a post.\n\t\tif ( empty( $_POST['action'] ) || 'editpost' !== $_POST['action'] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$nonce_field = 'photo-rejection-nonce';\n\n\t\t// Bail if expected data isn't present.\n\t\tif ( empty( $_POST[ self::$action ] ) || empty( $_POST[ $nonce_field ] ) || empty( $_POST['post_type'] ) || empty( $_POST['post_ID'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Bail if post is not a photo post.\n\t\tif ( Registrations::get_post_type() !== $_POST['post_type'] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Bail if nonce check fails.\n\t\tif ( ! wp_verify_nonce( $_POST[ $nonce_field ], 'photo-rejection-post-save-' . (int) $_POST['post_ID'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Bail if current user can't reject photo posts.\n\t\tif ( ! self::current_user_can_delete_photos() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Change post status.\n\t\t$_POST['post_status'] = self::get_post_status();\n\t}", "title": "" }, { "docid": "6f98d82514e3346b24888bf163fdad48", "score": "0.49219647", "text": "public function post_feed(){ //pr($_POST);die;\n\t\t$this->layout = '';\n\t\t\n\t\t$fieldNameArr = explode('_', $_POST['post_type']);\n\t\t$fieldName = end($fieldNameArr);\n\n\t\t$saveData['business_id'] = $_POST['business_id'];\n\t\t$saveData['status'] = '1';\n\n\t\tif($fieldName == 'message')\n\t\t\t$saveData['message'] = trim($_POST['post_content']);\n\t\telse\n\t\t\t$saveData[$fieldName] = $_POST['post_content'];\n\t\t\n\n\t\tif($this->BusinessFeed->save($saveData)){\n\t\t\techo 'saved';\n\t\t}else{\n\t\t\techo '<font color=\"red\">Please Try Later!!</font>';\n\t\t}\n\t\texit;\n\t}", "title": "" }, { "docid": "21f4ac2fe4c52a699b435709fd9a1cd5", "score": "0.49133995", "text": "public function changePin() { \r\n if (count($this->postData) > 0) {\r\n $pin = $this->postData['new_pin'];\r\n $confirmPin = $this->postData['confirm_pin'];\r\n $oldPin = $this->postData['old_pin'];\r\n //Check equality\r\n if ($pin !== $confirmPin) {\r\n $this->_displayBadRequest(array(\"code\" => 163));\r\n }\r\n //Check valid pin\r\n if (!preg_match(\"/^[0-9]*$/\", $pin) || !preg_match(\"/^[0-9]*$/\", $confirmPin)) {\r\n $this->_displayBadRequest(array(\"code\" => 161));\r\n } \r\n //Check length\r\n if (strlen($pin) < 4 || strlen($pin) > 6) {\r\n $this->_displayBadRequest(array(\"code\" => 162));\r\n }\r\n// Check old pin\r\n if (sha1($oldPin)!== $this->user->pin) {\r\n $this->_displayBadRequest(array(\"code\" => 164));\r\n }\r\n\r\n $userData = array(\r\n 'pin' => sha1($pin),\r\n 'twofa_status' => '1',\r\n 'twofa_type'=> 'pin'\r\n );\r\n\r\n if ($userId = $this->rest_user_model->update($this->userId,$userData))\r\n $this->event_model->add($userId,'setpin'); // Log pin set event\r\n else {\r\n header('Content-Type: application/json');\r\n header(\"HTTP/1.1 500 Internal Server Error\");\r\n }\r\n $this->_displaySuccess(array(\"code\" => 170));\r\n }\r\n }", "title": "" }, { "docid": "d07c71e5b082cfea09dd634c99e3dea2", "score": "0.49102846", "text": "private function set_post_id() {\n\t\tif ( ! isset( $_GET['post'] ) ) {\n\t\t\treturn null;\n\t\t}\n\t\t$this->post_id = $_GET['post'];\n\t}", "title": "" }, { "docid": "1cbab17d4ffc687c47f2d6cd3890e36b", "score": "0.4889222", "text": "public function getWithCode($body)\n {\n\n $body[\"code\"] = mt_rand(350000, 999999);\n\n //save the details\n $this->codes->create($body);\n\n //send code to the user\n $this->mail->sendWithCode($body);\n }", "title": "" }, { "docid": "729ec5ecf1127c66d691e7165877e356", "score": "0.4886603", "text": "public function setPostcode($string)\n {\n $this->_postcode = new TechDivision_Lang_String($string);\n }", "title": "" }, { "docid": "17e6507dec59870de221a6412f478f42", "score": "0.4884502", "text": "public function post_it() { $this->method = \"POST\" ;}", "title": "" }, { "docid": "8b96a6a041985b829e9e680407b6b5d7", "score": "0.48804036", "text": "function service_code_meta_box_save( $post_id ) {\r\n\r\n\tglobal $post;\r\n\r\n\t if(!is_admin()) return;\r\n\r\n\t// verify nonce\r\n\tif ( !isset( $_POST['vat_moss_saf_meta_box_nonce'] ) || ! wp_verify_nonce( $_POST['vat_moss_saf_meta_box_nonce'], basename( __FILE__ ) ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t$post_types = vat_moss_saf()->integrations->get_post_types();\r\n\r\n\tif ( !isset( $_POST['post_type'] ) || !in_array($_POST['post_type'], $post_types ) ) {\r\n\t\treturn $post_id;\r\n\t}\r\n\r\n\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\r\n\t\treturn $post_id;\r\n\t}\r\n\r\n\tif ( !isset( $_POST['vat_moss_saf_service_code'] ) ) \r\n\t\treturn $post_id;\r\n\r\n\tupdate_post_meta( $post_id, '_moss_saf_service_code', $_POST['vat_moss_saf_service_code'] );\r\n}", "title": "" }, { "docid": "84904095bcf20b36bc95f7de5498b449", "score": "0.48679602", "text": "public function build_notification( $post ) {\n $code = trim( $post->post_content );\n $code = str_ireplace( '&amp;', '&', $post->post_content );\n $code = strip_tags( $code );\n\n // Convert string to variables\n parse_str( $code ,$result);\n // version 1.3.6\n\n $type = isset($result['type']) ? $result['type']:'';\n $sender = isset($result['sender']) ? $result['sender']:'';\n $mjob_id = isset($result['mjob_id']) ? $result['mjob_id']:'';\n $post_id = isset($result['post_id']) ? $result['post_id']:'';\n $winner_id = isset($result['winner_id']) ? $result['winner_id']:''; \n $post_parent = isset($result['post_parent']) ? $result['post_parent']:'';\n $mjob_order_id = isset($result['mjob_order_id']) ? $result['mjob_order_id']:'';\n $amount = isset($result['amount']) ? $result['amount']:'';\n $review_id = isset($result['review_id']) ? $result['review_id']:'';\n $score = isset($result['score']) ? $result['score']:'';\n \n\n switch ( $type ) {\n case 'activated_user':\n $post->noti_content = __( 'Hooray! Your account has been activated. Now you can offer your stuff, buy things you need. Fast and easy!', 'enginethemes' );\n break;\n case 'approve_withdrawal':\n $post->noti_content = __( '<strong>Admin</strong> <span class=\"action-text\">approved</span> your withdrawal request.', 'enginethemes' );\n $post->noti_link = et_get_page_link( 'revenues' ) . '#withdraw-history';\n break;\n case 'decline_withdrawal':\n $post->noti_content = __( '<strong>Admin</strong> <span class=\"action-text\">rejected</span> your withdrawal request.', 'enginethemes' );\n $post->noti_link = et_get_page_link( 'revenues' ) . '#withdraw-history';\n break;\n case 'checkout_mjob_by_credit':\n $amount = mje_format_price( $amount );\n $post->noti_link = et_get_page_link( 'revenues' );\n $post->noti_content = sprintf( __( 'You\\'ve <span class=\"action-text\">spent</span> %s credit(s) on a mJob order. ', 'enginethemes' ), $amount );\n break;\n case 'new_mjob_order':\n $post = $this->build_sender_info( $sender, $post );\n $post->noti_link = get_the_permalink( $post_id );\n $mjob = '<strong>' . get_the_title( $post_parent ) . '</strong>';\n $post->noti_content = sprintf( __( '%s <span class=\"action-text\">ordered</span> your mJob %s.', 'enginethemes' ), $post->noti_sender, $mjob );\n break;\n case 'review_mjob_order':\n $post = $this->build_sender_info( $sender, $post );\n $post->noti_link = get_the_permalink( $mjob_id ) . '#review-' . $review_id;\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $rating = '<span class=\"rate-it star\" data-score=\"' . $score . '\"></span>';\n $post->noti_content = sprintf( __( '%s <span class=\"action-text\">accepted</span> and put %s for your delivery of mJob %s.', 'enginethemes' ), $post->noti_sender, $rating, $mjob );\n break;\n case 'finish_mjob_order':\n $post = $this->build_sender_info( $sender, $post );\n $post->noti_link = get_the_permalink( $mjob_order_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( '%s <span class=\"action-text\">accepted</span> your delivery for mJob %s', 'enginethemes' ), $post->noti_sender, $mjob );\n break;\n case 'buyer_dispute_mjob_order':\n $post = $this->build_sender_info( $sender, $post );\n $post->noti_link = get_permalink( $mjob_order_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( '%s <span class=\"action-text action-text-dispute\">disputed</span> your task for mJob %s', 'enginethemes' ), $post->noti_sender, $mjob );\n break;\n case 'seller_dispute_mjob_order':\n $post = $this->build_sender_info( $sender, $post );\n $post->noti_link = get_permalink( $mjob_order_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( '%s <span class=\"action-text action-text-dispute\">disputed</span> your order for mJob %s', 'enginethemes' ), $post->noti_sender, $mjob );\n break;\n case 'resolve_mjob_order':\n global $user_ID;\n $mjob_order = mje_mjob_order_action()->get_mjob_order( $mjob_order_id );\n $post = $this->build_sender_info( $winner_id, $post );\n $post->noti_icon = '<i class=\"fa fa-info\"></i>';\n $post->noti_link = $mjob_order->permalink;\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n\n if( $winner_id == $user_ID ) {\n $winner_is = __( 'You are the winner.', 'enginethemes' );\n } else {\n $winner_is = sprintf( __( 'The winner is %s.', 'enginethemes' ), $post->noti_sender );\n }\n\n if( $mjob_order->seller_id == $user_ID ) {\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">resolved</span> your disputed task for mJob %s. %s', 'enginethemes' ), $mjob, $winner_is );\n } else {\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">resolved</span> your order for mJob %s. %s', 'enginethemes' ), $mjob, $winner_is );\n }\n break;\n case 'start_mjob_order':\n $post = $this->build_sender_info( $sender, $post );\n $post->noti_link = get_the_permalink( $mjob_order_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( '%s has <span class=\"action-text\">started</span> to work on your order for mJob %s.', 'enginethemes' ), $post->noti_sender, $mjob );\n break;\n case 'delay_mjob_order':\n $post = $this->build_sender_info( $sender, $post );\n $post->noti_link = get_the_permalink( $mjob_order_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( '%s <span class=\"action-text\">delayed</span> your order for mJob %s.', 'enginethemes' ), $post->noti_sender, $mjob );\n break;\n case 'deliver_mjob_order':\n $post = $this->build_sender_info( $sender, $post );\n $post->noti_link = get_the_permalink( $mjob_order_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( '%s <span class=\"action-text\">delivered</span> your order for mJob %s. Only one step to close the order, view your delivery and write a review for the seller.', 'enginethemes' ), $post->noti_sender, $mjob );\n break;\n case 'admin_delete_mjob_order':\n global $user_ID;\n $mjob_order = mje_mjob_order_action()->get_mjob_order( $mjob_order_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">deleted</span> your order for mJob %s. Please contact admin for further details.', 'enginethemes' ), $mjob );\n if( $mjob_order->seller_id == $user_ID ) {\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">deleted</span> your task for mJob %s. Please contact admin for further details.', 'enginethemes' ), $mjob );\n }\n break;\n case 'admin_restore_mjob_order':\n global $user_ID;\n $mjob_order = mje_mjob_order_action()->get_mjob_order( $mjob_order_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_link = $mjob_order->permalink;\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">restored</span> your deleted order for mJob %s.', 'enginethemes'), $mjob );\n if( $mjob_order->seller_id == $user_ID ) {\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">restored</span> your deleted task for mJob %s.', 'enginethemes'), $mjob );\n }\n break;\n case 'admin_pause_mjob':\n $post->noti_link = get_the_permalink( $mjob_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">paused</span> your mJob %s', 'enginethemes'), $mjob );\n break;\n case 'admin_archive_mjob':\n $post->noti_link = get_the_permalink( $mjob_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">archived</span> your mJob %s', 'enginethemes'), $mjob );\n break;\n case 'admin_approve_mjob':\n $post->noti_link = get_the_permalink( $mjob_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">approved</span> your mJob %s', 'enginethemes'), $mjob );\n break;\n case 'admin_reject_mjob':\n $post->noti_link = get_the_permalink( $mjob_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">rejected</span> your mJob %s', 'enginethemes'), $mjob );\n break;\n case 'admin_edit_mjob':\n $post->noti_link = get_the_permalink( $mjob_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">edited</span> your mJob %s', 'enginethemes'), $mjob );\n break;\n case 'admin_delete_mjob':\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">deleted</span> your mJob %s. Please contact admin for further details.', 'enginethemes' ), $mjob );\n break;\n case 'admin_restore_mjob':\n $post->noti_link = get_the_permalink( $mjob_id );\n $mjob = '<strong>' . get_the_title( $mjob_id ) . '</strong>';\n $post->noti_content = sprintf( __( 'Admin <span class=\"action-text\">restored</span> your deleted mJob %s.', 'enginethemes' ), $mjob );\n break;\n default:\n $post->noti_content = \"\";\n\t\t\t /**\n\t\t\t\t * Add action in case other type notification\n\t\t\t\t *\n\t\t\t\t * @since 1.3.1\n\t\t\t\t * @author Tan Hoai\n\t\t\t\t */\n\n\t\t\t\tdo_action('mje_other_type_notification', $post);\n }\n\n /**\n * Filter for notification content.\n * hook into this filter to add another notification type\n *\n * @param object $post\n * @since 1.3\n * @author Tat Thien\n */\n return apply_filters( 'mje_build_notification', $post );\n }", "title": "" }, { "docid": "23290b98aad1248123b57b985785e097", "score": "0.48583102", "text": "public function post_type_update_callback(){\n\n }", "title": "" }, { "docid": "6c86e827e967b7ad6222e1bc120311ea", "score": "0.48565066", "text": "function coupon_code_save_postdata($post_id)\n{\n // verify if this is an auto save routine.\n // If it is our form has not been submitted, so we dont want to do anything\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)\n return;\n\n // verify this came from the our screen and with proper authorization,\n // because save_post can be triggered at other times\n if (!wp_verify_nonce($_POST['coupon_code_noncename'], plugin_basename(__FILE__)))\n return;\n\n\n if (!current_user_can('edit_post', $post_id))\n return;\n\n // OK, we're authenticated: we need to find and save the data\n\n //if saving in a custom table, get post_ID\n $post_ID = $_POST['post_ID'];\n //sanitize user input\n $code = sanitize_text_field($_POST['coupon_code_code']);\n $link = sanitize_text_field($_POST['coupon_code_link']);\n\n // Do something with $mydata\n // either using\n update_post_meta($post_ID, '_coupon_code_code', $code);\n update_post_meta($post_ID, '_coupon_code_link', $link);\n // or a custom table (see Further Reading section below)\n}", "title": "" }, { "docid": "b616571bd4cbad536c1b773d7d9cd277", "score": "0.48553237", "text": "protected function setMessageType()\n {\n }", "title": "" }, { "docid": "b0f7ca53fc0ca8f5cb9423aa754ea37d", "score": "0.48516884", "text": "function setResponseCode($value) {\n $this->responseCode = $value;\n }", "title": "" }, { "docid": "bc3f6ea9799d7f307b95b0d39125824b", "score": "0.4841323", "text": "private function on_post () {\n if (!method_exists ($this, 'post_prepare')) $this ->respond (501, 'post_prepare not found!');\n if (!method_exists ($this, 'post_respond')) $this ->respond (501, 'post_respond not found!');\n\n // Collect the JSON-encoded POST data\n $input = (array) json_decode (file_get_contents ('php://input'), TRUE);\n\n // Make sure we have an SQL statement associated to this `create` request\n // if (!array_key_exists ('create', $this ->map)) $this ->respond (405);\n // if (strlen (trim ($this ->map['create'])) == 0) $this ->respond (405);\n\n // Construct the actual SQL statement that we will be submitting\n $sql = $this -> post_prepare ($this ->map['create'], $input);\n\n // Enact the query and collect its response\n $set = $this ->db ->query ($sql);\n $out = $set ->fetch_row();\n\nerror_log (json_encode(['app' => 'SAMmobile', 'api' => 'QRBill.POST', 'sql' => $sql, 'set' => $set, 'output' => $out ], true));\n\n // We're done... respond to caller\n $this ->db ->close();\n $this ->respond (200, 'QRBill created successfully', null, $out);\n\n }", "title": "" }, { "docid": "4eb0caec0b027fdb6242bbf7eade821d", "score": "0.48407155", "text": "private function registerAfterSubmit($strCode){\n\t\t\n\t\t$this->setOption($this->_defaultPlugin, array($strCode => array('afterSubmit'=>$this->_afterSubmitCode)));\n\t}", "title": "" }, { "docid": "85eb79080ed86ee4565f725296abb96c", "score": "0.48380712", "text": "function setResponseCode($code, $reason = null, $echo = null)\n{\n $code = intval($code);\n\n if (version_compare(phpversion(), '5.4', '>') && is_null($reason)) {\n http_response_code($code);\n } else {\n header(trim(\"HTTP/1.0 $code $reason\"));\n }\n\n if ($echo != null) {\n echo $echo;\n } else if ($reason != null) {\n echo $reason;\n }\n}", "title": "" }, { "docid": "85eb79080ed86ee4565f725296abb96c", "score": "0.48380712", "text": "function setResponseCode($code, $reason = null, $echo = null)\n{\n $code = intval($code);\n\n if (version_compare(phpversion(), '5.4', '>') && is_null($reason)) {\n http_response_code($code);\n } else {\n header(trim(\"HTTP/1.0 $code $reason\"));\n }\n\n if ($echo != null) {\n echo $echo;\n } else if ($reason != null) {\n echo $reason;\n }\n}", "title": "" }, { "docid": "92699224f6e437b6f7846f47148ec8a0", "score": "0.4833403", "text": "public static function send_code_way()\n\t{\n\t\t$way = self::send_way();\n\n\t\t$host = Protocol.\"://\" . \\lib\\router::get_domain();\n\t\t$host .= \\lib\\define::get_current_language_string();\n\n\t\tif($way)\n\t\t{\n\t\t\t// open next step to route it\n\t\t\t$host .= '/enter/verify/'. $way;\n\t\t\tself::next_step('verify/'. $way);\n\t\t\tself::open_lock('verify/resend');\n\t\t\tself::set_enter_session('send_code_at_time', time());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$host .= '/enter/verify/what';\n\t\t\t// open next step to route it\n\t\t\tself::next_step('verify/what');\n\t\t}\n\n\t\tself::go_redirect($host);\n\t}", "title": "" }, { "docid": "6005266452e856ee707815da4d0b073b", "score": "0.4826397", "text": "protected function setPost($post)\n\t{\n\t\tif (!$post instanceof ParametersInterface) {\n\t\t\t$post = new Parameters($post);\n\t\t}\n\t\t$this->getRequest()->setPost($post);\n\t\t//$this->getRequest()->setMethod(Request::METHOD_POST);\n\t}", "title": "" }, { "docid": "19055c2aa2f41b9700e4439760d10544", "score": "0.48049518", "text": "public function codeAction ()\n {}", "title": "" } ]
f4a425051cfda535b5dc219e92ef169f
prepare the database query
[ { "docid": "efb42c2fbeb7a69dd0c2924ae6c4cdd6", "score": "0.0", "text": "public function experience_results($user_id)\n\t\t\t{\n\t\t\t\t$sql = 'SELECT * FROM w_experience WHERE user_id = ?';\n\t\t\t\n\t\t\t\t$query = $this->db->query($sql, array($user_id));\n\t\t\t\tif($query)\n\t\t\t\t{\n\t\t\t\t\treturn $query;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "title": "" } ]
[ { "docid": "c0542426d8c783b9f80e1a2beec285ca", "score": "0.7769768", "text": "public function prepare()\n\t{\n\t\t$tmp1=\"\";\n\t\t$tmp3=\"\";\n\t\t$this->logger->info(\"Calling prepare function in Query\");\n\t\t$this->logger->debug(\"Your table is set to :\".$this->data[\"table\"]);\n\t\tif(isset($this->data[\"table\"]))\n\t\t{\n\t\t\tforeach($this->data as $key=>$val)\n\t\t\t{\n\t\t\t\t if(substr($key,0,5) == \"field\"){\n \t$dbfl=explode(\" \", $val);\n \t\n\t\t if(count($dbfl)==1)\n\t\t \t$tmp1.=\"`\".$val.\"`,\";\n\t\t else \n\t\t \t$tmp1.=\"`\".$dbfl[0].\"` `\".$dbfl[1].\"`,\";\n }\n\t\t\t}\n\n\t\t\tif(isset($tmp1))\n\t\t\t\t$tmp1=substr($tmp1,0,-1);\n\n\t\t\tif(isset($this->data[\"filter\"]))\n\t\t\t{\n\t\t\t\tforeach($this->data[\"filter\"] as $key=>$val)\n\t\t\t\t{\n\t\t\t\t\t$tmp3.=\"`\".$key.\"`='\".$val.\"' and \";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$tmp3=substr($tmp3,0,-4);\n\t\t\tif($this->data[\"filter\"]!=null)\n\t\t\t\t$this->sql=\"SELECT \".$tmp1.\" FROM `\".$this->data[\"table\"].\"` WHERE \".$tmp3;\n\t\t\telse\n\t\t\t\t$this->sql=\"SELECT \".$tmp1.\" FROM `\".$this->data[\"table\"].\"`\";\n\n\t\t\tif(isset($this->data[\"order\"]))\n\t\t\t{\n\t\t\t\t$this->sql=$this->sql.\" order by \".$this->data[\"order\"];\n\t\t\t}\n\n\t\t\tif(isset($this->data[\"group\"]))\n\t\t\t{\n\t\t\t\t$this->sql=$this->sql.\" group by \".$this->data[\"group\"];\n\t\t\t}\n\n\t\t\tif(isset($this->data[\"start\"]))\n\t\t\t{\n\t\t\t\t$this->sql=$this->sql.\" limit \".$this->data[\"start\"].\",\".$this->data[\"limit\"];\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(isset($this->data[\"limit\"]))\n\t\t\t\t{\n\t\t\t\t\t$this->sql=$this->sql.\" limit \".$this->data[\"limit\"];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->logger->info(\"End of Calling prepare function in Query\");\n\t}", "title": "" }, { "docid": "22534b748a9d6bf5480ae237af5c8224", "score": "0.75889176", "text": "public abstract function prepareQuery($query);", "title": "" }, { "docid": "b2190b010bb6b796d23274a3dde668f8", "score": "0.7430037", "text": "protected function prepareSelectStatement() {}", "title": "" }, { "docid": "f283fe33e3b424c4e34e7cbdeb3eea51", "score": "0.73642325", "text": "public function prepare( $query );", "title": "" }, { "docid": "9be16194ed5f65dcb4ece1dd118eeef0", "score": "0.73190963", "text": "private function stmtPrepare(){\n\t\t$this->stmt = $this->dbConn->prepare($this->query);\n\t}", "title": "" }, { "docid": "a1491c1ad36e0443ba3d1cabc86c8c70", "score": "0.7292354", "text": "public function prepare ($query) {}", "title": "" }, { "docid": "c56bdc476a2d749e89bb3602100be86d", "score": "0.7285363", "text": "abstract public function preparedForDb();", "title": "" }, { "docid": "64e2836bd08d97d3e7e11e6259973c35", "score": "0.7236376", "text": "protected function prepareQuery()\n {\n $query = $this->obj->newQuery();\n\n return $this->fillQueryWithGroupConditions($query);\n }", "title": "" }, { "docid": "23979ceddd744b3b4e927a0b8eee6ee8", "score": "0.7090133", "text": "public function prepare();", "title": "" }, { "docid": "23979ceddd744b3b4e927a0b8eee6ee8", "score": "0.7090133", "text": "public function prepare();", "title": "" }, { "docid": "97297afcba92c9e2d6f0f96dffc4169b", "score": "0.70899385", "text": "protected function prepare_query() \n\t{\n\t\t$this->query->where( $this->foreign_key, $this->local_model->{$this->local_key} )\n\t\t\t->limit( 1 );\n\t}", "title": "" }, { "docid": "2416780e4e47d03b642c83b5217acd03", "score": "0.705061", "text": "abstract public function getPrepareSql();", "title": "" }, { "docid": "7996308e0afe47f98a7b43db826b85d1", "score": "0.70311856", "text": "protected function setQuery(){\n $this->dbOpen();\n $this->cnn->query($this->query);\n }", "title": "" }, { "docid": "cf9a72d2e481930f915368d44e4b3db8", "score": "0.7029962", "text": "public function prepare(){}", "title": "" }, { "docid": "6f2f047f66e2c27d2a5e9fcd81bf40b9", "score": "0.6984992", "text": "abstract protected function prepare();", "title": "" }, { "docid": "6f2f047f66e2c27d2a5e9fcd81bf40b9", "score": "0.6984992", "text": "abstract protected function prepare();", "title": "" }, { "docid": "6f2f047f66e2c27d2a5e9fcd81bf40b9", "score": "0.6984992", "text": "abstract protected function prepare();", "title": "" }, { "docid": "f5f92adad35ce7f36ef8f0efa73fa822", "score": "0.69777805", "text": "public function fill_query(){\r\n\t\tif (!$this->access->check(\"read\")){\r\n\t\t\t$this->_log->log(\"Access control: read operation blocked\");\r\n\t\t\treturn $this->output_error();\r\n\t\t}\r\n\t\t\t\r\n\t\t$this->log(\"Ready for SQL generation\",$this->config);\r\n \t\t$this->get_query()->fill($this->config,$this->event);\r\n\t}", "title": "" }, { "docid": "0637942aa8785daea19c15ed0c387d7f", "score": "0.6952026", "text": "function _prep_query($sql)\n {\n return $sql;\n }", "title": "" }, { "docid": "cb0e9370c08f9df80c74346e51aa1cd1", "score": "0.69215816", "text": "public function prepare()\n\t{\n\n\t\t$selectQuery = 'SELECT ';\n\n\t\tif ($this->noField) {\n\t\t\t$selectQuery .= Core_Db_Query::EVERY_FIELD;\n\t\t} else{\n\t\t\t$selectQuery .= $this->addFields($this->_query['select_fields']);\n\t\t}\n\n\t\t$selectQuery .= ' FROM ' . $this->_table;\n\n\t\tif ($this->noWhere) {\n\t\t\t$selectQuery .= ' WHERE ' . Core_Db_Query::WHERE_ALL;\n\t\t} else{\n\t\t\t$selectQuery .= $this->where($this->_query['where']);\n\t\t}\n\n\t\treturn $selectQuery;\n\t}", "title": "" }, { "docid": "0ad358fd09d74a5477799b303d7cff79", "score": "0.68830544", "text": "private function _prepareDatabase() {\n\n }", "title": "" }, { "docid": "fbb821ac3c7244ad8e5a22304114500c", "score": "0.6846511", "text": "function prepareQuery($query)\n\t\t{\n\t\t\tif ($this->DBH != null)\n\t\t\t{\n\t\t\t\t$this->STH = $this->DBH->prepare($query);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfile_put_contents('../logs/PDOErrors.txt', \"Error: DataBase Handler is Null...\", FILE_APPEND);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c7ba86d8a95fda0f726ed820a6480b9c", "score": "0.6843089", "text": "function createQuery() ;", "title": "" }, { "docid": "06c1965ff110061e82a0fbfacfe76651", "score": "0.68255854", "text": "protected function prepare()\n {\n //\n }", "title": "" }, { "docid": "1d3f3cc4382f0e5a5a7ae92c9b3fd774", "score": "0.6810322", "text": "public function prepare_query($query) {\n\t\t//echo \"\\n<br>\".$query;\n\t\t$this->stmt = $this->db->connection->prepare($query);\n\t}", "title": "" }, { "docid": "605fea6edb5b5a869bfdce575f58f3fc", "score": "0.6793673", "text": "abstract protected function BuildQuery ( ) ;", "title": "" }, { "docid": "00936770bd2c65d9f27a935b28ea48f0", "score": "0.67811775", "text": "protected function prepare()\n\t{\n\t}", "title": "" }, { "docid": "00936770bd2c65d9f27a935b28ea48f0", "score": "0.67811775", "text": "protected function prepare()\n\t{\n\t}", "title": "" }, { "docid": "c45e3f74927fb0fac76379cf57edf8b7", "score": "0.6765805", "text": "abstract public function prepare($sql);", "title": "" }, { "docid": "c45e3f74927fb0fac76379cf57edf8b7", "score": "0.6765805", "text": "abstract public function prepare($sql);", "title": "" }, { "docid": "802905942c5903811357f6633878ca22", "score": "0.6728228", "text": "private function PrepareSQL()\n\t{\n\t\t// Pages\n\t\t$allPages = \"SELECT page.title, page.relativeposition, template.templatename \".\n\t\t\t\t\t\"FROM page INNER JOIN template ON page.template_id = template.id \".\n\t\t\t\t\t\"ORDER BY page.relativeposition ASC;\";\n\n\t\t$allPagesSite = \"SELECT page.title, page.relativeposition, template.templatename \".\n\t\t\t\t\t\t\"FROM page INNER JOIN template ON page.template_id = template.id \".\n\t\t\t\t\t\t\"WHERE website_id = ? \".\n\t\t\t\t\t\t\"ORDER BY page.relativeposition ASC;\";\n\n\t\t$allPagesWithTemplate = \"SELECT page.title, page.website_id, website.headertitle as websiteName \".\n\t\t\t\t\t\t\t\t\"FROM page INNER JOIN template ON page.template_id = template.id \".\n\t\t\t\t\t\t\t\t\"INNER JOIN website ON website.id = page.website_id \".\n\t\t\t\t\t\t\t\t\"WHERE templatename = ?;\";\n\n\t\t$allSitesWithTemplate = \"SELECT website.id \".\n\t\t\t\t\t\t\t\t\"FROM website INNER JOIN template ON website.template_id = template.id \".\n\t\t\t\t\t\t\t\t\"WHERE templatename = ?;\";\n\n\t\tif(!$this->database->PrepareStatement(\"allPages\", $allPages)) die(\"Abfrage konnte nicht erstellt werden.\");\n\t\tif(!$this->database->PrepareStatement(\"allPagesOfSite\", $allPagesSite)) die(\"Abfrage konnte nicht erstellt werden.\");\n\t\tif(!$this->database->PrepareStatement(\"allPagesWithTemplate\", $allPagesWithTemplate)) die(\"Abfrage konnte nicht erstellt werden.\");\n\t\tif(!$this->database->PrepareStatement(\"allSitesWithTemplate\", $allSitesWithTemplate)) die(\"Abfrage konnte nicht erstellt werden.\");\n\n\t\t// Website\n\t\t$websiteById = \"SELECT website.headertitle, website.contact, website.imprint, website.privacyinformation, website.gtc, website.login, website.guestbook, template.templatename AS template \".\n\t\t\t\t\t\t\"FROM website INNER JOIN template ON website.template_id = template.id \".\n\t\t\t\t\t\t\"WHERE website.id = ?\";\n\n\t\tif(!$this->database->PrepareStatement(\"websiteById\", $websiteById)) die(\"Abfrage konnte nicht erstellt werden.\");\n\n\n\n\t\t$allArticlesWithDetailedInformation = \"SELECT article.header, article.content, article.publicationdate, article.public, user.username, page.title \".\n\t\t\t\t\t\t\t\t\t\t\t\t\"FROM page INNER JOIN article ON page.id = article.page_id INNER JOIN user ON article.author = user.id \".\n\t\t\t\t\t\t\t\t\t\t\t\t\"ORDER BY user.username ASC;\";\n\t\t$this->database->PrepareStatement(\"allArticlesWithDetailedInformation\", $allArticlesWithDetailedInformation);\n\n\n\t\t$deleteArticleById = \"DELETE FROM article WHERE id = ?\";\n\t\t$this->database->PrepareStatement(\"deleteArticleById\", $deleteArticleById);\n\n\n\t\t$selectOneArticleById = \"SELECT * FROM article WHERE id = ?\";\n\t\t$this->database->PrepareStatement(\"selectOneArticleById\", $selectOneArticleById);\n\n\n\t\t$selectAllPages = \"SELECT * FROM page ORDER BY page.relativeposition ASC\";\n\t\t$this->database->PrepareStatement(\"selectAllPages\", $selectAllPages);\n\n\t\t$selectPageByPagename = \"SELECT * FROM page WHERE title = ?\";\n\t\t$this->database->PrepareStatement(\"selectPageByPagename\", $selectPageByPagename);\n\n\t\t$selectPageById = \"SELECT * FROM page WHERE id = ?\";\n\t\t$this->database->PrepareStatement(\"selectPageById\", $selectPageById);\n\n\t\t$selectTemplateById = \"SELECT * FROM template WHERE id = ?\";\n\t\t$this->database->PrepareStatement(\"selectTemplateById\", $selectTemplateById);\n\n\t\t$selectTemplateByTemplatename = \"SELECT * FROM template WHERE templatename = ?\";\n\t\t$this->database->PrepareStatement(\"selectTemplateByTemplatename\", $selectTemplateByTemplatename);\n\n\t\t$selectPageIdByPagename = \"SELECT id FROM page WHERE title = ?\";\n\t\t$this->database->PrepareStatement(\"selectPageIdByPagename\", $selectPageIdByPagename);\n\n\n\n\t\t$deletePageById = \"DELETE FROM page WHERE id = ?\";\n\t\t$this->database->PrepareStatement(\"deletePageById\", $deletePageById );\n\n\t\t$deletePageByTitle = \"DELETE FROM page WHERE title = ?\";\n\t\t$this->database->PrepareStatement(\"deletePageByTitle\", $deletePageByTitle );\n\n\t\t$deleteTemplateById = \"DELETE FROM template WHERE id = ?\";\n\t\t$this->database->PrepareStatement(\"deleteTemplateById\", $deleteTemplateById );\n\n\t\t$deleteTemplateByTemplatename = \"DELETE FROM template WHERE templatename = ?\";\n\t\t$this->database->PrepareStatement(\"deleteTemplateByTemplatename\", $deleteTemplateByTemplatename );\n\n\n\n\t\t$selectAllLabel_Article = \"SELECT * FROM label_article\";\n\t\t$this->database->PrepareStatement(\"selectAlllabel_Article\", $selectAllLabel_Article );\n\n\t\t$selectAllLabelsFromAnArticleById = \"SELECT * FROM article INNER JOIN label_article ON article.id = label_article.article_id INNER JOIN label ON label_article.label_id = label.id WHERE article.id = ?\";\n\t\t$this->database->PrepareStatement(\"selectAllLabelsFromAnArticleById\", $selectAllLabelsFromAnArticleById );\n\n\n\n\n\t\t$allArticles = \"SELECT * FROM article\";\t\t\t//Mirjam: Wird noch überprüft, welche davon verwendet wird.\n\t\t$this->database->PrepareStatement(\"allArticles\", $allArticles);\n\n\n\n\t\t$selectAllArticles = \"SELECT * FROM article\"; \t//Mirjam: Wird noch überprüft, welche davon verwendet wird.\n\t\t$this->database->PrepareStatement(\"selectAllArticles\", $selectAllArticles);\n\n\t\t$selectAllTemplates = \"SELECT * FROM template\";\n\t\t$this->database->PrepareStatement(\"selectAllTemplates\", $selectAllTemplates);\n\n\n\n\t\t$selectAllLabel_User = \"SELECT * FROM label_user\";\n\t\t$this->database->PrepareStatement(\"selectAllLabel_User\", $selectAllLabel_User);\n\n\n\n\t\t$selectAllWebsite = \"SELECT * FROM website\";\n\t\t$this->database->PrepareStatement(\"selectAllWebsite\", $selectAllWebsite);\n\n\t\t$selectWebsiteById = \"SELECT * FROM website WHERE id = ?\";\n\t\t$this->database->PrepareStatement(\"selectWebsiteById\", $selectWebsiteById);\n\n\t\t$deleteWebsiteById = \"DELETE FROM website WHERE id = ?\";\n\t\t$this->database->PrepareStatement(\"deleteWebsiteById\", $deleteWebsiteById );\n\n\n\n\t\t$articleOfPage = \"SELECT article.id, article.header, article.content, article.publicationdate, article.public, article.description, article.type, user.username AS author \".\n\t\t\t\t\t\t \"FROM article INNER JOIN user ON user.id = article.author \".\n\t\t\t\t\t\t \"INNER JOIN PAGE ON page.id = article.page_id \".\n\t\t\t\t\t\t \"WHERE page.title = ? \".\n\t\t\t\t\t\t \"ORDER BY article.publicationdate DESC;\";\n\n\t\tif(!$this->database->PrepareStatement(\"allArticlesOfPage\", $articleOfPage)) die(\"Abfrage konnte nicht erstellt werden.\");\n\n\n\n\t\t$selectLabelByLabelId = \"SELECT * FROM label WHERE id = ?\";\n\t\t$this->database->PrepareStatement(\"selectLabelByLabelId\", $selectLabelByLabelId);\n\n\t\t$selectLabelIdByLabelname = \"SELECT id FROM label WHERE labelname = ?\";\n\t\t$this->database->PrepareStatement(\"selectLabelIdByLabelname\", $selectLabelIdByLabelname);\n\n\t\t$selectArticleByHeader = \"SELECT * FROM article WHERE header = ?\";\n\t\t$this->database->PrepareStatement(\"selectArticleByHeader\", $selectArticleByHeader);\n\n\t\t$selectAllLabels = \"SELECT * FROM label\";\n\t\t$this->database->PrepareStatement(\"selectAllLabels\", $selectAllLabels);\n\n\n\t\t$selectAllWebsiteByHeadertitle = \"SELECT * FROM website WHERE headertitle = ?\";\n\t\t$this->database->PrepareStatement(\"selectAllWebsiteByHeadertitle\", $selectAllWebsiteByHeadertitle);\n\n\n\n\t\t//*nur für Testzwecke*//\n\t\t//DELETE website.*, page.*, article.* FROM website INNER JOIN page on website.id = page.website_id INNER JOIN article ON article.page_id = page.id WHERE website.id = ?\n\t\t//$deleteWebsiteAndPageAndArticle = \"DELETE website.*, page.*, article.* FROM website INNER JOIN page on website.id = page.website_id INNER JOIN article ON article.page_id = page.id\";\n\t\t//$this->database->PrepareStatement(\"deleteWebsiteAndPageAndArticle\", $deleteWebsiteAndPageAndArticle );\n\n\n\n\t\t$deleteWebsiteAndPageAndArticleByWebsiteId = \"DELETE website.*, page.*, article.* \".\n\t\t\t\t\t\t\t\t\t\t\t\t\t \"FROM website \".\n\t\t\t\t\t\t\t\t\t\t\t\t\t \"INNER JOIN page on website.id = page.website_id \".\n\t\t\t\t\t\t\t\t\t\t\t\t\t \"INNER JOIN article ON article.page_id = page.id \".\n\t\t\t\t\t\t\t\t\t\t\t\t\t \"WHERE website.id = ?\";\n\t\t$this->database->PrepareStatement(\"deleteWebsiteAndPageAndArticleByWebsiteId\", $deleteWebsiteAndPageAndArticleByWebsiteId );\n\n\t}", "title": "" }, { "docid": "9051688f6d2ad23d999bc7569256fa4e", "score": "0.66925526", "text": "protected function _query($sql){}", "title": "" }, { "docid": "bfa7b4812cc2c8d0096d459962dc6ca1", "score": "0.66560155", "text": "function prepare($query){\n $result = new Posql_Statement($this, null, $query);\n return $result;\n }", "title": "" }, { "docid": "bfa7b4812cc2c8d0096d459962dc6ca1", "score": "0.66560155", "text": "function prepare($query){\n $result = new Posql_Statement($this, null, $query);\n return $result;\n }", "title": "" }, { "docid": "b520acca9629e73a09a167aef4efe5e4", "score": "0.6647811", "text": "private function prepareSql()\n {\n $query = new Query();\n\n $prepareSql = $query\n ->insertInto('tires', [\n 'list' => ':list',\n 'str' => ':str',\n 'width' => ':width',\n 'height' => ':height',\n 'radius' => ':radius',\n 'indexPower' => ':indexPower',\n 'indexSpeed' => ':indexSpeed',\n 'brand' => ':brand',\n 'model' => ':model',\n 'camera' => ':camera',\n 'season' => ':season',\n 'isIt' => ':isIt',\n 'price' => ':price',\n 'priceMove' => ':priceMove',\n 'money' => ':money',\n 'gr' => ':gr',\n 'other' => ':other',\n 'year' => ':year'\n ])\n ->prepareBindStatement();\n\n return $prepareSql;\n }", "title": "" }, { "docid": "1b67c4f039b03f5b478e919d2c2d0050", "score": "0.6617832", "text": "function prepare(){\n\t\t$this->table = \"users_company\";\n\t\t$this->column_order = array (\n 0 => NULL,\n 1 => 'uscom_image',\n 2 => 'uscom_nama_com',\n 3 => 'uscom_jenis',\n 4 => 'uscom_nama_com',\n 5 => NULL,\n 6 => NULL,\n 7 => NULL,\n);\n\t\t$this->column_search = array (\n 0 => 'uscom_nama_com',\n 1 => 'uscom_jenis',\n);\n\t\t$this->order = array (\n 'uscom_id' => 'asc',\n);\n\t\t$this->whereclause = array (\n);\n }", "title": "" }, { "docid": "9bd992cea27c797434aa55fe25b333e0", "score": "0.6596646", "text": "private function prepare_query()\n {\n return $this->__conn->prepare($this->__message);\n }", "title": "" }, { "docid": "97434ebfffd21930d25b50e8fe2d0b10", "score": "0.65844387", "text": "private function reset_query() {\n $this->query['select'] = '*';\n $this->query['from'] = '';\n $this->query['where'] = array();\n $this->query['bind_value'] = array();\n $this->query['set'] = array();\n $this->query['join'] = array();\n $this->query['limit'] = array();\n $this->query['order'] = array();\n }", "title": "" }, { "docid": "ab7ebdf9cf2b3140c64d6818b1af8040", "score": "0.6579426", "text": "protected function prepare_queries()\n {\n // get_project_pguid\n $this->queries['get_project_pguid'] = $this->dbh->prepare(\"\n SELECT pguid FROM btr_projects WHERE pguid = :pguid\n \");\n\n // insert_project\n $this->queries['insert_project'] = $this->dbh->prepare(\"\n INSERT INTO btr_projects\n\t (pguid, project, origin, uid, time)\n VALUES\n\t (:pguid, :project, :origin, :uid, :time)\n \");\n\n // get_template_potid\n $this->queries['get_template_potid'] = $this->dbh->prepare(\"\n SELECT potid FROM btr_templates\n WHERE pguid = :pguid AND tplname = :tplname\n \");\n\n // insert_template\n $this->queries['insert_template'] = $this->dbh->prepare(\"\n INSERT INTO btr_templates\n\t (tplname, filename, pguid, uid, time)\n VALUES\n\t (:tplname, :filename, :pguid, :uid, :time)\n \");\n\n // insert_string\n $this->queries['insert_string'] = $this->dbh->prepare(\"\n INSERT INTO btr_strings\n\t (string, context, sguid, uid, time, count)\n VALUES\n\t (:string, :context, :sguid, :uid, :time, :count)\n \");\n\n // insert_location\n $this->queries['insert_location'] = $this->dbh->prepare(\"\n INSERT INTO btr_locations\n\t (sguid, potid,\n translator_comments, extracted_comments, line_references, flags,\n previous_msgctxt, previous_msgid, previous_msgid_plural)\n VALUES\n\t (:sguid, :potid,\n :translator_comments, :extracted_comments, :line_references, :flags,\n :previous_msgctxt, :previous_msgid, :previous_msgid_plural)\n \");\n }", "title": "" }, { "docid": "2a56347adc17b320dc5180f37bfbfcad", "score": "0.6554718", "text": "protected function prepare()\n {\n }", "title": "" }, { "docid": "70a3271f0b4529dbff793147711a82d8", "score": "0.6549282", "text": "private function recreateStatement()\n {\n $this->stmt = $this->conn->getWrappedConnection()->prepare($this->sql);\n\n if (null !== $this->fetchMode) {\n call_user_func_array([$this->stmt, 'setFetchMode'], $this->fetchMode);\n }\n foreach ($this->boundValues as $boundValue) {\n call_user_func_array([$this->stmt, 'bindValue'], $boundValue);\n }\n foreach ($this->boundParams as $boundParam) {\n call_user_func_array([$this->stmt, 'bindParam'], $boundParam);\n }\n }", "title": "" }, { "docid": "4aa034be5c3e9d77e971f3375d0a59a7", "score": "0.6545831", "text": "protected function _prepare($sql = ''){\n \t\tif($this->_prepared !== null){\n \t\t\t# a PDO preparedStatement exists\n \t\t\tif($this->_sql !== $sql){\n \t\t\t\t# somone wants to process a new query so we need to do some book keeping\n \t\t\t\t$this->_closeCursor();\n \t\t\t\tunset($this->_prepared);\n \t\t\t}else{\n \t\t\t\t#someone wants to re-run the current query\n \t\t\t\t$this->_closeCursor();\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t\t\n \t\t# Time to prepare the new sql so it can be exectuted\n \t\ttry{\n $this->_prepared = $this->_pdo->prepare($sql);\n $this->_sql = $sql;\n } catch(PDOException $e){\n # unable to prepare statement, thus throw an exception\n $ar = array(\n \t'mysqlErrorCode' => $e->getCode(), \n\t\t\t\t'mysqlErrorMsg' => $e->getMessage()\n\t\t\t);\n\t\t\tthrow new Exception(\"Unable to prepare PDO statement\",1004);\n }\n \t}", "title": "" }, { "docid": "852462aa562f1c2f76d94d6a20753413", "score": "0.65011704", "text": "public static function prepare() {}", "title": "" }, { "docid": "ad06ed3ea39d827c8d3d42e333b2df81", "score": "0.6499472", "text": "function sql_query_generator()\n\t{\n\t\t$this->WhereStarted = false;\t\n\t\t$this->_getVARS();\n\t\t$this->FormFieldIdentifier \t= 'fld';\n\t\t$this->AliasFieldIdentifier = 'alias';\t\t\n\t\t//$this->Setup();\n\t}", "title": "" }, { "docid": "ce832811e7d4b4da991aa5390f9ac2f5", "score": "0.6455093", "text": "function prepareQuery() {\r\n parent::prepareQuery();\r\n // set up the EFQ for related blocks\r\n // - load the hydroid of the facility, \r\n // - use a field condition for \r\n $this->efq->fieldCondition('dh_link_facility_mps','target_id',$this->base_entity_id);\r\n $this->efq->propertyCondition('bundle', 'landunit', '=');\r\n // Add some blanks\r\n }", "title": "" }, { "docid": "526d01fb548792dc2e49e9d7372d15da", "score": "0.64444786", "text": "public function prepare($query): Statement;", "title": "" }, { "docid": "4a946d132d2cd401fc129d14e2306575", "score": "0.6426546", "text": "function query() {\n // db field, which it is not.\n $this->ensure_my_table();\n $this->add_additional_fields();\n }", "title": "" }, { "docid": "58cf178af54cabf4b0b21179438310a1", "score": "0.64242965", "text": "abstract protected function prepare($query, array $params = NULL);", "title": "" }, { "docid": "7a759762f363f6e2d23e62bec6eb340f", "score": "0.64180833", "text": "function &prepare($query) {\n $new_query = new Database_Query_mysqlicompat($this, $query);\n return $new_query;\n }", "title": "" }, { "docid": "bd329555b2dbdcbc07e5e5aa46a5efc0", "score": "0.6404796", "text": "protected function prepareQueryForLogging(string &$query): void\n {\n }", "title": "" }, { "docid": "fd2c5666ca51569fd5147d6e58d9b453", "score": "0.638837", "text": "private function prepareStatement()\n {\n //Prepare statement\n $columns = \"\";\n $fields = \"\";\n foreach ($this->defaultfields as $key => $f) {\n if ($f == 'id') {\n continue;\n }\n if ($key == 1) {\n $columns .= \"$f\";\n $fields .= \":$f\";\n continue;\n }\n\n $columns .= \", $f\";\n $fields .= \", :$f\";\n }\n\n $this->statement = $this->pdo->prepare(\n 'INSERT INTO `' . $this->table . '` (' . $columns . ') VALUES (' . $fields . ')'\n );\n }", "title": "" }, { "docid": "b12008f91587a0ec897b7b189ac200d6", "score": "0.63638663", "text": "function _prepare()\n\t{\n\t}", "title": "" }, { "docid": "7c8874acf241dab115d4ab57bc439a5d", "score": "0.63302875", "text": "private function construct_sql()\n\t{\n\t\t//We will populate this bogus FROM statement if none is set, for the sake\n\t\t//of the __toString() function. But execute() still won't run until from() is \n\t\t//properly called.\n\t\t$from_string = ' FROM `UNKNOWN_TABLE` ';;\n\t\tif(isset($this->from_string))\n\t\t\t$from_string = $this->from_string;\n\n\t\t//A WHERE string is optional\n\t\t$where_string = '';\n\t\tif(isset($this->where_string))\n\t\t\t$where_string = $this->where_string;\n\t\t\n\t\t//Identify which columns to select, default to * if nothing was set\n\t\t$column_string = '';\n\t\tif(sizeof($this->column_array) == 0)\n\t\t\t$column_string = '*';\n\t\telse\n\t\t{\n\t\t\t$column_string = implode(',', $this->column_array);\n\t\t}\n\n\t\t$sql = \"SELECT $column_string $from_string $where_string\";\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "d92ef19e88c219e1aa1706f0aa82eada", "score": "0.6315775", "text": "private function executeQuery()\r\n {\r\n \r\n $this->sql = \"SELECT \";\r\n $this->sql .= $this->getColumns();\r\n $this->sql .= \" FROM \".$this->from; \r\n $this->sql .= $this->getJoins();\r\n $this->sql .= $this->getWhere();\r\n $this->sql .= $this->getGroupBy();\r\n $this->sql .= $this->getOrderBy();\r\n $this->sql .= $this->getLimit();\r\n $result = $this->getResults($this->sql);\r\n return $result;\r\n \r\n }", "title": "" }, { "docid": "9ebecb9f036bb9431777e171b59a4168", "score": "0.6308536", "text": "public function prepare()\n {\n if (!$this->hasDataProvider()) {\n throw new QueryException('Cannot prepare query since data provider not set (do this via Query::setDataProvider or via QueryManager::addDataProvider)');\n }\n $dataProvider = $this->getDataProvider();\n\n // Prepare request\n $buildQuery = new BuildQuery($dataProvider);\n $this->response = $buildQuery->prepareRequest($this);\n }", "title": "" }, { "docid": "4754d2792e98b454801c55975b5d5208", "score": "0.6297398", "text": "function prepareToSearch()\n {\n if (isset($_POST[\"query\"])) {\n $table = $_POST[\"table\"];\n $word = TestInput($_POST[\"query\"]);\n $word = mysqli_real_escape_string($this->conn, $word);\n $result = $this->m->getData($table, $word);\n if (count($result) > 0) {\n $this->createTableRow($table, $result);\n exit();\n } else {\n echo \"NO DATA TO SHOW\";\n }\n } else {\n $this->prepToReadRecords();\n }\n exit();\n }", "title": "" }, { "docid": "d3035528a8660e8abc14f8488b720901", "score": "0.6295628", "text": "protected function prepare(){\n $selector = $this->select;\n if(!$selector){\n return $this->data;\n }\n\n $this->traverse($selector,$this->data);\n $this->sortResultset();\n }", "title": "" }, { "docid": "48b0d002d220312d31d076d1426911f3", "score": "0.6293885", "text": "private function _prepare($sql)\n {\n $this->_stmt = $this->_db->prepare($sql);\n }", "title": "" }, { "docid": "581361c59c5d20975450261901602948", "score": "0.62932986", "text": "public function prepareStatement($sql);", "title": "" }, { "docid": "e48104528dd8e378d39caad74c73b9b5", "score": "0.62858605", "text": "public function prepare_query($sql, $params)\n\t{\n\t\t// You can't bind query statements before execution with\n\t\t// the firebird database\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "a526e6cefaff814e8b75d03d4ef77f03", "score": "0.6284327", "text": "public function exec(){\n \t$query = \"SELECT \" . $this->query['select'] . \" FROM \" . $this->query['from'];\n \t\n \t// Where\n \tif( count($this->query['where']) ){\n \t\t$counter = 0;\n\t \tforeach ($this->query['where'] as $where){\n\t \t\tif( ! $counter )\n\t \t\t\t$query .= ' WHERE ';\n\t \t\tif( $where == 'OR' ){\n\t \t\t\t$query .= ' OR ';\n\t \t\t}else{\n\t \t\t\tif( $counter AND $this->query['where'][$counter-1] != 'OR' )\n\t \t\t\t\t$query .= ' AND ';\n\t \t\t\t$query .= $where;\n\t \t\t}\n\t \t\t$counter++;\n\t \t}\n \t}\n \t\n \t// Order by\n \tif( array_key_exists('order_by', $this->query) ){\n \t\t$query .= \" ORDER BY \".$this->query['order_by'];\n \t}\n \t\n \t// Limit\n \tif( array_key_exists('limit', $this->query) ){\n \t\t$query .= \" LIMIT \".$this->query['limit'];\n \t}\n \t\n \t// Clean out the query stuff\n \t$this->query['select'] = '*';\n \t$this->query['where'] = array();\n \t\n \t$result = $this->db->query($query);\n \t$query_results = array();\n \twhile ($row = $result->fetchArray(SQLITE3_ASSOC))\n \t array_push($query_results, $this->newModelObject($this->model_name, $row));\n \t\n \treturn $query_results;\n }", "title": "" }, { "docid": "e1eb453ee1ad15b823cb8e8f4a320436", "score": "0.62805885", "text": "public function query($sql){\n $this->stmt = $this->getPDO()->prepare($sql);\n \n }", "title": "" }, { "docid": "b4e168674b1ad33b1a6478cb9bdca033", "score": "0.62805676", "text": "protected function sqlPrepare($sql,$array = null){\n if($array) {\n $request = $this->bdd->prepare($sql);\n $request->execute($array);\n return $request;\n }\n else{\n $request = $this->bdd->query($sql);\n return $request;\n }\n }", "title": "" }, { "docid": "c2cff7c65b900af089847e523e73ac98", "score": "0.62731725", "text": "public function _prepareFilter($sql) // @codingStandardsIgnoreEnd\n {\n return Database::getInstance()\n ->prepare($sql);\n }", "title": "" }, { "docid": "8c9f5b32b8add1799bb651f856e8f4f9", "score": "0.62726605", "text": "private function prepareStatement(){\r\n\t\t\t$datos = array();\r\n\t\t\t$datos[talla]\t\t= trim(addslashes($_REQUEST[talla]));\r\n\t\t\t$datos[descripcion]\t= trim(addslashes($_REQUEST[descripcion]));\r\n\t\t\t$datos[estado] \t\t= $_REQUEST[estado];\r\n\t\t\t/** Auditores */\r\n\t\t\t$datos[falta]\t\t\t= date(\"Y-m-d H:i:s\");\r\n\t\t\t$datos[fmodificacion]\t= date(\"Y-m-d H:i:s\");\r\n\t\t\t$datos[id_administrador]= $this->oSystem->getUser()->getId();\r\n\t\t\treturn $datos;\r\n\t\t}", "title": "" }, { "docid": "06ccc9df89ace0f0e832b7d55de3375f", "score": "0.62648565", "text": "public function prepareRecord()\n\t\t{\n\t\t\n\t\t\t// If we don't have any parameters, then we have a problem\n\t\t\t$argCount = func_num_args();\n\t\t\tif ($argCount == 0)\n\t\t\t\tthrow new exception(9999, 'Incorrect number of arguments.');\n\n\t\t\t// Get the arguments\n\t\t\t$args = func_get_args();\n\n\t\t\t// The first argument should be the SQL statement\n\t\t\t$query = $args[0];\n\n\t\t\t// Remove the first array element before passing to prepare_sql\n\t\t\tunset($args[0]);\n\t\t\t$args = array_values($args);\n\n\t\t\t// Prepare the SQL statement\n\t\t\t$query = $this->prepareSQL( $query, $args );\n\t\t\t\n\t\t\t// Return the record\n\t\t\treturn $this->record( $query );\t\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "a184b23d5f726b31138b7053b2a84641", "score": "0.625921", "text": "static public function _prepare($sql = \"\") {\n self::$prep = self::$db->prepare($sql);\n return self::$prep;\n }", "title": "" }, { "docid": "02400597c95de786a9fcb5cd922ce02a", "score": "0.62499774", "text": "function prepare($statement){\n\t\t$this->unique_name='name_'.time();\n\t\t$cnt=substr_count($statement,'?');\n\t\tfor($i=1; $i<=$cnt;$i++)\n\t\t{\n\t\t\t$rep=\"\\$\".$i.\" \";\n\t\t\t$statement=substr_replace( $statement, $rep, strpos($statement,'?'),(strlen($rep)-1));\n\t\t}\n\t\t$this->prep_stat = pg_prepare($this->connection,$this->unique_name,$statement) or die('123');\n\t}", "title": "" }, { "docid": "065f985ebbac08983669dac5d9f59ee5", "score": "0.6241659", "text": "public function prepare()\n {\n }", "title": "" }, { "docid": "065f985ebbac08983669dac5d9f59ee5", "score": "0.6241659", "text": "public function prepare()\n {\n }", "title": "" }, { "docid": "52d5c18696f6b8fc745048af4f8d2d41", "score": "0.6240511", "text": "public function prepareQueryBuilder()\n {\n $queryBuilder = DB::table('categories as cat')->select('cat.id as category_id', 'ct.name as category_name', 'cat.position as category_position', 'cat.status as category_status', 'ct.locale as category_locale')->leftJoin('category_translations as ct', 'cat.id', '=', 'ct.category_id');\n\n $this->setQueryBuilder($queryBuilder);\n }", "title": "" }, { "docid": "ef13753e94920d3419d6af298000afa0", "score": "0.6220623", "text": "function NewQuery()\r\n{\r\n\t$this->q_table = '';\r\n\t$this->q_where = '';\r\n\t$this->q_order = '';\r\n\t$this->q_limit = '';\r\n\t$this->q_group = '';\r\n\t$this->q_having = '';\r\n\treturn true;\r\n}", "title": "" }, { "docid": "8bf855801595287236c9b02e9be1f8f2", "score": "0.6218965", "text": "final protected static function prepareQuery(string $query): string\n {\n if ('oci8' === self::$databasePlatformName) {\n return sprintf(\"BEGIN\\n%s\\nEND;\", $query);\n }\n\n return $query;\n }", "title": "" }, { "docid": "93eed03762bc97991d976c275948d616", "score": "0.62044", "text": "function query() {\n // $this->ensure_my_table();\n // Add the field.\n // $this->field_alias = $this->query->add_field($this->table_alias, $this->real_field);\n // $this->add_additional_fields();\n\n // $this->field_alias = $this->real_field;\n }", "title": "" }, { "docid": "dbdf33dbcc6b91c38a7f6b3643969783", "score": "0.61970556", "text": "private function prepQuery($sql)\n\t{\n\t\t// the query so that it returns the number of affected rows\n\t\tif (preg_match('/^\\s*DELETE\\s+FROM\\s+(\\S+)\\s*$/i', $sql))\n\t\t{\n\t\t\t$sql = preg_replace(\"/^\\s*DELETE\\s+FROM\\s+(\\S+)\\s*$/\", \"DELETE FROM \\\\1 WHERE 1=1\", $sql);\n\t\t}\n\n\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "c23e2b8e647b6011f2099cd099f6919e", "score": "0.61880976", "text": "public function prepare_query ($query)\n {\n if (! $query)\n {\n $this->raise (\"'query' cannot be empty\", 'prepare_query', 'TIME_FRAME_SELECTOR');\n }\n\n switch ($this->period)\n {\n case Time_frame_recent:\n $query->set_limits (0, $this->num_in_recent);\n break;\n case Time_frame_today:\n $first = new DATE_TIME (mktime (0, 0, 0, date ('n'), date ('d'), date ('Y')));\n $last = new DATE_TIME (time ());\n $query->set_days ($first->as_iso (), $last->as_iso ());\n break;\n case Time_frame_last_week:\n $now = time ();\n $last = new DATE_TIME ($now);\n $first = new DATE_TIME ($now - (86400 * 7));\n $query->set_days ($first->as_iso (), $last->as_iso ());\n break;\n case Time_frame_last_month:\n $now = time ();\n $last = new DATE_TIME ($now);\n $first = new DATE_TIME ($now - (86400 * 30));\n $query->set_days ($first->as_iso (), $last->as_iso ());\n break;\n case Time_frame_all:\n break;\n }\n \n if ($this->period != Time_frame_all) \n $query->order_by_recent ();\n }", "title": "" }, { "docid": "0992e9064cf94f479e835af7b192999d", "score": "0.61853886", "text": "public function query($sql){\n $this->stmt = $this->dbh->prepare($sql);\n }", "title": "" }, { "docid": "d2534bc455fad70f0aa902304d13f322", "score": "0.61781913", "text": "public function prepareSql(&$sql, &$params);", "title": "" }, { "docid": "3a99dc53e592bb35d8a074dcef97ad70", "score": "0.61669576", "text": "public function setQuery() {\n\t\t\t$query = \" select distinct \";\n\t\t\t$query .= \" nsp.nspname as schema_name, \";\n\t\t\t$query .= \" cls.relname as sequence_name \";\n\t\t\t$query .= \" from pg_class cls \";\n\t\t\t$query .= \" join pg_namespace nsp \";\n\t\t\t$query .= \" on nsp.oid = cls.relnamespace \";\n\t\t\t$query .= \" where nsp.nspname not in ('information_schema', 'pg_catalog') \";\n\t\t\t$query .= \"\tand nsp.nspname not like 'pg_toast%' \";\n\t\t\t$query .= \" and cls.relkind = 'S' \";\n\t\t\t$query .= \" order by 1 \";\n\t\t\t$this->query = $query;\n\t}", "title": "" }, { "docid": "3415423f42255c46a106e6f59fe8ed12", "score": "0.61641407", "text": "public function __construct($sql){\n self::init();\n $this -> query = $this -> db-> prepare($sql);\n }", "title": "" }, { "docid": "f9eb33f0db0a2d0160b180047049a697", "score": "0.6163268", "text": "public function execQuery();", "title": "" }, { "docid": "92b0d97d2920e1553c59ef497c567934", "score": "0.6162527", "text": "function _queryPostProcessing(&$query)\n\t{\n\t\t// Drop anything except CREATE TABLE and INSERT INTO commands; the installer\n\t\t// caters for DROP TABLE commands where necessary\n\t\t$query = trim($query);\n\t\t$command = trim(substr($query, 0, 12));\n\t\t$command = strtoupper($command);\n\t\t$doProcess = ($command == 'CREATE TABLE') || ($command == 'INSERT INTO');\n\t\t\n\t\t// Catch view creation\n\t\tif( substr($query, 0, 13) == '/*!50001 VIEW' )\n\t\t{\n\t\t\t// Change the MySQL version statement to CREATE\n\t\t\t$query = 'CREATE OR REPLACE VIEW'.substr($query,13);\n\t\t\t// Remove the final '*/;' string\n\t\t\tif( substr($query, -3) == '*/;' )\n\t\t\t\t$query = substr($query, 0, strlen($query) - 3);\n\t\t}\n\t\t\n\t\tif(!$doProcess)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove newlines, for compatibility with JPI and JPI2 (only if not _DBOnly)\n\t\tif(!$this->_DBOnly)\n\t\t{\n\t\t\t$query = str_replace(\"\\n\", \" \", $query);\n\t\t}\n\n\t\t// Transform table names to abstract form (only if _isJoomla)\n\t\tif($this->_isJoomla && !$this->_DBOnly)\n\t\t{\n\t\t\t// Triangulate table's name by finding the surrounding backticks\n\t\t\t$firstTick\t= strpos($query, \"`\"); // First backtick\n\t\t\t$nextTick\t= strpos($query, \"`\", $firstTick+1); // Next backtick\n\t\t\t// Get the name\n\t\t\t$tableName\t= substr($query, $firstTick+1, $nextTick-$firstTick-1);\n\t\t\t// Make it into an abstract name\n\t\t\t$abstract\t= $this->_getAbstract($tableName);\n\t\t\t// Replace the name ONCE!\n\t\t\tsubstr_replace($query, $tableName, $firstTick+1, strlen($tableName));\n\t\t\t\n\t\t\t// If we have a view, try an aggressive search and replace\n\t\t\tif(substr($query,0,22) == 'CREATE OR REPLACE VIEW')\n\t\t\t{\n\t\t\t\t$tablesql = str_replace($prefix, '#__', $tablesql);\n\t\t\t}\n\t\t}\n\n\t\t$query .= \"\\n\";\n\t\t// Write the result\n\t\t$this->_writeline($query);\n\t}", "title": "" }, { "docid": "06a6a827beb1d5ce538a19046943272a", "score": "0.6157135", "text": "private function buildPreparedQueries() {\n\t\t/**\n\t\t * Retrieve shares for a given user/group and share type\n\t\t */\n\t\t$query = $this->connection->getQueryBuilder();\n\t\t$query\n\t\t\t->select('item_source', 'id', 'file_target', 'permissions', 'parent', 'share_type', 'stime')\n\t\t\t->from('share')\n\t\t\t->where($query->expr()->eq('share_type', $query->createParameter('shareType')))\n\t\t\t->andWhere($query->expr()->in('share_with', $query->createParameter('shareWiths')))\n\t\t\t->andWhere($query->expr()->in('item_type', $query->createParameter('itemTypes')))\n\t\t\t->orderBy('item_source', 'ASC')\n\t\t\t->addOrderBy('stime', 'ASC');\n\n\t\t$this->queryGetSharesWithUsers = $query;\n\n\t\t/**\n\t\t * Updates the file_target to the given value for all given share ids.\n\t\t *\n\t\t * This updates several shares in bulk which is faster than individually.\n\t\t */\n\t\t$query = $this->connection->getQueryBuilder();\n\t\t$query->update('share')\n\t\t\t->set('file_target', $query->createParameter('file_target'))\n\t\t\t->where($query->expr()->in('id', $query->createParameter('ids')));\n\n\t\t$this->queryUpdateShareInBatch = $query;\n\n\t\t/**\n\t\t * Updates the share permissions and target path of a single share.\n\t\t */\n\t\t$query = $this->connection->getQueryBuilder();\n\t\t$query->update('share')\n\t\t\t->set('permissions', $query->createParameter('permissions'))\n\t\t\t->set('file_target', $query->createParameter('file_target'))\n\t\t\t->where($query->expr()->eq('id', $query->createParameter('shareid')));\n\n\t\t$this->queryUpdateSharePermissionsAndTarget = $query;\n\t}", "title": "" }, { "docid": "21e03c4748c280abe3b2e0d0e0cf1891", "score": "0.6153608", "text": "protected function prepareOrderByStatement() {}", "title": "" }, { "docid": "00d41742cd81580636fbc727d204cc84", "score": "0.6153399", "text": "private function prepareQuery($query, $data = null)\n {\n $stmt = $this->connection->prepare($query);\n $stmt->execute($data);\n return $stmt;\n }", "title": "" }, { "docid": "ab019a7d9a0acb49e576be4b0ca61eac", "score": "0.6148606", "text": "public function createQuery() {}", "title": "" }, { "docid": "ab019a7d9a0acb49e576be4b0ca61eac", "score": "0.6148606", "text": "public function createQuery() {}", "title": "" }, { "docid": "ab019a7d9a0acb49e576be4b0ca61eac", "score": "0.6148606", "text": "public function createQuery() {}", "title": "" }, { "docid": "ab019a7d9a0acb49e576be4b0ca61eac", "score": "0.6148606", "text": "public function createQuery() {}", "title": "" }, { "docid": "988ec95315b0060b678062e39b62d460", "score": "0.614544", "text": "private function get_build() {\n $sql = \"SELECT:select: FROM:from::where::like::order_by::limit:\";\n $this->query_string = $sql;\n $this->replace_get_build();\n }", "title": "" }, { "docid": "50359d4b3642628064b4ae7155264fb4", "score": "0.614398", "text": "protected function set_query()\n\t{\n\t\t$this->db_open();\n\t\t// ->query es un método de la clase \"mysqli\"\n\t\t// $this->query = Esta es asignado por la clase heredada , es decir cuando se teclea la consulta a realizar.\n\t\t$this->conn->query($this->query);\n\t\t$this->db_close();\n\t}", "title": "" }, { "docid": "add925ab85f131e1961f7a6edd40d741", "score": "0.6140518", "text": "abstract protected function query();", "title": "" }, { "docid": "b1b5682e8b4614636a1bdcb1cba124ce", "score": "0.61291426", "text": "function prepareContactsQuery(&$postgreSQL, &$_POST, &$username) {\n do {\n $queryID = hash('md5', rand());\n } while (isContactsQueryID($postgreSQL, $queryID));\n /* Adds the CONTACTS query about to be started to the CONTACTS query index. */\n if (!insertPGRow($postgreSQL, 'Indexes', 'contactsQueries', $queryID, stripslashes($_POST['queryName']),\n\t\t sprintf('%u', ip2long($_POST['queryIP'])), strtotime($_POST['queryStartTime']), strtotime($_POST['queryEndTime']),\n 0, $username, time(), false, false, false, false, 0, 0, CONTACTS_RUNNING, false)) {\n return false;\n }\n /* \n * Creates a table in the \"hbfQueries\" schema for the queryCONTACTS-SQL program\n * to store results in.\n */\n if (!@pg_query($postgreSQL, 'CREATE TABLE \"ContactsQueries\".\"' . $queryID . '\" ' .\n '(\"protocol\" uint16, \"sourceIP\" uint32, \"destinationIP\" uint32, ' .\n '\"sourcePort\" uint16, \"destinationPort\" uint16, ' .\n '\"startTime\" uint32, \"endTime\" uint32)')) {\n return false;\n }\n return $queryID;\n }", "title": "" }, { "docid": "6ba5b323e6ca46377771eadb9dfc5a83", "score": "0.61259145", "text": "public function buildQuery() {\n\t\t$queryString = '';\n\t\t$params = [];\n\n\t\tswitch ($this->queryType) {\n\t\t\tcase 'select':\n\t\t\t\t$queryString = \"SELECT {$this->selectFields} FROM {$this->tableName}\";\n\t\t\t\tbreak;\n\t\t\tcase 'update':\n\t\t\t\t$queryString = \"UPDATE {$this->tableName} SET {$this->updateClause}\";\n\t\t\t\t$params = array_merge($params, $this->updateParams);\n\t\t\t\tbreak;\n\t\t\tcase 'delete':\n\t\t\t\t$queryString = \"DELETE FROM {$this->tableName}\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Exception('No query type selected!');\n\t\t\t\tbreak;\n\t\t}\n\t\tif ($this->whereClause !== null) {\n\t\t\t$queryString .= ' WHERE '.$this->whereClause;\n\t\t\t$params = array_merge($params, $this->whereParams);\n\t\t} else {\n\t\t\tthrow new Exception(\"No where clause specified, if you want the whole table please use all()\");\n\t\t}\n\t\tif ($this->orderClause !== null) {\n\t\t\t$queryString .= ' ORDER BY '.$this->orderClause;\n\t\t}\n\t\tif ($this->limit !== null) {\n\t\t\t$queryString .= ' LIMIT '.(int)$this->limit;\n\t\t\tif ($this->offset!=0) {\n\t\t\t\t$queryString .= ','.(int)$this->offset;\n\t\t\t}\n\t\t}\n\t\treturn [$queryString, $params];\n\t}", "title": "" }, { "docid": "c78ff4cafbb2641facb3d06ea0ad9416", "score": "0.6124884", "text": "function Prepare($query,$bindings,$conn){\n\t$stmt= $conn->prepare($query);\n\t$stmt->execute($bindings);\n\treturn $stmt;\n}", "title": "" }, { "docid": "7550021baac42c9ecb9f446b3ce10076", "score": "0.61145806", "text": "private function _prepareParams()\n {\n $params = $this->getParams();\n foreach ($params as $param) {\n $name = $param->getName();\n $value = $param->getDqlValue(); //todo: injection\n if ($param->isEmpty($value) && !$param->isRestricted()) {\n if (array_key_exists($name, $this->_prepared['where'])) {\n unset($this->_prepared['where'][$name]);\n }\n if (array_key_exists($name, $this->_prepared['parameters'])) {\n unset($this->_prepared['parameters'][$name]);\n }\n if (array_key_exists($name, $this->_prepared['public_parameters'])) {\n unset($this->_prepared['public_parameters'][$name]);\n }\n continue;\n }\n\n if (!$param->isMock()) {\n $this->_prepared['where'][$name] = $param->getDqlCondition(); //todo: injection\n $this->_prepared['parameters'][$name] = $value;\n }\n if (!$param->isHidden()) {\n $unfilteredValue = $param->getUnfilteredValue();\n if ($value instanceof \\DateTime) {\n $unfilteredValue = $value\n ->format(($value->format('H') != 0 || $value->format('i') != 0 || $value->format('m') != 0)\n ? Filter::$defaultDateTimeFormat : Filter::$defaultDateFormat);\n }\n $this->_prepared['public_parameters'][$name] = $unfilteredValue;\n }\n }\n }", "title": "" }, { "docid": "05ee8298749361895820354059a2dac6", "score": "0.6112553", "text": "abstract protected function toQuery();", "title": "" }, { "docid": "7f12ccf836b59d783a51545df8021b79", "score": "0.60957026", "text": "protected function sinple_query() {\n $this->abrir_conexion();\n $this->conn->query($this->query);\n $this->cerrar_conexion();\n }", "title": "" }, { "docid": "854e8f0075975e2ba83c84efddb88a38", "score": "0.6090762", "text": "protected function PopulateSQL(){\n // GET Query variables\n foreach ($this->input_data as $key => $val){\n $this->sql = str_replace('{{'.$key.'}}', $val, $this->sql);\n }\n // USER Variables\n $this->debug(array(\"User\" => $this->user));\n foreach ($this->user as $key => $val){\n // Change \":\" selector by \".\" selector, to keep SQL code formatting in Webstorm Editor\n $this->sql = str_replace('{{user:'.$key.'}}', '{{user.'.$key.'}}', $this->sql);\n $this->sql = str_replace('{{user.'.$key.'}}', $val, $this->sql);\n }\n }", "title": "" }, { "docid": "9cada429ba632b0cc89c75d29eab9236", "score": "0.60905683", "text": "public function execute()\n\t{\n\t\t//A FROM string must be set, either here or from an earlier function call\n\t\tif(!isset($this->from_string))\n\t\t\tthrow new Exception(\"From string not set\");\n\n\t\t$sql = $this->construct_sql();\n\n\t\t$query = $this->db->prepare($sql);\n\t\t$query->execute($this->value_array);\n\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "2b2bdebbf8112f6d1675fc10de193cfa", "score": "0.60883063", "text": "protected function query($query) {\n\t\tif ($this->adsfoiuwer())\n\t\t\t$this->weroisdfo();\n\t\t\n\t\tif ($this->adsfoiuwer()) {\n\t\t\techo '{ \"error\" : \"null - boo.\" }';\n\t\t\texit;\n\t\t}\n\t\t\n\t\t$this->query = $query;\n\t\t$this->stmt = $this->dbh->prepare($query);\n\t}", "title": "" } ]
35caa501e548c59610722a4a99205a7a
method cari kelompok swakarya (siswa)
[ { "docid": "0d4544a7012d357e950d22da708ea95c", "score": "0.604768", "text": "public function cariKelompokSiswa() {\n\n\t\t$sql = \"SELECT\n\t\t\t\t\tkelompok.kd_kelompok,\n\t\t\t\t\tguru.nama,\n\t\t\t\t\tSUM( CASE WHEN siswa.stat_kelompok = 'diterima' THEN 1 ELSE 0 END ) AS anggota\n\t\t\t\tFROM\n\t\t\t\t\tkelompok\n\t\t\t\t\tLEFT JOIN guru ON kelompok.nip = guru.nip\n\t\t\t\t\tLEFT JOIN siswa ON kelompok.kd_kelompok = siswa.kd_kelompok\n\t\t\t\tWHERE\n\t\t\t\t\tkelompok.progress < 30 AND\n\t\t\t\t\tguru.nama LIKE '%' :nama '%'\n\t\t\t\t\tGROUP BY kelompok.kd_kelompok;\";\n\n\t\ttry {\n\t\t\t//proses\n\t\t\t$stmt = $this->connect->prepare($sql);\n\t\t\t$stmt->bindParam(':nama', $this->nama);\n\n\t\t\t$stmt->execute();\n\t\t\t$result = $stmt->fetchAll(PDO::FETCH_OBJ);\n\t\t\techo json_encode($result);\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\techo '{\"error\": {\"text\": '.$e->getMessage().'}}';\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "8e8e0e10bc9f2ff9f30292bc9a923b45", "score": "0.7327159", "text": "public function prikaziPoSastojku(){\n // je to beef ili chicken ili lunch ili whatever\n // vrsi pretragu i ispisuje.. \n // pozivajuci metodu prikazi sa array podatakama.\n }", "title": "" }, { "docid": "149ef3cde14b7e77d0de4d0b6c25ed59", "score": "0.69891554", "text": "public function knijga(){\n // dohvati njegove knjige i prosledi u prikazi sa odgovar\n //jucom stranicom.\n }", "title": "" }, { "docid": "ccbb465dd7e8a06c36ee673dda910fd4", "score": "0.6950558", "text": "private function ima_li_pobjednik(){\n\t\t\t$this->uRetku();\n\t\t\t$this->uStupcu();\n\t\t\t$this->naDijagonali();\n\t\t}", "title": "" }, { "docid": "b03669a1d26f0b6889a516b3079d1ac3", "score": "0.67977154", "text": "public function ukloniIzKnjige(){\n //proveri dal ima vec u knjigu\n // ukloni \n }", "title": "" }, { "docid": "cbd4754fb47af999f49f4d32c116219a", "score": "0.6593498", "text": "function SalasananVaihtoToimet(){\n /*Haetaan henkilon id*/\n $puuhaajaid = annaKirjautuneenId();\n \n /* Haetaan henkilon tiedot */\n $henkilo = Henkilo::EtsiKokoHenkilo($puuhaajaid);\n $vanhaSalasana = $_POST['vanhaSalasana'];\n\n /* Funktio tarkistaa vastaako annettu salasana henkilon salasanaa */\n if ($henkilo->TarkistaOnkoVanhaSalasanaOikein($vanhaSalasana)) {\n\n /* Koetetaan vaihtaa henkilon salsana */\n $henkilo->VaihdaSalasana($_POST['salasana'], $_POST['salasana2']);\n \n /* Jos ei virheitä vaihdetaan salasana myös tietokantaan */\n if(OlioOnVirheeton($henkilo)){\n $henkilo->vaihdaSalasanaTietokantaan();\n $_SESSION['ilmoitus'] = \"Salasana vaihdettu onnistuneesti.\";\n\n NaytaNakymaSalasananVaihtoSivulle(null);\n } else {\n /* Virheitä löytyi, näytetään virheilmoitus */\n $virheet=$henkilo->getVirheet();\n NaytaNakymaSalasananVaihtoSivulle($virheet);\n\n }\n } else {\n /* Jos annettu salasana ei vastannut henkilon salasanaa, näytetään virheilmoitus */\n NaytaNakymaSalasananVaihtoSivulle(\"Antamasi vanha salasana on väärä.\");\n \n }\n}", "title": "" }, { "docid": "7eceb992e765b6272efb856a9e9c82ff", "score": "0.658522", "text": "public function sprzedarz($sprzedane){\n $db=bazadanych::getInstance();\n foreach($sprzedane as $p){\n $db->usun('ekwipunek',array('nazwa'=>$p['nazwa'],'id_postaci'=>$this->wiedzmin->Getparam->getId())); \n }\n }", "title": "" }, { "docid": "5583bb17825725b8cabe30df48c2c99e", "score": "0.6564984", "text": "public function dokupienia(){\n $db=bazadanych::getInstance();\n $wynik=$db->select('sklep');\n \n \n return $wynik;\n }", "title": "" }, { "docid": "2b1ee8eebcdf64ca9806e28000b1a3ec", "score": "0.6522712", "text": "function cekSkala($conn,$r_nilaibawah,$r_nilaiatas){\n\t\t\t\n\t\t\tif($r_nilaiatas < $r_nilaibawah)\n\t\t\t\t$hasil = 1;\n\t\t\t\t\n\t\t\treturn $hasil;\n\t\t}", "title": "" }, { "docid": "1e64a9a30ea947119cf7416d6542d185", "score": "0.6505714", "text": "public function dosprzedania(){\n $db=bazadanych::getInstance();\n $wynik=$db->select('ekwipunek',array('id_postaci'=>$this->wiedzmin->Getparam()->getId()));\n \n return $wynik;\n }", "title": "" }, { "docid": "c883d587c5568c27777d08d70b952bdf", "score": "0.6419689", "text": "function get_menit($waktu_mt, $satuan = 'm'){\r\n\t//..reset isi.begin\r\n\t$i \t= 0;\r\n\t\r\n\t$s\t= 0;\r\n\t$m\t= 0;\r\n\t$h\t= 0;\r\n\t$d\t= 0;\r\n\t$w\t= 0;\r\n\t\r\n\t$rs\t= \"\";\r\n\t$rm\t= \"\";\r\n\t$rh\t= \"\";\r\n\t$rd\t= \"\";\r\n\t$rw\t= \"\";\r\n\t\r\n\t$awal = \"\";\r\n\t//..reset isi.end\r\n\t$result = 0;\r\n\t$awal = $waktu_mt;\r\n\t//..pisah waktu.begin\r\n\t$pow = strpos($awal, 'w');\r\n\t$pod = strpos($awal, 'd');\r\n\t$poh = strpos($awal, 'h');\r\n\t$pom = strpos($awal, 'm');\r\n\t$pos = strpos($awal, 's');\r\n\r\n\t\t//.ambil minggu\r\n\t\tif($pow > 0) {\r\n\t\t\t$aw = preg_match('/(.*?)w/', $awal, $row);\r\n\t\t\t$w\t= $row[1];\r\n\t\t\tif($w == \"\"){\r\n\t\t\t\t$w = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//.ambil hari\r\n\t\tif($pod > 0) { \r\n\t\t\tif($pow > 0) {\r\n\t\t\t\t$ad = preg_match('/w(.*?)d/', $awal, $row);\r\n\t\t\t\t$d = $row[1];\r\n\t\t\t} else {\r\n\t\t\t\t$ad = preg_match('/(.*?)d/', $awal, $row);\r\n\t\t\t\t$d = $row[1];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//.ambil jam\r\n\t\tif($poh > 0) { \r\n\t\t\tif($pod > 0) {\r\n\t\t\t\t$ah = preg_match('/d(.*?)h/', $awal, $row);\r\n\t\t\t\t$h = $row[1];\r\n\t\t\t} else if($pow > 0) {\r\n\t\t\t\t$ah = preg_match('/w(.*?)h/', $awal, $row);\r\n\t\t\t\t$h = $row[1];\r\n\t\t\t} else {\r\n\t\t\t\t$ah = preg_match('/(.*?)h/', $awal, $row);\r\n\t\t\t\t$h = $row[1];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//.ambil menit\r\n\t\tif($pom > 0) { \r\n\t\t\tif($poh > 0) {\r\n\t\t\t\t$am = preg_match('/h(.*?)m/', $awal, $row);\r\n\t\t\t\t$m = $row[1];\r\n\t\t\t} else if($pod > 0) {\r\n\t\t\t\t$am = preg_match('/d(.*?)m/', $awal, $row);\r\n\t\t\t\t$m = $row[1];\r\n\t\t\t} else if($pow > 0) {\r\n\t\t\t\t$am = preg_match('/w(.*?)m/', $awal, $row);\r\n\t\t\t\t$m = $row[1];\r\n\t\t\t} else {\r\n\t\t\t\t$am = preg_match('/(.*?)m/', $awal, $row);\r\n\t\t\t\t$m = $row[1];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//.ambil detik\r\n\t\tif($pos > 0) { \r\n\t\t\tif($pom > 0) {\r\n\t\t\t\t$as = preg_match('/m(.*?)s/', $awal, $row);\r\n\t\t\t\t$s = $row[1];\r\n\t\t\t} else if($poh > 0) {\r\n\t\t\t\t$as = preg_match('/h(.*?)s/', $awal, $row);\r\n\t\t\t\t$s = $row[1];\r\n\t\t\t} else if($pod > 0) {\r\n\t\t\t\t$as = preg_match('/d(.*?)s/', $awal, $row);\r\n\t\t\t\t$s = $row[1];\r\n\t\t\t} else if($pow > 0) {\r\n\t\t\t\t$as = preg_match('/w(.*?)s/', $awal, $row);\r\n\t\t\t\t$s = $row[1];\r\n\t\t\t} else {\r\n\t\t\t\t$as = preg_match('/(.*?)s/', $awal, $row);\r\n\t\t\t\t$s = $row[1];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//..jadikan semuanya menit.begin\r\n\t\t$tw = 0;\r\n\t\tif($w > 0) {\r\n\t\t\t$tw = $w; //ambil minggu\r\n\t\t}\r\n\t\t\r\n\t\t$td = 0;\r\n\t\tif($tw > 0){\r\n\t\t\t$td = $d + ($tw * 7); //1 minggu 7 hari\r\n\t\t} else {\r\n\t\t\t$td = $d;\r\n\t\t}\r\n\t\t\r\n\t\t$th = 0;\r\n\t\tif($td > 0){\r\n\t\t\t$th = $h + ($td * 24); //1 hari 24 jam\r\n\t\t} else {\r\n\t\t\t$th = $h;\r\n\t\t}\r\n\t\t\r\n\t\t$tm = 0;\r\n\t\tif($th > 0){\r\n\t\t\t$tm = $m + ($th * 60); //1 jam 60 menit\r\n\t\t} else {\r\n\t\t\t$tm = $m;\r\n\t\t}\r\n\t\t\r\n\t\t$ts = 0;\r\n\t\tif($tm > 0){\r\n\t\t\t$ts = $s + ($tm * 60); //1 jam 60 menit\r\n\t\t} else {\r\n\t\t\t$ts = $s;\r\n\t\t}\r\n\t\t//..jadikan semuanya menit.end\r\n\t\t/*\r\n\t\t//.logika keterlibatan (show/hide).begin\r\n\t\t\t$rw = \"\";\r\n\t\t\tif($w > 0){\r\n\t\t\t\t$rw = $w.\"w\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$rd = \"\";\r\n\t\t\tif($d > 0){\r\n\t\t\t\t$rd = $d.\"d\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$rh = \"\";\r\n\t\t\tif($h > 0){\r\n\t\t\t\t$rh = $h.\"h\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$rm = \"\";\r\n\t\t\tif($m > 0){\r\n\t\t\t\t$rm = $m.\"m\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$rs = \"\";\r\n\t\t\tif($s > 0){\r\n\t\t\t\t$rs = $s.\"s\";\r\n\t\t\t}\r\n\t\t//.logika keterlibatan (show/hide).end\r\n\r\n\t\t$result = $rw.$rd.$rh.$rm.$rs;\r\n\t\t$result .= \"|\";\r\n\t\t*/\r\n\t\t$result = $tm;\r\n\t\tif($satuan == 'w'){\r\n\t\t\t$result = $tw;\r\n\t\t} else if($satuan == 'd'){\r\n\t\t\t$result = $td;\r\n\t\t} else if($satuan == 'h'){\r\n\t\t\t$result = $th;\r\n\t\t} else if($satuan == 'm'){\r\n\t\t\t$result = $tm;\r\n\t\t} else if($satuan == 's'){\r\n\t\t\t$result = $ts;\r\n\t\t}\r\n\t\treturn $result;\r\n\t//..pisah waktu.end\r\n}", "title": "" }, { "docid": "027c90de58e12e59d60c08d26ada629c", "score": "0.6418109", "text": "function yukle_isle() {\n // ornek text name isim olan degere ulasmak icin $this->data->isim; sekllinde ulasilir\n $ek = \"fileToUpload\";\n // fileToUpload , gonderilen file name ismidir\n try {\n $dosya = $this->help(\"upload\");\n \n \n //var_dump($dosya->yukle($ek,\"deneme\\\\\"));\n // upload sinifi yuklenir\n // upload sinifi yukle fonksiyonu ilk parametre yuklenecek dosyanin file name ismi, \n // 2 nci parametre ise yuklenecek klosor ismidir\n $file = $dosya->yukle($ek,\"deneme\\\\\");\n // yukeleme isleminden donen dosyanin konumu ve ismidir.\n $image = UPLOAD.$file;\n }\n catch (Exception $e) {\n echo '<script>alert(\"'.$e->getMessage().'\")</script>';\n }\n \n // buradaki fonksiyonlar SimpleImage sinifi fonksiyonlaridir.\n // https://github.com/claviska/SimpleImage/blob/master/src/abeautifulsite/SimpleImage.php\n $dosya->load($image)->blur('selective', 50)->save(UPLOAD.$dosya->isim);\n //$dosya->load($image)->flip('x')->rotate(90)->best_fit(320, 200)->sepia()->save(UPLOAD.\"bn.jpg\");\n\n\n }", "title": "" }, { "docid": "5beac9cc93227f41ac084b72c374ae5a", "score": "0.64023495", "text": "function ilosc_danego_produktu_w_koszyku($id_produktu)\r\n{\r\n for($i = 0; $i<sprawdz_liczbe_w_koszyku(); $i++) // przechodzimy przez każdy element\r\n { // sprawdzamy, czy istenieje taki produkt w koszyku\r\n if ($_SESSION['koszyk'][$i]['id_produktu'] == $id_produktu) \r\n { // jeśli istnieje, zwracamy jego ilosc\r\n return $_SESSION['koszyk'][$i]['ilosc'];\r\n }\r\n }\r\n return 0; // jeśli produktu nie ma, zwracamy 0\r\n}", "title": "" }, { "docid": "e947f0fa73ec52e33a8b91f75461a33b", "score": "0.6374734", "text": "public function ukloniOcenu(){\n // gledaj dal je ocenjivo do sad.\n // ukloni ocenu\n // prikaze opet to jelo\n //znaci pozove prikazi.\n }", "title": "" }, { "docid": "99dbafe1434615634875885d073f83f8", "score": "0.6346924", "text": "function promjeniSmjer($sid, $srp, $eng, $namespace, $godine, $txtSrp, $txtEng, $pozicija){\n\t\tglobal $_M; $db = $_M->getBaza();\n\t\t$srp = mysql_real_escape_string($srp);\n\t\t$eng = mysql_real_escape_string($eng);\n\t\t$namespace = mysql_real_escape_string($namespace);\n\t\t$godine = mysql_real_escape_string($godine);\n\t\t$txtSrp = mysql_real_escape_string($txtSrp);\n\t\t$txtEng = mysql_real_escape_string($txtEng);\n\n\t\t$s = $db->q(\"SELECT namespace FROM smjer WHERE sid='\".$sid.\"';\");\n\n\t\tif($s['namespace']!=$namespace){\n\t\t\t$br = $db->q(\"SELECT COUNT(*) AS br FROM smjer WHERE namespace='\".$namespace.\"';\");\n\t\t\tif($br['br']!=0) die(\"Већ постоји смјер са постављеним линком!\");\n\t\t}\n\n\t\t$db->e(\"UPDATE smjer SET\n\t\t\t\time_srp = \t\t'\".$srp.\"', /* ime_srp */\n\t\t\t\time_eng = \t\t'\".$eng.\"', /* ime_eng */\n\t\t\t\tnamespace = \t'\".$namespace.\"', /* namespace */\n\t\t\t\tbroj_godina = \t'\".$godine.\"', /* broj_godina */\n\t\t\t\topis_srp = \t\t'\".$txtSrp.\"', /* opis_srp */\n\t\t\t\topis_eng = \t\t'\".$txtEng.\"' /* opis_eng */\n\t\t\t WHERE sid='\".$sid.\"';\"); die(\"\");\n\t}", "title": "" }, { "docid": "e0c09d3bee2bf56152c6e349d7184042", "score": "0.63452566", "text": "function Extractuj($tresc, $skok)\n\t{\n\t\t//petla dl tresc o skok\n\t}", "title": "" }, { "docid": "0aca847356d78d8c374c1472011579d2", "score": "0.6321703", "text": "public function tampilKelompokSiswa() {\n\n\t\t$sql = \"SELECT\n\t\t\t\t\tsiswa.stat_kelompok AS kondisi,\n\t\t\t\t\tkelompok.kd_kelompok,\n\t\t\t\t\tguru.nama AS guru\n\t\t\t\tFROM siswa,kelompok,guru\n\t\t\t\tWHERE \n\t\t\t\t\tsiswa.kd_kelompok = kelompok.kd_kelompok AND\n\t\t\t\t\tkelompok.nip = guru.nip AND\n\t\t\t\t\tsiswa.nis = :nis;\";\n\n\t\ttry {\n\t\t\t//proses\n\t\t\t$stmt = $this->connect->prepare($sql);\n\t\t\t$stmt->bindParam(':nis', $this->nis);\n\n\t\t\t$stmt->execute();\n\t\t\t$result = $stmt->fetchAll(PDO::FETCH_OBJ);\n\t\t\techo json_encode($result);\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\techo '{\"error\": {\"text\": '.$e->getMessage().'}}';\n\t\t}\n\t}", "title": "" }, { "docid": "6edf3168b00851c0fa84422eef60bb8e", "score": "0.6284699", "text": "static public function Zestawienie()\n\t{\n\t\t//woda piwo |chleb 3elementowa = 10powtórzeń. 2elementowa = 15powtorzeń. czyli 10/15 czyli 66%, żę kupujac wode i piwo kupuej sie chleb \n\t\t//woda chleb |piwo 3elementowa = 10powtorzen. 2elementowa = 11powtorzeń. czyli 10/11 czyli 91%, że kujując wode i chleb kupuje sie piwo <- powinno zaproponowac piwo do listy\n\t\t//piwo chleb |woda 3elementowa = 10powtorzen. 2elementowa = 25powtorzen. czyli 10/25 czyli 40%, ze kupujac piwo i chleb kupuje sie wode \n\t}", "title": "" }, { "docid": "16ec0d93b71dab170ec5fd716c152d9a", "score": "0.62765056", "text": "function sichern() {\n // Prüfung welcher Spieler am Zug ist\n if ($_SESSION['amZug'] == true)\n {\n $_SESSION['summeS1'] += $_SESSION['summeSpielzug'];\n $_SESSION['amZug'] = false;\n }\n else {\n $_SESSION['summeS2'] += $_SESSION['summeSpielzug'];\n $_SESSION['runde'] += 1;\n $_SESSION['amZug'] = true;\n }\n $_SESSION['summeSpielzug'] = 0;\n }", "title": "" }, { "docid": "f8c47aa99c401462184d25f7e0dd18f1", "score": "0.62629974", "text": "abstract public function yapilan_islem ($islem_kodu );", "title": "" }, { "docid": "46faa5fa543e123023ddc7da70512c43", "score": "0.6250829", "text": "public function spracuj($parametre) {\r\n $spravcaPouzivatelov = new SpravcaPouzivatelov();\r\n $pouzivatel = $spravcaPouzivatelov->vratPouzivatela();\r\n $pouzivatelovo_id = $pouzivatel['pouzivatel_id'];\r\n\r\n if (!$pouzivatel)\r\n $this->presmeruj('prihlasenie');\r\n\r\n $zoradit = 'nazov';\r\n if (empty($_GET['zoradit'])) {\r\n //echo 'zoradit je prazdne';\r\n } else {\r\n $zoradit = $_GET['zoradit'];\r\n echo $zoradit;\r\n }\r\n\r\n\r\n\r\n //vytvorenie novej instancie ktora nam umozni vypis zdrojov\r\n $vypisZdrojov = new VypisZdrojov();\r\n //metoda ktora vrati zdroje pre vypis zoznamu vsetkych zdrojov pouzivatela, ktory je proihlaseny\r\n $zdroje = $vypisZdrojov->vratZdrojeBezAutora($pouzivatelovo_id, 'meno');\r\n \r\n //vsetky okruhy\r\n $vsetky_okruhy=$vypisZdrojov->vratVsetkyOkruhy($pouzivatelovo_id);\r\n $vsetky_slova=$vypisZdrojov->vratVsetkySlova($pouzivatelovo_id);\r\n \r\n\r\n \r\n \r\n if (empty($zdroje)) {\r\n $this->presmeruj('Prazdno');\r\n }\r\n\r\n $this->hlavicka['titulok'] = 'Zoznam použitej literatúry';\r\n\r\n $this->data['zdroje'] = $zdroje; //aby sa dalo v pohlade pracovat s premennou zdroje\r\n \r\n $this->data['pouzivatel'] = $pouzivatel; //prenesie do pohladu zdroje pole pouzivatel ktore obsahuje vsetky udaje z tabulky pouzivatel\r\n $this->pohlad = 'zoznam';\r\n }", "title": "" }, { "docid": "f20c7f35af7e013b42075ee5d9d0a60f", "score": "0.6250302", "text": "function SuosikinLisaysToimet() {\n /* Otetaan puuha id post muutujana näkymän formilta */\n $puuhaid = $_POST['puuha_id'];\n $suosikki=luoSuosikki($puuhaid);\n /* Lisätään puuha suosikkeihin */\n $suosikki->LisaaSuosikkeihin();\n $_SESSION['ilmoitus'] = \"Puuha lisätty suosikkeihin.\";\n return $puuhaid;\n}", "title": "" }, { "docid": "e3218fe76e55420b61e8975a76196ad9", "score": "0.62424767", "text": "function sikapsiswa($nilai) {\nif($nilai=='SB'){ \n\t$keterangan = 'Sudah Menunjukkan Sikap Ketaatan menjalankan agama,\nKreatifitas,\nKejujuran,\nKedisiplinan,\nKecermatan,\nKetekunan,\nTanggung Jawab,\nKerja Sama,\nToleransi,\nKesantunan,\nKerensponsifan dan\nKeproaktifan';\n\n}\nelseif($nilai=='B'){ \n\t$keterangan = 'Sudah Menunjukkan Sikap Ketaatan menjalankan agama,\nKreatifitas,\nKejujuran,\nKedisiplinan,\nKecermatan,\nKetekunan,\nTanggung Jawab,\nKerja Sama dan\nToleransi';\n}\nelseif($nilai=='C'){ \n\t$keterangan = 'Sudah Menunjukkan Sikap Ketaatan menjalankan agama,\nKreatifitas,\nKejujuran,\nKedisiplinan,\nKecermatan dan\nKetekunan';\n\n}\nelse { \n\t$keterangan = 'Sudah Menunjukkan Sikap Ketaatan menjalankan agama,\nKreatifitas dan\nKejujuran';\n}\n\treturn $keterangan;\n}", "title": "" }, { "docid": "ea6a10b24ce5bd54a352884038448097", "score": "0.6239184", "text": "static function definisiMeni(){\n\t\t $stavke[0]=array('naziv'=>'home','link'=>'/pilot/home');\n\t\t $stavke[1]=array('naziv'=>'o nama','link'=>'/pilot/onama');\n\t\t if(session_id()!='pilot1sesija1'){\n\t\t\tsession_id('pilot1sesija1');\n\t\t\tsession_start();\n\t\t }\n\t\t if(isset($_SESSION['pravo'])){\n\t\t\t if($_SESSION['pravo']==1 || $_SESSION['pravo']==2){ \n\t\t\t\t$stavke[2]=array('naziv'=>'clanci','link'=>'/pilot/clanci'); \n\t\t\t\t$stavke[3]=array('naziv'=>'korisnici','link'=>'/pilot/korisnici'); \n\t\t\t }\n\t\t \n\t\t }\n\t\t return $stavke;\n\t}", "title": "" }, { "docid": "b024c9b04768cc8ed43c831c3ce35dbd", "score": "0.6235128", "text": "function puuhanPoistoToimet() {\n $puuhaid = $_POST['puuha_id'];\n $poistettavaPuuha = Puuhat::EtsiPuuha($puuhaid);\n Puuhat::PoistaPuuha($puuhaid);\n $_SESSION['ilmoitus'] = \"Puuha poistettu onnistuneesti.\";\n /* Kutsutaan funktiota joka näyttää luokanPuuhat näkymän */\n naytaNakymaLuokanPuuhatSivulle(1, $poistettavaPuuha->getPuuhaluokanId());\n}", "title": "" }, { "docid": "78df780e840822c12313d7e3a5f0b268", "score": "0.6234484", "text": "function jazem($awal,$kata){\n\n\t//normalisasi hamzah\n\t$kata =str_replace(self::$_normalizeAlef, 'ا', $kata);\n\t$kata =trim($kata);\n\t//pecah array berdasarkan spasi\n\t$words\t\t= explode(' ', $kata);\n\t$prevWord\t= null;\n\t$results\t=array();\n\t\tforeach ($words as $word){\n\t\t\tif ($word == ''){\n\t\t\t\tcontinue;\n\t\t\t}\n //hitung jumlah kata\n $wordlen = mb_strlen($word);\t\n \n if ((self::cek_isimnya($word, $prevWord))==true )\n { \n // tanda irob jazem pada fiil mudlori, sukun\n if ((self::huruf_mudloroah($word)==true) &&\n \t(self::akhir_jazem_sukun($word)==true) &&\n \t(self::masuk_amil_jazem($prevWord)==true) &&\n \t(self::kategori_huruf($word)==false) &&\n (self::tengah_ya_afalul_khomsah($word)==false)&& \n (self::isim_dlomir($word)==false) &&\n (self::awal_qod($prevWord))!=true && \n (self::fiil_madli($word))==false || \n (self::awal_saufa($prevWord))==true) \n {\n echo json_encode($word); echo \":{\";\n \techo '\"node\"'; echo \":\"; echo '\"24\",';\n \techo '\"irob\"'; echo \":\"; echo '\"jazem\",';\n \techo '\"tanda\"'; echo \":\"; echo '\"sukun\",';\n \techo '\"nadzom\"'; echo \":\"; echo '\"14\"';\n \techo \"},\"; \n }\n // tanda irob jazem pada fiil mudlori, fathah\n if ((self::huruf_mudloroah($word)==true) &&\n \t(self::akhir_jazem_fathah($word)==true) &&\n \t(self::masuk_amil_jazem($prevWord)==true) &&\n (self::kategori_huruf($word)==false) &&\n (self::isim_dlomir($word)==false) &&\n (self::awal_qod($prevWord))!=true && \n (self::fiil_madli($word))==false || \n (self::awal_saufa($prevWord))==true) \n {\n echo json_encode($word); echo \":{\";\n \techo '\"node\"'; echo \":\"; echo '\"24\",';\n \techo '\"irob\"'; echo \":\"; echo '\"jazem\",';\n \techo '\"tanda\"'; echo \":\"; echo '\"hadz huruf illat\",';\n \techo '\"nadzom\"'; echo \":\"; echo '\"15\"';\n \techo \"},\";\n }\n // tanda irob jazem pada afalul khomsah, hadz\n if ((self::jazem_hadz_nun($word)==true) && \n (self::depan_afalul_khomsah($word)==true)&&\n (self::masuk_amil_jazem($prevWord)==true)) \n {\n echo json_encode($word); echo \":{\";\n \techo '\"node\"'; echo \":\"; echo '\"24\",';\n \techo '\"irob\"'; echo \":\"; echo '\"jazem\",';\n \techo '\"tanda\"'; echo \":\"; echo '\"hadz nun\",';\n \techo '\"nadzom\"'; echo \":\"; echo '\"13\"';\n \techo \"},\";\n } \n \t\t}//end cek\n \t\t$prevWord\t= $word;\n \t\t}\n \t\t$akhir \t\t= microtime(true);\n \t\t$lama\t\t= $akhir - $awal;\n \t\techo '\"durasi_node_24\":';\n \t\techo '\"'.$lama.'\",';\n \t\techo '\"return\":{\"data\":\"ok\"}},';\n\t }", "title": "" }, { "docid": "2b773cab4b2ef64a8252296ea29c627f", "score": "0.6205617", "text": "function tampil_sewa()\n\t{\n\t\t$sewa = mysql_query(\"SELECT sewa.id as id, sewa.tanggal, sewa.kembali, \n\t\t\t\t\t\t\tmember.nama, buku.judul, sewa.harga\n\t\t\t\t\t\t\tFROM sewa, buku, member\n\t\t\t\t\t\t\tWHERE sewa.buku=buku.isbn AND sewa.member=member.no_member\n\t\t\t\t\t\t\tORDER BY tanggal DESC\");\n\t\twhile($tampil = mysql_fetch_array($sewa)){\n\t\t\t$hasil[] = $tampil;\n\t\t}\n\t\treturn $hasil;\n\t}", "title": "" }, { "docid": "5bbdce3f20d8ad4a13bf88f7bd4c6e99", "score": "0.62013537", "text": "public function show(Siswa $siswa)\n {\n //\n }", "title": "" }, { "docid": "5bbdce3f20d8ad4a13bf88f7bd4c6e99", "score": "0.62013537", "text": "public function show(Siswa $siswa)\n {\n //\n }", "title": "" }, { "docid": "5bbdce3f20d8ad4a13bf88f7bd4c6e99", "score": "0.62013537", "text": "public function show(Siswa $siswa)\n {\n //\n }", "title": "" }, { "docid": "5bbdce3f20d8ad4a13bf88f7bd4c6e99", "score": "0.62013537", "text": "public function show(Siswa $siswa)\n {\n //\n }", "title": "" }, { "docid": "5e9b3eb92d0eb0908a6887c55c6c949a", "score": "0.6189894", "text": "function przygotuj()\n\t{\n\t\t\n\t\t for ($i=0; $i < $this->liczba_zadan_c; $i++)\n\t\t {\n\t\t\t$this->ileWykonac_c[$i] = ($this->NWW_c / $this->okres_zadan_c[$i]);\n\t\t\t$this->postep_c[$i] = 0;\n\t\t\t$this->wykonane_c[$i] = 0;\n\t\t\t$this->blokada_c[$i] = -1;\n\t\t\t$this->czy_dostepne_c[$i]= true;\n\t\t\t$this->przydzial_c[$i] = 0;\n\t\t\n\t\t }\n\t\t \n\t\t\t \n\t\t\t\n\t}", "title": "" }, { "docid": "9934a907bc8fadfafd04d29fec90bf3f", "score": "0.61844784", "text": "function Cek_KRSFK($mhsw, $datatahun, $khs, $jad, &$psn) {\r\n $s = \"select * \r\n from krs\r\n where MhswID='$mhsw[MhswID]' and MKID=$jad[MKID]\r\n order by BobotNilai desc\r\n limit 1\";\r\n $r = _query($s);\r\n $w = _fetch_array($r);\r\n $err = 0;\r\n // Jika belum pernah ambil:\r\n if ($jad['NamaKelas'] == 'U') {\r\n if ($w['GradeNilai']{0} == 'E' || empty($w)) {\r\n $err += 1;\r\n $psn .= \"MK $jad[MKKode] harus kelas BARU\";\r\n }\r\n }\r\n if ($jad['NamaKelas'] == 'B') {\r\n $iya = strpos(\"ABCD\", $w['GradeNilai']{0});\r\n if ($iya === false) {}\r\n else { \r\n $err += 1; \r\n $psn .= \"MK $jad[MKKode] harus kelas ULANG\"; \r\n }\r\n }\r\n return ($err > 0)? 1 : 0;\r\n}", "title": "" }, { "docid": "19c720215a71ebf44319f60595b2e35f", "score": "0.6181015", "text": "private function uStupcu(){\n\t\t\tfor( $i = 0; $i < 3; $i++)\n\t\t\t\tif($this->ploca[$i] === $this->ploca[$i+3] &&$this->ploca[$i] === $this->ploca[$i+6] && $this->ploca[$i] !== \"?\"){\n\t\t\t\t\t$_SESSION['pobjednik'] = $this->igrac_na_potezu;\n\t\t\t\t\t$_SESSION['bojanje'] = array( $i, $i+3, $i+6 ); \n\t\t\t\t}\n\t\t}", "title": "" }, { "docid": "66f6c9d78db18603a01b2d1fb59e23d9", "score": "0.61664313", "text": "public function createKdBarangSewa() {\n\t $registry = Zend_Registry::getInstance();\n\t $db = $registry->get('db');\n\t try {\n\t $db->setFetchMode(Zend_Db::FETCH_OBJ);\n\t\t $result = $db->fetchOne('SELECT gen_nosewa()');\n\t\t echo 'hasil kd barang'.$result;\n\t\t return $result;\n\t } catch (Exception $e) {\n $db->rollBack();\n echo $e->getMessage().'<br>';\n\t return 0;\n\t }\n \n\t}", "title": "" }, { "docid": "653121aa69197ee7ba11d28d97c0f756", "score": "0.61627054", "text": "public function dodajUKnjigu(){\n //proveri dal ima vec u knjigu\n // dodaj mu i nista nek ostane na tu stranicu\n }", "title": "" }, { "docid": "466dfc1730d400965ef1e4275360570d", "score": "0.6152435", "text": "public function dodajOcenu(){\n // oceni z\n // prikazi opet to jelo.\n // znaci pozove prikazi\n }", "title": "" }, { "docid": "5a3795c95e0688d65fd09f687be0f1a8", "score": "0.6115464", "text": "private function uRetku(){\n\t\t\tfor( $i = 0; $i < 3; $i++)\n\t\t\t\tif($this->ploca[$i*3] === $this->ploca[$i*3+1] && \n\t\t\t\t\t$this->ploca[$i*3] === $this->ploca[$i*3+2] && $this->ploca[$i*3] !== \"?\"){\n\t\t\t\t\t$_SESSION['pobjednik'] = $this->igrac_na_potezu;\n\t\t\t\t\t$_SESSION['bojanje'] = array( $i*3, $i*3+1, $i*3+2 );\n\t\t\t\t}\n\t\t}", "title": "" }, { "docid": "383d105b3a45b7d214eb340433554524", "score": "0.61141145", "text": "function fluas($sisi1,$sisi2=''):void{\n //menginilisasi parameter dengan ' ' agar parameter sisi 2 mati\n $this->luas=3.14*$this->jari2*$this->jari2;\n }", "title": "" }, { "docid": "eddc88dc76440bf0287d885380966bc6", "score": "0.61139315", "text": "public function actionGetSiswa($id){\n // Ambil semua siswa yang ada sudah di assign ke kelas\n $tahun_ajaran_semester = TahunAjaranSemester::find()->where(['is_active' => 1])->one();\n // Ambil semua kelas yang ada\n $semua_tahun_ajaran_kelas = $tahun_ajaran_semester->tahunAjaranKelas;\n // Ambil semua siswa yang ada di semua kelas\n $siswa_sudah_memiliki_kelas = array();\n foreach ($semua_tahun_ajaran_kelas as $value){\n $kelas_siswa = $value->kelasSiswa;\n foreach ($kelas_siswa as $value1){\n $siswa_sudah_memiliki_kelas[] = $value1->nisn;\n }\n }\n\n\n // Ambil semua siswa yang terpilih per angkatan\n $angkatan_id = Yii::$app->request->post('angkatan_id');\n $siswa_per_angkatan = Siswa::find()->where(['angkatan_id' => $angkatan_id])->all();\n // Masukkan semua nisn siswa yang sudah diambil perangkatan tadi\n $nisn_semua_siswa_per_angkatan = array();\n foreach ($siswa_per_angkatan as $value){\n $nisn_semua_siswa_per_angkatan[] = $value->nisn;\n }\n\n // Mencari siswa yang belum memiliki kelas\n $penampung = array();\n foreach ($nisn_semua_siswa_per_angkatan as $value){\n if(!in_array($value, $siswa_sudah_memiliki_kelas)){\n $penampung[] = $value;\n }\n }\n\n // Ambil model siswa yang belum memiliki kelas\n $siswa_belum_memiliki_kelas = array();\n foreach ($penampung as $value){\n $siswa_belum_memiliki_kelas[] = Siswa::findOne($value);\n }\n \\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n return [\n 'siswa' => $siswa_belum_memiliki_kelas,\n ];\n }", "title": "" }, { "docid": "018a3ab44515a1ef0a90dc0457baecde", "score": "0.6110746", "text": "function DaftarSesiMhsw($mhswid, $mhsw) {\r\n $MaxCuti = 4;\r\n $JmlCuti = GetaField('khs', \"MhswID='$mhswid' and StatusMhswID\", 'C', \"count(KHSID)\")+0;\r\n if ($JmlCuti >= $MaxCuti ) echo Konfirmasi1(\"Mahasiswa telah cuti sebanyak $JmlCuti. Tidak dapat mengajukan cuti lagi.\");\r\n $s = \"select k.*, sm.Nama as STA, sm.Nilai,\r\n format(k.SaldoAwal, 0) as SAWAL,\r\n format(k.Biaya, 0) as BIA,\r\n format(k.Bayar, 0) as BYR,\r\n format(k.Tarik, 0) as TRK,\r\n format(k.Potongan, 0) as POT,\r\n (k.SaldoAwal - k.Biaya + k.Bayar - k.Tarik + k.Potongan) as SALK,\r\n format(k.SaldoAwal-k.Biaya+k.Bayar-k.Tarik+k.Potongan, 0) as _SALK\r\n from khs k\r\n left outer join statusmhsw sm on k.StatusMhswID=sm.StatusMhswID\r\n where k.MhswID='$mhswid'\r\n order by k.Sesi\";\r\n $r = _query($s); $tot = 0;\r\n echo \"<p><table class=box cellspacing=1>\";\r\n echo \"<tr><th class=ttl>Smt</th>\r\n <th class=ttl>Tahun</th>\r\n <th class=ttl>Saldo Awal</th>\r\n <th class=ttl>Biaya2</th>\r\n <th class=ttl>Potongan2</th>\r\n <th class=ttl>Bayar2</th>\r\n <th class=ttl>Tarikan2</th>\r\n <th class=ttl>Total</th>\r\n <th class=ttl>Status</th>\r\n <th class=ttl>Frm Cuti</th>\r\n <th class=ttl>SK Cuti</th>\r\n <th class=ttl>KSS</th>\r\n <th class=ttl>Keterangan</th>\r\n </tr>\";\r\n while ($w = _fetch_array($r)) {\r\n $tot += $w['SALK'];\r\n $c = ($w['SALK'] == 0)? 'class=ul' : 'class=wrn';\r\n $st = ($w['Nilai'] == 1) ? 'class=ul' : 'class=nac';\r\n if ($w['StatusMhswID'] == 'C') {\r\n //GetArrayTable($sql, $key, $label, $separator=', ') {\r\n $ket = GetArrayTable(\"select TahunID from cuti where MhswID='$mhswid' order by TahunID\",\r\n 'TahunID', 'TahunID');\r\n $btn = '&nbsp;';\r\n $sk = $w['NoSurat'];\r\n $ctk1 = \"<a href='?mnux=kss&gos=cekkss&tahun=$w[TahunID]&mhswid=$w[MhswID]&khsid=$w[KHSID]'>\r\n <img src='img/printer.gif'></a>\";\r\n } \r\n else {\r\n $ket = '&nbsp;';\r\n $ctk1 = '&nbsp;';\r\n if ($JmlCuti >= $MaxCuti) {\r\n $btn = \"&times;\";\r\n $sk = $w['NoSurat'];\r\n }\r\n else{\r\n $btn = \"<a href='cetak/cuti.cetak.php?mhswid=$mhswid&tahun=$w[TahunID]' target=_blank title='Cetak Formulir Cuti'><img src='img/printer.gif'></a>\";\r\n $sk = \"<a href='?mnux=cuti&gos=SKCuti&mhswid=$mhswid&tahun=$w[TahunID]&khsid=$w[KHSID]' title='Buat SK Cuti Kuliah'><img src='img/gear.gif' width=20></a>\";\r\n }\r\n }\r\n echo \"<tr>\r\n <td class=inp>$w[Sesi]</td>\r\n <td class=ul>$w[TahunID]</td>\r\n <td class=ul align=right>$w[SAWAL]</td>\r\n <td class=ul align=right>$w[BIA]</td>\r\n <td class=ul align=right>$w[BYR]</td>\r\n <td class=ul align=right>$w[TRK]</td>\r\n <td class=ul align=right>$w[POT]</td>\r\n <td $c align=right>$w[_SALK]</td>\r\n <td $st>$w[STA]</td>\r\n <td class=ul align=center>$btn</td>\r\n <td class=ul align=center>$sk&nbsp;</td>\r\n <td class=ul align=center>$ctk1</td>\r\n <td class=ul>$ket&nbsp;</td>\r\n </tr>\";\r\n }\r\n $_tot = number_format($tot);\r\n $c = ($tot >= 0) ? 'class=ul' : 'class=wrn';\r\n echo \"<tr><td colspan=7 align=right>Saldo Akhir :</td>\r\n <td $c align=right><b>$_tot</b></td></tr>\";\r\n echo \"</table></p>\";\r\n}", "title": "" }, { "docid": "9aebdd9d7fc2e9a6947523e855062557", "score": "0.61034864", "text": "function rofa($awal,$kata){\n\t\techo '\"irob\": {';\n\t\techo '\"debug\":\"on\",';\n\t//normalisasi hamzah\n\t$kata =str_replace(self::$_normalizeAlef, 'ا', $kata);\n\t$kata =trim($kata);\n\t//pecah array berdasarkan spasi\n\t$words\t\t= explode(' ', $kata);\n\t$prevWord\t= null;\n\t$results\t=array();\n\t\tforeach ($words as $word){\n\t\t\tif ($word == ''){\n\t\t\t\tcontinue;\n\t\t\t}\n //hitung jumlah kata\n $wordlen = mb_strlen($word);\n\n if ((self::cek_isimnya($word, $prevWord))==false )\n {\n\n if (in_array($prevWord, self::$_kalimahHuruf)) {\n //echo $word.\" isim\";\n //return true;\n }\n\n if (in_array($prevWord, self::$_huruf_jar)) {\n //echo $word.\" isim mufrod\";\n //return true;\n }\n if (in_array($prevWord, self::$_huruf_nida)) {\n // echo $word.\"rofa\" .\"\";\n //return true;\n }\n //berupa huruf afalul khomsah \t\n\t\tif (in_array($word, self::$_asmaul_khomsah)) {\n \techo json_encode($word); echo \":{\";\n \techo '\"node\"'; echo \":\"; echo '\"21\",';\n \techo '\"irob\"'; echo \":\"; echo '\"rofa\",';\n \techo '\"tanda\"'; echo \":\"; echo '\"wawu\",';\n \techo '\"nadzom\"'; echo \":\"; echo '\"2\"';\n \techo \"},\";\n \t}\n //jika hurufnya ada salah satu kata:\n if (mb_substr($word, 0, 1) == 'ب' ||\n \tmb_substr($word, 0, 1) == 'م' && \n\t\t mb_substr($word, 1, 1) == 'ب' || \n\t\t mb_substr($word, 1, 1) == 'ف' || \n\t\t mb_substr($word, 1, 1) == 'م' && \n\t\t $wordLen > 3) \n \t\t{\n\t\t return true;\n\t\t }\n //bisa kemasukan huruf nida'\n if (in_array($prevWord, self::$_huruf_nida)) {\n return true;\n }\n // isim mufrod, dengan al\n if ( (self::huruf_al($word)==true) \n && (self::tanwin_mufrod_rofa($word)==true) \n && (self::j_muannats_salim($word)==false)\n && (self::jama_taksir($word)==false) \n && (self::isim_tasniyah($word)==false) \n && (self::isim_tasniyah_irob($word)==false) \n && (self::j_mudzakar_salim_irob($word)==false)\n &&(self::j_mudzakar_salim($word)==false)\n &&(self::isim_maushul($word)==false)\n &&(self::kategori_huruf($word)==false)\n \t \t)\n {\n\t\t $results[] = $word;\n\t\t \techo json_encode($word); echo \":{\";\n \techo '\"node\"'; echo \":\"; echo '\"21\",';\n \techo '\"irob\"'; echo \":\"; echo '\"rofa\",';\n \techo '\"tanda\"'; echo \":\"; echo '\"dlommah\",';\n \techo '\"nadzom\"'; echo \":\"; echo '\"1\"';\n \techo \"},\";\n\t\t \tif( empty($results) ) \n\t\t \t{ echo 'No matches found.'; }\n\t\t }\n\t\t// isim mufrod tanpa al\n\t\tif ((self::huruf_al($word)==false) && \n\t\t\t(self::tanwin_akhir_rofa($word)==true) && \n\t\t\t(self::j_muannats_salim($word)==false) && \n\t\t\t(self::jama_taksir($word)==false) &&\n\t\t\t(self::kategori_huruf($word)==false))\n \t {\n\t\t $results[] = $word;\n\t\t echo json_encode($word); echo \":{\";\n \techo '\"node\"'; echo \":\"; echo '\"21\",';\n \techo '\"irob\"'; echo \":\"; echo '\"rofa\",';\n \techo '\"tanda\"'; echo \":\"; echo '\"dlommah\",';\n \techo '\"nadzom\"'; echo \":\"; echo '\"1\"';\n \techo \"},\";\n\t\t if( empty($results) ) \n\t\t { echo 'No matches found.'; }\n\t\t }\n\t\t// tasniyah tanpa al \n\t\tif ((self::huruf_al($word)==false) && \n\t\t\t(self::isim_tasniyah($word))==true && \n\t\t\t(self::harakat_kasroh($word))==true )\n \t {\n\t\t $results[] = $word;\n\t\t echo json_encode($word); echo \":{\";\n \techo '\"node\"'; echo \":\"; echo '\"21\",';\n \techo '\"irob\"'; echo \":\"; echo '\"rofa\",';\n \techo '\"tanda\"'; echo \":\"; echo '\"alif\",';\n \techo '\"nadzom\"'; echo \":\"; echo '\"3\"';\n \techo \"},\";\n\t\t if( empty($results) ) \n\t\t { echo 'No matches found.'; }\n\t\t } \n\t\t//tasniyah dengan al \n\t\tif ((self::huruf_al($word)==true) && \n\t\t\t(self::isim_tasniyah($word))==true && \n\t\t\t(self::harakat_kasroh($word))==true ) \n \t {\n\t\t $results[] = $word;\n\t\t echo json_encode($word); echo \":{\";\n \techo '\"node\"'; echo \":\"; echo '\"21\",';\n \techo '\"irob\"'; echo \":\"; echo '\"rofa\",';\n \techo '\"tanda\"'; echo \":\"; echo '\"alif\",';\n \techo '\"nadzom\"'; echo \":\"; echo '\"3\"';\n \techo \"},\";\n\t\t if( empty($results) ) \n\t\t { echo 'No matches found.'; }\n\t\t }\n\t\t//jama' muannat salim tanpa al\n\t\tif ((self::huruf_al($word)==false) &&\n\t\t\t(self::j_muannats_salim($word)==true)) \n \t {\n\t\t $results[] = $word;\n\t\t echo json_encode($word); echo \":{\";\n \techo '\"node\"'; echo \":\"; echo '\"21\",';\n \techo '\"irob\"'; echo \":\"; echo '\"rofa\",';\n \techo '\"tanda\"'; echo \":\"; echo '\"dlommah\",';\n \techo '\"nadzom\"'; echo \":\"; echo '\"1\"';\n \techo \"},\";\n\t\t if( empty($results) ) \n\t\t { echo 'No matches found.'; }\n\t\t }\n\t\t//jama' muannat salim dengan al\n\t\tif ((self::huruf_al($word)==true) &&\n\t\t\t(self::j_muannats_salim($word)==true)) \n \t {\n\t\t $results[] = $word;\n\t\t echo json_encode($word); echo \":{\";\n \techo '\"node\"'; echo \":\"; echo '\"21\",';\n \techo '\"irob\"'; echo \":\"; echo '\"rofa\",';\n \techo '\"tanda\"'; echo \":\"; echo '\"dlommah\",';\n \techo '\"nadzom\"'; echo \":\"; echo '\"1\"';\n \techo \"},\";\n\t\t if( empty($results) ) \n\t\t { echo 'No matches found.'; }\n\t\t }\n\t\t//jama' mudzakar salim tanpa al\n\t\tif ((self::huruf_al($word)==false) &&\n\t\t\t(self::j_mudzakar_salim($word)==true) &&\n\t\t\t(self::huruf_mudloroah($word)==false)) \n \t {\n\t\t $results[] = $word;\n\t\t echo json_encode($word); echo \":{\";\n \techo '\"node\"'; echo \":\"; echo '\"21\",';\n \techo '\"irob\"'; echo \":\"; echo '\"rofa\",';\n \techo '\"tanda\"'; echo \":\"; echo '\"wawu\",';\n \techo '\"nadzom\"'; echo \":\"; echo '\"2\"';\n \techo \"},\";\n\t\t if( empty($results) ) \n\t\t { echo 'No matches found.'; }\n\t\t }\n\t\t//jama' mudzakar salim dengan al\n\t\tif ((self::huruf_al($word)==true) &&\n\t\t\t(self::j_mudzakar_salim($word)==true)) \n \t {\n\t\t $results[] = $word;\n\t\t echo json_encode($word); echo \":{\";\n \techo '\"node\"'; echo \":\"; echo '\"21\",';\n \techo '\"irob\"'; echo \":\"; echo '\"rofa\",';\n \techo '\"tanda\"'; echo \":\"; echo '\"wawu\",';\n \techo '\"nadzom\"'; echo \":\"; echo '\"2\"';\n \techo \"},\";\n\t\t if( empty($results) ) \n\t\t { echo 'No matches found.'; }\n\t\t }\n\t\t//jama' taksir\n\t\tif (self::jama_taksir($word)==true) \n \t {\n\t\t $results[] = $word;\n\t\t \techo json_encode($word); echo \":{\";\n \techo '\"node\"'; echo \":\"; echo '\"21\",';\n \techo '\"irob\"'; echo \":\"; echo '\"rofa\",';\n \techo '\"tanda\"'; echo \":\"; echo '\"dlommah\",';\n \techo '\"nadzom\"'; echo \":\"; echo '\"1\"';\n \techo \"},\";\n\t\t if( empty($results) ) \n\t\t { echo 'No matches found.'; }\n\t\t }\n\t\t}//end cek\n\t\n else{\n\t\t//dari fiil\n\n\t\t//ciri rafa berharakat dlummah \t\t\n\t\tif ((self::huruf_mudloroah($word)==true) &&\n (self::akhir_rofa_dlommah($word)==true) &&\n (self::masuk_amil_nashob($prevWord)==false) &&\n (self::kategori_huruf($word)==false) && \n (self::isim_dlomir($word)==false) && \n (self::sukun_amr_belakang($word)==false) &&\n (self::awal_qod($prevWord))!=true && \n (self::fiil_madli($word))==false || \n (self::awal_saufa($prevWord))==true ||\n (self::awal_ma_nafi($prevWord))==true)\n {\n echo json_encode($word); echo \":{\";\n \techo '\"node\"'; echo \":\"; echo '\"21\",';\n \techo '\"irob\"'; echo \":\"; echo '\"rofa\",';\n \techo '\"tanda\"'; echo \":\"; echo '\"dlommah\",';\n \techo '\"nadzom\"'; echo \":\"; echo '\"1\"';\n \techo \"},\"; \n }\n //berupa huruf nun, qod, saufa \n if ((self::huruf_mudloroah($word)==true) &&\n \t(self::rofa_nun($word)==true) &&\n (self::kategori_huruf($word)==false) && \n (self::isim_dlomir($word)==false) && \n (self::sukun_amr_belakang($word)==false) &&\n (self::awal_qod($prevWord))!=true && \n (self::fiil_madli($word))==false || \n (self::awal_saufa($prevWord))==true ||\n (self::awal_ma_nafi($prevWord))==true) \n { \n echo json_encode($word); echo \":{\";\n \techo '\"node\"'; echo \":\"; echo '\"21\",';\n \techo '\"irob\"'; echo \":\"; echo '\"rofa\",';\n \techo '\"tanda\"'; echo \":\"; echo '\"nun\",';\n \techo '\"nadzom\"'; echo \":\"; echo '\"4\"';\n \techo \"},\"; \n } \n\t\t }//end fiil\n\n\t\t$prevWord = $word;\n\t\t}\n\t\t$akhir = microtime(true);\n\t\t$lama = $akhir - $awal;\n\t\techo '\"durasi_node_21\":';\n\t\techo'\"'.$lama.'\",';\t \n\t}", "title": "" }, { "docid": "bb25f77d0494622264b6984cc3ab128b", "score": "0.6102247", "text": "function KirimSMS ($notujuan,$isipesan,$userkey,$passkey){\r\n\t$isi=urlencode($isipesan);\r\n\t$hp=str_replace('+62', '0', $notujuan);\r\n\t$hp=str_replace(' ', '', $hp);\r\n\t$hp=str_replace('.', '', $hp);\r\n\t$hp=str_replace(',', '', $hp);\r\n\t$ho=trim($hp);\r\n\t$url=\"https://reguler.zenziva.net/apps/smsapi.php?userkey=$userkey&passkey=$passkey&nohp=$hp&pesan=$isi\";\r\n\t$data=file_get_contents($url);\r\n\tif(eregi('success', $data)){\r\n\t\t$hasil='1';\r\n\t}else{\r\n\t\t$hasil='0';\r\n\t}\r\n\treturn $hasil;\r\n\t}", "title": "" }, { "docid": "83672a932e48f4092f4ee1ddc13c97cd", "score": "0.6090541", "text": "public function cek_pb_konek_st_ct(Penerima $pb,$jenis_cek='all',$is_lulus=false,$luaran=false){\r\n if($pb->get_kd_pb()=='' || is_null($pb->get_kd_pb())) return false;\r\n \r\n if($pb->get_st()=='' || is_null($pb->get_st())){\r\n $pb = $pb->get_penerima_by_id($pb);\r\n }\r\n $kd_st = $pb->get_st();\r\n $status = $pb->get_status();\r\n switch($jenis_cek){\r\n case 'all':\r\n if(!$is_lulus){ //status belum lulus\r\n $sts_cuti = $this->cek_pb_konek_st_ct($pb, 'cuti',false); //cek masih cuti?\r\n// var_dump($sts_cuti);\r\n if($sts_cuti){ \r\n $status = $this->cek_pb_konek_st_ct($pb, 'cuti',false,true);\r\n if($luaran){\r\n return $status;\r\n } \r\n return true;\r\n }else{ //jika tidak dalam keadaan cuti\r\n $status = $this->cek_pb_konek_st_ct($pb, 'st', false, true);\r\n return $status;\r\n }\r\n }else{\r\n //TO DO cek lebih ke st, tp cek dulu dia dalam keadaancuti apa tidak\r\n //klo dalam keadaan cuti ya tidak bisa dong, harus dikembalikan ke cuti\r\n $sts_cuti = $this->cek_pb_konek_st_ct($pb, 'cuti',true);\r\n if($sts_cuti){\r\n $status = $this->cek_pb_konek_st_ct($pb,'cuti',true,true);\r\n if($luaran){\r\n return $status;\r\n }\r\n return true;\r\n }else{\r\n $status = $this->cek_pb_konek_st_ct($pb, 'st', true, true);\r\n return $status;\r\n }\r\n \r\n }\r\n break;\r\n case 'cuti':\r\n $ct = new Cuti($this->registry);\r\n $d_ct = $ct->get_cuti(Session::get('kd_user'), $pb);\r\n //TO DO cek apakah masa cuti masih ada\r\n $exist_data = count($d_ct)>0;\r\n if($exist_data){\r\n if($luaran){\r\n return 4; //saat cuti tidak boleh lulus\r\n }else{\r\n return true;\r\n }\r\n }else{\r\n if($is_lulus){ //untuk kode lulus\r\n if($luaran){\r\n $status = $this->cek_pb_konek_st_ct($pb, 'st', true, true); //kode untuk lulus\r\n return $status;\r\n }else{\r\n //TO DO kembalian boolean\r\n return true;\r\n }\r\n }else{ //untuk kode belum lulus\r\n if($luaran){\r\n $status = $this->cek_pb_konek_st_ct($pb, 'st', false, true); //kode sebelum lulus\r\n return $status;\r\n }else{\r\n //TO DO kembalian boolean\r\n return false;\r\n }\r\n }\r\n \r\n if(!$luaran) return false;\r\n }\r\n break;\r\n case 'st':\r\n $st = new SuratTugas($this->registry);\r\n $st->set_kd_st($kd_st);\r\n $st = $st->get_surat_tugas_by_id($st);\r\n $tgl_sel_st = $st->get_tgl_selesai();\r\n $child = $st->is_child($kd_st); //child pertama\r\n if($child){\r\n $st_child = new SuratTugas($this->registry);\r\n $st_child->set_kd_st($st->get_st_lama()); //st parent\r\n $st_child = $st_child->get_surat_tugas_by_id($st_child);\r\n $second_child = $st_child->is_child($st_child->get_kd_st());\r\n if($second_child){ //jika child kedua\r\n if($is_lulus) { //untuk status lulus\r\n if($pb->get_tgl_lapor()=='' || is_null($pb->get_tgl_lapor())){\r\n $tgl_lapor = date('Y-m-d');\r\n }else{\r\n $tgl_lapor = $pb->get_tgl_lapor();\r\n }\r\n $status = $pb->get_status_change_pb($st, $tgl_lapor, $tgl_sel_st);\r\n }else{\r\n $status = 3;\r\n }\r\n return $status;\r\n }else{\r\n if($is_lulus){\r\n if($pb->get_tgl_lapor()=='' || is_null($pb->get_tgl_lapor())){\r\n $tgl_lapor = date('Y-m-d');\r\n }else{\r\n $tgl_lapor = $pb->get_tgl_lapor();\r\n }\r\n $status = $pb->get_status_change_pb($st, $tgl_lapor, $tgl_sel_st);\r\n }else{\r\n $status = 2;\r\n }\r\n return $status;\r\n }\r\n }else{\r\n return 1;\r\n }\r\n break;\r\n default:\r\n throw new Exception();\r\n }\r\n }", "title": "" }, { "docid": "4c382e1632ee0c9d667dc930ef09e8a8", "score": "0.6087608", "text": "function detalListPengirimanKainjadi(){\n\n\n }", "title": "" }, { "docid": "813e0aaa9da69b35930d285de1421d6e", "score": "0.6083596", "text": "abstract public function getPasiekimai();", "title": "" }, { "docid": "9e5206e34e9f0c5aa42874827cc1e829", "score": "0.6082735", "text": "public function top_siswa()\n {\n $siswas = [];\n $wawasan_umum = [];\n $kemampuan_bicara = [];\n $karya_cipta = [];\n $kepimimpinan = [];\n $prestasi = [];\n $perilaku = [];\n $usia = [];\n\n $bobot = [\n 'wawasan_umum' => 0.28,\n 'kemampuan_bicara' => 0.2,\n 'karya_cipta' => 0.15,\n 'kepimimpinan' => 0.12,\n 'prestasi' => 0.1,\n 'perilaku' => 0.1,\n 'usia' => 0.05,\n ];\n\n $model = Penilaian::all();\n $siswas = $model->toArray();\n foreach($siswas as $key => $siswa){\n array_push($wawasan_umum, $siswa['wawasan_umum']);\n array_push($kemampuan_bicara, $siswa['kemampuan_bicara']);\n array_push($karya_cipta, $siswa['karya_cipta']);\n array_push($kepimimpinan, $siswa['kepimimpinan']);\n array_push($prestasi, $siswa['prestasi']);\n array_push($perilaku, $siswa['perilaku']);\n array_push($usia, $siswa['usia']);\n }\n //mencari nilai tertinggi tiap masing masing kriteria\n $max_wawasan_umum = max($wawasan_umum);\n $max_kemampuan_bicara = max($kemampuan_bicara);\n $max_karya_cipta = max($karya_cipta);\n $max_kepimimpinan = max($kepimimpinan);\n $max_prestasi = max($prestasi);\n $max_perilaku = max($perilaku);\n $max_usia = max($usia);\n //pembagian masing masing nilai kriteria oleh nilai maximum\n $wawasan_umum = array_map( function($val,$divider,$multiplier) { return $val/$divider*$multiplier ; }, $wawasan_umum,array_fill(0, count($wawasan_umum), $max_wawasan_umum),array_fill(0, count($wawasan_umum), $bobot['wawasan_umum']));\n $kemampuan_bicara = array_map( function($val,$divider,$multiplier) { return $val/$divider*$multiplier ; }, $kemampuan_bicara,array_fill(0, count($kemampuan_bicara), $max_kemampuan_bicara),array_fill(0, count($kemampuan_bicara), $bobot['kemampuan_bicara']));\n $karya_cipta = array_map( function($val,$divider,$multiplier) { return $val/$divider*$multiplier ; }, $karya_cipta,array_fill(0, count($karya_cipta), $max_karya_cipta),array_fill(0, count($karya_cipta), $bobot['karya_cipta']));\n $kepimimpinan = array_map( function($val,$divider,$multiplier) { return $val/$divider*$multiplier ; }, $kepimimpinan,array_fill(0, count($kepimimpinan), $max_kepimimpinan),array_fill(0, count($kepimimpinan), $bobot['kepimimpinan']));\n $prestasi = array_map( function($val,$divider,$multiplier) { return $val/$divider*$multiplier ; }, $prestasi,array_fill(0, count($prestasi), $max_prestasi),array_fill(0, count($prestasi), $bobot['prestasi']));\n $perilaku = array_map( function($val,$divider,$multiplier) { return $val/$divider*$multiplier ; }, $perilaku,array_fill(0, count($perilaku), $max_perilaku),array_fill(0, count($perilaku), $bobot['perilaku']));\n $usia = array_map( function($val,$divider,$multiplier) { return $val/$divider*$multiplier ; }, $usia,array_fill(0, count($usia), $max_usia),array_fill(0, count($usia), $bobot['usia']));\n\n foreach ($siswas as $key => $value) {\n $siswas[$key]['totalSkor'] = $wawasan_umum[$key] + $kemampuan_bicara[$key] + $karya_cipta[$key] + $kepimimpinan[$key] + $prestasi[$key] + $perilaku[$key] + $usia[$key];\n }\n\n usort($siswas, function ($object1, $object2) {\n return $object2['totalSkor'] > $object1['totalSkor'];\n });\n \n return view('dashboard.homepage')->with([\n 'siswas' => $siswas,\n ]);\n }", "title": "" }, { "docid": "ad018f65d5ea27893ca4ab459ea4196b", "score": "0.60781777", "text": "public function sekolah($id){\n\t \t$data['sekolah']=$this->db->select('nama_sekolah')->where('nama_sekolah',12)->get('tb_siswa')->row();\n\t \t// print_r($data['sekolah']);\n\t // \tdie();\n\n\t\t$data['siswa']=$this->db->where('nama_sekolah',$id)->get('tb_siswa')->result();\n\t\t$this->template->display('sekolah/index_sekolah', $data);\n\t}", "title": "" }, { "docid": "ea17534b2818b98c0d5785ff32bbb6cf", "score": "0.6076312", "text": "static function definisiSesiju(){\n\t\tif(session_id()==''){\n\t\t\tsession_start();\n\t\t}\n\t\tisset($_SESSION['id']) ? $sesija['id']=$_SESSION['id'] : $sesija['id']=null;\n\t\tisset($_SESSION['kor_ime']) ? $sesija['kor_ime']=$_SESSION['kor_ime'] : $sesija['kor_ime']=null;\n\t\tisset($_SESSION['pravo']) ? $sesija['pravo']=$_SESSION['pravo'] : $sesija['pravo']=null;\n\t\t\n\t\treturn $sesija;\n\t}", "title": "" }, { "docid": "fd6cb8596bee3cdd6c808b4d8a1b32d8", "score": "0.60733575", "text": "function hitung_learning_style($idsiswa){\n\t$infosiswa = $this->model_dashboard->get_info_siswa($idsiswa);\n\t$carikelas = $this->model_dashboard->get_kelas($idsiswa);\n\t$kelas = $carikelas->kelas;\n\t\n\t$kategoridiagnostic = $this->model_agcu->get_diagnosticbykelas($kelas);\n\t$datasoal = $this->model_agcu->get_jumlahsoal();\n\t\n\t$jumlahbenar = $this->model_agcu->get_jumlah_benar($idsiswa);\n\t\n\t$jumlahhasil = $this->model_agcu->get_jumlah_hasil();\n\t$jumlahbenarhasil = $this->model_agcu->get_jumlah_benar_hasil();\n\t\n\t$analisistopik = $this->model_agcu->get_analisis_topik($idsiswa);\n\t\n\t\n\t$skor = $this->model_lstest->skor($idsiswa);\n\t$hasildiagnostic = $this->model_agcu->get_ordered_hasildiagnostic();\n\t$peringkatsiswa = $this->model_agcu->get_peringkatsiswabykelas($kelas);\n\t\n\tforeach($skor as $dataskor){\n\t\t$hasil[$dataskor->no] = $dataskor->skor;\n\t}\n\t\n\tfor($x = 1; $x<=50; $x++){\n\t\tif(!isset($hasil[$x])){\n\t\t\t$hasil[$x] = 0;\n\t\t}\n\t}\n\t\n\t$v1 = $hasil[11] + $hasil[12] + $hasil[13] + $hasil[14] + $hasil[15] + $hasil[16] + $hasil[17] + $hasil[18] + $hasil[19] + $hasil[20];\n\t\n\t$a1 = $hasil[21] + $hasil[22] + $hasil[23] + $hasil[24] + $hasil[25] + $hasil[26] + $hasil[27] + $hasil[28] + $hasil[29] + $hasil[30] + $hasil[31];\n\t\n\t$k1 = $hasil[21] + $hasil[22] + $hasil[23] + $hasil[24] + $hasil[25] + $hasil[26] + $hasil[27] + $hasil[28] + $hasil[29] + $hasil[30] + $hasil[31];\n\t\n\t$no = 1;\n\tfor($i=1; $i<=50; $i++){\n\t\tif($hasil[$no] == \"V\"){\n\t\t\tif(!isset($v2)){\n\t\t\t\t$v2 = 1;\n\t\t\t}else{\n\t\t\t\t$v2 += 1;\n\t\t\t}\n\t\t}\n\t\t$no++;\n\t}\n\t\n\t$x = 1;\n\tfor($i=1; $i<=50; $i++){\n\t\tif($hasil[$x] == \"A\"){\n\t\t\tif(!isset($a2)){\n\t\t\t\t$a2 = 1;\n\t\t\t}else{\n\t\t\t\t$a2 += 1;\n\t\t\t}\n\t\t}\n\t\t$x++;\n\t}\n\t\n\t$y = 1;\n\tfor($i=1; $i<=50; $i++){\n\t\tif($hasil[$y] == \"K\"){\n\t\t\tif(!isset($k2)){\n\t\t\t\t$k2 = 1;\n\t\t\t}else{\n\t\t\t\t$k2 += 1;\n\t\t\t}\n\t\t}\n\t\t$y++;\n\t}\n\t\n\tif(!isset($v1)){\n\t\t$v1 = 0;\n\t}\n\tif(!isset($a1)){\n\t\t$a1 = 0;\n\t}\n\tif(!isset($k1)){\n\t\t$k1 = 0;\n\t}\n\tif(!isset($v2)){\n\t\t$v2 = 0;\n\t}\n\tif(!isset($a2)){\n\t\t$a2 = 0;\n\t}\n\tif(!isset($k2)){\n\t\t$k2 = 0;\n\t}\n\t\n\t$totalv = $v1 + $v2;\n\t$totala = $a1 + $a2;\n\t$totalk = $k1 + $k2;\n\t\n\t$karakteristikv = '';\n\t$karakteristika = '';\n\t$karakteristikk = '';\n\t\n\t\n\tif($totalv > $totala and $totalv > $totalk){\n\t\treturn \"V\";\n\t}elseif($totala > $totalv and $totala > $totalk){\n\t\treturn \"A\";\n\t}elseif($totalk > $totalv and $totalk > $totala){\n\t\treturn \"K\";\n\t}elseif($totalv == $totala and $totalv > $totalk){\n\t\treturn \"VA\";\n\t}elseif($totalv == $totalk and $totalv > $totala){\n\t\treturn \"VK\";\n\t}elseif($totala == $totalk and $totala > $totalv){\n\t\treturn \"AK\";\n\t}elseif($totalv == $totala and $totalv == $totalk){\n\t\treturn \"VAK\";\n\t}\n}", "title": "" }, { "docid": "4ae8d9dcdf4c86a4bc6224e0808a81f9", "score": "0.60642815", "text": "function pretragaJelaPoSastojku($val) {\n $input = str_replace('%20', ' ', $val);\n $input = trim($input);\n $jela = $this->M_Sastojak->dohvatiJelaZaSastojak($input);\n \n $niz = [];\n \n foreach ($jela as $jelo) {\n $klasa = new stdClass();\n $klasa->IdJelo = $jelo->IdJelo;\n $klasa->IdRestoran = $jelo->IdKorisnik;\n if ($jelo->Opis != null) {\n $klasa->Opis = $jelo->Opis;\n }else {\n $klasa->Opis = \"Trenutno ne postoji opis.\";\n }\n $klasa->Naziv = $jelo->Naziv;\n $klasa->Putanja = $this->M_Slika->dohvatiPutanju($jelo->IdSlika)->Putanja;\n $klasa->Recenzija = $this->M_Recenzija->dohvatiJednuRecenziju($jelo->IdJelo);\n \n if ($klasa->Recenzija == null) {\n $klasa->Recenzija = \"Nema recenzije za ovo jelo.\";\n } else {\n $klasa->Recenzija = $klasa->Recenzija->Komentar;\n }\n \n $klasa->Restoran = $this->M_Restoran->dohvatiRestoran($jelo->IdKorisnik)->imeRestorana;\n \n $sastojci = $this->M_Sastojak->dohvatiSastojkeJela($jelo->IdJelo);\n \n $sastojciString = \"\";\n \n for ($i = 0; $i < count($sastojci); $i++) {\n $sastojciString .= $sastojci[$i]->Naziv;\n \n if ($i != (count($sastojci) - 1)) {\n $sastojciString .= \", \";\n }\n \n }\n \n if ($sastojciString != \"\") {\n $klasa->Sastojci = $sastojciString;\n } else {\n $klasa->Sastojci = \"Sastojci trenutno nisu poznati.\";\n }\n \n $niz [] = $klasa;\n }\n \n return ['jela' => $niz];\n }", "title": "" }, { "docid": "81615d2d6f3fad079100155a4be0a6b3", "score": "0.6057491", "text": "function cariPosisi($batas){\nif(empty($_GET['halisbatnikah'])){\n\t$posisi=0;\n\t$_GET['halisbatnikah']=1;\n}\nelse{\n\t$posisi = ($_GET['halisbatnikah']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "33f58a96ab698dc1784e600eb48e8c66", "score": "0.60305643", "text": "public function setisKawai()\n {\n }", "title": "" }, { "docid": "1a487bc0c1b563b2cb40dd9008aa3ab9", "score": "0.6010106", "text": "function halCheck($kelime){\n\n\t\tprint(\"kelime = \".$kelime);\n\t\t// kelime bir iyelik ekiyle bitiyor mu?\n\t\t$cevap = array(\"unluBitisEksiz\"=>NULL, \"unluBitisEk\"=> NULL, \"unsuzBitisEksiz\"=>NULL, \"unsuzBitisEk\"=> NULL, \"yumusama\"=>NULL, \"unluDusmesi\"=>NULL);\n\n\t\t// once kelime unsuzle bitiyormus gibi bakiyoruz\n\t\tforeach(HAL_UNSUZLE_BITEN_KOK as $ekUnsuz){\n\t\t\t$eksiz = endsWith($kelime, $ekUnsuz);\n\t\t\t// eger eksiz 2 harften kucukse veya sesli harfi yoksa cikardigimiz bir ek degildi\n\t\t\t// yani devam etmeye gerek yok\n\t\t\tif($eksiz !== -1) { \n\t\t\t\tif(mb_strlen($eksiz) >= 2 && hasVowel($eksiz)) {\n\t\t\t\t\t// bu eklerden biriyle bitiyorsa unlu uyumunu kontrol ediyoruz\n\t\t\t\t\t// eger ekin son unlusu ve eksiz kelimenin son unlusu birbirine\n\t\t\t\t\t// uymuyorsa bu bir ek degildir. \n\t\t\t\t\tif(ekBuyukUnluUyumu($eksiz,$ekUnsuz)){\n\t\t\t\t\t\t// gercekten unsuzle bitiyor mu\n\t\t\t\t\t\t$eksizinSonHarfi = mb_substr($eksiz,-1);\n\t\t\t\t\t\tif(in_array($eksizinSonHarfi, UNSUZLER)){\n\t\t\t\t\t\t\t$cevap['unsuzBitisEksiz'] = $eksiz;\n\t\t\t\t\t\t\t$cevap['unsuzBitisEk'] = $ekUnsuz;\n\t\t\t\t\t\t\t// unsuzle bitiyorsa yumusama ve unlu dusmesini de kontrol etmeliyiz\n\t\t\t\t\t\t\t// unlu dusmesi\n\t\t\t\t\t\t\t$unluDusmesi = iyelikUnluDusmesiCheck($eksiz, $ekUnsuz);\n\t\t\t\t\t\t\tif($unluDusmesi != -1){\n\t\t\t\t\t\t\t\t$cevap['unluDusmesi'] = $unluDusmesi;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// yumusama\n\t\t\t\t\t\t\t$yumusama = yumusamaCheck($eksiz);\n\t\t\t\t\t\t\tif($yumusama != -1) {\n\t\t\t\t\t\t\t\t$cevap['yumusama'] = $yumusama;\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} \n\t\t\t}\n\t\t}\n\n\t\t// simdi eksiz kelime unluyle bitiyormus gibi bakiyoruz\n\t\tforeach(HAL_UNLUYLE_BITEN_KOK as $ekUnlu){\n\t\t\t$eksiz = endsWith($kelime, $ekUnlu);\n\t\t\t// eger eksiz 2 harften kucukse veya sesli harfi yoksa cikardigimiz bir ek degildi\n\t\t\t// yani devam etmeye gerek yok\n\t\t\tif($eksiz !== -1) { \n\t\t\t\tif(($eksiz == \"o\") || (mb_strlen($eksiz) >= 2 && hasVowel($eksiz))) {\n\t\t\t\t\tif(ekBuyukUnluUyumu($eksiz,$ekUnlu)){\n\t\t\t\t\t\t// eger unlu uyumuna uyuyorsa ve eksiz gercekten unluyle bitiyorsa\n\t\t\t\t\t\t// eksizi cevaba ekleyebiliriz\n\t\t\t\t\t\t$eksizinSonHarfi = mb_substr($eksiz, -1);\n\t\t\t\t\t\tif(in_array($eksizinSonHarfi, UNLULER)) {\n\t\t\t\t\t\t\t$cevap['unluBitisEksiz'] = $eksiz;\n\t\t\t\t\t\t\t$cevap['unluBitisEk'] = $ekUnlu;\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\treturn $cevap;\t\n\t}", "title": "" }, { "docid": "74dc953242a5ce1e5b8a3128bc263916", "score": "0.600909", "text": "function mengirim_pesan(){ // ini adalah method == function\n $this->jml_pulsa -= 500; // variabel $this dapat mengakses property dan method\n }", "title": "" }, { "docid": "9440ae362fd0b2abad7f49c520bc90c2", "score": "0.59986085", "text": "function cariPosisi($batas) {\n\t\t\tif(empty($_GET['halaman'])){\n\t\t\t\t\t$posisi=0;\n\t\t\t\t\t$_GET['halaman']=1;\n\t\t\t}else{\n\t\t\t\t\t$posisi = ($_GET['halaman']-1) * $batas;\n\t\t\t}\n\t\t\treturn $posisi;\n\t}", "title": "" }, { "docid": "94ae0a1ab1a51f8d1dc0d457056197c0", "score": "0.59948725", "text": "function setsucursal($cod){\r\n $con = new dbmanager;\r\n //usamos el metodo conectar para realizar la conexion\r\n if($con->conectar()==true){\r\n $query = \"SELECT * FROM tbl_sucursal WHERE id_sucursal='$cod'\"; \r\n\t $result = @mysql_query($query);\r\n\t \r\n\t if (!$result){\r\n\t return false;\r\n\t }\r\n\t else{\r\n\t $row = mysql_fetch_assoc($result);\t \r\n\t return $row['sucursal'];\r\n\t }\r\n }\r\n }", "title": "" }, { "docid": "dfd7278d1807384ff8704da09fac70f0", "score": "0.5992781", "text": "function cariPosisi($batas){\nif(empty($_GET['halutama'])){\n\t$posisi=0;\n\t$_GET['halutama']=1;\n}\nelse{\n\t$posisi = ($_GET['halutama']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "1a6a93e89af22a1e752929d018e2d695", "score": "0.598697", "text": "function ambil_data_siswa()\n \t{\n \t\t$this->db->distinct();\n \t\t$this->db->select('a.nama_siswa ,a.nis , a.alamat , a.tmp_lahir , a.gender, a.tgl_lahir , a.agama , b.nama_kelas , c.nama_ortu , a.pass_siswa');\n \t\t$this->db->from('siswaa a');\n \t\t$this->db->join('kelas b', 'b.kode_kelas = a.kode_kelas');\n \t\t$this->db->join('ortu c', 'c.id_ortu = a.id_ortu');\n \t\t\n \t\treturn $this->db->get($this->nama_table)->result();\n \t}", "title": "" }, { "docid": "db3cfbbd02fa3768724e7de21770ef34", "score": "0.5982824", "text": "function angka_romawi($angka)\n{\n\n$satuan=\"I\";\n$limaan=\"V\";\n$puluhan=\"X\";\n\nif($angka==1):\n\t$hasil=\"I\";\nelseif($angka==2):\n\t$hasil=\"II\";\nelseif($angka==3):\n\t$hasil=\"III\";\nelseif($angka==4):\n\t$hasil=\"IV\";\nelseif($angka==5):\n\t$hasil=\"V\";\nelseif($angka==6):\n\t$hasil=\"VI\";\nelseif($angka==7):\n\t$hasil=\"VII\";\nelseif($angka==8):\n\t$hasil=\"VIII\";\nelseif($angka==9):\n\t$hasil=\"IX\";\nelseif($angka==10):\n\t$hasil=\"X\";\nelseif($angka==11):\n\t$hasil=\"XI\";\nelseif($angka==12):\n\t$hasil=\"XII\";\nendif;\n\nreturn $hasil;\n}", "title": "" }, { "docid": "14d9db87c50693b763041d59e05f878d", "score": "0.59799504", "text": "final public function jalan(){\n //mengembalikan sebuah nilai berisi kalimat string\n return \"Kendaraan Ini Jalan\";\n }", "title": "" }, { "docid": "18a20a6675c99c74388f43f8846a021f", "score": "0.5978033", "text": "public function cekKecukupanSKS($nim, $thn, $arrj) {\r\n\t\t$qTot = $this->krs_model->getTotalSks($nim);\r\n\t\t$tot = $qTot->TotalSKS;\r\n\t\t//$min = GetaField(\"matakuliah\", \"ID\", $arrj['IDMK'], 'SKSMin')+0;\r\n\t\t//$min = GetaField(\"matakuliah\", \"IDMK\", $arrj['IDMK'], 'SKSMin')+0; //2007\r\n\t\t$qMin = $this->krs_model->getSksMin($arrj->IDMK);\r\n\t\t$min = $qMin->SKSMin;\r\n\t\tif ($tot < $min){\r\n\t\t\treturn \"<li>Error: <b>\".$arrj->NamaMK.\"</b><br>\r\n\t\t\tMata kuliah tidak dapat diambil karena membutuhkan SKS kumulatif yg telah diambil: <b>$min</b> SKS, dan\r\n\t\t\tAnda baru mengambil <b>$tot</b> SKS.\";\r\n\t\t}else{\r\n\t\t\treturn '';\r\n\t\t}\t\t\t\r\n\t}", "title": "" }, { "docid": "5b2c32363dce76164324926028ac71e5", "score": "0.59718686", "text": "public function getisKawai()\n {\n }", "title": "" }, { "docid": "e1c2c7c035c54b6bfcd7cf0ddffb001c", "score": "0.5971573", "text": "public function jadwal($jadwal,$matkul)\r\n {\r\n shuffle($matkul); # acak matkul\r\n # ARRAY BARU UNTUK SETIAP KODE_MK YANG MEMILIKI LINK KODE\r\n $matkulWithLinkCode = array_column($matkul, 'link_kode', 'kode_mk');\r\n # ARRAY BARU UNTUK SETIAP KODE_MK\r\n $matkulWithKodeMk = array_column($matkul, 'kode_mk');\r\n $x = 0;\r\n # Jumlah hari\r\n $jmlh_hari = count($jadwal);\r\n $prioritas = 1;\r\n // return $matkul;\r\n # melakukan perulangan hingga prioritas sama atau lebih dari jumlah hari\r\n while ($prioritas <= $jmlh_hari) { \r\n # PENJABARAN MATKUL\r\n foreach ($matkul as $key_mk => $value_mk) \r\n {\r\n # PENJABARAN JADWAL MENJADI HARI\r\n foreach ($jadwal as $key_jw => $value_hr) \r\n {\r\n # PENJABARAN DOSEN\r\n foreach ($value_hr['DOSEN_SIAP'] as $key_dosen => $value_dosen) \r\n {\r\n # PENJABARAN HARI MENJADI WAKTU\r\n foreach ($value_hr['WAKTU'] as $key_wk => $value_wk) \r\n {\r\n # PENJABARAN WAKTU MENJADI RUANGAN\r\n foreach ($value_wk['RUANGAN'] as $key_rg => $value_rg) \r\n {\r\n # mulai memasukkan jadwal dari dosen yang memiliki ketersediaan hari paling sedikit dalam seminggu\r\n if ($value_dosen['prioritas'] == $prioritas){\r\n # CEK APAKAH DOSEN TERSEDIA PADA HARI INI\r\n if (in_array($value_mk['kode_mk'], $value_dosen['wawasan'])) \r\n {\r\n # CEK APAKAH BELUM ADA ROLE WAKTU YANG DIMILIKI SEORANG DOSEN\r\n if (!in_array($value_wk['role'], $value_dosen['flag_role'])) \r\n {\r\n # SKS WAKTU SAMA DENGAN SKS MATKUL\r\n if ($value_wk['sks'] == $value_mk['sks_mk']) \r\n {\r\n # 1 ROLE WAKTU(PP/PS/SS) HANYA MEMILIKI 1 MATKUL UNTUK 1 SMSTR\r\n # CEK APAKAH TERDAPAT ROLE WAKTU DI ARRAY SMSTR\r\n if (array_key_exists($value_wk['role'], $value_hr['SMSTR'])) \r\n {\r\n # CEK APAKAH SUDAH ADA SEMESTER YANG DIAMBIL DALAM ROLE TSB\r\n if (!in_array($value_mk['semester_mk'], $value_hr['SMSTR'][$value_wk['role']])) \r\n {\r\n # 1 RUANGAN 1 MATKUL\r\n if (!isset($value_rg['MATKUL'])) \r\n {\r\n # JENIS RUANGAN HARUS SAMA DENGAN JENIS MATKUL\r\n if ($value_rg['id_jenis'] == $value_mk['id_jenis'])\r\n {\r\n # JUMLAH MHS TIDAK BOLEH MELEBIHI KAPASITAS RUANGAN\r\n // if ($value_rg['kapasitas_rg'] >= $value_mk['JUMLAH_MHS'])\r\n // {\r\n # CEK APAKAH MATKUL TERSEDIA DI ARRAY\r\n if (isset($matkul[$key_mk])) \r\n {\r\n $x++;\r\n # MEMASUKKAN MATKUL\r\n $jadwal[$key_jw]['WAKTU'][$key_wk]['RUANGAN'][$key_rg]['MATKUL'] = $matkul[$key_mk];\r\n\r\n # MEMASUKKAN DOSEN\r\n $jadwal[$key_jw]['WAKTU'][$key_wk]['RUANGAN'][$key_rg]['DOSEN'] = $value_dosen['nid'];\r\n # MEMASUKKAN ROLE WAKTU KE ARRAY KESIAPAN DOSEN\r\n array_push($jadwal[$key_jw]['DOSEN_SIAP'][$key_dosen]['flag_role'], $value_wk['role']);\r\n\r\n # TANDA UNTUK 1 SMSTR 1 WAKTU\r\n array_push($jadwal[$key_jw]['SMSTR'][$value_wk['role']], $value_mk['semester_mk']);\r\n\r\n # APAKAH MATKUL INI MEMPUNYAI LINK KODE?\r\n if (isset($matkul[$key_mk]['link_kode'])) {\r\n # cari kode_mk yang memiliki link_kode yang sama dari array $matkulWithLinkCode\r\n $kodeMkWithLinkCode = array_keys($matkulWithLinkCode, $matkul[$key_mk]['link_kode']);\r\n # menghasilkan 2 buah kode_mk berbentuk array, 1 kode_mk (lama) dan 1 kode_mk (baru)\r\n foreach ($kodeMkWithLinkCode as $key_kmwlc => $value_kmwlc) {\r\n # temukan kode_mk barunya dengan cara kode_mk(lama) tidak sama dengan kode_mk(baru)\r\n if ($matkul[$key_mk]['kode_mk'] != $value_kmwlc) {\r\n # cari lokasi kode_mk baru dari array $matkul\r\n $key_baru = array_search($value_kmwlc, $matkulWithKodeMk);\r\n # masukkan kode_mk baru ke dalam array $jadwal\r\n $jadwal[$key_jw]['WAKTU'][$key_wk]['RUANGAN'][$key_rg]['MATKUL']['link'] = $matkul[$key_baru];\r\n # hapus matkul lama dari array $matkul\r\n unset($matkul[$key_baru]);\r\n }\r\n }\r\n }\r\n \r\n # Hapus matkul dari array matkul\r\n unset($matkul[$key_mk]);\r\n\r\n # Hapus kesiapan dosen dari array jadwal\r\n # Buka jadwal\r\n foreach ($jadwal as $key_jw2 => $value_hr2) \r\n {\r\n # Buka dosen_siap\r\n foreach ($value_hr2['DOSEN_SIAP'] as $key_dosen2 => $value_dosen2) \r\n {\r\n # Buka wawasan setiap dosen\r\n foreach ($value_dosen2['wawasan'] as $key_wwsn => $value_wwsn) \r\n {\r\n # Jika dosen dan wawasan sama, hapus wawasan dosen dari array dosen.\r\n # Menandakan bahwa dosen sudah mempunyai slot mengajar\r\n if (($value_dosen['nid'] == $value_dosen2['nid']) && ($value_wwsn == $value_mk['kode_mk'])) \r\n {\r\n unset($jadwal[$key_jw2]['DOSEN_SIAP'][$key_dosen2]['wawasan'][$key_wwsn]);\r\n }\r\n }\r\n \r\n #Jika wawasan dosen sudah kosong, maka menghapus dosen yg ada di dosen_siap\r\n if (empty($value_dosen2['wawasan'])) \r\n {\r\n unset($jadwal[$key_jw2]['DOSEN_SIAP'][$key_dosen2]);\r\n }\r\n }\r\n }\r\n }\r\n // }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n $prioritas ++;\r\n }\r\n\r\n if (isset($matkul)) {\r\n # code...\r\n $jadwal['FLAG_TERTINGGAL'] = $matkul;\r\n unset($matkul);\r\n }\r\n return $jadwal;\r\n }", "title": "" }, { "docid": "edf520eeb27dbfbaf919d282fc5c6a64", "score": "0.5956987", "text": "function cariPosisi($batas){\nif(empty($_GET['halputusan'])){\n\t$posisi=0;\n\t$_GET['halputusan']=1;\n}\nelse{\n\t$posisi = ($_GET['halputusan']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "da2663799483ca6352a3adc9139db76d", "score": "0.5951756", "text": "function cek_pemakaian_stok($kodetrans) {\r\n\tglobal $db;\r\n\r\n\t$sql = 'select b.kodebarang, b.namabarang\r\n\t\t\tfrom mbarangdtl a\r\n\t\t\tinner join mbarang b on a.kodebrg = b.kodebarang\r\n\t\t\twhere a.kodetrans = ? and\r\n\t\t\t\t a.jmlout > 0 and\r\n\t\t\t\t a.sisa < a.jmlin';\r\n\t$pr = $db->prepare($sql);\r\n\t$qr = $db->execute($pr, array($kodetrans));\r\n\twhile ($rs = $db->fetch($qr)) {\r\n\t\tdie(json_encode(array('errorMsg' => 'Ada Barang Yang Telah Digunakan')));\r\n\t\tbreak;\r\n\t}\r\n}", "title": "" }, { "docid": "13f069d2978f9a489a8147dd77d85147", "score": "0.5941358", "text": "public function getSuco();", "title": "" }, { "docid": "e55c96b04308e0d19c22ccf791b57e27", "score": "0.5940802", "text": "abstract protected function getSut();", "title": "" }, { "docid": "636d3d506c2f04fc6b00f30f140da125", "score": "0.59380037", "text": "public function prognozakurs(){\n\t //SKIDANJE PROGNOZE\n\t // skini sa RHMZ sajta stranicu na kojoj je tabela sa temperaturama u vecim gradovima u srbiji\n\t $celaprognoza = file_get_contents('http://www.hidmet.gov.rs/latin/prognoza/index.php'); \n\t //$resultprognoza['celaprognoza'] = $celaprognoza;\n\t $celaprognoza = str_replace(' ', '', $celaprognoza); //izbaci space-ove iz stringa sbog lakseg substring-ovanja u daljem radu\n\t // izvuci za svaki grad trocifrenu temperaturu (posto moze biti dvocifreni minus)\n\t // izvuci temperaturu za BG\n\t $pozicijabg = strpos($celaprognoza, 'Beograd</td>'); \n\t $prognozabg = substr($celaprognoza, $pozicijabg+54, 3);\n\t $zadnjikarakterbg = substr($prognozabg, -1);\n\t if($zadnjikarakterbg == \"<\"){ // ako je temperatura dvocifrena zadnji karakter ce biti '<', odseci ga\n\t $prognozabg = substr($prognozabg, 0, -1);\n\t }elseif($zadnjikarakterbg == \"/\"){ // ako je temperatura jednocifrena zadnji karakter ce biti '/', odseci ga\n\t $prognozabg = substr($prognozabg, 0, -2);\n\t }\n\t $resultprognoza['bg'] = $prognozabg;\n // izvuci temperaturu za NS\n\t $pozicijans = strpos($celaprognoza, 'NoviSad</td>'); // posto su izbaceni space-ovi nije vise 'Novi Sad' nego 'NoviSad'\n\t $prognozans = substr($celaprognoza, $pozicijans+54, 3);\n\t $zadnjikarakterns = substr($prognozans, -1);\n\t if($zadnjikarakterns == \"<\"){ // ako je temperatura dvocifrena zadnji karakter ce biti '<', odseci ga\n\t $prognozans = substr($prognozans, 0, -1);\n\t }elseif($zadnjikarakterns == \"/\"){ // ako je temperatura jednocifrena zadnji karakter ce biti '/', odseci ga\n\t $prognozans = substr($prognozans, 0, -2);\n\t }\n\t $resultprognoza['ns'] = $prognozans; \n\t // izvuci temperaturu za Kopaonik\n\t $pozicijakop = strpos($celaprognoza, 'Kopaonik</td>'); \n\t $prognozakop = substr($celaprognoza, $pozicijakop+55, 3);\n\t $zadnjikarakterkop = substr($prognozakop, -1);\n\t if($zadnjikarakterkop == \"<\"){ // ako je temperatura dvocifrena zadnji karakter ce biti '<', odseci ga\n\t $prognozakop = substr($prognozakop, 0, -1);\n\t }elseif($zadnjikarakterkop == \"/\"){ // ako je temperatura jednocifrena zadnji karakter ce biti '/', odseci ga\n\t $prognozakop = substr($prognozakop, 0, -2);\n\t }\n\t $resultprognoza['kop'] = $prognozakop; \n\t // izvuci temperaturu za NIS\n\t $pozicijanis = strpos($celaprognoza, 'Niš</td>'); \n\t $prognozanis = substr($celaprognoza, $pozicijanis+51, 3);\n\t $zadnjikarakternis = substr($prognozanis, -1);\n\t if($zadnjikarakternis == \"<\"){ // ako je temperatura dvocifrena zadnji karakter ce biti '<', odseci ga\n\t $prognozanis = substr($prognozanis, 0, -1);\n\t }elseif($zadnjikarakternis == \"/\"){ // ako je temperatura jednocifrena zadnji karakter ce biti '/', odseci ga\n\t $prognozanis = substr($prognozanis, 0, -2);\n\t }\n\t $resultprognoza['nis'] = $prognozanis;\n\t // izvuci temperaturu za KG\n\t $pozicijakg = strpos($celaprognoza, 'Kragujevac</td>'); \n\t $prognozakg = substr($celaprognoza, $pozicijakg+57, 3);\n\t $zadnjikarakterkg = substr($prognozakg, -1);\n\t if($zadnjikarakterkg == \"<\"){ // ako je temperatura dvocifrena zadnji karakter ce biti '<', odseci ga\n\t $prognozakg = substr($prognozakg, 0, -1);\n\t }elseif($zadnjikarakterkg == \"/\"){ // ako je temperatura jednocifrena zadnji karakter ce biti '/', odseci ga\n\t $prognozakg = substr($prognozakg, 0, -2);\n\t }\n\t $resultprognoza['kg'] = $prognozakg;\n\t \n\t //SKIDANJE KURSNE LISTE\n\t // skini srednji kurs sa NBS sajta\n\t $celakursnalista = file_get_contents('http://www.nbs.rs/kursnaListaModul/srednjiKurs.faces?lang=lat');\n\t $celakursnalista = str_replace(' ', '', $celakursnalista); //izbaci space-ove iz stringa sbog lakseg substring-ovanja u daljem radu\n\t // EUR\n\t $pozicijaeur = strpos($celakursnalista, 'EUR</td>'); // pozicija za eur\n\t $kurseur = substr($celakursnalista, $pozicijaeur+107 , 6);\n\t $resultprognoza['eur'] = $kurseur; // ubaci kurs eura u array sa skinutim temperaturama i ostalim valutama\n\t // $ USD\n\t $pozicijadolar = strpos($celakursnalista, 'USD</td>'); // pozicija za dolar\n\t $kursdolar = substr($celakursnalista, $pozicijadolar+107 , 6);\n\t $resultprognoza['usd'] = $kursdolar; // ubaci kurs dolara u array sa skinutim temperaturama i ostalim valutama\n\t // CHF \n\t $pozicijachf = strpos($celakursnalista, 'CHF</td>'); // pozicija za svajcarac\n\t $kurschf = substr($celakursnalista, $pozicijachf+107 , 6);\n\t $resultprognoza['chf'] = $kurschf; // ubaci kurs svajcarca u array sa skinutim temperaturama i ostalim valutama\n\t // GBP\n\t $pozicijagbp = strpos($celakursnalista, 'GBP</td>'); // pozicija za funtu\n\t $kursgbp = substr($celakursnalista, $pozicijagbp+107 , 6);\n\t $resultprognoza['gbp'] = $kursgbp; // ubaci kurs funte u array sa skinutim temperaturama i ostalim valutama\n\t \n\t $this->output->set_output(json_encode($resultprognoza));\n\t}", "title": "" }, { "docid": "f026f2138d4697ff41e96672a0c61ccb", "score": "0.59361154", "text": "function cariPosisi($batas){\n\tif(empty($_GET['halaman'])){\n\t\t$posisi=0;\n\t\t$_GET['halaman']=1;\n\t}\n\telse{\n\t\t$posisi = ($_GET['halaman']-1) * $batas;\n\t}\n\treturn $posisi;\n\t}", "title": "" }, { "docid": "f026f2138d4697ff41e96672a0c61ccb", "score": "0.59361154", "text": "function cariPosisi($batas){\n\tif(empty($_GET['halaman'])){\n\t\t$posisi=0;\n\t\t$_GET['halaman']=1;\n\t}\n\telse{\n\t\t$posisi = ($_GET['halaman']-1) * $batas;\n\t}\n\treturn $posisi;\n\t}", "title": "" }, { "docid": "38a602d52982933244c91789586a1243", "score": "0.59329545", "text": "function tampil_edit_sewa($id)\n\t{\n\t\t$sewa = mysql_query(\"SELECT * FROM sewa WHERE id='$id'\");\n\t\twhile($edit = mysql_fetch_array($sewa)){\n\t\t\t$hasil[] = $edit;\n\t\t}\n\t\treturn $hasil;\n\t}", "title": "" }, { "docid": "121c69a9883b1cbdf0f95d19938f5ab4", "score": "0.59302104", "text": "function susumavimas ($ma){\n $s = 0;\n for ($i = 0; $i < count($ma); $i++) { //figuriniai prie true , false, su if , whilte, for, ciklu vykdymo komandose\n // naudojami figurniai skliaustai, ($s=0) reikalingas kai sumuojame\n $s += strlen($ma[$i]);\n }\nreturn $s;\n}", "title": "" }, { "docid": "201e41cc4999716ce0109762f3852aec", "score": "0.59259874", "text": "public function sprzedarz2($sprzedane){\n $zloto=$this->potrzebnezloto($sprzedane);\n $this->sprzedarz($sprzedane);\n $this->wiedzmin->Getparam->setGold($this->wiedzmin->Getparam->getGold+$zloto);\n }", "title": "" }, { "docid": "1a6832fac29090fb3321cc519ffd404d", "score": "0.5921538", "text": "public function swim()\n {\n echo \"MersedesAmfibius swim\";\n }", "title": "" }, { "docid": "dc4dab7f6c2722fba404dd072c425b83", "score": "0.5919932", "text": "function cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "0977c523126f410b47f136f1b8fed126", "score": "0.59197664", "text": "public function prosesPersetujuanSI($data)\n\t{\n\t\ttry\n\t\t{\n\t\t\t$registry = Zend_Registry::getInstance();\n\t\t\t$db = $registry->get('db');\n\t\t\t$db->beginTransaction();\n\t\t\t$alasan = $data['alasan'];\n\t\t\t/* if($alasan !='' && $alasan!=null){ */\n\t\t\t\t//status ditolak\n\t\t\t\t$paramProses = array(\"c_setuju_statussi\"\t=>$data['status'],\n\t\t\t\t\t\t\t\t\t\"e_alasan\"\t=>$alasan,\n\t\t\t\t\t\t\t\t\t\"d_setuju_si\"=>date(\"Y-m-d\"));\n\t\t\t/* }else{\t\t\n\t\t\t\t// status disetujui\n\t\t\t\t$paramProses = array(\"c_setuju_statussi\"\t=>\"Y\",\n\t\t\t\t\t\t\t\t\t\"d_setuju_si\"=>date(\"Y-m-d\"));\n\t\t\t} */\n\t\t\t\n\t\t\t$where[] = \"i_barang_ajuanbaik = '\".$data['noPengajuan'].\"'\";\n\t\t\t$db->update('e_ast_ajuanbaikti_0_tm',$paramProses, $where);\n\t\t\t$db->commit();\n\t\t\treturn 'sukses <br>';\n\t\t}catch (Exception $e){\n\t\t\t$db->rollBack();\n\t\t\techo $e->getMessage().'<br>';\n\t\t\treturn 'gagal <br>';\n\t\t}\n\t}", "title": "" }, { "docid": "c6796aa11aa79ae18aa8a4efeb1b6a5d", "score": "0.5917434", "text": "function daj_robu_za_shop($krit)\n\t\n\t{\t\n\t\n\t\tif ($krit<>1){\n\t\t$query=$this->db->query(\"SELECT link_filma,m_telefon,jlc_korisnici.userid,jlc_roba.id,jlc_roba.cena,jlc_roba.naziv,jlc_roba.dugi_opis,jlc_roba.dugi_opis as opis,jlc_roba.link_slike_r,jlc_roba.orjentacija,jlc_roba_slike.link_slike,jlc_roba_slike.orjentacija_slike FROM jlc_roba left join jlc_roba_slike on jlc_roba.id=id_artikla left join jlc_korisnici on jlc_roba.id_vlasnika=jlc_korisnici.userid where jlc_roba.projekat='jlc' and (naziv like '%\".$krit.\"%' or dugi_opis like '%\".$krit.\"%') order by jlc_roba.id\");}\n\t\tif ($krit==1){\n\t\t$query=$this->db->query(\"SELECT link_filma,m_telefon,jlc_korisnici.userid,jlc_roba.id,jlc_roba.cena,jlc_roba.naziv,jlc_roba.dugi_opis,jlc_roba.dugi_opis as opis,jlc_roba.link_slike_r,jlc_roba.orjentacija,jlc_roba_slike.link_slike,jlc_roba_slike.orjentacija_slike FROM jlc_roba left join jlc_roba_slike on jlc_roba.id=id_artikla left join jlc_korisnici on jlc_roba.id_vlasnika=jlc_korisnici.userid where jlc_roba.projekat='jlc' order by jlc_roba.id\");}\n\n\n\t\treturn ($query->result());\t\n\t\n\t}", "title": "" }, { "docid": "727f65a4822f6c0a084260dbcd40b7b7", "score": "0.5916398", "text": "function cariPosisi($batas){\nif(empty($_GET[hal])){\n\t$posisi=0;\n\t$_GET[hal]=1;\n}\nelse{\n\t$posisi = ($_GET[hal]-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "0b6ce49dc88c7aefde295cc2146872d9", "score": "0.5911818", "text": "function cariPosisi($batas){\nif(empty($_GET['halghoib'])){\n\t$posisi=0;\n\t$_GET['halghoib']=1;\n}\nelse{\n\t$posisi = ($_GET['halghoib']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "aa52591702c3fbd4a4d2f2c4752b4087", "score": "0.5908531", "text": "function cariPosisi($batas){\nif(empty($_GET[halproduk])){\n\t$posisi=0;\n\t$_GET[halproduk]=1;\n}\nelse{\n\t$posisi = ($_GET[halproduk]-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "b6223299a35395b3f35da2a5c3a11c6b", "score": "0.5905296", "text": "function setsucursal_remoto($cod){\r\n $con_remoto = new dbmanager;\r\n //usamos el metodo conectar para realizar la conexion\r\n if($con_remoto->conectar_remoto()==true){\r\n $query = \"SELECT * FROM tbl_sucursal WHERE id_sucursal='$cod'\"; \r\n\t $result = @mysql_query($query);\r\n\t \r\n\t if (!$result){\r\n\t return false;\r\n\t }\r\n\t else{\r\n\t $row = mysql_fetch_assoc($result);\t \r\n\t return $row['sucursal'];\r\n\t }\r\n }\r\n }", "title": "" }, { "docid": "283c00c4a80da11052825806d7ba2b02", "score": "0.5902414", "text": "function cariPosisi($batas){\nif(empty($_GET[halaman])){\n\t$posisi=0;\n\t$_GET[halaman]=1;\n}\nelse{\n\t$posisi = ($_GET[halaman]-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "140a8e2ce4d3ad755d04c060e035b31d", "score": "0.5893994", "text": "function cariPosisi($batas){\nif(empty($_GET['halkat'])){\n\t$posisi=0;\n\t$_GET['halkat']=1;\n}\nelse{\n\t$posisi = ($_GET['halkat']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "009cb34ad067eaa8d7df28730a509074", "score": "0.5892862", "text": "public function arsipWarga()\n\t{\t\n\t\t$warga = $this->M_warga->getData();\n\t\t$data['title'] = 'Arsip Surat Yang Pernah Dibuat';\n\t\t$data['warga'] = $this->M_warga->getData();\n\t\t$data['arsip'] = $this->M_warga->getSurat($warga['id_penduduk'])->result();\n\t\t//session surat\n\t\t//$data['arsip'] = $this->M_warga->getDataSurat()->result();\n\t\t$this->load->view('templates/header');\n\t\t$this->load->view('templates/sidebar',$data);\n\t\t$this->load->view('arsip_surat',$data);\n\t\t$this->load->view('templates/footer');\n\t}", "title": "" }, { "docid": "9ff5388280cf0dc05b69840ec0a09710", "score": "0.5891165", "text": "function cariPosisi($batas){\n\tif(empty($_GET['halaman']))\n\t{\n\t\t$posisi=0;\n\t\t$_GET['halaman']=1;\n\t}\n\telse\n\t{\n\t\t$posisi = ($_GET['halaman']-1) * $batas;\n\t}\n\n\treturn $posisi;\n}", "title": "" }, { "docid": "9ff5388280cf0dc05b69840ec0a09710", "score": "0.5891165", "text": "function cariPosisi($batas){\n\tif(empty($_GET['halaman']))\n\t{\n\t\t$posisi=0;\n\t\t$_GET['halaman']=1;\n\t}\n\telse\n\t{\n\t\t$posisi = ($_GET['halaman']-1) * $batas;\n\t}\n\n\treturn $posisi;\n}", "title": "" }, { "docid": "9ff5388280cf0dc05b69840ec0a09710", "score": "0.5891165", "text": "function cariPosisi($batas){\n\tif(empty($_GET['halaman']))\n\t{\n\t\t$posisi=0;\n\t\t$_GET['halaman']=1;\n\t}\n\telse\n\t{\n\t\t$posisi = ($_GET['halaman']-1) * $batas;\n\t}\n\n\treturn $posisi;\n}", "title": "" }, { "docid": "9ff5388280cf0dc05b69840ec0a09710", "score": "0.5891165", "text": "function cariPosisi($batas){\n\tif(empty($_GET['halaman']))\n\t{\n\t\t$posisi=0;\n\t\t$_GET['halaman']=1;\n\t}\n\telse\n\t{\n\t\t$posisi = ($_GET['halaman']-1) * $batas;\n\t}\n\n\treturn $posisi;\n}", "title": "" }, { "docid": "85cbf5fe82d334673b5d2fde235211d9", "score": "0.5890163", "text": "function Slika($slika)\n{\n return $slika;\n}", "title": "" }, { "docid": "5ef95ceffd702fcfe8fe9e4d18c21f9e", "score": "0.58880216", "text": "private function naDijagonali(){\n\t\t\tif( $this->ploca[0] === $this->ploca[4] && $this->ploca[0] === $this->ploca[8] && $this->ploca[0] !== \"?\" ){\n\t\t\t\t$_SESSION['pobjednik'] = $this->igrac_na_potezu;\n\t\t\t\t$_SESSION['bojanje'] = array( 0, 4, 8 );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif( $this->ploca[2] === $this->ploca[4] && $this->ploca[2] === $this->ploca[6] && $this->ploca[2] !== \"?\" ){\n\t\t\t\t$_SESSION['pobjednik'] = $this->igrac_na_potezu;\n\t\t\t\t$_SESSION['bojanje'] = array( 2, 4, 6 );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "2e84692c65286282f8a4eb560d420cc2", "score": "0.5886557", "text": "function tabel_siswa()\n {\n if ($this->session->userdata('akses') == '1') {\n $this->load->view('vtabel_siswa');\n } else {\n echo \"Anda tidak berhak mengakses halaman ini\";\n }\n }", "title": "" }, { "docid": "22092a279197e90c16ab45d0b28bc51a", "score": "0.5885715", "text": "public function syarat($data)\r\n\t{\r\n\t\t$id_reg_pd=Yii::app()->session->get('username');\r\n\t\t$kata=explode(',',$data->mk['syarat']);\r\n\t\t$text=\"\";\r\n\t\t//(1)\r\n\t\tif($kata[0]!=\"\")\r\n\t\t{//(2)\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor($i=0;$i<count($kata);$i++)\r\n\t\t\t{\r\n\t\t\t\t//(3)\r\n\t\t\t\t$id=$kata[$i];\r\n\t\t\t\t//mata kuliah\r\n\t\t\t\t$modelCek=Matkul::model()->findByPk($id);\r\n\t\t\t\t//(4)\r\n\t\t\t\tif(empty($modelCek->nm_mk))\r\n\t\t\t\t{ //(5)\r\n\t\t\t\t\tbreak;//(6)\r\n\t\t\t\t} //(7)\r\n\t\t\t\t$belum=false;\r\n\t\t\t\t//(8)\r\n\t\t\t\t//Cek nilai MK\r\n\t\t\t\t$criteria=new CDbCriteria;\t\t\t\r\n\t\t\t\t$criteria->join=\"JOIN kelas_kuliah k JOIN matkul m\";\r\n\t\t\t\t$criteria->condition = \"t.id_reg_pd = :id_reg_pd AND t.id_kls=k.id_kls AND k.id_mk=m.id_mk AND m.id_mk=:id_mk\";\r\n\t\t\t\t$criteria->params = array (\t\r\n\t\t\t\t\t':id_reg_pd' => $id_reg_pd,\r\n\t\t\t\t\t':id_mk' => $id,\r\n\t\t\t\t);\r\n\t\t\t\t$modelKelas=Nilai::model()->findAll($criteria);\r\n\t\t\t\t//(9)\r\n\t\t\t\tif((!empty($modelKelas))&&($id!=\"\"))\r\n\t\t\t\t{//(10)\r\n\t\t\t\t\tforeach($modelKelas as $db)\r\n\t\t\t\t\t{//(11)\r\n\t\t\t\t\t\t//Ambil nama MK dan Nilai\r\n\t\t\t\t\t\t$model=Matkul::model()->findByPk($id);\r\n\t\t\t\t\t\t//cek kelulusan MK\r\n\t\t\t\t\t\t//(12)\r\n\t\t\t\t\t\tif(($db->nilai_huruf==\"D\")||($db->nilai_huruf==\"E\"))\r\n\t\t\t\t\t\t{ //(13)\r\n\t\t\t\t\t\t\t$warna1='<p style=\"color:red;\">';\r\n\t\t\t\t\t\t\t$warna2='</p>';\r\n\t\t\t\t\t\t\t//(14)\r\n\t\t\t\t\t\t}else{ //(15)\r\n\t\t\t\t\t\t\t$warna1='<p style=\"color:green;\">';\r\n\t\t\t\t\t\t\t$warna2='</p>';\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} //(16)\r\n\t\t\t\t\t\tif($i==count($kata)-1)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$text.=$warna1.$model['nm_mk'].' ('.$db->nilai_huruf.')'.$warna2;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$text.=$warna1.$model['nm_mk'].' ('.$db->nilai_huruf.'), '.$warna2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//Ambil nama MK dan Nilai\r\n\t\t\t\t\t$model=Matkul::model()->findByPk($id);\r\n\t\t\t\t\t$text.='<p>'.$model['nm_mk'].'</p>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $text;\r\n\t}", "title": "" }, { "docid": "208ab0d25a81041a3ffea259eb02e715", "score": "0.5884949", "text": "function cariPosisi($batas) {\n\t\tif(empty($_GET['halaman'])){\n\t\t\t$posisi=0;\n\t\t\t$_GET['halaman']=1;\n\t\t}else{\n\t\t\t$posisi = ($_GET['halaman']-1) * $batas;\n\t\t}\n\t\treturn $posisi;\n\t}", "title": "" }, { "docid": "208ab0d25a81041a3ffea259eb02e715", "score": "0.5884949", "text": "function cariPosisi($batas) {\n\t\tif(empty($_GET['halaman'])){\n\t\t\t$posisi=0;\n\t\t\t$_GET['halaman']=1;\n\t\t}else{\n\t\t\t$posisi = ($_GET['halaman']-1) * $batas;\n\t\t}\n\t\treturn $posisi;\n\t}", "title": "" }, { "docid": "208ab0d25a81041a3ffea259eb02e715", "score": "0.5884949", "text": "function cariPosisi($batas) {\n\t\tif(empty($_GET['halaman'])){\n\t\t\t$posisi=0;\n\t\t\t$_GET['halaman']=1;\n\t\t}else{\n\t\t\t$posisi = ($_GET['halaman']-1) * $batas;\n\t\t}\n\t\treturn $posisi;\n\t}", "title": "" }, { "docid": "208ab0d25a81041a3ffea259eb02e715", "score": "0.5884949", "text": "function cariPosisi($batas) {\n\t\tif(empty($_GET['halaman'])){\n\t\t\t$posisi=0;\n\t\t\t$_GET['halaman']=1;\n\t\t}else{\n\t\t\t$posisi = ($_GET['halaman']-1) * $batas;\n\t\t}\n\t\treturn $posisi;\n\t}", "title": "" }, { "docid": "208ab0d25a81041a3ffea259eb02e715", "score": "0.5884949", "text": "function cariPosisi($batas) {\n\t\tif(empty($_GET['halaman'])){\n\t\t\t$posisi=0;\n\t\t\t$_GET['halaman']=1;\n\t\t}else{\n\t\t\t$posisi = ($_GET['halaman']-1) * $batas;\n\t\t}\n\t\treturn $posisi;\n\t}", "title": "" }, { "docid": "208ab0d25a81041a3ffea259eb02e715", "score": "0.5884949", "text": "function cariPosisi($batas) {\n\t\tif(empty($_GET['halaman'])){\n\t\t\t$posisi=0;\n\t\t\t$_GET['halaman']=1;\n\t\t}else{\n\t\t\t$posisi = ($_GET['halaman']-1) * $batas;\n\t\t}\n\t\treturn $posisi;\n\t}", "title": "" }, { "docid": "208ab0d25a81041a3ffea259eb02e715", "score": "0.5884949", "text": "function cariPosisi($batas) {\n\t\tif(empty($_GET['halaman'])){\n\t\t\t$posisi=0;\n\t\t\t$_GET['halaman']=1;\n\t\t}else{\n\t\t\t$posisi = ($_GET['halaman']-1) * $batas;\n\t\t}\n\t\treturn $posisi;\n\t}", "title": "" }, { "docid": "3b855780ddd5c4875ff48472e6f2dc32", "score": "0.5883043", "text": "function cariPosisi($batas) {\n if (empty($_GET['halaman'])) {\n $posisi = 0;\n $_GET['halaman'] = 1;\n } else {\n $posisi = ($_GET['halaman'] - 1) * $batas;\n }\n return $posisi;\n }", "title": "" } ]
97d2b9fe156511619d9e080d443739bc
Inserts the services relationship.
[ { "docid": "1b8981662cf85e3e61a717e59cac52b3", "score": "0.71400505", "text": "protected function insertServicesRelationship(array $services, $id_coupon)\n\t{\n\t\tif ($id_coupon <= 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$dbo = JFactory::getDbo();\n\n\t\t$rel = new stdClass;\n\t\t$rel->id_service = 0;\n\t\t$rel->id_coupon = $id_coupon;\n\n\t\tforeach ($services as $s)\n\t\t{\n\t\t\t// unset ID assigned during the loop\n\t\t\tunset($rel->id);\n\t\t\t$rel->id_service = (int) $s;\n\t\t\t\n\t\t\t$dbo->insertObject('#__vikappointments_coupon_service_assoc', $rel, 'id');\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "9467ca83064c659fb1e9eca82ae33b22", "score": "0.6224657", "text": "public function insertService(serviceClass $info)\n {\n $values=array();\n //Query To insert Service Into Service Table\n $sqlInsert = \"INSERT INTO service(service_name,app_time_avg) VALUES('\".$info->getServiceName().\"','\".$info->getTimeAvg().\"')\";\n $this->execute($sqlInsert,$values);\n \n //Query To Get The ID Of The service That Got The Same service_name\n $sqlSelect =\"SELECT service_id FROM service WHERE service_name=?\";\n $values=array($info->getServiceName());\n $service_id=$this->getInfo($sqlSelect,$values);\n \n //Insert ID Into Parameter\n $id=end($service_id);\n \n //Query To Update The service_branch Table\n $values=array();\n $sqlInsert = \"INSERT INTO service_branch(branch_id,service_id) VALUES('\".$info->getBranchID().\"','\".$id[\"service_id\"].\"')\";\n $this->execute($sqlInsert,$values);\n }", "title": "" }, { "docid": "c5e35440052028854c9a94dcc61f9950", "score": "0.6116524", "text": "public function additionService()\n {\n global $dbh;\n $sql = $dbh->prepare(\"INSERT INTO `service`(`nservicea`, `nservicee`, `coast`, `deletserv`)VALUES('$this->nservicea' ,'$this->nservicee' ,'$this->coast' ,'$this->deletserv')\");\n $result = $sql->execute();\n $id = $dbh->lastInsertId();\n return array ($result,$id);\n }", "title": "" }, { "docid": "87e4a1e1c56f4738447cc76af5e84127", "score": "0.5952786", "text": "public function add_service()\n {\n\n $cols = \"`title`,`icon`,`desc`\";\n\n $value =\n \"'\" . $this->obj->all_data->service->get_title1() . \"',\n '\" . $this->obj->all_data->service->get_icon() . \"',\n '\" . $this->obj->all_data->service->get_desc() . \"'\n\n \";\n\n\n $insert = $this->obj->insert(\"out_service\", $cols, $value);\n return $insert;\n }", "title": "" }, { "docid": "6866ecc6bcd4533fa194b65074842143", "score": "0.58804935", "text": "public function insert_services($id_service, $id_reserve, $qty, $price, $desc, $tax, $tipo, $unit){\n $query=\"INSERT INTO `\".DB_PREFIX.\"serv_reserv` (`id`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`id_service`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`id_reserve`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`qty`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`price`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`comment`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`tax`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`tipo`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t`unit`)\n \t\t\t\t\tVALUES ( NULL ,'\".$this->link->myesc($id_service).\"',\n\t\t\t\t\t'\".$this->link->myesc($id_reserve).\"',\n\t\t\t\t\t'\".$this->link->myesc($qty).\"',\n\t\t\t\t\t'\".$this->link->myesc($price).\"',\n\t\t\t\t\t'\".$this->link->myesc($desc).\"',\n\t\t\t\t\t'\".$this->link->myesc($tax).\"',\n\t\t\t\t\t'\".$this->link->myesc($tipo).\"',\n\t\t\t\t\t'\".$this->link->myesc($unit).\"')\";\n $result = $this->link->execute($query);\n return $result;\n\t}", "title": "" }, { "docid": "e97cdfd9bf9643cc896fc81288a437f0", "score": "0.58646053", "text": "function addTripServices($serviceData,$trip_id)\n\t{\n\t\t$itineraries = $this->getItineraries($trip_id);\n\t\tif(!$itineraries || count($serviceData) == 0)\n\t\t\treturn false;\n\n\t\t$serviceData['user_id'] = $this->session->userdata('id');\n\t\t$serviceData['organisation_id'] = $this->session->userdata('organisation_id');\n\n\t\t$insertData = array();$i = 0;\n\t\tforeach($itineraries as $itinerary){\n\t\t\t$insertData[$i] = $serviceData;\n\t\t\t$insertData[$i]['itinerary_id'] = $itinerary['id'];\n\t\t\t$i++;\n\t\t}\n\n\t\tif($insertData){\n\t\t\t$this->db->insert_batch('trip_services', $insertData);\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "8f848d299b82998dc316783a7b97b5df", "score": "0.57773656", "text": "public function insertService($data){\n $this->db->insert('service_table', $data);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "34ea9dda74e4aa4aa53371da58fd93f3", "score": "0.57245797", "text": "public function additionServiceOrder()\n {\n global $dbh;\n $sql = $dbh->prepare(\"INSERT INTO `serviceorder`(`serviceido`, `idoservice`, `kindserido`, `deletservido`)VALUES('$this->serviceido' ,'$this->idoservice' ,'$this->kindserido' ,'$this->deletservido')\");\n $result = $sql->execute();\n $id = $dbh->lastInsertId();\n return array ($result,$id);\n }", "title": "" }, { "docid": "92dab0c7a189afa97d8c7ab9a1d6fbdf", "score": "0.55815405", "text": "public function registerServices() {\n\t\t$services = $this->getServices();\n\t\t$services = array_map( [ $this, 'instantiateServices' ], $services );\n\t\t\n\t\tarray_walk( $services, function ( Service $service ) {\n\t\t\t$service->register();\n\t\t} );\n\t}", "title": "" }, { "docid": "615efb4a92e31ae30455c7ef5c7ebd01", "score": "0.55504185", "text": "public function insert(ServiceType $serviceType) {\n $bindings = $this->getServiceTypeBindings($serviceType);\n $sql = $this->generateInsertSql($this->tableName, \\array_keys($bindings));\n try {\n $stmt = $this->pdo->prepare($sql);\n $result = $stmt->execute($bindings);\n if ($result) {\n $data = ['id' => $bindings['service_type_id'], 'name' => $bindings['name']];\n\n return [\n 'result' => $result,\n 'data' => $data,\n ];\n } else {\n exit('Dev error - Result not true');;\n }\n } catch (\\PDOException $ex) {\n \\var_dump($ex->getMessage());\n exit();\n }\n }", "title": "" }, { "docid": "af953dbe725342dbc4cf1799dbcfb447", "score": "0.5541017", "text": "public function insert_multiple_service() {\r\n if (USER_ROLE == ROLE_ONE) {\r\n $inserts = json_decode($this->input->post('services'));\r\n $vouchers_ids = \",\";\r\n $flag = false;\r\n foreach ($inserts as $item) {\r\n $data['service_name'] = $item[0];\r\n $data['provided_by'] = $item[1];\r\n $data['billing_id'] = $item[2];\r\n $data['notes'] = $item[3];\r\n $data['cost'] = $item[4];\r\n $data['currency_type'] = $item[5];\r\n $data['received_date'] = $item[6];\r\n $data['insert_number'] = $item[7];\r\n $data['quantity'] = $item[8];\r\n $result = $this->service_model->add_service($data);\r\n if ($result != -1) {\r\n $vouchers_ids .= $result . \",\";\r\n $flag = true;\r\n } else if ($result == -1) {\r\n $flag = false;\r\n $result2 = $this->service_model->delete_many_services($vouchers_ids);\r\n }\r\n if ($flag != true)\r\n break;\r\n }\r\n if ($flag) {\r\n echo json_encode(array('status' => true, 'msg' => $result.\"تم إدخال البيانات بنجاح\"));\r\n } else {\r\n echo json_encode(array('status' => false, 'msg' => $result2.\"لم يتم إدخال البيانات هناك خطأ في البيانات المدخلة\"));\r\n }\r\n }\r\n }", "title": "" }, { "docid": "56ff829235cce827a2804782b9535b2e", "score": "0.5525496", "text": "protected function saveRelations()\n {\n $spotIdsToRemove = $relationsToAdd = [\n 'photos' => [],\n 'tags' => [],\n 'amenities' => [],\n 'locations' => []\n ];\n // Preparing spots remote photos for insert\n if($this->photos != [])\n {\n foreach($this->photos as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['associated_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['associated_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['photos'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['associated_id']))\n {\n $relationsToAdd['photos'][] = $item;\n }\n }\n }\n }\n // Preparing spots amenities for insert\n if($this->amenities != [])\n {\n foreach($this->amenities as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['amenities'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['amenities'][] = $item;\n }\n }\n }\n }\n // Preparing spots tags for insert\n if($this->tags != [])\n {\n foreach($this->tags as $remote_id => $items)\n {\n foreach($items as $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['tags'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['tags'][] = $item;\n }\n }\n }\n }\n // Preparing spots points for insert\n if($this->locations != [])\n {\n foreach($this->locations as $remote_id => $item)\n {\n if(isset($this->insertedIds[$remote_id]))\n {\n $item['spot_id'] = $this->insertedIds[$remote_id];\n }\n if(isset($this->existingIds[$remote_id]))\n {\n $item['spot_id'] = $this->existingIds[$remote_id];\n $spotIdsToRemove['locations'][] = $this->existingIds[$remote_id];\n }\n if(isset($item['spot_id']))\n {\n $relationsToAdd['locations'][] = $item;\n }\n }\n }\n // Database transaction to remove all old relations of existing spots and add new relations for inserted and updated spots\n DB::transaction(function() use ($spotIdsToRemove, $relationsToAdd) {\n if($spotIdsToRemove['photos'] != [])\n {\n DB::table('remote_photos')->whereIn('associated_id', $spotIdsToRemove['photos'])->where('associated_type', Spot::class)->delete();\n }\n if($spotIdsToRemove['amenities'] != [])\n {\n DB::table('spot_amenities')->whereIn('spot_id', $spotIdsToRemove['amenities'])->delete();\n }\n if($spotIdsToRemove['tags'] != [])\n {\n DB::table('spot_tag')->whereIn('spot_id', $spotIdsToRemove['tags'])->delete();\n }\n if($spotIdsToRemove['locations'] != [])\n {\n DB::table('spot_points')->whereIn('spot_id', $spotIdsToRemove['locations'])->delete();\n }\n if($relationsToAdd['photos'] != [])\n {\n DB::table('remote_photos')->insert($relationsToAdd['photos']);\n }\n if($relationsToAdd['amenities'] != [])\n {\n DB::table('spot_amenities')->insert($relationsToAdd['amenities']);\n }\n if($relationsToAdd['tags'] != [])\n {\n DB::table('spot_tag')->insert($relationsToAdd['tags']);\n }\n if($relationsToAdd['locations'] != [])\n {\n DB::table('spot_points')->insert($relationsToAdd['locations']);\n }\n });\n }", "title": "" }, { "docid": "766cb50d1474d31f7a95149f39ae5578", "score": "0.5504083", "text": "public function services() \n {\n \treturn $this->hasMany('App\\Service');\n }", "title": "" }, { "docid": "fea823b03a681703e2a233ea0b266f60", "score": "0.55034924", "text": "public function store(Request $request)\r\n {\r\n \r\n $service = Service::create([\r\n 'name' => $request->input('name'),\r\n 'description' => $request->input('description'),\r\n 'parent_id' => $request->input('parent_id'),\r\n 'status' => $request->input('status'),\r\n ]);\r\n\r\n\r\n if($service){\r\n if ( isset( $request['image'] ) ) {\r\n try {\r\n $media = new Media();\r\n $media->upload( $service, $request['image'], '/uploads/service/' );\r\n } catch (Exception $e) {\r\n\r\n return $e;\r\n }\r\n }\r\n\r\n\r\n\r\n if ( isset( $request['locations'] ) ) {\r\n $location_titles = $request['locations']['location'];\r\n\r\n $locationsKeys = array_keys($location_titles);\r\n\r\n // Create specification\r\n foreach ($locationsKeys as $location) {\r\n $service->locations()->create([\r\n 'service_id' => $service->id,\r\n 'location' => $location_titles[$location],\r\n ]);\r\n }\r\n }\r\n\r\n if ( isset( $request['times'] ) ) {\r\n $time_titles = $request['times']['time'];\r\n\r\n $timesKeys = array_keys($time_titles);\r\n\r\n // Create specification\r\n foreach ($timesKeys as $time) {\r\n $service->times()->create([\r\n 'service_id' => $service->id,\r\n 'time' => $time_titles[$time],\r\n ]);\r\n }\r\n }\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n return redirect()->back()\r\n ->with('success' , 'Service created successfully');\r\n }\r\n\r\n return back()->withInput()->with('errors', 'Error creating new Service');\r\n }", "title": "" }, { "docid": "273d4d5e91035d09b746c5a8747c7906", "score": "0.54853284", "text": "public function services()\n {\n return $this->belongsToMany('App\\Service', 'school_has_services')->withTimestamps();\n }", "title": "" }, { "docid": "310825c793c69e0704f725a7691719b7", "score": "0.54635346", "text": "public function creating(Service $service)\n {\n $service->slug = Str::slug($service->name);\n }", "title": "" }, { "docid": "4e9e9eb33c3269a4580e0019206d4adf", "score": "0.5441465", "text": "public function store(Request $request)\n {\n $service = new Services;\n $tags= $request->input('service_tag');\n $service->title = $request->input('title');\n $service->sub_title = $request->input('sub_title');\n $description = $request->input('description');\n $service->description = $description;\n $service->price = $request->input('price');\n $name = Str::slug($request->input('title'));\n $service_exist = services::where('slug', $name)->first();\n if ($service_exist) {\n $last_record = services::find(\\DB::table('services')->max('id'));\n $incremented_id = $last_record->id + 1;\n $slug = $name . '-' . $incremented_id;\n } else {\n $slug = $name;\n }\n $service->slug = $slug;\n\n $service->image = $request->input('service_image');\n \n \n $service->save();\n foreach($tags as $tag){\n \n $servicetag = new Servicetags;\n $servicetag->service_id= $service->id;\n $servicetag->name=$tag;\n $servicetag->save();\n\n }\n return redirect()->route('services.index')->with('success', 'Service added successfully.');\n }", "title": "" }, { "docid": "e0bff58c178f22bcf44e9b71b6c8495b", "score": "0.54379284", "text": "public function services()\n {\n return $this->belongsToMany('App\\Service', 'restaurant_service',\n 'restaurant_id', 'service_id');\n }", "title": "" }, { "docid": "a18dd3f1797f5be3ad6889a3f5d41e76", "score": "0.5425397", "text": "public function services() {\n return $this->belongsToMany(Service::class, 'business_services');\n }", "title": "" }, { "docid": "237ea63a7523bbcdcb3bdbbfb6e294f4", "score": "0.5424713", "text": "public function created(Service $service)\n {\n //\n }", "title": "" }, { "docid": "73b4f4a040eaa8a43ad2ac6a5673df42", "score": "0.5421659", "text": "public function services() {\n return $this->belongsTo('App\\Service', 'service_id');\n }", "title": "" }, { "docid": "decf89dbbe582b1986f655a32fe48132", "score": "0.53818506", "text": "public function execute()\n {\n DatabaseManager::getInstance()->query(Constants::getInstance()->get('addServiceAction'), [\n ':ACT_NAME' => $this->getRequest()->query->get('name'),\n ':ACT_TYPE' => $this->getRequest()->query->get('type')\n ]);\n\n $this->setMessage('ServiceInsertion', [\n 'item_id' => $this->getInstruction()->getInsertId(),\n 'action_id' => $actionId = DatabaseManager::getInstance()->getLastInsertId()\n ]);\n\n DatabaseManager::getInstance()->query(Constants::getInstance()->get('addServiceActionRelation'),\n [':SRVC_ID' => $this->getInstruction()->getInsertId(), ':ACT_ID' => $actionId]);\n }", "title": "" }, { "docid": "d7701f1de0671dbb5f9a3ca3b04a7762", "score": "0.5381494", "text": "public function serviceAdd($adresse)\n {\n $this->getDataAccessObject()->daoAdd($adresse);\n $id = $this->getDataAccessObject()->daoGetId($adresse);\n $adresse->setIdAdresse($id[0][\"ID_ADRESSE\"]);\n }", "title": "" }, { "docid": "9beb3c518e65d24e10313e0b846ccff3", "score": "0.537872", "text": "public function store(ServiceRequest $request)\n {\n $price = str_replace(',', '', $request->input('price'));\n $request->merge(['price' => $price]);\n $service = Service::create($request->all());\n foreach ($request->input('sections') as $section) {\n $service->sections()->create([\n 'title' => $section['title'],\n 'content' => $section['content']\n ]);\n }\n session()->flash('flash_message', 'Se ha agregado el servicio: '.$service->title);\n return redirect('servicios');\n }", "title": "" }, { "docid": "d92ac9ca11ddaef01d5db9f08bec31fe", "score": "0.5377036", "text": "public function register_services() {\n\t\t// Bail early so we don't instantiate services twice.\n\t\tif ( ! empty( $this->services ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$classes = $this->get_service_classes();\n\n\t\t$this->services = array_map(\n\t\t\t[ $this, 'instantiate_service' ],\n\t\t\t$classes\n\t\t);\n\n\t\tarray_walk( $this->services, function ( Service $service ) {\n\t\t\t$service->register();\n\t\t} );\n\t}", "title": "" }, { "docid": "e2249a31202dc2ebd21b61d9816d5409", "score": "0.53660005", "text": "protected function updateServicesRelationship(array $services, $id_employee, $id_coupon)\n\t{\n\t\tif ($id_coupon <= 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$dbo = JFactory::getDbo();\n\n\t\t// get existing services\n\t\t$existing = array();\n\n\t\t$q = $dbo->getQuery(true)\n\t\t\t->select($dbo->qn('id_service'))\n\t\t\t->from($dbo->qn('#__vikappointments_coupon_service_assoc'))\n\t\t\t->where($dbo->qn('id_coupon') . ' = ' . (int) $id_coupon);\n\n\t\t$dbo->setQuery($q);\n\t\t$dbo->execute();\n\n\t\tif ($dbo->getNumRows())\n\t\t{\n\t\t\t$existing = $dbo->loadColumn();\n\t\t}\n\n\t\t// create relationship for new services\n\t\t$missing = array();\n\n\t\tforeach ($services as $s)\n\t\t{\n\t\t\tif (!in_array($s, $existing))\n\t\t\t{\n\t\t\t\t$missing[] = $s;\n\t\t\t}\n\t\t}\n\n\t\t$this->insertServicesRelationship($missing, $id_coupon);\n\n\t\t// detach relationship for existing services that are no more selected\n\t\t$detach = array();\n\n\t\tforeach ($existing as $s)\n\t\t{\n\t\t\tif (!in_array($s, $services))\n\t\t\t{\n\t\t\t\t$detach[] = $s;\n\t\t\t}\n\t\t}\n\n\t\t$this->deleteServicesRelationships($id_coupon, $detach);\n\t}", "title": "" }, { "docid": "a485a1b10b2e9c009855b2777f9c8ff9", "score": "0.5361386", "text": "public function create($service, $entity);", "title": "" }, { "docid": "b9833b4dcbaccee5bb1d6e04e87e79e9", "score": "0.5361226", "text": "public function Services(){\n return $this->hasMany('App\\Models\\Service');\n }", "title": "" }, { "docid": "4cb0baf139d9043a73c10bf9d84c0899", "score": "0.5360549", "text": "public function creating(Service $Service)\n {\n //code...\n }", "title": "" }, { "docid": "dd222e7baa4293e0c748d97ffecdfb64", "score": "0.5338645", "text": "function add_call_center_has_service($params)\n {\n $this->db->insert('call_center_has_service',$params);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "3aa862dc76c799c6fa049b50c6cda11e", "score": "0.53229207", "text": "public function run()\n {\n $service = [\n [\n 'name_service' => 'Dịch Vụ Mặt',\n 'icon' => 'face.jpg'\n ],\n [\n 'name_service' => 'Dịch Vụ Móng',\n 'icon' => 'nail.jpg'\n ],\n [\n 'name_service' => 'Dịch Vụ Body',\n 'icon' => 'body.jpg'\n ]\n ];\n\n DB::table('services')->insert($service);\n }", "title": "" }, { "docid": "0e01e7f7218b2fb3c212ee3260548403", "score": "0.5304492", "text": "public static function register_services(): void\n {\n foreach (self::get_services() as $class) {\n $service = self::instantiate($class);\n if (method_exists($class, 'register')) {\n $service->register();\n }\n }\n }", "title": "" }, { "docid": "00c5e7150ea2944df0df9cb034a5d51e", "score": "0.5280982", "text": "public function handle(Services $services)\n {\n $service = $services->create([\n 'name' => $this->name,\n 'slug' => $this->slug,\n 'type' => $this->type,\n 'agent_id' => $this->agent_id,\n 'server_id' => $this->server_id,\n ]);\n\n return ['id' => $service->id];\n }", "title": "" }, { "docid": "acefc3b9f424a250308213235caa7169", "score": "0.52697676", "text": "public function add_service(){\r\t\t$query=\"insert into `\".$this->tablename.\"` (`id`,`title`,`description`,`color`,`image`,`status`,`position`) values(NULL,'\".$this->title.\"','\".$this->description.\"','\".$this->color.\"','\".$this->image.\"','\".$this->status.\"','\".$this->position.\"')\";\r $result=mysqli_query($this->conn,$query);\r\t\t\t$value=mysqli_insert_id($this->conn);\r\t\t\treturn $value;\r\t\t}", "title": "" }, { "docid": "c3a26b3c0ca468a83b6bbacc6a2ebecd", "score": "0.5263267", "text": "public static function register_services()\n {\n foreach (self::get_services() as $class) {\n $service = self::instantiate($class);\n if (method_exists($service, 'register')) {\n $service->register();\n }\n }\n }", "title": "" }, { "docid": "a0fe55a16b33f3b00eea97ab5d557fd4", "score": "0.5252756", "text": "public function insert() {\r\n\t\t$this->getMapper()->insert($this);\r\n\t}", "title": "" }, { "docid": "dd703b1900806789a3cf4bfdbd86efee", "score": "0.52415186", "text": "public function servicesId()\n {\n return $this->belongsToMany('App\\Service', 'restaurant_service',\n 'restaurant_id', 'service_id');\n }", "title": "" }, { "docid": "0fcd243778b49c9d714b06bc68c4d3cf", "score": "0.5223606", "text": "public function run()\n {\n DB::table('services')->insert([\n ['main_id' => null,'lang_id' => '1','name'=>'car rental','desc'=>'desc on car rental','url'=>'/services/rentals/cars'],\n ['main_id' => null,'lang_id' => '2','name'=>'прокат автомобилей','desc'=>'прокат автомобилей','url'=>''], \n ]);\n }", "title": "" }, { "docid": "b665fbe58253f1b04b910fca40860b48", "score": "0.5221406", "text": "public function services(){\n return $this->belongsTo(Services::class,'service_id');\n }", "title": "" }, { "docid": "ba9eba2a98af6bd75e4f1f28fbabbaae", "score": "0.5217776", "text": "public function listsServicesPost()\r\n {\r\n $input = Request::all();\r\n $new_serivce = Services::create($input);\r\n if($new_serivce){\r\n return response()->json(['msg'=> 'Created a new service'],200);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new service');\r\n }\r\n }", "title": "" }, { "docid": "17cafbc69993f0ef63ccaaa8be6310a0", "score": "0.5206224", "text": "public static function register_services()\n {\n foreach ( self::get_services() as $class ) {\n $service = self::instantiate( $class );\n if ( method_exists( $service, 'register' ) ) {\n $service->register();\n }\n }\n }", "title": "" }, { "docid": "0219505fd92fccbd8858193eb8db8e6d", "score": "0.51971126", "text": "public function run()\n {\n $service = [\n [\n 'id' => 1,\n 'name' => 'Import XML',\n 'description' => 'Le service Import XML ',\n 'is_active' => true,\n 'status_message' => 'Le service Import XML est activé.',\n\n ],\n [\n 'id' => 2,\n 'name' => 'PTL',\n 'description' => 'Le service PTL ',\n 'is_active' => true,\n 'status_message' => 'Le service PTL est activé.',\n\n ],\n [\n 'id' => 3,\n 'name' => 'Tarif CSV',\n 'description' => 'Le service de génération du fichier Tarif CSV (VIALTO) ',\n 'is_active' => true,\n 'status_message' => 'Le service Tarif CSV est activé.',\n\n ],\n [\n 'id' => 4,\n 'name' => 'Plan. Doc',\n 'description' => 'Le service de documents XLS plannifiés. ',\n 'is_active' => true,\n 'status_message' => 'Le service de documents XLS plannifiés est activé.',\n\n ],\n\n ];\n\n Service::insert($service);\n }", "title": "" }, { "docid": "24c6a8ef7379841da46889d87b861250", "score": "0.51900506", "text": "function user_services_insert($data)\n\t{\n\t\t\n\t\t$this->db->trans_start();\n\t\t\n\t\t$this->db->insert('user_services', $data);\n\t\t\n\t\t$inserted_id=$this->db->insert_id();\n\t\t\n\t\t$this->db->trans_complete();\n\t\t\n\t\tif ($this->db->trans_status() === FALSE)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $inserted_id;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "58767d4f4d68c6c089fbad31f39c6c20", "score": "0.51861364", "text": "function createservicestep1_post()\n {\n $em = $this->doctrine->em;\n $service = new \\Entities\\Service();\n $service->setAthor($this->getCurrentUser());\n\n\n $service->title = $this->post('title', TRUE);\n $service->subtitle = $this->post('subtitle', TRUE);\n $service->phone = $this->post('phone', TRUE);\n $service->address = $this->post('address', TRUE);\n// $service->addSubCategories($this->post('categories', TRUE),$em);\n// $service->addCities($this->post('cities', TRUE),$em);\n// $icon = $this->post('icon');\n// $path= \"./resources/\".$icon['filename'];\n// file_put_contents($path, base64_decode($icon['value']));\n// $service->setIcon($path);\n// $em->persist($service);\n// $em->flush();\n $this->set_response($service, REST_Controller::HTTP_OK);\n }", "title": "" }, { "docid": "56f4903df671b76bc82af607f59d00ec", "score": "0.51833344", "text": "public function created(Service $Service)\n {\n //code...\n }", "title": "" }, { "docid": "7a126f48230b1beadbd474d027b2544e", "score": "0.5174146", "text": "public function add_service() {\r\n if (USER_ROLE == ROLE_ONE) {\r\n $result['companies'] = $this->company_model->get_companies_id_name();\r\n $this->load->view('webpages/add_service', $result);\r\n } else {\r\n $this->load->view('webpages/404');\r\n }\r\n }", "title": "" }, { "docid": "ba4898852373dd6058e4e2a4d3b26204", "score": "0.5171553", "text": "public function save($services, $parameters, $request, $link)\n {\n // save the values \n $services->getManager()->persist($this);\n }", "title": "" }, { "docid": "07f15471a06c8b8bb5ae47d35cf88975", "score": "0.51641715", "text": "public function created(SaleService $saleService)\n {\n $serviceProducts = ServiceProduct::where('service_id', '=', $saleService->service_id)->get();\n $sale = Sale::findOrFail($saleService->sale_id);\n \n foreach($serviceProducts as $product){\n ProductMovement::create([\n 'product_id' => $product->product_id,\n 'quantity' => $product->quantity,\n 'store_house_movement_id' => $sale->store_house_movement_id,\n 'product_movement_type_id' => '8',\n ]);\n }\n }", "title": "" }, { "docid": "4fa11b9329828b037d19ecbfdd502591", "score": "0.5148511", "text": "public function run()\r\n {\r\n $services = App\\service::all();\r\n\r\n foreach ($services as $service)\r\n {\r\n $service->stylists()->save(\\App\\service::find(1));\r\n $service->stylists()->save(\\App\\service::find(2));\r\n $service->stylists()->save(\\App\\service::find(3));\r\n }\r\n\r\n }", "title": "" }, { "docid": "e7637d9ea29521a5657e97e76cdb32f4", "score": "0.51438165", "text": "public function insert()\n {\n $this->id = insert($this);\n }", "title": "" }, { "docid": "a6dac4060d46581fe78f79f32d06c099", "score": "0.5135663", "text": "public function persist()\n {\n\n $this->persistor->persist(\n $this->event,\n $this->relatedEntities,\n $this->eventRequest->getApplication(),\n $this->eventRequest->getAccount(),\n $this->eventRequest->getProduct(),\n $this->eventRequest->appendCustomer\n );\n\n }", "title": "" }, { "docid": "b61b9e07fb5aa151366f94ab48f21030", "score": "0.5135304", "text": "public static function register_services()\n {\n foreach ( self::get_services() as $class )\n {\n $service = self::instantiate( $class );\n if( method_exists( $service, 'register' ) )\n $service->register();\n }\n }", "title": "" }, { "docid": "aa7b0ca111caaae5a3f25169528b107d", "score": "0.51283354", "text": "private function registerServices() {\n // Modules\n $this->addService('modules', 'MyTravel\\Core\\Service\\Modules::setService');\n // Routing\n $this->addService('routing', 'MyTravel\\Core\\Service\\Routing::setService');\n // Event dispatcher\n $this->serviceContainer\n ->register('events', 'Symfony\\Component\\EventDispatcher\\EventDispatcher');\n // Database\n $this->addService('db', 'MyTravel\\Core\\Service\\Db::setService');\n // Access\n $this->addService('access', 'MyTravel\\Core\\Service\\Access::setService');\n }", "title": "" }, { "docid": "cb6bb1839f9cfc9a4f4418bbbdaed3de", "score": "0.5118154", "text": "public function run()\n {\n DB::table('services')->insert([\n 'name' => 'Service 1'\n ]);\n DB::table('services')->insert([\n 'name' => 'Service 2'\n ]);\n DB::table('services')->insert([\n 'name' => 'Service 3'\n ]);\n DB::table('services')->insert([\n 'name' => 'Service 4'\n ]);\n DB::table('services')->insert([\n 'name' => 'Service 5'\n ]);\n }", "title": "" }, { "docid": "c45c3b4bf929c62710f67fcd5d19c5f0", "score": "0.510254", "text": "public function createServiceObjects() \n {\n var_dump('jj', Ini::$serviceConnections);\n //if (!empty(Ini::$serviceConnections)) \n //{\n foreach (Ini::$serviceConnections as $connectionName => $connectionDetail) \n {\n Ini::loadModule(Sysutils::Ucase($connectionDetail->type) . 'Service', 'Services', '\\Sys');\n $fqClassname = '\\\\Sys\\\\'. Sysutils::Ucase($connectionDetail->type) . 'Service';\n $this->autoLoadedServices[$connectionName] = array('url' => $connectionDetail->url, 'type' => $connectionDetail->type);\n $this->{$connectionName} = new $fqClassname($connectionDetail->url);\n }\n \n //}\n }", "title": "" }, { "docid": "faefcfb928ed99c4660c278ee9514589", "score": "0.50887614", "text": "public function run()\n {\n $data = file_get_contents(\"database/Queries/services.json\");\n $services = json_decode($data, true);\n foreach ($services as $value) {\n Service::create([\n 'title' => $value['title'],\n 'description' => $value['description'],\n 'state' => $value['state']\n ]);\n }\n }", "title": "" }, { "docid": "d0547fb9d37353ab21a0f84aa0fb7ee5", "score": "0.50666577", "text": "public function addDeferredServices(array $services): void\n {\n $this->deferredServices = array_merge($this->deferredServices, $services);\n }", "title": "" }, { "docid": "17298abd357b4c68bb431ca626fbe7e3", "score": "0.5058987", "text": "public function store(Request $request)\n {\n /*\n try{\n \\DB::beginTransaction();\n\n $order = Order::findOrFail($request->order_no);\n foreach($request->service_orders as $service_order_id){\n // $service_order = ServiceOrder::findOrFail($service_order_id);\n $sched = ServiceOrderSchedule::create([\n 'int_ss_service_order_id_fk' => $service_order_id,\n 'dat_start' => $request->dat_start[$service_order_id],\n 'dat_end' => $request->dat_end[$service_order_id]\n ]);\n\n ServiceOrderStatus::create([\n 'int_sos_service_order_id_fk' => $service_order_id,\n 'str_status' => ServiceOrderStatus::$status['SCH']\n ]);\n\n foreach($request->personnels[$service_order_id] as $personnel_id){\n ServiceOrderPersonnel::create([\n 'int_schedule_id_fk' => $sched->int_sched_id,\n 'int_personnel_id_fk' => $personnel_id\n ]);\n }\n }\n\n \\DB::commit();\n } \n */\n //\n \n try {\n // [todo] insert validation rules here\n\n \\DB::beginTransaction();\n\n $service_sched = new ServiceOrderSchedule();\n $service_sched->int_ss_service_order_id_fk = $request->service_order_number;\n $service_sched->dat_start = $request->mobilization;\n $service_sched->dat_end = $request->de_mobilization;\n $service_sched->save();\n\n \\DB::commit();\n }\n catch(Exception $e){\n \\DB::rollback();\n\n return response()->json([\n 'message' => $e,\n 'alert' => 'error',\n ]);\n }\n\n return response()->json([\n 'message' => 'Successfully completed transaction',\n 'alert' => 'success',\n 'url' => route('process-deployment.index')\n ]);\n }", "title": "" }, { "docid": "6e1fc9a826e8ce664fcefb5112ce5d3b", "score": "0.5055622", "text": "public function run()\n {\n \n\n \\DB::table('services')->delete();\n \n \\DB::table('services')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'title' => 'business cards - online visiting card printing',\n 'slug' => 'business-card-content',\n 'meta_tag' => 'business cards, visiting card, name card, business cards online, online printing, best business cards, business card template, creative business cards, visiting cards',\n 'meta_description' => 'Rockdesign is an online printing services which offers best creative business cards that will make your brand elevate to a new level. Our visiting card ranges from luxury, metal, plastic, premium, high end name cards. You can customize your business cards with features such as: letterpress, embossing, printing, spot UV, offset printing, thermography, laser cutting, laser engraving, digital printing and much more. ',\n 'short_text' => NULL,\n 'slide_id' => 1,\n 'created_at' => '2016-01-30 19:23:04',\n 'updated_at' => '2016-02-19 02:16:23',\n ),\n 1 => \n array (\n 'id' => 2,\n 'title' => 'Invitation Card Content',\n 'slug' => 'invitation-card-content',\n 'meta_tag' => 'Invitation Card Content',\n 'meta_description' => 'Invitation Card Content',\n 'short_text' => NULL,\n 'slide_id' => 2,\n 'created_at' => '2016-01-30 19:26:16',\n 'updated_at' => '2016-02-01 09:54:12',\n ),\n 2 => \n array (\n 'id' => 3,\n 'title' => 'Business Card Template',\n 'slug' => 'business-card-template',\n 'meta_tag' => 'Business Card Template, Business Card Templates, business card design, name card design',\n 'meta_description' => 'Free Business Card Templates for Rockdesign Printing customer, Order a Professional business card template online. Choose from our selection of cardstocks and design styles',\n 'short_text' => NULL,\n 'slide_id' => 1,\n 'created_at' => '2016-01-30 19:26:28',\n 'updated_at' => '2016-02-19 02:29:58',\n ),\n 3 => \n array (\n 'id' => 4,\n 'title' => 'Invitation Card Template',\n 'slug' => 'invitation-card-template',\n 'meta_tag' => 'Invitation Card Template',\n 'meta_description' => 'Invitation Card Template',\n 'short_text' => NULL,\n 'slide_id' => 1,\n 'created_at' => '2016-01-30 19:26:59',\n 'updated_at' => '2016-01-30 19:27:08',\n ),\n 4 => \n array (\n 'id' => 5,\n 'title' => 'Rockdesign : Design Services',\n 'slug' => 'design-service',\n 'meta_tag' => 'Logo Design, business card design, branding, brand design, Best logo design, graphic design',\n 'meta_description' => 'Let our creative designers help you build your brand - offering premium logo and business card design services.\n',\n 'short_text' => NULL,\n 'slide_id' => 1,\n 'created_at' => '2016-01-30 19:27:11',\n 'updated_at' => '2016-02-26 01:23:46',\n ),\n ));\n \n \n }", "title": "" }, { "docid": "0ef89245c262d00289b05897524f7e52", "score": "0.5055196", "text": "public function store(CreateServiceRequest $request)\n {\n\n DB::beginTransaction();\n try{\n\n $this->saveServices(new Services(), $request);\n DB::commit();\n\n return redirect()->route('services.index')->with('status', 'Created Successfully');\n\n } catch(Exception $e) {\n DB::rollBack();\n Log::error($e->getMessage());\n return response(['status' => \"Can't Store Data\"], 500);\n }\n\n }", "title": "" }, { "docid": "4dff761640f40c0c4129c6bd54b65735", "score": "0.5051278", "text": "public function insert(Persona $persona);", "title": "" }, { "docid": "0b8268130827e14c0b35fc197587e70f", "score": "0.5046888", "text": "public function store()\r\n\t{\r\n\t\t// validate\r\n\t\t// read more on validation at http://laravel.com/docs/validation\r\n\t\t$rules = array (\r\n\t\t\t'name' => 'required|unique:services,name',\r\n\t\t\t'estimated_days' => 'required|numeric|min:1'\r\n\t\t);\r\n\r\n\t\t$validator = Validator::make(Input::all(), $rules);\r\n\r\n\t\t//process\r\n\t\tif ($validator->fails()) {\r\n\t\t\treturn Redirect::to('services/create')\r\n\t\t\t\t->withErrors($validator)\r\n\t\t\t\t->withInput();\r\n\t\t} else {\r\n\t\t\t// store service\r\n\t\t\t$service = new Service();\r\n\t\t\t$service->name \t \t= Input::get('name');\r\n\t\t\t$service->estimated_days\t= Input::get('estimated_days');\r\n\t\t\t$service->organization_id = Auth::user()->organization_id;\r\n\t\t\t$service->is_active = 1;\r\n\t\t\t$service->database = Input::get('database');\r\n\t\t\t$service->tabel = Input::get('tabel');\r\n\t\t\t$service->save();\r\n\r\n\r\n\t\t\t// redirect\r\n\t\t\tSession::flash('message', 'Successfully created service');\r\n\t\t\treturn Redirect::to('services/'.$service->id);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "42a138a214a3e095ed5aac87fa5aaab1", "score": "0.5040514", "text": "public function push() {\n\t\t$this->save();\n\n\t\t// To sync all of the relationships to the database, we will simply spin through\n\t\t// the relationships, calling the \"push\" method on each of the models in that\n\t\t// given relationship, this should ensure that each model is saved.\n\t\tforeach ($this->relationships as $name => $models) {\n\t\t\tif ( ! is_array($models)) {\n\t\t\t\t$models = array($models);\n\t\t\t}\n\n\t\t\tforeach ($models as $model) {\n\t\t\t\t$model->push();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "dbf9f43b9d54e92e0cfc893cbbbda51b", "score": "0.50376284", "text": "public function registerService($service)\n {\n $this->services[] = $service;\n }", "title": "" }, { "docid": "0ec179192fbb2af56b3fdeacc6a3e3ea", "score": "0.50337225", "text": "public static function addDeferredServices($services){\n \\Illuminate\\Foundation\\Application::addDeferredServices($services);\n }", "title": "" }, { "docid": "edd2af2fd1fcb9d94dd581f1f5047e83", "score": "0.50321317", "text": "public function postInsert(\\Propel\\Runtime\\Connection\\ConnectionInterface $con = null) {\n parent::postInsert($con);\n SearchLocation::prepareForLocation($this, new SearchLocation())\n ->save($con);\n }", "title": "" }, { "docid": "6c4b6998dfaab3233b2a2564e70a220e", "score": "0.50313246", "text": "public function isAddToRelationship();", "title": "" }, { "docid": "85e778dff305a448c98663c1bd774aa1", "score": "0.50234056", "text": "public function insert() {\n \n }", "title": "" }, { "docid": "d8497c62d25c78542899be3e57500924", "score": "0.5019065", "text": "public function registerServices() {\n\t\t$services = Config::inst()->get('FakeManager', 'services');\n\t\tif($services) {\n\t\t\tforeach($services as $origName => $fakeName) {\n\t\t\t\t$fakeObj = Injector::inst()->create($fakeName);\n\t\t\t\tif($this->db && $fakeObj instanceof FakeDatabaseConsumerInterface) {\n\t\t\t\t\t$fakeObj->setDb($this->db);\n\t\t\t\t}\n\t\t\t\t$this->services[$origName] = $fakeObj;\n\t\t\t\tInjector::inst()->registerService($fakeObj, $origName);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e6c5b116f7fa106441e85e4070ffdf22", "score": "0.5014483", "text": "public function submitNewService()\n {\n $array = [\n 'serviceName' => request()->input('serviceName'),\n 'servicePrice' => request()->input('servicePrice'),\n 'serviceVisits' => request()->input('serviceVisits'),\n 'serviceDesc' => request()->input('serviceDesc'),\n 'serviceBenefit' => request()->input('serviceBenefit')\n ];\n\n DB::table('tbl_services')->insert([\n 'service_name'=>$array['serviceName'],\n 'service_price'=>$array['servicePrice'],\n 'service_visits'=>$array['serviceVisits'],\n 'service_desc'=>$array['serviceDesc'],\n 'service_benefit'=>$array['serviceBenefit']\n ]);\n return redirect('cms/1');\n }", "title": "" }, { "docid": "34a6a215ef79dcc93ab1ba9badc9c574", "score": "0.50121504", "text": "public function add() {\n $insertData = $this->data;\n $keepNullFields = [\n 'estimator_id', 'date_requested', 'date_service', 'class_id',\n 'date_service', 'lat', 'lng'\n ];\n foreach ($keepNullFields as $field) {\n if (!$insertData[$field]) {\n $insertData[$field] = null;\n }\n }\n $model = new ReferralModel;\n $ref = $model->create();\n $ref->set($insertData);\n $ref->save();\n $this->renderJson([\n 'success' => true,\n 'message' => 'Job request created successfully',\n 'data' => $ref->asArray()\n ]);\n }", "title": "" }, { "docid": "1838a3a044be12cede5208be7174a6b6", "score": "0.50056505", "text": "public function add() {\n\n $sql = \"INSERT INTO persona(id,nombre,apellido_paterno,apellido_materno,estado_salud,telefono,ubicacion)\n VALUES(null,'{$this->nombre}','{$this->apellido_paterno}','{$this->apellido_materno}',\n '{$this->estado_salud}','{$this->telefono}','{$this->ubicacion}')\";\n $this->con->consultaSimple($sql);\n }", "title": "" }, { "docid": "2d7650e590ccc525f054f5632c4e9db5", "score": "0.50027704", "text": "public function store(Request $request)\n {\n //validate the user form data \n $request->validate([\n 'Title'=>'required', \n 'type'=>'required',\n 'date'=> 'required',\n 'venue'=> 'required',\n 'address'=>'required', \n 'preacher'=>'required',\n 'sermon_title'=>'required', \n 'bible_references'=>'required',\n 'givings'=> 'required',\n 'attendees'=> 'required',\n 'sermon_notes'=> 'required',\n 'first_timers'=>'required|nullable',\n ]);\n\n \n\n\n\n\n //inserting data into the database \n $services = new Service();\n $services->Title = $request->input('Title');\n $services->type = $request->input('type');\n $services->date = $request->input('date');\n\n $services->venue = $request->input('venue');\n $services->address = $request->input('address');\n\n $services->preacher = $request->input('preacher');\n \n $services->sermon_title = $request->input('sermon_title');\n \n $services->bible_references = $request->input('bible_references');\n \n $services->sermon_notes = $request->input('sermon_notes');\n $services->attendees = $request->input('attendees');\n $services->first_timers= $request->input('first_timers');\n $services->givings = $request->input('givings');\n \n \n \n\n \n $services->save();\n\n //redirecting to the user dashboard after creating a new service\n return redirect('/admin');\n }", "title": "" }, { "docid": "1fbe883a7118283c1cf0339253512de0", "score": "0.49997443", "text": "public function add($entity);", "title": "" }, { "docid": "e4eab356d2d327656c0f92bd73350019", "score": "0.49995217", "text": "public function saveServices(Services $service, $request)\n {\n $image = $request->has('banner') ? $request->file('banner') : null;\n $service->storeImage($image, ['width' => 230 , 'height' => 230]);\n $service->name = $request->input('name');\n $service->slug = str_slug($request->input('name'));\n $service->category_type_id = $request->input('category_type');\n $service->description = $request->input('description');\n $service->sequence = $service->sequence ?? Services::count() + 1;\n $service->save();\n return $service;\n }", "title": "" }, { "docid": "359682c332bcf4e27bde6f8d2cb9d50c", "score": "0.49962538", "text": "public function create()\n{\n $services = Service::pluck('service','id'); // shows info from services table in form\n return view('order.create')->with('services',$services);\n }", "title": "" }, { "docid": "fb5bcf4671dd19df643a7daeeb34a1b7", "score": "0.49883544", "text": "function addService($service, $description, $info) {\n\t\tif (!in_array($service, $this->services)) {\n\t\t\t$this->services[] = $service;\n\t\t\t$this->descriptions[] = $description;\n\t\t\t$this->infos[] = $info;\n\t\t} else {\n\t\t\treturn \"Service already exists.\";\n\t\t}\n\t}", "title": "" }, { "docid": "30e07854317b5bdf29d88214dffc37d3", "score": "0.4978723", "text": "function insertarServicio(){\r\n\t\t$this->procedimiento='gev.f_tgv_servicio_ime';\r\n\t\t$this->transaccion='tgv_SERVIC_INS';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\t\t\r\n\t\t\r\n\t\t//Define los parametros para la funcion\r\n\t\t$this->setParametro('estado','estado','varchar');\r\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\r\n\t\t$this->setParametro('id_lugar_destino','id_lugar_destino','int4');\r\n\t\t$this->setParametro('id_ep','id_ep','int4');\r\n\t\t$this->setParametro('fecha_asig_fin','fecha_asig_fin','date');\r\n\t\t$this->setParametro('fecha_sol_ini','fecha_sol_ini','date');\r\n\t\t$this->setParametro('descripcion','descripcion','varchar');\r\n\t\t$this->setParametro('id_lugar_origen','id_lugar_origen','int4');\r\n\t\t$this->setParametro('cant_personas','cant_personas','int4');\r\n\t\t$this->setParametro('fecha_sol_fin','fecha_sol_fin','date');\r\n\t\t$this->setParametro('id_funcionario','id_funcionario','int4');\r\n\t\t$this->setParametro('fecha_asig_ini','fecha_asig_ini','date');\r\n\t\t$this->setParametro('id_funcionario_autoriz','id_funcionario_autoriz','int4');\r\n\t\t$this->setParametro('observaciones','observaciones','varchar');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "136f6d16d1c0c33665f683c8cbf0955c", "score": "0.49551097", "text": "public function setDados(array $dados): CreatePeopleService;", "title": "" }, { "docid": "f59b70607069b60dcf21b2bc8271c02f", "score": "0.49521765", "text": "public function store(CreatePatent_ServicesRequest $request)\n {\n $input = $request->all();\n\n $patentServices = $this->patentServicesRepository->createPost($request);\n\n Flash::success('Patent Services saved successfully.');\n\n return redirect(route('patentServices.index'));\n }", "title": "" }, { "docid": "9579c965be9f656a951ba0a65bedf1cc", "score": "0.4951028", "text": "protected function addRelation()\n {\n $fromTable = $this->ask('Enter the name of the parent table');\n $this->checkInput($fromTable);\n $toTable = $this->ask('Enter the name of the child table');\n $this->checkInput($toTable);\n $relationColumn = $this->ask('Enter the column which is going to be referenced (default is \\'id\\')', 'id');\n $action = $this->choice('Action to be taken for column (default is \\'cascade\\')', ['cascade', 'restrict', 'set null'], 'cascade');\n $this->service->addRelation($fromTable, $toTable, $relationColumn, $action);\n }", "title": "" }, { "docid": "8679e238a246b7d25cc0bdce10f9f6f8", "score": "0.49422395", "text": "public function ajouter_service($service,$cout, \n $edition, $observ,$id_ag){\n $save=date('Y-m-d H:i:s');\n $del=0;\n // Ces données seront automatiquement échappées\n $this->db->set('DESIGNATION', $service);\n $this->db->set('COUT_SERVICE', $cout);\n\t\t$this->db->set('ANNE_EDITION', $edition);\n $this->db->set('DESCRIPTION_SERVICE', $observ);\n $this->db->set('SERVICE_AG', $id_ag);\n\t\t\t $this->db->set('SAVE_SERVICE', $save);\n $this->db->set('DEL_SERVICE', $del);\n\n return $this->db->insert($this->service); \n }", "title": "" }, { "docid": "08d040229708d618e59e03457f6c238c", "score": "0.49331215", "text": "public function store(ServiceCreateRequest $request)\n {\n Service::create([\n 'name' => $request->name,\n 'image' => $request->image ? $request->file('image')->store('public') : \"public/no_image.png\",\n 'service_type' => $request->service_type,\n 'client' => $request->idClient,\n 'start_date' => $request->start_date,\n 'end_date' => $request->end_date,\n 'observations' => $request->observations\n ]);\n return redirect()->route('client.show', ['id' => $request->idClient])->with('success', 'Servicio creado correctamente');\n }", "title": "" }, { "docid": "bac004c389d359450152038235fec9af", "score": "0.492054", "text": "public function store()\n {\n $data=$this->validate(request(),[\n 'name'=>'required',\n 'description'=>'required',\n 'doctor_id'=>'required|exists:departments,id',\n 'department_id'=>'required|exists:departments,id',\n 'detection_price'=>'required',\n 'return_price'=>'required',\n\n ],[],[\n 'name'=> trans('admin.name'),\n 'description'=> trans('admin.description'),\n 'department_id'=> 'القسم',\n 'doctor_id'=> 'الدكتور',\n 'detection_price'=> 'سعر الكشف',\n 'return_price'=> 'سعر الاعادة',\n ]);\n Service::create($data);\n session()->flash('success',trans('admin.record_added'));\n return redirect(url('service'));\n }", "title": "" }, { "docid": "49860eb18bca94e0516669b27d9f7c3d", "score": "0.49180558", "text": "function insert() {\n\t\t$solic = json_decode($_POST['DATA']);\n\t\t$service = new CompraService();\n\t\tif($service->insert($solic))\n\t\t\thttp_response_code();\n\t\telse\n\t\t\thttp_response_code(500);\n\t}", "title": "" }, { "docid": "aa9242415c5900cff4ad9748023adeb8", "score": "0.49117866", "text": "function add_service_type($params)\n {\n $this->db->insert('SERVICE_TYPE',$params);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "7e49598b7679f80511208bab5fd7fefe", "score": "0.49100798", "text": "protected function addServiceForeignKeys(Schema $schema)\n {\n $table = $schema->getTable('ds_service');\n $table->addForeignKeyConstraint(\n $schema->getTable('oro_organization'),\n ['organization_id'],\n ['id'],\n ['onDelete' => 'SET NULL', 'onUpdate' => null]\n );\n $table->addForeignKeyConstraint(\n $schema->getTable('oro_business_unit'),\n ['business_unit_owner_id'],\n ['id'],\n ['onDelete' => 'SET NULL', 'onUpdate' => null]\n );\n }", "title": "" }, { "docid": "bafe5e02a1dd11f3f8b0d29cd1d8c823", "score": "0.49097186", "text": "function insert() {\n\t\t$insert = \"INSERT INTO servicios(nombre_servicio, estado_servicio, descripcion, trabajador_id, fecha_creacion,fecha_modificacion , cliente_id, sucursal_id) VALUES(\n\t\t\t\t\n\t\t\t\t'\".$this->nombre_servicio.\"',\n\t\t\t\t'\".$this->estado_servicio.\"',\n\t\t\t\t'\".$this->descripcion.\"',\n\t\t\t\t'\".$this->trabajador_id.\"',\n\t\t\t\t'\".$this->fecha_creacion.\"',\n\t\t\t\t'\".$this->fecha_modificacion.\"',\n\t\t\t\t'\".$this->cliente_id.\"',\n\t\t\t\t'\".$this->sucursal_id.\"');\";\n\t\t\n\t\treturn $insert;\n\t\n\t}", "title": "" }, { "docid": "76321e0beee61fd0ed09d9f28efbcd0b", "score": "0.49046382", "text": "public function store(ServiceRequest $request)\n {\n // generar cotizacion\n $getServices = Service::orderBy('id', 'desc') -> first();\n \n if (isset($getServices -> id)) {\n $service_id_serial = $getServices -> id + 1;\n } else {\n $service_id_serial = 1;\n }\n $folio = str_pad($service_id_serial, 6, \"0\", STR_PAD_LEFT);\n $nombre_unico = substr(md5(time().$folio),0,5);\n\n $service = new Service($request->except('_token'));\n $service->folio = $nombre_unico;\n $service->save();\n\n return redirect(route('service.index'));\n }", "title": "" }, { "docid": "5d54f91b31b5faa145dd9ca7ec5b15f3", "score": "0.4901048", "text": "public function services()\n {\n return $this->belongsToMany(Service::class, 'room_services', 'room_id', 'service_id');\n // bang n-n bang trung gian lk voi nhau\n }", "title": "" }, { "docid": "551a02f974325f92af282f6ead1dd20c", "score": "0.48865613", "text": "public static function duplicate($service) {\n\n $serviceid = $service->id;\n\n // duplicate service\n $newservice = ORM::forTable('service')->create();\n Admin::duplicateRecord($service, $newservice);\n $newservice->code = \"CHANGE\";\n $newservice->date = date(\"Y-m-d\");\n $newservice->visible = 0;\n $newservice->save();\n $newserviceid = $newservice->id();\n\n // duplicate destinations\n // create a map of old to new ids\n $destmap = array();\n $destinations = ORM::forTable('destination')->where('serviceid', $serviceid)->findMany();\n if ($destinations) {\n foreach ($destinations as $destination) {\n $newdestination = ORM::forTable('destination')->create();\n Admin::duplicateRecord($destination, $newdestination);\n $newdestination->serviceid = $newserviceid;\n $newdestination->save();\n $destmap[$destination->id] = $newdestination->id();\n }\n }\n\n // duplicate pricebandgroup\n // create a map of old to new ids\n $pbmap = array();\n $pricebandgroups = ORM::forTable('pricebandgroup')->where('serviceid', $serviceid)->findMany();\n if ($pricebandgroups) {\n foreach ($pricebandgroups as $pricebandgroup) {\n $newpricebandgroup = ORM::forTable('pricebandgroup')->create();\n $newpricebandgroup->serviceid = $newserviceid;\n $newpricebandgroup->name = $pricebandgroup->name;\n $newpricebandgroup->save();\n $pbmap[$pricebandgroup->id] = $newpricebandgroup->id();\n }\n }\n\n // duplicate joining\n $joinings = ORM::forTable('joining')->where('serviceid', $serviceid)->findMany();\n if ($joinings) {\n foreach ($joinings as $joining) {\n $newjoining = ORM::forTable('joining')->create();\n Admin::duplicateRecord($joining, $newjoining);\n $newjoining->serviceid = $newserviceid;\n if (empty($pbmap[$joining->pricebandgroupid])) {\n throw new Exception('No pricebandgroup mapping exists for id = ' . $joining->pricebandgroupid);\n }\n $newjoining->pricebandgroupid = $pbmap[$joining->pricebandgroupid];\n $newjoining->save();\n }\n }\n\n // duplicate pricebands\n $pricebands = ORM::forTable('priceband')->where('serviceid', $serviceid)->findMany();\n if ($pricebands) {\n foreach ($pricebands as $priceband) {\n if (empty($pbmap[$priceband->pricebandgroupid])) {\n throw new Exception('No pricebandgroup mapping exists for id = ' . $priceband->pricebandgroupid);\n }\n $newpriceband = ORM::forTable('priceband')->create();\n Admin::duplicateRecord($priceband, $newpriceband);\n $newpriceband->serviceid = $newserviceid;\n if (empty($destmap[$priceband->destinationid])) {\n throw new Exception('No destination mapping exists for id = ' . $priceband->destinationid);\n }\n $newpriceband->destinationid = $destmap[$priceband->destinationid];\n if (empty($pbmap[$priceband->pricebandgroupid])) {\n throw new Exception('No pricebandgroup mapping exists for id = ' . $priceband->pricebandgroupid);\n }\n $newpriceband->pricebandgroupid = $pbmap[$priceband->pricebandgroupid];\n $newpriceband->save();\n }\n }\n\n // duplicate limits\n $limits = ORM::forTable('limits')->where('serviceid', $serviceid)->findOne();\n if ($limits) {\n $newlimits = ORM::forTable('limits')->create();\n Admin::duplicateRecord($limits, $newlimits);\n $newlimits->serviceid = $newserviceid;\n $newlimits->save();\n }\n\n return $newservice;\n }", "title": "" }, { "docid": "2b3e289ba90ed32621e1b278445202c4", "score": "0.48861527", "text": "public abstract function insert();", "title": "" }, { "docid": "f1007cf28141d40c94a678be2c0d711a", "score": "0.48841345", "text": "public function service()\n {\n return $this->belongsTo(Service::class);\n }", "title": "" }, { "docid": "1b92af37341f2d52fc7712766eb3527f", "score": "0.48700148", "text": "public function insert(stubObject $entity);", "title": "" }, { "docid": "9a5dd5caf48f9933c6a560eeaec4c1b2", "score": "0.4867004", "text": "public function run()\n {\n Service::create([\n 'name'=>'consultation'\n ]);\n Service::create([\n 'name'=>'operation'\n ]);\n }", "title": "" }, { "docid": "35a9e3b65bf45331723169cc43492fd4", "score": "0.4860647", "text": "public function addReferencedEntity(ParagraphInterface $entity);", "title": "" }, { "docid": "b165bc320c71ffbe264165f45b3e485b", "score": "0.4859628", "text": "public function insert($producto);", "title": "" }, { "docid": "6a630083f093c6df4c98f54239e869eb", "score": "0.485738", "text": "function submitServices($conn, $planID, $serviceArray){\n\t$sql = \"INSERT INTO planservice (PlanId, ServiceName, Comment) VALUES (:planID, :serviceName, :comment)\";\n\tdeleteServices($conn, $planID);\n\t\n\tforeach($serviceArray as $service){\n\t\t$sth = $conn->prepare($sql);\n\n\t\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\t$sth->bindParam(':serviceName', $service['serviceName'], PDO::PARAM_STR);\t\t\t\t\n\t\t$sth->bindParam(':comment', $service['serviceValue'], PDO::PARAM_STR);\t\t\t\t\n\t\t$sth->execute();\n\t\t\n\t\t$sth->closeCursor();\n\t}\n\t\n\t$return = ['message' => 'Successfully added the service'];\n\treturn $return;\n}", "title": "" }, { "docid": "1d78918e623592c885c8be98171572c4", "score": "0.48566553", "text": "public function register_services(): void {\n\t\t// Bail early so we don't instantiate services twice.\n\t\tif ( \\count( $this->service_container ) > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add the injector as the very first service.\n\t\t$this->service_container->put(\n\t\t\tstatic::SERVICE_PREFIX . static::INJECTOR_ID,\n\t\t\t$this->injector\n\t\t);\n\n\t\t$services = $this->get_service_classes();\n\n\t\tif ( $this->enable_filters ) {\n\t\t\t/**\n\t\t\t * Filter the default services that make up this plugin.\n\t\t\t *\n\t\t\t * This can be used to add services to the service container for\n\t\t\t * this plugin.\n\t\t\t *\n\t\t\t * @param array<string, string> $services Associative array of identifier =>\n\t\t\t * class mappings. The provided\n\t\t\t * classes need to implement the\n\t\t\t * Service interface.\n\t\t\t */\n\t\t\t$filtered_services = apply_filters(\n\t\t\t\tstatic::HOOK_PREFIX . static::SERVICES_FILTER,\n\t\t\t\t$services\n\t\t\t);\n\n\t\t\t$services = $this->validate_services( $filtered_services );\n\t\t}\n\n\t\twhile ( null !== key( $services ) ) {\n\t\t\t$id = $this->maybe_resolve( key( $services ) );\n\n\t\t\t$class = $this->maybe_resolve( current( $services ) );\n\n\t\t\t// Delay registering the service until all requirements are met.\n\t\t\tif (\n\t\t\t\tis_a( $class, HasRequirements::class, true )\n\t\t\t) {\n\t\t\t\tif ( ! $this->requirements_are_met( $id, $class, $services ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->schedule_potential_service_registration( $id, $class );\n\n\t\t\tnext( $services );\n\t\t}\n\t}", "title": "" }, { "docid": "f494d23c78a1f623f0fda9e7eb5014a1", "score": "0.48555", "text": "public function saving(Service $Service)\n {\n //code...\n }", "title": "" }, { "docid": "b52963d4e025234a688970d3335f8457", "score": "0.48442155", "text": "public function register() {\n\t\tadd_action( 'bp_loaded', [ $this, 'registerServices' ] );\n\t}", "title": "" } ]
6680506fe619298c8d8c9ee29d29039a
Definicion de variables para ejecucion del procedimiento
[ { "docid": "4483b5abf1b926bb749494c7f504bfc3", "score": "0.0", "text": "function modificarPares(){\n\t\t$this->procedimiento='asis.ft_pares_ime';\n\t\t$this->transaccion='ASIS_PAR_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_pares','id_pares','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_transaccion_ini','id_transaccion_ini','int4');\n\t\t$this->setParametro('id_transaccion_fin','id_transaccion_fin','int4');\n\t\t$this->setParametro('fecha_marcado','fecha_marcado','timestamp');\n\t\t$this->setParametro('id_funcionario','id_funcionario','int4');\n\t\t$this->setParametro('id_licencia','id_licencia','int4');\n\t\t$this->setParametro('id_vacacion','id_vacacion','int4');\n\t\t$this->setParametro('id_viatico','id_viatico','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" } ]
[ { "docid": "5c13a36bb5fd9f5a617d97c60388d692", "score": "0.72184527", "text": "protected function _setVariables(){}", "title": "" }, { "docid": "314ac5e7708dffe84ce0d54be97f4b1a", "score": "0.64831734", "text": "private function inicializarParametros() {\r\n\r\n $this->view->parametros->acao = isset($this->view->parametros->acao) ? $this->view->parametros->acao : 'pesquisar';\r\n }", "title": "" }, { "docid": "3c67d1ba0c19768a641fbfb4ce4a1465", "score": "0.62655723", "text": "public function __construct(){\n $this->conexion = new gestionBD();\n // foreach ($_POST as $clave => $valor) {\n // ${$clave}=$_POST[$clave];\n // $this->$gen_anime = $_POST['gen_anime'];\n // $this->$id_estudio = $_POST['id_estudio'];\n // $this->id_estado = $_POST['id_estado']; }\n }", "title": "" }, { "docid": "2ad1c2d50add06ef50a2d75e7600e472", "score": "0.61121196", "text": "public function prosecution(){\n \n }", "title": "" }, { "docid": "85392be5678ec132f8e8e97b9b12a5b5", "score": "0.60771435", "text": "public function setVariables()\n {\n \t// Initial sample storage data\n\t\t$this->chargeData = array(\n\t\t\t'test_id' => '2',\n\t\t\t'current_amount' => '1000',\n\t\t);\n\n\t\t\n\t\t// Edition sample data\n\t\t$this->chargeUpdate = array(\n\t\t\t'test_id' => '2',\n\t\t\t'current_amount' => '2000',\n\t\t);\n }", "title": "" }, { "docid": "3413d9b4de2ce0965a0c768494e532ea", "score": "0.6067749", "text": "function cl_procresultado() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"procresultado\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "4967c7e9be0c65428acff22b9e31c0da", "score": "0.60637796", "text": "protected function initVars() {\n }", "title": "" }, { "docid": "81fe7c3962f148f1111ae99c40657be6", "score": "0.6055395", "text": "function setVariables() {\n\t\t$model = $this->getModel();\n\n\t\tswitch(true) {\n\t\t\t// in case a record is added initialize the fields from postData in case of error\n\t\t\tcase $this->_task == 'add' :\n\t\t\t\t$this->setRowData();\n\t\t\t// in case a record is modified initialize the fields\n\t\t\tcase $this->_task == 'edit' :\n\t\t\t\t$this->setRowData($this->_id);\n\t\t\t\tbreak;\n\t\t\t// in case one or more records are deleted\n\t\t\tcase $this->_task == 'delete' :\n\t\t\t\t$this->rows = $model->readDeleteRows();\n\t\t\t\tbreak;\n\t\t\t// or else initialize the variables to show a list of records\n\t\t\tcase $this->_task == 'display' && strlen($this->_sTask) > 0 :\n\t\t\t\t$this->filter_order = $model->filter_order;\n\t\t\t\t$this->filter_order_Dir = $model->filter_order_Dir;\n\t\t\t\t$this->limit = $model->limit;\n\t\t\t\t$this->limitstart = $model->limitstart;\n\t\t\t\t$this->filter_condition = $model->filter_condition;\n\t\t\t\t$this->filter_string = $model->filter_string;\n\t\t\t\t$this->rows = $model->readRows();\n\t\t\t\t$this->pageNav = $model->pageNav;\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\t// - nothing\n\t\t}\n\t}", "title": "" }, { "docid": "bc501911e64924b62a761dd177bbf25e", "score": "0.603094", "text": "private function pop_class_vars(){\n\t\t\t\t$this->title = $this->get_option('title');\n\t\t\t\t$this->storeId = $this->get_option('store-id');\n\t\t\t\t$this->sharedSecret = $this->get_option('shared-secret');\n\t\t\t\t$this->epos_url = $this->get_option('epos-url');\n\t\t\t\t$this->default_timezone = $this->get_option('default-timezone');\n\t\t\t\t$this->default_currency_code = $this->get_option('default-currency-code');\n\t\t\t\t$this->default_mode = $this->get_option('default-mode');\n\t\t\t\t$this->dt = $this->get_epos_date_time();\n\t\t\t}", "title": "" }, { "docid": "dc1287d4963525bf0d6f3762df7cea1e", "score": "0.60167474", "text": "public function prepareVars()\n {\n $this->vars['components'] = $this->components;\n $this->vars['availableComponents'] = $this->getAvailableComponents();\n $this->vars['onAddEventHandler'] = $this->getEventHandler('onAddComponent');\n $this->vars['field'] = $this->formField;\n }", "title": "" }, { "docid": "0fff1d1e0ed57faf1b7803d391f9749d", "score": "0.60010743", "text": "function cl_procarquiv() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"procarquiv\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "fb51819d5a84af06842561072aae2da1", "score": "0.59951", "text": "function read() { //leer las variables de instancia y leerlas del get o del post\n foreach ($this as $atributo => $valor) {\n $this->$atributo = Request::read($atributo); //por cada atributo que tiene la asignatura leo el atributo y se lo asigno, si uno de ellos falla devuelve null\n }\n }", "title": "" }, { "docid": "511020a807259e1a1b0b14e56326c1fb", "score": "0.5980626", "text": "function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id))\n {\n $this->id = $id;\n }\n if (isset($mode))\n {\n $this->mode = $mode;\n }\n if (isset($view_mode))\n {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode))\n {\n $this->edit_mode = $edit_mode;\n }\n if (isset($data_source))\n {\n $this->data_source = $data_source;\n }\n if (isset($tab))\n {\n $this->tab = $tab;\n }\n }", "title": "" }, { "docid": "918d34d251c7af83c92ec9d4b406a9b7", "score": "0.5957024", "text": "function cl_procespecialidades() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"procespecialidades\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "174333bd1064086543f3224e4030c891", "score": "0.5955438", "text": "function __construct() {\n\t\t$this->id_exercicio;\n\t\t$this->id_docente;\n\t\t$this->id_curso;\n\t\t$this->dt_inicio_exercicio;\n\t\t$this->dt_fim_exercicio;\n\t}", "title": "" }, { "docid": "32c1c19c25b5b275c0d6b3a1430abcbe", "score": "0.5950822", "text": "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t//$this->fecha=$_POST['fecha'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->categoria=$_POST['categoria'];\n\t\t$this->ubicacion=$_POST['ubicacion'];\n\t\t$this->url=$_POST['url'];\n\t\t$this->cliente=$_POST['cliente'];\n\t}", "title": "" }, { "docid": "7b25f453eaa02de0ade1e5e4d98ab34c", "score": "0.5946926", "text": "function recuperar() {\n\t\t$this->load();\n\t}", "title": "" }, { "docid": "9e1d1438ecb54da809b2f67f511d3747", "score": "0.59245706", "text": "public function setup(): void\n {\n $this->getVars = ['key1' => [\n 'key2' => [\n 'key3' => [\n 'key4' => 'value1',\n 'key5' => 'value2'\n ]\n ]\n ]\n ];\n\n $this->postVars = ['key1' => [\n 'key2' => [\n 'key3' => [\n 'key4' => 'value3',\n 'key5' => 'value4'\n ]\n ]\n ]\n ];\n \n $this->gpVarAdapter = new Tx_PtExtbase_State_GpVars_GpVarsAdapter($this->extensionNamespace);\n $this->gpVarAdapter->_injectGetVars($this->getVars);\n $this->gpVarAdapter->_injectPostVars($this->postVars);\n }", "title": "" }, { "docid": "ed2a41dda7acff9c4e684327f4ee7d4c", "score": "0.5883644", "text": "function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }", "title": "" }, { "docid": "a0576cc9fed5c97c2305ae8c6a6ab74b", "score": "0.5872014", "text": "public function DevuelveValores()\n\t\t{\n\t\t\tparent::__construct();\n\t\t}", "title": "" }, { "docid": "ba88adc76cd4e5cfd545f8c5ce181dd9", "score": "0.58680785", "text": "function cl_protelac() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"protelac\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "f3a4f40a9a7e9dad2423143e89cac374", "score": "0.586264", "text": "function cl_declaracaoquitacaocarneagua() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"declaracaoquitacaocarneagua\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "9ae04ee5acac4a2fbcf2070ec3db5539", "score": "0.58520436", "text": "public function partecipa() {\n $view = USingleton::getInstance('VEvento');\n // DATI EVENTO\n $id_evento=$view->getIdEvento();\n\techo \"ID_EVE_PAR\";\t\n\n\t\tdebug(\"ID_EVENTO\"+$id_evento);\n $FEvento=new FEvento();\n $evento=$FEvento->load($id_evento);\n\t\tdebug(\"EVENTO\"+$evento);\n\t\t$dati=get_object_vars($evento);\n\t $view->impostaDati('dati',$dati);\n\t\t\n\t\t// DATI UTENTE\n\t\t$session=USingleton::getInstance('USession');\n $username=$session->leggi_valore('username');\n\t\t$FUtente=new FUtente();\n\t\t\n\t\t// TERMINARE Associare utente a pagamento e registrare in eventoPartecipanti\n /**\n\t\t$dati_pagamento=$view->getDatiPagamento();\n $carta_credito= new ECartaCredito();\n $carta_credito->ccv=$dati_pagamento['ccv'];\n $carta_credito->numero=$dati_pagamento['numero_carta'];\n $carta_credito->nome_titolare=$dati_pagamento['nome_titolare'];\n $carta_credito->cognome_titolare=$dati_pagamento['cognome_titolare'];\n $carta_credito->setDataScadenza($dati_pagamento['scadenza']);\n debug($carta_credito);\n\t\t*/\n\t\t$eventoPartecipante=new EEventoPartecipante();\n\t\t$eventoPartecipante->setPartecipante($username);\n\t\t\n //$this->_carrello->setCartaCredito($carta_credito);\n //$this->_carrello->setCartaCredito($carta_credito);\n //$FOrdine=new FOrdine();\n //$this->_carrello->setData(date('d-m-Y'));\n //$FOrdine->store($this->_carrello);\n \n\t\t//$this->emailConfermaEvento($this->_carrello);\n $view->setLayout('pagamento');\n //$session=USingleton::getInstance('USession');\n //$session->cancella_valore('carrello');\n return $view->processaTemplate();\n }", "title": "" }, { "docid": "1e98b54f284f2164b7d799d13618c282", "score": "0.58420736", "text": "function __construct() {\n\t\t$this->BD_usuario= \"root\"; //USUARIO\n\t\t$this->BD_contrasenia= \"\"; // CONTRASEÑA DEL USUARIO\n\t\t$this->BD_nombre= \"publications\"; // NOMBRE DE LA BASE DE DATOS\n\t\t$this->BD_servidor= \"localhost\"; // DIRECCION DEL SERVIDOR\n }", "title": "" }, { "docid": "02825d089e5b72a195e1f5b926a6459e", "score": "0.58275217", "text": "public function automate(){\n\t\t$this->controller->viewVars = $this->_h($this->controller->viewVars);\n\t\t$this->controller->data = $this->_h($this->controller->data);\n\t}", "title": "" }, { "docid": "58a52303275777dcbfa50eeb47eaab8f", "score": "0.58189416", "text": "public function __construct(){\n\t\t$this->user_id = \"\";\n\t\t$this->empresa = \"\";\n\t\t$this->tarea = \"\";\n\t\t$this->hecho = \"\";\n\t}", "title": "" }, { "docid": "11143a54d33c3d04df7bf1f86f4e37d7", "score": "0.58133906", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "11143a54d33c3d04df7bf1f86f4e37d7", "score": "0.58133906", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "11143a54d33c3d04df7bf1f86f4e37d7", "score": "0.58133906", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "11143a54d33c3d04df7bf1f86f4e37d7", "score": "0.58133906", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "c2fd7c482997a611835e343103d3e2c2", "score": "0.5810433", "text": "function cl_proglicencamatr() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"proglicencamatr\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "a550635a00f61860dbec0582c8678718", "score": "0.580623", "text": "protected function setup()\n\t{\n\t\t//how data will be executed.\n\t}", "title": "" }, { "docid": "a550635a00f61860dbec0582c8678718", "score": "0.580623", "text": "protected function setup()\n\t{\n\t\t//how data will be executed.\n\t}", "title": "" }, { "docid": "a550635a00f61860dbec0582c8678718", "score": "0.580623", "text": "protected function setup()\n\t{\n\t\t//how data will be executed.\n\t}", "title": "" }, { "docid": "e19e5e6cf9f7be4081f6e067dd8eb67b", "score": "0.57971203", "text": "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }", "title": "" }, { "docid": "86e4e392f455f9b3ec3bfa9339027ece", "score": "0.57967", "text": "function cl_procandam() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"procandam\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "e53d66ef8c6f802badd5426d3461fdad", "score": "0.57698905", "text": "function cl_orcparamseqsigap() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"orcparamseqsigap\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "9ea93245768084244b7e92481e6e6e8a", "score": "0.576431", "text": "function cl_obrasenvio() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"obrasenvio\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "6a37e291b97029045c37410c1afada9a", "score": "0.576027", "text": "public function __construct()\n {\n require __DIR__ . '/Config/parameters.php';\n $this -> parameters = $parameters;\n //au moment où j'instancie cette classe, je récu^père parameters.php et je stocke les params dans la propriété\n\n }", "title": "" }, { "docid": "a1b7a4ff7ed77b4caf499f6002aa0cf3", "score": "0.57532084", "text": "protected function data()\r\n {\r\n }", "title": "" }, { "docid": "65598189a7273419abbe5d1066e0768b", "score": "0.5751679", "text": "function storeParameters()\n {\n }", "title": "" }, { "docid": "4d29146b2f5d8d30fcabd70238f1cdf0", "score": "0.57507706", "text": "private function setParams()\n {\n $params = array(\n '__wiz_agree_license' => 'Y',\n '__wiz_dbType' => 'mysql',\n '__wiz_lic_key_variant' => '',\n '__wiz_utf8' => 'Y',\n '__wiz_create_user' => 'N',\n '__wiz_host' => $this->dbHost,\n '__wiz_user' => $this->dbUser,\n '__wiz_password' => $this->dbPass,\n '__wiz_database' => $this->dbName,\n '__wiz_create_database' => 'N',\n '__wiz_create_database_type' => 'innodb',\n '__wiz_root_user' => '',\n '__wiz_root_password' => '',\n '__wiz_file_access_perms' => '0644',\n '__wiz_folder_access_perms' => '0755',\n '__wiz_login' => 'admin',\n '__wiz_admin_password' => 'admin123',\n '__wiz_admin_password_confirm' => 'admin123',\n '__wiz_email' => '[email protected]',\n '__wiz_user_name' => '',\n '__wiz_user_surname' => '',\n '__wiz_selected_wizard' => 'bitrix.eshop:bitrix:eshop',\n );\n\n foreach ($params as $code => $param) {\n $this->setRequestParam($code, $param);\n }\n }", "title": "" }, { "docid": "646ceff1c6434a1e7fa25225cff5eafe", "score": "0.57464725", "text": "function __construct(){\n $this->init(); // initialize variables with real data\n $this->initConst(); // initialize constants by real data values\n }", "title": "" }, { "docid": "fad54a1c55a8d85c9a85a5d847a70a72", "score": "0.5720419", "text": "function main()\r\n {\r\n $this->setInfos();\r\n }", "title": "" }, { "docid": "b40ca2980929304de330dfa4d050b118", "score": "0.5695052", "text": "function cl_iptuconstrhabite() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"iptuconstrhabite\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "ac901d5fa8e65c9d08aaabc8e15a3f2e", "score": "0.5686356", "text": "function cl_acordoitemexecutadoperiodo() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"acordoitemexecutadoperiodo\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "01dee784fb2c01ef47d0351b263621f2", "score": "0.5685033", "text": "function init(){\n $this->server = $_SERVER; // server real data\n $this->cookie = $_COOKIE; // cookie real data\n $this->vars = array_merge($_GET, $_POST, $_FILES); // http real data\n }", "title": "" }, { "docid": "fcc5f3ed0e34b24253eebc58b4e5681f", "score": "0.5681218", "text": "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['data'] = $this->data;\n }", "title": "" }, { "docid": "adbc5f502c5bb2e76629fd1eefe3dd1b", "score": "0.566959", "text": "function __construct(){\n\t \t \t$this->data=array();\n\t \t \t$this->loadConf();\n\t \t }", "title": "" }, { "docid": "0649e134bee2c0d5382cecb4935dc689", "score": "0.56693435", "text": "protected function getDatas() {\r\n $this->topic = (integer) request_var('topic', 0);\r\n $this->ssid = request_var('ssid', \"\");\r\n }", "title": "" }, { "docid": "325ce905bdea4f1991fe301f71782a6e", "score": "0.5668458", "text": "function processValues(){\n \n $this->getActivityready();\n $this->getRate();\n $this->getComments();\n \n }", "title": "" }, { "docid": "271d43bcb11213a760d1d8ccb2326e34", "score": "0.56665784", "text": "function request(){\n foreach ($_REQUEST as $anahtar=>$istek){\n $this->request[$anahtar]\t\t\t\t= $istek;\n }\n if(isset($this->request['component'])){\n $this->component \t\t\t\t\t\t= $this->request['component'];\n }\n }", "title": "" }, { "docid": "0e1384b18a9ca759578f463a4c8508fd", "score": "0.5663777", "text": "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n $this->product = $this->vars['product'] = $this->controller->vars['formModel'];\n $this->vars['attributes'] = $this->getAttributes();\n $this->vars['isModel'] = $this->model->id ? true : false;\n\n\n if(isset($this->model->id)){\n $attribute = $this->getAttribute($this->model->attribute_id);\n $type = $attribute->type . \"_value\";\n $attribute->value = $this->model->{$type};\n $this->vars['attribute'] = $attribute;\n if($attribute->type == 'date' || $attribute->type == 'datetime'){\n $this->datePicker->mode = $attribute->type;\n }\n }\n }", "title": "" }, { "docid": "851c6d818be844291e4d2028ccfcda81", "score": "0.5657485", "text": "function cl_processoouvidoriaprorrogacao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"processoouvidoriaprorrogacao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "248c1df17b43ec4a48abefeec7b692f3", "score": "0.56417936", "text": "function __construct()\n\t{\n\t\t$this->initializeVariables(); // Initialize method variables\n\t}", "title": "" }, { "docid": "a0726e0a04ead75bd9cd3d9148955322", "score": "0.5636852", "text": "function cl_pontofa() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"pontofa\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "c4d0eb6b516605f626cdf93cbd810885", "score": "0.5636844", "text": "public function __construct()\n {\n // Armazena os dados de envio de email\n $this->remetente = defined('REMETENTE') ? REMETENTE : \"[email protected]\";\n }", "title": "" }, { "docid": "d11fe69c7691c17d5b5494081db4c738", "score": "0.56333447", "text": "public function __construct()\n {\n\n $this->delete =$this->alert('Data deleted Succefully','success');\n $this->saved =$this->alert('Data Saved Succefully','success');\n $this->update =$this->alert('Data Updated Succefully','success');\n $this->warning =$this->alert('Invalid! check your data carefully!','warning');\n $this->sent = $this->alert('Sent Succefully!','success');\n\n }", "title": "" }, { "docid": "960a46e8a11014ebad8e91a21d962c88", "score": "0.5628476", "text": "function __construct(){\r\n$this->vueAuthentification=new VueAuthentification();\r\n$this->vueJeu=new VueJeu();\r\n$this->vueErreur=new VueErreur();\r\n$this->modeleBD=new ModeleBD();\r\n$this->modelePlateau=new ModelePlateau();\r\n}", "title": "" }, { "docid": "14aecf4767508b76fab0d703ca6ce47d", "score": "0.5625495", "text": "public function prepareVars()\n {\n $this->model->load('inventories.values', 'options.values');\n\n $this->vars['name'] = $this->formField->getName();\n\n $this->vars['endpoints'] = [\n 'createInventory' => Backend::url('bedard/shop/inventories/create'),\n 'createOption' => Backend::url('bedard/shop/options/create'),\n 'validateInventory' => Backend::url('bedard/shop/inventories/validate'),\n 'validateOption' => Backend::url('bedard/shop/options/validate'),\n ];\n\n $this->vars['product'] = $this->model;\n }", "title": "" }, { "docid": "46a11bbd80be7dde44fc7a35da662796", "score": "0.5623659", "text": "public function __construct(){\n$this->acId = \"\";\n$this->acId_solicitud = \"\";\n$this->acId_tecnico = \"\";\n$this->acFecha = \"\";\n$this->acComentario = \"\";\n}", "title": "" }, { "docid": "2037338130263edd44c3d9de3dac3b34", "score": "0.5610982", "text": "private function setParameters()\n {\n if (empty(config('laravel-gracenote.client_id'))) {\n throw RequiredConfigMissing::cantFindClientId();\n }\n\n if (empty(config('laravel-gracenote.client_tag'))) {\n throw RequiredConfigMissing::cantFindClientTag();\n }\n\n if (empty(config('laravel-gracenote.user_id'))) {\n throw RequiredConfigMissing::cantFindUserId();\n }\n\n $this->cache = empty(config('laravel-gracenote.cache')) ? 60 : config('laravel-gracenote.cache');\n $this->client_id = config('laravel-gracenote.client_id');\n $this->client_tag = config('laravel-gracenote.client_tag');\n $this->user_id = config('laravel-gracenote.user_id');\n $this->request_url = \"https://c{$this->client_id}.web.cddbp.net/webapi/json/1.0/\";\n }", "title": "" }, { "docid": "94320cef01a12ea9e5fbe3d896a48e5e", "score": "0.56064236", "text": "function cl_configu() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"configu\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "8b4f2e561541fd53a83754a0fdeefe09", "score": "0.55947095", "text": "function cl_lab_entrega() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"lab_entrega\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "a1d97f04be3f33f60ce2af6cae8d1265", "score": "0.55943286", "text": "public function __construct(){\n$this->acCedula = \"\";\n$this->acNacionalidad = \"\";\n$this->acNombres = \"\";\n$this->acApellidos = \"\";\n$this->acDireccion = \"\";\n$this->acCodigo_area = \"\";\n$this->acTelefono = \"\";\n$this->acCodigo_dominio_correo = \"\";\n$this->acEmail = \"\";\n}", "title": "" }, { "docid": "6c1763397aa577cec702bf64e949ceaa", "score": "0.5594304", "text": "function cl_econsigmovimento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"econsigmovimento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "7d46081b61be585661d6424d06c62123", "score": "0.55821955", "text": "function asignar_valores(){\n\t\t$this->primeros=$_POST['primeros'];\n\t\t$this->ultimos=$_POST['ultimos'];\n\t\t$this->banco=$_POST['banco'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->direccion=$_POST['direccion'];\n\t\t$this->estado=$_POST['estado'];\n\t}", "title": "" }, { "docid": "8387df7d7aa147ecfbecf6f8e822eabc", "score": "0.5581771", "text": "public function prepareVars()\n {\n $this->vars['field'] = $this->makeFormField();\n }", "title": "" }, { "docid": "52b503b135383b3d861b957a4c8c21fb", "score": "0.55713296", "text": "public function __construct(){\n \n require_once(\"Model/Conexion.php\");\n //db = claseConexion y llamo a su metodo conectar\n //db almacenará la conexion\n $this->db=Conexion::Conectar();\n \n //la variable productos va a ser un array el cual la usare para almacenar la lista de productos q me devuelva mi BD\n $this->personas=array();\n \n }", "title": "" }, { "docid": "742ebd7bd1607964606d29022d9e3b39", "score": "0.55697685", "text": "private function instantiate(){\n\t\t$this->valor = new ArrayObject();\n\t\t$this->motivo = new ArrayObject();\n\t}", "title": "" }, { "docid": "9b14f7ed781432b375b06edcebfab011", "score": "0.5566149", "text": "function cl_diarioresultado() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"diarioresultado\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "c013de195f1df0e0428cb4617145fa48", "score": "0.5562754", "text": "public function __construct() {\n\n $this->nome = 'Joanito'; //Quando for instanciado qualquer objeto Pessoa, automaticamente ela irá receber esses nossos\n $this->identidade = '1.1645.24.2'; //atributos fixos.\n $this->idade = 20;\n $this->peso = 70;\n }", "title": "" }, { "docid": "db757b81b270360fb71293cb4f1c72d3", "score": "0.55510825", "text": "public function __construct()\n {\n $this->defineData();\n }", "title": "" }, { "docid": "1826a2c74fb8d10d16de0624f22ed25a", "score": "0.55498904", "text": "protected function assignVariables() {\n\t\tWCF::getTPL()->assign(array(\n\t\t\t'userTitle' => $this->userTitle\n\t\t));\n\t}", "title": "" }, { "docid": "b0fdcf175d10c55fcbd9e2dafb54df09", "score": "0.5539125", "text": "function cl_orcprojeto() {\n\t\t//classes dos rotulos dos campos\n\t\t$this->rotulo = new rotulo(\"orcprojeto\");\n\t\t$this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n\t}", "title": "" }, { "docid": "2d76b9f84db1cd30c80f4c3a4c0b305a", "score": "0.55383813", "text": "public function __construct() {\n\t\t$this->conexion = null;\n\t\t$this->mysql=null;\n\t\t$this->usuario=null;\n\t}", "title": "" }, { "docid": "f9e45fe284b7461f18b65880b8f3dd55", "score": "0.5538261", "text": "public function setVars() {\r\n\t$this->varGlobalContener->save();\r\n}", "title": "" }, { "docid": "e5511338ea1484aac13a6b9071da3e0f", "score": "0.5530627", "text": "function __construct() {\r\n $this->departamentos = data::criar_Dptos();\r\n $this->cursos = data::criar_Cursos($this->departamentos);\r\n $this->pavilhoes = data::criar_Espacos($this->cursos);\r\n \r\n data::definir_Turnos_Ofertas($this->departamentos, $this->cursos);\r\n\r\n $this->folga_espaco = vars::getStokingGap();\r\n\r\n //carregar variaveis de avaliacao\r\n $this->pnt_chq_horario = vars::getPntChqHorario();\r\n $this->pnt_chq_local = vars::getPntChqLocal();\r\n $this->pnt_espacamento = vars::getPntEspacamento();\r\n $this->pnt_janelas = vars::getPntJanelas();\r\n $this->pnt_alternancia = vars::getPntAlternancia();\r\n $this->pnt_lab = vars::getPntLab();\r\n $this->pnt_turno = vars::getPntTurno();\r\n $this->pnt_isolamento = vars::getPntIsolamento();\r\n $this->pnt_proximidade = vars::getPntProximidade();\r\n $this->pnt_exclusividade = vars::getPntExclusividade();\r\n $this->pnt_capacidade = vars::getPntCapacidade();\r\n }", "title": "" }, { "docid": "68afe121c2e9f643886096b9a96259d2", "score": "0.5526186", "text": "public function __construct()\n {\n parent::__construct( $this->variables );\n }", "title": "" }, { "docid": "114bbf70576f1cfb28b226058f85e16c", "score": "0.5522278", "text": "public function KartuStokProses(){\n\t\t\n\n\t}", "title": "" }, { "docid": "dbe683379e1ef6149049fb5e19904875", "score": "0.5516228", "text": "public function setup_variables() {\n\t\t\t/**\n\t\t\t * `get_plugin_data` must be loaded first ...\n\t\t\t *\n\t\t\t * @link https://wordpress.stackexchange.com/questions/17948/call-to-undefined-function-get-plugin-data\n\t\t\t */\n\t\t\tif ( ! function_exists( 'get_plugin_data' ) ) {\n\t\t\t\trequire_once ABSPATH . 'wp-admin/includes/plugin.php';\n\t\t\t}\n\n\t\t\t$plugin = get_plugin_data( PLUGIN_FILE_PATH );\n\n\t\t\t$this->name = $plugin['Name'];\n\t\t\t$this->version = $plugin['Version'];\n\t\t\t$this->text_domain = $plugin['TextDomain'];\n\n\t\t\t$this->has_admin_interface = $this->arguments['has_admin_interface'];\n\t\t\t$this->has_public_interface = $this->arguments['has_public_interface'];\n\n\t\t\t$this->theme_feature_set = $this->arguments['theme_feature_set'];\n\t\t\t$this->theme_features = $this->arguments['theme_features'];\n\t\t}", "title": "" }, { "docid": "77dd843df9ede545379fd56b9ffc8869", "score": "0.55139166", "text": "function cls_solicitud()\r\n{\r\n\r\n$this->database = new Database();\r\n\r\n}", "title": "" }, { "docid": "b88c1ad6c5f75c9220cfca1b80939213", "score": "0.55075026", "text": "public function prepareVars()\n {\n $this->vars['size'] = $this->getSizeCache();\n $this->vars['diameter'] = $this->property('diameter');\n }", "title": "" }, { "docid": "d2ea64fb52d0e6f6d308590a8622255c", "score": "0.5505848", "text": "function __construct($configuracion) {\n//[ TO DO ]En futuras implementaciones cada usuario debe tener un estilo\n\n include ($configuracion[\"raiz_documento\"] . $configuracion[\"estilo\"] . \"/basico/tema.php\");\n\n $this->cripto = new encriptar();\n //$this->tema = $tema;\n $this->sql = new SqlAdminEspacioFisico();\n //$this->funcionGeneral = new funcionGeneral();\n $this->html = new html();\n\n //Conexion General\n $this->acceso_db = $this->conectarDB($configuracion, \"\");\n\n //Conexion sga\n $this->accesoGestion = $this->conectarDB($configuracion, \"mysqlsga\");\n\n //Conexion Oracle\n $this->accesoOracle = $this->conectarDB($configuracion, \"coordinador\");\n\n //Datos de sesion\n $this->usuario = $this->rescatarValorSesion($configuracion, $this->acceso_db, \"id_usuario\");\n $this->identificacion = $this->rescatarValorSesion($configuracion, $this->acceso_db, \"identificacion\");\n }", "title": "" }, { "docid": "2abfccd73970320390e84d0736f95e90", "score": "0.55055815", "text": "function __construct(){\n \n\n }", "title": "" }, { "docid": "f6b1e059570eec5d5ebd3d67937da598", "score": "0.5504852", "text": "function cl_db_config() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_config\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "138e6b616a9684e04c66329f8db613a9", "score": "0.55047816", "text": "function cl_aguacorresp() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aguacorresp\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "e4a59ccdadefdcbb440a899ec276d036", "score": "0.5499783", "text": "function cl_matestoque() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"matestoque\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "4b481613062e435d954d0c60043a33dd", "score": "0.5499755", "text": "private function obtenerDatos(){\n\t}", "title": "" }, { "docid": "ac3936a2781c7ab199f9d92497c939a5", "score": "0.54887474", "text": "function __construct() {\n //require_once Parametre::$MVC_BASE.'/bak/modules/mod_jeton/model/Dao_jeton.php';\n require_once Parametre::$MVC_BASE.'/bak/modules/mod_jeton/vue/Vue_jeton.php';\n require_once Parametre::$MVC_BASE.'/entities/Jeton.php';\n require_once Parametre::$MVC_BASE.'/helpers/DaoJeton.php';\n require_once Parametre::$MVC_BASE.'/helpers/Vue_generique.php';\n }", "title": "" }, { "docid": "a4d615a14782b1ea69cd61468991ae24", "score": "0.54874307", "text": "public function __construct(){\n $this->proizvodi=new Proizvodi();\n $this->marke=new Marke();\n $this->pol=new Pol();\n\n }", "title": "" }, { "docid": "c2cfd610cc1b990884a1951076785415", "score": "0.54871047", "text": "function Valores()\n{\n\n$this->database = new Database();\n\n}", "title": "" }, { "docid": "66091cbd9a4b281434e0a43bc796c4bc", "score": "0.5482129", "text": "public function __construct()\n {\n $this->reserva = new Reserva();\n $this->instalacion = new Instalacion();\n $this->vista = new Vista();\n $this->seguridad = new Seguridad();\n }", "title": "" }, { "docid": "224a27a210213f82bcf4ec90f9a2a44d", "score": "0.5480603", "text": "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] =$this->currencyHandler->getValueForInput($this->getLoadValue());\n $this->vars['model'] = $this->model;\n\n /*\n * FORMAT SETTINGS\n * these settings can be centralised in CommerceSettings\n */\n $this->vars['currencySymbol'] = $this->currencyHandler->currencySymbol;\n $this->vars['decimalSymbol'] = $this->currencyHandler->decimalSymbol;\n $this->vars['format'] = $this->currencyHandler->format;\n }", "title": "" }, { "docid": "25575c858be5b793c0b58839e72196ea", "score": "0.54772943", "text": "function __construct() {\n\t\tif( isset($_POST['servicoId']) && !empty($_POST['servicoId']) && isset($_POST['cobrancaContadorId']) && !empty($_POST['cobrancaContadorId'])) {\n\t\t\t\n\t\t\t$servicoId = $_POST['servicoId'];\n\t\t\t$cobrancaContadorId = $_POST['cobrancaContadorId'];\n\t\t\t$contadorId = $_POST['contadorId'];\n\t\t\t\t\t\t\n\t\t\t$servicosAvulso = new ServicosAvulso();\n\t\t\t\n\t\t\t// Realiza a alteração do contador respônsavel pelo servio.\n\t\t\t$servicosAvulso->AtualizaContadorServico($servicoId, $contadorId);\n\t\t\n\t\t\t// Realiza a alteração do contador no pagamento do serviço.\n\t\t\t$servicosAvulso->AtualizaContadorPagamentoServico($cobrancaContadorId, $contadorId);\n\t\t}\n \t}", "title": "" }, { "docid": "1137aabb2d997a7b31e901949e45132a", "score": "0.5475924", "text": "public function run()\n {\n $nota= new notas_valoracion();\n $nota->id_paciente=\"1\";\n $nota->id_diagnostico=\"1\";\n $nota->eva=\"4\";\n $nota->pruebas_funcionales=\"Ejercicio con pelota\";\n $nota->actividad_funcional=\"Correr\";\n $nota->fuerza=\"Regular\";\n $nota->rom=\"rom\";\n $nota->save();\n }", "title": "" }, { "docid": "9c7616d395fce8f29a7691096ae2df0f", "score": "0.5473555", "text": "public function __construct() {\r\n // a parámetros $_GET[p1]=dato1 $_GET[p2]=dato2 $_GET[p3]=dato3 ....\r\n \\core\\Rutas::interpretar_url_amigable();\r\n\r\n // Se conecta a la base de datos\r\n \\core\\sgbd\\bd::connect();\r\n\r\n // Distribuidor\r\n \\core\\Distribuidor::estudiar_query_string();\r\n\r\n // Cerrar conexión a la base de datos\r\n \\core\\sgbd\\bd::disconnect();\r\n \r\n \r\n }", "title": "" }, { "docid": "a63701db28dabfe0bbb899d1ee4ca21b", "score": "0.54685843", "text": "function __construct(){\n \n }", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.54676276", "text": "protected function __construct(){}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.54676276", "text": "protected function __construct(){}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.54676276", "text": "protected function __construct(){}", "title": "" } ]
20fad1c0b2041f43b6e6c5608c0eb220
Similar to a get_called_class() for a child class to invoke.
[ { "docid": "5a5337e759617ce46cb269a5dfa5701d", "score": "0.6893947", "text": "final protected function get_called_class()\n\t{\n\t\t$backtrace = debug_backtrace();\n \treturn get_class($backtrace[2]['object']);\n\t}", "title": "" } ]
[ { "docid": "425f70735c31bd7c4b258365f6212ef8", "score": "0.6845534", "text": "public function getClass()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "59aeb1bf86d13db588ac224283b3d7be", "score": "0.6766498", "text": "final protected function get_called_class() {\n\t\t$backtrace = debug_backtrace();\n\t\treturn get_class($backtrace[2]['object']);\n\t}", "title": "" }, { "docid": "083bdfb8e9043d8e4ea80ca446d3e0e5", "score": "0.6711064", "text": "public static function getClass()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "a23708df718f1d7816e748c864b025ae", "score": "0.6688441", "text": "private final function getClass () {\n\t\t// get the original class that was called.\n\t\tif (self::$class) {\n\t\t\treturn self::$class;\n\t\t}\n\t\t\n\t\t// walk up the call stack to find the child that was called.\n\t\t$class = \"\";\n\t\tforeach (debug_backtrace() as $i => $t) {\n\t\t\tif ($i === 0) continue;\n\t\t\tif (\n\t\t\t\t! array_key_exists('class', $t) ||\n\t\t\t\t! ($t['class'] === __CLASS__ || in_array(__CLASS__, class_parents($t['class']))) ||\n\t\t\t\t! ($t['function'] === 'walk') ||\n\t\t\t\t! ($t['type'] === '::')\n\t\t\t) break;\n\t\t\t$class = $t['class'];\n\t\t}\n\t\t\n\t\tif (!$class || $class === __CLASS__) {\n\t\t\ttrigger_error(\"The 'walk' function must be overridden on child classes. Do not call on the \" . \n\t\t\t\t__CLASS__ . \" class directly.\", E_USER_ERROR);\n\t\t\treturn;\n\t\t}\n\t\tif (!class_exists($class)) {\n\t\t\ttrigger_error(\"Class doesn't exist: $class\", E_USER_ERROR);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\treturn (self::$class = $class);\n\t}", "title": "" }, { "docid": "0c0567826fca9232476d8b25b303b4e0", "score": "0.6551821", "text": "public function __getClass() : string {\n\t\t\treturn get_called_class();\n\t\t}", "title": "" }, { "docid": "7f28462d69c7cfa018fc22ea6eb44bca", "score": "0.64772695", "text": "public function callMethod(){\n\t\tif(is_callable([$this->className , $this->classMethod])){\n\t\t\t$call = call_user_func_array([new $this->className , $this->classMethod], [$this->params]); \n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "f4bac83dd4b5d0d15d30967fb2f793cc", "score": "0.6445398", "text": "public function __invoke()\n {\n echo __CLASS__;\n }", "title": "" }, { "docid": "b86eaf4f8de400601154067466a7d203", "score": "0.63581884", "text": "public static function className()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "b86eaf4f8de400601154067466a7d203", "score": "0.63581884", "text": "public static function className()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "b86eaf4f8de400601154067466a7d203", "score": "0.63581884", "text": "public static function className()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "30d3e3986012078972627cc5e289d661", "score": "0.63164", "text": "private function _getCalledClass()\n\t{\n\t\tif(function_exists('get_called_class')) return get_called_class();\n\t\t$bt = debug_backtrace();\n\t\tif(!isset($bt[1])){\n\t\t\t// Cannot find called class -> stack level too deep\n\t\t\treturn false; \n\t\t}else if(!isset($bt[1]['type'])){\n\t\t\t// Type not set\n\t\t\treturn false; \n\t\t}else switch ($bt[1]['type']) { \n\t\t\tcase '::': \n\t\t\t\t$lines = file($bt[1]['file']); \n\t\t\t\t$i = 0; \n\t\t\t\t$callerLine = ''; \n\t\t\t\tdo{ \n\t\t\t\t\t$i++; \n\t\t\t\t\t$callerLine = $lines[$bt[1]['line']-$i] . $callerLine; \n\t\t\t\t}while (stripos($callerLine,$bt[1]['function']) === false); \n\t\t\t\tpreg_match('/([a-zA-Z0-9\\_]+)::'.$bt[1]['function'].'/', $callerLine, $matches); \n\t\t\t\tif(!isset($matches[1])){\n\t\t\t\t\t// Could not find caller class: originating method call is obscured\n\t\t\t\t\treturn false; \n\t\t\t\t}\n\t\t\t\treturn $matches[1]; \n\t\t\t\tbreak;\n\t\t\tcase '->': switch ($bt[1]['function']) { \n\t\t\t\t\tcase '__get': \n\t\t\t\t\t\t// Edge case -> get class of calling object \n\t\t\t\t\t\tif(!is_object($bt[1]['object'])){\n\t\t\t\t\t\t\t// Edge case fail. __get called on non object\n\t\t\t\t\t\t\treturn false; \n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn get_class($bt[1]['object']); \n\t\t\t\t\tdefault: return $bt[1]['class']; \n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// Unknown backtrace method type\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "555b3176f4a6000f4b931bcae2b969af", "score": "0.63108224", "text": "abstract protected function getClass();", "title": "" }, { "docid": "22646fd24a9767f0a7e584d6e6541489", "score": "0.63078606", "text": "public static function className() {\n return get_called_class();\n }", "title": "" }, { "docid": "ad8caa700498859e1a4d7c1bbd635a1c", "score": "0.6272973", "text": "public static function className(): string\n\t{\n\t\treturn get_called_class();\n\t}", "title": "" }, { "docid": "408ad1e3d1857459531186b56bde0cdc", "score": "0.6233265", "text": "abstract protected function targetClass(): string;", "title": "" }, { "docid": "2e7c157208ac60434adec93f27e49ee6", "score": "0.61470234", "text": "final public static function className()\n\t{\n\t\treturn get_called_class();\n\t}", "title": "" }, { "docid": "dcaa502da1b781beb62aae18ab31a04c", "score": "0.60526127", "text": "public function getName(): string\n {\n return get_called_class();\n }", "title": "" }, { "docid": "c8d9fb0fcd1629aac26d37ad4aaf83c8", "score": "0.602398", "text": "public static function getClassName()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "8c8a84d957a72ffda2c923ee8683d451", "score": "0.5918555", "text": "public static function get_class(){return \\get_class();}", "title": "" }, { "docid": "18afa5753fed7101318e8bc2463678e0", "score": "0.58974415", "text": "public function getDeriverClass();", "title": "" }, { "docid": "cd23fafc71c35496068da786acd26b35", "score": "0.58079445", "text": "function research_letters_admin_class() {\n $parentName = get_parent_class($this);\n $this->{$parentName}();\n }", "title": "" }, { "docid": "79a3499b767fcdcb93b3b9d6942306a4", "score": "0.5785456", "text": "public function getClass() {\r\n \r\n }", "title": "" }, { "docid": "67472b202c74058103c30468c562b08e", "score": "0.57811505", "text": "function get_calling_class() {\n \n \t//get the trace\n \t$trace = debug_backtrace();\n \n \t// Get the class that is asking for who awoke it\n \t$class = $trace[1]['class'];\n \n \t// +1 to i cos we have to account for calling this function\n \tfor ( $i=1; $i<count( $trace ); $i++ ) {\n \t\tif ( isset( $trace[$i] ) ) // is it set?\n \t\t\tif ( $class != $trace[$i]['class'] ) // is it a different class\n \t\t\treturn $trace[$i]['class'];\n \t}\n }", "title": "" }, { "docid": "69acc5a36fd39652d5418401603d830f", "score": "0.5774037", "text": "abstract public function getTargetClassName(): string;", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.5718466", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.5718466", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.5718466", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.5718466", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.5718466", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.5718466", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.5718466", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.5718466", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.5718466", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.5718466", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.5718466", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.5718466", "text": "public function getClass();", "title": "" }, { "docid": "85b6aedc87375179b9cc5d728790860f", "score": "0.5718466", "text": "public function getClass();", "title": "" }, { "docid": "99d7c3aba4181d4c9c814f6b474a3b5a", "score": "0.5694937", "text": "protected abstract function getClassname();", "title": "" }, { "docid": "a4944ab476a1d2dc23a81a2046efe17f", "score": "0.5671189", "text": "abstract protected function storesClass(): string;", "title": "" }, { "docid": "641dd6a2ba9586523a2ed7c2f2874dfa", "score": "0.56697553", "text": "function say_hello(){//creating a method \n echo \"Hello from inside the class \".get_class($this).\"<br />\";\n // get_ class($this)this just prints out the name of the class.\n // $this is the way we can refer to instances and call these instances inside the class...only inside the class \n }", "title": "" }, { "docid": "bd05d030dd4b77a27abe5b466e873b9e", "score": "0.5644305", "text": "function getClass() {\n return \\get_class($this);\n }", "title": "" }, { "docid": "8aa0855d070ad6f41676499ddce49a55", "score": "0.56339216", "text": "public function get_class($class);", "title": "" }, { "docid": "f253fec317cdcb9130325477bf6e90ae", "score": "0.5620706", "text": "public static function getClass();", "title": "" }, { "docid": "e648b4fc740f4f84a1edc04a7c846e1d", "score": "0.55925137", "text": "public\n function getClass()\n {\n return get_class($this);\n }", "title": "" }, { "docid": "fee2d8e4baff3427d3afaf74efd7a999", "score": "0.5582213", "text": "abstract protected function getClassName(): string;", "title": "" }, { "docid": "8b9b93db1d3139086371eb76dc34326e", "score": "0.54981047", "text": "public function getClass()\n {\n return get_class($this);\n }", "title": "" }, { "docid": "dd0e79d6f93b4f82af290c2713a13b1c", "score": "0.5495786", "text": "public final function getClassname(){\n $reflection = new \\ReflectionClass(get_called_class());\n return $reflection->getShortName();\n }", "title": "" }, { "docid": "9cd070774572d08c15c5b35b5a775f0e", "score": "0.5470875", "text": "public function getBaseClass(): string;", "title": "" }, { "docid": "7fbeb26a1f1659079c8551083b53ad94", "score": "0.54436195", "text": "public function getFullClassName()\n {\n return str_replace('\\\\', '', get_called_class());\n }", "title": "" }, { "docid": "87a484349ff56dc46509ee2456c9d675", "score": "0.5439201", "text": "public function getClass() {\n return ClassWrapper::forName(get_class($this));\n }", "title": "" }, { "docid": "ffb5ddff11b0a2254004f7c7da40925a", "score": "0.5437358", "text": "public function getClass() {\n\t\treturn get_class($this);\n\t}", "title": "" }, { "docid": "ffb5ddff11b0a2254004f7c7da40925a", "score": "0.5437358", "text": "public function getClass() {\n\t\treturn get_class($this);\n\t}", "title": "" }, { "docid": "426c9ab0279350bc8424fa44230563eb", "score": "0.54283255", "text": "abstract public function getClassName(): string;", "title": "" }, { "docid": "426c9ab0279350bc8424fa44230563eb", "score": "0.54283255", "text": "abstract public function getClassName(): string;", "title": "" }, { "docid": "b3339128e4a57d8e2ba8b54e526851a1", "score": "0.54239887", "text": "public function getCaller();", "title": "" }, { "docid": "dfd87a71f4624d433eea51a4c814740f", "score": "0.54182184", "text": "public function getClass(){\r\n\t\treturn __CLASS__;\r\n\t}", "title": "" }, { "docid": "190382c2deff7069d9e4bcd58926d9aa", "score": "0.5369435", "text": "function getClass();", "title": "" }, { "docid": "190382c2deff7069d9e4bcd58926d9aa", "score": "0.5369435", "text": "function getClass();", "title": "" }, { "docid": "190382c2deff7069d9e4bcd58926d9aa", "score": "0.5369435", "text": "function getClass();", "title": "" }, { "docid": "3b7dd9f8451ffcef03d4059752ae6252", "score": "0.5359884", "text": "public function getClass()\n\t{\n\t\treturn get_class($this->instance);\n\t}", "title": "" }, { "docid": "6905ea1addccb5d80dda7f383a36451a", "score": "0.53429437", "text": "protected abstract function getClassName(): string;", "title": "" }, { "docid": "c6e6df20b78a4f57d8746de09e6d6dbd", "score": "0.53307474", "text": "abstract protected function getContextClass() : string;", "title": "" }, { "docid": "9c65f3e04f1896a5daf83cfa78b7667f", "score": "0.5324519", "text": "public function test_that_we_can_get_an_instance_of_the_class_using_the_protected_class_method()\n {\n // Current class FQN\n $classFQN = get_class($this);\n\n // Instantiate the ClassController class and assert no error is thrown\n $classController = new ClassController($classFQN);\n\n // Get the class instance\n $class = $classController->class();\n\n // Assert that the class is an instance of the current class\n $this->assertInstanceOf($classFQN, $class);\n }", "title": "" }, { "docid": "844f3ba3a233617fc2c254cc9e8d98e2", "score": "0.5318236", "text": "abstract public function objectClass(): string;", "title": "" }, { "docid": "335d69e927d3dad597851e5fc6d29082", "score": "0.5312242", "text": "abstract public static function getCommandClass(): string;", "title": "" }, { "docid": "7fa232a45189a53f033ab8e76f547f54", "score": "0.52989435", "text": "public function getCurrentMethod();", "title": "" }, { "docid": "0be34d1022aaaf73b61529e67198a900", "score": "0.52970123", "text": "protected function doClassProcess()\n {\n }", "title": "" }, { "docid": "e9a10412ccb14c1eff965e9f81cd42c7", "score": "0.52763283", "text": "public function getCallClass()\n {\n if ($this->callClass === null) {\n $this->parseCall();\n }\n return $this->callClass;\n }", "title": "" }, { "docid": "0937dc7db71e303d38c7c5c3e928ad59", "score": "0.5267088", "text": "public function class($object='')\n {\n if(empty($object)){\n return get_called_class();\n }else {\n return get_class($object);\n }\n }", "title": "" }, { "docid": "56179eb3ab8a24d6033319b9f94bca84", "score": "0.5259706", "text": "function research_search_application() {\n $parentName = get_parent_class($this);\n $this->{$parentName}();\n }", "title": "" }, { "docid": "7d9d24ebf581ac4a2bbabe06c12893d6", "score": "0.5239102", "text": "static function instantiate() {\n $r = new ReflectionClass(get_called_class());\n return $r->newInstanceArgs(func_get_args());\n }", "title": "" }, { "docid": "0d26a63daef2c528f72159ded2f3ce0d", "score": "0.52307445", "text": "static function getStaticClass() {\n return \\get_called_class();\n // return static::$className // fallback PHP < 5.3\n }", "title": "" }, { "docid": "47e9289ae45baa1d0b2f2dbd9307cf85", "score": "0.52102214", "text": "public function get_class() {\n return $this->_class;\n }", "title": "" }, { "docid": "e0be9661df7cc96d98a87e2b955a236a", "score": "0.5203747", "text": "abstract public function getClass_v2();", "title": "" }, { "docid": "86ffe35adfb7abc9ce5fb07fbfc9cf71", "score": "0.5181418", "text": "public function model()\n {\n return Called::class;\n }", "title": "" }, { "docid": "9c666782e1b13e7f61f27d82cf8b7105", "score": "0.5179841", "text": "public function getServiceCallClass()\n\t{\n return $this->service_call_class;\n\t}", "title": "" }, { "docid": "9f1730fb3ffcf1683d20a243b9ddfac3", "score": "0.5175942", "text": "public function get_name() { return get_class($this); }", "title": "" }, { "docid": "5295faa426654317eea3d87fb116ef5e", "score": "0.5167001", "text": "public function setClassName()\n\t\t\t{\n\t\t\t\t$traceArray\t\t\t=\tdebug_backtrace();\n\t\t\t\t$this->childClass\t=\t$traceArray[1][\"class\"];\n\t\t\t}", "title": "" }, { "docid": "3e3a94396c2e546aa288197fb9c2c294", "score": "0.5161765", "text": "function Java_sun_reflect_Reflection_getCallerClass($realFramesToSkip) {\n\t//var_dump(\"getCallerClass($realFramesToSkip)\");\n\t$i = 0;\n\t$backtrace = debug_backtrace();\n\t$max = count($backtrace);\n\twhile (\t $i < $max \n\t\t\t&& ( empty($backtrace[$i]['class']) \n\t\t\t\t|| $backtrace[$i]['class'] == 'php_javaClass'\n\t\t\t\t|| $realFramesToSkip-- > 0)) {\n\t\t$i++;\n\t}\n\tif (!empty($backtrace[$i]['class'])) {\n\t\t$class = \\java\\lang\\Clazz::forName(str_replace('\\\\', '.', $backtrace[$i]['class']));\n\t} else {\n\t\t$class = null;\n\t}\n\t//println($class);\n\t//println($class->getClassLoader());\n\treturn $class;\n}", "title": "" }, { "docid": "edbc0eaaf53fcef883ab5dd6036a2301", "score": "0.5158292", "text": "public function getClass()\r\n {\r\n \treturn $this->class;\r\n }", "title": "" }, { "docid": "f6787940e23261e6842de059639863dc", "score": "0.51565135", "text": "public function guess()\n {\n // Try fully qualified namespace\n if (class_exists($class = $this->namespaceBase.'\\\\'.$this->namespaceSuffix.'\\\\'.$this->contextClass)) {\n return $class;\n } \n // Fall back to namespace with SilverStripe prefix\n // TODO Remove once core has namespace capabilities for modules\n if (class_exists($class = 'SilverStripe\\\\'.$this->namespaceBase.'\\\\'.$this->namespaceSuffix.'\\\\'.$this->contextClass)) {\n return $class;\n }\n }", "title": "" }, { "docid": "9121d42897939fbc75e361db85b04215", "score": "0.5154099", "text": "function getClass() {\n return $this->className;\n }", "title": "" }, { "docid": "243f3607d314af017ca78387acab7a89", "score": "0.5153183", "text": "private static function get_calling_importer_class() {\n\t\t// If WP_Importer doesn't exist, neither will any importer that extends it.\n\t\tif ( ! class_exists( 'WP_Importer', false ) ) {\n\t\t\treturn 'unknown';\n\t\t}\n\n\t\t$action = current_filter();\n\t\t$backtrace = debug_backtrace( false ); //phpcs:ignore PHPCompatibility.FunctionUse.NewFunctionParameters.debug_backtrace_optionsFound,WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace\n\n\t\t$do_action_pos = -1;\n\t\t$backtrace_len = count( $backtrace );\n\t\tfor ( $i = 0; $i < $backtrace_len; $i++ ) {\n\t\t\t// Find the location in the stack of the calling action.\n\t\t\tif ( 'do_action' === $backtrace[ $i ]['function'] && $action === $backtrace[ $i ]['args'][0] ) {\n\t\t\t\t$do_action_pos = $i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// If the action wasn't called, the calling class is unknown.\n\t\tif ( -1 === $do_action_pos ) {\n\t\t\treturn 'unknown';\n\t\t}\n\n\t\t// Continue iterating the stack looking for a caller that extends WP_Importer.\n\t\tfor ( $i = $do_action_pos + 1; $i < $backtrace_len; $i++ ) {\n\t\t\t// If there is no class on the trace, continue.\n\t\t\tif ( ! isset( $backtrace[ $i ]['class'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$class_name = $backtrace[ $i ]['class'];\n\n\t\t\t// Check if the class extends WP_Importer.\n\t\t\tif ( class_exists( $class_name, false ) ) {\n\t\t\t\t$parents = class_parents( $class_name, false );\n\t\t\t\tif ( $parents && in_array( 'WP_Importer', $parents, true ) ) {\n\t\t\t\t\treturn $class_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If we've exhausted the stack without a match, the calling class is unknown.\n\t\treturn 'unknown';\n\t}", "title": "" }, { "docid": "9c5be7529813e54a7054ae3860393044", "score": "0.5149722", "text": "function __call($method, $args) {\n\t\t\n\t\tif ( isset($this->table['index'][$method]) ) {\n\t\t\t\n\t\t\t// this method exists within a child\n\t\t\treturn call_user_func_array(array($this->children->{$this->table['index'][$method]}, $method), $args);\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t// check if the method exists in the parent\n\t\t\t$result = NULL;\n\t\t\t( method_exists($this->parentClass, $method) ) ?\n\t\t\t\n\t\t\t\t// method found\n\t\t\t\t$result = call_user_func_array(array($this->parentClass, $method), $args) :\n\t\t\t\t\n\t\t\t\t// cannot find it, and we don't allow subclass access to our methods\n\t\t\t\t$this->autousage(\"Invalid method {$method} was requested\");\n\t\t\t\t\n\t\t\treturn $result;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "df5aa21d7debb7e57d4e545cb1c7de10", "score": "0.5142044", "text": "protected static function _getClassName()\n {\n return __CLASS__;\n }", "title": "" }, { "docid": "9270bfbb19a87094508d3abe1b37d90b", "score": "0.5136831", "text": "public static function className()\n {\n $x = explode('\\\\', get_called_class());\n return end($x);\n }", "title": "" }, { "docid": "8dd25b85b742bac6c216c148c2ff480d", "score": "0.51350737", "text": "public function getClass()\r\n {\r\n return $this->_class;\r\n }", "title": "" }, { "docid": "00608720ff6ee8fd73b6ea45e8579e4a", "score": "0.5131005", "text": "public function testFromPhpReflectionClass()\n {\n $reflectionClass = ReflectionClass::fromPhpReflectionClass(new \\ReflectionClass($this));\n $this->assertSame(__CLASS__, $reflectionClass->getName());\n }", "title": "" }, { "docid": "754ec15b35e565cecca57afe786b4c0b", "score": "0.51303697", "text": "protected abstract function getCommandClass();", "title": "" }, { "docid": "a5b21a03d6ce41c4827cc8d97b5b6275", "score": "0.5124993", "text": "abstract public function call();", "title": "" }, { "docid": "db7636faef77328085588e0947d0795d", "score": "0.51205415", "text": "function getClassOf( $mixed ){ \n\treturn ( gettype($mixed) == \"object\" ) ? get_class($mixed) : \"\"; \n}", "title": "" }, { "docid": "9346121e8fe909ffbbd612d8fcbb8c55", "score": "0.5113184", "text": "function getClassType() {return end(explode('\\\\', get_class($this))); }", "title": "" }, { "docid": "3357b966c8f18a2bdf8c939d5ef1019c", "score": "0.5111451", "text": "function getCaller()\n{\n $backtrace = debug_backtrace();\n\n return isset($backtrace[2]['class']) ?\n $backtrace[2]['class'] :\n null;\n}", "title": "" }, { "docid": "810c99c62020aa4297609b619f27300a", "score": "0.5091919", "text": "public function getInvokedMethodName();", "title": "" }, { "docid": "1e28ddcad38c0e6501458bd7f898b89c", "score": "0.509164", "text": "public function getClassName(): string\n {\n return $this->getWrapped()->{__FUNCTION__}(...func_get_args());\n }", "title": "" }, { "docid": "7a34188b3695bc2ce5756255eb776a23", "score": "0.5088068", "text": "public static function get_class() {\n\t\treturn __CLASS__;\n\t}", "title": "" }, { "docid": "1add9cca1d698e77ff66e37391d32c03", "score": "0.5086739", "text": "public function handledClass() {\n return XPClass::forName('lang.StackTraceElement');\n }", "title": "" }, { "docid": "df87ff90e09768098f89c551c33768d1", "score": "0.5077285", "text": "abstract protected function executeTypeSpecificMethods() : self;", "title": "" }, { "docid": "6bae16d2e3db570e2e081e026c93ed9a", "score": "0.507084", "text": "public function getClass()\r\n {\r\n return $this->class;\r\n }", "title": "" }, { "docid": "8491e01e59b483435966dc116a6718b1", "score": "0.50675625", "text": "public function setDeriverClass($class);", "title": "" } ]
96e24804c2c050200dba8abe33e4de31
Grab the earliest release, since that will stay constant
[ { "docid": "0a734f3e37d3cfeae9bee7aad03a3bb2", "score": "0.0", "text": "function testFindLp() {\n\t\t$result = $this->Album->find('lp', array('limit' => 1, 'order' => 'release_date ASC'));\n\n\t\t// TODO: Test this properly\n\t\t$this->assertEmpty($result);\n\t}", "title": "" } ]
[ { "docid": "616d18b63972126b8775d353afc54266", "score": "0.7437197", "text": "public function getYoungestPatchDevelopmentRelease() {}", "title": "" }, { "docid": "427dfcd9ba1fc393db5915df87212b89", "score": "0.70832086", "text": "public function getYoungestPatchRelease() {}", "title": "" }, { "docid": "c1d473044d59367bca8a16ff99b67235", "score": "0.6840985", "text": "public function findLatest()\n {\n foreach ($this->versions as $version) {\n if ($version->getVersion() === 'Unreleased') {\n continue;\n }\n\n return $version;\n }\n }", "title": "" }, { "docid": "d540e19282bdd3b12160e3fb9bb74a9d", "score": "0.68024486", "text": "private function _fetchCurrentRelease()\n {\n $version = $this->getNodeText('/p:package/p:version/p:release');\n foreach ($this->findNodes('/p:package/p:changelog/p:release') as $release) {\n if ($this->getNodeTextRelativeTo('./p:version/p:release', $release) == $version) {\n return $release;\n }\n }\n }", "title": "" }, { "docid": "22b3c8d14353935149b0f2847dd81f63", "score": "0.6786983", "text": "private function _requireCurrentRelease()\n {\n $release = $this->_fetchCurrentRelease();\n if ($release === null) {\n throw new Horde_Pear_Exception('No release in the changelog matches the current version!');\n }\n return $release;\n }", "title": "" }, { "docid": "a70bdee9b7be62fcc5dd206f552dee65", "score": "0.67021316", "text": "function checkCurrentVersion() {\n $request = new Request();\n $url = 'https://api.github.com/repos/pantheon-systems/cli/releases';\n $url .= '?per_page=1';\n $response = $request->simpleRequest($url, array('absolute_url' => true));\n $release = array_shift($response['data']);\n Terminus::getCache()->putData(\n 'latest_release',\n array('version' => $release->name, 'check_date' => time())\n );\n return $release->name;\n}", "title": "" }, { "docid": "96475801d1b27dcad3809ac3fa919fce", "score": "0.65788925", "text": "public function latest_version();", "title": "" }, { "docid": "bab346350efc2819832ba35f5fb7ecaa", "score": "0.64414966", "text": "public function get_latest_release() {\n\t\treturn array(\n\t\t\t'version' => WP_CORE_STABLE_BRANCH,\n\t\t\t'zip_size_mb' => '6.4',\n\t\t\t'targz_url' => 'download.tar.gz',\n\t\t\t'zip_url' => 'download.zip',\n\t\t\t'tar_size_mb' => '5.9'\n\t\t);\n\t}", "title": "" }, { "docid": "10ed6e359947b7617a972a82fab56c71", "score": "0.6297657", "text": "function latest() {\n\t\treturn [\n\t\t\tnew Release([\n\t\t\t\t'release' => 'My.Awesome.Release-AWESOME',\n\t\t\t\t'size' => 1 * 1024\n\t\t\t])\n\t\t];\n\t}", "title": "" }, { "docid": "de7132bdd2f97c6eb938d281cf93d75a", "score": "0.62575245", "text": "private function getCurrentVersion() {\n\t\t\n\t\t// Migration from SB3 to SB4\n\t\tif ($this->previous_version = false && $this->actual_version == key($this->versions)) {\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "aa8127caea0c78494c0a425fde53576b", "score": "0.6248494", "text": "function get_version_min() {\n return $this->version_min;\n }", "title": "" }, { "docid": "4487bc390e9b774b8ca12e52ec023064", "score": "0.6151763", "text": "public function latestReleaseVersion()\n {\n // in order to correctly format relative URLs in the readme\n return Arr::get($this->latestRelease(), 'tag_name', 'master');\n }", "title": "" }, { "docid": "da41981b923845fe69fbbebf67d5f526", "score": "0.613391", "text": "public function getRelease() {}", "title": "" }, { "docid": "5f5c7a7390edaa91822ec779585646bf", "score": "0.6109401", "text": "function pm_get_release($request, $project) {\n $minor = '';\n $version_patch_changed = '';\n if ($request['version']) {\n // The user specified a specific version - try to find that exact version\n foreach($project['releases'] as $version => $release) {\n // Ignore unpublished releases.\n if ($release['status'] != 'published') {\n continue;\n }\n\n // Straight match\n if (!isset($recommended_version) && $release['version'] == $request['version']) {\n $recommended_version = $version;\n }\n }\n }\n else {\n // No version specified - try to find the best version we can\n foreach($project['releases'] as $version => $release) {\n // Ignore unpublished releases.\n if ($release['status'] != 'published') {\n continue;\n }\n\n // If we haven't found a recommended version yet, put the dev\n // version as recommended and hope it gets overwritten later.\n // Look for the 'latest version' if we haven't found it yet.\n // Latest version is defined as the most recent version for the\n // default major version.\n if (!isset($latest_version) && $release['version_major'] == $project['default_major']) {\n $latest_version = $version;\n }\n\n if (!isset($recommended_version) && $release['version_major'] == $project['default_major']) {\n if ($minor != $release['version_patch']) {\n $minor = $release['version_patch'];\n $version_patch_changed = $version;\n }\n if (empty($release['version_extra']) && $minor == $release['version_patch']) {\n $recommended_version = $version_patch_changed;\n }\n continue;\n }\n }\n }\n if (isset($recommended_version)) {\n return $project['releases'][$recommended_version];\n }\n else if (isset($latest_version)) {\n return $project['releases'][$latest_version];\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "a94e28e46a454c9472cb9d5d43671a42", "score": "0.6106977", "text": "function tidy_get_release() {}", "title": "" }, { "docid": "18f8e8c2661e148de64469085b8def40", "score": "0.5991173", "text": "function getLatestRev() {\n\t\t$rev = $this->LatestRevPacked;\n\t\tif(!$rev && $this->URL) {\n\t\t\t$this->NeedsLatestRev = 1;\n\t\t\t$this->update();\n\t\t\t$rev = $this->LatestRevPacked;\n\t\t}\n\t\treturn $rev;\n\t}", "title": "" }, { "docid": "f3e4aacaac3ba846afc520a99f7a583c", "score": "0.5984979", "text": "public function compatVersionConditionMatchesSameRelease() {}", "title": "" }, { "docid": "f3e4aacaac3ba846afc520a99f7a583c", "score": "0.5984978", "text": "public function compatVersionConditionMatchesSameRelease() {}", "title": "" }, { "docid": "092491dbabc7599c85fd086db96e42b8", "score": "0.59674895", "text": "public function getRelease($version);", "title": "" }, { "docid": "895a2f2ce21474c35ad775ca309b2954", "score": "0.5962688", "text": "public function compatVersionConditionMatchesOlderRelease() {}", "title": "" }, { "docid": "b980dc4cbb4aa39f155215cd3a5d199e", "score": "0.5961604", "text": "function getLatestDate() {\n\t\t$date = $this->LatestDatePacked;\n\t\tif(!$date && $this->URL) {\n\t\t\t$this->NeedsLatestRev = 1;\n\t\t\t$this->update();\n\t\t\t$date = $this->LatestDatePacked;\n\t\t}\n\t\treturn $date;\n\t}", "title": "" }, { "docid": "895a2f2ce21474c35ad775ca309b2954", "score": "0.5960339", "text": "public function compatVersionConditionMatchesOlderRelease() {}", "title": "" }, { "docid": "f79a233ceaaabc975dbb43440a5b9f8b", "score": "0.595691", "text": "public function getMinYearBuilt();", "title": "" }, { "docid": "381f6c22d84536f9a1828ce48f7e9084", "score": "0.58749", "text": "function sitemgr_upgrade0_9_13_001()\n{\n\tglobal $setup_info;\n\t$setup_info['sitemgr']['currentver'] = '0.9.14.001';\n\n\t$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_sitemgr_pages',\n\t\t'sort_order',array('type'=>int, 'precision'=>4));\n\t$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_sitemgr_categories',\n\t\t'sort_order',array('type'=>int, 'precision'=>4));\n\n\treturn $setup_info['sitemgr']['currentver'];\n}", "title": "" }, { "docid": "ca879023949f3b0fc929f7ba059d215d", "score": "0.5856961", "text": "function ff_hh_getlatest( $basedir ) {\n\t// Caching\n\tif ( false === ( $sw_ver = get_transient( 'ff_hh_latestversion' ) ) ) {\n\t\t$sw_ver = 'unknown';\n\t\t$input = wp_remote_retrieve_body( wp_remote_get( $basedir . 'sysupgrade/stable.manifest' ) );\n\t\tforeach ( explode( \"\\n\", $input ) as $line ) {\n\t\t\t$ret = sscanf( $line, '%s %s %s %s', $hw, $sw_ver, $hash, $filename );\n\t\t\tif ( $ret === 4 ) {\n\t\t\t\t// break processing on first matching line\n\t\t\t\t$cachetime = FF_HH_CACHETIME * MINUTE_IN_SECONDS;\n\t\t\t\tset_transient( 'ff_hh_latestversion', $sw_ver, $cachetime );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn $sw_ver;\n}", "title": "" }, { "docid": "f0a882971d071d88ab4a1f77b6b1375e", "score": "0.5829244", "text": "function pm_release_recommended(&$project) {\n if (isset($project['recommended'])) {\n $project['candidate_version'] = $project['recommended'];\n $project['updateable'] = TRUE;\n }\n // If installed version is dev and the candidate version is older, choose\n // latest dev as candidate.\n if (($project['install_type'] == 'dev') && isset($project['candidate_version'])) {\n if ($project['releases'][$project['candidate_version']]['date'] < $project['info']['datestamp']) {\n $project['candidate_version'] = $project['latest_dev'];\n if ($project['releases'][$project['candidate_version']]['date'] <= $project['info']['datestamp']) {\n $project['candidate_version'] = $project['existing_version'];\n $project['updateable'] = FALSE;\n }\n }\n }\n}", "title": "" }, { "docid": "2acb797bb9ef3a61ee64b3bd1a987bad", "score": "0.58127266", "text": "function sitemgr_upgrade1_4_002()\n{\n\treturn $GLOBALS['setup_info']['sitemgr']['currentver'] = '1.5.001';\n}", "title": "" }, { "docid": "99c00e88e5fd073c7fa178b84479851b", "score": "0.5799496", "text": "public function isYoungerPatchDevelopmentReleaseAvailable() {}", "title": "" }, { "docid": "2c10d912bea9a5ada847af6603a00c1e", "score": "0.57668656", "text": "public function get_latest_tag() {\n\t\t\t$tagged_version = get_site_transient( md5( $this->config['slug'] ) . '_latest_tag' );\n\n\t\t\tif ( $this->overrule_transients() || empty( $tagged_version ) ) {\n\n\t\t\t\t$raw_response = wp_remote_get( trailingslashit( $this->config['api_url'] ) . 'releases' );\n\n\t\t\t\tif ( is_wp_error( $raw_response ) ) {\n\t\t\t\t\treturn '<div id=\"message\" class=\"error\"><p>' . $raw_response->get_error_message() . '</p></div>';\n\t\t\t\t}\n\n\t\t\t\t$releases = json_decode( $raw_response['body'] );\n\t\t\t\t$tagged_version = false;\n\n\t\t\t\tif ( is_array( $releases ) ) {\n\t\t\t\t\tforeach ( $releases as $release ) {\n\t\t\t\t\t\tif ( $release->prerelease ) {\n\t\t\t\t\t\t\t$tagged_version = $release->tag_name;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// refresh every 6 hours\n\t\t\t\tif ( ! empty( $tagged_version ) ) {\n\t\t\t\t\tset_site_transient( md5( $this->config['slug'] ) . '_latest_tag', $tagged_version, 60*60*6 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $tagged_version;\n\t\t}", "title": "" }, { "docid": "e0a78f3aa42974d86998687cd535e41e", "score": "0.5765446", "text": "public function getLatestVersion()\n {\n return $this->version;\n }", "title": "" }, { "docid": "039166bc6fbbf4dae16bcc7156a7e5c4", "score": "0.57626736", "text": "public function compatVersionConditionDoesNotMatchNewerRelease() {}", "title": "" }, { "docid": "039166bc6fbbf4dae16bcc7156a7e5c4", "score": "0.576257", "text": "public function compatVersionConditionDoesNotMatchNewerRelease() {}", "title": "" }, { "docid": "3a20db6a52109c5a4ebbcd06948ee913", "score": "0.5757248", "text": "public function isPreRelease()\n {\n return !$this->_isSemantic || !$this->_version->isStable();\n }", "title": "" }, { "docid": "7de080cec78ae211de2541b1ea5f989c", "score": "0.5747765", "text": "function currentVersion() {\n if($this->current_version === false) {\n $this->current_version = DB::executeFirstCell('SELECT version FROM ' . TABLE_PREFIX . 'update_history ORDER BY created_on DESC LIMIT 0, 1');\n if(empty($this->current_version)) {\n $this->current_version = '1.0';\n } // if\n \t \n \t // activeCollab 2.0.2 failed to record proper version into update \n \t // history so we need to manually check if we have 2.0.2. This is done \n \t // by checking if acx_attachments table exists (introduced in aC 2).\n \t if((version_compare($this->current_version, '2.0') < 0) && DB::tableExists(TABLE_PREFIX . 'attachments')) {\n \t $this->current_version = '2.0.2';\n \t } // if\n } // if\n return $this->current_version;\n }", "title": "" }, { "docid": "9052d78dc28fe355fb00e14dba550e3d", "score": "0.57301354", "text": "function fetch_linux_distro_latest_version($linux_distro_name) \n { \n // Fetch linux distribution details from DistroWatch\n $url = \"http://distrowatch.com/table.php?distribution=$linux_distro_name\";\n \n $html_page = file_get_contents($url); \n\n // Match anything in the form <a href=\"<a href=\"8394\">Distribution Release: Fedora 21</a>\n $pattern = \"/<a href=\\\"[\\d]*\\\">(Distribution Release:|BSD Release:)(.+?)(\\d+(.\\d+)?(-\\d+)?)<\\/a>/\";\n\t\n preg_match_all($pattern, $html_page, $matches);\n // Get key of the biggest version number\n\t//print_r($matches[3]);\n $max_version = array_search(max($matches[3]),$matches[3]);\n \n return $matches[3][$max_version];\n \n }", "title": "" }, { "docid": "f81ee6b37f149a3d51bec6929c6590c8", "score": "0.5718839", "text": "protected function getSequence()\n {\n return $this->getRequest()->args('version') || $this->getRequest()->args('release')\n ? ($this->getRequest()->args('release') === null\n ? ''\n : $this->getRequest()->args('release'))\n : $this->modx->version['full_version'];\n }", "title": "" }, { "docid": "2820f3beef6dbaa90b6be0c85494ad9d", "score": "0.57081795", "text": "private function getLatestVersion() {\n if (php_sapi_name() == 'cli' && isset($_SERVER['argv']) && is_foreachable($_SERVER['argv']) && array_key_exists(1, $_SERVER['argv'])) {\n return $_SERVER['argv'][1];\n } else {\n if(is_dir(ROOT . '/current')) {\n return 'current';\n } else {\n $latest_version = null;\n\n if($h = @opendir(ROOT)) {\n while(false !== ($version = readdir($h))) {\n if(substr($version, 0, 1) == '.') {\n continue;\n } // if\n\n if($this->isValidVersionNumber($version)) {\n if(empty($latest_version)) {\n $latest_version = $version;\n } else {\n if(version_compare($latest_version, $version, '<')) {\n $latest_version = $version;\n } // if\n } // if\n } // if\n } // while\n } // if\n\n return $latest_version;\n } // if\n } // if\n }", "title": "" }, { "docid": "89c755b28e3ee339839b5fe2c35404b0", "score": "0.56613535", "text": "public function getCurrentVersion();", "title": "" }, { "docid": "00b275392a269739462c6e1c9bc5a28d", "score": "0.565956", "text": "public function latest()\n {\n $cache_for = self::CACHE_TIME_IN_HOURS * 60;\n\n $release = $this->cache->remember('fixhub_latest_version', $cache_for, function () {\n $request = Request::get($this->github_url)\n ->expectsJson()\n ->withAccept('application/vnd.github.v3+json');\n\n if (config('fixhub.github_oauth_token')) {\n $request->withAuthorization('token ' . config('fixhub.github_oauth_token'));\n }\n\n $response = $request->send();\n\n if ($response->hasErrors()) {\n return false;\n }\n\n return $response->body;\n });\n\n if (is_object($release)) {\n return $release->tag_name;\n }\n\n return false;\n }", "title": "" }, { "docid": "330a98c68e833f17dfc6bf10c354a982", "score": "0.5658064", "text": "public function syncCurrentVersion()\n {\n $date = $this->getNodeText('/p:package/p:date');\n $notes = $this->getNodeText('/p:package/p:notes');\n $api = $this->getNodeText('/p:package/p:version/p:api');\n $stability_api = $this->getNodeText('/p:package/p:stability/p:api');\n $stability_release = $this->getNodeText(\n '/p:package/p:stability/p:release'\n );\n\n $release = $this->_requireCurrentRelease();\n\n $this->replaceTextNodeRelativeTo('./p:date', $release, $date);\n $this->replaceTextNodeRelativeTo(\n './p:notes', $release, $notes . ' '\n );\n $this->replaceTextNodeRelativeTo(\n './p:license',\n $release,\n $this->getLicense(),\n array('uri' => $this->getLicenseLocation())\n );\n $version_node = $this->findNodeRelativeTo(\n './p:version', $release\n );\n $this->replaceTextNodeRelativeTo(\n './p:api', $version_node, $api\n );\n $stability_node = $this->findNodeRelativeTo(\n './p:stability', $release\n );\n $this->replaceTextNodeRelativeTo(\n './p:api', $stability_node, $stability_api\n );\n $this->replaceTextNodeRelativeTo(\n './p:release', $stability_node, $stability_release\n );\n }", "title": "" }, { "docid": "10289f825c23e05ecba0e0f2482e812c", "score": "0.5642763", "text": "protected function getR10005dev()\n {\n $release = new \\stdClass;\n $release->info = array(\n 'ext.min' => '1.0.5-dev',\n 'ext.max' => '',\n 'state' => 'stable',\n 'date' => '2009-06-30',\n 'php.min' => '5.3.0',\n 'php.max' => '',\n );\n $release->constants = array(\n 'FILEINFO_MIME_ENCODING' => null,\n 'FILEINFO_MIME_TYPE' => null,\n );\n $release->functions = array(\n 'mime_content_type' => null,\n );\n return $release;\n }", "title": "" }, { "docid": "b9967ad4028b8a36697e945ff994f293", "score": "0.56378293", "text": "public function latest();", "title": "" }, { "docid": "600f69b93859a221acad3c40456e7220", "score": "0.5628729", "text": "public function getReleaseDate()\n {\n if ($this->isReady) {\n if ($strReturn = $this->matchRegex($this->_strSource, IMDB::IMDB_RELEASE_DATE, 1)) {\n return trim($strReturn);\n }\n }\n return $this->strNotFound;\n }", "title": "" }, { "docid": "da60ce3b3861cf5128bd9ffe47c2c89e", "score": "0.56230974", "text": "public function isYoungerPatchReleaseAvailable() {}", "title": "" }, { "docid": "ec205710359ff0fc444b171b869ea550", "score": "0.5620987", "text": "function _kala_migrate_grab_version($check) {\n // Grab the downloads section\n $dloads = stristr($check, '<div class=\"view view-drupalorg-project-downloads');\n\n // Look through the table for the version.\n $divs = explode('<div class=\"release', $dloads);\n if (isset($divs[1])) {\n foreach ($divs as $div) {\n // Grab all releases.\n $ver_grabs[] = _kala_migrate_get_between($div, 'releases/', '\">');\n }\n $ver_grabs = array_filter($ver_grabs);\n // Filter out D8 versions.\n foreach ($ver_grabs as $ver) {\n if (stripos($ver, '8.x-') !== FALSE) {\n if (stripos($ver, '-dev') !== FALSE) {\n $vers['dev'] = $ver;\n }\n else {\n $vers['stable'] = strstr($ver, '\"', TRUE);\n }\n }\n }\n // Send this out the door.\n if (isset($vers)) {\n return array_key_exists('stable', $vers) ? $vers['stable'] : $vers['dev'];\n }\n }\n\n return '';\n}", "title": "" }, { "docid": "5fa40eb378c5783d2fff63f62ff1ea25", "score": "0.5615646", "text": "private function getMaxAvailableVersion()\n {\n echo \"Getting the max available version: \";\n\n $maxAvailableVersion = 0;\n\n foreach ($this->getDeltas() as $deltaNum => $delta) {\n if ($maxAvailableVersion < $deltaNum) {\n $maxAvailableVersion = $deltaNum;\n }\n }\n\n echo \"$maxAvailableVersion.\\n\";\n\n return $maxAvailableVersion;\n }", "title": "" }, { "docid": "f4318312cba7d044be6120093adfca50", "score": "0.5597912", "text": "public function getBaseVersion()\n {\n if (is_null($this->baseVersion))\n {\n $base = $this->getHelper()->getBaseVersions($this->getSlug());\n $year = $this->getYear();\n $name = $this->getBaseName();\n\n foreach ($base as $bVer => $bYear)\n {\n if ($bYear == $year || $bYear == $name)\n {\n return $this->baseVersion = new SemanticVersion($bVer);\n }\n }\n\n $this->baseVersion = false;\n }\n\n return $this->baseVersion;\n }", "title": "" }, { "docid": "c39468f9859a14ecd9fd342b042d5a28", "score": "0.5591853", "text": "function MinimumCMSVersion()\n {\n return \"1.0\";\n }", "title": "" }, { "docid": "849bd7a41de19c30a75ac3a2187a6123", "score": "0.55768234", "text": "private function getPreviousVersion() {\n\t\t$query = DB::select()->from('settings')->where('key', '=', 'version');\n\t\t$result = $query->execute();\n\n\t\tif ($result->count() == 0 || (isset($result[0]) && $result[0]['value'] == false)) {\n\t\t\t$this->previous_version = false;\n\t\t\t// reset($this->versions);\n\t\t\t// current($this->versions);\n\t\t\t$this->actual_version = key($this->versions);\n\t\t} else {\n\t\t\t$this->acutal_version = $result[0]['value'];\n\t\t}\n\t}", "title": "" }, { "docid": "10ea032188d3f48f1effca692903125f", "score": "0.555005", "text": "function requirement_get_release( $req_version ) {\n\n\tglobal $db;\n\t\n\t$req_rel_tbl\t\t= REQ_VERS_ASSOC_REL;\n\t$f_version_id\t\t= $req_rel_tbl .\".\". REQ_VERS_ASSOC_REL_REQ_ID;\n\t$f_release_id\t\t= $req_rel_tbl .\".\". REQ_VERS_ASSOC_REL_REL_ID;\n\t$release_name\t\t= \"\";\n\n\t$q = \"SELECT\n\t\t\t$f_release_id\n\t\t FROM\n\t\t\t$req_rel_tbl\n\t\t WHERE\n\t\t\t$f_version_id = '$req_version'\";\n\t\n\t$release_id = db_get_one($db, $q);\n\t\t\n\tif( $release_id != '' ) {\n\t\t$release_name = admin_get_release_name( $release_id );\n\t}\n\t\n\n\treturn $release_name;\n}", "title": "" }, { "docid": "e82a5c7b86a052af0b23ca1594d002de", "score": "0.55448776", "text": "function getLatestVersion() {\n global $CONF;\n\n if (!function_exists('curl_init')) return false;\n\n // response version text , last request time\n foreach(array('LatestVerText','LatestVerReqTime') as $key)\n if (!array_key_exists($key,$CONF))\n {\n // `name` varchar(20)\n $query = sprintf(\"INSERT INTO %s (name,value) VALUES ('%s', '')\", sql_table('config'), sql_real_escape_string($key));\n sql_query($query);\n $CONF[$key] = '';\n }\n\n $t = (!empty($CONF['LatestVerReqTime']) ? intval($CONF['LatestVerReqTime']):0);\n $l_ver = (!empty($CONF['LatestVerText']) ? $CONF['LatestVerText']:'');\n $elapsed_time = time()-$t;\n // cache 180 minutes ,\n if ($t>0 && ($elapsed_time > -60) && ($elapsed_time<60*180))\n {\n return $l_ver;\n }\n\n $crl = curl_init();\n $timeout = 5;\n curl_setopt ($crl, CURLOPT_URL,'http://nucleuscms.org/version_check.php');\n curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);\n $ret = curl_exec($crl);\n curl_close($crl);\n\n if (empty($ret))\n $ret = '';\n\n ADMIN::updateConfig('LatestVerText', $ret);\n ADMIN::updateConfig('LatestVerReqTime', strval(time()) );\n\n return $ret;\n}", "title": "" }, { "docid": "8b03804ea176adeaaed4a0e80d1664c3", "score": "0.55372775", "text": "public function getShortVersion()\n {\n return $this->RELEASE . '.' . $this->DEV_LEVEL;\n }", "title": "" }, { "docid": "24c193c4e35ba9ffc7b2cd6a0ce21d40", "score": "0.5535215", "text": "public function getStability()\n {\n $config = Mage::getConfig()->getXpath(self::XPATH_BUCKAROO_STABILITY);\n $version = (string)$config[0];\n\n if ($version === 'stable') {\n return null;\n }\n\n return $version;\n }", "title": "" }, { "docid": "f020b557b652c45093be83bb63ea3d98", "score": "0.5532293", "text": "function acf_get_full_version($version = '1')\n{\n}", "title": "" }, { "docid": "b15753e3e6459f15d49d4d8d4a64cf1b", "score": "0.5529545", "text": "function ff_hh_getlatest( $branch_url, $domain, $branch ) {\n\t// Caching\n\t$cache_key = 'ff_hh_latestversion_' . $domain . '_' . $branch;\n\tif ( false === ( $sw_ver = get_transient( $cache_key ) ) ) {\n\t\t$sw_ver = 'unknown';\n\t\t$url = $branch_url . '/sysupgrade/' . $branch . '.manifest';\n\t\t$input = wp_remote_retrieve_body( wp_remote_get( $url ) );\n\t\tforeach ( explode( \"\\n\", $input ) as $line ) {\n\t\t\t$ret = sscanf( $line, '%s %s %s %s', $hw, $sw_ver, $hash, $filename );\n\t\t\tif ( $ret === 4 ) {\n\t\t\t\t// break processing on first matching line\n\t\t\t\t$cachetime = FF_HH_CACHETIME * MINUTE_IN_SECONDS;\n\t\t\t\tset_transient( $cache_key, $sw_ver, $cachetime );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn $sw_ver;\n}", "title": "" }, { "docid": "bdca435ef5e4e761532ad574910fbe3a", "score": "0.5508102", "text": "public function getCurrentVersion()\n {\n $versions = $this->getVersions();\n\n return count($versions) > 0 ? $versions[0] : 0;\n }", "title": "" }, { "docid": "0374eef2de0114f4ea1a6756f4c3f213", "score": "0.5506925", "text": "public function laterThan($version);", "title": "" }, { "docid": "a0211a5cdc3c48cf6b992342ec58c2db", "score": "0.54896694", "text": "function serendipity_getCurrentVersion() {\n global $serendipity;\n\n if ($serendipity['updateCheck'] != \"stable\" && $serendipity['updateCheck'] != \"beta\") {\n return -1;\n }\n\n // Perform update check once a day. We use a suffix of the configured channel, so when\n // the user switches channels, it has its own timer.\n if (($serendipity['last_update_check_' . $serendipity['updateCheck']] ?? 0) >= (time()-86400)) {\n // Last update was performed less than a day ago. Return last result.\n return $serendipity['last_update_version_' . $serendipity['updateCheck']];\n }\n\n serendipity_set_config_var('last_update_check_' . $serendipity['updateCheck'], time());\n $updateURL = 'https://raw.githubusercontent.com/s9y/Serendipity/master/docs/RELEASE';\n $context = stream_context_create(array('http' => array('timeout' => 5.0)));\n $file = @file_get_contents($updateURL, false, $context);\n\n if (!$file) {\n if (function_exists('curl_init')) {\n $ch = curl_init($updateURL);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, \"5\");\n $file = curl_exec($ch);\n curl_close($ch);\n }\n }\n\n if ($file) {\n if ($serendipity['updateCheck'] == \"stable\") {\n if (preg_match('/^stable:(.+)\\b/m', $file, $match)) {\n serendipity_set_config_var('last_update_version_' . $serendipity['updateCheck'], $match[1]);\n return $match[1];\n }\n } else {\n if (preg_match('/^beta:(.+)\\b/m', $file, $match)) {\n serendipity_set_config_var('last_update_version_' . $serendipity['updateCheck'], $match[1]);\n return $match[1];\n }\n }\n }\n\n return -1;\n}", "title": "" }, { "docid": "fceea05a8cbf148d4984023b7b20f34e", "score": "0.54852897", "text": "function gutenberg_pre_init() {\n\tglobal $wp_version;\n\tif ( defined( 'GUTENBERG_DEVELOPMENT_MODE' ) && GUTENBERG_DEVELOPMENT_MODE && ! file_exists( __DIR__ . '/build/blocks' ) ) {\n\t\tadd_action( 'admin_notices', 'gutenberg_build_files_notice' );\n\t\treturn;\n\t}\n\n\t// Get unmodified $wp_version.\n\tinclude ABSPATH . WPINC . '/version.php';\n\n\t// Strip '-src' from the version string. Messes up version_compare().\n\t$version = str_replace( '-src', '', $wp_version );\n\n\t// Compare against major release versions (X.Y) rather than minor (X.Y.Z)\n\t// unless a minor release is the actual minimum requirement. WordPress reports\n\t// X.Y for its major releases.\n\tif ( version_compare( $version, '5.6', '<' ) ) {\n\t\tadd_action( 'admin_notices', 'gutenberg_wordpress_version_notice' );\n\t\treturn;\n\t}\n\n\trequire_once __DIR__ . '/lib/load.php';\n}", "title": "" }, { "docid": "9fa0a5bf9a30f1e669651600446d1175", "score": "0.54718757", "text": "function checkForUpdate() {\n $cache_data = Terminus::getCache()->getData(\n 'latest_release',\n array('decode_array' => true)\n );\n if (!$cache_data\n || ((int)$cache_data['check_date'] < (int)strtotime('-7 days'))\n ) {\n $logger = Terminus::getLogger();\n try {\n $current_version = checkCurrentVersion();\n if (version_compare($current_version, TERMINUS_VERSION, '>')) {\n $logger->info(\n 'An update to Terminus is available. Please update to {version}.',\n array('version' => $current_version)\n );\n }\n } catch (\\Exception $e) {\n $logger->info($e->getMessage());\n $logger->info('Cannot retrieve current Terminus version.');\n }\n }\n}", "title": "" }, { "docid": "2b3b34190c4d43cecad38a1fefda881d", "score": "0.54542124", "text": "function requirement_get_release_version( $release_id ) {\n\n\t$tbl_req_ver\t\t\t\t= REQ_VERS_TBL;\n\t$f_req_ver_uid\t\t\t\t= $tbl_req_ver .\".\". REQ_VERS_UNIQUE_ID;\n\t$f_req_ver_req_id\t\t\t= $tbl_req_ver .\".\". REQ_VERS_REQ_ID;\n\t$f_req_ver_version\t\t\t= $tbl_req_ver .\".\". REQ_VERS_VERSION;\n\t$f_req_ver_timestamp\t\t= $tbl_req_ver .\".\". REQ_VERS_TIMESTAMP;\n\t$f_req_ver_uploaded_by\t\t= $tbl_req_ver .\".\". REQ_VERS_UPLOADED_BY;\n\t$f_req_ver_filename\t\t\t= $tbl_req_ver .\".\". REQ_VERS_FILENAME;\n\t$f_req_ver_comments\t\t\t= $tbl_req_ver .\".\". REQ_VERS_COMMENTS;\n\t$f_req_ver_status\t\t\t= $tbl_req_ver .\".\". REQ_VERS_STATUS;\n\t$f_req_ver_shed_release\t\t= $tbl_req_ver .\".\". REQ_VERS_SCHEDULED_RELEASE_IMP;\n\t$f_req_ver_shed_build\t\t= $tbl_req_ver .\".\". REQ_VERS_SCHEDULED_BUILD_IMP;\n\t$f_req_ver_actual_release\t= $tbl_req_ver .\".\". REQ_VERS_ACTUAL_RELEASE_IMP;\n\t$f_req_ver_actual_build\t\t= $tbl_req_ver .\".\". REQ_VERS_ACTUAL_BUILD_IMP;\n\t$f_req_ver_detail\t\t\t= $tbl_req_ver .\".\". REQ_VERS_DETAIL;\n\t$f_req_ver_assign_release\t= $tbl_req_ver .\".\". REQ_VERS_ASSIGN_RELEASE;\n\n\t$q = \"\tSELECT\n\t\t\t\t$f_req_ver_version\n\t\t\tFROM $tbl_req_ver\n\t\t\tWHERE\n\t\t\t\t$f_req_ver_assign_release = $release_id\";\n\n\tglobal $db;\n\n\treturn db_get_one($db, $q);\n}", "title": "" }, { "docid": "99a63c14b982519d44f01e3397431081", "score": "0.5452752", "text": "public function getDefaultVersion()\n {\n return $this->default_version;\n }", "title": "" }, { "docid": "f9963c8a10b08c41c455d1ac463cd1d4", "score": "0.54499286", "text": "static function ask_for_pre_release($default)\n {\n return input::line(\n \"Enter pre-release version (alpha, beta, rc, ...) [{$default}]: \",\n function ($input) use ($default)\n {\n if ($input)\n {\n if ($input && preg_match('/^[0-9A-Z]+$/i', $input))\n {\n return $input;\n }\n else\n {\n ui::warning(\n 'Pre-release consist only of alpha-numeric '.\n '[0-9a-z] characters.'\n );\n return;\n }\n }\n\n return $default;\n });\n }", "title": "" }, { "docid": "b8c77f1bf9dede8dbae56e0767bcf4ad", "score": "0.5445627", "text": "public function fetchFirst($table)\n {\n $index = strtolower($table) . '_id';\n $className = '\\Lib\\\\' . ucfirst(strtolower($table));\n $query = \"SELECT * FROM $table\n WHERE release_date <= date()\n ORDER BY $index ASC\n LIMIT 1\";\n $row = $this->getDb()->get_row($query);\n if ($row) {\n return $this->build($className, $row);\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "f07fc75bb21a2c8f3143fc9ea71831fc", "score": "0.5436861", "text": "public function getReleaseTime();", "title": "" }, { "docid": "3089414edb60df1dfe674df3f90b2af4", "score": "0.5432167", "text": "function getNewVersion()\n\t{\n\t\t\n\t\t$sql=\"SELECT ifnull( MAX(version*1) +10 ,11) AS newversion FROM payment_apportioning WHERE parentid='\".$this->parentid.\"' AND (version%10)='1'\";\n\t\t$res= parent::execQuery($sql,$this->fin);\n\t\t$row = mysql_fetch_assoc($res);\n\t\t\n\t\tif(DEBUG_MODE) \n\t\t{\n\t\t\techo \"<br>sql\".$sql;\n\t\t\techo '<br>row -- '; print_r($row);\n\t\t\techo '<br>$row newversion'.$row['newversion'];\n\t\t}\n\t\t\n\t\treturn $row['newversion'];\n\t}", "title": "" }, { "docid": "37fb54a13ff5520e6f9dbd219062b609", "score": "0.54262334", "text": "abstract public function get_version();", "title": "" }, { "docid": "a2e01e726764b40b3fabf2b2159bad26", "score": "0.5424668", "text": "public static function isStable()\n {\n return (bool) preg_match('/^[0-9\\.]+$/', static::VERSION);\n }", "title": "" }, { "docid": "1c8702c059a210fefdcb71885ec3b08c", "score": "0.5422194", "text": "function scheduledreporting_component_checkversion()\n{\n if (!function_exists('get_product_release')) {\n return false;\n }\n if (get_product_release() < 512) {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "711a5a2b7aac6d4aba259514f0158b8e", "score": "0.54207486", "text": "public final function getBuild()\n {\n /**\n * DO NOT FORGET !!! to update GEMS__PATCH_LEVELS:\n *\n * For new installations the initial patch level should\n * be THIS LEVEL plus one.\n *\n * This means that future patches for will be loaded,\n * but that previous patches are ignored.\n */\n return 59;\n }", "title": "" }, { "docid": "025972aa5589eccaa20c859c803584f0", "score": "0.5414096", "text": "function MinimumCMSVersion() {\n\t\treturn \"1.11.5\";\n\t}", "title": "" }, { "docid": "aac86c843415f75b6b1492dd88fb09b5", "score": "0.54087275", "text": "public function getRelease()\n {\n return php_uname('r');\n }", "title": "" }, { "docid": "4a1242cd00a7a9e06ac77e8a51f80fd0", "score": "0.5406178", "text": "function getVersion() {\r\n\t\treturn '1.1';\r\n\t}", "title": "" }, { "docid": "3ae46b6cfadd2c0794ea99813f0f6321", "score": "0.54023945", "text": "public function getPrerelease() : bool\n {\n return $this->prerelease;\n }", "title": "" }, { "docid": "a9219ea980d3e80395b10106ecbf7d3d", "score": "0.53846246", "text": "public function getMostRecentStable()\n {\n return $this->selectRecentStable();\n }", "title": "" }, { "docid": "15edd8ff077ca18d06d4a3e88bdc2e4d", "score": "0.5382505", "text": "public function isYoungerDevelopmentReleaseAvailableReturnsTrueIfADevelopmentReleaseIsYounger() {}", "title": "" }, { "docid": "08b9975db63eb79313c798fd7aec65d6", "score": "0.53789216", "text": "public function isYoungerReleaseAvailableReturnsFalseIfOnlyADevelopmentReleaseIsYounger() {}", "title": "" }, { "docid": "d7e06119fd05c5b6690b33d94d17c8a7", "score": "0.53717", "text": "function getLatestUpgradeVersion( $pPackage ) {\n\t\t$ret = '0.0.0';\n\t\tif( !empty( $pPackage )) {\n\t\t\t$dir = constant( strtoupper( $pPackage ).\"_PKG_PATH\" ).\"admin/upgrades/\";\n\t\t\tif( is_dir( $dir ) && $upDir = opendir( $dir )) {\n\t\t\t\twhile( FALSE !== ( $file = readdir( $upDir ))) {\n\t\t\t\t\tif( is_file( $dir.$file )) {\n\t\t\t\t\t\t$upVersion = str_replace( \".php\", \"\", $file );\n\t\t\t\t\t\t// we only want to update $ret if the version of the file is greater than the previous one\n\t\t\t\t\t\tif( $this->validateVersion( $upVersion ) && version_compare( $ret, $upVersion, \"<\" )) {\n\t\t\t\t\t\t\t$ret = $upVersion;\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\treturn(( $ret == '0.0.0' ) ? FALSE : $ret );\n\t}", "title": "" }, { "docid": "6b1c8f43f473a81a2dc7c5ffdaf3ec60", "score": "0.53656197", "text": "function GetVersion()\n {\n return '1.0';\n }", "title": "" }, { "docid": "74e66c9c0bd93bad2ffd3142117b078b", "score": "0.53616816", "text": "public static function getYearOldest()\n {\n if (Helpers::hasAccess('titles.create'))\n $year = Title::min('year');\n else\n $year = Title::where('type', '=', 'movie')\n ->whereNotNull('video')\n ->where('video','<>','')\n ->whereNotNull('poster')\n ->where('poster','<>','')\n ->whereNotNull('background')\n ->where('background','<>','') \n ->min('year'); \n return $year;\n }", "title": "" }, { "docid": "a09ff4423f93c6af5dedf7a5790fb984", "score": "0.53526026", "text": "public function latestYear()\n\t{\n\t\t$year = $this->doll->orderBy('release_year', 'DESC')->pluck('release_year');\n\t\treturn $year;\n\t}", "title": "" }, { "docid": "96b7de8f1dc51b345021cd2d5411738a", "score": "0.53491247", "text": "public function getLatestRelease($package, $stability = 'stable')\n {\n return $this->_access->getLatestRelease($package, $stability);\n }", "title": "" }, { "docid": "3689668c75c2ac3ad54a6bd1d2a7021d", "score": "0.5332818", "text": "public function getMostRecentBuild()\n {\n return $this->builds[0];\n }", "title": "" }, { "docid": "c8d0fef720eeb2c5311e952022906705", "score": "0.5323862", "text": "public function get_firmwareRelease(): string\n {\n // $res is a string;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::FIRMWARERELEASE_INVALID;\n }\n }\n $res = $this->_firmwareRelease;\n return $res;\n }", "title": "" }, { "docid": "2ca57b3f04e489025bd9f109f7caa0f7", "score": "0.5321099", "text": "function getHotfixCurrentVersion()\n\t{\n\t\t$this->readHotfixInfo();\n\t\treturn $this->hotfix_current_version;\n\t}", "title": "" }, { "docid": "b367c633b3e6bef69c725927eff6af77", "score": "0.53205156", "text": "abstract protected function getRepoReleaseInfo();", "title": "" }, { "docid": "b89ef4c8e8426c126e30cbeb07819738", "score": "0.53141516", "text": "function &getCurrentVersion() {\n\t\treturn $this->currentVersion;\n\t}", "title": "" }, { "docid": "89de1d51901140bfee43733e65e760c1", "score": "0.5287779", "text": "public function getEarliest(): int\n {\n return $this->earliest;\n }", "title": "" }, { "docid": "a535c10568dd771a4e16ea703facc892", "score": "0.5281618", "text": "function sitemgr_upgrade1_2()\n{\n\t$GLOBALS['egw_setup']->db->update('egw_sitemgr_modules',array('module_name' => 'news_admin'),array('module_name' => 'news'),__LINE__,__FILE__);\n\n\t$GLOBALS['setup_info']['sitemgr']['currentver'] = '1.3.001';\n\treturn $GLOBALS['setup_info']['sitemgr']['currentver'];\n}", "title": "" }, { "docid": "256d78e6e7b5357c9a6754a8e3d047d0", "score": "0.52732646", "text": "function remove_src_version ( $src ) {\r\n\tglobal $wp_version;\r\n\t$version_str = '?ver='.$wp_version;\r\n\t$version_str_offset = strlen( $src ) - strlen( $version_str );\r\n\tif( substr( $src, $version_str_offset ) == $version_str )\r\n\t$src = substr( $src, 0, $version_str_offset ) . '?' . filemtime( __FILE__ );\r\n\treturn $src;\r\n}", "title": "" }, { "docid": "c38fd7ca6363cfe4c5307103257a9373", "score": "0.52689403", "text": "function phpgwapi_upgrade0_9_15_014()\n\t{\n\t\t$GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.14.508';\n\t\treturn $GLOBALS['setup_info']['phpgwapi']['currentver'];\n\t}", "title": "" }, { "docid": "c0f331a24396d6472d8814feffef7928", "score": "0.5261011", "text": "protected function getLatestVersion()\n {\n $latestVersion = trim($this->rfs->getContents($this->getOriginName(), $this->getBaseUrl() . '/version', false));\n\n return $latestVersion;\n }", "title": "" }, { "docid": "96dc15f4c077fbdf1796b90f7cd2e7bd", "score": "0.5252027", "text": "public function getVersion() {\n\t\tif($this->version == \"\")\n\t\t$this->version = \"0.0.0\";\n\t\treturn $this->version;\n\t}", "title": "" }, { "docid": "1238270b8519c1b496a870a5b3db07c8", "score": "0.5246971", "text": "protected function getRollbackRelease()\n\t{\n\t\treturn $this->argument('release') ?: $this->getReleasesManager()->getPreviousRelease();\n\t}", "title": "" }, { "docid": "9d2fb2e2a5b3410c56659e398520684f", "score": "0.524645", "text": "function get_version( $title ) {\n\tif ( strstr( $title, '(' ) ) {\n\t\t$version = explode( \"(\", $title );\n\t\t$the_version = trim( substr( $version[1], 0, strlen( $version[1] ) - 1 ) );\n\t} else {\n\t\t$the_version = 'Theatrical Release';\n\t}\n\treturn $the_version;\n}", "title": "" }, { "docid": "2a1ee51ff705c661ba8548eb769bf389", "score": "0.5244414", "text": "private function min()\n {\n return Carbon::create(1, 1, 1, 0, 0, 0);\n }", "title": "" }, { "docid": "2d481cfaca4fb9a0aed8be93acbe719f", "score": "0.5243132", "text": "public static function getDevelopmentRevision()\n {\n $branch = '';\n $rev = 0;\n $date = '';\n \n try {\n // try to find the .git dir\n $dir = realpath(dirname(dirname(dirname(__FILE__)))) . '/.git';\n if (file_exists($dir)) {\n $HEAD = trim(str_replace('ref: ', '', @file_get_contents(\"$dir/HEAD\")));\n $explodedHead = explode('/', $HEAD);\n \n $branch = array_pop($explodedHead);\n $rev = trim(@file_get_contents(\"$dir/$HEAD\"));\n \n $hashes = str_split($rev, 2);\n \n $objPath = \"$dir/objects\";\n while (count($hashes) != 0) {\n $objPath .= '/' . array_shift($hashes);\n $objFile = \"$objPath/\" . implode('', $hashes);\n if (@file_exists($objFile)) {\n $date = date_create('@' . filemtime($objFile))->format('Y-m-d H:i:s');\n break;\n }\n }\n }\n $revision = \"$branch: $rev ($date)\";\n } catch (\\Exception $e) {\n $revision = 'not resolvable';\n }\n \n return $revision;\n }", "title": "" }, { "docid": "d9ce3a2c5fd28389920d103a341a4652", "score": "0.5241009", "text": "private function majorReleaseDefinitionProvider(): Generator\n {\n yield 'amqp' => [\n 'classes' => ['0', '1', '2'],\n 'const' => ['1'],\n 'constants' => ['1', '2'],\n 'iniEntries' => ['0', '1', '2'],\n 'methods' => ['0', '1', '2'],\n 'releases' => ['0', '1', '2'],\n ];\n\n yield 'apc' => [\n 'classes' => ['3'],\n 'constants' => ['3'],\n 'functions' => ['2', '3'],\n 'iniEntries' => ['2', '3'],\n 'methods' => ['3'],\n 'releases' => ['2', '3'],\n ];\n\n yield 'apcu' => [\n 'classes' => ['5'],\n 'constants' => ['4'],\n 'functions' => ['4', '5'],\n 'iniEntries' => ['4'],\n 'methods' => ['5'],\n 'releases' => ['4', '5'],\n ];\n\n yield 'ast' => [\n 'classes' => ['0'],\n 'constants' => ['0', '1'],\n 'functions' => ['0'],\n 'methods' => ['0'],\n 'releases' => ['0', '1'],\n ];\n\n yield 'bcmath' => [\n 'functions' => ['40', '50'],\n 'iniEntries' => ['40'],\n 'releases' => array_merge(\n ['40', '50'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n )\n ];\n\n yield 'bz2' => [\n 'functions' => ['40'],\n 'releases' => array_merge(\n ['40'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'calendar' => [\n 'constants' => ['40', '43', '50'],\n 'functions' => ['40'],\n 'releases' => array_merge(\n ['40', '43', '50'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'core' => [\n 'classes' => [\n '40',\n '50', '51', '53', '55',\n '70', '71', '73', '74',\n '80', '81', '82',\n ],\n 'const' => ['80'],\n 'constants' => [\n '40', '42', '43', '44',\n '50', '51', '52', '53', '54',\n '71', '72',\n ],\n 'functions' => [\n '40', '42', '43',\n '50', '51', '53', '54',\n '70', '73', '74',\n '80', '81',\n ],\n 'methods' => [\n '51', '53', '55',\n '70', '72', '74',\n '80', '81', '82',\n ],\n 'iniEntries' => [\n '40', '41',\n '50', '54', '55', '56',\n '70', '71', '73', '74',\n '80', '81', '82',\n ],\n 'interfaces' => [\n '51', '53',\n '70', '72',\n '80', '81',\n ],\n 'releases' => array_merge(\n [\n '40', '41', '42', '43', '44',\n '50', '51', '52', '53', '54', '55', '56',\n ],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'ctype' => [\n 'functions' => ['40'],\n 'releases' => array_merge(\n ['40'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'curl' => [\n 'classes' => ['55', '80', '81'],\n 'constants' => ['40', '51', '52', '53', '54', '55', '56', '70', '73', '81', '82'],\n 'functions' => ['40', '50', '51', '55', '71', '82'],\n 'iniEntries' => ['53'],\n 'methods' => ['55', '81'],\n 'releases' => array_merge(\n ['40', '51', '52', '53', '54', '55', '56'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'date' => [\n 'classes' => ['52', '53', '55'],\n 'const' => ['52', '53', '70', '71', '72', '82'],\n 'constants' => ['51', '70', '82'],\n 'functions' => ['40', '50', '51', '52', '53', '55'],\n 'iniEntries' => ['51'],\n 'interfaces' => ['55'],\n 'methods' => ['52', '53', '55', '56', '72', '73', '80', '82'],\n 'releases' => array_merge(\n ['40', '50', '51', '52', '53', '55'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'dom' => [\n 'classes' => ['50', '51'],\n 'constants' => ['50'],\n 'functions' => ['50'],\n 'interfaces' => ['80'],\n 'methods' => ['50', '80'],\n 'releases' => array_merge(\n ['50', '51'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'enchant' => [\n 'classes' => ['80'],\n 'constants' => ['1', '80'],\n 'functions' => ['0', '1', '80'],\n 'releases' => array_merge(\n ['0', '1'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'ereg' => [\n 'functions' => ['40'],\n 'releases' => ['40'],\n ];\n\n yield 'exif' => [\n 'constants' => ['40'],\n 'functions' => ['40', '42', '43'],\n 'iniEntries' => ['43'],\n 'releases' => array_merge(\n ['40', '42', '43'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'fileinfo' => [\n 'classes' => ['0'],\n 'constants' => ['0', '1', '72'],\n 'functions' => ['0', '1'],\n 'methods' => ['0', '80'],\n 'releases' => array_merge(\n ['0', '1'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'filter' => [\n 'constants' => ['0', '70', '71', '73', '80', '82'],\n 'functions' => ['0'],\n 'iniEntries' => ['0'],\n 'releases' => array_merge(\n ['0'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'ftp' => [\n 'classes' => ['81'],\n 'constants' => ['40', '43', '56'],\n 'functions' => ['40', '42', '43', '50', '72'],\n 'releases' => array_merge(\n ['40', '42', '43', '50', '56'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'gd' => [\n 'classes' => ['80', '81'],\n 'constants' => ['40', '52', '53', '55', '56', '72', '74', '81'],\n 'functions' => ['40', '43', '50', '51', '52', '54', '55', '72', '74', '80', '81'],\n 'iniEntries' => ['51'],\n 'releases' => array_merge(\n ['40', '43', '50', '51', '52', '53', '54', '55', '56'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'gender' => [\n 'classes' => ['0'],\n 'const' => ['0', '1'],\n 'methods' => ['0'],\n 'releases' => ['0', '1'],\n ];\n\n yield 'geoip' => [\n 'constants' => ['0', '1'],\n 'functions' => ['0', '1'],\n 'iniEntries' => ['1'],\n 'releases' => ['0', '1'],\n ];\n\n yield 'gettext' => [\n 'functions' => ['40', '42'],\n 'releases' => array_merge(\n ['40', '42'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'gmp' => [\n 'classes' => ['80'],\n 'constants' => ['40', '53', '56'],\n 'functions' => ['40', '52', '53', '56', '70', '73'],\n 'methods' => ['81', '82'],\n 'releases' => array_merge(\n ['40', '52', '53', '56'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'haru' => [\n 'classes' => ['0'],\n 'const' => ['0'],\n 'methods' => ['0', '1'],\n 'releases' => ['0', '1'],\n ];\n\n yield 'hash' => [\n 'classes' => ['72'],\n 'constants' => ['1', '53', '54', '81'],\n 'functions' => ['1', '53', '55', '56', '71', '72'],\n 'iniEntries' => [],\n 'methods' => ['72'],\n 'releases' => array_merge(\n ['1', '53', '54', '55', '56'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'htscanner' => [\n 'iniEntries' => ['0', '1'],\n 'releases' => ['0', '1'],\n ];\n\n yield 'http' => [\n 'classes' => ['0', '1', '2', '3'],\n 'const' => ['2', '3'],\n 'constants' => ['1', '2', '4'],\n 'functions' => ['1'],\n 'iniEntries' => ['1', '2'],\n 'interfaces' => ['2'],\n 'methods' => ['2', '3', '4'],\n 'releases' => ['0', '1', '2', '3', '4'],\n ];\n\n yield 'iconv' => [\n 'constants' => ['43', '50'],\n 'functions' => ['40', '50'],\n 'iniEntries' => ['40'],\n 'releases' => array_merge(\n ['40', '43', '50'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'igbinary' => [\n 'functions' => ['1'],\n 'iniEntries' => ['1'],\n 'releases' => ['1', '2', '3'],\n ];\n\n yield 'imagick' => [\n 'classes' => ['2', '3'],\n 'const' => ['2', '3'],\n 'iniEntries' => ['3'],\n 'methods' => ['2', '3'],\n 'releases' => ['2', '3'],\n ];\n\n yield 'imap' => [\n 'classes' => ['81'],\n 'constants' => ['40', '53'],\n 'functions' => ['40', '43', '50', '51', '53', '82'],\n 'iniEntries' => ['56'],\n 'releases' => array_merge(\n ['40', '43', '50', '51', '53', '56'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'inclued' => [\n 'functions' => ['0'],\n 'iniEntries' => ['0'],\n 'releases' => ['0'],\n ];\n\n yield 'intl' => [\n 'classes' => ['1', '2', '55', '70', '81'],\n 'const' => ['1', '2', '55', '70', '73', '74', '80'],\n 'constants' => ['1', '2'],\n 'functions' => ['1', '2', '55', '71', '73'],\n 'iniEntries' => ['1', '3'],\n 'methods' => ['1', '2', '55', '70', '71', '73', '81'],\n 'releases' => array_merge(\n ['1', '2', '3', '55'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'jsmin' => [\n 'constants' => ['0'],\n 'functions' => ['0'],\n 'releases' => ['0', '1', '2', '3'],\n ];\n\n yield 'json' => [\n 'classes' => ['73'],\n 'constants' => ['53', '54', '55', '56', '70', '71', '72', '73', '81'],\n 'functions' => ['52', '53', '55'],\n 'interfaces' => ['54'],\n 'methods' => ['54'],\n 'releases' => array_merge(\n ['52', '53', '54', '55', '56'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'ldap' => [\n 'classes' => ['81'],\n 'constants' => ['40', '53', '54', '56', '70', '71', '72'],\n 'functions' => ['40', '42', '50', '54', '56', '72', '73', '80'],\n 'iniEntries' => ['40'],\n 'releases' => array_merge(\n ['40', '42', '50', '53', '54', '56'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'libevent' => [\n 'constants' => ['0'],\n 'functions' => ['0'],\n 'releases' => ['0'],\n ];\n\n yield 'libxml' => [\n 'classes' => ['51'],\n 'constants' => ['51', '52', '53', '54', '55', '70'],\n 'functions' => ['50', '51', '52', '54', '82'],\n 'releases' => array_merge(\n ['51', '52', '53', '54', '55'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'lzf' => [\n 'functions' => ['0', '1'],\n 'releases' => ['0', '1'],\n ];\n\n yield 'mailparse' => [\n 'classes' => ['0'],\n 'constants' => ['0'],\n 'functions' => ['0'],\n 'iniEntries' => ['0'],\n 'methods' => ['0', '3'],\n 'releases' => ['0', '2', '3'],\n ];\n\n yield 'mbstring' => [\n 'constants' => ['40', '73', '74'],\n 'functions' => ['40', '42', '43', '44', '50', '52', '53', '54', '72', '74'],\n 'iniEntries' => ['40', '42', '43', '51', '73', '74'],\n 'releases' => array_merge(\n ['40', '42', '43', '44', '50', '51', '52', '53', '54'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'mcrypt' => [\n 'constants' => ['40', '1'],\n 'functions' => ['40', '1'],\n 'iniEntries' => ['40', '1'],\n 'releases' => ['40', '1'],\n ];\n\n yield 'memcache' => [\n 'classes' => ['0', '3'],\n 'constants' => ['0', '2', '3'],\n 'functions' => ['0', '1', '2', '3'],\n 'iniEntries' => ['2', '3', '4'],\n 'methods' => ['0', '3'],\n 'releases' => ['0', '1', '2', '3', '4', '8'],\n ];\n\n yield 'memcached' => [\n 'classes' => ['0', '2'],\n 'const' => ['2', '3'],\n 'iniEntries' => ['2', '3'],\n 'methods' => ['0', '2'],\n 'releases' => ['0', '2', '3'],\n ];\n\n yield 'mhash' => [\n 'constants' => ['40'],\n 'functions' => ['40'],\n 'releases' => ['40'],\n ];\n\n yield 'mongo' => [\n 'classes' => ['0', '1'],\n 'const' => ['0', '1'],\n 'constants' => ['1'],\n 'functions' => ['1'],\n 'iniEntries' => ['0'],\n 'interfaces' => ['1'],\n 'methods' => ['0', '1'],\n 'releases' => ['0', '1'],\n ];\n\n yield 'msgpack' => [\n 'classes' => ['0'],\n 'const' => ['0'],\n 'constants' => ['2'],\n 'functions' => ['0'],\n 'iniEntries' => ['0'],\n 'methods' => ['0'],\n 'releases' => ['0', '2'],\n ];\n\n yield 'mssql' => [\n 'constants' => ['40'],\n 'functions' => ['40', '42', '43'],\n 'iniEntries' => ['40', '42', '43', '51', '55'],\n 'releases' => ['40', '42', '43', '51', '55'],\n ];\n\n yield 'mysql' => [\n 'constants' => ['40', '43'],\n 'functions' => ['40', '43', '52'],\n 'iniEntries' => ['40', '43'],\n 'releases' => ['40', '43', '52'],\n ];\n\n yield 'mysqli' => [\n 'classes' => ['50'],\n 'constants' => ['50', '51', '52', '53', '54', '55', '56', '72', '81'],\n 'functions' => ['50', '53', '54', '55', '56', '81', '82'],\n 'iniEntries' => ['50', '56', '81'],\n 'methods' => ['50', '81', '82'],\n 'releases' => array_merge(\n ['50', '51', '52', '53', '54', '55', '56'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'oauth' => [\n 'classes' => ['0', '1'],\n 'constants' => ['0', '1'],\n 'functions' => ['0'],\n 'methods' => ['0', '1'],\n 'releases' => ['0', '1', '2'],\n ];\n\n yield 'oci8' => [\n 'classes' => ['1', '3'],\n 'constants' => ['1'],\n 'functions' => ['1', '2', '3'],\n 'iniEntries' => ['1', '3'],\n 'methods' => ['1', '3'],\n 'releases' => array_merge(\n ['1', '2', '3'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'odbc' => [\n 'constants' => ['40', '43', '54'],\n 'functions' => ['40', '82'],\n 'iniEntries' => ['40', '53'],\n 'releases' => array_merge(\n ['40', '43', '53', '54'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'opcache' => [\n 'functions' => ['70'],\n 'iniEntries' => ['56', '70', '71', '74', '80'],\n 'releases' => array_merge(\n ['56'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'openssl' => [\n 'classes' => ['80'],\n 'constants' => ['40', '43', '50', '52', '53', '54', '56', '71', '80'],\n 'functions' => [\n '40', '42',\n '52', '53', '55', '56',\n '71', '72', '73', '74',\n '80', '82',\n ],\n 'iniEntries' => ['56'],\n 'releases' => array_merge(\n ['40', '42', '43', '50', '52', '53', '54', '55', '56'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'pcntl' => [\n 'constants' => ['41', '50', '53', '70', '72', '74'],\n 'functions' => ['41', '42', '43', '50', '53', '70', '71', '74'],\n 'releases' => array_merge(\n ['41', '42', '43', '50', '53'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'pcre' => [\n 'constants' => ['40', '43', '52', '70', '72', '73'],\n 'functions' => ['40', '52', '53', '70', '80'],\n 'iniEntries' => ['52', '70'],\n 'releases' => array_merge(\n ['40', '43', '52', '53'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'pdflib' => [\n 'classes' => ['2'],\n 'functions' => ['2', '3'],\n 'methods' => ['2', '3'],\n 'releases' => ['1', '2', '3', '4'],\n ];\n\n yield 'pdo' => [\n 'classes' => ['51'],\n 'const' => ['51', '80', '81'],\n 'functions' => ['51'],\n 'methods' => ['51'],\n 'releases' => array_merge(\n ['51'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'pgsql' => [\n 'classes' => ['81'],\n 'constants' => ['40', '51', '54', '56', '71', '73'],\n 'functions' => ['40', '42', '43', '50', '51', '52', '54', '56'],\n 'iniEntries' => ['40'],\n 'releases' => array_merge(\n ['40', '42', '43', '50', '51', '52', '54', '56'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'phar' => [\n 'classes' => ['1', '2'],\n 'const' => ['1', '2', '81'],\n 'iniEntries' => ['1', '2'],\n 'methods' => ['1', '2'],\n 'releases' => array_merge(\n ['1', '2'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'posix' => [\n 'constants' => ['51', '70'],\n 'functions' => ['40', '42', '51', '52', '70'],\n 'releases' => array_merge(\n ['40', '42', '51', '52'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'pthreads' => [\n 'classes' => ['0', '1', '2'],\n 'constants' => ['0', '2'],\n 'methods' => ['0', '1', '2', '3'],\n 'releases' => ['0', '1', '2', '3'],\n ];\n\n yield 'raphf' => [\n 'functions' => ['2'],\n 'iniEntries' => ['2'],\n 'releases' => ['2'],\n ];\n\n yield 'rar' => [\n 'classes' => ['2'],\n 'const' => ['0', '2', '4'],\n 'constants' => ['2'],\n 'functions' => ['2', '3'],\n 'methods' => ['0', '2', '3', '4'],\n 'releases' => ['0', '1', '2', '3', '4'],\n ];\n\n yield 'rdkafka' => [\n 'classes' => ['1', '4'],\n 'constants' => ['1', '5'],\n 'functions' => ['1', '5'],\n 'methods' => ['1', '3', '4', '5'],\n 'releases' => ['1', '2', '3', '4', '5', '6'],\n ];\n\n yield 'readline' => [\n 'constants' => ['54'],\n 'functions' => ['40', '51'],\n 'iniEntries' => ['54'],\n 'releases' => array_merge(\n ['40', '51', '54'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'recode' => [\n 'functions' => ['40'],\n 'releases' => ['40'],\n ];\n\n yield 'redis' => [\n 'classes' => ['2', '5'],\n 'const' => ['2', '4', '5'],\n 'iniEntries' => ['2', '3', '4', '5'],\n 'methods' => ['2', '3', '4', '5'],\n 'releases' => ['2', '3', '4', '5'],\n ];\n\n yield 'reflection' => [\n 'classes' => ['50', '54', '70', '71', '74', '80', '81'],\n 'const' => [\n '50', '51',\n '80', '81', '82',\n ],\n 'interfaces' => ['50'],\n 'methods' => [\n '50', '54',\n '70', '71', '72', '74',\n '80', '81', '82',\n ],\n 'releases' => array_merge(\n ['50', '51', '54'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'riak' => [\n 'classes' => ['0', '1'],\n 'iniEntries' => ['0', '1'],\n 'interfaces' => ['0', '1'],\n 'methods' => ['0', '1'],\n 'releases' => ['0', '1'],\n ];\n\n yield 'session' => [\n 'classes' => ['54'],\n 'constants' => ['40', '54'],\n 'functions' => ['40', '42', '43', '44', '54', '56', '71'],\n 'iniEntries' => ['40', '43', '50', '52', '54', '55', '70', '71', '73'],\n 'interfaces' => ['54', '55', '70'],\n 'methods' => ['54', '55', '70'],\n 'releases' => array_merge(\n ['40', '42', '43', '44', '50', '52', '54', '55', '56'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'shmop' => [\n 'classes' => ['80'],\n 'functions' => ['40'],\n 'releases' => array_merge(\n ['40'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'simplexml' => [\n 'classes' => ['50', '51'],\n 'functions' => ['50'],\n 'methods' => ['50'],\n 'releases' => array_merge(\n ['50', '51'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'snmp' => [\n 'classes' => ['54'],\n 'const' => ['54'],\n 'constants' => ['43', '52', '54'],\n 'functions' => ['40', '43', '50', '52'],\n 'methods' => ['54'],\n 'releases' => array_merge(\n ['40', '43', '50', '52', '54'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'soap' => [\n 'classes' => ['50'],\n 'constants' => ['50', '55'],\n 'functions' => ['50'],\n 'iniEntries' => ['50'],\n 'methods' => ['50', '80'],\n 'releases' => array_merge(\n ['50', '55'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'sockets' => [\n 'classes' => ['80'],\n 'constants' => [\n '41', '43',\n '52', '54', '55',\n '70', '72',\n '81', '82',\n ],\n 'functions' => ['41', '42', '43', '54', '55', '70', '72'],\n 'releases' => array_merge(\n ['41', '42', '43', '52', '54', '55'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'solr' => [\n 'classes' => ['0', '1', '2'],\n 'const' => ['0', '2'],\n 'constants' => ['0'],\n 'functions' => ['0'],\n 'methods' => ['0', '1', '2'],\n 'releases' => ['0', '1', '2'],\n ];\n\n yield 'sphinx' => [\n 'classes' => ['0'],\n 'constants' => ['0', '1'],\n 'methods' => ['0', '1'],\n 'releases' => ['0', '1'],\n ];\n\n yield 'spl' => [\n 'classes' => ['50', '51', '52', '53', '54'],\n 'const' => ['50', '51', '52', '53'],\n 'functions' => ['50', '51', '52', '54', '72'],\n 'interfaces' => ['51'],\n 'methods' => [\n '50', '51', '52', '53', '54',\n '70',\n '82',\n ],\n 'releases' => array_merge(\n ['50', '51', '52', '53', '54'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'sqlite' => [\n 'classes' => ['2'],\n 'constants' => ['2'],\n 'functions' => ['2'],\n 'iniEntries' => ['2'],\n 'releases' => ['2'],\n ];\n\n yield 'sqlite3' => [\n 'classes' => ['53'],\n 'const' => ['80'],\n 'constants' => ['53', '71'],\n 'iniEntries' => ['53', '56'],\n 'methods' => ['53', '74', '80'],\n 'releases' => array_merge(\n ['53', '56'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'ssh2' => [\n 'constants' => ['0'],\n 'functions' => ['0', '1'],\n 'releases' => ['0', '1'],\n ];\n\n yield 'standard' => [\n 'classes' => [\n '40',\n '50',\n '70'\n ],\n 'constants' => [\n '40', '41', '43',\n '51', '52', '53', '54', '55', '56',\n '70', '71', '72', '73', '74',\n '80', '81'\n ],\n 'functions' => [\n '40', '41', '42', '43',\n '50', '51', '52', '53', '54', '55',\n '70', '71', '72', '73', '74',\n '80', '81', '82',\n ],\n 'iniEntries' => [\n '40',\n '53',\n '70', '71', '74'\n ],\n 'methods' => [\n '40',\n '50',\n ],\n 'releases' => array_merge(\n [\n '40', '41', '42', '43', '44',\n '50', '51', '52', '53', '54', '55', '56',\n ],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'stomp' => [\n 'classes' => ['0'],\n 'functions' => ['0', '1'],\n 'iniEntries' => ['0', '1'],\n 'methods' => ['0', '1'],\n 'releases' => ['0', '1', '2'],\n ];\n\n yield 'svn' => [\n 'classes' => ['0'],\n 'const' => ['1'],\n 'constants' => ['0', '1'],\n 'functions' => ['0', '1'],\n 'methods' => ['1'],\n 'releases' => ['0', '1', '2'],\n ];\n\n yield 'sync' => [\n 'classes' => ['1'],\n 'methods' => ['1'],\n 'releases' => ['1'],\n ];\n\n yield 'sysvmsg' => [\n 'classes' => ['80'],\n 'constants' => ['43', '52'],\n 'functions' => ['43', '53'],\n 'releases' => array_merge(\n [\n '43', '52', '53'\n ],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'sysvsem' => [\n 'classes' => ['80'],\n 'functions' => ['40', '41'],\n 'releases' => array_merge(\n [\n '40', '41'\n ],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'sysvshm' => [\n 'classes' => ['80'],\n 'functions' => ['40', '53'],\n 'releases' => array_merge(\n [\n '40', '53'\n ],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'tidy' => [\n 'classes' => ['0'],\n 'constants' => ['0', '74'],\n 'functions' => ['0', '50', '51'],\n 'iniEntries' => ['0'],\n 'methods' => ['0'],\n 'releases' => array_merge(\n [\n '0', '1', '50', '51'\n ],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'tokenizer' => [\n 'classes' => ['80'],\n 'constants' => ['42', '43', '50', '51', '53', '54', '55', '56', '70', '74', '80', '81'],\n 'functions' => ['42'],\n 'methods' => ['80'],\n 'releases' => array_merge(\n [\n '42', '43',\n '50', '51', '53', '54', '55', '56'\n ],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'uopz' => [\n 'constants' => ['2'],\n 'functions' => ['2', '5'],\n 'iniEntries' => ['2', '5', '6'],\n 'releases' => ['2', '5', '6'],\n ];\n\n yield 'uploadprogress' => [\n 'functions' => ['0'],\n 'iniEntries' => ['0'],\n 'releases' => ['0', '1', '2'],\n ];\n\n yield 'uuid' => [\n 'constants' => ['1'],\n 'functions' => ['1'],\n 'releases' => ['1'],\n ];\n\n yield 'varnish' => [\n 'classes' => ['0'],\n 'const' => ['0', '6'],\n 'constants' => ['0'],\n 'methods' => ['0', '1'],\n 'releases' => ['0', '1', '6'],\n ];\n\n yield 'wddx' => [\n 'functions' => ['40'],\n 'releases' => ['40'],\n ];\n\n yield 'xcache' => [\n 'constants' => ['1', '2'],\n 'functions' => ['1', '2'],\n 'iniEntries' => ['1', '2', '3'],\n 'releases' => ['1', '2', '3'],\n ];\n\n yield 'xdebug' => [\n 'constants' => ['2', '3'],\n 'functions' => ['1', '2', '3'],\n 'iniEntries' => ['1', '2', '3'],\n 'releases' => ['1', '2', '3'],\n ];\n\n yield 'xhprof' => [\n 'constants' => ['0'],\n 'functions' => ['0'],\n 'iniEntries' => ['0', '2'],\n 'releases' => ['0', '2'],\n ];\n\n yield 'xlswriter' => [\n 'classes' => ['1'],\n 'const' => ['1'],\n 'functions' => ['1'],\n 'methods' => ['1'],\n 'releases' => ['1'],\n ];\n\n yield 'xml' => [\n 'classes' => ['80'],\n 'constants' => ['40'],\n 'functions' => ['40'],\n 'releases' => array_merge(\n ['40'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'xmldiff' => [\n 'classes' => ['0'],\n 'methods' => ['0'],\n 'releases' => ['0', '1'],\n ];\n\n yield 'xmlreader' => [\n 'classes' => ['50'],\n 'const' => ['50'],\n 'methods' => ['50'],\n 'releases' => array_merge(\n ['50'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'xmlrpc' => [\n 'classes' => ['1'],\n 'functions' => ['41', '1'],\n 'releases' => ['41', '43', '1'],\n ];\n\n yield 'xmlwriter' => [\n 'classes' => ['51'],\n 'functions' => ['51', '52'],\n 'methods' => ['51'],\n 'releases' => array_merge(\n ['51', '52'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'xsl' => [\n 'classes' => ['50'],\n 'constants' => ['50', '51', '53'],\n 'methods' => ['50'],\n 'iniEntries' => ['53'],\n 'releases' => array_merge(\n ['50', '51', '53'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n\n yield 'yac' => [\n 'classes' => ['0'],\n 'constants' => ['0', '2'],\n 'iniEntries' => ['0', '2'],\n 'methods' => ['0', '2'],\n 'releases' => ['0', '2'],\n ];\n\n yield 'yaml' => [\n 'constants' => ['0'],\n 'functions' => ['0'],\n 'iniEntries' => ['0', '1'],\n 'releases' => ['0', '1', '2'],\n ];\n\n yield 'zip' => [\n 'classes' => ['1'],\n 'const' => ['1'],\n 'functions' => ['1'],\n 'methods' => ['1'],\n 'releases' => ['1'],\n ];\n\n yield 'zlib' => [\n 'classes' => ['80'],\n 'constants' => ['40', '54', '70'],\n 'functions' => ['40', '43', '54', '70', '72'],\n 'iniEntries' => ['40', '43'],\n 'releases' => array_merge(\n ['40', '43', '54'],\n self::PHP_RELEASES_7,\n self::PHP_RELEASES_8\n ),\n ];\n }", "title": "" }, { "docid": "6f7dc9ad0743621bbce83f3e5bb11996", "score": "0.52396524", "text": "function material_press_remove_script_version( $src ) {\n \t$parts = explode( '?ver', $src );\n \treturn $parts[0];\n }", "title": "" }, { "docid": "8e97ef3de36eb05f252b1eb7faebe2ba", "score": "0.52295536", "text": "function requirement_get_latest_version( $req_id ) {\n\n\tglobal $db;\n\t$tbl_req_ver\t\t\t\t= REQ_VERS_TBL;\n\t$f_req_ver_uid\t\t\t\t= $tbl_req_ver .\".\". REQ_VERS_UNIQUE_ID;\n\t$f_req_ver_req_id\t\t\t= $tbl_req_ver .\".\". REQ_VERS_REQ_ID;\n\t$f_req_ver_latest\t\t\t= $tbl_req_ver .\".\". REQ_VERS_LATEST;\n\n\t$q = \"SELECT\n\t\t $f_req_ver_uid\n\t\t FROM $tbl_req_ver\n\t\t WHERE $f_req_ver_req_id = '$req_id'\n\t\t AND $f_req_ver_latest = 'Y'\";\n\n\t//print\"$q<br>\";\n\n\treturn db_get_one($db, $q);\n}", "title": "" }, { "docid": "0d361bfcb95b4bff656b176455e74534", "score": "0.5229039", "text": "function getMinNucleusVersion() { return '250'; }", "title": "" } ]
0a5dfcb2e4d06f623af99be540b207ae
Check if user is type of one $group. If not, redirect the user
[ { "docid": "853f216235d0c32282e146ed2d8b28c7", "score": "0.6794911", "text": "public function authorized(array $group, string $redirect): ?bool\n {\n if (!is_array($group)) {\n $group = array($group);\n }\n if (in_array($this->session->userdata(\"user_type\"), $group)) {\n return true;\n }\n redirect(site_url($redirect));\n }", "title": "" } ]
[ { "docid": "b8d58ba5d1391bff0e60ae4e034130dd", "score": "0.655069", "text": "public function index()\n {\n $user = \\Auth::user();\n if ( $user->group->id == \"1\"){\n return redirect(\"home\"); \n }else{\n\n }\n \n }", "title": "" }, { "docid": "94c0ddc1fdc3059b3f2027f682b999fc", "score": "0.65095335", "text": "protected function accessCheck()\n {\n $app = WebApp::getInstance();\n\n $user = $app->getUser();\n\n //so that it makes it easy to write the authorizedGroups array\n $userGroup = str_replace(' ', '', strtolower($user->group_title));\n\n if(!in_array($userGroup, $this->getAuthorizedGroups())) {\n $app->redirect($app->get('uri.base.full'));\n }\n }", "title": "" }, { "docid": "bab72bfc481d6dce227efe133fd5bf86", "score": "0.63690114", "text": "function allow_access($group) {\n\t$allowed = \"no\";\n\tif (isset($_SESSION[\"group1\"]) || isset($_SESSION[\"user_name\"])) {\n\t\tif ($_SESSION[\"group1\"] == \"$group\" || $_SESSION[\"group2\"] == \"$group\" || $_SESSION[\"group3\"] == \"$group\" ||\n\t\t\t//\t$_SESSION[\"group1\"] == \"Administrators\" || $_SESSION[\"group2\"] == \"Administrators\" || \n\t\t\t// \t$_SESSION[\"group3\"] == \"Administrators\" ||\n\t\t\t$_SESSION[\"user_name\"] == \"$group\") {\n\t\t$allowed = \"yes\";\n\t} else {\n\t\t$allowed = \"no\";\n\t}\n\t}\n\treturn $allowed;\n}", "title": "" }, { "docid": "287b6ff8fc82ef466bcb7ee31514b3a8", "score": "0.6304467", "text": "function rm_check_group_access() {\n\t// exception: company directory/pages are ok\n\n\tif ( 'groups' !== bp_current_component() ) {\n\t\treturn;\n\t}\n\n\t// echo bp_groups_get_group_type( bp_get_current_group_id() );\n\n\tif ( bp_get_current_group_id() && 'company' !== bp_groups_get_group_type( bp_get_current_group_id() ) ) {\n\t\t// ok you are on a group page now\n\t\tif ( ! current_user_can( 'administrator' ) ) {\n\t\t\twp_safe_redirect( home_url() );\n\t\t\texit;\n\t\t}\n\t}\n\n\t// echo bp_current_component() . '-----';\n\t// echo bp_current_action() . '-----';\n\n}", "title": "" }, { "docid": "b8e4ac8696bf94fde264d408a8cb456e", "score": "0.6176919", "text": "function securityGroupCheck($group,$userGroups=NULL) {\n\t\n\tif (is_null($userGroups) && isset($_SESSION['groups'])) {\n\t\t$userGroups = $_SESSION['groups'];\n\t}\n\t\n\tif (is_null($userGroups) || is_null($group)){\n\t\treturn(FALSE);\n\t}\n\t\n\tforeach ($userGroups as $userGroup) {\n\t\tif ($userGroup == $group) {\n\t\t\treturn(TRUE);\n\t\t}\n\t}\n\t\n\treturn(FALSE);\n}", "title": "" }, { "docid": "d01c8f14178b34c35f8a63f0746cd2a1", "score": "0.6036721", "text": "function redirectUser($user)\n{\n if (!isset($_SESSION['type'])) {\n $user_type = \"\";\n }\n\n $user_type = $_SESSION['type']; // get user type from session\n if ($user != \"admin-staff\") { // check if the page is visible for admin and staff\n if ($user_type != $user) {\n // Show only admin pages\n echo \"<script>window.location.replace('index.php');</script>\";\n }\n }\n}", "title": "" }, { "docid": "7c9ff5c091166e235a21afbe5eef4575", "score": "0.6031612", "text": "function redirect($userType)\n\t{\n\n\t\tif ($userType == USER_EMPLOYEE)\n\t\t\tredirect('employee/home');\n\t\t\n\t\telseif ($userType == USER_COMPANY)\n\t\t\tredirect('company/home');\n\n\t}", "title": "" }, { "docid": "43ac5dc708c5218d0898bd4d7955265c", "score": "0.60302734", "text": "private function validate_group($group_id)\n\t{\n\t\t$current_user = Auth::user();\n\t\t//$group = DB::query(\"SELECT * FROM `group` g, student s,group_student gs WHERE g.group_id=\".$group_id.\" and s.student_id=\".$current_user->student()->first()->student_id.\" and s.student_id=gs.student_id and g.group_id=gs.group_id\");\n\t\t$group=Groupstudent::where('classgroup_id','=',$group_id)\n\t\t\t\t\t\t\t->where('student_id','=',$current_user->student_id);\n\t\t//var_export($group);\n\t\t//exit();\n\t\tif(count($group)==0){\n\t\t\t\n\t\t\treturn Redirect::to('/');\n\t\t}\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "88b80cfdd6485c5d7d4122428aafe9de", "score": "0.6003781", "text": "public function login_less($group,$user=NULL){ \n \n $user_login = NULL;\n if($group == ADMIN){\n $user_login = ADMIN;\n }\n else if($user !== NULL || $user !== ''){\n if($group == DOSEN){\n $dosen_res = $this->CI->{$this->_user_model_dosen}->get(\"dos_id = \".$user);\n $user_login = $dosen_res;\n }\n else if($group == MAHASISWA){\n $mahasiswa_res = $this->CI->{$this->_user_model_mahasiswa}->get(\"mhs_id = \".$user);\n $user_login = $mahasiswa_res;\n }\n else{\n echo json_encode(array(\"status\" => \"error\",\"message\" => \"Group cannot found\"));exit;\n }\n }\n else {\n echo json_encode(array(\"status\" => \"error\",\"message\" => \"User cannot be null\"));exit;\n }\n \n if($user_login !== NULL){\n $this->__set_login($user_login,$group);\n return array(\"success\" => true,\"message\" => \"Success Login\" ,\"redir_page\" => $this->_dashboard_page);\n }\n else {\n return array(\"success\" => false,\"messsage\" => \"User not found\");\n }\n }", "title": "" }, { "docid": "40b720b0d05bcb8a7fba672beff863bc", "score": "0.5924847", "text": "public function redirect_specific_user()\n{\n\tif(($this->session->userdata('user_type') !='') && $this->session->userdata('user_type')=='M' ){\n\t\t\tredirect('UserDashboard','refresh');\n\t\t}\n\tif(($this->session->userdata('user_type') !='') && $this->session->userdata('user_type')=='T' ){\n\t\t\tredirect('TrainerDashboard','refresh');\n\t\t}\n\tif(($this->session->userdata('user_type') !='') && $this->session->userdata('user_type')=='C' ){\n\t\t\tredirect('CompanyDashboard','refresh');\n\t\t}\n}", "title": "" }, { "docid": "c03de872dfcf96bdc2b8ef296da444a8", "score": "0.5919756", "text": "function rightType($module, $user_type){\n $valid = true;\n \n if($module === \"owner\" && $user_type !==\"Hostel Owner\"){\n $valid = false;\n }else if($module === \"admin\" && $user_type !==\"Admin\"){\n $valid = false;\n }\n \n return $valid;\n }", "title": "" }, { "docid": "dfc9fee9897082cd54b172efcc69d84a", "score": "0.5869303", "text": "function is_restricted_group( $group_slug, $object_type ) {\n // Built-in metaboxes: title, custom-fields, revisions, author, etc.\n return false;\n }", "title": "" }, { "docid": "fe3b30ea7d3df276cb68a1ecbfab4258", "score": "0.5865992", "text": "protected function ViewGroup()\n {\n $group = new Group();\n self::$com['group'] = $group->ViewGroup();\n if((isset($_POST['modifier'])) AND (isset($_POST['group'])))\n { \n $this->Redirect(ReelDir().\"adn/updategroup/\".$_POST['group']);\n }\n }", "title": "" }, { "docid": "ea434e2e2d9f89b51ddab107de8cfe28", "score": "0.5846265", "text": "public function view(User $user, Group $group)\n {\n return $user->account_id === $group->account_id && $user->can('groups.view');\n }", "title": "" }, { "docid": "127180b5aa7d662365e9cb1a4863722a", "score": "0.5845414", "text": "public static function CheckPermission($type) {\n if (( Yii::app()->user->isGuest)) {\n return false;\n }\n\n switch ($type) {\n case 'member':\n if (Yii::app()->user->group == 1)\n return true;\n break;\n\n default:\n return false;\n } // switch\n }", "title": "" }, { "docid": "184936da34a4ff30d30cc5fc8a6feff2", "score": "0.5834163", "text": "public function view(?User $user, Group $group)\n {\n if($group->visibility === 0)\n {\n return true;\n }\n if($group->visibility === 1 && Auth()->check())\n {\n return true;\n }\n\n $member = $group->members()->find(optional($user)->id);\n if($member != null)\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "f9068efe16b40c4489a9af6f284e99cb", "score": "0.5833488", "text": "public function UserType(){\n if ($_SESSION[\"status\"] == 1) {\n header(\"Location:../int/main/index.php?halaman=beranda\");\n }\n //if user role is 0, redirect to karyawan page\n if ($_SESSION[\"status\"] == 0) {\n header(\"Location:logout.php\");\n }\n }", "title": "" }, { "docid": "67078617f34cacef81920b7eb73e0bbe", "score": "0.5828381", "text": "function xcms_check_rights($groups)\n{\n $u = xcms_user();\n foreach ($groups as $v)\n {\n if ($v && $v[0] == \"#\")\n {\n // this is a group\n if ($u->check_rights(substr($v, 1), false))\n return true;\n }\n else\n {\n if ($u->login() == $v)\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "7abc53649dfa5a0561c179d63c60d933", "score": "0.5826339", "text": "public function handle($request, Closure $next, $group)\n {\n $allow = false; \n $usertype = $request->user()->usertype; \n if ($usertype==$group) {\n $request->session()->put('app.group',$group);\n $allow = true;\n } \n if(!$allow){\n throw new HttpException(503);\n }\n return $next($request);\n }", "title": "" }, { "docid": "30a26ae61cbedb99f85e1684d74e4d8d", "score": "0.58166736", "text": "public function view(User $user, group $group)\n {\n foreach($group->members as $member)\n {\n if($member->user == $user)\n {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "02fbe6fa27df4a2463c8629771e18cc0", "score": "0.58086044", "text": "function checkUser($class) {\n// echo $class; exit;\n if($class == 'dashboard' || $class == 'invoice' || $class == 'expenses' || $class == 'timetracking' || $class == 'setting' || $class == 'report2') {\n if (Session::getSession('meduser') == null) {\n header('location: ' . URL );\n }\n } \n }", "title": "" }, { "docid": "3e7581b24c9e5045a99c9df82982463c", "score": "0.5801235", "text": "public function cleanGroup($group) {\n global $ACT;\n if ($ACT == \"admin\" && $_REQUEST['page']==\"usermanager\") {\n if(!is_null($this->usermanager_auth))\n return $this->usermanager_auth->cleanGroup($group);\n } else {\n if(!is_null($this->chained_auth))\n return $this->chained_auth->cleanGroup($group);\n }\n return parent::cleanGroup($group);\n }", "title": "" }, { "docid": "9a12168bfabc2da40ed466785b1a3187", "score": "0.57979906", "text": "function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { \n // For security, start by assuming the visitor is NOT authorized. \n $isValid = False; \n\n // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. \n // Therefore, we know that a user is NOT logged in if that Session variable is blank. \n if (!empty($UserName)) { \n // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. \n // Parse the strings into arrays. \n $arrUsers = Explode(\",\", $strUsers); \n $arrGroups = Explode(\",\", $strGroups); \n if (in_array($UserName, $arrUsers)) { \n $isValid = true; \n \n\n// Or, you may restrict access to only certain users based on their username. \n if (in_array($UserGroup, $arrGroups)) { \n $isValid = true; \n \n\nif (($strUsers == \"\") && true) { \n $isValid = true; \n \n\n} \n return $isValid; \n}\n\n$MM_restrictGoTo = \"../registro.php\";\nif (!((isset($_SESSION['MM_Username'])) && (isAuthorized(\"\",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) { \n $MM_qsChar = \"?\";\n $MM_referrer = $_SERVER['PHP_SELF'];\n if (strpos($MM_restrictGoTo, \"?\")) $MM_qsChar = \"&\";\n if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) \n $MM_referrer .= \"?\" . $QUERY_STRING;\n $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . \"accesscheck=\" . urlencode($MM_referrer);\n header(\"Location: \". $MM_restrictGoTo); \n exit;\n}\n}\n}\n}", "title": "" }, { "docid": "12a6747ab87310dffbb1131e24fb1336", "score": "0.5780707", "text": "public function save(Groupuser $groupuser): bool;", "title": "" }, { "docid": "a213848bc39a217994557067681b0a14", "score": "0.5769997", "text": "function is_user_allowed() {\n global $conn;\n\n $user_result = $conn->query(\"SELECT type FROM users WHERE id =\" .USER_ID);\n $user = $user_result->fetch_object();\n $user_result->close();\n\n if ($user->type == 1) {\n $_SESSION['warning'] = \"You're not allowed to do this!\";\n header('Location: '.$_SERVER['REQUEST_URI']);\n exit;\n }\n}", "title": "" }, { "docid": "39c1cb37227ca0ed454bb4e2c5e2b153", "score": "0.5768553", "text": "function group_gatekeeper($forward = true) {\n\n\t\t$allowed = true;\n\t\t$url = '';\n\t\t\n\t\tif ($group = page_owner_entity()) {\n\t\t\tif ($group instanceof ElggGroup) {\n\t\t\t\t$url = $group->getURL();\n\t\t\t\tif (\n\t\t\t\t\t((!isloggedin()) && (!$group->isPublicMembership())) ||\n\t\t\t\t\t((!$group->isMember(get_loggedin_user()) && (!$group->isPublicMembership())))\n\t\t\t\t) $allowed = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($forward && $allowed == false) {\n\t\t\tforward($url);\n\t\t\texit;\n\t\t}\n\t\t\n\t\treturn $allowed;\n\t\t\n\t}", "title": "" }, { "docid": "1aa407ab8d8f25b974b72dd67df8760a", "score": "0.57634443", "text": "function checkUserGroup($user, $group) {\r\n\tinclude \"database.php\";\r\n\t$user = ($user == \"\") ? $_SESSION['userData']['uid'] : $user;\r\n\t$stmt = $pdo->prepare(\"SELECT * FROM user_group_members WHERE uid = ? AND gid = ?\");\r\n\t$stmt->execute([$user, $group]);\r\n\t$result = ($row = $stmt->fetch()) ? 1 : 0;\r\n\t$stmt = null;\r\n\treturn $result;\r\n}", "title": "" }, { "docid": "80cc7dad24c83bad42a4e4b24428ceb5", "score": "0.5742445", "text": "function check_permissions($type/*,$imgid*/)\n{\n /**\n * get data\n */ \n $query = $GLOBALS['db']->Execute(\"SELECT who, groups_exceptions, groups_additional \" .\t// , and_or, alb, albums\n \t\t\"FROM \".PREFIX.\"permissions WHERE type = '\".linpha_addslashes($type).\"'\");\n $data = $query->FetchRow(ADODB_FETCH_ASSOC);\n \n /**\n * check for group permissions\n */\n $passed_groups = false;\n if($data['who'] == 2) // everybody\n {\n $passed_groups = true;\n }\n else\n {\n /**\n * quick check for default values (empty groups)\n */\n if($data['who'] == 0 && // nobody\n (empty($data['groups_additional']) OR $data['groups_additional'] == ';'))\n {\n /**\n * nobody and no additional groups -> not possible -> disable\n */\n $passed_groups = false;\n }\n elseif($data['who'] == 1 && $GLOBALS['passed'] && // only logged in (not anonymous)\n (empty($data['groups_exceptions']) OR $data['groups_exceptions'] == ';'))\n {\n /**\n * logged in (not anonymous) and no exceptions -> valid\n */\n $passed_groups = true;\n }\n else\n {\n /**\n * get groups\n */\n $query = $GLOBALS['db']->Execute(\"SELECT id, groups FROM \".PREFIX.\"groups\");\n while($groups_data = $query->FetchRow())\n {\n $groups[$groups_data['id']] = $groups_data['groups'];\n }\n \n /**\n * get array with groups which current user is member of\n */\n $my_groups = Array();\n if(isset($_SESSION['user_groups']))\n {\n $group_member_of = explode_and_slice($_SESSION['user_groups'],';');\n foreach($group_member_of AS $value)\n {\n if( isset($groups[$value]) )\n {\n $my_groups[] = $value;\n }\n }\n }\n \n if($data['who'] == 0) // nobody\n {\n /**\n * need to be in one of $groups_additional\n */\n \n $groups_additional = explode_and_slice($data['groups_additional'],';');\n $array = array_intersect($my_groups,$groups_additional);\n if(count($array) > 0)\n {\n $passed_groups = true;\n }\n }\n elseif($data['who'] == 1) // only logged in (not anonymous)\n {\n /**\n * need to be logged in and not to be in one of the $groups_exceptions\n */\n \t\t\tif(!isset($my_groups)) : $my_groups = array(); endif; //prevent notice\n \t\t\t\n $groups_exceptions = explode_and_slice($data['groups_exceptions'],';');\n $array = array_intersect($my_groups,$groups_exceptions);\n if($GLOBALS['passed'] && count($array) == 0)\n {\n $passed_groups = true;\n }\n }\n }\n }\n\n /**\n * if the condition is OR and $passed_groups = true the album check is waste time\n \n if($data['and_or'] == 1 && $passed_groups)\n {\n return true;\n }\n \n /**\n * check for albums permissions\n \n\n /**\n * check if there selected albums\n \n $passed_albums = false;\n if(empty($data['albums']) OR $data['albums'] == '//')\n {\n $empty_data = true;\n }\n else\n {\n $empty_data = false;\n }\n \n if($data['alb'] == 0) // without\n {\n if($empty_data)\n {\n $passed_albums = true;\n $need_detail_check = false;\n }\n else\n {\n $need_detail_check = true;\n }\n }\n elseif($data['alb'] == 1) // only\n {\n if($empty_data)\n {\n $passed_albums = false;\n $need_detail_check = false;\n }\n else\n {\n $need_detail_check = true;\n }\n }\n \n if($need_detail_check)\n {\n /**\n * at basket_print, basket_download, basket_mail, it is not imgid based, but\n\t\t* albid\n * only for javascript menu\n * in basket_build_*.php each imgid is checked, because the albid could\n * be changed from a user\n \n $pos = strpos($imgid,'basket_');\n if($pos !== false)\n {\n $stage = get_stage();\n $albid = substr($imgid,7);\n $query = $GLOBALS['db']->Execute(\"SELECT path FROM \".PREFIX.$stage.\"_lev_album \".\n \"WHERE id = '\".linpha_addslashes($albid).\"'\");\n $img_data = $query->FetchRow(ADODB_FETCH_ASSOC);\n $path = $img_data['path'];\n }\n else\n {\n $query = $GLOBALS['db']->Execute(\"SELECT prev_path FROM \".PREFIX.\"photos \".\n \"WHERE id = '\".linpha_addslashes($imgid).\"'\");\n $img_data = $query->FetchRow(ADODB_FETCH_ASSOC);\n $path = $img_data['prev_path'];\n }\n \n /**\n * remove leading 'albums/'\n \n\t $pos = strpos($path,'/');\n\t $path = substr($path,$pos+1);\n\n \n $array_albums = explode_and_slice($data['albums'],'//');\n \n /**\n * @todo if $img_data['prev_path'] is folder1/subfolder1 and $array_albums[1] = folder1\n * $passed_albums should also be true\n \n if(in_array($path,$array_albums))\n {\n if($data['alb'] == 1) // only\n {\n $passed_albums = true;\n }\n }\n else\n {\n if($data['alb'] == 0) // without\n {\n $passed_albums = true;\n }\n }\n }\n\n /**\n * take care of and/or\n \n if($data['and_or'] == 0) // and\n {\n if($passed_groups AND $passed_albums)\n {\n return true;\n }\n }\n else // or\n {\n if($passed_groups OR $passed_albums)\n {\n return true;\n }\n }\n */\n if( $passed_groups )\n {\n return true;\n } \n return false;\n}", "title": "" }, { "docid": "93ce36ddfbdd0feb1991bb6fefbc98e1", "score": "0.5736443", "text": "function groupextended_user_join_event_listener($event, $object_type, $object) {\n\n $group = $object['group'];\n $user = $object['user'];\n if($user instanceof ElggUser){\n return true;\n }\n\n $user = $user->getOwner();\n if(!$group->isMember($user)){\n $acl = $group->group_acl;\n add_user_to_access_collection($user, $acl);\n }\n return false;\n}", "title": "" }, { "docid": "cbd7a986d5457b680f4701c4ad7a1ee4", "score": "0.57166445", "text": "public function show(Group $group)\n {\n return redirect('groups');\n }", "title": "" }, { "docid": "72ab08d4ec32295990dd98f417b52c53", "score": "0.56842864", "text": "private function updateUserPermissions()\n {\n if ($this->is_update_permission == 1) {\n if ($this->typ == MitgliedTypEnum::PASSIVMITGLIED || $this->typ == MitgliedTypEnum::PASSIVMITGLIED_DEAKTIVIERT) {\n $groupId = $this->getGroupIdByTyp($this->typ);\n if ($groupId === false) {\n return false;\n }\n\n $groupIdEmail = $this->getGroupIdByName(\"keine Email-Adresse\");\n if ($groupIdEmail === false) {\n return false;\n }\n\n $db = JFactory::getDBO();\n\n // Zunächst alle Rechte des Users löschen -> Gruppe \"keine Email-Adresse\" bleibt bestehen\n $query = \"DELETE FROM #__user_usergroup_map WHERE user_id = \" . $this->userid . \" AND group_id != \" . $groupIdEmail;\n $db->setQuery($query);\n if (!$db->query()) {\n $this->setError($db->getErrorMsg());\n return false;\n }\n\n // Nun das Passivmitglied-Recht setzen\n $query = \"INSERT INTO #__user_usergroup_map (user_id, group_id) VALUES (\" . $this->userid . \",\" . $groupId . \")\";\n $db->setQuery($query);\n if (!$db->query()) {\n $this->setError($db->getErrorMsg());\n return false;\n }\n }\n }\n return true;\n }", "title": "" }, { "docid": "e99d08f420751b9b03bffa442873dc49", "score": "0.56601447", "text": "protected function verify_auth($group = 'members', $redirect_url = NULL)\n\t{\n\t\tif ( !$this->ion_auth->logged_in() || !$this->ion_auth->in_group($group) )\n\t\t{\n\t\t\tif ( $redirect_url==NULL )\n\t\t\t\t$redirect_url = $this->mConfig['login_url'];\n\t\t\t\n\t\t\tredirect($redirect_url);\n\t\t}\n\t}", "title": "" }, { "docid": "1e40284916100cfb796f6d34027e23b3", "score": "0.565446", "text": "function in_group($group)\n{\n\tif(!isset($_SESSION[\"user_groups\"]))\n\t{\n\t\treturn false;\n\t}\n\n\t/**\n\t* create array with all groups, user is member of\n\t*/\n\t$group_member_of=explode_and_slice($_SESSION[\"user_groups\"],\";\");\n\n\t/**\n\t* admin's have permissions for all groups\n\t*/\n\t$query = $GLOBALS['db']->Execute(\"SELECT ID FROM \".PREFIX.\"groups \".\n\t\t\"WHERE groups = 'admin'\");\n\t$data = $query->FetchRow();\n\t$group_id = $data[0];\n\t\n\tif(in_array($group_id, $group_member_of)) {\n\t\treturn true;\n\t}\n\n\n\t$group_id = get_group_id_from_name($group);\n\n\tif(in_array($group_id, $group_member_of)) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "281e865c96a8910616837bc87c9c0bdb", "score": "0.56462985", "text": "function bboss_bp_doc_redirect_to_group() {\n\tif ( !is_singular( 'bp_doc' ) )\n\t\treturn;\n\n\tif ( bp_docs_is_doc_edit() || bp_docs_is_doc_history() )\n\t\treturn;\n\n\tif ( function_exists( 'bp_is_active' ) && bp_is_active( 'groups' ) ) {\n\t\t$doc_group_ids\t = bp_docs_get_associated_group_id( get_the_ID(), false, true );\n\t\t$doc_groups\t\t = array();\n\t\tforeach ( $doc_group_ids as $dgid ) {\n\t\t\t$maybe_group = groups_get_group( 'group_id=' . $dgid );\n\n\t\t\t// Don't show hidden groups if the\n\t\t\t// current user is not a member\n\t\t\tif ( isset( $maybe_group->status ) && 'hidden' === $maybe_group->status ) {\n\t\t\t\t// @todo this is slow\n\t\t\t\tif ( !current_user_can( 'bp_moderate' ) && !groups_is_user_member( bp_loggedin_user_id(), $dgid ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !empty( $maybe_group->name ) ) {\n\t\t\t\t$doc_groups[] = $maybe_group;\n\t\t\t}\n\t\t}\n\n\t\tif ( !empty( $doc_groups ) && count( $doc_groups ) == 1 ) {\n\t\t\t//the doc is asssociated with one group\n\t\t\t//redirect\n\t\t\t$group_link\t = bp_get_group_permalink( $doc_groups[ 0 ] );\n\t\t\t$permalink\t = trailingslashit( $group_link ) . bp_docs_get_docs_slug() . '/?doc_id=' . get_the_ID();\n\n\t\t\twp_redirect( $permalink );\n\t\t\texit();\n\t\t}\n\t}\n}", "title": "" }, { "docid": "0aa9b0f7181af8d8ae84f84832c4a699", "score": "0.5627885", "text": "function user_ingroup($user,$group){\n\t\tif (($user!=NULL) && ($group!=NULL)){\n\t\t\tif ($this->_ad_username!=NULL){ $this->rebind(); } //bind as a another account if necessary\n\n\t\t\tif ($this->_bind){\n\t\t\t\t$groups=$this->user_groups($user,array(\"memberof\"));\n\t\t\t\tif (in_array($group,$groups)){ return true; }\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e3ff7655f32017d691c114f51c4c7ef6", "score": "0.5608487", "text": "public function checkGroup($action) {\n\t\t$id = $this->Session->read('Auth.User.Group.id');\n\n\t\tif (empty($id)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->Acl->check(['Group' => ['id' => $id]], $action);\n\t}", "title": "" }, { "docid": "11130baa04249f0cd807d1a2b2daa4a4", "score": "0.560677", "text": "public function GroupId($id) { \r\n $user = new CMUser();\r\n //echo \"<br><br>This id the id: \".$id ;\r\n $g= $user->findGrupWithID($id);\r\n $form = new CFormGroups($this, $g[0] );\r\n if($form->Check() === false) {\r\n $this->AddMessage('notice', 'Some fields did not validate and the form could not be processed.');\r\n $this->RedirectToController('groupId');\r\n }\r\n $this->views->SetTitle('Group Managing');\r\n $this->views->AddInclude(__DIR__ . '/group.tpl.php', array(\r\n 'profile_form'=>$form->GetHTML(),\r\n 'goBackAdmin' => $this->CreateUrl('user','profile', null),\r\n ));\r\n}", "title": "" }, { "docid": "7aa03cb46b1cd2b5873cca4e5c398e68", "score": "0.5581394", "text": "function group_gatekeeper($forward = true) {\n\n\t$page_owner_guid = elgg_get_page_owner_guid();\n\tif (!$page_owner_guid) {\n\t\treturn true;\n\t}\n\t$visibility = ElggGroupItemVisibility::factory($page_owner_guid);\n\n\tif (!$visibility->shouldHideItems) {\n\t\treturn true;\n\t}\n\t\n\tif ($forward) {\n\t\t// only forward to group if user can see it\n\t\t$group = get_entity($page_owner_guid);\n\t\t$forward_url = $group ? $group->getURL() : '';\n\n\t\t// subsite manager\r\n\t\t// allows to override group gatekeeper by plugins\r\n\t\t$allowed = elgg_trigger_plugin_hook(\"gatekeeper\", \"group\", array(\"group\" => $group, \"user\" => elgg_get_logged_in_user_entity()), false);\r\n\t\tif($allowed === true) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\n\t\tif (!elgg_is_logged_in()) {\n\t\t\t$_SESSION['last_forward_from'] = current_page_url();\n\t\t\t$forward_reason = 'login';\n\t\t} else {\n\t\t\t$forward_reason = 'member';\n\t\t}\n\n\t\tregister_error(elgg_echo($visibility->reasonHidden));\n\t\tforward($forward_url, $forward_reason);\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "3443a03690628d1f125f54e7bee618a0", "score": "0.5563855", "text": "public function removeuserfromgroupAction() {\n if ($this->getRequest()->isPost()) {\n $userId = $_POST['userId'];\n $groupId = $_POST['groupId'];\n $group = $this->_helper->db->getTable('InciteGroup')->findGroupById($groupId);\n\n //prevent non group owners from changing people's privilege levels to banned or added\n if (isset($group) && ($_SESSION['Incite']['USER_DATA']['id'] == $userId || $_SESSION['Incite']['USER_DATA']['id'] == $group['creator_id'])) {\n $groupuser = $this->_helper->db->getTable(\"InciteGroupsUsers\")->findGroupUserByUserAndGroupIds($userId, $groupId);\n if (isset($groupuser)) {\n $groupuser->delete();\n }\n echo json_encode('true');\n }\n else {\n echo \"false\";\n } \n }\n }", "title": "" }, { "docid": "b8f77ad753ca824cc6bb1cf19f363fa9", "score": "0.55595154", "text": "function CheckAccess2($userType){\n\t\t//\n\t\tif($userType==0)\n\t\t{\n\t\t\techo $_SESSION[\"mail\"];\n\t\t}\n\t\telse if($userType==1)\n\t\t{\n\t\t\techo $_SESSION[\"mail1\"];\n\t\t}\n\t\telse if($userType==2){\n\t\t\t\n\t\t}\n\n\t}", "title": "" }, { "docid": "d641754b0d87f1102da0813729fa02b8", "score": "0.5554984", "text": "function group_tools_check_domain_based_group(ElggGroup $group, ElggUser $user = null) {\r\n\t\r\n\tif (elgg_get_plugin_setting('domain_based', 'group_tools') !== 'yes') {\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tif (!$group instanceof ElggGroup) {\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tif (!$user instanceof ElggUser) {\r\n\t\t// default to current user\r\n\t\t$user = elgg_get_logged_in_user_entity();\r\n\t}\r\n\t\r\n\tif (!$user instanceof ElggUser) {\r\n\t\treturn false;\r\n\t}\r\n\t\t\r\n\t$domains = $group->getPrivateSetting('domain_based');\r\n\tif (empty($domains)) {\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\t$domains = explode('|', strtolower(trim($domains, '|')));\r\n\t\r\n\tlist(,$domain) = explode('@', strtolower($user->email));\r\n\t\r\n\treturn in_array($domain, $domains);\r\n}", "title": "" }, { "docid": "c9305bf510e70f4ba9e7e17a3ab699cc", "score": "0.5528455", "text": "function groups_is_user_admin( $user_id, $group_id ) {\r\n\treturn BP_Groups_Member::check_is_admin( $user_id, $group_id );\r\n}", "title": "" }, { "docid": "1cf3aceb0554958c823110fc9adf68bd", "score": "0.55279976", "text": "function sysIsUserGroupUser() {\n sysGetSessionId(); // Call Session Start if a window will be opened outside Main window\n if(@$_SESSION[SysConstants::sysSessionGroupId] && @$_SESSION[SysConstants::sysSessionFireDeptId] == -1)\n {\n return true;\n }\n \n return false;\n}", "title": "" }, { "docid": "afa0ae4c79bb1d4d640dfa00f804fc42", "score": "0.5520382", "text": "function promoteUser() {\n $group = $this->loadGroup();\n if(!$group) {\n return false;\n }\n\n $user =& JFactory::getUser();\n $group_id = $this->group_id;\n $group_id = $group->$group_id;\n\n if(!$this->isAdmin($group_id, $user->id)) {\n JError::raiseError(403, JText::_('Access Forbidden'));\n }\n\n $db = & JFactory::getDBO();\n $query = \"UPDATE \".$this->users_db.\" SET admin = 1 \".\n \"WHERE user_id = \".$user->id.\" and \".$this->group_id.\" = \".$group_id;\n if($db->query($query)) {\n return true;\n }\n\n JError::raiseWarning(500, JText::_('Unable to promote...'));\n return false;\n }", "title": "" }, { "docid": "7749b5872aed0b70fa2ac0f167974dc7", "score": "0.55125767", "text": "function group_tools_can_assign_group_admin(ElggGroup $group) {\r\n\t\r\n\tif (!$group instanceof ElggGroup) {\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\t$user_guid = elgg_get_logged_in_user_guid();\r\n\tif (empty($user_guid)) {\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tif (!group_tools_multiple_admin_enabled()) {\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tif (($group->owner_guid === $user_guid) || elgg_is_admin_logged_in()) {\r\n\t\treturn true;\r\n\t} elseif (($group->group_multiple_admin_allow_enable === 'yes') && $group->canEdit($user_guid)) {\r\n\t\treturn true;\r\n\t}\r\n\t\r\n\treturn false;\r\n}", "title": "" }, { "docid": "c8bf2b5e8b8dc4a6587f399790adf0ba", "score": "0.54986125", "text": "public function canHaveGroups()\n {\n return in_array($this->type, [\n TypeGuesser::TYPE_GROUP,\n TypeGuesser::TYPE_USER\n ]);\n }", "title": "" }, { "docid": "07166b6e5aec2caab5dde799c7f58420", "score": "0.5496916", "text": "public function checkFrontendPagePermissions($context) {\n\n\t\treturn;\n\n\t\t$isLoggedIn = false;\n\t\t$errors = array();\n\n\t\t// Checks $_REQUEST to see if a Member Action has been requested,\n\t\t// member-action['login'] and member-action['logout']/?member-action=logout\n\t\t// are the only two supported at this stage.\n\t\tif(is_array($_REQUEST['member-action'])){\n\t\t\tlist($action) = array_keys($_REQUEST['member-action']);\n\t\t} else {\n\t\t\t$action = $_REQUEST['member-action'];\n\t\t}\n\n\t\t$env = $context['page']->Env();\n\n\t\tif (is_array($env['url']) && !array_key_exists('group', $env['url']))\n\t\t\treturn;\n\n\t\t$groupHandle = $env['url']['group'];\n\n\n\t\ttry{\n\t\t\tif (!$groupHandle) \n\t\t\t\t// no group handle provided\n\t\t\t\tthrow new FrontendPageNotFoundException;\n\t\t} catch (FrontendPageNotFoundException $e) {\n\t\t // Work around. This ensures the 404 page is displayed and\n\t\t\t// is not picked up by the default catch() statement below\n\t\t\tFrontendPageNotFoundExceptionHandler::render($e);\n\t\t} \n\n\t\t$section_id = (string)Symphony::Configuration()->get('section_id', 'group_lock');\n\t\t$fieldID = $this->getMainSectionPrimaryFieldId();\n\n\t\t$joins .= \" LEFT JOIN `tbl_entries_data_{$fieldID}` AS `group_lock_{$fieldID}` ON (`e`.`id` = `group_lock_{$fieldID}`.entry_id)\";\n\t\t$where .= \" AND (`group_lock_{$fieldID}`.handle = ('{$groupHandle}') )\";\n\n\t\t$groupEntry = current(EntryManager::fetch(null,$section_id,1,0,$where,$joins));\n\n\t\ttry{\n\t\t\tif (!$groupEntry) \n\t\t\t\t//group not found / incorrect\n\t\t\t\tthrow new FrontendPageNotFoundException;\n\t\t} catch (FrontendPageNotFoundException $e) {\n\t\t // Work around. This ensures the 404 page is displayed and\n\t\t\t// is not picked up by the default catch() statement below\n\t\t\tFrontendPageNotFoundExceptionHandler::render($e);\n\t\t} \n\n\n\t\t// Check if user is already set to view the group\n\t\t$currentGroupID = $groupEntry->get('id');\n\n\t\t//automatically logged in if the cooke group matches the group in the param\n\t\t$this->canAccess = $currentGroupID == $this->getCurrentGroup();\n\n\t\t// Logout\n\t\tif(trim($action) == 'logout') {\n\t\t\t$this->setCurrentGroup(null);\n\t\t}\n\t\t\t\n\t\t// Login\n\t\telse if(trim($action) == 'login' && !is_null($_POST['fields'])) {\n\n\t\t\tif($this->login($_POST['fields'],$currentGroupID)) {\n\t\t\t\t$this->canAccess = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->_failed_login_attempt = true;\n\t\t\t}\n\t\t}\n\n\t\tif (Symphony::Author() instanceof Author){\n\t\t\t$id_groups = Symphony::Database()->fetchCol('id_group', 'SELECT `id_group` FROM `tbl_group_lock_authors` WHERE `id_author` = '. Symphony::Author()->get('id') .';');\n\t\t\n\t\t\t// If author has access to group let him access\n\t\t\tif ( $id_groups && in_array($currentGroupID, $id_groups))\n\t\t\t\t$this->canAccess = true;\n\n\t\t\t// If Manager / Developer is logged in, return, as Developers / Managers\n\t\t\t// should be able to access every page.\n\t\t\tif( $this->superseedsPermissions()) \n\t\t\t\t$this->canAccess = true;\n\t\t}\n\n\t\tif ($this->canAccess){\n\t\t\t$this->setCurrentGroup($currentGroupID);\n\t\t\treturn;\n\t\t}\n\n\t\t$protected = in_array('protected', $context['page_data']['type']);;\n\t\t// if page type == protected then 403\n\n\t\tif($protected) {\n\n\t\t\t// User has no access to this page, so look for a custom 403 page\n\t\t\tif($row = PageManager::fetchPageByType('403')) {\n\t\t\t\t$row['type'] = PageManager::fetchPageTypes($row['id']);\n\t\t\t\t$row['filelocation'] = PageManager::resolvePageFileLocation($row['path'], $row['handle']);\n\n\t\t\t\t$context['page_data'] = $row;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// No custom 403, just throw default 403\n\t\t\t\tFrontend::instance()->throwCustomError(\n __('You do not have access to view this page.'),\n __('Forbidden'),\n Page::HTTP_STATUS_FORBIDDEN\n );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d70fb42a11cc3039bd641fd34a62d67f", "score": "0.5458019", "text": "function isMemberOf($group) {\n global $demo;\n if (isset($demo)) {\n return ( in_array( $this->userName, array_keys($demo) ) );\n }\n return in_array($group, $this->getUserGroups());\n }", "title": "" }, { "docid": "91fa7106b9a9244a460cc27706b48acd", "score": "0.5455839", "text": "public function needtype($type)\n\t{\n\t\tif ($this->type['type'] != $type)\n\t\t{\n\t\t\t$this->redirect();\n\t\t}\n\t}", "title": "" }, { "docid": "bc3d9aa442ce36ab8fd2a3d57f924640", "score": "0.5447838", "text": "public function addGroup($group) {\n if(!is_null($this->usermanager_auth) && $this->canDo('addGroup') ) {\n return $this->usermanager_auth->addGroup($group);\n } else {\n msg(\"authorisation method does not support independent group creation\", -1);\n return false;\n }\n }", "title": "" }, { "docid": "0a74e3357bfd2684f79905f5b659e728", "score": "0.544758", "text": "function loginPost() {\n if ($this->session->userType == \"Patient\") {\n redirect(base_url() . 'ElderlyController/index');\n } else if($this->session->userType == \"Caregiver\") { \n redirect(base_url() . 'CaregiverController/index');\n }\n }", "title": "" }, { "docid": "0a55bee51fdf10d154dc1c4edb3ff720", "score": "0.54427993", "text": "public function checkRoleTypeAuthentication($type){\n\t\tif (!Session::userIsLoggedIn() || Session::get(Session::SESSION_USER_ACCOUNT_TYPE) != $type) {\n\t\t\t// ... then treat user as \"not logged in\", destroy session, redirect to login page\n\t\t\tSession::destroy();\n\t\n\t\t\t$this->redirectHome();\n\t\n\t\t\t// to prevent fetching views via cURL (which \"ignores\" the header-redirect above) we leave the application\n\t\t\t// the hard way, via exit(). @see https://github.com/panique/php-login/issues/453\n\t\t\t// this is not optimal and will be fixed in future releases\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "d1fdd0468e9b19d79cf8ded133c5d8fe", "score": "0.54377574", "text": "public function auth($group)\n {\n $slim = $this->slim;\n\n return function () use ($group, $slim) {\n session_start();\n\n if (true === $group) {\n return true;\n }\n\n if (!isset($_SESSION['user']) || !in_array($group, $_SESSION['user']['groups'])) {\n $slim->log->info('User not member of group: '.$group);\n\n // Redirect to loginpage\n $slim->redirect($slim->request->getRootUri().'/login');\n\n exit;\n }\n\n // Otherwise, everything is fine\n return true;\n };\n }", "title": "" }, { "docid": "5a33e7ff8d66d3dffeaf188503dd367f", "score": "0.543468", "text": "public function isAuthorized($user){\n /*\n * \n 1 \tAdmin\n 2 \tOfficer / Manager\n 3 \tRead Only\n 4 \tStaff\n 5 \tUser / Operator\n 6 \tStudent\n 7 \tLimited\n */\n \n //managers can add / edit\n if (in_array($this->request->action, ['view','delete','add','edit'])) {\n if ($user['group_id'] <= 5) {\n return true;\n }\n }\n \n \n //Admins have all\n return parent::isAuthorized($user);\n }", "title": "" }, { "docid": "f217682504fa2616a12ae27657780ca7", "score": "0.5433145", "text": "public function index(Group $group)\n {\n if ( Auth::user()->middleware == '2t' ) {\n\n $teacherId = Auth::user()->native_teacher_id;\n $teacherOwnedGroups = $this->teacherOwnedGroups($group, $teacherId);\n\n if ( $teacherOwnedGroups->count() < 1 ) {\n return view('master', compact('teacherId')); // with error -> you haven't any groups\n }\n $groups = $teacherOwnedGroups->get();\n\n return view('group.index', compact('groups'));\n\n }\n\n if (Auth::user()->middleware == '3c') {\n\n $currentCustomerGroups = Customer::where('id', Auth::user()->native_customer_id)->first()->groups;\n $groups = $currentCustomerGroups;\n\n return view('group.index', compact('groups'));\n }\n\n $groups = $group->all();\n\n return view('group.index', compact('groups'));\n }", "title": "" }, { "docid": "52bda3c1f199553d190e69b5937fbc23", "score": "0.54289085", "text": "public function UserIntoGroup($idUser) { \r\n $form = new CFormUserIntoGroup($this, $idUser );\r\n if($form->Check() === false) {\r\n $this->AddMessage('notice', 'Some fields did not validate and the form could not be processed.');\r\n $this->RedirectToController('UserIntoGroup');\r\n }\r\n $this->views->SetTitle('Insert into Group');\r\n $this->views->AddInclude(__DIR__ . '/UserIntoGroup.tpl.php', array(\r\n 'profile_form'=>$form->GetHTML(),\r\n 'goBackAdmin' => $this->CreateUrl('user','profile', null),\r\n ));\r\n}", "title": "" }, { "docid": "d2d5a0d3c943728241a817aa55499142", "score": "0.5423461", "text": "public function create($userGroup)\n {\n try{\n $role = $userGroup->getRole();\n $username = $userGroup->getUsername();\n $userId = $userGroup->getUsers_id();\n $groupId = $userGroup->getGroups_id();\n \n $stmt = $this->db->prepare(\"INSERT INTO USER_GROUPS (USERNAME,ROLE, USERS_ID, GROUPS_ID) VALUES (:n, :role, :ui, :group)\");\n \n $stmt->bindParam(':group', $groupId);\n $stmt->bindParam(':role', $role);\n $stmt->bindParam(':n', $username);\n $stmt->bindParam(':ui', $userId);\n $stmt->execute();\n \n // if number of affected rows within the database is greater than 0, meaning user got successfully entered\n if ($stmt->rowCount() == 1) {\n // return true\n return true;\n } // else return false\n else\n return false;\n }catch (Exception $e2) {\n // display our Global Exception Handler page\n return view(\"error\");\n }\n \n }", "title": "" }, { "docid": "04d90bbc47e28437fb65dc25b172025d", "score": "0.54199624", "text": "public function allow() {\r\n\t\tif (Typeframe::User()->get('usergroupid') == TYPEF_ADMIN_USERGROUPID) return true;\r\n\t\tif ($this->_page->pageid()) {\r\n\t\t\t$pageperm = new Model_PagePerm();\r\n\t\t\t$pageperm->where('pageid = ?', $this->_page->pageid());\r\n\t\t\tif ($pageperm->count() == 0) return true;\r\n\t\t\t$pageperm->where('usergroupid = ? OR usergroupid = 0', Typeframe::User()->get('usergroupid'));\r\n\t\t\treturn ($pageperm->count() > 0);\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "cd5e3887de326cf4efe0459c26fc7d02", "score": "0.5416347", "text": "function checkModulePermission($permission, $type, User $user = null): bool\n{\n if (!auth()->check() && !$user) {\n return false;\n }\n\n if (auth()->check()) {\n return auth()->user()->isAdmin() ? true : auth()->user()->roles->groupPermission()->ofAccess(\n strtolower($permission),\n $type\n )->exists();\n } else {\n return $user->roles->groupPermission()->ofAccess(strtolower($permission), $type)->exists();\n }\n}", "title": "" }, { "docid": "3ebda7001364f6ab47dcb1252e6dace8", "score": "0.54149175", "text": "function isStudent(){\n if(Auth::user()->type == \"student\"){\n return true;\n }\n else{\n false;\n }\n}", "title": "" }, { "docid": "34f22031a09f38db4c52d09c6f55272c", "score": "0.5410676", "text": "public static function editGroup()\n {\n if (!Input::exists('name')) {\n Check::addUserError('You must specify a name');\n return false;\n }\n if (!Check::dataTitle(Input::exists('name'))) {\n Check::addUserError('invalid group name');\n return false;\n }\n if (!Input::exists('pageLimit')) {\n Check::addUserError('You must specify a pageLimit');\n return false;\n }\n if (!Check::token()) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "4ea9bda67eb2157295040aca37ef276e", "score": "0.5401494", "text": "public function storejoinGroup(Request $request)\n {\n $user = \\App\\Models\\User::find($request->user_id);\n $check = $user->joinGroup($request->group_id);\n return $check \n ? redirect()->route('dashboard')->withSuccess('Set user join group')\n : back()->withInput();\n }", "title": "" }, { "docid": "d63e417c2a0d1715e0fc9684fb449da6", "score": "0.539626", "text": "function check_access_id($usergroupid=0){\n\t\t$usergroupid = explode(',', $usergroupid);\n\t\t$count = 0;\n\t\tforeach ($usergroupid as $d) {\n\t\t\tif($d==$this->session->userdata('usergroupid')){\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\t\tif($count>0){\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "94a6a296f37ccb937b47f59e3bb82714", "score": "0.53811014", "text": "function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { \n // Untuk keamanan, asumsikan bahwa visitor GAK dikenal \n $isValid = False; \n\n // Saat visitor udah login ke situs ini, variabel Session MM_Username nge-set sama dengan usernamenya.. \n // Jadinya, kita tahu kalau user GAK login jika variabel Session blank. \n if (!empty($UserName)) { \n // Selain bisa login, lu boleh ngakses ke ganya beberapa user berdasarkan ID saat mereka login.\n // Parse string ke arrays.\n $arrUsers = Explode(\",\", $strUsers); \n $arrGroups = Explode(\",\", $strGroups); \n if (in_array($UserName, $arrUsers)) { \n $isValid = true; \n } \n // Atau, lu bisa ngebuat restrict access hanya ke beberapa user berdasarkan username.\n if (in_array($UserGroup, $arrGroups)) { \n $isValid = true; \n } \n if (($strUsers == \"\") && true) { \n $isValid = true; \n } \n } \n return $isValid; \n}", "title": "" }, { "docid": "400ba66bb09fe24d1d23629aba96844b", "score": "0.5354246", "text": "function rm_check_member_directory_access() {\n\t// exception: company directory/pages are ok\n\n\tif ( 'members' !== bp_current_component() ) {\n\t\treturn;\n\t}\n\n\t$bp = buddypress();\n\n\tif ( ! empty( $bp->current_item ) || ! empty( $bp->current_action ) ) {\n\t\treturn;\n\t}\n\n\t// echo bp_groups_get_group_type( bp_get_current_group_id() );\n\n\tif (! is_user_logged_in() ) {\n\t\t// ok you are on a group page now\n\t\twp_safe_redirect( home_url( 'upgrade' ) );\n\t\texit;\n\t}\n\n\t// echo bp_current_component() . '-----';\n\t// echo bp_current_action() . '-----';\n\n}", "title": "" }, { "docid": "55f0ef83a2120af5d0475f016a529dbf", "score": "0.5349304", "text": "function isPermitted($action, $module=0)\n{\n\t\n\tglobal $adminLink;\n\t\n\t// Set some easy-to-use variables.\n\t$theUser = $_SESSION['userid'];\n\t$theGroup = $_SESSION['group_id'];\n\t\n\t// If the user is an administrator, the answer is always 'yes'\n\tif ($theGroup <= ADMINPANEL_GROUPS_ADMINISTRATOR_ID)\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\t// Check the database for permissions\n\t\t\n\t\t// First, check if this group is permitted to perform this action\n\t\t$query = \"SELECT allowed FROM `users_allowed_actions` WHERE module=$module AND group_id=$theGroup AND action='$action' LIMIT 1;\";\n\t\tif (false === ($result = mysql_query($query, $adminLink)))\n\t\t{\n\t\t\treturnError(902, $query, true, $adminLink);\n\t\t}\n\t\t\n\t\tif (mysql_num_rows($result))\n\t\t{\n\t\t\t$row = mysql_fetch_object($result);\n\t\t\tif ($row->allowed)\n\t\t\t{\n\t\t\t\t// This group is allowed to perform this action\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Next, check if this user is permitted to perform this action.\n\t\t// We should only get to this point if the group check did not return a positive result\n\t\t$query = \"SELECT allowed FROM `users_allowed_actions` WHERE module=$module AND user_id=$theUser AND action='$action' LIMIT 1;\";\n\t\tif (false === ($result = mysql_query($query, $adminLink)))\n\t\t{\n\t\t\treturnError(902, $query, true, $adminLink);\n\t\t}\n\t\t\n\t\tif (mysql_num_rows($result))\n\t\t{\n\t\t\t$row = mysql_fetch_object($result);\n\t\t\tif ($row->allowed)\n\t\t\t{\n\t\t\t\t// This user is allowed to perform this action\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}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "deabae0b9fb5da4afbf1b15492525d2d", "score": "0.53478473", "text": "function isAuthorized_menu($strUsers, $strGroups, $UserName, $UserGroup) {\n // For security, start by assumiaccng the visitor is NOT authorized.\n $isValid = False;\n\n // When a visitor has logged into this site, the Session variable MM_Username set equal to their username.\n // Therefore, we know that a user is NOT logged in if that Session variable is blank.\n if (!empty($UserName)) {\n // Besides being logged in, you may restrict access to only certain users based on an ID established when they login.\n // Parse the strings into arrays.\n $arrUsers = Explode(\",\", $strUsers);\n $arrGroups = Explode(\",\", $strGroups);\n if (in_array($UserName, $arrUsers)) {\n $isValid = true;\n }\n // Or, you may restrict access to only certain users based on their username.\n if (in_array($UserGroup, $arrGroups)) {\n $isValid = true;\n }\n if (($strUsers == \"\") && true) {\n $isValid = true;\n }\n }\n return $isValid;\n}", "title": "" }, { "docid": "31d888f51e3acbefbb89c8bcd34f9dfa", "score": "0.534361", "text": "function groups_is_user_creator( $user_id, $group_id ) {\r\n\treturn BP_Groups_Member::check_is_creator( $user_id, $group_id );\r\n}", "title": "" }, { "docid": "b4a6bc1ddd141d262ebc0557cc51cc02", "score": "0.53426325", "text": "function checkGroup($groups)\n {\n if (is_null($groups)) {\n return true;\n }\n\n if (is_a($this->_perm, 'LiveUser_Perm_Medium')) {\n if (is_array($groups)) {\n foreach ($groups as $group) {\n if (!$this->_perm->checkGroup($group)) {\n return false;\n }\n }\n return true;\n } else {\n return $this->_perm->checkGroup($groups);\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "fe4888897592c023f49d485e8e83e225", "score": "0.5329724", "text": "function user_group_auth($group, $select_query, $use_src_db)\n{\n\tglobal $convert, $phpbb_root_path, $config, $user, $db, $src_db, $same_db;\n\n\tif (!in_array($group, array('guests', 'registered', 'registered_coppa', 'global_moderators', 'administrators', 'bots')))\n\t{\n\t\t$convert->p_master->error(sprintf($user->lang['CONV_ERROR_WRONG_GROUP'], $group, 'user_group_auth()'), __LINE__, __FILE__, true);\n\t\treturn;\n\t}\n\n\t$sql = 'SELECT group_id\n\t\tFROM ' . GROUPS_TABLE . \"\n\t\tWHERE group_name = '\" . $db->sql_escape(strtoupper($group)) . \"'\";\n\t$result = $db->sql_query($sql);\n\t$group_id = (int) $db->sql_fetchfield('group_id');\n\t$db->sql_freeresult($result);\n\n\tif (!$group_id)\n\t{\n\t\t$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_GROUP'], $group, 'user_group_auth()'), __LINE__, __FILE__, true);\n\t\treturn;\n\t}\n\n\tif ($same_db || !$use_src_db)\n\t{\n\t\t$sql = 'INSERT INTO ' . USER_GROUP_TABLE . ' (user_id, group_id, user_pending)\n\t\t\t' . str_replace('{' . strtoupper($group) . '}', $group_id . ', 0', $select_query);\n\t\t$db->sql_query($sql);\n\t}\n\telse\n\t{\n\t\t$result = $src_db->sql_query(str_replace('{' . strtoupper($group) . '}', $group_id . ' ', $select_query));\n\t\twhile ($row = $src_db->sql_fetchrow($result))\n\t\t{\n\t\t\t// this might become quite a lot of INSERTS unfortunately\n\t\t\t$sql = 'INSERT INTO ' . USER_GROUP_TABLE . \" (user_id, group_id, user_pending)\n\t\t\t\tVALUES ({$row['user_id']}, $group_id, 0)\";\n\t\t\t$db->sql_query($sql);\n\t\t}\n\t\t$src_db->sql_freeresult($result);\n\t}\n}", "title": "" }, { "docid": "0c79c2395cc634169d30b66d182bc79b", "score": "0.5328048", "text": "public function isAuthorized($user){\n /*\n * \n 1 \tAdmin\n 2 \tOfficer / Manager\n 3 \tRead Only\n 4 \tStaff\n 5 \tUser / Operator\n 6 \tStudent\n 7 \tLimited\n */\n \n \n //Read Only can list \n if (in_array($this->request->action, ['index','view'])) {\n if ($user['group_id'] <= 3) {\n return true;\n }\n }\n \n //managers can add / edit delete\n if (in_array($this->request->action, ['add','edit','delete','reorder'])) {\n if ($user['group_id'] <= 2) {\n return true;\n }\n }\n \n //Admins have all\n return parent::isAuthorized($user);\n }", "title": "" }, { "docid": "e135182fd7b0ac52b4a5153c6f7eafa6", "score": "0.5326844", "text": "function can_post($usergroups, $forumgroup, $userlevel) {\n\tglobal $db_prefix, $groups;\n\n\t// process according to the forumgroup\n\tswitch ($forumgroup) {\n\t\tcase 0:\n\t\t\t// public access\n\t\t\treturn true;\n\t\t\tbreak;\n\t\tcase 101:\n\t\tcase 102:\n\t\tcase 103:\n\t\t\t// members, administrators and webmaster fixed groups\n\t\t\treturn ($userlevel >= $forumgroup);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t// all other groups\n\t\t\t$groups = explode(\".\", substr($usergroups, 1));\n\t\t\tforeach ($groups as $group) {\n\t\t\t\t// check if this groups has subgroups. If so, add them to the array\n\t\t\t\tgetsubgroups($group);\n\t\t\t}\n\t\t\t// create a new user_group field with all inherited groups, and\n\t\t\t// get the inherited group rights and add them to the user own rights\n\t\t\t// everyone is always member of group 0 (public)\n\t\t\t$usergroups = \".0\";\n\t\t\tforeach ($groups as $group) {\n\t\t\t\t$usergroups .= \".\".$group;\n\t\t\t\t$result = dbarray(dbquery(\"SELECT group_groups FROM \".$db_prefix.\"user_groups WHERE group_id = '\".$group.\"'\"));\n\t\t\t\tif (isset($result['group_groups']) && $result['group_groups'] != \"\") {\n\t\t\t\t\t$usergroups .= ($usergroups==\"\"?\"\":\".\").$result['group_groups'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (in_array($forumgroup, explode(\".\", substr($usergroups,1)))) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t}\n}", "title": "" }, { "docid": "370e2912abcf7c1e646197e6ab7ecd9e", "score": "0.5326119", "text": "protected function _user_query_for ($type, $group_id)\n {\n switch ($type)\n {\n case Project_user_all:\n $Result = $this->app->user_query ();\n break;\n case Project_user_registered_only:\n $Result = $this->app->user_query ();\n $Result->set_kind (Privilege_kind_registered);\n break;\n case Project_user_group:\n $group_query = $this->app->group_query ();\n $group = $group_query->object_at_id ($group_id);\n if (! empty ($group))\n {\n $Result = $group->user_query ();\n }\n break;\n }\n return $Result;\n }", "title": "" }, { "docid": "da23a8e77b5d8a564e6251ae4f0ba3e9", "score": "0.53247947", "text": "public function DoGroupCreate($form) { \r\nif($this->user->GroupCreate($form['acronym']['value'], $form['name']['value'])){ \r\n $this->AddMessage('success', \"Group successfully created\"); \r\n $this->RedirectToController('profile'); \r\n } else { \r\n $this->AddMessage('notice', \"Failed to create group.\"); \r\n $this->RedirectToController('createGroup'); \r\n } \r\n}", "title": "" }, { "docid": "8d776c507211f4147d5bcd159c1347f5", "score": "0.53235483", "text": "public static function canViewPhotos($group, $user) {\n return self::canViewMembers($group, $user);\n }", "title": "" }, { "docid": "994d50fa4c802cb3c7a1d8c8b68e88bd", "score": "0.5318624", "text": "public function check_usertype()\n {\n if($usertype = $this->session->userdata('user'))\n {\n foreach($usertype as $usertype_){\n if($usertype_['usertype'] != 'admin')\n {\n echo\"Only Admin can access This account\";\n exit();\n }\n }\n }\n else\n {\n echo \"not logged in\";\n exit();\n }\n \n }", "title": "" }, { "docid": "dc3fd0aa1d8aa3be965d83cfd093ab06", "score": "0.53160524", "text": "function check_user_type($type){\n if (!isset($_COOKIE[\"User_ID\"]) or !isset($_COOKIE[\"User_Token\"])) return false;\n \n $database = get_database();\n $id = $_COOKIE[\"User_ID\"];\n $token = $_COOKIE[\"User_Token\"];\n $count = $database->count(\"user\", [\"AND\" => [ \"id\" => $id, \"token\" => $token, \"type\" => $type] ]);\n\n return $count > 0;\n }", "title": "" }, { "docid": "ef47184aa9f0451eceb3faad71c5ead3", "score": "0.5315235", "text": "function has_permission($mybb, $user)\n{\n\t$user_groups = explode(',', $user['usergroup']);\n\t$allowed_groups = explode(',', $mybb->settings['threadredirect_groups']);\n\t\n\t// All groups are allowed\n\tif ($mybb->settings['threadredirect_groups'] == -1) {\n\t\treturn true;\n\t}\n\t\n\t// Include any additional groups\n\tif (!empty($user['additionalgroups'])) {\n\t\t$user_groups = array_merge($user_groups, explode(',', $user['additionalgroups']));\n\t}\n\t\n\t// Check if the user is included in $allowed_groups\n\tforeach ($user_groups as $group) {\n\t\tif (array_search($group, $allowed_groups) !== false) {\n\t\t\treturn true;\n\t\t}\n\t}\n\t\n\treturn false;\n}", "title": "" }, { "docid": "edff93069ea30572eafd77c4d0c47173", "score": "0.53119624", "text": "public function member($group, $user = null)\n\t {\n\t\t$groups = \\Auth::instance()->get_groups();\n\t\t\t\t\t\n\t\t// get config values\n\t\t$groupModel\t\t= \\Config::get('authorm.model.group');\n\t\t$groupUserKey\t= \\Config::get('authorm.fields.group.users');\n\t\t$groupIdKey\t\t= \\Config::get('authorm.fields.group.id');\n\t\t\n\t\tif($group instanceof $groupModel)\n\t\t{\n\t\t\t// get id\n\t\t\t$id = $group->{$groupIdKey};\n\t\t\t\n\t\t\treturn in_array(array($this->id, $id), $groups);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn in_array(array($this->id, $group), $groups);\n\t\t}\n\t }", "title": "" }, { "docid": "182e915d98ca2a3778feea209862b545", "score": "0.5311786", "text": "public function delete($userGroup)\n {\n try{\n $ui = $userGroup->getUsers_id();\n $gi = $userGroup->getGroups_id();\n // Delete statement where user ID is ID passed in\n $stmt = $this->db->prepare(\"DELETE FROM `USER_GROUPS` WHERE GROUPS_ID = :gi AND USERS_ID = :ui\");\n \n $stmt->bindParam(':ui', $ui);\n $stmt->bindParam(':gi', $gi);\n $stmt->execute();\n \n // if result == 1\n if ($stmt->rowCount() == 1){\n \n return true;\n }\n \n // if result vaiable doesn't find user with entered credentials\n else\n return false;\n } catch (Exception $e2) {\n // display our Global Exception Handler page\n return view(\"error\");\n }\n }", "title": "" }, { "docid": "c283651cfaae1f7e5f6744e18fda4ded", "score": "0.5308863", "text": "public function check_group($group)\n\t{\n\t\t$this->db->select('id')->from('groups')->where(\"LOWER(group_name)\",$group);\n\t\t$query=$this->db->get();\n\t\t$data=$query->result_array();\n\t\tif($query->num_rows()==0){\n\t\t\treturn FALSE;\n\t\t}\n\t\telse{\n\t\t\treturn $data[0]['id'];\n\t\t}\n\t}", "title": "" }, { "docid": "c57731183c35240aae2aab448dab4c48", "score": "0.53073984", "text": "function joinGroup() {\n $group = $this->loadGroup();\n if(!$group) {\n return false;\n }\n\n $user =& JFactory::getUser();\n $db = & JFactory::getDBO();\n\n if(!GroupVPNModelGroupVPN::isGroupMember($group->group_id, $user->id)) {\n JError::raiseWarning(500, JText::_('You must be a member of the following'.\n 'GroupVPN: '.' before joining this GroupAppliance.'));\n return false;\n }\n $group_id = $this->group_id;\n $group_id = $group->$group_id;\n\n $reason = JRequest::getVar(\"reason\");\n $query = \"INSERT INTO \".$this->users_db. \"(user_id, \".$this->group_id.\n \", request, reason) VALUES (\".$user->id.\", \"\n .$group_id.\", 1, \\\"\".$reason.\"\\\")\";\n if($db->Execute($query)) {\n GroupVPNModelGroupVPN::sendAdminNotification($user->email, $user->name,\n $user->username, $group->group_name, $group_id, $post[\"reason\"],\n $this->getAdminEmail($group_id));\n return true;\n }\n\n exit;\n JError::raiseWarning(500, JText::_('Unable to join group...'));\n return false;\n }", "title": "" }, { "docid": "ce8d32289343d5d34211d35781bf04b4", "score": "0.5305035", "text": "function isMentor(){\n if(Auth::user()->type == \"mentor\"){\n return true;\n }\n else{\n false;\n }\n}", "title": "" }, { "docid": "5938ac4b514b7015d442441caecc6619", "score": "0.53037274", "text": "public function index(User $user)\n {\n return $user->can('groups.view');\n }", "title": "" }, { "docid": "b8d1fd7bfa4337fb4ad8e39139a2dc5c", "score": "0.5294594", "text": "function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {\n\n $isValid = False; \n //Cuando el usuario tiene ingreso, la variable Session MM_Username es igual a la de acceso del usuario, es decir su número de identificación.\n //Por otro lado, se sabe que el usario no esta con Login si la variable esta en blanco.\n if (!empty($UserName)) { \n //Se puede restringir el acceso a ciertos ID, mediante el login accedido.\n // Convierte los strings restringidos en arrays.\n $arrUsers = Explode(\",\", $strUsers); \n $arrGroups = Explode(\",\", $strGroups); \n if (in_array($UserName, $arrUsers)) { \n $isValid = true; \n } \n \n if (in_array($UserGroup, $arrGroups)) { \n $isValid = true; \n } \n if (($strUsers == \"\") && true) { \n $isValid = true; \n } \n } \n return $isValid; \n}", "title": "" }, { "docid": "4106d02ab33dc12fd08d0a55d7f37fb9", "score": "0.52930903", "text": "public function manage(User $user, PandaGroup $group): bool\n {\n $users = $group->users()\n ->join('panda_group_roles', 'panda_groups_users.panda_group_role_id', 'panda_group_roles.id')\n ->where('panda_group_roles.label', 'admin')\n ->get()\n ->toArray();\n\n return in_array($user->id, array_column($users, 'user_id'), true);\n }", "title": "" }, { "docid": "7dc03aca8420a9f22af5e87b1691bfce", "score": "0.5288811", "text": "function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup)\n{\n // For security, start by assuming the visitor is NOT authorized.\n $isValid = False;\n\n // When a visitor has logged into this site, the Session variable MM_Username set equal to their username.\n // Therefore, we know that a user is NOT logged in if that Session variable is blank.\n if (!empty($UserName)) {\n // Besides being logged in, you may restrict access to only certain users based on an ID established when they login.\n // Parse the strings into arrays.\n $arrUsers = Explode(\",\", $strUsers);\n $arrGroups = Explode(\",\", $strGroups);\n if (in_array($UserName, $arrUsers)) {\n $isValid = true;\n }\n // Or, you may restrict access to only certain users based on their username.\n if (in_array($UserGroup, $arrGroups)) {\n $isValid = true;\n }\n if (($strUsers == \"\") && false) {\n $isValid = true;\n }\n }\n return $isValid;\n}", "title": "" }, { "docid": "83208848e725b58e65328f55b2f20cd7", "score": "0.5287325", "text": "private function _validasiPrivilege($tipeLogin = ''){\n\t\t// superadmin, provider, biasa (untuk member)\n\t\tif ( ($tipeLogin == 'superadmin') or ($tipeLogin == 'provider') or ($tipeLogin == '') ) {\n\t\t}else {\n redirect(base_url('login'));\n }\n\t}", "title": "" }, { "docid": "32dcbac8d2e45b363cc24f9f03f31789", "score": "0.52852285", "text": "function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { \n \n $isValid = False; \n\n \n if (!empty($UserName)) { \n \n $arrUsers = Explode(\",\", $strUsers); \n $arrGroups = Explode(\",\", $strGroups); \n if (in_array($UserName, $arrUsers)) { \n $isValid = true; \n } \n \n if (in_array($UserGroup, $arrGroups)) { \n $isValid = true; \n } \n if (($strUsers == \"\") && false) { \n $isValid = true; \n } \n } \n return $isValid; \n}", "title": "" }, { "docid": "c444f5bca282bb2b47860a2db7f6fb17", "score": "0.5276276", "text": "public function join($group, $user)\n {\n $group = Group::find($group);\n $user = User::find($user);\n\n // $group->user()->attach($user);\n\n // return \"done!\";\n\n if($user->group()->attach($group)){\n return response()->json([ 'status'=> 'successful'], 200);\n }else{\n return response()->json([ 'status'=> 'unsuccessful' ], 200);\n }\n\n }", "title": "" }, { "docid": "797a54828a9307351ec9e73d8c0b3912", "score": "0.5275349", "text": "public function redirectTo()\n {\n // User role\n $role = Auth::user()->type;\n logger(\"en login controller\");\n if($role == '1')\n {\n return redirect('employer');\n }\n elseif($role == '1')\n {\n return redirect('expert');\n }\n logger($role);\n }", "title": "" }, { "docid": "8d22c1ce2f51bce5be93ea1f6b100924", "score": "0.5274544", "text": "public function DoUserIntoGroupSave($form) { \r\nif($this->user->UserIntoGroupCreate($form['userId']['value'],$form['groupId']['value'])){ \r\n $this->AddMessage('success', \"Insertion of User to Group successfully created\"); \r\n $this->RedirectToController('profile'); \r\n } else { \r\n $this->AddMessage('notice', \"Failed to create group.\"); \r\n $this->RedirectToController('UserIntoGroup'); \r\n } \r\n}", "title": "" }, { "docid": "60acda6b35a7731a919076584155e807", "score": "0.52720267", "text": "function isAuthorized_menu($strUsers, $strGroups, $UserName, $UserGroup) { \n // For security, start by assumiaccng the visitor is NOT authorized. \n $isValid = False; \n\n // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. \n // Therefore, we know that a user is NOT logged in if that Session variable is blank. \n if (!empty($UserName)) { \n // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. \n // Parse the strings into arrays. \n $arrUsers = Explode(\",\", $strUsers); \n $arrGroups = Explode(\",\", $strGroups); \n if (in_array($UserName, $arrUsers)) { \n $isValid = true; \n } \n // Or, you may restrict access to only certain users based on their username. \n if (in_array($UserGroup, $arrGroups)) { \n $isValid = true; \n } \n if (($strUsers == \"\") && true) { \n $isValid = true; \n } \n } \n return $isValid; \n}", "title": "" }, { "docid": "39dedf80e7d4ea49ea3cd673bb5efaac", "score": "0.52708477", "text": "public function onReverse($groupid = null, $user = null)\n {\n // Sanity checks\n if ((int)$user->id == 0 || (int)$groupid == 0) {\n return false;\n }\n\n // Delete this user from the group\n $db = JFactory::getDBO();\n $query = \"DELETE FROM FROM `#__flexiaccess_members` WHERE `group_id`=\".(int)$groupid.\" AND `member_id`=\".(int)$user->id;\n $db->setQuery($query);\n $db->query();\n\n return true;\n }", "title": "" }, { "docid": "09f5fb2fefc3334051a8732f065bc973", "score": "0.5269154", "text": "public function checkGroupMember($query_user_id,$query_group_id){\n $sqlQuery = \"SELECT *\n FROM\n group_user\n WHERE \n USER_ID = ? AND GROUP_ID = ?\";\n $stmt = $this->conn->prepare($sqlQuery);\n\n $stmt->bindParam(1, $query_user_id, PDO::PARAM_INT);\n $stmt->bindParam(2, $query_group_id, PDO::PARAM_INT);\n\n $stmt->execute();\n $stmt_count = $stmt->rowCount();\n if($stmt_count>0){\n return true;\n }else{\n return false;\n } \n }", "title": "" }, { "docid": "7dd5a26b7685900f5f93057a0892ec58", "score": "0.52645344", "text": "function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {\n // For security, start by assuming the visitor is NOT authorized. \n $isValid = False;\n\n // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. \n // Therefore, we know that a user is NOT logged in if that Session variable is blank. \n if (!empty($UserName)) {\n // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. \n // Parse the strings into arrays. \n $arrUsers = Explode(\",\", $strUsers);\n $arrGroups = Explode(\",\", $strGroups);\n if (in_array($UserName, $arrUsers)) {\n $isValid = true;\n }\n // Or, you may restrict access to only certain users based on their username. \n if (in_array($UserGroup, $arrGroups)) {\n $isValid = true;\n }\n if (($strUsers == \"\") && true) {\n $isValid = true;\n }\n }\n return $isValid;\n}", "title": "" }, { "docid": "2f1242b233c1e691b70c8b550a251ed9", "score": "0.5259892", "text": "function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {\n // For security, start by assuming the visitor is NOT authorized. \n $isValid = False;\n\n // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. \n // Therefore, we know that a user is NOT logged in if that Session variable is blank. \n if (!empty($UserName)) {\n // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. \n // Parse the strings into arrays. \n $arrUsers = Explode(\",\", $strUsers);\n $arrGroups = Explode(\",\", $strGroups);\n if (in_array($UserName, $arrUsers)) {\n $isValid = true;\n }\n // Or, you may restrict access to only certain users based on their username. \n if (in_array($UserGroup, $arrGroups)) {\n $isValid = true;\n }\n if (($strUsers == \"\") && false) {\n $isValid = true;\n }\n }\n return $isValid;\n}", "title": "" }, { "docid": "a9676704c1c22a097b74a5c0824cc905", "score": "0.52559054", "text": "function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {\r\n // For security, start by assuming the visitor is NOT authorized. \r\n $isValid = False;\r\n\r\n // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. \r\n // Therefore, we know that a user is NOT logged in if that Session variable is blank. \r\n if (!empty($UserName)) {\r\n // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. \r\n // Parse the strings into arrays. \r\n $arrUsers = Explode(\",\", $strUsers);\r\n $arrGroups = Explode(\",\", $strGroups);\r\n if (in_array($UserName, $arrUsers)) {\r\n $isValid = true;\r\n }\r\n // Or, you may restrict access to only certain users based on their username. \r\n if (in_array($UserGroup, $arrGroups)) {\r\n $isValid = true;\r\n }\r\n if (($strUsers == \"\") && true) {\r\n $isValid = true;\r\n }\r\n }\r\n return $isValid;\r\n}", "title": "" }, { "docid": "317f520c051ce1173984e567276679cb", "score": "0.5252556", "text": "public function isAuthorized($user){\n /*\n * \n 1 \tAdmin\n 2 \tOfficer / Manager\n 3 \tRead Only\n 4 \tStaff\n 5 \tUser / Operator\n 6 \tStudent\n 7 \tLimited\n */\n \n \n //Read Only can list user accounts\n if (in_array($this->request->action, ['index'])) {\n if ($user['group_id'] <= 3) {\n return true;\n }\n }\n \n //managers can add / edit\n if (in_array($this->request->action, ['add','edit','delete'])) {\n if ($user['group_id'] <= 2) {\n return true;\n }\n }\n \n //Admins have all\n return parent::isAuthorized($user);\n }", "title": "" }, { "docid": "52cf283b4ca4f35c7f1f1cfbc636428e", "score": "0.5249689", "text": "function isAuthorized_menu($strUsers, $strGroups, $UserName, $UserGroup) { \n // For security, start by assuming the visitor is NOT authorized. \n $isValid = False; \n\n // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. \n // Therefore, we know that a user is NOT logged in if that Session variable is blank. \n if (!empty($UserName)) { \n // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. \n // Parse the strings into arrays. \n $arrUsers = Explode(\",\", $strUsers); \n $arrGroups = Explode(\",\", $strGroups); \n if (in_array($UserName, $arrUsers)) { \n $isValid = true; \n } \n // Or, you may restrict access to only certain users based on their username. \n if (in_array($UserGroup, $arrGroups)) { \n $isValid = true; \n } \n if (($strUsers == \"\") && true) { \n $isValid = true; \n } \n } \n return $isValid; \n}", "title": "" } ]
29dd7c87c12bc6f03542b46725257b4d
Return the suspension relation.
[ { "docid": "03d8b565dc0559507007bba5d8c0ec68", "score": "0.7442058", "text": "public function suspension()\n {\n return $this->hasOne('Anomaly\\UsersModule\\Suspension\\SuspensionModel', 'user_id');\n }", "title": "" } ]
[ { "docid": "7742473af50c0e7119491005b9a2e552", "score": "0.6835598", "text": "public function getSuspension()\n {\n return $this->suspension;\n }", "title": "" }, { "docid": "c410e724c54303114d4d9831bf073d68", "score": "0.59305394", "text": "public function getPromocion()\r\n {\r\n return $this->promocion;\r\n }", "title": "" }, { "docid": "bdf8e89eb8e4ee477050c40db03de078", "score": "0.57690537", "text": "public function getSuspended()\r\n {\r\n return $this->suspended;\r\n }", "title": "" }, { "docid": "9776f6073cdd6dfa8437d5b29d18f2f3", "score": "0.5290782", "text": "public function getRelation()\n {\n return $this->relation;\n }", "title": "" }, { "docid": "9776f6073cdd6dfa8437d5b29d18f2f3", "score": "0.5290782", "text": "public function getRelation()\n {\n return $this->relation;\n }", "title": "" }, { "docid": "58d9cf7b7aea09c9663660ff58c2fb84", "score": "0.52605474", "text": "public function starter() {\n # Define an inverse one-to-many relationship.\n return $this->belongsTo('App\\Starter');\n }", "title": "" }, { "docid": "fd8715e7d7178a526960d186dd873cdc", "score": "0.524026", "text": "function getRelation()\n {\n return $this->relation;\n }", "title": "" }, { "docid": "16555e2b0cc0ca6bcfe60647c20b116e", "score": "0.5212198", "text": "public function watchedAutomatedProcess()\n {\n return $this->belongsTo('App\\WatchedAutomatedProcess');\n }", "title": "" }, { "docid": "aafbf3fe40de9279f964956b53d27a16", "score": "0.51779777", "text": "public function applicant()\n {\n return $this->belongsTo('App\\Applicant');\n }", "title": "" }, { "docid": "10308edb92fa5e363f1e2f72d41c52d5", "score": "0.516006", "text": "public function professor()\n {\n return $this->belongsTo('App\\Professor');\n }", "title": "" }, { "docid": "78a59ed9fe2db4abfc96010596809513", "score": "0.515726", "text": "public function profile()\n\t{\n\t\treturn $this->hasOne('App\\WorkerProfile'); // Checked!\n\t}", "title": "" }, { "docid": "d941fe9622bb4c545243091b03b382c9", "score": "0.51382715", "text": "public function promo()\n {\n return $this->belongsTo('App\\Promo');\n }", "title": "" }, { "docid": "c4d7735967ac470e33c0d1c0b77e449f", "score": "0.51304007", "text": "public function getResume()\n {\n return $this->resume;\n }", "title": "" }, { "docid": "a6466df729b1a5ad3a473d0f48a4f857", "score": "0.51127684", "text": "public function relation()\n\t{\n\t\treturn $this->belongsTo('App\\Models\\Relation');\n\t}", "title": "" }, { "docid": "fb5b8e445e00fc23b72c0daf8212bf52", "score": "0.51081324", "text": "public function relation()\n {\n if (is_null($this->relation)) {\n $this->relation = new Relation($this->accessToken);\n }\n\n return $this->relation;\n }", "title": "" }, { "docid": "fb2fb4f42b37585a7d2305e6cbfdd730", "score": "0.5103889", "text": "public function isSuspended()\n {\n return $this->suspended;\n }", "title": "" }, { "docid": "fb2fb4f42b37585a7d2305e6cbfdd730", "score": "0.5103889", "text": "public function isSuspended()\n {\n return $this->suspended;\n }", "title": "" }, { "docid": "e82bbacd32056b2cea2280e56278bd40", "score": "0.50966597", "text": "public function getEager()\n {\n return $this->getUnfolded();\n }", "title": "" }, { "docid": "c4043b70b619fb4abf51fe180713e940", "score": "0.5046154", "text": "public function initiator()\n {\n return $this->belongsTo(User::class, 'initiator_id');\n }", "title": "" }, { "docid": "c4043b70b619fb4abf51fe180713e940", "score": "0.5046154", "text": "public function initiator()\n {\n return $this->belongsTo(User::class, 'initiator_id');\n }", "title": "" }, { "docid": "4f93a4d717d82a6050dc6a6b9d66389e", "score": "0.50392264", "text": "public function get_onsuspend()\r\n\t{\r\n\t\treturn $this->get_attr('onsuspend');\r\n\t}", "title": "" }, { "docid": "8cfd2ead87959a201be39950aaf0b7fa", "score": "0.5026609", "text": "public function getRelation(): string\n {\n return $this->relation;\n }", "title": "" }, { "docid": "5c9d3f0f8776d59b6a9652dec03353be", "score": "0.50187075", "text": "public function notificationPreference()\n {\n return $this->belongsTo(NotificationPreference::class, 'id', 'subscriber_id');\n }", "title": "" }, { "docid": "5eda9590091b828742cfb1e676a46f61", "score": "0.5010374", "text": "public function myPresentations()\n {\n return $this->hasMany('App\\Models\\Presentation', 'presenter_id');\n }", "title": "" }, { "docid": "e281865ebbe1fbd6eb92d9c0483ba772", "score": "0.5001878", "text": "public function present()\n {\n return Present::item($this);\n }", "title": "" }, { "docid": "e78b43370dd81f5e68183e16e136eeab", "score": "0.4988493", "text": "public function getDisputeActivity()\n {\n return $this->disputeActivity;\n }", "title": "" }, { "docid": "c74874571519b06bb608fb1a6691a338", "score": "0.49624747", "text": "public function getResidence()\n {\n return $this->residence;\n }", "title": "" }, { "docid": "2b6f8784c0026e5127487cbc65cc2fc9", "score": "0.4959451", "text": "public function isSuspend();", "title": "" }, { "docid": "ed2cd73ec58b48a6544da58ea7509b93", "score": "0.49506295", "text": "public function getPresentation()\n {\n return $this->presentation;\n }", "title": "" }, { "docid": "e1da4a6b598ff8e913707929169c10a1", "score": "0.49496675", "text": "public function participant()\n\t{\n\t\treturn $this->belongsTo(Models::name('participant'));\n\t}", "title": "" }, { "docid": "7200cd88cceee769b95cbbdd6f59eaeb", "score": "0.493404", "text": "public function current()\n\t{\n\t\treturn $this->belongsTo(get_class($this), $this->getCurrentIDColumn(), $this->getKeyName());\n\t}", "title": "" }, { "docid": "9809afb59deb0c5d62d804ceeafa7ea3", "score": "0.49252567", "text": "protected function _getSyncSingleton()\n {\n return $this->_objectManager->get('MageWorx\\AlsoBought\\Model\\Relation');\n }", "title": "" }, { "docid": "e2db999d57ec2c9588e6e540ed193b72", "score": "0.4917058", "text": "public function profesor()\n\t{\n\t\treturn $this->belongsTo('Profesor');\n\t}", "title": "" }, { "docid": "117218d97c226583cf7a44756b4fb704", "score": "0.4903824", "text": "public function Introducer()\n {\n return $this->hasMany('Meetingrequest', 'user_id_introducer', 'id');\n }", "title": "" }, { "docid": "ab3d26d34b6afd0fe3c6301a73cab414", "score": "0.48997712", "text": "public function getRequirer ( ) { return $this->parent->getRequirer( ); }", "title": "" }, { "docid": "e6f93edaeb7f6a66f6ae5503ed50837f", "score": "0.4899694", "text": "public function getPreparationParty()\n {\n return $this->preparationParty;\n }", "title": "" }, { "docid": "b61798cbc0e5ae6456803030ff6b4570", "score": "0.48924023", "text": "public function feedback()\n {\n return $this->belongsTo('Workshop', 'workshop_id');\n }", "title": "" }, { "docid": "1133c98878249c21eab204e361df6e93", "score": "0.48819202", "text": "public function getResume(): Resume {\n return $this->resume;\n }", "title": "" }, { "docid": "fcc8d79517d8b45fb7ace07ae88b3505", "score": "0.48742718", "text": "public function getPlan()\n {\n return $this->hasOne(InterPlan::className(), ['id' => 'plan_id']);\n }", "title": "" }, { "docid": "e110b736ea0457a1b8c9b041941a74c4", "score": "0.486669", "text": "function rejectReason()\n {\n return $this->hasOne(RountingStatus::class, 'expense_id', 'id')\n ->where(array('approval_status' => 2))\n ->join('users', 'users.id', 'rounting_status.rejected_by')\n ->select(array('expense_id', 'reason', 'users.name'));\n }", "title": "" }, { "docid": "59a92f1505911b2eba80a7e667a9ec50", "score": "0.486643", "text": "public function getNotification()\n {\n return $this\n ->getSession()\n ->getConnection()\n ->getNotification()\n ;\n }", "title": "" }, { "docid": "b498bcc0325c942901146b771a06695a", "score": "0.48659578", "text": "public function superior()\n\t{\n\t\treturn $this->superior;\n\t}", "title": "" }, { "docid": "c974d83f3f710ae421ba37ee074f552b", "score": "0.48617992", "text": "public function professor(){\n return $this->belongsTo('App\\Professor');\n }", "title": "" }, { "docid": "2915222a87c2fa815de266f6591b90b4", "score": "0.48502296", "text": "public function investment() {\n return $this->belongsTo('App\\Investment');\n }", "title": "" }, { "docid": "df73997b6992a735d0332b70644dd149", "score": "0.4842549", "text": "public function getReal()\n {\n return $this->relation;\n }", "title": "" }, { "docid": "7caa1599d593cc932f71952aa2c3ab11", "score": "0.48365065", "text": "public function particulateInspection()\n\t{\n\t\treturn $this->belongsTo('Inspection', 'particulate_id', 'id');\n\t}", "title": "" }, { "docid": "953e26dfe8bbf15ad14cfb4035846176", "score": "0.4825434", "text": "public function respondent () {\n \treturn $this->belongsTo(User::class, 'reviewer_id');\n }", "title": "" }, { "docid": "10c603eb5a70b746cd261c80c7a87204", "score": "0.48235515", "text": "public function getReverseRelationship(): self\n {\n if ($this->reverse === null) {\n $this->reverse = $this->detectReverseRelationship();\n }\n\n return $this->reverse;\n }", "title": "" }, { "docid": "804e2d63e6ed41c5d673c256db83b658", "score": "0.48217085", "text": "public function modification()\n {\n return $this->belongsTo(config('approval.models.modification', \\Approval\\Models\\Modification::class));\n }", "title": "" }, { "docid": "0adb932bc02ce3604760b302e96e55da", "score": "0.4815169", "text": "abstract protected function _suspend();", "title": "" }, { "docid": "1e091c3e88dd58dddda18755526f541f", "score": "0.4811996", "text": "public function requisitions()\n {\n return $this->hasMany('App\\Requisition');\n }", "title": "" }, { "docid": "595bfb7c263111cfbf3f7d35ea243dc8", "score": "0.4811761", "text": "public function periodic()\n {\n return $this->belongsTo('App\\Models\\Periodic');\n }", "title": "" }, { "docid": "73b55c5986ae656f06da2d2206527741", "score": "0.48030654", "text": "public function status()\n {\n return $this->belongsTo('Modules\\Repair\\Entities\\RepairStatus', 'status_id');\n }", "title": "" }, { "docid": "b1d12747edc3c9ec26ba02b1fb54e7e0", "score": "0.48004222", "text": "public function monitor()\n {\n return $this->belongsTo('App\\Models\\Monitor');\n }", "title": "" }, { "docid": "8833193f9df1b2a98ab9036cf28695bf", "score": "0.47974986", "text": "public function getPrefetch()\n {\n return $this->getAttribute(\\PDO::ATTR_PREFETCH);\n }", "title": "" }, { "docid": "640fd56375b3c9d447726192b1505e3b", "score": "0.4791083", "text": "public function transactionReason()\n {\n return $this->belongsTo('App\\TransactionReason');\n }", "title": "" }, { "docid": "e5445e90ae999387a9b9843ae489c3a0", "score": "0.47855234", "text": "public function currentRmsMigrations()\n {\n return $this->hasMany('App\\Models\\CurrentRmsMigration')->latest();\n }", "title": "" }, { "docid": "7b5fb92c25875af7792d45ce46e6d80f", "score": "0.47824338", "text": "public function getResume()\n {\n return $this->hasOne(Resume::class, ['id' => 'resume_id']);\n }", "title": "" }, { "docid": "cdcc3b7ba986854dfc28183347dd68d8", "score": "0.47818536", "text": "public function exchange() {\n\t\t# Define an inverse one-to-many relationship.\n\t\treturn $this->belongsTo('App\\Exchange');\n\t}", "title": "" }, { "docid": "6537bab2cbc82d7692a1e181c730a19a", "score": "0.4773937", "text": "public function getActivity()\n {\n return isset($this->activity) ? $this->activity : null;\n }", "title": "" }, { "docid": "6537bab2cbc82d7692a1e181c730a19a", "score": "0.4773937", "text": "public function getActivity()\n {\n return isset($this->activity) ? $this->activity : null;\n }", "title": "" }, { "docid": "c9c46bced1d4e647c66889877f25edf3", "score": "0.4769558", "text": "public function & getPresentation()\n {\n return $this->presentation;\n }", "title": "" }, { "docid": "7ec5afa4546fc02c40858e0090cff8d5", "score": "0.47638553", "text": "public function relationshipName()\n {\n// return $this->viaRelationship;\n }", "title": "" }, { "docid": "2af8451663844781d6e179bc0b13ab49", "score": "0.47505414", "text": "public function getRelationName()\n {\n return $this->relationName;\n }", "title": "" }, { "docid": "b8970ee10ddf373cddfd186ae8851c44", "score": "0.474988", "text": "public function getRelationName(): string\n {\n return $this->relationName;\n }", "title": "" }, { "docid": "539c74a1266e35b57252ea59bab59ba1", "score": "0.47481766", "text": "public function thread()\n {\n # Define an inverse one-to-many relationship.\n return $this->belongsTo('App\\Thread');\n }", "title": "" }, { "docid": "e93d9d0df3a75139bff17ecc2dd708e6", "score": "0.4737285", "text": "public function getRelatedRecord(): IActivityPeriodRelated\n {\n return $this->bus;\n }", "title": "" }, { "docid": "9bddb5a66cb5789b4365b7529a0b8b56", "score": "0.47313845", "text": "public function solicitar(){\n return $this->hasMany(SolicitarComite::class, 'SC_Reglamento_FK', 'SC_Reglamento_PK_ID');\n }", "title": "" }, { "docid": "51d67992ccb209d074cf0510c8d98eab", "score": "0.47279742", "text": "public function suspended()\r\n\t{\r\n\t}", "title": "" }, { "docid": "dc663d3e22d0522853633aa3631c8628", "score": "0.47268823", "text": "public function pending()\n {\n # Define a many-to-many relationship\n return $this->hasMany('App\\Pending');\n }", "title": "" }, { "docid": "4fbec04b8ff1da2efbe796afaec386c9", "score": "0.4722088", "text": "public function request()\n {\n return $this->belongsTo(WorkRequest::class, 'request_id');\n }", "title": "" }, { "docid": "0086d6a362c464df233a66c2581dbc72", "score": "0.47213867", "text": "public function deployment()\n {\n return $this->belongsTo(Deployment::class);\n }", "title": "" }, { "docid": "9dd108c52a56333d8bcc9dc41866c6a5", "score": "0.47140548", "text": "public function getPresence()\n {\n return $this->get(self::PRESENCE);\n }", "title": "" }, { "docid": "f01f1b2ba718dc0cc8f1b5c8a712c99e", "score": "0.47117668", "text": "public function isResumed()\n {\n return $this->resumed;\n }", "title": "" }, { "docid": "76a24a618b473a22d8fde126af7725c6", "score": "0.47106186", "text": "public function proofs()\n {\n return $this->hasMany(Proof::class, 'subject_uuid');\n }", "title": "" }, { "docid": "dd5f79d8b5ae6239a39b22313bbbc802", "score": "0.47099304", "text": "public function dispense()\n {\n return $this->belongsTo(Dispensing::class, 'dispensing_id');\n }", "title": "" }, { "docid": "4949a773585cebddc91a58a31346afa3", "score": "0.46972427", "text": "public function consultant()\r\n {\r\n if($this->consultant_id!=0)\r\n return $this->belongsTo('App\\Models\\Consultant');\r\n return null;\r\n }", "title": "" }, { "docid": "a65e120f645d22ea82ce028e03b3bbe7", "score": "0.46931416", "text": "public function disapprover()\n {\n return $this->morphTo();\n }", "title": "" }, { "docid": "2ba7f9338efe43150d19c0e9128402a3", "score": "0.46899936", "text": "public function shg_coordinator()\n {\n \treturn $this->belongsTo('App\\SHGCoordinator');\n }", "title": "" }, { "docid": "52f8fe63dc1e199857386a88af2ca9ff", "score": "0.4688768", "text": "public function professor(){\n return $this->belongsTo('App\\User');\n }", "title": "" }, { "docid": "b692b9d683ab80cde5c19434ad00ad7d", "score": "0.46878192", "text": "public function getOndemand()\n {\n return $this->hasOne(Ondemand::class, ['target_id' => 'id'])->withExpired();\n }", "title": "" }, { "docid": "379580de4b2ad3a4b201c4105421d7b0", "score": "0.46857548", "text": "public function getParentRelation()\n {\n return $this->parentRelation;\n }", "title": "" }, { "docid": "379580de4b2ad3a4b201c4105421d7b0", "score": "0.46857548", "text": "public function getParentRelation()\n {\n return $this->parentRelation;\n }", "title": "" }, { "docid": "c57cbdd2c5bbefe9ec8e6d9f0484e0c4", "score": "0.4685278", "text": "public function getActivity()\n {\n return $this->activity;\n }", "title": "" }, { "docid": "846d24762064780c049f49f8c372e8a7", "score": "0.4683357", "text": "public function getPolicy()\n {\n return $this->policy;\n }", "title": "" }, { "docid": "e44a6aefa34ecacb3e84b6d65cf8983a", "score": "0.4678487", "text": "public function getDurable()\r\n {\r\n return $this->Durable;\r\n }", "title": "" }, { "docid": "8ff598c3e92e5f1508cb4c4607be7988", "score": "0.4676539", "text": "public function toll_reason()\n {\n return $this->hasOne('App\\Models\\TollReason','id','toll_reason_id');\n }", "title": "" }, { "docid": "935adf59835abbe915deccd46e536df1", "score": "0.4675942", "text": "public function repeat() {\n return $this->belongsTo('App\\Repeat');\n }", "title": "" }, { "docid": "9dc74acd0c958a62ffb59ce3f95769e9", "score": "0.4674537", "text": "public function sucursal()\n {\n // 1 rendicion pertene a una sucursal\n return $this->belongsTo('App\\Sucursal', 'sucursal_id');\n }", "title": "" }, { "docid": "7df5041322ea4f2d7688c6f6789b1c27", "score": "0.4673507", "text": "public function getPrereq()\n {\n return $this->hasOne(Course::className(), ['course_id' => 'prereq_id']);\n }", "title": "" }, { "docid": "78217c53c6159be505d16b2c16429dbf", "score": "0.46725306", "text": "public function reconciliation()\n {\n if ($this->isCredit()) {\n return $this->hasOne('App\\Reconciliation', 'credit_id', 'id');\n }\n return $this->hasOne('App\\Reconciliation', 'debit_id');\n }", "title": "" }, { "docid": "708040526b81796a203c1eb24b713623", "score": "0.4672444", "text": "public function excavator()\n {\n return $this->belongsTo('App\\Models\\Excavator');\n }", "title": "" }, { "docid": "bb447ca9e5a0c57cca9c940d99216bfc", "score": "0.46719426", "text": "public function produtoDetalhe() {\n /**\n * O Eloquent ORM deve procurar um registro relacionado\n * 1 produto_detalhes com base na FK produto_id e a referência é a PK id de produto\n */\n return $this->hasOne('App\\ProdutoDetalhe');\n }", "title": "" }, { "docid": "d9c134a09a50514c305cb940772580dd", "score": "0.46681085", "text": "public function getDefer()\r\n {\r\n return $this->defer;\r\n }", "title": "" }, { "docid": "29f72a4e0668d526f7de61da96153804", "score": "0.46661985", "text": "public function workflow()\n\t{\n\t\treturn $this->belongsTo(App\\Http\\Models\\Workflow::class, 'workflow_id');\n\t}", "title": "" }, { "docid": "e33b861d1f5e1f2acf427edbe4234094", "score": "0.4665681", "text": "public function Shipment()\n\t{\n\t\treturn $this->hasOne('App\\Models\\Shipment', 'transaction_id');\n\t}", "title": "" }, { "docid": "bcaa0a81ec182fb688572fcba0ccb4c0", "score": "0.46647957", "text": "public function getPromocao()\r\n {\r\n return $this->promocao;\r\n }", "title": "" }, { "docid": "11bc5190bdb1fb83f5b8dc4413834bb2", "score": "0.46616995", "text": "public function trip_toll_reason()\n {\n return $this->hasOne('App\\Models\\TripTollReason','trip_id','id');\n }", "title": "" }, { "docid": "53108e9d593b0a7702ce18ba37f37965", "score": "0.46594504", "text": "public function getParticipatorOne()\n {\n return $this->participatorOne;\n }", "title": "" }, { "docid": "66180b1e0c7538603408438829ae7d64", "score": "0.46577656", "text": "public function notificate()\n {\n return $this->belongsTo('iJobDesk\\Models\\Notification', 'notification_id');\n }", "title": "" } ]
2c5e77ec9a77e1614db1dad21b299de0
Create request for operation 'postTranscoderEncodesConfig'
[ { "docid": "3e99d2c09ad118f751641c7e9e000860", "score": "0.6046686", "text": "protected function postTranscoderEncodesConfigRequest($server_name, $vhost_name, $template_name, $body)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling postTranscoderEncodesConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling postTranscoderEncodesConfig'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling postTranscoderEncodesConfig'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling postTranscoderEncodesConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder/templates/{templateName}/encodes';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 }", "title": "" } ]
[ { "docid": "c8783ca7af0b5b01c46cdd14ec47c953", "score": "0.59667706", "text": "protected function postTranscoderEncodeConfigRequest($server_name, $vhost_name, $template_name, $encode_name, $body)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling postTranscoderEncodeConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling postTranscoderEncodeConfig'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling postTranscoderEncodeConfig'\n );\n }\n // verify the required parameter 'encode_name' is set\n if ($encode_name === null || (is_array($encode_name) && count($encode_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $encode_name when calling postTranscoderEncodeConfig'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling postTranscoderEncodeConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder/templates/{templateName}/encodes/{encodeName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n // path params\n if ($encode_name !== null) {\n $resourcePath = str_replace(\n '{' . 'encodeName' . '}',\n ObjectSerializer::toPathValue($encode_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 }", "title": "" }, { "docid": "5e400d9f5ac6aeee8f9552088b47fc01", "score": "0.5671577", "text": "protected function getTranscoderEncodesConfigRequest($server_name, $vhost_name, $template_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getTranscoderEncodesConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getTranscoderEncodesConfig'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling getTranscoderEncodesConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder/templates/{templateName}/encodes';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 }", "title": "" }, { "docid": "95e45d37654748c9457b07b753b3eaf3", "score": "0.5498793", "text": "protected function createTransactionCodeUsingPostRequest($transaction_request)\n {\n // verify the required parameter 'transaction_request' is set\n if ($transaction_request === null || (is_array($transaction_request) && count($transaction_request) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $transaction_request when calling createTransactionCodeUsingPost'\n );\n }\n\n $resourcePath = '/nucleus/v1/transaction_code';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($transaction_request)) {\n $_tempBody = $transaction_request;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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 }", "title": "" }, { "docid": "fe93f9a321ac096974a572abfe46c471", "score": "0.5493926", "text": "protected function getTranscoderEncodeConfigRequest($server_name, $vhost_name, $template_name, $encode_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getTranscoderEncodeConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getTranscoderEncodeConfig'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling getTranscoderEncodeConfig'\n );\n }\n // verify the required parameter 'encode_name' is set\n if ($encode_name === null || (is_array($encode_name) && count($encode_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $encode_name when calling getTranscoderEncodeConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder/templates/{templateName}/encodes/{encodeName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n // path params\n if ($encode_name !== null) {\n $resourcePath = str_replace(\n '{' . 'encodeName' . '}',\n ObjectSerializer::toPathValue($encode_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 }", "title": "" }, { "docid": "5aa4237d07557ffeab874799d64f39a3", "score": "0.5440467", "text": "protected function createReasonCodeUsingPostRequest($reason_code_request)\n {\n // verify the required parameter 'reason_code_request' is set\n if ($reason_code_request === null || (is_array($reason_code_request) && count($reason_code_request) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $reason_code_request when calling createReasonCodeUsingPost'\n );\n }\n\n $resourcePath = '/nucleus/v1/reason_code';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($reason_code_request)) {\n $_tempBody = $reason_code_request;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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 }", "title": "" }, { "docid": "70264bf71f21943d704d301ee18efbdf", "score": "0.5335615", "text": "public function asPostRequest()\n {\n $url = $this->asUrl();\n\n return parent::request('POST', $url, $this->post_data, $this->fqb_access_token, $this->fqb_etag);\n }", "title": "" }, { "docid": "1e4b324c00759ed276f00f2c1d605867", "score": "0.5312985", "text": "protected function putTranscoderEncodeConfigRequest($server_name, $vhost_name, $template_name, $encode_name, $body)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling putTranscoderEncodeConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling putTranscoderEncodeConfig'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling putTranscoderEncodeConfig'\n );\n }\n // verify the required parameter 'encode_name' is set\n if ($encode_name === null || (is_array($encode_name) && count($encode_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $encode_name when calling putTranscoderEncodeConfig'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling putTranscoderEncodeConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder/templates/{templateName}/encodes/{encodeName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n // path params\n if ($encode_name !== null) {\n $resourcePath = str_replace(\n '{' . 'encodeName' . '}',\n ObjectSerializer::toPathValue($encode_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "eb20efa55ee5518e5c8069d378371ff0", "score": "0.5303945", "text": "protected function deleteTranscoderEncodeConfigRequest($server_name, $vhost_name, $template_name, $encode_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling deleteTranscoderEncodeConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling deleteTranscoderEncodeConfig'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling deleteTranscoderEncodeConfig'\n );\n }\n // verify the required parameter 'encode_name' is set\n if ($encode_name === null || (is_array($encode_name) && count($encode_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $encode_name when calling deleteTranscoderEncodeConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder/templates/{templateName}/encodes/{encodeName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n // path params\n if ($encode_name !== null) {\n $resourcePath = str_replace(\n '{' . 'encodeName' . '}',\n ObjectSerializer::toPathValue($encode_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 }", "title": "" }, { "docid": "f5ecee051d06d5cde5dbdbbb0d909104", "score": "0.52477866", "text": "protected function getTranscoderEncodeConfigAdvRequest($server_name, $vhost_name, $template_name, $encode_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getTranscoderEncodeConfigAdv'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getTranscoderEncodeConfigAdv'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling getTranscoderEncodeConfigAdv'\n );\n }\n // verify the required parameter 'encode_name' is set\n if ($encode_name === null || (is_array($encode_name) && count($encode_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $encode_name when calling getTranscoderEncodeConfigAdv'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder/templates/{templateName}/encodes/{encodeName}/adv';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n // path params\n if ($encode_name !== null) {\n $resourcePath = str_replace(\n '{' . 'encodeName' . '}',\n ObjectSerializer::toPathValue($encode_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 }", "title": "" }, { "docid": "95d252d2f19a9b9665a3bee6fe85359d", "score": "0.5247724", "text": "protected function putTranscoderEncodeConfigAdvRequest($server_name, $vhost_name, $template_name, $encode_name, $body)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling putTranscoderEncodeConfigAdv'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling putTranscoderEncodeConfigAdv'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling putTranscoderEncodeConfigAdv'\n );\n }\n // verify the required parameter 'encode_name' is set\n if ($encode_name === null || (is_array($encode_name) && count($encode_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $encode_name when calling putTranscoderEncodeConfigAdv'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling putTranscoderEncodeConfigAdv'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder/templates/{templateName}/encodes/{encodeName}/adv';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n // path params\n if ($encode_name !== null) {\n $resourcePath = str_replace(\n '{' . 'encodeName' . '}',\n ObjectSerializer::toPathValue($encode_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "269c20754238584a161ba94896fc274f", "score": "0.5205722", "text": "protected function getTranscoderConfigRequest($server_name, $vhost_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getTranscoderConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getTranscoderConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 }", "title": "" }, { "docid": "1dad6db820d2c8410d6951a96efb1f00", "score": "0.5059449", "text": "protected function getTranscoderOverlayEncodeConfigRequest($server_name, $vhost_name, $template_name, $overlay_name, $encode_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getTranscoderOverlayEncodeConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getTranscoderOverlayEncodeConfig'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling getTranscoderOverlayEncodeConfig'\n );\n }\n // verify the required parameter 'overlay_name' is set\n if ($overlay_name === null || (is_array($overlay_name) && count($overlay_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $overlay_name when calling getTranscoderOverlayEncodeConfig'\n );\n }\n // verify the required parameter 'encode_name' is set\n if ($encode_name === null || (is_array($encode_name) && count($encode_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $encode_name when calling getTranscoderOverlayEncodeConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder/templates/{templateName}/encodes/{encodeName}/overlays/{overlayName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n // path params\n if ($overlay_name !== null) {\n $resourcePath = str_replace(\n '{' . 'overlayName' . '}',\n ObjectSerializer::toPathValue($overlay_name),\n $resourcePath\n );\n }\n // path params\n if ($encode_name !== null) {\n $resourcePath = str_replace(\n '{' . 'encodeName' . '}',\n ObjectSerializer::toPathValue($encode_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 }", "title": "" }, { "docid": "5268f7d0973fbf8a919c8a458ebfb6d4", "score": "0.50237966", "text": "public function postRequest(DataObject $request, ConfigInterface $config)\n {\n // Do nothing\n $this->_helper->logDebug('Gateway postRequest called');\n }", "title": "" }, { "docid": "ad6bfccb1f6ef3d60d56f9bb0720d628", "score": "0.4947147", "text": "protected function putTranscoderConfigRequest($server_name, $vhost_name, $body)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling putTranscoderConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling putTranscoderConfig'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling putTranscoderConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "12eab1596f26e2bf369225753ae733b9", "score": "0.488832", "text": "protected function createCardSpendingControlUsingPostRequest($request)\n {\n // verify the required parameter 'request' is set\n if ($request === null || (is_array($request) && count($request) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $request when calling createCardSpendingControlUsingPost'\n );\n }\n\n $resourcePath = '/card/spending_control';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($request)) {\n $_tempBody = $request;\n }\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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\\Query::build($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\\Query::build($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "ed19896e157cee9da3e4a2585ea0677a", "score": "0.48512632", "text": "protected function putTranscoderOverlayEncodeConfigRequest($server_name, $vhost_name, $template_name, $overlay_name, $encode_name, $body)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling putTranscoderOverlayEncodeConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling putTranscoderOverlayEncodeConfig'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling putTranscoderOverlayEncodeConfig'\n );\n }\n // verify the required parameter 'overlay_name' is set\n if ($overlay_name === null || (is_array($overlay_name) && count($overlay_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $overlay_name when calling putTranscoderOverlayEncodeConfig'\n );\n }\n // verify the required parameter 'encode_name' is set\n if ($encode_name === null || (is_array($encode_name) && count($encode_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $encode_name when calling putTranscoderOverlayEncodeConfig'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling putTranscoderOverlayEncodeConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder/templates/{templateName}/encodes/{encodeName}/overlays/{overlayName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n // path params\n if ($overlay_name !== null) {\n $resourcePath = str_replace(\n '{' . 'overlayName' . '}',\n ObjectSerializer::toPathValue($overlay_name),\n $resourcePath\n );\n }\n // path params\n if ($encode_name !== null) {\n $resourcePath = str_replace(\n '{' . 'encodeName' . '}',\n ObjectSerializer::toPathValue($encode_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "fd8b754ea5e44d97ee7ecde0fb3afc7c", "score": "0.48325673", "text": "function bbp_post_request()\n{\n}", "title": "" }, { "docid": "a696eca5214430a67d183ef4b9987a8f", "score": "0.48323938", "text": "protected function siteAddPromoCodeRequest($Request): \\GuzzleHttp\\Psr7\\Request\n {\n // verify the required parameter 'Request' is set\n if ($Request === null || (is_array($Request) && count($Request) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $Request when calling siteAddPromoCode'\n );\n }\n\n $resourcePath = '/public/v6/site/addpromocode';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($Request)) {\n $_tempBody = $Request;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'],\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = Utils::jsonEncode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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 = Utils::jsonEncode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('authorization');\n if ($apiKey !== null) {\n $headers['authorization'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('siteId');\n if ($apiKey !== null) {\n $headers['siteId'] = $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\\Query::build($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "30d1828c5c47152a3ae44e472ee02e43", "score": "0.48056626", "text": "function createGatewaysRequest()\n\t{\n\t\t$request \t\t\t\t\t\t\t= \t'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\t\t\t\t\t\t\t\t\t\t\t\t<gateways ua=\"' . $this->plugin_name . ' ' . $this->version \t\t\t\t. '\">\n\t\t\t\t\t\t\t\t\t\t\t\t <merchant>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<account>' . $this->xmlEscape($this->merchant['account_id']) \t. '</account>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<site_id>' . $this->xmlEscape($this->merchant['site_id']) \t\t. '</site_id>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<site_secure_code>' . $this->xmlEscape($this->merchant['site_code']) \t. '</site_secure_code>\n\t\t\t\t\t\t\t\t\t\t\t\t </merchant>\n\t\t\t\t\t\t\t\t\t\t\t\t <customer>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<country>' . $this->xmlEscape($this->customer['country']) \t\t. '</country>\n\t\t\t\t\t\t\t\t\t\t\t\t </customer>\n\t\t\t\t\t\t\t\t\t\t\t\t</gateways>';\n\n\t\treturn $request;\n\t}", "title": "" }, { "docid": "9d62492220455cf5ae84fcec9dd8b8ad", "score": "0.47717378", "text": "public function post() {\n\t\t$post = $this->_route->post;\n\n\t\tif ($post === null) {\n\t\t\tthrow new \\Exception('Invalid JSON in POST of POST of 0mq request : ' . $this->_route->input);\n\t\t}\n\t\t$model = $this->__model();\n\n\t\t$container = $this->container('Entity');\n\n\t\t$entity = $model::create($post);\n\n\t\t$entity->save();\n\n\t\t$container['data'] = $entity->to('array');\n\t\t$container['errors'] = $entity->errors();\n\n\t\treturn $container;\n\t}", "title": "" }, { "docid": "c06c8428264f76ba5821549c927fb234", "score": "0.47606954", "text": "protected function siteGetActivationCodeRequest(): \\GuzzleHttp\\Psr7\\Request\n {\n\n $resourcePath = '/public/v6/site/activationcode';\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', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = Utils::jsonEncode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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 = Utils::jsonEncode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\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\\Query::build($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "8741619bf0c6f109cd6ecbec50f266e5", "score": "0.47393408", "text": "protected function deleteTranscoderOverlayEncodeConfigRequest($server_name, $vhost_name, $template_name, $overlay_name, $encode_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling deleteTranscoderOverlayEncodeConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling deleteTranscoderOverlayEncodeConfig'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling deleteTranscoderOverlayEncodeConfig'\n );\n }\n // verify the required parameter 'overlay_name' is set\n if ($overlay_name === null || (is_array($overlay_name) && count($overlay_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $overlay_name when calling deleteTranscoderOverlayEncodeConfig'\n );\n }\n // verify the required parameter 'encode_name' is set\n if ($encode_name === null || (is_array($encode_name) && count($encode_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $encode_name when calling deleteTranscoderOverlayEncodeConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder/templates/{templateName}/encodes/{encodeName}/overlays/{overlayName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n // path params\n if ($overlay_name !== null) {\n $resourcePath = str_replace(\n '{' . 'overlayName' . '}',\n ObjectSerializer::toPathValue($overlay_name),\n $resourcePath\n );\n }\n // path params\n if ($encode_name !== null) {\n $resourcePath = str_replace(\n '{' . 'encodeName' . '}',\n ObjectSerializer::toPathValue($encode_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 }", "title": "" }, { "docid": "d45b780b465832b4b7b20073c17c02a0", "score": "0.468632", "text": "public function assembleRequest()\n {\n $this->setCode($this->payload['code']);\n }", "title": "" }, { "docid": "1b27fc559887046a2e1ef0e1c082d688", "score": "0.46741462", "text": "protected function postTranscoderTemplateConfigRequest($server_name, $vhost_name, $template_name, $body)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling postTranscoderTemplateConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling postTranscoderTemplateConfig'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling postTranscoderTemplateConfig'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling postTranscoderTemplateConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder/templates/{templateName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 }", "title": "" }, { "docid": "c346f464faea1372820fe3bb9516823b", "score": "0.46735576", "text": "public function postAction()\n\t{\n\t\t$config = Esquire_Config_Factory::getApplicationConfig();\n\t\t$logger = Esquire_Log_Factory::getLogger($config, 'payment');\n\t\t$logger->log('Beginning new payment request', Zend_Log::INFO);\n\n\t\t$invoiceObjects = null;\n\t\t$paymentId = null;\n\t\t$values = json_decode(stripslashes($this->_getParam('values')), true);\n $values['payment_amount'] = number_format(\n\t\t\tpreg_replace('/[^\\d\\.]/', '', $values['payment_amount']), \n\t\t\t2, \n\t\t\t'.', \n\t\t\t''\n\t\t);\n $source = $this->_getParam('source');\n \n\t\ttry {\n\t\t\t\n\t\t\t$payment = Esquire_Payment_Factory::getInstance($config);\n\n /**\n * If coming from cashapp interface the structure of the parameters are\n * different. We add in a couple of keys that are named differently on ECN.\n */\n if (isset($values['PaymentDistribution'])) {\n $invoiceArray = $values['PaymentDistribution'];\n } elseif (isset($values['invoices'])) {\n $invoiceArray = $values['invoices'];\n }\n $logger->log('Invoice Array: ' . print_r($invoiceArray, true), Zend_Log::INFO);\n \n\t\t\tif (count($invoiceArray) > 0) {\n\t\t\t\t$invoiceObjects = $this->_getInvoiceObjects($invoiceArray);\n\t\t\t\tif ($invoiceObjects instanceof Doctrine_Collection) {\n\t\t\t\t\t$logger->log('Got invoice objects ' . $invoiceObjects->count(), Zend_Log::INFO);\n\t\t\t\t} else {\n\t\t\t\t\t$logger->log('Got NO invoices', Zend_Log::INFO);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (count($invoiceArray) > 0) {\n\t\t\t\t$invoices = $payment->setAmountAppliedToInvoice($invoiceArray, $invoiceObjects);\n\t\t\t}\n\t\t\t$success = $payment->createPayment($values, $invoices);\n\t\t\t$logger->log('Payment creation success: ' . $success, Zend_Log::INFO);\n\n\t\t\tif ($success === false) {\n\t\t\t\t$logger->log(\n\t\t\t\t\t'Payment creation error: ' . $payment->getErrorMessage(), \n\t\t\t\t\tZend_Log::ERR\n\t\t\t\t);\n\t\t\t\t$this->getResponse()\n\t\t\t\t\t ->setHttpResponseCode(500);\n\t\t\t\t$this->view->data = array(\n\t\t\t\t\t'success' => false,\n\t\t\t\t\t'error_code' => 10,\n\t\t\t\t\t'error_message' => $payment->getErrorMessage()\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$paymentId = $payment->getPaymentId();\n\t\t} catch (Exception $e) {\n\t\t\t$this->getResponse()\n\t\t\t\t ->setHttpResponseCode(500);\n\t\t\t$this->view->data = array(\n\t\t\t\t'success' => false,\n\t\t\t\t'error_code' => 11,\n\t\t\t\t'error_message' => 'A system error occurred.'\n\t\t\t);\n\t\t\t$logger->log($e->getMessage(), Zend_Log::ERR);\n\t\t\t$logger->log($e->getTraceAsString(), Zend_Log::ERR);\n\t\t\treturn;\n\t\t}\n\n\t\t$commitMessage = '';\n\n /**\n * Call ModPayController. Format $params first in a way that ModPay expects.\n * ModPay will commit payments to Solaria.\n */\n $params = array (\n\t\t\t'card_name' => $values['card_name'],\n\t\t\t'email' => $values['cc_email'], // Customer's billing email address\n\t\t\t'address' => $values['cc_address'],\n\t\t\t'city' => $values['cc_city'],\n\t\t\t'state' => $values['cc_state'],\n\t\t\t'zipcode' => $values['cc_zipcode'],\n\t\t\t'shiptophone' => $values['cc_shiptophone'],\n\t\t\t'card_number' => $values['card_number'],\n\t\t\t'expiration_date' => $values['expiration_date'],\n\t\t\t'payment_amount' => $values['payment_amount'],\n\t\t\t'cvv2' => $values['cvv2'],\n\t\t\t'npc_payment_id' => $paymentId,\n 'source' => $source,\n\t\t\t'payor_name' => $values['card_name'],\n 'transaction_date' => $values['transaction_date']\n\t\t);\n\n if ($invoiceObjects instanceof Doctrine_Collection && $invoiceObjects->count() > 0) {\n $serverBaseUrl = $config->server->url;\n $url = $serverBaseUrl . '/cashapp.php?control=modpay';\n\n\t\t\t/**\n\t\t\t * The old cash app system expects a \"PaymentType\" string:\n\t\t\t * CREDIT-AMERICAN EXPRESS\n\t\t\t * CREDIT-MC\n\t\t\t * CREDIT-VISA\n\t\t\t * CREDIT-DISCOVER\n\t\t\t */\n\t\t\tswitch(substr($values['card_number'], 0, 1)) {\n\t\t\t\tcase 6:\n\t\t\t\t\t$params['PaymentType'] = 'CREDIT-DISCOVER';\n $paymentType = 'CREDIT-DISCOVER';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\t$params['PaymentType'] = 'CREDIT-MC';\n $paymentType = 'CREDIT-MC';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\t$params['PaymentType'] = 'CREDIT-VISA';\n $paymentType = 'CREDIT-VISA';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$params['PaymentType'] = 'CREDIT-AMERICAN EXPRESS';\n $paymentType = 'CREDIT-AMERICAN EXPRESS';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n $client = Esquire_Http_Builder::getInstance($config, $url);\n \n $postVars = array(\n 'control' => 'modpay',\n 'action' => 'processcreditcard',\n 'values' => json_encode($params),\n 'invoices' => json_encode($invoiceArray),\n\t\t\t\t\t'PaymentType' => $paymentType,\n 'entered_login' => $config->system->sys_account_name,\n 'entered_password' => $config->system->sys_key,\n 'login' => $config->system->sys_account_name,\n 'password' => $config->system->sys_key,\n 'paymentId' => $paymentId\n );\n \n $client->setParameterPost(\n $postVars\n );\n\n\t\t\t$json = null;\n\n\t\t\t/**\n\t\t\t * Errors from Modpay shouldn't bubble up\n\t\t\t */\n\t\t\ttry {\n\t\t\t\t$logger->log('Modpay params -- ' . print_r($postVars, true), Zend_Log::INFO);\n\t\t\t\t$logger->log('Modpay URL -- ' . $url, Zend_Log::INFO);\n\t\t\t\t$response = $client->request('POST');\n\t\t\t\t$body = $response->getBody();\n\t\t\t\t$logger->log('Modpay Response -- ' . $body, Zend_Log::INFO);\n\t\t\t\t$json = json_decode($body, true);\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$logger->log(\n\t\t\t\t\t'Caught exception when processing payment - ' . $e->getMessage(), \n\t\t\t\t\tZend_Log::ERR\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$transactionNumber = $paymentId;\n\t\t\twhile(strlen($transactionNumber) < 10) {\n\t\t\t\t$transactionNumber = '0' . $transactionNumber;\n\t\t\t}\n\n\t\t\tif (!empty($json) && $json['success'] == 1) {\n\t\t\t\t$commitMessage = 'Payment successfully applied to invoices. '\n\t\t\t\t\t\t\t . 'Your transaction number is ' . $transactionNumber;\n\t\t\t} else {\n\t\t\t\t$commitMessage = '<b>Warning: </b>We were unable to successfully '\n\t\t\t\t\t\t\t . 'apply this payment to your invoices. Our support '\n\t\t\t\t\t\t\t . 'staff have been notified of the issue and will '\n\t\t\t\t\t\t\t . 'contact you to resolve it.'\n\t\t\t\t\t\t\t . '<br /><br />'\n\t\t\t\t\t\t\t . 'Your transaction number is ' . $transactionNumber;\n\t\t\t}\n } \n\n\t\t$this->getResponse()\n\t\t\t ->setHttpResponseCode(200);\n\n $this->view->data = array(\n\t\t\t'success' => true,\n\t\t\t'message' => $commitMessage,\n\t\t\t'payment_id' => $paymentId\n\t\t);\n\t}", "title": "" }, { "docid": "396ee2ea798775a75893398f1ad2a49d", "score": "0.4658076", "text": "public function processPostData(Request $request)\n {\n /** @var $parameterData ParameterDataContainer */\n $parameterData = $this->getEvent()->getParam('ZendServerGatewayParameterData');\n\n if ($parameterData) {\n $data = $parameterData->getBodyParams();\n return $this->create($data);\n }\n\n return parent::processPostData($request);\n }", "title": "" }, { "docid": "bfbc9166cbc4fd893692372543d4f886", "score": "0.4642425", "text": "public function testBuildPOSTransaction()\n {\n $config = array();\n $amount = '10.00';\n\n $transaction = TransactionBuilder::buildPOSTransaction($config, $amount);\n $this->assertInstanceOf('\\SinglePay\\PaymentService\\Element\\Express\\Type\\Transaction', $transaction);\n $this->assertEquals($transaction->MarketCode, 'Retail');\n $this->assertEquals($transaction->TransactionAmount, '10.00');\n }", "title": "" }, { "docid": "ab5b6ff17e3ebf5e4f75652c57db6cb5", "score": "0.46151787", "text": "protected function setupPost()\n {\n // Check if the token is setup\n if (empty($this->token))\n throw new \\Exception(\"Token not set. Run getToken() first\");\n\n $this->postData = [\n \"withmoney\" => $this->money,\n \"withfood\" => $this->food,\n \"withcoal\" => $this->coal,\n \"withoil\" => $this->oil,\n \"withuranium\" => $this->uranium,\n \"withlead\" => $this->lead,\n \"withiron\" => $this->iron,\n \"withbauxite\" => $this->bauxite,\n \"withgasoline\" => $this->gasoline,\n \"withmunitions\" => $this->munitions,\n \"withsteel\" => $this->steel,\n \"withaluminum\" => $this->aluminum,\n \"withtype\" => $this->type,\n \"withrecipient\" => $this->recipient,\n \"withnote\" => $this->note,\n \"withsubmit\" => \"Withdraw\",\n \"token\" => $this->token,\n ];\n\n }", "title": "" }, { "docid": "d92a4c747467fab7ea4df0099ee5a728", "score": "0.46089575", "text": "protected function postTranscoderTemplatesConfigRequest($server_name, $vhost_name, $body)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling postTranscoderTemplatesConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling postTranscoderTemplatesConfig'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling postTranscoderTemplatesConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder/templates';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 }", "title": "" }, { "docid": "e7b7485e95882e3d37d90180ee7d4981", "score": "0.4607234", "text": "public function createRequest() {\n $query = [];\n $config = $this->configFactory->get('open_weather_map.settings');\n $key_config = $this->configFactory->get('open_weather_map.settings')->get('key');\n $query['appid'] = Html::escape($key_config);\n $cityname = Html::escape($config->get('cityname'));\n $country_code = Html::escape($config->get('country_code'));\n\n $query['q'] = $cityname . \",\" . $country_code;\n return $query;\n }", "title": "" }, { "docid": "dd41ff4373e47ffa21bc16109ee0870b", "score": "0.4593886", "text": "protected function putTranscoderOverlayDecodeConfigRequest($server_name, $vhost_name, $template_name, $overlay_name, $body)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling putTranscoderOverlayDecodeConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling putTranscoderOverlayDecodeConfig'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling putTranscoderOverlayDecodeConfig'\n );\n }\n // verify the required parameter 'overlay_name' is set\n if ($overlay_name === null || (is_array($overlay_name) && count($overlay_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $overlay_name when calling putTranscoderOverlayDecodeConfig'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling putTranscoderOverlayDecodeConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder/templates/{templateName}/decode/overlays/{overlayName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n // path params\n if ($overlay_name !== null) {\n $resourcePath = str_replace(\n '{' . 'overlayName' . '}',\n ObjectSerializer::toPathValue($overlay_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "9671a76640f79574dba6bbe0f0a8d223", "score": "0.45709345", "text": "protected function createCardReplaceUsingPostRequest($request)\n {\n // verify the required parameter 'request' is set\n if ($request === null || (is_array($request) && count($request) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $request when calling createCardReplaceUsingPost'\n );\n }\n\n $resourcePath = '/card/replace';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($request)) {\n $_tempBody = $request;\n }\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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\\Query::build($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\\Query::build($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "7f3770400f85297747dc38ae72b06541", "score": "0.4564681", "text": "function montaEnvio($arrPost){\r\n\t$opts = array(\r\n\t\t'http'=>array(\r\n\t\t\t'header'=>\"Content-type: application/x-www-form-urlencoded\",\r\n\t\t\t'method'=>'POST',\r\n\t\t\t'content'=>http_build_query($arrPost),\r\n\t\t)\r\n\t);\r\n\r\n\treturn $opts;\r\n}", "title": "" }, { "docid": "1d2bc9653a2c224fc67744a381c8c448", "score": "0.45629907", "text": "protected function _postRequest(Varien_Object $request)\n {\n $helper = $this->_getHelper();\n $debugData = array('request' => $request);\n $result = Mage::getModel('payments/payments_result');\n\n $client = $this->_getApiClient();\n $client->setRawData(json_encode($request->getData()), 'application/json');\n\n try {\n $response = $client->request();\n } catch (Exception $ex) {\n $result\n ->setResponseCode(self::RESPONSE_CODE_FAILURE)\n ->setResponseReasonCode($ex->getCode())\n ->setResponseReasonText($ex->getMessage());\n\t\t\t\n $debugData['result'] = $result->getData();\n//TODO implement debug\n// $this->_debug($debugData);\n\t\t\tMage::log($ex->getMessage(),NULL,'debgs.log');\n Mage::throwException($this->_wrapGatewayError($ex->getMessage()));\n }\n\n $responseAsArray = json_decode($response->getBody(), true);\n\n try {\n if (!is_array($responseAsArray)) {\n throw new Zooz_Payments_Exception($helper->__('Not able to deserialize response'));\n }\n\n if ($responseAsArray['responseStatus'] != 0) {\n throw new Zooz_Payments_Exception(\n $responseAsArray['responseObject']['errorDescription'],\n $responseAsArray['responseObject']['responseErrorCode']\n );\n }\n } catch (Zooz_Payments_Exception $ex) {\n $message = Mage::helper('payments')->handleError($responseAsArray['responseObject']);\n $result\n ->setResponseCode(self::RESPONSE_CODE_FAILURE)\n ->setResponseReasonCode($ex->getFields())\n\t ->setResponseReasonText($message);\n\t \n $debugData['result'] = $result->getData();\n//TODO implement debug\n// $this->_debug($debugData);\n\n return $result;\n }\n\n $result\n ->setResponseCode(self::RESPONSE_CODE_SUCCESS)\n ->addData($responseAsArray['responseObject']);\n\n\n $debugData['result'] = $result->getData();\n//TODO implement debug\n// $this->_debug($debugData);\n return $result;\n }", "title": "" }, { "docid": "48b2dced36308e3cbb49fed0f7e76e45", "score": "0.45521924", "text": "protected function _postRequest(array $request)\n {\n \t$client = new Varien_Http_Client();\n \t$client->setUri($this->getRefundUrl());\n \t\n \tMage::log(\"RequestURL : \".$this->getRefundUrl(), null, 'eximbay'.Mage::getModel('core/date')->date('Y-m-d').'.log');\n \t\n \t$client->setConfig(array(\n \t\t\t'maxredirects'=>0,\n \t\t\t'timeout'=>30,\n \t\t\t//'ssltransport' => 'tcp',\n \t));\n\n \t$client->setParameterPost($request);\n \t$client->setMethod(Zend_Http_Client::POST);\n \t\n \t$result = array();\n \ttry {\n \t\t$response = $client->request();\n \t} catch (Exception $e) {\n \t\t$result['rescode'] = $e->getCode();\n \t\t$result['resmsg'] = $e->getMessage();\n\n \t\tMage::throwException(Mage::helper('eximbay')->__('Gateway error: %s', ($e->getMessage())));\n \t}\n \n \t$responseBody = trim($response->getBody());\n \tMage::log(\"Raw Response Data : \".$responseBody, null, 'eximbay'.Mage::getModel('core/date')->date('Y-m-d').'.log');\n\n \tMage::log(\"------------- Mapped Response -------------\", null, 'eximbay'.Mage::getModel('core/date')->date('Y-m-d').'.log');\n \tparse_str($responseBody, $data);\n \tforeach ($data as $key => $value) {\n \t\t$result[$key] = $value;\n \t\tMage::log($key.\" : \".$result[$key], null, 'eximbay'.Mage::getModel('core/date')->date('Y-m-d').'.log');\n \t}\n \t\n \tif (empty($result['rescode'])) {\n \t\tMage::throwException(Mage::helper('eximbay')->__('Error in payment gateway.'));\n \t}\n \n \treturn $result;\n }", "title": "" }, { "docid": "6e3b7e43fd7196a4c093a1905b9ba4df", "score": "0.4550867", "text": "public function sendPostRequest();", "title": "" }, { "docid": "647e7f2f53b6efbb107e277ccb4d7b92", "score": "0.45390037", "text": "protected function interoperabilityV10RegisterRequest($register_request)\n {\n // verify the required parameter 'register_request' is set\n if ($register_request === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $register_request when calling interoperabilityV10Register');\n }\n\n $resourcePath = '/api/interoperabilidad/api/v1_0/registrar';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($register_request)) {\n $_tempBody = $register_request;\n }\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n ['application/json', 'text/json', 'application/x-www-form-urlencoded']\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 $httpBody = new MultipartStream($multipartContents); // for HTTP post (form)\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams); // for HTTP post (form)\n }\n }\n\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n $url = $this->config->getHost() . $resourcePath . ($query ? '?' . $query : '');\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 return new Request(\n 'POST',\n $url,\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "a20be109cbc4dff1171045823406cf2f", "score": "0.45288998", "text": "function createUpdateTransactionRequest()\n\t{\n\t\t$request \t\t\t\t\t\t\t= \t'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\t\t\t\t\t\t\t\t\t\t\t\t<updatetransaction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<merchant>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<account>' . $this->xmlEscape($this->merchant['account_id']) . '</account>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<site_id>' . $this->xmlEscape($this->merchant['site_id']) . '</site_id>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<site_secure_code>' . $this->xmlEscape($this->merchant['site_code']) . '</site_secure_code>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</merchant>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<transaction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<id>' . $this->xmlEscape($this->transaction['id']) . '</id>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<invoiceid>' . $this->xmlEscape($this->transaction['invoice_id']) . '</invoiceid>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<shipdate>' . $this->xmlEscape($this->transaction['shipdate']) \t. '</shipdate>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</transaction>\n\t\t\t\t\t\t\t\t\t\t\t\t</updatetransaction>';\n \n\t\treturn $request;\n\t}", "title": "" }, { "docid": "b996f065293506e5ba5466ef44972890", "score": "0.45283926", "text": "private function buildRequest()\n {\n return [\n 'AppKey' => $this->accessKey,\n 'Secret' => $this->secretKey,\n $this->dataKey => [],\n $this->deleteKey => [],\n 'Format' => 'magentoplugin1.0.0'\n ];\n }", "title": "" }, { "docid": "0df24573ab2833da88966ec490702cae", "score": "0.45276445", "text": "protected function postIntegrationsRequest($body = null)\n {\n\n $resourcePath = '/api/v2/integrations';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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 }", "title": "" }, { "docid": "2fbae21ef638aa8d42dc0d52f2e76b11", "score": "0.45195347", "text": "protected function getTranscoderOverlayDecodeConfigRequest($server_name, $vhost_name, $template_name, $overlay_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getTranscoderOverlayDecodeConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getTranscoderOverlayDecodeConfig'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling getTranscoderOverlayDecodeConfig'\n );\n }\n // verify the required parameter 'overlay_name' is set\n if ($overlay_name === null || (is_array($overlay_name) && count($overlay_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $overlay_name when calling getTranscoderOverlayDecodeConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder/templates/{templateName}/decode/overlays/{overlayName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n // path params\n if ($overlay_name !== null) {\n $resourcePath = str_replace(\n '{' . 'overlayName' . '}',\n ObjectSerializer::toPathValue($overlay_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 }", "title": "" }, { "docid": "d305d75c0f8040b234a06441d2494ee1", "score": "0.45106417", "text": "abstract protected function _buildPostAuthorizationRequest(Request $request);", "title": "" }, { "docid": "04460052d29bc64845549ff92d2edf5d", "score": "0.44720706", "text": "protected function createAdConfigRequest($body, $x_sds_auth_token = null)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createAdConfig'\n );\n }\n\n $resourcePath = '/v4/system/config/auth/ads';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // header params\n if ($x_sds_auth_token !== null) {\n $headerParams['X-Sds-Auth-Token'] = ObjectSerializer::toHeaderValue($x_sds_auth_token);\n }\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\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 // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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 }", "title": "" }, { "docid": "4fa506df9b49592068b5789ba01aef8d", "score": "0.4471341", "text": "abstract protected function buildPostAuthorizationRequest(Request $request);", "title": "" }, { "docid": "128d403b18c4b8fba4cd444b4673b862", "score": "0.44549417", "text": "abstract public function buildRequest();", "title": "" }, { "docid": "40b7315d3392a393d46fccc6df9f2250", "score": "0.4448815", "text": "protected function configureRequest()\n {\n $this->transporter\n ->setMethod('addRecords')\n ->setParam('version', 4);\n }", "title": "" }, { "docid": "afcdfcc5efe7a2ea7d69675635fbfe1c", "score": "0.44422156", "text": "public function create_request($data)\n {\n $data = array_merge($this->_parameters, $data);\n $res = $this->_client->call('bpPayRequest', $data, $this->namespace);\n if ($this->_client->fault) {\n $this->_result = $res;\n } else {\n $res = explode(',', $res['return']);\n if(2 == count($res)) {\n $this->_result = [\n 'ResCode' => $res[0],\n 'RefId' => $res[1] ?? '',\n ];\n } else {\n $this->_result = -1000;\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "20fac31ef4d0cec1f1fef97060ac013b", "score": "0.44373044", "text": "public function create(Request $request)\n {\n $command = new WalletCreateCommand(\n $request->get('value'),\n $request->get('typeId')\n );\n\n if (false === $this->commandIsValid($command)) {\n return $this->json([\n 'errors' => $this->getLastValidationErrors(),\n ], Response::HTTP_NOT_ACCEPTABLE);\n }\n\n return $this->json($this->createService->execute($command));\n }", "title": "" }, { "docid": "cfa8195f95e9555202748cb1f23fea19", "score": "0.4428008", "text": "function nordname_GetEPPCode($params) {\n // user defined configuration values\n $apiKey = $params['api_key'];\n $sandbox = ($params['sandbox'] == \"on\") ? true : false;\n\n // registration parameters\n $sld = idn_to_ascii($params[\"original\"][\"sld\"]);\n $tld = $params['tld'];\n\n // Build post data\n $getfields = array(\n 'api_key' => $apiKey,\n );\n\n try {\n $api = new ApiClient();\n $reply = $api->call(\"PUT\", \"domain/\" . $sld . '.' . $tld . \"/sendEPP\", $getfields,\"\", $sandbox);\n \n return array(\n 'success' => 'success',\n );\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n}", "title": "" }, { "docid": "a223d8ff93773708b1a82b7691861d45", "score": "0.44141385", "text": "public function testIncludesParametersForSignatureOnPostEncUrlEncoded()\n {\n $client = new Test_Oauth_Client([]);\n $client->setEncType(Zend_Http_Client::ENC_URLENCODED);\n $params = [\n 'param1' => 'dummy1',\n 'param2' => 'dummy2',\n ];\n $client->setParameterPost($params);\n $client->setMethod(Zend_Http_Client::POST);\n $this->assertEquals(2, count($client->getSignableParametersAsQueryString()));\n }", "title": "" }, { "docid": "fe4121351c7ec05d30e5d449459e0edc", "score": "0.4405814", "text": "protected function deleteTranscoderOverlayDecodeConfigRequest($server_name, $vhost_name, $template_name, $overlay_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling deleteTranscoderOverlayDecodeConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling deleteTranscoderOverlayDecodeConfig'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling deleteTranscoderOverlayDecodeConfig'\n );\n }\n // verify the required parameter 'overlay_name' is set\n if ($overlay_name === null || (is_array($overlay_name) && count($overlay_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $overlay_name when calling deleteTranscoderOverlayDecodeConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder/templates/{templateName}/decode/overlays/{overlayName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n // path params\n if ($overlay_name !== null) {\n $resourcePath = str_replace(\n '{' . 'overlayName' . '}',\n ObjectSerializer::toPathValue($overlay_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 }", "title": "" }, { "docid": "6754a3a1f66d071d16ce81f9c578f9e8", "score": "0.440555", "text": "protected function _buildRequestUri()\n {\n $requestParameters = array();\n\n // add entity\n if (!empty($this->_options['entity'])) {\n $tmp = array_keys($this->_options['entity']);\n $key = array_pop($tmp);\n $requestParameters[] = 'entity=' . $this->_options['entity'][$key];\n }\n\n // add media type\n if (!empty($this->_options['mediaType'])) {\n $requestParameters[] = 'media=' . $this->_options['mediaType'];\n }\n\n // add attribute\n if (!empty($this->_options['attribute'])) {\n $requestParameters[] = 'attribute=' . $this->_options['attribute'];\n }\n\n // add language\n if (!empty($this->_options['language'])) {\n $requestParameters[] = 'lang=' . $this->_options['language'];\n }\n\n // add limit\n if ($this->_options['limit'] <> 100) {\n $requestParameters[] = 'limit=' . $this->_options['limit'];\n }\n\n // add country\n if ($this->_options['country'] != 'us') {\n $requestParameters[] = 'country=' . $this->_options['country'];\n }\n\n // add callback\n if (!empty($this->_options['callback'])) {\n $requestParameters[] = 'callback=' . $this->_options['callback'];\n }\n\n // add version\n if ($this->_options['version'] <> 2) {\n $requestParameters[] = 'version=' . $this->_options['version'];\n }\n\n // add explicity\n if ($this->_options['explicit'] != 'yes') {\n $requestParameters[] = 'explicit=' . $this->_options['explicit'];\n }\n\n return implode('&', $requestParameters);\n }", "title": "" }, { "docid": "9013307b7c705831d2901b07fffe7b9f", "score": "0.4403273", "text": "protected function _buildRequest(Varien_Object $payment)\n {\n \t$order = $payment->getOrder();\n \n \t$order_id = $order->getRealOrderId();\n \t$secretKey = Mage::getStoreConfig('payment/'.$this->getPaymentMethodCode().'/secret_key');\n \t$mid = Mage::getStoreConfig('payment/'.$this->getPaymentMethodCode().'/mid');\n \t$ref = $order_id;\n \t$cur = $order->getBaseCurrencyCode();\n \t$amt = round($this->getOrder()->getGrandTotal(), 2);\n \tif($cur == 'KRW' || $cur == 'JPY' || $cur == 'VND')\n \t{\n \t\t$amt = round($this->getOrder()->getGrandTotal(), 0, PHP_ROUND_HALF_UP);\n \t}\n \t\n \t$linkBuf = $secretKey. \"?mid=\" . $mid .\"&ref=\" . $ref .\"&cur=\" .$cur .\"&amt=\" .$amt;\n \t\n \t//$fgkey = md5($linkBuf);\n \t$fgkey = hash(\"sha256\", $linkBuf);\n \t\n \t$txntype = 'REFUND';\n \t\n \t$params = array(\n \t\t\t'ver' \t\t\t\t=> '210',\n \t\t\t'mid' \t\t\t\t=> $mid,\n \t\t\t'txntype' \t\t\t=> $txntype,\n \t\t\t'refundtype' \t\t=> $payment->getRefundType(),\n \t\t\t'charset'\t \t\t=> 'UTF-8',\n \t\t\t'ref' \t\t=> $ref,\n \t\t\t'fgkey' \t\t=> $fgkey,\n \t\t\t'lang' \t=> $this->getLocale(),\n \t\t\t'amt' \t=> $amt,\n \t\t\t'cur' \t\t=> $cur,\n \t\t\t'refundamt'\t\t\t\t=> $payment->getRefundAmt(),\n \t\t\t'transid'\t\t\t\t=> $payment->getEximbayTransId(),\n \t\t\t'reason'\t\t\t\t=> 'Merchant Request' \t\t\t\n \t);\n \t \t\n \tMage::log($params, null, 'eximbay'.Mage::getModel('core/date')->date('Y-m-d').'.log');\n \t\n \treturn $params;\n }", "title": "" }, { "docid": "b8a2b6fac0a0c2855d9d2bc941910f8e", "score": "0.43774194", "text": "function __service_request_node_create($request) {\n\t$request = _services_arg_value($request, 'request');\n\n $node = (object) NULL;\n \n foreach ($request as $key => $value) {\n $node->$key = $value;\n }\n\n if (isset($node->field_order_type['und']) && $node->field_order_type['und'][0]['value'] == 2) $node->comment = 2;\n\n node_save($node);\n\n // -- create responce\n if (isset($node->nid)) {\n $responce = array(\n 'nid' => $node->nid,\n 'path' => $node->path,\n );\n }\n else return services_error('Invalid data. Request was not created.', 404);\n \n return $responce;\n}", "title": "" }, { "docid": "5b3dbc94b2e807b53969ce8c8c8d38ff", "score": "0.43549168", "text": "public function createAction(Request $request) {\n $entity = new CodesPostaux();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('codespostaux_show', array('id' => $entity->getId())));\n }\n\n return $this->render('Nfe102RestoBundle:CodesPostaux:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c6c4ef04108349bd6c3c36b9b49743ae", "score": "0.43376952", "text": "protected function _ConstructPostData($postData)\n\t\t{\n\n\t\t\t$ccname \t\t= $postData['name'];\n\t\t\t$cctype \t\t= $postData['cctype'];\n\n\t\t\t$ccissueno \t\t= $postData['ccissueno'];\n\t\t\t$ccissuedatem \t= $postData['ccissuedatem'];\n\t\t\t$ccissuedatey \t= $postData['ccissuedatey'];\n\n\t\t\t$ccnum \t\t\t= $postData['ccno'];\n\t\t\t$ccexpm \t\t= $postData['ccexpm'];\n\t\t\t$ccexpy \t\t= $postData['ccexpy'];\n\t\t\t$cccvd \t\t\t= $postData['cccvd'];\n\n\t\t\t$transactionid\t= $this->GetCombinedOrderId();\n\t\t\t$terminalid = $this->GetValue('terminalid');\n\t\t\t$operatorid = $this->GetValue('operatorid');\n\n\t\t\t$billingDetails = $this->GetBillingDetails();\n\n\t\t\t$caledonPost['TERMID'] = $terminalid;\n\t\t\t$caledonPost['TYPE'] = 'S';\n\t\t\t$caledonPost['OPERID'] = $operatorid;\n\t\t\t$caledonPost['CARD'] = $ccname;\n\t\t\t$caledonPost['EXP'] = $ccexpm.$ccexpy;\n\t\t\t$caledonPost['AMT'] = $this->GetGatewayAmount()*100;\n\t\t\t$caledonPost['CVV2'] = $cccvd;\n\t\t\t$caledonPost['AVS'] = $billingDetails['ordbillstreet1'] . ' ' . $billingDetails['ordbillstreet2'];\n\t\t\t$caledonPost['REF'] = $this->GetCombinedOrderId();\n\n\t\t\treturn http_build_query($caledonPost);\n\t\t}", "title": "" }, { "docid": "88eb47261ef3a8935ae2f2eaec9c5c31", "score": "0.43356806", "text": "protected function getSymbolsRequest()\n {\n\n $resourcePath = '/symbols';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\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-Token');\n if ($apiKey !== null) {\n $headers['X-API-Token'] = $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 }", "title": "" }, { "docid": "593d7543e8af337344481f80f30afc7c", "score": "0.43356222", "text": "public function configRequest(string $contentType = self::contentTypes['config'][0])\n {\n\n\n $resourcePath = '/config';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $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 $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'GET',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "24233c849c66f8be7292190d0bfba3f1", "score": "0.43196982", "text": "public function toRequest() {\n\t\t// add all attributes back to the request\n\t\tforeach($this->attributes as $key => $attribute) {\n\t\t\t$this->parameters[$key] = $attribute;\n\t\t}\n\t}", "title": "" }, { "docid": "f8b9a42e463061f82a2be7443fff2a81", "score": "0.4317826", "text": "protected function createCardSuspendUsingPostRequest($suspend_request)\n {\n // verify the required parameter 'suspend_request' is set\n if ($suspend_request === null || (is_array($suspend_request) && count($suspend_request) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $suspend_request when calling createCardSuspendUsingPost'\n );\n }\n\n $resourcePath = '/card/suspend';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($suspend_request)) {\n $_tempBody = $suspend_request;\n }\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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\\Query::build($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\\Query::build($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "c552156621ee30de0b580a928060f564", "score": "0.43161064", "text": "public function postImport()\n {\n return [\n 'method' => 'POST',\n 'path' => 'domains/import',\n 'jsonKey' => 'domains',\n 'params' => [\n 'domains' => $this->params->domainsJson(),\n ],\n ];\n }", "title": "" }, { "docid": "a00a5e80bdd594dc725c0db111fa9792", "score": "0.4310617", "text": "public function createHttpRequest(array $request)\n {\n return $this->transferBuilder\n ->setBody($request)\n ->setMethod('POST')\n ->setHeaders(array('content-type:application/json'))\n ->setUri('https://secure.citypay.com/paylink3/create')\n ->build();\n }", "title": "" }, { "docid": "7e3b23d30734c93eae85a429127c8306", "score": "0.43012738", "text": "protected function buildRequest() {\r\n\t\t$request = $this->objectManager->get('Tx_Extbase_MVC_Web_Request'); /* @var $request Tx_Extbase_MVC_Request */\r\n\t\t$request->setControllerExtensionName($this->extensionName);\r\n\t\t$request->setPluginName($this->actionName);\r\n\t\t$request->setControllerName($this->controllerName);\r\n\t\t$request->setControllerActionName($this->actionName);\r\n\t\t$request->setArguments($this->arguments);\r\n\t\t\r\n\t\treturn $request;\r\n\t}", "title": "" }, { "docid": "59699e9b6ec93291f2b2e9bb36bee43e", "score": "0.42998108", "text": "public function gatewayPostFields() {\n $gateway = array(\n 'trans-id' => (isset($_POST['txn_id']) ? $_POST['txn_id'] : ''),\n 'amount' => (isset($_POST['mc_gross']) ? number_format($_POST['mc_gross'], 2, '.', '') : ''),\n 'refund-amount' => (isset($_POST['mc_gross']) ? number_format($_POST['mc_gross'], 2, '.', '') : ''),\n 'currency' => (isset($_POST['mc_currency']) ? $_POST['mc_currency'] : ''),\n 'code-id' => (isset($_POST['custom']) ? $_POST['custom'] : ''),\n 'pay-status' => (isset($_POST['payment_status']) ? $_POST['payment_status'] : ''),\n 'pending-reason' => (isset($_POST['pending_reason']) ? $this->pendingReasons($_POST['pending_reason']) : ''),\n 'inv-status' => '',\n 'fraud-status' => ''\n );\n return $gateway;\n }", "title": "" }, { "docid": "97f60bd3f1b90dcb0d5e40d6d5c86f0f", "score": "0.429599", "text": "protected function interoperabilityV10ChangePasswordRequest()\n {\n\n $resourcePath = '/api/interoperabilidad/api/v1_0/cambioContrasena';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n []\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 $httpBody = new MultipartStream($multipartContents); // for HTTP post (form)\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams); // for HTTP post (form)\n }\n }\n\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n $url = $this->config->getHost() . $resourcePath . ($query ? '?' . $query : '');\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 return new Request(\n 'PUT',\n $url,\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "6476177d1a491d605940932ce6455451", "score": "0.42935818", "text": "public static function update_codehandin_parameters() {\r\n return new external_function_parameters(array(\r\n 'codehandin' => new external_value(PARAM_RAW, \"The test as a String, JSON Object\")\r\n ));\r\n }", "title": "" }, { "docid": "4bd8ad69ec76eef04d5b95132ef70f94", "score": "0.42869157", "text": "protected function createRequest()\n {\n $this->request = new RequestBuilder(\n (string)$this->options['store_code'],\n (isset($this->options['timestamp']) ? (bool)$this->options['timestamp'] : true)\n );\n\n return $this;\n }", "title": "" }, { "docid": "f69dda1fe886227ae04c611da5f77fea", "score": "0.42848358", "text": "function createTransactionRequest()\n\t{\n\t\t$issuer \t\t\t\t\t\t\t= \t\"\";\n\t\tif (!empty($this->issuer))\n\t\t{\n\t\t\t$issuer \t\t\t\t\t\t=\t' issuer=\"'.$this->xmlEscape($this->issuer).'\"';\n\t\t}\n \n\t\t$request \t\t\t\t\t\t\t= \t'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\t\t\t\t\t\t\t\t\t\t\t\t<redirecttransaction ua=\"' . $this->plugin_name . ' ' . $this->version \t\t\t\t. '\">\n\t\t\t\t\t\t\t\t\t\t\t\t <merchant>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<account>' . $this->xmlEscape($this->merchant['account_id']) \t\t\t. '</account>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<site_id>' . $this->xmlEscape($this->merchant['site_id']) \t\t\t\t. '</site_id>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<site_secure_code>' . $this->xmlEscape($this->merchant['site_code']) \t\t\t. '</site_secure_code>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<notification_url>' . $this->xmlEscape($this->merchant['notification_url']) \t. '</notification_url>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<cancel_url>' . $this->xmlEscape($this->merchant['cancel_url']) \t\t\t. '</cancel_url>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<redirect_url>' . $this->xmlEscape($this->merchant['redirect_url']) \t\t. '</redirect_url>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<close_window>' . $this->xmlEscape($this->merchant['close_window']) \t\t. '</close_window>\n\t\t\t\t\t\t\t\t\t\t\t\t </merchant>\n\t\t\t\t\t\t\t\t\t\t\t\t <plugin>\n\t\t\t\t\t\t\t\t\t\t\t\t\t <shop>' . \t $this->xmlEscape($this->plugin['shop']) \t\t\t\t\t. '</shop>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<shop_version>' . $this->xmlEscape($this->plugin['shop_version']) \t\t\t. '</shop_version>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<plugin_version>' . $this->xmlEscape($this->plugin['plugin_version']) \t\t. '</plugin_version>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<partner>' . $this->xmlEscape($this->plugin['partner']) \t\t\t\t. '</partner>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<shop_root_url>' . $this->xmlEscape($this->plugin['shop_root_url']) \t\t\t. '</shop_root_url>\n\t\t\t\t\t\t\t\t\t\t\t\t </plugin>\n\t\t\t\t\t\t\t\t\t\t\t\t <customer>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<locale>' . $this->xmlEscape($this->customer['locale']) \t\t\t\t. '</locale>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ipaddress>' . $this->xmlEscape($this->customer['ipaddress']) \t\t\t. '</ipaddress>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<forwardedip>' . $this->xmlEscape($this->customer['forwardedip']) \t\t\t. '</forwardedip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<firstname>' . $this->xmlEscape($this->customer['firstname']) \t\t\t. '</firstname>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<lastname>' . $this->xmlEscape($this->customer['lastname']) \t\t\t. '</lastname>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<address1>' . $this->xmlEscape($this->customer['address1']) \t\t\t. '</address1>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<address2>' . $this->xmlEscape($this->customer['address2']) \t\t\t. '</address2>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<housenumber>' . $this->xmlEscape($this->customer['housenumber']) \t\t\t. '</housenumber>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<zipcode>' . $this->xmlEscape($this->customer['zipcode']) \t\t\t\t. '</zipcode>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<city>' . $this->xmlEscape($this->customer['city']) \t\t\t\t. '</city>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<state>' . $this->xmlEscape($this->customer['state']) \t\t\t\t. '</state>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<country>' . $this->xmlEscape($this->customer['country']) \t\t\t\t. '</country>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<phone>' . $this->xmlEscape($this->customer['phone']) \t\t\t\t. '</phone>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<email>' . $this->xmlEscape($this->customer['email']) \t\t\t\t. '</email>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<referrer>' . $this->xmlEscape($this->customer['referrer']) \t\t\t. '</referrer>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<user_agent>' . $this->xmlEscape($this->customer['user_agent']) \t\t\t. '</user_agent>\n\t\t\t\t\t\t\t\t\t\t\t\t </customer>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<customer-delivery>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<firstname>' . $this->xmlEscape($this->delivery['firstname']) \t. '</firstname>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<lastname>' . $this->xmlEscape($this->delivery['lastname']) \t. '</lastname>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<address1>' . $this->xmlEscape($this->delivery['address1']) \t. '</address1>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<address2>' . $this->xmlEscape($this->delivery['address2']) \t. '</address2>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<housenumber>' . $this->xmlEscape($this->delivery['housenumber']) \t. '</housenumber>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<zipcode>' . $this->xmlEscape($this->delivery['zipcode']) \t\t. '</zipcode>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<city>' . $this->xmlEscape($this->delivery['city']) \t\t. '</city>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<state>' . $this->xmlEscape($this->delivery['state']) \t\t. '</state>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<country>' . $this->xmlEscape($this->delivery['country']) \t\t. '</country>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<phone>' . $this->xmlEscape($this->delivery['phone']) \t\t. '</phone>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<email>' . $this->xmlEscape($this->delivery['email']) \t\t. '</email>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</customer-delivery>\n\t\t\t\t\t\t\t\t\t\t\t\t <transaction>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<id>' . $this->xmlEscape($this->transaction['id']) \t\t\t\t. '</id>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<currency>' . $this->xmlEscape($this->transaction['currency']) \t\t\t. '</currency>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<amount>' . $this->xmlEscape($this->transaction['amount']) \t\t\t. '</amount>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<description>' . $this->xmlEscape($this->transaction['description']) \t\t. '</description>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<var1>' . $this->xmlEscape($this->transaction['var1']) \t\t\t\t. '</var1>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<var2>' . $this->xmlEscape($this->transaction['var2']) \t\t\t\t. '</var2>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<var3>' . $this->xmlEscape($this->transaction['var3']) \t\t\t\t. '</var3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<items>' . $this->xmlEscape($this->transaction['items']) \t\t\t. '</items>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<manual>' . $this->xmlEscape($this->transaction['manual']) \t\t\t. '</manual>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<daysactive>' . $this->xmlEscape($this->transaction['daysactive']) \t\t. '</daysactive>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<gateway'.$issuer.'>'.$this->xmlEscape($this->transaction['gateway']) \t\t\t. '</gateway>\n\t\t\t\t\t\t\t\t\t\t\t\t </transaction>\n\t\t\t\t\t\t\t\t\t\t\t\t <signature>' . $this->xmlEscape($this->signature) \t\t\t\t\t\t. '</signature>\n\t\t\t\t\t\t\t\t\t\t\t\t</redirecttransaction>';\n \n\t\treturn $request;\n\t}", "title": "" }, { "docid": "e81a9d6a196c1ee29fb7d7e8f319209e", "score": "0.42780197", "text": "protected function postReplenishmentRequest($body = null)\n {\n\n $resourcePath = '/retailer/replenishments';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/vnd.retailer.v5+json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/vnd.retailer.v5+json'],\n ['application/vnd.retailer.v5+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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 }", "title": "" }, { "docid": "f119e06bce6a07369bd392187fb81357", "score": "0.427731", "text": "protected function customerAccountManagementV1CreateAccountPostRequest($body = null)\n {\n\n $resourcePath = '/V1/customers';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\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\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 }", "title": "" }, { "docid": "afa80262c75cef9e8409b9492ee95807", "score": "0.4276475", "text": "public function getPaymentCreateRequest() {\n $data = null;\n if ($this->amount && $this->currency) {\n // capture pre-authorized payment\n if ($this->parentTransactionId) {\n $data = array(\n \"amount\" => $this->amount,\n \"description\" => $this->description,\n \"authorization\" => $this->parentTransactionId,\n \"reference\" => $this->reference,\n \"currency\" => $this->currency\n );\n }\n // authorize/capture payment using Simplify customer identifier\n else if ($this->cardId) {\n $data = array(\n \"amount\" => $this->amount,\n \"description\" => $this->description,\n \"customer\" => $this->cardId,\n \"reference\" => $this->reference,\n \"currency\" => $this->currency\n );\n }\n // authorize/capture payment using card token\n else if ($this->cardToken) {\n $data = array(\n \"amount\" => $this->amount,\n \"description\" => $this->description,\n \"token\" => $this->cardToken,\n \"reference\" => $this->reference,\n \"currency\" => $this->currency\n );\n }\n // authorize/capture payment using raw card data\n else if ($this->cardNumber) {\n $data = array(\n \"amount\" => $this->amount,\n \"description\" => $this->description,\n \"card\" => array(\n \"expYear\" => $this->expirationYear,\n \"expMonth\" => $this->expirationMonth, \n \"cvc\" => $this->cvc,\n \"number\" => $this->cardNumber\n ),\n \"reference\" => $this->reference,\n \"currency\" => $this->currency\n );\n if ($this->billing) {\n $data[\"card\"][\"name\"] = $this->billing->getName();\n $data[\"card\"][\"addressCity\"] = $this->billing->getCity();\n $data[\"card\"][\"addressLine1\"] = $this->billing->getStreetLine(1);\n $data[\"card\"][\"addressLine2\"] = $this->billing->getStreetLine(2);\n $data[\"card\"][\"addressZip\"] = $this->billing->getPostcode();\n $data[\"card\"][\"addressState\"] = $this->billing->getRegion();\n $data[\"card\"][\"addressCountry\"] = $this->billing->getCountryId();\n }\n } \n }\n return $data;\n }", "title": "" }, { "docid": "414400832037e5abef8255cd4dfb728b", "score": "0.42764536", "text": "protected function getTranscoderTemplatesConfigRequest($server_name, $vhost_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getTranscoderTemplatesConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getTranscoderTemplatesConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/transcoder/templates';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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\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 }", "title": "" }, { "docid": "066154917750e2868a3927d96d559b2b", "score": "0.4275114", "text": "public function create(array $request)\n {\n $apiReques = [];\n $url = $this->getUrl();\n $apiRequest[\"Token\"] = $request[\"Token\"];\n $apiRequest[\"Amount\"] = $request[\"Amount\"];\n\n $this->log->writeLog($apiReques);\n \n $headers = array(\"Content-Type\" => \"application/json\", \"Accept\" => \"application/json\", \"Authorization\" => $request[\"datacap_mid\"]);\n return $this->transferBuilder\n ->setMethod('POST')\n ->setHeaders($headers)\n ->setUri($url)\n ->setBody($apiRequest)\n ->build();\n }", "title": "" }, { "docid": "ee5d4d8638e1d14f9a4816e8afcfa85d", "score": "0.42749885", "text": "function post_request_func ( $request ){\n\t\n\t// You can access parameters via direct array access on the object:\n \t// $param = $request['id'];\n \n // Or via the helper method:\n\t// $param2 = $request->get_param();\n \n // You can get the combined, merged set of parameters:\n // $parameters = $request->get_params();\n \n // The individual sets of parameters are also available, if needed:\n // $parameters = $request->get_url_params();\n // $parameters = $request->get_query_params();\n // $parameters = $request->get_body_params();\n // $parameters = $request->get_json_params();\n // $parameters = $request->get_default_params();\n\t\n\t$body = $request->get_body_params();\n\t\n\t$vorname = sanitize_text_field($body[\"Vorname\"]);\n\t$name = sanitize_text_field($body[\"Nachname\"]);\n\t$geschlecht = sanitize_text_field($body[\"Geschlecht\"]);\n\t$geburtsdatum = sanitize_text_field($body[\"Geburtsdatum\"]);\n\t\n\t// Daten in Datenbank einfügen\n\t/*\n\tglobal $wpdb;\n\t$table = $wpdb->prefix.'test1';\n\t$data = array(\n\t\t'Vorname' => $vorname,\n\t\t'Nachname' => $name,\n\t\t'Geschlecht' => $geschlecht,\n\t\t'Geburtstag' => $geburtsdatum\n\t);\n\t$format = array('%s','%s','%s', '%s');\n\t$wpdb->insert($table,$data,$format);\n\t$my_id = $wpdb->insert_id;\n\t*/\n\n\treturn new WP_REST_Response(\"Erfolg\", 200 );\n}", "title": "" }, { "docid": "314dc917c7bfb0201c39a2a21bc75943", "score": "0.4266943", "text": "function prov_assocArray_to_Http_ServerRequest()\n{\n return [\n \"param1\" => \"paramValue1\",\n \"param2\" => \"paramValue2\",\n \"param3\" => \"paramValue3\",\n \"param4\" => \"paramValue4\",\n ];\n}", "title": "" }, { "docid": "7bac59bd2dfa5c5f28302cd825d6db04", "score": "0.42638212", "text": "public function apiPaymentV3TransactionPostRequest($transaction = null)\n {\n\n $resourcePath = '/api/payment/v3/transaction';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n /*\n */\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/hal+json', 'application/problem+json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/hal+json', 'application/problem+json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($transaction)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\json_encode(ObjectSerializer::sanitizeForSerialization($transaction));\n } else {\n $httpBody = $transaction;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\http_build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n if (!empty($this->config->getAccessToken())) {\n $headers['Content-signature'] = 'sha256=' . hash('sha256', $httpBody . $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 = http_build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "c3926a2f6a3b11be9f9a1fcf6efe0e11", "score": "0.42617127", "text": "public function postAction(Request $request)\n {\n $em = $this->getDoctrine()->getManager();\n $entity = new TranslationPostType();\n $form = $this->createForm(new TranslationPostTypeType(), $entity, array('method' => $request->getMethod()));\n $this->removeExtraFields($request, $form);\n $form->handleRequest($request);\n if ($form->isValid()) {\n $entity->setCreatorUser($this->getUser());\n $em->persist($entity);\n $em->flush();\n return $entity;\n }\n }", "title": "" }, { "docid": "d37b7df9f096643c6a8e913ae2c7c30f", "score": "0.42597657", "text": "private function prepareRequest()\n {\n $this->requestBody = json_encode($this->tasks);\n }", "title": "" }, { "docid": "2616bba4b8d8ec495df318122c319bb2", "score": "0.42520717", "text": "public function postTranscoderEncodesConfig($server_name, $vhost_name, $template_name, $body)\n {\n $this->postTranscoderEncodesConfigWithHttpInfo($server_name, $vhost_name, $template_name, $body);\n }", "title": "" }, { "docid": "1679b333ca831e17f49ff46288aa5e88", "score": "0.42490324", "text": "public function getPostParams(): ISource;", "title": "" }, { "docid": "55c380e27f03d0a1e9aadb86e3d3cb58", "score": "0.42472166", "text": "public function postDomains()\n {\n return [\n 'method' => 'POST',\n 'path' => 'domains',\n 'jsonKey' => 'domains',\n 'params' => [\n 'domains' => $this->params->domainsJson(),\n ],\n ];\n }", "title": "" }, { "docid": "430bf0e6e4f70ceb25733e01062b1e17", "score": "0.42432547", "text": "private function createRequest() {\n $req = new GraphRequest();\n $req->setUrl(Paths::getRelativeRequestUrl());\n $req->setIp($_SERVER['REMOTE_ADDR']);\n $req->setMethod($_SERVER['REQUEST_METHOD']);\n if (count($_POST) > 0 || count($_FILES) > 0) {\n $tree = $this->treeFromFlat(array_merge($_FILES,$_POST,$_GET));\n $req->setData($tree);\n } else {\n $jsonData = json_decode(file_get_contents(\"php://input\"),true);\n if ($jsonData === null) {\n $jsonData = [];\n }\n $req->setData(array_merge($this->treeFromFlat($_GET),$jsonData));\n }\n $headers = apache_request_headers();\n foreach ($headers as $header => $value) {\n $req->setHeader($header,$value);\n }\n\n $this->pushRequest($req);\n }", "title": "" }, { "docid": "13d2b18dc6b7202f4dd7c006c8bb702d", "score": "0.42431203", "text": "public function make(AuthorizeTransactionContracts $authorizeTransaction)\n {\n $request = new StdClass;\n\n //Request\n $request->RequestId = $authorizeTransaction->getRequestId();\n $request->Version = $authorizeTransaction->getVersion();\n //OrderData\n $request->OrderData = new StdClass;\n $request->OrderData->MerchantId = $authorizeTransaction->getOrderData()->getMerchantId();\n $request->OrderData->OrderId = $authorizeTransaction->getOrderData()->getOrderId();\n $request->OrderData->BraspagOrderId = new SoapVar($authorizeTransaction->getOrderData()->getBraspagOrderId(), SOAP_ENC_OBJECT, 'true');\n //CustomerData\n $request->CustomerData = new StdClass;\n $request->CustomerData->CustomerIdentity = $authorizeTransaction->getCustomerData()->getCustomerIdentity();\n $request->CustomerData->CustomerName = $authorizeTransaction->getCustomerData()->getCustomerName();\n $request->CustomerData->CustomerEmail = $authorizeTransaction->getCustomerData()->getCustomerEmail();\n $request->CustomerData->CustomerAddressData = new SoapVar($authorizeTransaction->getCustomerData()->getCustomerAddressData(), SOAP_ENC_OBJECT, 'true');\n $request->CustomerData->DeliveryAddressData = new SoapVar($authorizeTransaction->getCustomerData()->getCustomerDeliveryAddressData(), SOAP_ENC_OBJECT, 'true');\n $authorizeTransaction->getCustomerData()->getCustomerDeliveryAddressData();\n //PaymentDataCollection\n $Payment = new StdClass;\n $Payment->PaymentMethod = new SoapVar($authorizeTransaction->getPaymentDataCollection()->getPaymentDataRequest()->getPaymentMethod(), XSD_INT, null, null, 'PaymentMethod', BrasPagSoapClient::NAMESPACE);\n $Payment->Amount = new SoapVar($authorizeTransaction->getPaymentDataCollection()->getPaymentDataRequest()->getAmount(), XSD_INT, null, null, 'Amount', BrasPagSoapClient::NAMESPACE);\n $Payment->Currency = new SoapVar($authorizeTransaction->getPaymentDataCollection()->getPaymentDataRequest()->getCurrency(), XSD_STRING, null, null, 'Currency', BrasPagSoapClient::NAMESPACE );\n $Payment->Country = new SoapVar($authorizeTransaction->getPaymentDataCollection()->getPaymentDataRequest()->getCountry(), XSD_STRING, null, null, 'Country', BrasPagSoapClient::NAMESPACE );\n\n $PaymentType = $authorizeTransaction->getPaymentDataCollection()->getPaymentDataRequest()->getObjPaymentType();\n if ($PaymentType instanceof CreditCardDataRequestContracts){\n $Payment->NumberOfPayments = new SoapVar($PaymentType->getNumberOfPayments(), XSD_STRING, null, null, 'Number', BrasPagSoapClient::NAMESPACE );\n $Payment->PaymentPlan = new SoapVar($PaymentType->getPaymentPlan(), XSD_STRING, null, null, 'PaymentPlan', BrasPagSoapClient::NAMESPACE );\n $Payment->TransactionType = new SoapVar($PaymentType->getTransactionType(), XSD_STRING, null, null, 'TransactionType', BrasPagSoapClient::NAMESPACE );\n $Payment->CardHolder = new SoapVar($PaymentType->getCardHolder(), XSD_STRING, null, null, 'CardHolder', BrasPagSoapClient::NAMESPACE );\n $Payment->CardNumber = new SoapVar($PaymentType->getCardNumber(), XSD_STRING, null, null, 'CardNumber', BrasPagSoapClient::NAMESPACE );\n $Payment->CardSecurityCode = new SoapVar($PaymentType->getCardSecurityCode(), XSD_STRING, null, null, 'CardSecurityCode', BrasPagSoapClient::NAMESPACE );\n $Payment->CardExpirationDate = new SoapVar($PaymentType->getCardExpirationDate(), XSD_STRING, null, null, 'CardSecurityCode', BrasPagSoapClient::NAMESPACE );\n }\n\n $Payment->AdditionalDataCollection = new SoapVar($authorizeTransaction->getPaymentDataCollection()->getPaymentDataRequest()->getAdditionalDataCollection(), SOAP_ENC_OBJECT, 'true', NULL, NULL, BrasPagSoapClient::NAMESPACE);\n $Payment->AffiliationData = new SoapVar($authorizeTransaction->getPaymentDataCollection()->getPaymentDataRequest()->getAffiliationData(), SOAP_ENC_OBJECT, 'true', NULL, NULL, BrasPagSoapClient::NAMESPACE);\n $request->PaymentDataCollection = new StdClass;\n $request->PaymentDataCollection->PaymentDataRequest = new SoapVar($Payment, SOAP_ENC_OBJECT, $PaymentType->getPaymentType());\n\n return $request;\n }", "title": "" }, { "docid": "10faf9bebb0e083ce7c296dbe1f21b33", "score": "0.4233832", "text": "function returnPostRequest($buffer) {\n $post_req_schema = \"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4\";\n $data = json_encode(array(\"schema\" => $post_req_schema, \"data\" => $buffer));\n return $data;\n}", "title": "" }, { "docid": "cac9ae654d6b34eb6bea3df66ebd8de8", "score": "0.42329824", "text": "public function getGeneratedCreateRequest()\n {\n return $this->getGenerator()\n ->setObject($this->getQuote())\n ->generateRequest(Klarna_Core_Model_Api_Builder_Abstract::GENERATE_TYPE_CREATE)\n ->getRequest();\n }", "title": "" }, { "docid": "d41d04caef5c06f1ce13bc97135174d1", "score": "0.42311347", "text": "public function post() : IParams\n\t{\n\t}", "title": "" }, { "docid": "48d8ee6fce917b1595d58fafd7b00822", "score": "0.4230889", "text": "public function postTranscoderEncodeConfig($server_name, $vhost_name, $template_name, $encode_name, $body)\n {\n $this->postTranscoderEncodeConfigWithHttpInfo($server_name, $vhost_name, $template_name, $encode_name, $body);\n }", "title": "" }, { "docid": "8d8d7a7103e1df09a4def9f7423356b3", "score": "0.42202282", "text": "public static function POST() {\n return (new Request(self::METHOD_POST));\n }", "title": "" }, { "docid": "dffffc733951ecf4bfd761465412907e", "score": "0.42201787", "text": "protected function createCartRequest()\n {\n\n $resourcePath = '/v3/carts/';\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 ['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\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 }", "title": "" }, { "docid": "987e21296ddca2419ae7c4684a1acb38", "score": "0.42171186", "text": "public static function requestBuild(){\n $tranDateTime = DateTime::getDateTime();\n $uuid = Uuid::generate()->string;\n $applicationId = \"Sadad\";\n $request = array();\n $request += [\"applicationId\" => $applicationId];\n $request += [\"UUID\" => $uuid];\n $request += [\"tranDateTime\" => $tranDateTime];\n\n return $request;\n }", "title": "" }, { "docid": "e2c12de3052c2f9fcfa5cb24e095c929", "score": "0.4213867", "text": "private function _convertRegisterDestination($request)\n {\n $parameters = array();\n $parameters['Action'] = 'RegisterDestination';\n if ($request->isSetSellerId()) {\n $parameters['SellerId'] = $request->getSellerId();\n }\n if ($request->isSetMWSAuthToken()) {\n $parameters['MWSAuthToken'] = $request->getMWSAuthToken();\n }\n if ($request->isSetMarketplaceId()) {\n $parameters['MarketplaceId'] = $request->getMarketplaceId();\n }\n if ($request->isSetDestination()) {\n $DestinationRegisterDestinationInput = $request->getDestination();\n foreach ($DestinationRegisterDestinationInput->getDeliveryChannel() as $DeliveryChannelDestinationIndex => $DeliveryChannelDestination) {\n $parameters['Destination' . '.' . 'DeliveryChannel' . '.' . ($DeliveryChannelDestinationIndex + 1)] = $DeliveryChannelDestination;\n }\n }\n\n return $parameters;\n }", "title": "" }, { "docid": "552d979e2afd1232f07a88330036c278", "score": "0.4211738", "text": "protected function salesOrderBasicPostRequest($sale_order_update_dto)\n {\n // verify the required parameter 'sale_order_update_dto' is set\n if ($sale_order_update_dto === null || (is_array($sale_order_update_dto) && count($sale_order_update_dto) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $sale_order_update_dto when calling salesOrderBasicPost'\n );\n }\n\n $resourcePath = '/controller/api/v1/salesorderbasic';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($sale_order_update_dto)) {\n $_tempBody = $sale_order_update_dto;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json'],\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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('ipp-application-type');\n if ($apiKey !== null) {\n $headers['ipp-application-type'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('ipp-company-id');\n if ($apiKey !== null) {\n $headers['ipp-company-id'] = $apiKey;\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 }", "title": "" }, { "docid": "ece80d3c3aede7f73bcd23cdc8b862d2", "score": "0.4210222", "text": "public function rootPostRequest($return_order = null, string $contentType = self::contentTypes['rootPost'][0])\n {\n\n\n\n $resourcePath = '/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($return_order)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($return_order));\n } else {\n $httpBody = $return_order;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('DPDHL-User-Authentication-Token');\n if ($apiKey !== null) {\n $headers['DPDHL-User-Authentication-Token'] = $apiKey;\n }\n // this endpoint requires HTTP basic authentication\n if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\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 $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "078b573fc3b58d1e0e0f64bdda0edff7", "score": "0.42088854", "text": "public function productAcknowledgeOfferChangesRequest($keyIsMpn = false, $requestBody = null)\n {\n\n $resourcePath = '/v2/products/offers';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($keyIsMpn !== null) {\n if('form' === 'form' && is_array($keyIsMpn)) {\n foreach($keyIsMpn as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['keyIsMpn'] = $keyIsMpn;\n }\n }\n\n\n\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-patch+json', 'application/json', 'application/_*+json']\n );\n }\n\n // for model (json/xml)\n if (isset($requestBody)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($requestBody));\n } else {\n $httpBody = $requestBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\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\\Query::build($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('apikey');\n if ($apiKey !== null) {\n $queryParams['apikey'] = $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\\Query::build($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "4caff2448deb2fd71badab550ff524fe", "score": "0.4208059", "text": "protected function createOpenIdIdpConfigRequest($body, $x_sds_auth_token = null)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createOpenIdIdpConfig'\n );\n }\n\n $resourcePath = '/v4/system/config/auth/openid/idps';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // header params\n if ($x_sds_auth_token !== null) {\n $headerParams['X-Sds-Auth-Token'] = ObjectSerializer::toHeaderValue($x_sds_auth_token);\n }\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\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 // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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 }", "title": "" }, { "docid": "49ebfc66f404c7e19360c1fca07b1d0e", "score": "0.42080027", "text": "protected function payInsWebPayWebPayPostPaymentByWebRequest($body = null)\n {\n\n $resourcePath = '/v2.1/PayInsWebPay/payments/web';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['text/plain', 'application/json', 'text/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['text/plain', 'application/json', 'text/json'],\n ['application/json-patch+json', 'application/json', 'text/json', '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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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 }", "title": "" }, { "docid": "dbd8cda03190bba4ff133336bd3ee5fe", "score": "0.42050755", "text": "public function createVpnGateway($request);", "title": "" }, { "docid": "efe866b4c3fbcaa71f32cea30cc31e40", "score": "0.41958156", "text": "protected function postIntegrationsActionsRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling postIntegrationsActions'\n );\n }\n\n $resourcePath = '/api/v2/integrations/actions';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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 }", "title": "" }, { "docid": "9c9afabf6517b903d2c45edec2a93e2b", "score": "0.4190438", "text": "protected function createRequest()\n {\n $this->curlResource = curl_init();\n $requestUri = $this->getRequest()->getUri();\n\n // Get request\n $request = $this->getRequest();\n\n // Set default parameters\n curl_setopt($this->curlResource, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curlResource, CURLOPT_URL, (string) $requestUri);\n curl_setopt($this->curlResource, CURLOPT_FOLLOWLOCATION, false); // Disable auto location.\n curl_setopt($this->curlResource, CURLOPT_HEADER, true); // Set the return original HTTP headers for next parse\n curl_setopt($this->curlResource, CURLOPT_HTTP_VERSION, $request->getHttpVersion());\n curl_setopt($this->curlResource, CURLOPT_CUSTOMREQUEST, $request->getMethod());\n curl_setopt($this->curlResource, CURLOPT_HTTPHEADER, $this->getHeadersArray($request->getHeaders()));\n\n if (count($request->getCookies())) {\n // Cookies exists\n curl_setopt($this->curlResource, CURLOPT_COOKIE, implode('; ', $request->getCookies()->all()));\n }\n\n if ($request instanceof PostRequest) {\n // Post request. Add post fields\n curl_setopt($this->curlResource, CURLOPT_POST, true);\n curl_setopt($this->curlResource, CURLOPT_POSTFIELDS, $request->getPostData()->getMinimizeString('&'));\n } else if ($request->getContentData()) {\n // Content data already exists. Add as post fields\n $content = CompilerFactory::compile($request->getContentDataCompiler(), $request->getContentData());\n curl_setopt($this->curlResource, CURLOPT_POSTFIELDS, $content);\n }\n\n // Start usage time\n $useTime = microtime(true);\n\n return Result::parseFromContent($this->request, curl_exec($this->curlResource), microtime(true) - $useTime);\n }", "title": "" }, { "docid": "f8d75e4bf98e97a92d940aa42a0233fd", "score": "0.41871598", "text": "protected static function OAuthParametersFactory($config)\r\n\t{\r\n\t\t$nonce = self::generateNonce(16);\r\n\t\t//$configApi = MasterCardApiConfig::$config;\r\n\t\t$time = time();\r\n\t\t$params = array(\r\n\t\t\t\t\tMasterCardSignatureInterceptor::OAUTH_CONSUMER_KEY\t\t=> $config->consumerKey,\r\n\t\t\t\t\tMasterCardSignatureInterceptor::OAUTH_SIGNATURE_METHOD\t=> MasterCardSignatureInterceptor::signatureMethod,\r\n\t\t\t\t\tMasterCardSignatureInterceptor::OAUTH_NONCE\t\t\t\t=> $nonce,\r\n\t\t\t\t\tMasterCardSignatureInterceptor::OAUTH_TIMESTAMP\t\t\t=> $time,\r\n\t\t\t\t\tMasterCardSignatureInterceptor::OAUTH_VERSION\t\t\t=> MasterCardSignatureInterceptor::version\r\n\t\t\t\t\t);\r\n\r\n\t\treturn $params;\r\n\t}", "title": "" } ]
627c1ea6989e0986f8815fdf900c162e
Create a new controller instance.
[ { "docid": "292dce0fb25f89abb8c64bf979c1cafd", "score": "0.0", "text": "public function __construct()\n {\n $this->middleware('auth');\n }", "title": "" } ]
[ { "docid": "c54f300aabc7f3918e5b68664f636499", "score": "0.8528927", "text": "protected function createController()\n {\n $controller = $this->getController();\n\n $this->call('make:controller', [\n 'name' => $this->getController().\"Controller\",\n '--model' => $this->getModel(),\n ]);\n }", "title": "" }, { "docid": "f2a8a6dabb56f39daaf63fa047807979", "score": "0.82668066", "text": "protected function createController()\n {\n $this->createClass('controller');\n }", "title": "" }, { "docid": "8047bfcdf012b41fd0a3f05528709ca9", "score": "0.7891959", "text": "protected function createController()\n {\n $controller = Str::studly($this->argument('name'));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => $this->option('api'),\n '--parent' => $this->option('parent'),\n ]));\n }", "title": "" }, { "docid": "506fb30c23580bf57e268b500d8bae70", "score": "0.7881299", "text": "protected function createController()\n {\n $this->call('module:make-controller', [\n 'controller' => Str::studly(class_basename($this->argument('name'))),\n 'module' => $this->getModuleName()\n ]);\n }", "title": "" }, { "docid": "d3e99e643bb7054e2fbbb02d15a5a83c", "score": "0.7704773", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('domain:controller', [\n 'domain' => $this->argument('domain'),\n 'model' => $this->getNameInput(),\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api'\n ]);\n }", "title": "" }, { "docid": "3eb683afd109851999f4156babeb54d6", "score": "0.766653", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('component:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n ]);\n }", "title": "" }, { "docid": "6ad054608de24263b34a68b0ae328d7a", "score": "0.7630834", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('boilerplate:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => $this->option('api'),\n '--force' => $this->option('force'),\n ]));\n }", "title": "" }, { "docid": "1f7187e65691a2e55945d5768fd4e71b", "score": "0.7451515", "text": "public static function create_controller($name) {\n $name = $name.'Controller';\n $controller = new $name();\n return $controller;\n }", "title": "" }, { "docid": "c40a9da9d5cd167661d5905c59a341c8", "score": "0.72390175", "text": "public function createController(){\r\n // Check for the class\r\n if(class_exists($this->controller)){\r\n $parents = class_parents($this->controller);\r\n // Check extend\r\n if(in_array(\"Controller\", $parents)){\r\n if(method_exists($this->controller, $this->action)){\r\n return new $this->controller($this->action, $this->request);\r\n } else {\r\n // Method does not exist\r\n echo '<h1>Method does not exist</h1>';\r\n return;\r\n }\r\n } else {\r\n // Base controller does not exist\r\n echo '<h1>Base controller not found</h1>';\r\n return;\r\n }\r\n } else {\r\n // Controller class does not exist\r\n echo '<h1>Controller class does not exist</h1>';\r\n return;\r\n }\r\n }", "title": "" }, { "docid": "7091baa6ba69ca1f1af9f7c42a051e25", "score": "0.7225505", "text": "static function create_controller () {\n\t\tfile_put_contents('controllers/'.self::$name_pascal.'Controller.php', self::replace_names(file_get_contents('controllers/GeneratedObjectController.php')));\n\t}", "title": "" }, { "docid": "e7b5075015d46b2b229fb0e0133c0a2f", "score": "0.7204092", "text": "public function CreateController()\r\n {\r\n try\r\n {\r\n if(class_exists($this->controller))\r\n {\r\n $parents = class_parents($this->controller);\r\n if(in_array(\"CBaseController\", $parents))\r\n {\r\n if(method_exists($this->controller, $this->action))\r\n {\r\n $args = explode(\"/\", $this->args); \r\n return new $this->controller($this->action, $args);\r\n }\r\n else\r\n {\r\n return new Exception(\"Bad Method: \" . $this->urlValues);\r\n }\r\n }\r\n else\r\n {\r\n return new Exception(\"Bad Controller: \" . $this->urlValues);\r\n }\r\n }\r\n else\r\n {\r\n return new Exception(\"Bad Controller: \" . $this->urlValues);\r\n } \r\n }\r\n catch (Exception $ex)\r\n {\r\n echo \"Caught exception:\" . $ex->getMessage() . \"\\n\";\r\n } \r\n }", "title": "" }, { "docid": "3492c00258b34bda09c554cebd943761", "score": "0.7149114", "text": "public function createController() {\n //check our requested controller's class file exists and require it if so\n $controllerFile = \"application/\".M. \"/controllers/\". C . \"Controller.php\";\n if (file_exists($controllerFile)) {\n require ($controllerFile);\n } else {\n return $this->showError();\n }\n //does the class exist?\n //\n $controllerClass = ucfirst(C) . \"Controller\";\n\n if (class_exists($controllerClass)) {\n $parents = class_parents($controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($controllerClass, A)) {\n return new $controllerClass(A);\n } else {\n return $this->showError();\n }\n } else {\n return $this->showError();\n }\n } else {\n return $this->showError();\n }\n }", "title": "" }, { "docid": "64f1cb422003972ed013abc2b3c531f2", "score": "0.68059707", "text": "public function newController(string $classname): CI_Controller\n {\n $this->resetInstance();\n\n $injector = new Injector(new AppModule());\n $controller = $injector->getInstance($classname);\n $controller->initController(\n Services::request(),\n Services::response(),\n Services::logger()\n );\n\n $this->CI =& get_instance();\n\n return $controller;\n }", "title": "" }, { "docid": "a79a42ec06f2b3671a178173c68b8ca0", "score": "0.67885166", "text": "public function controllerInstance()\n {\n if (! is_null($this->controllerInstance)) {\n return $this->controllerInstance;\n }\n\n return $this->controllerInstance = app()->make($this->controller, [\n 'config' => Config::get(get_class($this)),\n ]);\n }", "title": "" }, { "docid": "c346ed8b163b1ad867dd4256891b27b5", "score": "0.6750837", "text": "protected function getController()\n {\n return new Controller(\n new Model(\n $this->dic->dbal,\n $this->dic->srcDir . '/var/account/'\n )\n );\n }", "title": "" }, { "docid": "69834d81cdd25b4fd37f44d28236c667", "score": "0.6742117", "text": "public function controller(){\n $router = new Router();\n $router->addRoutesConfig();\n\n try{\n $matchedRoute = $router->route($this->httpRequest()->requestURI());\n }catch (\\RuntimeException $e){\n if ($e->getCode() == Router::NO_ROUTE){\n $this->httpResponse()->redirect404();\n }\n }\n\n $_GET = array_merge($_GET, $matchedRoute->vars());\n\n $controllerClass = 'Applications\\\\'.APP_NAME.'\\\\Controllers\\\\'.$matchedRoute->controller().'Controller';\n return new $controllerClass($this, $matchedRoute->controller(), $matchedRoute->action(), $matchedRoute->cacheDuration());\n }", "title": "" }, { "docid": "6dd63f287bc06772f3aa3d40cd228114", "score": "0.6660981", "text": "private function createController(): string\n {\n $controllerName = $this->params['controller'] . $this->controllerSuffix;\n $controllerName = Stringify::studlyCaps($controllerName);\n return $this->getNamespace() . $controllerName;\n }", "title": "" }, { "docid": "edc76f47d467097138a75b72b64ed1e6", "score": "0.6631944", "text": "public function createController($filePath) \n {\n //Set namespace for controller\n $nameSpace = ucfirst($this->vendorPath['vendor']) . ' \\ ' . ucfirst($this->vendorPath['package']) .'\\Src' . '\\Http' . '\\Controller';\n $nameSpace = str_replace(' ', '', $nameSpace);\n // Set route path\n $pathForRoute = base_path() . '/packages/' . $this->vendorPath['vendor'] . '/' . $this->vendorPath['package'] . '/src/http';\n // Set controller path\n $pathForController = base_path() . '/packages/' . $this->vendorPath['vendor'] . '/' . $this->vendorPath['package'] . '/src/http/controller';\n // Make directory for controller\n if(!empty($this->arrController)){\n File::makeDirectory($filePath .= 'controller', 0777, true); \n foreach ($this->arrController as $value) {\n $val = $value['option'];\n $controller = ucfirst($value['controller']);\n switch ($val) {\n //If user select blank controller option\n case \"Blank Controller\" :\n // Get stub file\n $stubCntrl = $this->files->get(__DIR__ . '/stubs/blankController.stub');\n // Set namespace \n $stubCntrl = str_replace(\n '{{dummynamespace}}', $nameSpace, $stubCntrl\n );\n // Set controller name\n $stubCntrl = str_replace(\n '{{dummycontrollername}}', $controller, $stubCntrl\n );\n // Create controller file \n File::put($pathForController . '/' . $controller . '.php', $stubCntrl);\n break;\n // If user choose all function\n case \"All Function\" :\n // Get stub file\n $stubCntrl = $this->files->get(__DIR__ . '/stubs/controller.stub');\n // Set namespace\n $stubCntrl = str_replace(\n '{{dummynamespace}}', $nameSpace, $stubCntrl\n );\n // Set controller name\n $stubCntrl = str_replace(\n '{{dummycontrollername}}', $controller, $stubCntrl\n ); \n // Create controller file\n File::put($pathForController . '/' . $controller . '.php', $stubCntrl);\n break;\n // Case for user want to create self define function\n case \"Self Define function\" : \n foreach ($value['function'] as $funName) { \n // Check file exist or not\n if (File::exists($pathForController . '/' . $value['controller'] . '.php')) {\n // Get stub file\n $funStub = $this->files->get(__DIR__ . '/stubs/function.stub');\n $funName = str_replace(' ', '', $funName);\n $funStub = str_replace(\n '{{dummyfunction}}', $funName, $funStub\n );\n // Append value if file exists\n File::append($pathForController . '/' . $value['controller'] . '.php', \"\\n\" . $funStub);\n } else {\n $customStub = $this->files->get(__DIR__ . '/stubs/customFunction.stub');\n $customStub = str_replace(\n '{{dummynamespace}}', $nameSpace, $customStub\n );\n $customStub = str_replace(\n '{{dummycontrollername}}', ucfirst($value['controller']), $customStub\n );\n $customStub = str_replace(\n '{{dummyfunctionName}}', $funName, $customStub\n );\n // Create controller file\n File::put($pathForController . '/' . $value['controller'] . '.php', $customStub);\n }\n }\n // Append value into that file\n File::append($pathForController . '/' . $value['controller'] . '.php', \"\\n\" . '}');\n break;\n default : \n echo \"wrong input\";\n break;\n }\n // Condition for route\n if ($value['route'] == 'Yes') { \n // Get stub file\n $routenamespace = ucfirst($this->vendorPath['vendor']) . ' \\ ' . ucfirst($this->vendorPath['package']) .'\\Src' . '\\Http' . '\\Controller'.' \\ '.ucfirst($value['controller']);\n $routenamespace = str_replace(' ', '', $routenamespace);\n $stub = $this->files->get(__DIR__ . '/stubs/routes.stub');\n $stub = str_replace(\n '{{routename}}', $value['routeName'], $stub\n );\n $stub = str_replace(\n '{{dummycontrollername}}', $routenamespace, $stub\n );\n // Check file exists\n if (File::exists($pathForRoute . '/routes.php')) {\n $stub = str_replace(\n '<?php', '', $stub\n );\n // Append route into existing route file\n File::append($pathForRoute . '/routes.php', $stub);\n } else {\n // Create route file\n File::put($pathForRoute . '/routes.php', $stub);\n }\n }\n }}\n }", "title": "" }, { "docid": "0103acd639fa4fef545c614156df9331", "score": "0.6612498", "text": "public static function init(): Controller\n {\n return new SiteController();\n }", "title": "" }, { "docid": "32546fdf2281331a931d1d974d5df416", "score": "0.661125", "text": "protected function getController()\r\n {\r\n $params = $this->getParamsfromGetMethod();\r\n $controller = new $this->current_controller($this->current_action, $params);\r\n return $controller;\r\n }", "title": "" }, { "docid": "e1f45d03fb15799007037ffb151a7cbc", "score": "0.6562709", "text": "private function init_controller() {\n\t\tif ( file_exists( PATH_CONTROLLERS . $this->controller . '.php' ) ) {\n\t\t\t$this->controller = new $this->controller;\n\t\t} else {\n\t\t\t// Invalid URL, show home/index without parameters.\n\t\t\t// TODO: Show Error 404 Page instead.\n\t\t\t$this->controller = new DashboardController;\n\t\t\t$this->action = 'index';\n\t\t\t$this->parameters = null;\n\t\t}\n\t}", "title": "" }, { "docid": "f80326b65fe0fda7684167b56aa57461", "score": "0.6525298", "text": "public function createController(array &$parameters) : Controller\n {\n // Defer to the base default controller if we're not loading a wyf controller\n if(!isset($parameters['wyf_controller'])) {\n return parent::createController($parameters);\n }\n\n if(class_exists($parameters['wyf_controller'])) {\n // If the wyf controller class exists, setup bindings and load wyf controller\n $parameters['controller'] = $parameters['wyf_controller'];\n return $this->getControllerInstance($parameters);\n } else {\n // If not loop through the URL to find the container and any actions as well as parameters\n return $this->getControllerFromPath($parameters);\n }\n }", "title": "" }, { "docid": "fa63c704ac258c986fafde51e932ad5d", "score": "0.65028054", "text": "function controller($cmd) {\n $name = $this->name.\"Controller\";\n $this->controller = $name;\n\n $location = app_path('Http/Controllers/'.$this->controller.'.php');\n $check = file_exists($location);\n\n if($check) {\n $cmd->info(\"<error>Controller already exists!</error>\\n\");\n } else {\n //Make Controller with artisan command\n Artisan::call(\"make:controller \".$this->controller);\n $output = Artisan::output();\n $cmd->info($output);\n\n $stub = $this->getStub('Controller');\n $nameCamel = $this->name;\n $nameUndescore = $this->from_camel_case($nameCamel);\n $fields = $this->make_field_controller();\n $fields_oncreate = $this->make_field_controller_oncreate();\n $searchable = $this->searchable;\n $load_class = '';\n\n if($this->with_uuid) {\n $load_class .= 'use Illuminate\\Support\\Str;';\n }\n\n $full_code = str_replace(\n [\n '{{nameCamel}}', \n '{{nameUnderscore}}', \n '{{fields}}', \n '{{searchable}}',\n '{{load_class}}',\n '{{fields_oncreate}}',\n ],\n [\n $nameCamel,\n $nameUndescore,\n $fields,\n $searchable,\n $load_class,\n $fields_oncreate\n ],\n $stub\n );\n\n file_put_contents($location, $full_code);\n }\n }", "title": "" }, { "docid": "a92155156846c5e1bdcdfd388fd3e0f1", "score": "0.64890575", "text": "private function load_controller()\n {\n if(!Pi_loader::load_shell($this->controller))\n {\n trigger_error(\"Requested shell controller does not exist\",\n E_USER_ERROR);\n }\n \n // Declaration of the controller class name\n $classname = $this->controller . 'ShellController';\n \n // Instance creation\n $this->controller_instance = new $classname();\n }", "title": "" }, { "docid": "f4f60a60427352f08392638943bf5a8d", "score": "0.6486538", "text": "public function initController() {\n\t\t$confDir = CONF_DIR. \"/routes.yml\";\n\t\t$routes = yaml_parse_file($confDir);\n\n\t\tif (!$routes) {\n\t\t\tthrow new ConfigException(\"Error loading \". $confDir);\n\t\t}\n\n\t\t$requestURI = explode(\"?\", rtrim($_SERVER['REQUEST_URI'], \"/\"))[0];\n\n\t\tforeach ($routes as $route) {\n\t\t\t$route['uri'] = rtrim($route['uri'], \"/\");\n\n\t\t\tif (preg_match('#^'. $route['uri']. '$#', $requestURI, $matches)) {\n\t\t\t\t$controllerName = \"\\\\App\\\\Controllers\\\\\". $route['controller'];\n\n\t\t\t\t$params = array_combine($route['parameters'], array_slice($matches, 1));\n\n\t\t\t\t$this->controller = new $controllerName($route['action'], $params);\n\t\t\t\treturn $this->controller;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "eda08bba2eda62a61ba4684cbdb81e76", "score": "0.64595586", "text": "public function actionCreate()\n {\n $model = new ManageController();\n\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n $post = Yii::$app->request->post();\n $name = $post['ManageController']['controller_id'];\n $array = explode('.',$name);\n $model->controller_id = $array[1];\n $model->module_name = str_replace('/','\\\\',$model->module_name);\n try {\n $class = new \\ReflectionClass($model->module_name.'\\\\controllers\\\\'.$model->controller_id);\n if($model->save()){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }catch (\\Exception $exception){\n Yii::$app->session->setFlash('error','Controller not found');\n }\n }\n return $this->render('create', [\n 'model' => $model,\n 'data'=>$this->data,\n ]);\n }", "title": "" }, { "docid": "540beec374cb5cc729eb342616c9da1a", "score": "0.6435895", "text": "private function addController()\n {\n $rotaController = $this->getRota();\n $nameSpace = \"App\\\\Controller\\\\{$rotaController}\";\n $this->obj = new $nameSpace;\n\n // if (!empty($this->parseUrl()[1])) {\n // self::addMethod();\n // }\n self::addMethod();\n }", "title": "" }, { "docid": "670bc9a852dcd5e700244305bed77eb8", "score": "0.6404536", "text": "private function loadController()\n {\n if(!Pi_loader::load_controller($this->uri->controller()))\n {\n $this->abort(\"Generate it using the shell script <i>php scripts/picara create controller \". $this->uri->controller() .\"</i>.\",\n 'Requested controller does not exist');\n } else {\n \n // Save controller name \n $this->controllerName = $this->uri->controller() . 'WebController';\n \n // Store controller object\n $this->myController = new $this->controllerName();\n\n // Path to controller file\n $this->controllerPath = CONTROLLER . $this->uri->controller() . '.php'; \n\n // Store if this is an API call\n $this->is_api_call = isset($this->myController->api_settings[$this->uri->action()]);\n }\n }", "title": "" }, { "docid": "d1cf4ce0c7bf12787046b20cbe5e77b6", "score": "0.64022094", "text": "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Admin/AuthProvidersController.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('AuthProvidersController', $this->class . $this->sufix, $content);\n\n\t\t// Replace model class name\n\t\t$content = str_replace('AuthProvider', str_singular($this->class), $content);\n\n\t\t// Replace permissions\n\t\t$content = str_replace(80, $this->permission, $content);\n\t\t$content = str_replace(81, $this->permission + 1, $content);\n\t\t$content = str_replace(82, $this->permission + 2, $content);\n\t\t$content = str_replace(83, $this->permission + 3, $content);\n\t\t$content = str_replace(100, 'TODO', $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "title": "" }, { "docid": "e56b5c664fbdbe46a4257247f33c7606", "score": "0.63927346", "text": "public function create(){\n echo \"Création d'un nouveau controlleur: \\n\";\n $controllerFile = \"Controller/{$this->name}Controller.php\";\n $controllerContent = str_replace(\"#name#\",$this->name,file_get_contents(\"Core/generator/models/controller.model\"));\n file_put_contents ($controllerFile,$controllerContent);\n if(!is_dir(\"Views/{$this->name}\")) mkdir(\"Views/{$this->name}\");\n $indexhtmlContent = str_replace(\"#name#\",$this->name,file_get_contents(\"Core/generator/models/index.html.model\"));\n file_put_contents (\"Views/{$this->name}/index.html.php\",$indexhtmlContent);\n echo \".................................\\n\";\n echo \"{$this->name} est bien créé.\\n\";\n echo \".................................\\n\";\n }", "title": "" }, { "docid": "533f7dfc6d76be11676ddc1e9c38db81", "score": "0.6387077", "text": "function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n $results = CreateClickwrapService::createClickwrap($this->args, self::DEMO_DOCS_PATH, $this->clientService);\n\n if ($results) {\n $clickwrap_name = $results['clickwrapName'];\n $results = json_decode((string)$results, true);\n $this->clientService->showDoneTemplate(\n \"Creating a clickwrap example\",\n \"Creating a clickwrap example\",\n \"Clickwrap $clickwrap_name has been created!\",\n json_encode(json_encode($results))\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "a43d94e03e930b42e11ef6e187d54bf3", "score": "0.63480675", "text": "protected function makeController($controller)\n\t{\n\t\tController::setRouter($this->router);\n\n\t\treturn $this->container->make($controller);\n\t}", "title": "" }, { "docid": "88478aed17f59db7651cecaa0ca45e67", "score": "0.63248026", "text": "private function _callController($controller = \"Index\") {\n if(file_exists(__CONTOLLER_PATH__.$controller.\"Controller.php\")) {\n $controller_name = $controller.\"Controller\";\n return new $controller_name($this->_Registry);\n }\n }", "title": "" }, { "docid": "1e48bd9ab2705f8ce015b63feb30c3c6", "score": "0.63228583", "text": "public function createController($name) {\n $path = $this->getPath() . \"controllers/$name.php\";\n $namespace = $this->getNamespace();\n if ($this->fileExists($path)) {\n return \"$path controller already exists\";\n }\n\n $my_controller = fopen($path, \"w\") or die(\"Unable to create controller!\");\n\n $controller_template = \"<?php\n\nnamespace $namespace\\Controllers;\n\nclass $name extends \\SlimController\\SlimController {\n\n public function indexAction() {\n global \\$base_url, \\$twig;\n \\$params = array('base_url' => \\$base_url,\n 'title' => 'Page meta title',\n 'description' => 'Page meta description',\n 'page' => ''\n );\n echo \\$twig->render('index.html', \\$params);\n }\n\n public function detailsAction(\\$id) {\n global \\$base_url, \\$twig;\n \\$params = array('base_url' => \\$base_url,\n 'title' => 'Page meta title',\n 'description' => 'Page meta description',\n 'page' => ''\n );\n echo \\$twig->render('index.html', \\$params);\n }\n\n public function addAction() {\n global \\$base_url, \\$twig;\n \\$params = array('base_url' => \\$base_url,\n 'title' => 'Page meta title',\n 'description' => 'Page meta description',\n 'page' => ''\n );\n echo \\$twig->render('editor.html', \\$params);\n }\n\n public function updateAction(\\$id) {\n global \\$base_url, \\$twig;\n \\$params = array('base_url' => \\$base_url,\n 'title' => 'Page meta title',\n 'description' => 'Page meta description',\n 'page' => ''\n );\n echo \\$twig->render('editor.html', \\$params);\n }\n\n public function deleteAction(\\$id) {\n global \\$base_url, \\$twig;\n \\$params = array('base_url' => \\$base_url,\n 'title' => 'Page meta title',\n 'description' => 'Page meta description',\n 'page' => ''\n );\n echo \\$twig->render('index.html', \\$params);\n }\n}\";\n\n fwrite($my_controller, $controller_template);\n\n fclose($my_controller);\n\n return \"$path controller has successfully been created.\\n\";\n }", "title": "" }, { "docid": "c28f30baf2daf98240c06da8f96c92f8", "score": "0.63149345", "text": "public static function handleController()\n\t{\n\t\t$controller = self::getControllerName(true);\n\n\t\t//make sure controller call is alpha numeric\n\t\tif (preg_match('/[^A-Za-z0-9]/', $controller))\n\t\t{\n\t\t\tthrow new \\tcpro\\fw\\Exception($controller. ' Controller not found');\n\t\t}\n\n\n\t\t// Add namespace to plain class name\n\t\t$controller = self::$controllerNamespace. '\\\\'. $controller;\n\n\t\t/*\n\t\t * Construct Controller\n\t\t */\n\t\ttry\n\t\t{\n\t\t\tif (!class_exists($controller, true))\n\t\t\t{\n\t\t\t\t$errorController = self::$controllerNamespace. '\\\\Error';\n\t\t\t\tself::$Controller = new $errorController();\n\t\t\t\tself::$Controller->handleError(new Exception($controller . ' Controller Not Found'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tself::$Controller = new $controller();\n\t\t\t}\n\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\t$errorController = self::$controllerNamespace. '\\\\Error';\n\t\t\tself::$Controller = new $errorController();\n\t\t\tself::$Controller->handleError(new Exception($controller . ' Controller Not Found'));\n\t\t}\n\t}", "title": "" }, { "docid": "b6d63377631ce927607bb9c3ebba8e53", "score": "0.6267339", "text": "private function run_controller() {\n\t\ttry {\n\t\t\t$registry = Registry::instance();\n\t\t\t$controller_name = to_controller($this->controller);\n\t\t\t$controller_object = new $controller_name($this->action, $this->action, $this->params, $this->controller, $this->config);\n\n\t\t\t$registry->current_controller = $controller_object;\n\n\t\t\t$controller_object->run($this->action, $this->action, $this->params, $this->controller, $this->config);\n\n\t\t} catch (Exception $e) {\n\t\t\techo '<p>Exception: '.$e->getMessage().' in '.$e->getFile().' on line '.$e->getLine().\".</p>\\n\",\n\t\t\t\tstr_replace(\"\\n\", \"\\n<br />\", $e->getTraceAsString());\n\t\t}\n\t}", "title": "" }, { "docid": "98f9d5bf62d286fb5a6eec9e1272587b", "score": "0.62643063", "text": "public static function get(): Controller {\n if (self::$singleton === null) {\n self::$singleton = new Controller();\n }\n\n return self::$singleton;\n }", "title": "" }, { "docid": "fb0e40e8a7258ca39d857ebd2bfa8f31", "score": "0.6238207", "text": "public static function getController()\n {\n $controller = JFactory::getApplication()->input->getWord('controller');\n\n if(strpos($controller, '.'))\n {\n throw new Exception('SubController separated by dot (.) - not implemented yet '.__CLASS__);\n }\n\n if($controller)\n {\n //-- Require specific controller if requested\n $path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';\n\n if(false == file_exists($path))\n throw new Exception(sprintf(jgettext('Controller %s not found'), $controller));\n\n require_once $path;\n }\n else\n {\n //-- Require the base controller\n require_once JPATH_COMPONENT.DS.'controller.php';\n }\n\n //-- Create the controller\n $classname = 'EasyCreatorController'.$controller;\n\n if(false == class_exists($classname))\n throw new Exception(sprintf(jgettext('Controller class %s not found'), $classname));\n\n return new $classname;\n }", "title": "" }, { "docid": "912d6b85533734ccaf7e53c41da31125", "score": "0.623173", "text": "public function makeController($name,$model){\n $stub = file_get_contents(resource_path('stub/api/').'controller.stub');\n $data = str_replace(\n ['{model}','{name}','{modelvar}'],\n [$model,ucfirst($name),strtolower($model)],\n $stub\n );\n $file = app_path('Http/Controllers/API/').ucfirst($name).'Controller.php';\n file_put_contents($file,$data);\n $this->line('- Controller created : '.ucfirst($name).'Controller');\n\n }", "title": "" }, { "docid": "91d07ae8b9ca759487ca87525c50f96a", "score": "0.621417", "text": "private function getControllerInstance($parameters)\n {\n $controllerInstance = parent::createController($parameters);\n if(is_a($controllerInstance, CrudController::class)) {\n $modelClass = $this->getWyfClassName($controllerInstance->getWyfPackage(), 'models');\n $this->serviceLocator->bind(Model::class)->to($modelClass);\n }\n return $controllerInstance;\n }", "title": "" }, { "docid": "90c53b22c108bdade4a6f9fc349060b7", "score": "0.6188834", "text": "public function getController() {\n\t\t//Determine the controller's name & action\n\t\t$moduleName = $this->_getData('module');\n\t\t$moduleAction = $this->_getData('action');\n\n\t\t//And then create the controller\n\t\treturn $this->buildController($moduleName, $moduleAction);\n\t}", "title": "" }, { "docid": "3ab317e21755afe10f3dca1bc4d7cc72", "score": "0.61635065", "text": "protected function registerController()\n {\n $this->app->singleton('generate.controller', function ($app) {\n return $app['Mwc\\Generators\\Console\\ControllerCommand'];\n });\n\n $this->commands('generate.controller');\n }", "title": "" }, { "docid": "b117f2617a2a532100827b943a4172df", "score": "0.61591434", "text": "public function testControllerConstructorInjection()\n {\n $request = new Request([\n 'url' => 'pastry_bag_child/index',\n 'params' => [\n 'controller' => 'PastryBagChild',\n 'action' => 'index',\n ]\n ]);\n $response = $this->getMockBuilder('Cake\\Network\\Response')->getMock();\n $result = (new ControllerFactory())->create($request, $response);\n $this->assertInstanceOf(Socket::class, $result->socket);\n }", "title": "" }, { "docid": "3dea8e8f1400b7a7a60ce43f5c6e35df", "score": "0.6153655", "text": "public static function getController()\n {\n $controller = JRequest::getWord('controller');\n\n if(strpos($controller, '.'))\n {\n throw new Exception('SubController separated by dot (.) - not implemented yet '.__CLASS__);\n }\n\n if($controller)\n {\n //-- Require specific controller if requested\n $path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';\n\n if( ! file_exists($path))\n throw new Exception(sprintf(jgettext('Controller %s not found'), $controller));\n\n require_once $path;\n }\n else\n {\n //-- Require the base controller\n require_once JPATH_COMPONENT.DS.'controller.php';\n }\n\n //-- Create the controller\n $classname = 'EasyCreatorController'.$controller;\n\n if( ! class_exists($classname))\n throw new Exception(sprintf(jgettext('Controller class %s not found'), $classname));\n\n return new $classname;\n }", "title": "" }, { "docid": "8b7f23ddf5e16a625613398957d686f4", "score": "0.61095595", "text": "private function configureController() {\n\t\tif ( isset($this->_route[0]) ):\n\n\t\t\tif ( is_dir( ABS_PATH.'/app/controllers/'.strtolower($this->_route[0]) ) ):\n\t\t\t\tif ( isset($this->_route[1]) ):\n\t\t\t\t\tif ( file_exists( ABS_PATH.'/app/controllers/'.strtolower($this->_route[0]).'/'.ucfirst(strtolower($this->_route[1])).'.php' ) ):\n\n\t\t\t\t\t\t// SET CONTROLLER ( FILE / INSTANCE )\n\t\t\t\t\t\t$this->_controller['FILE'] = strtolower($this->_route[0]).'/'.ucfirst(strtolower($this->_route[1])).'.php';\n\t\t\t\t\t\t$this->_controller['INSTANCE'] = $this->_route[0].'_'.ucfirst(strtolower($this->_route[1]));\n\n\t\t\t\t\t\t// UNSET KEYS ( $this->_route )\n\t\t\t\t\t\tunset($this->_route[0]);\n\t\t\t\t\t\tunset($this->_route[1]);\n\n\t\t\t\t\tendif;\n\t\t\t\tendif;\n\t\t\telseif ( file_exists( ABS_PATH.'/app/controllers/'.$this->_route[0].'.php' ) ):\n\n\t\t\t\t// SET CONTROLLER ( FILE / INSTANCE )\n\t\t\t\t$this->_controller['FILE'] = $this->_route[0].'.php';\n\t\t\t\t$this->_controller['INSTANCE'] = $this->_route[0];\n\n\t\t\t\t// UNSET KEYS ( $this->_route )\n\t\t\t\tunset($this->_route[0]);\n\n\t\t\tendif;\n\n\t\tendif;\n\n\t\t// LOAD CONTROLLER\n\t\trequire_once ABS_PATH.'/app/controllers/'.$this->_controller['FILE'];\n\n\t\t// CONTROLLER INSTANCE\n\t\t$this->_controller = new $this->_controller['INSTANCE']($this->_registry);\n\n\t\t// RESET KEYS ( $this->_route )\n\t\t$this->_route = $this->_route ? array_values($this->_route) : [];\n\n\t}", "title": "" }, { "docid": "81d04eec69806afb60348325a94d56b4", "score": "0.6108665", "text": "public function GetController()\n {\n include($this->routeInfo['UsingPath']);\n debug_to_console($this->routeInfo['UsingPath']);\n $LowerName = strtolower($this->routeInfo['UsingControllerName']);\n $CapitalizedName = ucfirst($LowerName); \n $LowerController = \"controller\";\n $UpperController = \"Controller\";\n\n $combo1 = $LowerName . $LowerController;\n $combo2 = $LowerName . $UpperController;\n $combo3 = $CapitalizedName . $LowerController;\n $combo4 = $CapitalizedName . $UpperController;\n\n debug_to_console($combo1);\n if(class_exists($combo1) ){\n $this->routeInfo['UsingControllerName'] = $combo1;\n $controller = new $combo1();\n return $controller;\n }\n else if ( class_exists($combo2) ){\n $this->routeInfo['UsingControllerName'] = $combo2;\n $controller = new $combo2();\n return $controller;\n }\n else if( class_exists($combo3) ){\n $this->routeInfo['UsingControllerName'] = $combo3;\n $controller = new $combo3();\n return $controller;\n }\n else if( class_exists($combo4) ){\n $this->routeInfo['UsingControllerName'] = $combo4;\n $controller = new $combo4();\n return $controller;\n }\n else{\n $message = '<h4>Unable to find a class by the name(s) of <br>' . $combo1 . ', ' . $combo2 . ', ' . $combo3 . ', ' . $combo4 . ' within ' . $this->routeInfo['UsingPath'] . '</h4>';\n throw new Exception($message);\n }\n }", "title": "" }, { "docid": "d61e6662917ac0d50fc5b5b14ec572d8", "score": "0.60981643", "text": "public function create()\n {\n // return view('bangla_resources_controllers.create');\n }", "title": "" }, { "docid": "5c7f3fd722a4183931d1ac3263b712c5", "score": "0.607352", "text": "protected function instantiateController($class)\n\t{\n\t\t$k = md5($class);\n\t\tif (array_key_exists($k, $this->controllers))\n\t\t{\n\t\t\treturn $this->controllers[$k];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$controller = new $class();\n\t\t\tif ($controller instanceof ContainerAwareInterface)\n\t\t\t{\n\t\t\t\t$controller->setContainer($this->container);\n\t\t\t}\n\t\t\t$this->controllers[$k] = $controller;\n\t\t\treturn $controller;\n\t\t}\n\t}", "title": "" }, { "docid": "c4ab04e732d1b4b77988476009907dbd", "score": "0.6057964", "text": "public function create()\n\t {\n\n\t\t\t\tforeach( self::getControllersName() as $controller )\n\t\t\t\t{\n\n\t\t\t\t\t\t$controllers[ $controller ] = $controller;\n\n\t\t\t\t}\n\n\t\t\t\tforeach( self::getVerbsName() as $verb )\n\t\t\t\t{\n\n\t\t\t\t\t\t$verbs[ $verb ] = $verb;\n\n\t\t\t\t}\n\n\t\t\t\t$permissions = self::getPermissionsName( 'assoc' );\n\n\t\t\t\t$middlewares = Middleware::where( 'name', '!=', 'checkpermission' )->orderBy( 'name' )->get();\n\n\t\t\t\treturn view( 'routes.create', compact( 'verbs', 'permissions', 'controllers', 'middlewares' ) );\n\n\t }", "title": "" }, { "docid": "6b8d9a1aa5ff5f3ee50d6c8a931f4fcb", "score": "0.6054982", "text": "protected function _loadController()\n\t{\n\t\t$controllerFile = 'app/controllers/' . $this->_router->getController() . '.php';\n\t\t$constructorParameters = array();\n\n\t\tif ( ! file_exists($controllerFile)) {\n\t\t\treturn trigger_error('\"' . $this->_router->getController() . '\" controller cannot be found from the \"app/controllers/\" directory', E_USER_ERROR);\n\t\t}\n\n\t\t/**\n\t\t * Create a new Reflection Class and get its constructor\n\t\t */\n\n\t\t$class = new \\ReflectionClass($this->_router->getController());\n\n\t\t/**\n\t\t * Check if the controller is extended to the base controller\n\t\t */\n\n\t\tif ( ! $class->getParentClass() || ($class->getParentClass()->name != 'Controller' && $class->getParentClass()->name != 'Slytherin\\Controller')) {\n\t\t\treturn trigger_error('Class \"' . $this->_router->getController() . '\" must be extended to a \"Controller\" class', E_USER_ERROR);\n\t\t}\n\n\t\t$constructor = $class->getConstructor();\n\n\t\tif ($constructor) {\n\t\t\tforeach ($constructor->getParameters() as $parameter) {\n\t\t\t\t/**\n\t\t\t\t * Get the class name without needing the class to be loaded\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tpreg_match('/\\[\\s\\<\\w+?>\\s([\\w]+)/s', $parameter->__toString(), $matches);\n\t\t\t\t$object = isset($matches[1]) ? $matches[1] : NULL;\n\n\t\t\t\tif ($object) {\n\t\t\t\t\t$constructorParameters[] = new $object();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $class->newInstanceArgs($constructorParameters);\n\t}", "title": "" }, { "docid": "9536c315cbe6fa9bded449411e4ceb72", "score": "0.60393846", "text": "public function __construct()\n {\n $url = $this->getURL();\n\n // Check if controller exists, set that to the current controller\n if (file_exists('../app/controllers/' . ucwords($url[0]) . '.php')) {\n $this->currentController = ucwords($url[0]);\n unset($url[0]);\n }\n\n // Require the controller and instantiate it\n require_once('../app/controllers/' . $this->currentController . '.php');\n $this->currentController = new $this->currentController;\n\n // Check for methods within controller and set it to the current method\n if (isset($url[1])) {\n if (method_exists($this->currentController, $url[1])) {\n $this->currentMethod = $url[1];\n unset($url[1]);\n }\n }\n\n $this->params = $url ? array_values($url) : [];\n\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "title": "" }, { "docid": "e4e07ad4b4c875df5f8db6afe1e5b09c", "score": "0.6037042", "text": "protected function createController($controller)\n {\n if (false === strpos($controller, '::')) {\n throw new \\InvalidArgumentException(sprintf('Unable to find controller \"%s\".', $controller));\n }\n\n list($class, $method) = explode('::', $controller, 2);\n\n if (!class_exists($class)) {\n throw new \\InvalidArgumentException(sprintf('Class \"%s\" does not exist.', $class));\n }\n\n //inject the app into the controller, if it's a Slimfra Controller\n $controller = new $class();\n if ($controller instanceof Controller) {\n $controller->setApp($this->app);\n }\n\n return array($controller, $method);\n }", "title": "" }, { "docid": "dab970280c7b8a7d10ffdfaf2b20f9d8", "score": "0.60306066", "text": "public function testCreateTheControllerClass()\n {\n $controller = new HighscoreController();\n $this->assertInstanceOf(\"\\App\\Controller\\HighscoreController\", $controller);\n }", "title": "" }, { "docid": "236e83b178eaa2d87295251986773dd2", "score": "0.6005822", "text": "public abstract function getController();", "title": "" }, { "docid": "07644af412d7807ebccede227597b44d", "score": "0.60047436", "text": "public function controller($args)\n {\n list($name) = $args;\n\n $this->createFile($this->controller, $name);\n }", "title": "" }, { "docid": "301dc97d6a888f0eb852f3abf75a3bd4", "score": "0.6002077", "text": "public function getController()\n {\n }", "title": "" }, { "docid": "16089767cdfa6384ee56b0c4fe488812", "score": "0.5995394", "text": "private function createHomeController() {\n $path = $this->getPath() . \"controllers/home.php\";\n $namespace = $this->getNamespace();\n if ($this->fileExists($path)) {\n return \"$path home controller already exists\";\n }\n\n $my_home = fopen($path, \"w\") or die(\"Unable to create home controller!\");\n\n $home_template = \"<?php\n\nnamespace $namespace\\Controllers;\n\nclass home extends \\SlimController\\SlimController {\n\n public function indexAction() {\n global \\$base_url, \\$twig;\n \\$params = array('base_url' => \\$base_url,\n 'title' => 'Page meta title',\n 'description' => 'Page meta description'\n );\n echo \\$twig->render('index.html', \\$params);\n }\n}\";\n\n fwrite($my_home, $home_template);\n\n fclose($my_home);\n\n return \"$path model has successfully been created.\\n\";\n }", "title": "" }, { "docid": "4137b3b3e51e4550138809a2d54ce03d", "score": "0.59903866", "text": "private function callController()\n {\n if (empty($this->controller)) {\n header(\"Location: Home/index\");\n exit;\n }\n require_once '../app/controllers/' . $this->controller . '.php';\n $this->controller = new $this->controller();\n }", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "6abcf77f4400ca5d96e2fe6b50d3f57b", "score": "0.5984883", "text": "static function getController($controllerName){\n if(!self::$initiated){\n throw new Exception(\"ChatBox Not Initialized\");\n }\n \n /**\n * Check if the Controller Name is Provided or not\n */\n if($controllerName==NULL){\n throw new Exception(\"Invalid Class Name\");\n }\n \n $CoreControllerPath=self::_buildPath(\"core/controller\");\n \n if(!file_exists($CoreControllerPath)){\n // Throw error if core controller class file is mising\n throw new Exception(\"Core Controller Missing: The core file fo model class is missing\");\n }else{\n /**\n * Include the core Controller Class so that the class extending it can\n * function properly on that basis\n */\n include_once $CoreControllerPath;\n }\n /*\n * Build the Path for the file for the specified class name\n */\n $controllerPath=self::_buildPath(\"controllers\".DIRECTORY_SEPARATOR.$controllerName);\n \n if(!file_exists($controllerPath)){\n // Throw Exception If Class Is Not Found\n throw new Exception(\"Controller Not Found At Location: \".$ModelPath);\n }else{\n // Include the controller file\n include_once $controllerPath;\n }\n \n /*\n * Figure out the class name of the required model and initialiuze that\n * class and return the object\n */\n $NeededClass=self::_buildControllerName($controllerName);\n \n // Return Class Object\n $controllerObject= new $NeededClass();\n \n if(strcasecmp(get_parent_class($controllerObject),\"Controller\")){\n throw new Exception(\"Not a valid Controller Class\");\n }\n \n return $controllerObject;\n }", "title": "" }, { "docid": "b416aba200ec688eee82a0859e6b576d", "score": "0.59773743", "text": "protected function getBazinga_Exposetranslation_ControllerService()\n {\n $a = $this->get('translation.loader.xliff');\n\n $this->services['bazinga.exposetranslation.controller'] = $instance = new \\Bazinga\\ExposeTranslationBundle\\Controller\\Controller($this->get('translator.default'), $this->get('debug.templating.engine.twig'), $this->get('bazinga.exposetranslation.finder.translation_finder'), '/home/jenkins/jobs/Release/workspace/app/cache/dev/bazinga_expose_translation', true, '', array(0 => 'messages'));\n\n $instance->addLoader('php', $this->get('translation.loader.php'));\n $instance->addLoader('yml', $this->get('translation.loader.yml'));\n $instance->addLoader('xlf', $a);\n $instance->addLoader('xliff', $a);\n $instance->addLoader('po', $this->get('translation.loader.po'));\n $instance->addLoader('mo', $this->get('translation.loader.mo'));\n $instance->addLoader('ts', $this->get('translation.loader.qt'));\n $instance->addLoader('csv', $this->get('translation.loader.csv'));\n $instance->addLoader('res', $this->get('translation.loader.res'));\n $instance->addLoader('dat', $this->get('translation.loader.dat'));\n $instance->addLoader('ini', $this->get('translation.loader.ini'));\n\n return $instance;\n }", "title": "" }, { "docid": "e9ea3ec134f3c6c83bd05d0df8b39387", "score": "0.59539944", "text": "public function __construct()\n\t{\n\t\t$url = $this->parseUrl();\n\n\t\t// check if the controller file exists\n\t\t// if it exists,then remove from the url array\n\t\t// if it doesn't exist we have to redirect to a 404 page\n\t\t// but currently we redirecting to home/index\n\t\tif(file_exists('app/controllers/'.$url[0].'_controller.php'))\n\t\t{\n\t\t\t$this->controller = $url[0].'_controller';\n\t\t\tunset($url[0]);\n\t\t}\n\t\telse{\n\t\t\t//404 controller\n\t\t}\n\n\t\trequire_once 'app/controllers/'.$this->controller.'.php';\n\n // remove the underscores so that can look like the corresponding\n // Controller class name\n $this->controller = str_replace('_','',$this->controller);\n\n\t\t// create an instance of the given controller\n\t\t$this->controller = new $this->controller;\n\n \n // check if the controller method exists\n\t\t// if it exists,then remove from the url array\n\t\t// if it doesn't exist we have to redirect to a 404 page\n\t\t// but that's not implemented yet\n\t\t// but currently we redirecting to home/index\n\t\tif(isset($url[1]))\n\t\t{\n\t\t\tif(method_exists($this->controller, $url[1]))\n\t\t\t{\n\t\t\t\t$this->method = $url[1];\n\t\t\t\tunset($url[1]);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t// 404 \n\t\t\t}\n\t\t}\n\n // after extracting the controller and controller methods,\n // the rest of the array are parameters to be passed to the\n // controller method\n\t\t$this->params = $url ? array_values($url) : [];\n\t\tcall_user_func_array([$this->controller,$this->method],$this->params);\n\t}", "title": "" }, { "docid": "4e33211305398101ae2c45530f1d32fd", "score": "0.5949818", "text": "public function createInstance();", "title": "" }, { "docid": "cfc83543f3852ef69eae3be2c77727dd", "score": "0.594272", "text": "private function buildController()\n {\n if (! file_exists($controller = app_path('Http/Controllers/BlogController.php'))) {\n $this->exportController();\n } else {\n if ($this->confirm('The [Http/Controllers/BlogController.php] already exists. Do you want to replace it?')) {\n $this->exportController();\n }\n }\n }", "title": "" }, { "docid": "bbbedde73f0a55d66d48202a05713841", "score": "0.59389263", "text": "protected function initializeController()\n {\n $this->controller = GeneralUtility::makeInstance(\n TypoScriptFrontendController::class,\n null,\n GeneralUtility::_GP('id'),\n GeneralUtility::_GP('type'),\n GeneralUtility::_GP('no_cache'),\n GeneralUtility::_GP('cHash'),\n null,\n GeneralUtility::_GP('MP'),\n GeneralUtility::_GP('RDCT')\n );\n // setting the global variable for the controller\n // We have to define this as reference here, because there is code around\n // which exchanges the TSFE object in the global variable. The reference ensures\n // that the $controller member always works on the same object as the global variable.\n // This is a dirty workaround and bypasses the protected access modifier of the controller member.\n $GLOBALS['TSFE'] = &$this->controller;\n }", "title": "" }, { "docid": "a85a88c2a28f339a38da69b12eefb4aa", "score": "0.5907327", "text": "private function loadController(){\n $name = ucfirst($this->request->controller).'Controller';\n $namespace = '\\App\\Controller\\\\'. $name;\n $file = ROOT . DS . 'src/Controller/' . $name . '.php';\n if(file_exists($file)){\n require($file);\n $controller = new $namespace();\n $controller->setData($this->request->data);\n $controller->loadModel();\n $this->loadAction($controller);\n }\n }", "title": "" }, { "docid": "7d256c20220027c7a85e757115f98bb7", "score": "0.58875805", "text": "public static function start(){\n\t\t$request = Request::getInstancia();\n\t\t$armador = Armador::getInstancia();\n\t\t$armador->setRequest($request);\n\t\t$armador->analizarPeticion();\n\t\t$disp = Dispatcher::getInstancia();\n\t\t$disp->setArmador($armador);\n\t\t$disp->crearController();\n\t}", "title": "" }, { "docid": "540d0e7f89fbbfad9bdaaeb82c970a6e", "score": "0.5885819", "text": "public function getControllerInstance($class, $request, $response, array $invokeArgs = array());", "title": "" }, { "docid": "f5af93e1da8f6e2d3be68dc003e5db47", "score": "0.58775026", "text": "public function __construct()\n {\n $url = $this->getUrl();\n\n // Untuk Controller\n // Apakah ada file controller di folder app/controllers yang akan diakses\n if (file_exists('../app/controllers/' . ucwords($url[0]) . '.php')) {\n // Jika ada, timpa currentController dengan file controller yang baru\n $this->currentController = ucwords($url[0]);\n //Hapus array ke 0\n unset($url[0]);\n }\n // Require controller\n require_once '../app/controllers/' . $this->currentController . '.php';\n\n // Instansiasi class currentController\n $this->currentController = new $this->currentController;\n\n // Untuk Methhod\n // Cek index 1 dari url\n if (isset($url[1])) {\n // Apakah ada method di objek currentController yang di instansiasi diatas (new $this->controller)\n if (method_exists($this->currentController, $url[1])) {\n // Jika methodnya ada timpa method dengan method baru\n $this->currentMethod = $url[1];\n\n // Hapus array ke 1\n unset($url[1]);\n }\n }\n\n // Untuk Parameter\n // Ambil paremeter dari url\n $this->params = $url ? array_values($url) : [];\n\n //Jalankan controller & method, serta kirimkan params jika ada\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "title": "" }, { "docid": "5bf6d5f5a4f3455bbaaa07e0ebc61ac2", "score": "0.5874767", "text": "public function __construct()\r\n {\r\n if (!empty($_REQUEST['controller']) && RoutersLoader::checkValidRouters($_REQUEST['controller'])) {\r\n $this->current_controller = '\\\\Controllers\\\\' . $this->toCamelCaseParser($_REQUEST['controller']) . 'Controller';\r\n } elseif (empty($_REQUEST['controller'])) {\r\n $this->current_controller = '\\\\Controllers\\\\IndexController';\r\n } else {\r\n $this->current_controller = '\\\\Controllers\\\\PageNotFoundController';\r\n $this->current_action = '';\r\n }\r\n\r\n if (!empty($_REQUEST['action'])) {\r\n $this->current_action = $this->toCamelCaseParser($_REQUEST['action']);\r\n }\r\n unset($_REQUEST['controller'], $_REQUEST['action']);\r\n return $this->getController();\r\n }", "title": "" }, { "docid": "498af644a321aaae7e9829e150936038", "score": "0.58638346", "text": "public static function getConsoleController($controller)\n\t{\n\t\t$controller = empty($controller) ? 'Default' : ucfirst(strtolower($controller));\n\t\t\n\t\t$className = 'LSF_Console_Controller_' . $controller;\n\t\t\n\t\ttry {\n\t\t\t$controller = new $className(true);\n\t\t}\n\t\tcatch (LSF_Exception_ClassNotFound $e) {\n\t\t\t$controller = new LSF_Console_Controller_Default(true);\n\t\t}\n\t\t\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "e6effab7d68a30557338abf6bb92cffe", "score": "0.5858457", "text": "public function runController()\n {\n $this->_controller\n = $this->request->getControllerName() ? : self::DEFAULT_URI;\n $this->_action = $this->request->getActionName();\n\n $controllerClass\n = $this->config['controllers_namespaces']\n . ucfirst($this->_controller)\n . 'Controller';\n\n if (class_exists($controllerClass)) {\n $controller = new $controllerClass(new \\app\\services\\TemplateRenderer());\n $controller->runAction($this->_action);\n }\n }", "title": "" }, { "docid": "299fa037b6192316df2b9bb6cf0fe40a", "score": "0.5847927", "text": "private function ControllerInitializationLogic()\n {\n $loadedFile = 'controllers/' . $this->url[CONTROLLER] . '.php';\n if (file_exists($loadedFile)) \n {\n require_once $loadedFile;\n } \n else \n {\n $this->error();\n die;\n }\n $this->controller = new $this->url[CONTROLLER]();\n }", "title": "" }, { "docid": "f6fd8e64ced0699955973bdfedbb60ba", "score": "0.5845282", "text": "public function create()\n\t{\n\t\t$PageController = new PageController();\n\t\t\n\t\treturn View::make('pages.typer')\n\t\t->with('body_class','page typer-create')\n\t\t->with('title','Typer')\n\t\t->with('typer',new Typer);\n\t}", "title": "" }, { "docid": "4cb7f3b8b4aec227a426eceae4a7f957", "score": "0.5842782", "text": "public function create()\n {\n return view('create_instance');\n }", "title": "" }, { "docid": "c3de2a8b034d0b0037fce3a094d2637f", "score": "0.5837674", "text": "private function loadController(){\n\t\t$controllerPath = ROOT_DIR . 'app' . DS . 'controllers' . DS . strtolower($this->controller) . '_controller.php';\n\t\tif(file_exists($controllerPath)){\n\t\t\trequire_once($controllerPath);\n\t\t\t$controllerClassName = ucfirst($this->controller) . 'Controller';\n\t\t\tif(class_exists($controllerClassName)){\n\t\t\t\treturn new $controllerClassName();\n\t\t\t}\n\t\t\tthrow new Exception('Could not load controller class:' . strtolower($this->controller) . '_controller.php');\n\t\t}\n\t\tthrow new Exception('Could not find controller class file.' . $this->controller);\n\t}", "title": "" }, { "docid": "64bf1415d912afd2adb84ed0ea1542a0", "score": "0.5836937", "text": "public static function getConsoleAppController($controller)\n\t{\n\t\t$controller = empty($controller) ? 'Default' : ucfirst(strtolower($controller));\n\t\t\n\t\t$className = 'Console_Controller_' . $controller;\n\t\t\n\t\ttry {\n\t\t\t$controller = new $className(true);\n\t\t}\n\t\tcatch (LSF_Exception_ClassNotFound $e) {\n\t\t\t$controller = new Console_Controller_Default(true);\n\t\t}\n\t\t\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "b8a17cab53c95179aae5abe863c32ac5", "score": "0.58288294", "text": "public function __construct() {\r\n\r\n \t//Define Url Variable\r\n \t$url = self::paresUrl();\r\n\r\n\r\n\t\t/*\r\n \t* If Url Is Null Controller Will Be Home By Defalu\r\n \t* Or The Url Will Be $url[0] And Unset From Url Array\r\n \t* Else (Mean The Controller Not Found) Set Error 404 Controller\r\n \t*/\r\n \tif(is_null($url[0])) {\r\n \t\tself::$controller = self::$controller;\r\n \t}elseif(self::CheckFile('controllers', ucwords($url[0]))) {\r\n \t\tself::$controller = ucwords($url[0]);\r\n \t\tunset($url[0]);\r\n \t}\r\n\r\n\r\n\t\t//Require The Controller If Anything If Is Found\r\n \trequire_once '../app/controllers/' . self::$controller . '.php';\r\n \tself::$controller = new self::$controller;\r\n\r\n \t//Check If Controller Variable Is Really Object\r\n \t//Then Check If $url[1] Is Really Method Iside Controller Class\r\n \tif(is_object(self::$controller)) {\r\n if(isset($url[1])) {\r\n \t\tif(method_exists(self::$controller, $url[1])) {\r\n \t\t\tself::$method = $url[1];\r\n \t\t\tunset($url[1]);\r\n \t\t}\r\n }\r\n \t}\r\n\r\n //Set Function Params Of Specific Controller As Array\r\n \tself::$params = $url ? array_values($url) : [];\r\n\r\n //Call The Specific controller With It Methods And Params Of Methods\r\n \tcall_user_func_array([self::$controller, self::$method], self::$params);\r\n\r\n }", "title": "" }, { "docid": "b54b3bc133fa7ea35f90ca475dccff6a", "score": "0.58149475", "text": "public function MakeController($resource=false)\r\n {\r\n if($resource)\r\n $filename = __DIR__.'\\..\\stubs\\module\\Controllers\\ModuleRController.stub';\r\n else\r\n $filename = __DIR__.'\\..\\stubs\\module\\Controllers\\ModuleController.stub';\r\n\r\n $contents = File::get($filename);\r\n $this->setNamespace('cms'.DIRECTORY_SEPARATOR.$this->modulename.DIRECTORY_SEPARATOR.'Controllers');\r\n $contents = $this->changeNamespace($contents);\r\n $contents = $this->changeClass($contents);\r\n $this->content = $contents;\r\n $this->makePath('Controllers');\r\n\r\n $this->setPath($this->path.DIRECTORY_SEPARATOR.$this->modulename.DIRECTORY_SEPARATOR.'Controllers'.DIRECTORY_SEPARATOR.$this->classname.\".php\");\r\n return $this;\r\n }", "title": "" }, { "docid": "174fa09c82fc0726302152facf4985ac", "score": "0.5810524", "text": "public function callController(string $className, Request $request, array $args = []): Controller\n {\n if (!ClassManager::is(Controller::class, $className)) {\n throw new DependencyInjectorException(\"{$className} is not a Controller\");\n }\n\n /** @var Controller $controller*/\n $controller = $this->callConstructor($className, $args);\n $controller->setRequest($request);\n\n return $controller;\n\n }", "title": "" }, { "docid": "7c1ad216259a3db58a432b52fb80f184", "score": "0.5802759", "text": "public function __construct($controller) {\n $this->controller = $controller;\n }", "title": "" }, { "docid": "519c12b1c73f4a2e417d7f14eb7d9e74", "score": "0.5801946", "text": "public function testCreateTheControllerClass()\n {\n $controller = new DiceGame();\n $this->assertInstanceOf(\"\\Mos\\Controller\\DiceGame\", $controller);\n }", "title": "" }, { "docid": "25395dadab49bb08e423982e26d4e475", "score": "0.5801479", "text": "public function getClient()\n {\n return new Controllers\\APIController();\n }", "title": "" }, { "docid": "8f85e2917e2cb1af2458cf6315b763ce", "score": "0.579325", "text": "private function getController($controllerName)\n {\n $controllerClass = sprintf('%sController', $controllerName);\n $controllerPath = sprintf('%s/%s.php', $this->controllerDirectory, $controllerClass);\n\n if (!file_exists($controllerPath)) {\n throw new \\InvalidArgumentException(sprintf('You have requested an invalid controller \\'%s\\'', $controllerClass));\n }\n\n require $controllerPath;\n return new $controllerClass($this->templating);\n }", "title": "" }, { "docid": "5f4dd7bd3cb560cdd086b81ecfda7990", "score": "0.5791628", "text": "private function createController($nome_da_tabela,$pacote){\n\t\t\t$this->init();\n\t\t\t$arq = $this->LerArq($this->caminho . \"tabelaController.php\");\n\t\t\t\n\t\t\t$this->CriarEstrutura($pacote,$nome_da_tabela);\n\t\t\t\n\t\t\tfor($i = 0; $i < count($arq); $i++) {\n\t\t\t\t$arq[$i] = str_replace(\"this->clientes\", \"this->\".$nome_da_tabela, $arq[$i]);\t\n\t\t\t\t$arq[$i] = str_replace(\"clientesModel\", $nome_da_tabela.\"Model\", $arq[$i]);\t\n\t\t\t\t$arq[$i] = str_replace(\"listaClientes\", \"lista\".$nome_da_tabela, $arq[$i]);\t\t\t\t\t\n\t\t\t\t$arq[$i] = str_replace(\"ClienteShow\", $nome_da_tabela.\"Show\", $arq[$i]);\t\n\t\t\t\t$arq[$i] = str_replace(\"clienteShow\", $nome_da_tabela.\"Show\", $arq[$i]);\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$arq[$i] = str_replace(\"Class clientes\", \"Class \".$nome_da_tabela, $arq[$i]);\t\t\t\t\t\t\t\t\t\n\t\t\t\t$arq[$i] = str_replace(\"clientes\", $nome_da_tabela, $arq[$i]);\n\t\t\t}\n\t\t\t\n\t\t\t// Gerenciando o caminho do controlador:\n\t\t\t$path = FW_PATH_SERV . FW_RAIZ . \"app/packages/\" . $pacote . \"/controllers/\";\n\t\t\t$name = $path . $nome_da_tabela . \"Controller.php\";\n\t\t\t$this->CriarArq($name,$arq);\n\t\t}", "title": "" }, { "docid": "9e55f7c2396df536231f275863e8eb63", "score": "0.57845455", "text": "private static function createWithController($class = Page::class, $controller = PageController::class)\n\t\t{\n\t\t\t$type = new static($class);\n\t\t\t$type->controller = $controller;\n\t\t\treturn $type;\n\t\t}", "title": "" }, { "docid": "6e7f8441b1d4ec9eea743f3f1d8efdc7", "score": "0.57796806", "text": "public function __construct()\n {\n // Replace in the base name the \"Controller\" string\n $shell = Str::replaceLast('Controller', '', class_basename($this));\n $this->shellClass = Beluga::qualifyShell($shell);\n $this->shell = new ($this->shellClass)();\n }", "title": "" }, { "docid": "c4f69ff9c0afcb328665660bedbfc621", "score": "0.57786876", "text": "public function __construct()\n {\n // Get the url array\n $url = $this->parse_url();\n // First check if any uri segment is set.\n if (isset($url[0])) {\n $ifController = ucfirst($url[0]) . 'Controller';\n $controllerPath = ROOT . 'mvc/controllers/';\n // Is uri segment 1 controller ?\n if (file_exists($controllerPath . $ifController . '.php')) {\n $this->controller = $ifController;\n unset($url[0]);\n // If it is: Check if uri segment 2 is set. Is it an action ?\n if (isset($url[1]) && method_exists($this->controller, $url[1])) {\n $this->action = $url[1];\n unset($url[1]);\n }\n // If not: Is uri segment 1 an action ?\n } else if (!file_exists($controllerPath . $ifController . '.php') && method_exists($this->controller, $url[0])) {\n $this->action = $url[0];\n unset($url[0]);\n }\n // If non of these: parameters are in array.\n $this->params = $url ? array_values($url) : [];\n }\n // Include the controller.\n require_once ROOT . 'mvc/controllers/' . $this->controller . '.php';\n // Make new controller instance\n $this->controller = new $this->controller;\n // Call the method and forward params\n call_user_func_array([$this->controller, $this->action], $this->params);\n }", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "ad5ef647e779e398ea5cb3a0c35dded8", "score": "0.57718", "text": "public function create (){}", "title": "" }, { "docid": "af0405ac725b2580cf2ce08f07f4e490", "score": "0.5771243", "text": "final public static function newInstance($controller = null, $action = null, ?array $params = array())\n\t{\n\t\treturn (new ReflectionClass(self::class))->newInstanceArgs([$controller, $action, $params]);\n\t}", "title": "" }, { "docid": "50c072ee9246eb0cb7f6f05291bb82c4", "score": "0.5764692", "text": "public function create() {\n // Not needed currently\n }", "title": "" }, { "docid": "2631f83841dbe4ea821bdf63f8b030a4", "score": "0.5758617", "text": "public function choiceController()\n {\n $functionname;\n $controller = $this->ask('Name of Controller?');\n // Ask to create routing\n $routing = $this->choice(\n 'are you want to create routing?', [\n '1' => 'Yes',\n '2' => 'No'\n ]\n );\n if ($routing == 'Yes') {\n $routename = $this->ask('Enter the name of route prefix?');\n } else {\n $routename = null;\n }\n // Option for create which type of controller\n $function = $this->choice('Select any one would you like to create?', [\n '1' => 'Blank Controller',\n '2' => 'All Function',\n '3' => 'Self Define function'\n ]\n );\n if ($function == 'Self Define function') {\n $functions = $this->ask('write function in comma seperated form');\n $functionname = explode(',', $functions);\n } else {\n $functionname = null;\n }\n $this->arrController[] = array('controller' => $controller,\n 'route' => $routing,\n 'routeName' => $routename,\n 'option' => $function,\n 'function' => $functionname\n );\n }", "title": "" }, { "docid": "ab67c9536084fe68c7185fb535e3563e", "score": "0.57557225", "text": "protected function controller($name)\n {\n $controllerTemplate = str_replace(\n [\n '{{modelName}}',\n '{{modelNamePluralLowerCase}}',\n '{{modelNameSingularLowerCase}}'\n ],\n [\n $name,\n strtolower(str_plural($name)),\n strtolower($name)\n ],\n $this->getStub('Controller')\n );\n\n file_put_contents(app_path(\"/Http/Controllers/{$name}Controller.php\"), $controllerTemplate);\n }", "title": "" }, { "docid": "0f642521df72c89eb55665af8a098790", "score": "0.57528055", "text": "public function __construct(){\n\t\tEventManager::getInstance()->event('controller.construct',$this);\n\t\t$this->request = Request::getInstance();\n\t\t\n\t\t$name = explode('\\\\',get_class($this));\n\t\t\n\t\tif($this->collection === 'default'){\n\t\t\t$modelName = str_replace('Controller','',$name[2]);\n\t\t}else{\n\t\t\t$modelName = $this->collection; \n\t\t}\n\t\t$this->{$modelName} = MasterModel::load($modelName);\n\t\t$this->_loadTools();\n\t\t$this->_iniView();\n\t}", "title": "" }, { "docid": "51b137a19c826754a5ee4e1dbcb37ece", "score": "0.5751648", "text": "public function __construct() {\n $this->load = Loader::Instance();\n \n // A static reference to the controller.\n self::$instance =& $this;\n }", "title": "" }, { "docid": "1ff64567cb12b61aa56ecfaeecbbfad5", "score": "0.57502806", "text": "private function addController(string $controller): void\n {\n $object = new $controller($this->app);\n\n $this->controllers[$controller] = $object;\n }", "title": "" } ]
0f9d3840eacb7f8276620167c1dc996c
Check to see if no addons are activated
[ { "docid": "207d1df8c56f78aea1735b040bdda7e6", "score": "0.748827", "text": "function dokanee_no_addons() {\n\t\tif ( defined( 'GP_PREMIUM_VERSION' ) ) {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "6e7355a0ef85751619295bddf14bfb02", "score": "0.70835567", "text": "static function wcfm_wc_addons_active_check() {\n\t\tif ( ! self::$active_plugins ) self::init();\n\t\treturn in_array( 'woocommerce-product-addons/woocommerce-product-addons.php', self::$active_plugins ) || array_key_exists( 'woocommerce-product-addons/woocommerce-product-addons.php', self::$active_plugins );\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e6c663a722d93d1607f2c190c1400772", "score": "0.6975408", "text": "function dokanee_addons_available() {\n\t\tif ( defined( 'GP_PREMIUM_VERSION' ) ) {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "f3ff71f448de22798378b057f0f0709b", "score": "0.67443454", "text": "public static function possibly_install_activate_plugins()\n {\n }", "title": "" }, { "docid": "4d6db4632750ed509712818b5b664835", "score": "0.6620893", "text": "public function check_modules() {\n $active_ep = get_option( 'ep_feature_settings', array() );\n if ( ! empty( $active_ep ) ) {\n foreach ( $active_ep as $feature ) {\n if ( $feature['active'] ) {\n add_action( 'admin_notices', array( $this, 'modules_error' ) );\n break;\n }\n }\n }\n }", "title": "" }, { "docid": "e3dcacc685b331b3185d651396e6c5b6", "score": "0.65496826", "text": "static function wcfm_wc_warranty_plugin_active_check() {\n\t\tif ( ! self::$active_plugins ) self::init();\n\t\treturn in_array( 'woocommerce-warranty/woocommerce-warranty.php', self::$active_plugins ) || array_key_exists( 'woocommerce-warranty/woocommerce-warranty.php', self::$active_plugins ) || class_exists( 'WooCommerce_Warranty' );\n\t\treturn false;\n\t}", "title": "" }, { "docid": "3d0325eb4d858dca881fd2b16aa3a35b", "score": "0.6527849", "text": "function check_addons_compatibility() {\n\t\t$add_ons = array(\n\t\t 'photo-gallery-facebook' => array( 'version' => '1.1.0', 'file' => 'photo-gallery-facebook.php' ),\n\t\t 'photo-gallery-export' => array( 'version' => '1.0.3', 'file' => 'photo-gallery-export.php' ),\n\t\t 'photo-gallery-ecommerce' => array( 'version' => '1.0.17', 'file' => 'photo-gallery-ecommerce.php' ),\n\t\t);\n\t\t$add_ons_notice = array();\n\t\tinclude_once(ABSPATH . 'wp-admin/includes/plugin.php');\n\t\tforeach ( $add_ons as $add_on_key => $add_on_value ) {\n\t\t $addon_path = plugin_dir_path(dirname(__FILE__)) . $add_on_key . '/' . $add_on_value['file'];\n\t\t if ( is_plugin_active($add_on_key . '/' . $add_on_value['file']) ) {\n\t\t\t$addon = get_plugin_data($addon_path);\n\t\t\tif ( version_compare($addon['Version'], $add_on_value['version'], '<=') ) {\n\t\t\t deactivate_plugins($addon_path);\n\t\t\t array_push($add_ons_notice, $addon['Name']);\n\t\t\t}\n\t\t }\n\t\t}\n\t\tif ( !empty($add_ons_notice) ) {\n\t\t $this->addons_compatibility_notice($add_ons_notice);\n\t\t}\n\t}", "title": "" }, { "docid": "2bb44bb60626bc67033b6763e0fed77c", "score": "0.6507509", "text": "public static function has_plugins_active()\n {\n }", "title": "" }, { "docid": "522f4967eb33bd4aab4e4f40bcd85e09", "score": "0.64121896", "text": "function check_for_required_plugins() {\n\tif ( ! is_plugin_active( 'wp-ir73/wp-ir73.php' ) ) {\n\t\tadd_action( 'admin_notices', 'show_plugins_missing_notice' );\n\t}\n}", "title": "" }, { "docid": "4c7d1dcfa134ff42fcd781800765e66b", "score": "0.638915", "text": "function mtcf_activation_check() {\n $plugins = apply_filters('active_plugins', get_option('active_plugins'));\n \n if ( is_multisite() ) {\n // get active plugins for the network\n $network_plugins = get_site_option('active_sitewide_plugins');\n if ( $network_plugins ) {\n $network_plugins = array_keys($network_plugins);\n $plugins = array_merge($plugins, $network_plugins);\n }\n }\n\n $deps = array('buddypress/bp-loader.php' => 'BuddyPress');\n $missing = array();\n\n foreach ( $deps as $plugin=>$name ) {\n if ( !in_array($plugin, $plugins) ) {\n $missing[] = $name;\n }\n }\n\n if ( $missing ) {\n global $mtcf_missing_plugins;\n $mtcf_missing_plugins = $missing;\n add_action('admin_notices', 'mtcf_activation_missing_plugins_notice');\n add_action('network_admin_notices', 'mtcf_activation_missing_plugins_notice');\n deactivate_plugins( plugin_basename( __FILE__ ) );\n }\n}", "title": "" }, { "docid": "be773770a6074684983239bf347a1d52", "score": "0.6351363", "text": "private function conditional_logic_addon_check()\n {\n\n if (function_exists('wpforms_conditional_logic')) {\n\n // Load core files needed to activate deactivate_plugins().\n require_once(ABSPATH . 'wp-admin/includes/plugin.php');\n require_once(ABSPATH . 'wp-includes/pluggable.php');\n\n // Deactivate Conditional Logic addon.\n deactivate_plugins('wpforms-conditional-logic/wpforms-conditional-logic.php');\n\n // To avoid namespace collisions, reload current page.\n $url = esc_url_raw(remove_query_arg('wpforms-test'));\n wp_redirect($url);\n exit;\n }\n }", "title": "" }, { "docid": "99e82e3e1b5a5c514801ff0e8586ddbb", "score": "0.6340916", "text": "function edd_img_wtm_check_activation() {\r\n\r\n if (!class_exists('Easy_Digital_Downloads')) {\r\n // is this plugin active?\r\n if (is_plugin_active(plugin_basename(__FILE__))) {\r\n // deactivate the plugin\r\n deactivate_plugins(plugin_basename(__FILE__));\r\n // unset activation notice\r\n unset($_GET['activate']);\r\n // display notice\r\n add_action('admin_notices', 'edd_img_wtm_admin_notices');\r\n }\r\n }\r\n}", "title": "" }, { "docid": "fbff317375ed8c4b6a9ccd2dd98aeb7a", "score": "0.6337934", "text": "public function isResetAddons()\n {\n return (boolean)$this->resetAddons;\n }", "title": "" }, { "docid": "8134641c3ea2e3f8cab0dafe7bd160b3", "score": "0.6323992", "text": "public static function has_installed_extensions()\n {\n }", "title": "" }, { "docid": "c62dc535b4731013cee402c91bc4fe7f", "score": "0.63234884", "text": "public function isAvailable()\n {\n return static::NOT_AVAILABLE_MODULE != $this->getXcnPlan();\n }", "title": "" }, { "docid": "15c4cbfea8c238c670aa37e2dcb5159a", "score": "0.63109106", "text": "public static function is_needed(): bool {\n\t\treturn \\function_exists( '\\newrelic_disable_autorum' );\n\t}", "title": "" }, { "docid": "8f54adf5c5245938df740c2b4a726e4a", "score": "0.625539", "text": "public function no_items(){\r\n _e('No scripts avaliable.', 'acfe');\r\n }", "title": "" }, { "docid": "b883714ad4b0539b192d06b16d5d7846", "score": "0.6254201", "text": "static function wcfm_yith_auction_active_check() {\n\t\tif ( ! self::$active_plugins ) self::init();\n\t\treturn in_array( 'yith-woocommerce-auctions-premium/init.php', self::$active_plugins ) || array_key_exists( 'yith-woocommerce-auctions-premium/init.php', self::$active_plugins );\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d876518d5eaae0b76dc915ba73e24e6d", "score": "0.62224954", "text": "public static function isAddonEnabled()\n {\n return Registry::ifGet('addons.discussion.status', 'D') === 'A';\n }", "title": "" }, { "docid": "d603e66bd2ce4b316279cadedd672fe7", "score": "0.621974", "text": "protected function notByInstall()\n {\n return file_exists($this->settingsFile());\n }", "title": "" }, { "docid": "e9ec81f073b6d49290ee138cf9d10de6", "score": "0.6192641", "text": "protected function checkModules()\n\t{\n\t\tif (Loader::includeModule('imconnector'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tShowError(Loc::getMessage('IMCONNECTOR_COMPONENT_SETTINGS_MODULE_NOT_INSTALLED_MSGVER_1'));\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "efa4cb2dfcc0df26fc933d57f6251e48", "score": "0.61651653", "text": "private static function isUnableToRunPlugins()\n\t{\n\t\tif (defined('WELOQUENT_TEST_ENV')\n\t\t\t|| defined('WP_INSTALLING')\n\t\t\t|| (defined('WP_USE_THEMES') && WP_USE_THEMES === false)\n || (defined('XMLRPC_REQUEST') && XMLRPC_REQUEST === true)\n )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "20f82ebd021456ac22665349c7d9005f", "score": "0.6150888", "text": "protected function outputInstallToolNotEnabledMessageIfNeeded() {}", "title": "" }, { "docid": "20f82ebd021456ac22665349c7d9005f", "score": "0.6150888", "text": "protected function outputInstallToolNotEnabledMessageIfNeeded() {}", "title": "" }, { "docid": "5c1187a789ab4327036b779a7d77654a", "score": "0.6146816", "text": "private function isModuleEnabled()\n {\n $helper = Mage::helper('paybyfinance');\n return (((boolean) Mage::getStoreConfig($helper::XML_PATH_SAGEPAY_INITIATOR)) == true) ;\n }", "title": "" }, { "docid": "55bf278a2692c2fecfc98688c6f3b38b", "score": "0.61352277", "text": "public function checkInstalled()\n\t{\n if (file_exists(JPATH_ROOT.'/plugins/content/plg_jwadvanced/plg_jwadvanced.php'))\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "b07d4fae3ed8411d8a3a68784392b870", "score": "0.61340815", "text": "static function wcfm_wcs_auction_active_check() {\n\t\tif ( ! self::$active_plugins ) self::init();\n\t\treturn in_array( 'woocommerce-simple-auctions/woocommerce-simple-auctions.php', self::$active_plugins ) || array_key_exists( 'woocommerce-simple-auctions/woocommerce-simple-auctions.php', self::$active_plugins );\n\t\treturn false;\n\t}", "title": "" }, { "docid": "8f1fb3388f1195f782bf274694ece46b", "score": "0.61140877", "text": "function idealEnabled() {\n\t\t$db = & JFactory::getDBO();\n\t\t$sql = 'SELECT COUNT(id) FROM #__eb_payment_plugins WHERE name=\"os_ideal\" AND published=1';\n\t\t$db->setQuery($sql) ;\n\t\t$total = $db->loadResult() ;\n\t\tif ($total) {\n\t\t\trequire_once JPATH_COMPONENT.DS.'payments'.DS.'ideal'.DS.'ideal.class.php';\n\t\t\treturn true ;\n\t\t} else {\n\t\t\treturn false ;\t\n\t\t}\t\t\t\n\t}", "title": "" }, { "docid": "692570f5d870fa8a4a594eb572f5e1cc", "score": "0.6108091", "text": "function genesis_extender_essentials_is_active_nag()\n\t\t{\t\t\t\n\t\t\techo '<div id=\"update-nag\">';\n\t\t\tprintf( __( '<strong>Genesis Extender & Genesis Essentials Are Currently Active!</strong> These two Cobalt Apps products are not to be used together so deactivate <a href=\"%s\">Genesis Extender</a> or <a href=\"%s\">Genesis Essentials</a>.', 'extender' ), admin_url( 'plugins.php' ), admin_url( 'plugins.php' ) );\n\t\t\techo '</div>';\n\t\t}", "title": "" }, { "docid": "1af9031d732e28a9e2c8228b6c2eddfb", "score": "0.61063397", "text": "function activation_hook() {\n\t\t// Kill activation if requirements not met and auto deactivate is true\n\t\tif ($this->auto_deactivate_sans_requirements && !$this->required_plugins_active) {\n\t\t\t$message = '';\n\n\t\t\tforeach ($this->admin_notices as $admin_notice) {\n\t\t\t\t$message .= __(esc_html($admin_notice['message']), $this->text_domain) . '<br>';\n\t\t\t}\n\n\t\t\tdie('<strong>' . $this->plugin_name . '</strong>: <br>' . $message);\n\t\t}\n\t}", "title": "" }, { "docid": "7033b2f7942b19482322f1af3031ddb9", "score": "0.6091362", "text": "function check_for_prerequisites(){\n $plugins = get_option('active_plugins');\n if(!in_array(\"woocommerce/woocommerce.php\", $plugins) || !in_array(\"tailors-online/customizer.php\", $plugins)){\n\t deactivate_plugins( plugin_basename( __FILE__ ) );\n wp_die( 'This plugin requires WooCommerce and Tailors Online plugins to be activated!!!' );\n }\n}", "title": "" }, { "docid": "b61ae7a2d73c392fa3332fa35827a81f", "score": "0.60356665", "text": "function dependency_check () {\n\t\tRIDB( 'Running Dependency CHECK');\n\t\tif (!is_plugin_active('Form Builder (DEVG.ES)')) {\n\t\t\tRIDB('No FORM Builder');\n\t\t\tif (!activate_plugins('Form Builder (DEVG.ES)')) {\n\t\t\t\tif (is_plugin_active(\"Philosophy's Register Interest Plugin\")) {\n\t\t\t\t\tdeactivate_plugins(\"Philosophy's Register Interest Plugin\");\n\t\t\t\t}\n\t\t\t\tadd_action( 'admin_notices', 'REGINT_notice_noformbuilder' );\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tRIDB('Activated');\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "3336c9626a32b8aa4fb1256b27e537c4", "score": "0.6031387", "text": "public function activation_check(): void {\n\n\t\tif ( ! $this->is_environment_compatible() ) {\n\n\t\t\t$this->deactivate_plugin();\n\n\t\t\twp_die( self::PLUGIN_NAME . ' could not be activated. ' . $this->get_environment_message() );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "07252bfa90f13a5e427c78c975339a2e", "score": "0.6027179", "text": "public function hasEggIncubators()\n {\n return $this->egg_incubators !== null;\n }", "title": "" }, { "docid": "858d840fb5583ce0031db2d229f39a42", "score": "0.6022666", "text": "public function no_items() {\n\t\t_e( 'No licenses avaliable.', 'wpec-licensing' );\n\t}", "title": "" }, { "docid": "d8781bf4de04051ab99539114cae9c7c", "score": "0.6019315", "text": "function is_active_hotel_module() {\n\t$status = false;\n\tif (is_domain_user () == false || in_array ( META_ACCOMODATION_COURSE, $GLOBALS ['CI']->active_domain_modules )) {\n\t\t$status = true;\n\t}\n\treturn $status;\n}", "title": "" }, { "docid": "73967dc86a57cc45db291c6b64b079fb", "score": "0.59981555", "text": "function checkInstalled() {\r\n if (!file_exists(DIR_MODULES.$this->name.\"/installed\")) {\r\n $this->install();\r\n } else {\r\n $rec=SQLSelectOne(\"SELECT * FROM project_modules WHERE NAME='\".$this->name.\"'\");\r\n if (!IsSet($rec[\"ID\"])) $this->install();\r\n }\r\n }", "title": "" }, { "docid": "7fc4fb9c64cf43e934fead5afe7eace1", "score": "0.599239", "text": "public function is_enabled() {\n\t\treturn ! in_array( $this->slug, Plugin_Storage::get_all_disabled_plugins(), true );\n\t}", "title": "" }, { "docid": "5fb46fcfbe4a7b65595c7e84bf890485", "score": "0.5991668", "text": "function check_wc_activation(){\n if( !class_exists('WooCommerce')):\n ?>\n <div class=\"notice notice-warning\">\n <p><?php _e( 'It seem\\'s WooCommerce is not activated ! Please activate it to have WooCommerce Auction working !', 'sample-text-domain' ); ?></p>\n </div>\n <?php\n endif;\n }", "title": "" }, { "docid": "3b83cb390b4a13433f877657a9516df0", "score": "0.59810585", "text": "protected function checkModules()\n\t{\n\t\tif (Loader::includeModule('imconnector'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tShowError(Loc::getMessage('IMCONNECTOR_COMPONENT_WECHAT_MODULE_NOT_INSTALLED_MSGVER_1'));\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "fd2c91348a6eecb00bdc33c95cc3dcf4", "score": "0.5977737", "text": "protected function checkDisableFunctions() {}", "title": "" }, { "docid": "0a0bd70b11b66bf00b39c552f48b9d8c", "score": "0.597256", "text": "static function wcfm_wc_waitlist_plugin_active_check() {\n\t\tif ( ! self::$active_plugins ) self::init();\n\t\treturn in_array( 'woocommerce-waitlist/woocommerce-waitlist.php', self::$active_plugins ) || array_key_exists( 'woocommerce-waitlist/woocommerce-waitlist.php', self::$active_plugins ) || class_exists( 'WooCommerce_Waitlist_Plugin' );\n\t\treturn false;\n\t}", "title": "" }, { "docid": "36521510a0f46439e85e2d9227da6114", "score": "0.5963387", "text": "function assertPluginsActive() {\n\t\t$this->assertTrue(is_plugin_active( 'tyk-dev-portal/tyk_dev_portal.php' ));\n\t}", "title": "" }, { "docid": "7a087ec90e104c9e89b273fc67adde24", "score": "0.5961734", "text": "static function available() { return false; }", "title": "" }, { "docid": "baa8a29dde2d6c76eeb355d831b5e68b", "score": "0.5953905", "text": "function check_module_dependencies() {\n global $clientele;\n foreach ($clientele->modules as $mod_name => $mod_data) {\n if (isset($mod_data->requires)) {\n $requires = explode(\", \", $mod_data->requires);\n foreach ($requires as $required) {\n if (!($this->is_module_enabled($required))) {\n $clientele->update_module_option($mod_name, 'enabled', 'off');\n }\n }\n }\n }\n }", "title": "" }, { "docid": "1c2a625875432ea8b51948194cd5358b", "score": "0.5944648", "text": "public function isModuleEnabled()\r\n {\r\n return Mage::helper('promopopup')->getModuleStatus();\r\n }", "title": "" }, { "docid": "9277882c51037e63ede783f100dc2178", "score": "0.59414524", "text": "public function checkPluginInstalled() {\n\t\ttry{\n\t\t\treturn $this->Record->select()->from($this->database_name)->numResults() !== false;\n\t\t}\n\t\tcatch (Exception $ex) {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "dc2332bf5e5c78a79b48dfdb71d280ca", "score": "0.5930676", "text": "public function pluginInstalled()\n {\n return class_exists('WYSIJA');\n }", "title": "" }, { "docid": "22597c386a4ea4f87e71d17adfb94ecd", "score": "0.59279907", "text": "static function wcfm_wc_accommodation_active_check() {\n\t\tif ( ! self::$active_plugins ) self::init();\n\t\treturn in_array( 'woocommerce-accommodation-bookings/woocommerce-accommodation-bookings.php', self::$active_plugins ) || array_key_exists( 'woocommerce-accommodation-bookings/woocommerce-accommodation-bookings.php', self::$active_plugins );\n\t\treturn false;\n\t}", "title": "" }, { "docid": "60027787e5d970e4ab5c2e1f5f1f2ca1", "score": "0.59233075", "text": "protected function checkModuleEnabled()\n {\n if (empty($this->settings->MODULES['REW_ACTION_PLANS'])) {\n throw new InsufficientPermissionsException('The action plan feature is not enabled on this site.');\n }\n }", "title": "" }, { "docid": "5cdb3556e550dd244437b3a2a484dca2", "score": "0.5920928", "text": "public function effectively_installed()\n\t{\n\t\treturn isset($this->config['jfusion_extension_redirect']);\n\t}", "title": "" }, { "docid": "90d738d062b7285168ef932864f159bc", "score": "0.5918996", "text": "private function checkEnabled() {\n\t\t$this->enabled = @function_exists('wp_using_ext_object_cache')? (bool) @wp_using_ext_object_cache() : false;\n\t}", "title": "" }, { "docid": "179f2194121b7fcb383e2bf36e69eba1", "score": "0.5906763", "text": "function isInstalled() {\n return (bool)defined('MODULE_PAYMENT_VIVAWALLET_STATUS');\n }", "title": "" }, { "docid": "50fac6d0b598c0c01e14cb64f357424c", "score": "0.59033763", "text": "public function check_required_plugins(){\n\n\t\tif( ! class_exists( 'WooCommerce' ) ){ ?>\n\n\t\t\t<div id=\"message\" class=\"error\">\n\t\t\t\t<p>Clear Layered Nav expects Woocommerce Library to be active. This plugin has been deactivated.</p>\n\t\t\t</div>\n\n\t\t\t<?php\n\t\t\tdeactivate_plugins( '/woo-clear-all-layered-filters/woo-clear-all-layered-filters.php' );\n\t\t}\n\n\t}", "title": "" }, { "docid": "b79ce42d02680adb2a6b9b2329539082", "score": "0.58974093", "text": "abstract public function checkIsInstalled();", "title": "" }, { "docid": "443f25efe0a6e5d0ac995cc92030681a", "score": "0.58932996", "text": "function plugin_is_active() {\n\t\treturn class_exists( 'Paid_Member_Subscriptions' );\n\t}", "title": "" }, { "docid": "6d8944d6372f348b60c9caa2c373b5ac", "score": "0.58932686", "text": "static function wcfm_resume_manager_active_check() {\n\t\tif ( ! self::$active_plugins ) self::init();\n\t\treturn in_array( 'wp-job-manager-resumes/wp-job-manager-resumes.php', self::$active_plugins ) || array_key_exists( 'wp-job-manager-resumes/wp-job-manager-resumes.php', self::$active_plugins );\n\t\treturn false;\n\t}", "title": "" }, { "docid": "c6363f0f5bca241f7c04a8da9f1eb0aa", "score": "0.5892579", "text": "function should_load() {\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\n\t\treturn is_plugin_active( 'jet-elements/jet-elements.php' );\n\t}", "title": "" }, { "docid": "594abc38a3a0baa9ed4c1eef6b69b21d", "score": "0.58875966", "text": "function bp_core_check_installed() {\r\n\tglobal $bp;\r\n\r\n\tif ( !is_super_admin() )\r\n\t\treturn false;\r\n\r\n\trequire ( BP_PLUGIN_DIR . '/bp-core/bp-core-admin.php' );\r\n\r\n\t/* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */\r\n\tif ( get_site_option( 'bp-core-db-version' ) < BP_CORE_DB_VERSION )\r\n\t\tbp_core_install();\r\n}", "title": "" }, { "docid": "86c610e06d0d6aa824a6c7023f70a5cc", "score": "0.58859724", "text": "function tpf_check_required_plugins(){\n if( !is_plugin_active('carbon-fields/carbon-fields-plugin.php')){\n require_once FACTORY_DIR. '/admin/carbon-fields/carbon-fields-plugin.php';\n }\n}", "title": "" }, { "docid": "37f2a410c7f22774a9d22ddfb3642547", "score": "0.5881501", "text": "static function wcfm_wc_tabs_manager_plugin_active_check() {\n\t\tif ( ! self::$active_plugins ) self::init();\n\t\treturn in_array( 'woocommerce-tab-manager/woocommerce-tab-manager.php', self::$active_plugins ) || array_key_exists( 'woocommerce-tab-manager/woocommerce-tab-manager.php', self::$active_plugins ) || class_exists( 'WC_Tab_Manager' );\n\t\treturn false;\n\t}", "title": "" }, { "docid": "bae2d3604378f34492a94a13134de8db", "score": "0.5879508", "text": "public function check_version() {\n\t\tif ( ! $this->compatible_version() ) {\n\t\t\tif ( is_plugin_active( plugin_basename( __FILE__ ) ) ) {\n\t\t\t\tdeactivate_plugins( plugin_basename( __FILE__ ) );\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'disabled_notice' ) );\n\t\t\t\tif ( isset( $_GET['activate'] ) ) {\n\t\t\t\t\tunset( $_GET['activate'] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "353908b8f592bf4a68d1969431f89b5d", "score": "0.5879231", "text": "public function is_available() {\n global $CFG;\n\n // This plugin is only available if the PM code is present.\n return file_exists($CFG->dirroot.'/elis/program/lib/setup.php');\n }", "title": "" }, { "docid": "8705733d46b2eda167c3d60f722140b8", "score": "0.58768183", "text": "function testPluginActive(){\n\t\t$this->assertFalse( null == $this->plugin, 'testPluginActive says our plugin is not loaded' );\n\t}", "title": "" }, { "docid": "d2582af4f1216224f81550fedc03faf9", "score": "0.58765346", "text": "public function run_addons() {\n\n\t\t\t// Make sure each active add-on still exists. If not delete.\n\t\t\tif ( ! empty( $this->active ) ) {\n\t\t\t\t$active = array_unique( $this->active );\n\t\t\t\t$_active = array();\n\t\t\t\tforeach ( $active as $pos => $active_id ) {\n\t\t\t\t\tif ( array_key_exists( $active_id, $this->installed ) ) {\n\t\t\t\t\t\t$_active[] = $active_id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->active = $_active;\n\t\t\t}\n\n\t\t\t// Load addons\n\t\t\tforeach ( $this->installed as $key => $data ) {\n\t\t\t\tif ( $this->is_active( $key ) ) {\n\n\t\t\t\t\tif ( apply_filters( 'mycred_run_addon', true, $key, $data, $this ) === false || apply_filters( 'mycred_run_addon_' . $key, true, $data, $this ) === false ) continue;\n\n\t\t\t\t\t// Core add-ons we know where they are\n\t\t\t\t\tif ( file_exists( myCRED_ADDONS_DIR . $key . '/myCRED-addon-' . $key . '.php' ) )\n\t\t\t\t\t\tinclude_once myCRED_ADDONS_DIR . $key . '/myCRED-addon-' . $key . '.php';\n\n\t\t\t\t\t// If path is set, load the file\n\t\t\t\t\telseif ( isset( $data['path'] ) && file_exists( $data['path'] ) )\n\t\t\t\t\t\tinclude_once $data['path'];\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check for activation\n\t\t\t\t\tif ( $this->is_activation( $key ) )\n\t\t\t\t\t\tdo_action( 'mycred_addon_activation_' . $key );\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "4ac6244ce1378828b9ea06cad130c67c", "score": "0.58718485", "text": "public function no_items() {\r\n if ( ! empty( $_REQUEST['extension-s'] ) ) {\r\n\t\t\t$s = esc_html( wp_unslash( $_REQUEST['extension-s'] ) );\r\n\t\t\tprintf( __( 'No extensions found for &#8220;%s&#8221;.','mobiconnector' ), $s );\r\n\t\t} \r\n\t\telse\r\n\t\t\t_e( 'No extensions found','mobiconnector' );\r\n\t}", "title": "" }, { "docid": "6ded59fb86af6c59c813f1e68511e3a0", "score": "0.5871037", "text": "public static function isSuitable()\n {\n return InotifyWait::hasDependencies();\n }", "title": "" }, { "docid": "853bee2b066a8f21596d46fa8d9f4c73", "score": "0.5870995", "text": "function should_load() {\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\n\t\treturn is_plugin_active( 'cache-enabler/cache-enabler.php' );\n\t}", "title": "" }, { "docid": "880bdb7fa108eae6d2eae42532edfc12", "score": "0.58692485", "text": "public function isInstall()\n {\n return false;\n }", "title": "" }, { "docid": "a8eea5f08ed10ccb868dde9f7bb501da", "score": "0.58653855", "text": "public function no_items() {\n\t\techo 'There was an error listing out plugins. Please try again in a bit.';\n\t}", "title": "" }, { "docid": "d63dbeba664f98bfc7a88d7a59b5c928", "score": "0.5864764", "text": "function validate_active_plugins()\n{\n}", "title": "" }, { "docid": "6de2bf70c34bd3e862bca88119b6ddf0", "score": "0.58632904", "text": "function is_available() {\n //this is just a sample, so disable it\n return FALSE;\n }", "title": "" }, { "docid": "87adb858ad9e3fcc1f145cc4be78343f", "score": "0.58583754", "text": "protected function _isAllowed()\t{\r\n\t\treturn Mage::getSingleton('admin/session')->isAllowed('stagem_estimator/addon');\r\n\t}", "title": "" }, { "docid": "43740bce96587afb9431b15bb5542f2b", "score": "0.5852477", "text": "protected function checkExtension()\n {\n if (!function_exists(\"apcu_store\")) {\n throw new StorageException(\"APCu extension not loaded.\");\n }\n }", "title": "" }, { "docid": "0bd46c28bc65cde15c11d44dfbd99d3f", "score": "0.5849286", "text": "public function pluginInstalled() {\n\t\treturn class_exists( 'WYSIJA' );\n\t}", "title": "" }, { "docid": "d6f9786781bfd13d4888569ea451a6df", "score": "0.58481735", "text": "public function no_items() {\n\n\t\tif ( isset( $this->error ) ) {\n\t\t\t$message = $this->error->get_error_message() . '<p class=\"hide-if-no-js\"><a href=\"#\" class=\"button\" onclick=\"document.location.reload(); return false;\">' . __( 'Try again', APP_TD ) . '</a></p>';\n\t\t} else {\n\t\t\t$message = __( 'No add-ons match your request.', APP_TD );\n\t\t}\n\t\techo '<div class=\"no-plugin-results\">' . $message . '</div>';\n\t}", "title": "" }, { "docid": "f1cbd8e2b0367baccb6aa2e5ebf52599", "score": "0.58442694", "text": "public function checkExtensionsConfig()\n {\n\n // Disabled Extensions\n $disabledExtensions = ['xdebug', 'blackfire'];\n foreach ($disabledExtensions as $ext) {\n if (extension_loaded($ext)) {\n $this->addFailureMessage('PHP Extension: ' . $ext . ' is enabled');\n continue;\n }\n $this->addSuccessMessage('PHP Extension ' . $ext . ' is disabled');\n }\n\n // Opcache check - check enabled config setting\n ini_get('opcache.enable') == 0\n ? $this->addFailureMessage('Opcache is disabled')\n : $this->addSuccessMessage('Opcache is enabled');\n }", "title": "" }, { "docid": "4d55596948d1922063a937d3c1765c26", "score": "0.584143", "text": "public static function do_checks() {\n\t\tif ( ! function_exists( 'buddypress' ) ) {\n\t\t\t// We should output some information fot the user\n\t\t\tbppl_messages()->add( __( 'BuddyPress is not loaded. Please install and activate BuddyPress.', 'buddypress-polylang' ) );\n\t\t}\n\n\t\tif ( ! function_exists( 'pll_current_language' ) ) {\n\t\t\t// We should output some information fot the user\n\t\t\tbppl_messages()->add( __( 'Polylang is not loaded. Please install and activate Polylang.', 'buddypress-polylang' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "71df6bee5fe89a54bbf8848e25f83f25", "score": "0.583727", "text": "public function admin_notice_missing_jet_engine_plugin() {\n\n\t\tif ( isset( $_GET['activate'] ) ) unset( $_GET['activate'] );\n\n\t\t$message = sprintf(\n\t\t\tesc_html__( '\"%1$s\" requires \"%2$s\" to be installed and activated.', 'elementor-repeater-accordion-extension' ),\n\t\t\t'<strong>' . esc_html__( 'Elementor Repeater-Accordion Extension', 'elementor-repeater-accordion-extension' ) . '</strong>',\n\t\t\t'<strong>' . esc_html__( 'JetEngine (by CrocoBlocks/Zemez)', 'elementor-repeater-accordion-extension' ) . '</strong>'\n\t\t);\n\n\t\tprintf( '<div class=\"notice notice-warning is-dismissible\"><p>%1$s</p></div>', $message );\n\n\t}", "title": "" }, { "docid": "1554f0725d559bfb3a980ed56d0960cc", "score": "0.58357924", "text": "function _profile_cct_check_dependancy( ) {\n\tif ( ! class_exists( 'Profile_CCT_Admin' ) ) {\n\t\t//deactivate if GF not active - has to be done out of class as class is an extension\n\t\tdeactivate_plugins( plugin_basename( __FILE__ ) );\n\t\twp_die( 'The <strong>Profile_CCT_Addon</strong> plugin requires the Profiles Custom Content plugin (v 1.4 >)to be installed and activated - <strong>DEACTIVATED</strong> ' );\n\t}\n}", "title": "" }, { "docid": "699a0fea90de7ee5f8fdfb8dc6417059", "score": "0.58296144", "text": "public static function woocommerce_active_check() {\n\t\tif ( ! self::$active_plugins ) {\n\t\t\tself::init();\n\t\t}\n\t\treturn in_array( 'woocommerce/woocommerce.php', self::$active_plugins ) || array_key_exists( 'woocommerce/woocommerce.php', self::$active_plugins );\n\n\t}", "title": "" }, { "docid": "7246194ba7d7f6db42e164393e1b95b6", "score": "0.58280265", "text": "function isInstalled() {\n return (bool)defined('MODULE_PAYMENT_WIRECARD_CC_STATUS');\n }", "title": "" }, { "docid": "d94b937219b741f6150a21eccae99aae", "score": "0.5827964", "text": "protected static function isInstallToolSession() {}", "title": "" }, { "docid": "358c3149a9fe72647cd19c046620b8db", "score": "0.5819551", "text": "public function is_only() {\n\t\t$plugins = Plugin_Storage::get_all( true );\n\n\t\treturn ! $plugins || ( array_key_exists( $this->slug, $plugins ) && 1 === count( $plugins ) );\n\t}", "title": "" }, { "docid": "3859809e268a10618ca59b96f4e9f9cc", "score": "0.58192676", "text": "private function checkIfNotBot(){\n\t\t// TODO implement\n\t}", "title": "" }, { "docid": "ea9b7fca57ce50abc1d36388b6e953df", "score": "0.5818036", "text": "function phive_booking_pre_activation_check(){\n\t\n\t//check if basic version is there\n\tif ( is_plugin_active('ph-bookings-appointments-woocommerce-premium/ph-bookings-appointments-woocommerce-premium.php') ){\n\t\tdeactivate_plugins( basename( __FILE__ ) );\n\t\twp_die(__(\"Is everything fine? You already have the Premium version installed in your website. For any issues, kindly raise a ticket via <a target='_blank' href='//pluginhive.com/support/'>pluginhive.com/support</a>\",'bookings-and-appointments-for-woocommerce'), \"\", array('back_link' => 1 ));\n\t}\n\n}", "title": "" }, { "docid": "15ff7ab0c33fdcfadfd45ba271b2a116", "score": "0.581762", "text": "function tribe_has_uncosted_events() {\n\t\treturn tribe( 'tec.cost-utils' )->has_uncosted_events();\n\t}", "title": "" }, { "docid": "d6118dea4add97f893f41a662d46bb71", "score": "0.58165884", "text": "public function notActive()\n {\n return ! $this->active();\n }", "title": "" }, { "docid": "3b810b114bfa74f2fdda9ab0c2d7c4a8", "score": "0.58155096", "text": "public function isEmpty()\n {\n return 0 === count($this->modules);\n }", "title": "" }, { "docid": "c56c8550d9924d9503622e48ad07e7c6", "score": "0.5803458", "text": "public static function is_temp_disable_modules_set() {\n\t\t\tif ( defined( 'ITSEC_DISABLE_MODULES' ) && ITSEC_DISABLE_MODULES ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "3535d9d94bf451471ce7a925d9d2c57d", "score": "0.57998526", "text": "public function check_requirements()\n {\n if ( ! $this->meets_requirements())\n {\n\n // Add a dashboard notice.\n add_action('all_admin_notices', array($this, 'requirements_not_met_notice'));\n\n // Deactivate our plugin.\n add_action('admin_init', array($this, 'deactivate_me'));\n\n return FALSE;\n }\n\n return TRUE;\n }", "title": "" }, { "docid": "aa67c069a0e955c14c26ec651f487c1a", "score": "0.5795495", "text": "private function __addon_init() {\n if( $this->option(\"addons\") !== FALSE ) {\n $this->addon_init_before();\n $this->action(\"addons_init_before\");\n $this->addons = $this->_instance('VSP_Addons', FALSE, $this->option(\"addons\"));\n $this->addon_init();\n $this->action(\"addons_init\");\n }\n }", "title": "" }, { "docid": "672be6084a38cb542ecc84ba5ee78ffd", "score": "0.5791473", "text": "function getEnabled() {\n\t\tif (!Config::getVar('general', 'installed')) return true;\n\t\treturn parent::getEnabled();\n\t}", "title": "" }, { "docid": "bd3e5138c46b0a4d96a61c4c85108f83", "score": "0.57816786", "text": "public function check_addon_status() {\n $checker = array('unique_identifier' => $this->unique_identifier);\n $this->db->where($checker);\n $addon_details = $this->db->get('addons')->row_array();\n if ($addon_details['status']) {\n return true;\n }else{\n redirect(site_url(), 'refresh');\n }\n }", "title": "" }, { "docid": "3805918874676d779fec327dcda93f05", "score": "0.5780804", "text": "function canBeInstalled() ;", "title": "" }, { "docid": "0449d58c1765d6b9f9adbff677b017a8", "score": "0.57784516", "text": "public function isInstalled()\r\n {\r\n return Extension::isInstalled('__name__');\r\n }", "title": "" }, { "docid": "2dab29807e8da70dec2ee1cc2bcebb22", "score": "0.57764584", "text": "public function maybe_disable_plugin() {\n\n\t\tif ( ! $this->meets_requirements() ) {\n\t\t\t// Display our error\n\t\t\techo '<div id=\"message\" class=\"error\">';\n\t\t\techo '<p>' . sprintf( __( 'ExchangeWP Customer History requires iThemes Exchange 1.7.1 or greater and has been <a href=\"%s\">deactivated</a>. Please install, activate or update iThemes Exchange and then reactivate this plugin.', 'LION' ), admin_url( 'plugins.php' ) ) . '</p>';\n\t\t\techo '</div>';\n\n\t\t\t// Deactivate our plugin\n\t\t\tdeactivate_plugins( $this->basename );\n\t\t}\n\n\t}", "title": "" }, { "docid": "83d08f29b0abece06d2405286fcb5cb5", "score": "0.5775371", "text": "public function coupons_enabled()\n {\n }", "title": "" }, { "docid": "3dfa245b6b9f6e1849f2245b92964e83", "score": "0.5773423", "text": "function list_missing_plugins() {\nif ( ! function_exists( 'get_plugins' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; }\n// plugin names to compare with get_option('active_plugins') array\n$necessary_plugins = array( \n'CMB2',\n'CMB2 Field Type: Select2', \n'CMB2 Post Search field'\n);\n// current active plugins\n$apl = get_option('active_plugins');\n$plugins = get_plugins();\n$activated_plugins=array();\nforeach ( $apl as $p ) { \nif(isset($plugins[$p])){\narray_push($activated_plugins, $plugins[$p]['Name']);\n} \n}\n$missing_plugins = array_diff($necessary_plugins, $activated_plugins);\nforeach($missing_plugins as $missing_plugin){\n$message = \"For full site functionality, please activate {$missing_plugin}.\";\nMECPT_admin_notice($message);\n}\n}", "title": "" }, { "docid": "5ccef400afdbaeec8cf0eacc1c1174b0", "score": "0.5770813", "text": "public function checkIfPluginToBeUsed()\n {\n $boxalinoGlobalPluginStatus = Mage::helper('core')->isModuleOutputEnabled('Boxalino_Intelligence');\n if($boxalinoGlobalPluginStatus)\n {\n if(Mage::helper('boxalino_intelligence')->isPluginEnabled())\n {\n\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "6a465ec7d3d12255b942bef101a5a341", "score": "0.5770588", "text": "public function hasBeenSetup()\n {\n if (Mage::registry('gene_braintree_btn_loaded')) {\n return true;\n }\n\n return false;\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "ccefd0b258b658728f5648395a53803c", "score": "0.0", "text": "public function run()\n {\n $users = [\n [\n 'first_name' => 'admin',\n 'last_name' => 'alton',\n 'username' => 'adminalton',\n 'email' => '[email protected]',\n 'phone' => '087888777999',\n 'photo' => '',\n 'company_id' => '1',\n 'departement_id' => '1',\n 'password' => 'password123',\n 'role' => 'admin'\n ],\n [\n 'first_name' => 'user',\n 'last_name' => 'alton',\n 'username' => 'useralton',\n 'email' => '[email protected]',\n 'phone' => '08777788097',\n 'photo' => '',\n 'company_id' => '1',\n 'departement_id' => '2',\n 'password' => 'password123',\n 'role' => 'user'\n ]\n ];\n\n foreach ($users as $user) {\n User::create($user);\n }\n }", "title": "" } ]
[ { "docid": "f74cb2c339072d43cd3b96858a89c600", "score": "0.8112695", "text": "public function run()\n {\n $this->seeds();\n }", "title": "" }, { "docid": "33aedeaa083b959fa5f66e27a7da3265", "score": "0.8026505", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t//Genre\n \\DB::table('genres')->insert(\n \t['name' => 'Comedia seed', 'ranking' => 354784395, 'active' => 1]\n );\n\n \\DB::table('actors')->insert([\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5]\n ]);\n }", "title": "" }, { "docid": "8d9ddbc23166c0cafca145e7a525c10a", "score": "0.80032176", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /* $faker = Faker::create();\n foreach (range(1,100) as $index) {\n DB::table('product')->insert([\n 'productName' => $faker->company,\n 'description' => $faker->text,\n 'productId' => $faker->randomNumber(),\n 'images' => $faker->image(),\n ]);\n }*/\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('recital')->insert([\n 'pagesRecital' => $faker->text,\n 'pageId' => $faker->randomNumber(),\n ]);\n }\n }", "title": "" }, { "docid": "8113ba9f29863f44dc33dbd7c0f98245", "score": "0.796029", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n DB::table('users')->insert([\n // [\n // 'name' => 'Alan',\n // 'email' => '[email protected]',\n // 'password' => '1234'\n // ],\n // [\n // 'name' => 'Alice',\n // 'email' => '[email protected]',\n // 'password' => '1234'\n // ],\n [\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make( 'admin' )\n ],\n ]);\n \n // Création de 10 authors en utilisant la factory\n // la fonction factory de Laravel permet d'utiliser le facker définit\n factory(App\\Author::class, 10)->create();\n $this->call(BookTableSeeder::class);\n }", "title": "" }, { "docid": "424a278b0bd7df7af33c6c946314dcb5", "score": "0.7928953", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n factory(App\\User::class, 100)->create();\n\n factory(App\\Category::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 10)->create()->each(function ($d) {\n $d->audiobookChapter()->saveMany(factory(App\\AudioBookChapter::class, 10)->create()->each(function ($chapter) use ($d) {\n $chapter->purchase()->saveMany(factory(App\\Purchase::class, 10)->create()->each(function ($purchase) use ($d, $chapter) {\n $purchase->user_id = User::all()->random(1)->id;\n $purchase->audiobookChapter_id = $chapter->id;\n $purchase->audiobook_id = $d->id;\n }));\n\n }));\n $d->review()->save(factory(App\\Review::class)->make());\n $d->wishlist()->save(User::all()->random(1));\n }));\n });\n\n\n factory(App\\Collection::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 5)->create()->each(function ($d) {\n $d->category_id = Category::all()->random(1)->id;\n }));\n });\n\n Model::reguard();\n }", "title": "" }, { "docid": "2fca9bf0725abd081819588688399860", "score": "0.7926935", "text": "public function run()\n {\n $this->call(VideogameSeeder::class);\n $this->call(CategorySeeder::class);\n User::factory(15)->create();\n DB::table('users')->insert([\n 'name' => 'Santiago',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n 'address' => 'C/ Ultra',\n 'rol' => 'admin'\n ]);\n //Ratin::factory(50)->create();\n Purchase::factory(20)->create();\n //UserList::factory(1)->create();\n }", "title": "" }, { "docid": "29a4267326dbe1e561d79877123a4ef8", "score": "0.79262906", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 10)->create();\n factory('App\\School', 10)->create();\n factory('App\\Department', 20)->create();\n factory('App\\Course', 40)->create();\n factory('App\\CourseContent', 40)->create();\n factory('App\\CourseMaterial', 120)->create();\n factory('App\\Library', 200)->create();\n factory('App\\Download', 200)->create();\n factory('App\\Preview', 200)->create();\n factory('App\\Image', 5)->create();\n factory('App\\Role', 2)->create();\n }", "title": "" }, { "docid": "23ad0adf7c7d172d03ff87f186b2b80d", "score": "0.7900386", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n ['nome' => 'Wiiliam',\n 'usuario' => 'will',\n 'cpf' => '033781783958',\n 'tipo' => 'ADM',\n 'ativo' => 1,\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm'//secret\n ] \n ]);\n DB::table('dentes')->insert([\n ['nome' => 'canino', 'numero' => 39],\n ['nome' => 'molar', 'numero' => 2],\n ['nome' => 'presa', 'numero' => 21]\n ]);\n\n DB::table('servicos')->insert([\n ['nome' => 'Restauração', 'ativo' => 1],\n ['nome' => 'Canal', 'ativo' => 1],\n ['nome' => 'Limpeza', 'ativo' => 1]\n ]);\n }", "title": "" }, { "docid": "c5b1891e5f39d3e2551b908d083d5516", "score": "0.78698856", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Poll::create([\n 'user_id' => 1,\n 'poll_name' => 'How much do you like me?',\n 'is_public' => 1,\n 'nr_choice' => 0\n ]);\n \n Votes::create([\n 'user_id' => 1,\n 'vote_to_poll' => 2\n ]);\n\n Choices::create([\n 'choice_id'=> 1,\n 'choice_text'=>'A lot.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>260\n ]);\n\n Choices::create([\n 'choice_id'=> 2,\n 'choice_text'=>'A little.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>178\n ]);\n }", "title": "" }, { "docid": "5b3dd72a68cd7caf5cb41622cf1f17f8", "score": "0.78664595", "text": "public function run()\n {\n // Truncate existing record in book table\n Book::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // Create dummy records in our table books:\n for ($i = 0; $i < 50; $i++) {\n Book::create([\n 'title' => $faker->title,\n 'author' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "0edef3cdac4be0882cf354181e1a63fd", "score": "0.7847239", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n $ranks = Rank::all();\n $roles = Role::all();\n\n // And now, let's create a few users in our database:\n for ($i = 0; $i < 5; $i++) {\n User::create([\n 'username' => \"user_$i\",\n 'pilot_callsign' => $faker->numerify('SCI###'),\n 'rank_id' => $ranks[rand ( 0 , $ranks->count()-1 )]->id,\n 'role_id' => $roles[0]->id\n ]);\n }\n }", "title": "" }, { "docid": "1696cae69b4e0dea414a1cad524c579c", "score": "0.78417265", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 10)->create();\n factory(Product::class, 20)->create();\n factory(Category::class, 8)->create();\n factory(Portfolio::class, 8)->create();\n factory(Article::class, 30)->create();\n }", "title": "" }, { "docid": "124d9b3ae818d6f7c553836f83b3f26d", "score": "0.7836289", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n // $this->call(UserSeeder::class);\n DB::table('teams')->truncate();\n DB::table('users')->truncate();\n DB::table('campaigns')->truncate();\n DB::table('memberships')->truncate();\n\n Schema::enableForeignKeyConstraints();\n\n // add users \n $usersfile = 'database/csvs/users.csv';\n $users = HelpersCsvHelper::csvToArray($usersfile);\n for ($i = 0; $i < count($users); $i++) {\n User::firstOrCreate($users[$i]);\n }\n\n // add teams\n $teamsfile = 'database/csvs/teams.csv';\n $teams = HelpersCsvHelper::csvToArray($teamsfile);\n for ($i = 0; $i < count($teams); $i++) {\n Teams::firstOrCreate($teams[$i]);\n }\n\n // add campaigns\n $Campaignsfile = 'database/csvs/campaigns.csv';\n $campaigns = HelpersCsvHelper::csvToArray($Campaignsfile);\n for ($i = 0; $i < count($campaigns); $i++) {\n Campaigns::firstOrCreate($campaigns[$i]);\n }\n\n // add memberships\n $Membershipsfile = 'database/csvs/memberships.csv';\n $memberships = HelpersCsvHelper::csvToArray($Membershipsfile);\n for ($i = 0; $i < count($memberships); $i++) {\n Memberships::firstOrCreate($memberships[$i]);\n }\n }", "title": "" }, { "docid": "7e308ea06065b02bb3be211e8748bf5f", "score": "0.7835999", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 1,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 2,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 3,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 4,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 1,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 2,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 3,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 4,\n ]);\n }", "title": "" }, { "docid": "9d2abe13b05f99177e4f0e0cdd336b85", "score": "0.78325504", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Category::class, 10)->create();\n factory(Blog::class, 10)->create();\n }", "title": "" }, { "docid": "29381516f53bafb0bf8797720ed6de7b", "score": "0.78240335", "text": "public function run()\n {\n\n $datas = [\n ['text' => 'Migracion'],\n ['text' => 'Familia'],\n ];\n\n\n foreach($datas as $data){\n \n $this->createSeeder($data);\n\n }\n }", "title": "" }, { "docid": "51daed999a883c3842fb92fb9bf4889b", "score": "0.78238165", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User'::class, 20)->create();\n factory('App\\Post'::class, 1000)->create();\n factory('App\\Comment'::class, 2000)->create();\n }", "title": "" }, { "docid": "778b6afd89da9f29737c3c12e565289e", "score": "0.78130686", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Sid',\n 'email' => '[email protected]',\n 'role' => 'admin',\n 'password' => bcrypt(env('SEED_PWD')),\n ]);\n\n // 10 categorie\n $categories = factory(Category::class, 10)->create();\n\n // 20 tags\n $tags = factory(Tag::class, 20)->create();\n\n // 9 utenti\n factory(User::class, 9)->create();\n $users = User::all();\n // x ogni utente 15 posts\n foreach ($users as $user) {\n $posts = factory(Post::class, 15)->create([\n 'user_id' => $user->id,\n 'category_id' => $categories->random()->id,\n ]);\n\n foreach ($posts as $post) {\n $post->tags()->sync($tags->random(3)->pluck('id')->toArray());\n }\n }\n }", "title": "" }, { "docid": "770b2d73679fa00839175bb0616cbdea", "score": "0.78115416", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class,10)->create();\n factory(Product::class,100)->create();\n factory(Review::class,500)->create();\n }", "title": "" }, { "docid": "85cccae108d4de7f16063966a5657344", "score": "0.7810694", "text": "public function run()\n {\n\n $faker = \\Faker\\Factory::create();\n\n \\DB::table('news_categories')->delete();\n\n for ($i = 0; $i <= 10; $i++) {\n \\App\\Models\\NewsCategory::create([\n 'name' => $faker->text(40)\n ]);\n }\n\n \\DB::table('news')->delete();\n\n for ($i = 0; $i <= 40; $i++) {\n \\App\\Models\\News::create([\n 'title' => $faker->text(100),\n 'author_id' => 1,\n 'publish_date' => \\Carbon\\Carbon::now()->addDays(rand(1, 10)),\n 'content' => $faker->text(),\n 'source' => $faker->text(50),\n 'status' => rand(0, 1)\n ]);\n }\n }", "title": "" }, { "docid": "8ad50814f16b74d56ba096d0d57f2685", "score": "0.7809736", "text": "public function run()\n {\n $this->call(LaratrustSeeder::class);\n // $this->call(UsersTableSeeder::class);\n $discount = factory(\\App\\Discount::class, 1)->create();\n\n $categories = factory(\\App\\Category::class, 8)->create();\n $products = factory(\\App\\Product::class, 10)->create();\n $address=factory(\\App\\Users_address::class, 24)->create();\n $this->call(DiscountTableSeeder::class);\n $this->call(m_imagesTableSeeder::class);\n\n $images = factory(\\App\\m_image::class, 2)->create();\n\n }", "title": "" }, { "docid": "b762d028067463470324860cc9a29e0e", "score": "0.7805969", "text": "public function run(): void\n {\n $this->seedUsers();\n $this->seedCategories();\n $this->seedMedia();\n $this->seedProducts();\n $this->seedOrders();\n }", "title": "" }, { "docid": "4f83d3fdd97b667f526563987d1e2e6b", "score": "0.7802494", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Student::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now let's generate a few students for our app:\n $students = App\\User::where('role', 'Student')->get();\n foreach ($students as $student) {\n \tStudent::create([\n 'address' => $faker->city, \n 'user_id' => $student->id,\n ]);\t\t \n\t\t}\n }", "title": "" }, { "docid": "36b206fe3f9e5582fff99bdd44c268e2", "score": "0.77952313", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Edson Chivambo',\n 'email' => '[email protected]',\n 'password' => bcrypt('002523'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n\n\n DB::table('users')->insert([\n 'name' => 'Emidio Nhacudima',\n 'email' => '[email protected]',\n 'password' => bcrypt('Psi12345'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n/*\n // Let's truncate our existing records to start from scratch.\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n ]);\n }\n*/\n }", "title": "" }, { "docid": "914dd54501738d8f24f08d44c10d6a1f", "score": "0.77949405", "text": "public function run()\n {\n // default seeder to create fake users by using users factory\n // \\App\\Models\\User::factory(10)->create();\n\n // truncate deletes data or row from db. so when seed is run firsly it will delete the existing fiels\n // Product::truncate();\n // Category::truncate();\n // * first way for database seeding\n // creating a category and then passing it to create a product in seeder\n // $category = Category::create([\n // \"name\" => \"Headphones\",\n // \"description\" => \"This Category contains Headphones\"\n // ]);\n\n // Product::create([\n // \"product_name\" => \"Iphone\",\n // \"product_desc\" => \"An Iphone uses IOS and is developed by Apple\",\n // \"price\" => \"100000\",\n // \"category_id\" => $category->id\n // ]);\n // * using second method for creating/seeding fake data using factory \n // Category::factory(5)->create();\n //* overriding the default category_id of the factory in seeder\n Product::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "73bbd2eb8a462a3994465397aabc387c", "score": "0.7793759", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = factory(App\\User::class, 5)->create();\n $product = factory(App\\Product::class, 50)->create();\n $reviews = factory(App\\Review::class, 100)->create()\n ->each(function ($review) {\n $review->reviews()->save(factory(App\\Product::class)->make());\n });\n }", "title": "" }, { "docid": "c3d306bf3f72eced986330e8fcc2293f", "score": "0.77799016", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(PagesTableSeeder::class);\n\n $id = DB::table('seos')->insertGetId([\n 'link' => url('/'),\n 'priority' => 0,\n 'status' => 'publish',\n ]);\n foreach (['vi','en'] as $lang) {\n DB::table('seo_languages')->insert([\n 'title' => 'Trang chủ',\n 'slug' => 'trang-chu',\n 'language' => $lang,\n 'seo_id' => $id,\n ]);\n }\n }", "title": "" }, { "docid": "89ccfc64e34980c1c88e0ac32bd95ed7", "score": "0.7779508", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('tags')->insert([\n\t 'title' => $faker->title,\n\t 'slug' => $faker->slug,\n\t \n\t ]);\n\t}\n }", "title": "" }, { "docid": "17ed7bd7f1c8118ed9c57701c65a3308", "score": "0.7774864", "text": "public function run()\n {\n require_once 'vendor/fzaninotto/faker/src/autoload.php';\n $faker = \\Faker\\Factory::create();\n\n// \\DB::table('articles')->delete();\n\n foreach (range(1, 50) as $index) {\n dump($faker->name);\n DB::table('articles')->insert([\n 'name' => $faker->name,\n 'description' => $faker->text($maxNbChars = 400),\n 'slug' => $index,\n 'autor_id' => 2\n ]);\n };\n \n }", "title": "" }, { "docid": "bd7aa608e63a171552e3b4da3b24f5ac", "score": "0.77732813", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Product::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Product::create([\n 'product_name' => \"Product-\".$i,\n 'description' => \"Product-\".$i.\" Good Product\",\n 'price' => 1000,\n 'offer' => 10,\n 'category_id' => 1,\n 'p_status' => 'A',\n ]);\n }\n }", "title": "" }, { "docid": "c0702e537f33df7826aad62896f41818", "score": "0.77731556", "text": "public function run()\n {\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\t\n\n\t\t\tDB::table('pages')->truncate();\n\n $faker = Faker::create();\n \t$cours = Db::table('cours')->lists('id') ;\n\n \tforeach (range(1,25) as $key => $value ) {\n\n \t\tPage::create([\n \t\t'title'=>$faker->sentence(3),\n \t\t'body'=>$faker->paragraph(4),\n \t\t'cour_id'=>$faker->randomElement($cours) \n\t ]);\n \t}\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;') ;\n }", "title": "" }, { "docid": "a00d7625c3ac246fb4c8d0c5f542c844", "score": "0.7772737", "text": "public function run()\n {\n \n /*inserting dummy data, if we want to insert a 1000 of data,every seeder foreach table, it insert 1 data*/\n // DB::table('users')->insert([\n // 'name'=>str_Random(10), \n // 'email'=>str_random(10).'@gmail.com',\n // 'password'=>bcrypt('secret')\n // ]);\n //ro run : php artisan db:seed\n\n\n /**ANOTHER WAY */\n\n //User::factory()->count(10)->hasPosts(1)->create(); //if the user has a relation with post\n User::factory()->count(10)->create();\n\n \n \n }", "title": "" }, { "docid": "7610e7d2e2f861ae0a32e114a63a583f", "score": "0.77626514", "text": "public function run()\n {\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>100,\n 'item_case_name' => 'الضريبه',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>101,\n 'item_case_name' => 'المشتريات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>102,\n 'item_case_name' => 'المبيعات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>103,\n 'item_case_name' => 'السيوله النقديه',\n 'notes' => 'from seeder '\n ]);\n }", "title": "" }, { "docid": "52b78ebee14aac0ddb50ea401a6a927b", "score": "0.776243", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Models\\admin::class, 50)->create();\n factory(App\\Models\\category::class, 20)->create();\n factory(App\\Models\\clinic::class, 20)->create();\n factory(App\\Models\\nurse::class, 50)->create();\n factory(App\\Models\\Patient::class, 200)->create();\n factory(App\\Models\\comment::class, 500)->create();\n factory(App\\Models\\material::class, 500)->create();\n factory(App\\Models\\prescription::class, 500)->create();\n factory(App\\Models\\receipt::class, 400)->create();\n factory(App\\Models\\reservation::class, 600)->create();\n factory(App\\Models\\worker::class, 200)->create();\n // factory(App\\Models\\image::class, 500)->create();\n }", "title": "" }, { "docid": "b373718e9c234dc4bb756553db264c76", "score": "0.7762365", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([\n RolesTableSeeder::class,\n UsersTableSeeder::class,\n PagesTableSeeder::class\n ]);\n\n \n \\Illuminate\\Support\\Facades\\DB::table('tbl_introductions')->insert([ \n 'fullname' => 'Ben Wilson',\n 'dob' => '26 September 1999',\n 'email' => '[email protected]',\n 'intro' => 'Hello, I am Ben.',\n 'image' => '1606288979.jpg', \n 'website' => 'www.company.co',\n 'created_at' => '2020-11-24 06:03:28' \n ]);\n }", "title": "" }, { "docid": "6d6a917428726975dd96f2e4e353f871", "score": "0.77620876", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Personas::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Personas::create([\n 'nombre' => $faker->sentence,\n 'nit' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "0b05db86e70b2e211fbf0469301f7d9a", "score": "0.7761681", "text": "public function run()\n {\n //\n DB::table('employees')->delete();\n $faker = Faker\\Factory::create();\n foreach(range(1,50) as $index)\n {\n Employee::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'avatar' => '',\n 'address' => $faker->address,\n 'phone'=> rand(0,9999).'-'.rand(0,9999).'-'.rand(0,9999),\n ]);\n }\n }", "title": "" }, { "docid": "df7b256adbff916fcdd12b520b0dc208", "score": "0.7760763", "text": "public function run() {\n\n\t\t// $this->call('ArticlesTableSeeder::class');\n\t\t// $this->call('CategoriesTableSeeder::class');\n\t\t// factory(App\\Article::class, 50)->create()->each(function ($u) {\n\t\t// \t$u->posts()->save(factory(App\\Article::class)->make());\n\t\t// });\n\n\t}", "title": "" }, { "docid": "e7527a5bc8529a2c2aad4c53046ea43d", "score": "0.7758918", "text": "public function run()\n {\n //\\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Section::factory(10)->create();\n // \\App\\Models\\Classe::factory(20)->create();\n // \\App\\Models\\Eleve::factory(120)->create();\n // \\App\\Models\\Stock::factory(2)->create();\n // \\App\\Models\\Category::factory(5)->create();\n // \\App\\Models\\Product::factory(120)->create();\n\n $this->call([\n AnneScolaireSeeder::class\n ]);\n }", "title": "" }, { "docid": "8efc8b6977291a12f6f3aba05752eca3", "score": "0.7758882", "text": "public function run()\n {\n $this->runSeeder();\n }", "title": "" }, { "docid": "7b81b233cbf3938d421802fdd7f8d35b", "score": "0.77587956", "text": "public function run()\n {\n $categories = [\n [\n 'name' => 'Groenten',\n 'description' => '',\n ],\n [\n 'name' => 'Fruit',\n 'description' => '',\n ],\n [\n 'name' => 'Zuivel',\n 'description' => '',\n ],\n [\n 'name' => 'Vlees',\n 'description' => '',\n ],\n ];\n\n foreach($categories as $category){\n Category::create($category);\n }\n\n //factory(Category::class, DatabaseSeeder::AMOUNT['DEFAULT'])->create();\n }", "title": "" }, { "docid": "3d3644d7189413baa46373e1ac7cdc8f", "score": "0.7754973", "text": "public function run()\n\t{\n\t\tDB::table('posts')->truncate();\n\n $faker = Faker\\Factory::create();\n\n\t\t$posts = [\n [\n 'title' => $faker->sentence(6),\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug('Hello World'),\n 'user_id' => User::first()->id,\n 'category_id' => Category::whereName('Php')->first()->id,\n 'created_at' => new DateTime,\n 'updated_at' => new DateTime\n ]\n ];\n\n\t\t// Uncomment the below to run the seeder\n\t\tfor ($i=0; $i < 10; $i++) {\n $tag = DB::table('tags')->orderBy('RAND()')->first();\n\n $post_title = $faker->sentence(6);\n\n $post = [\n 'title' => $post_title,\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug($post_title),\n 'user_id' => $faker->randomElement(User::all()->lists('id')),\n 'category_id' => $faker->randomElement(Category::all()->lists('id')),\n 'created_at' => $faker->dateTime,\n 'updated_at' => new DateTime\n ];\n\n $id = DB::table('posts')->insert($post);\n Post::find($id)->tags()->sync(Tag::all()->lists('id'));\n }\n\n // $this->command->info('Posts table seeded !');\n\t}", "title": "" }, { "docid": "ab9c424e435c82e381ba211c2fe79243", "score": "0.7753077", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n // User::factory()->count(200)\n // ->has(Order::factory()->count(random_int(1, 20)))\n // ->has(Assigned_order::factory()->count(random_int(1,5)))\n // ->has(Blocked_writer::factory()->count(random_int(0, 2)))\n // ->has(Favourite_writer::factory()->count(random_int(0, 5)))\n // ->has(Payed_order::factory()->count(random_int(2, 6)))\n // ->has(Notification::factory()->count(random_int(5, 20)))\n // ->has(Review::factory()->count(random_int(1, 2)))\n // ->has(Assigned_order::factory()->count(random_int(1, 3)))\n // ->create();\n }", "title": "" }, { "docid": "34546962185839c8810e561de7b0508a", "score": "0.77510494", "text": "public function run()\n {\n //$this->call(RestaurantTableSeeder::class);\n factory(App\\User::class,5)->create();\n factory(App\\Model\\Restaurant::class, 10)->create()->each(function ($restaurant) {\n $restaurant->contacts()->save(factory(App\\Model\\Contact::class)->make());\n });\n factory(App\\Model\\Menu::class,30)->create();\n factory(App\\Model\\Item::class,100)->create();\n factory(App\\Model\\Option::class,200)->create();\n factory(App\\Model\\MultiCheckOption::class, 500)->create();\n factory(App\\Model\\Customer::class, 100)->create();\n factory(App\\Model\\Order::class, 300)->create();\n }", "title": "" }, { "docid": "e92b39c751271622081fe6a63248f0d3", "score": "0.7745997", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n Seo::create([\n 'url' => '/',\n 'title' => 'title default',\n 'keywords' => 'keywords default',\n 'description' => 'description default',\n ]);\n\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('1234567'),\n ]);\n }", "title": "" }, { "docid": "e5d1626abf07334bad40def153b6ebf5", "score": "0.7744136", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(MediaSeeder::class);\n //$this->call(GuestSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('guests')->insert([\n 'roomnumber' => Category::all()->random()->id,\n 'name' => $faker->firstName,\n 'surname' => $faker->name,\n 'email' => $faker->email,\n 'phonenumber' => $faker->phoneNumber\n\t ]);\n\t }\n\n }", "title": "" }, { "docid": "8da9a1776904f6cc6a5ccc3953a8e40f", "score": "0.7742624", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('products')->insert([\n 'name' => 'Basil',\n 'price' => 0.99,\n 'description' => 'Perhaps the most popular and widely used culinary herb.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Bay Laurel',\n 'price' => 1.99,\n 'description' => 'Bay laurel is an evergreen shrub or tree in warmer growing zones ( 8 and above).',\n ]);\n DB::table('products')->insert([\n 'name' => 'Borage',\n 'price' => 2.99,\n 'description' => 'Borage is a coarse textured plant growing to about 2-3 feet.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Caraway',\n 'price' => 3.99,\n 'description' => 'Caraway is most often grown for its seeds, but the root and leaves are also edible.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Catnip',\n 'price' => 4.99,\n 'description' => 'Catnip is a hardy perennial with an open mound shaped habit growing to about 2-3 feet tall.',\n ]);\n\n }", "title": "" }, { "docid": "cac69861fb7a00c50daa5b54ee724177", "score": "0.7740592", "text": "public function run()\n {\n //\n DB::table('Proveedores')->insert([\n \t[\n \t'nombre'=> 'juan perez',\n \t'marca'=> 'matel',\n \t'correo_electronico'=> '[email protected]',\n \t'direccion'=>'av. peru 321,santiago',\n \t'fono'=> 993842739\n \t]\n ]);\n\n $faker=Faker::create();\n for ($i=0; $i <20 ; $i++) { \n DB::table('Proveedores')->insert([\t\n \t'nombre'=> $faker->name,\n \t'marca'=>$faker->company,\n \t'correo_electronico'=> $faker->email,\n \t'direccion'=>$faker->address,\n \t'fono'=> $faker->isbn10 ,\n ]);\n }\n }", "title": "" }, { "docid": "9a3fc5f60166a9785c73750188e6596d", "score": "0.7737875", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n /*\n DB::table('product')->insert([\n 'title' => 'Ceci est un titre de produit',\n 'description' => 'lorem ipsum',\n 'price' => 12,\n 'brand' => 'nouvelle marque',\n ]);\n */\n factory(App\\Product::class, 2)->create();\n factory(App\\Categorie::class, 2)->create();\n }", "title": "" }, { "docid": "b6066308d0ac655bb5d5825a458ef8b1", "score": "0.77361476", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(LangauageTableSeeder::class);\n $this->call(CountryTableSeeder::class);\n\n \n\n Country::create([\n 'name' => 'India'\n ]);\n\n Country::create([\n 'name' => 'USA'\n ]);\n\n Country::create([\n 'name' => 'UK'\n ]);\n\n CompanyCateogry::updateOrCreate([\n 'name' => 'category1'\n ]);\n\n factory(App\\Models\\Customer::class, 50)->create();\n factory(App\\Models\\Supplier::class, 50)->create();\n // $this->call(CompanySeeder::class);\n $this->call(InvoiceSeeder::class);\n $this->call(CashFlowSeeder::class);\n }", "title": "" }, { "docid": "8de228115e4192b5098d2a339ff99bf2", "score": "0.7735688", "text": "public function run()\n {\n //delete the users table when the seeder is called\n DB::table('users')->delete();\n\n Eloquent::unguard();\n\n\t\t//disable foreign key before we run the seeder\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n factory(App\\User::class, 50)->create();\n\n //Also create these accounts - used for easy testing purposes\n DB::table('users')->insert([\n [\n 'name' => 'Test',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n ],\n [\n 'name' => 'Test2',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n\n ],\n ]);\n }", "title": "" }, { "docid": "e0d9bd8b4c025867e30c1a5579c4da9c", "score": "0.7734883", "text": "public function run()\n {\n\n $this->call([\n EstadosSeeder::class,\n MunicipiosSeeder::class,\n RelacionEstadosMunicipiosSeeder::class,\n StatusSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Categories::factory()->count(20)->create();\n \\App\\Models\\Products::factory()->count(100)->create();\n \\App\\Models\\Galery::factory()->count(1000)->create();\n \\App\\Models\\Providers::factory()->count(20)->create();\n \\App\\Models\\Valorations::factory()->count(1000)->create();\n \\App\\Models\\Sales::factory()->count(999)->create();\n \\App\\Models\\Directions::factory()->count(999)->create();\n \\App\\Models\\LastView::factory()->count(999)->create();\n \\App\\Models\\Offers::factory()->count(20)->create();\n // \\App\\Models\\Favorites::factory()->count(50)->create();\n \\App\\Models\\Notifications::factory()->count(999)->create();\n /**\n * $this->call([\n * CategoriesSeeder::class,\n * ]);\n */\n\n $this->call([\n FavoritesSeeder::class,\n ]);\n\n }", "title": "" }, { "docid": "79751b67da244a7913b06f140364d6c0", "score": "0.7732834", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n PartCategory::truncate();\n Brand::truncate();\n Manufacturer::truncate();\n PartSubcategory::truncate();\n Part::truncate();\n Admin::truncate();\n\n $usersQuantity = 500;\n $categoriesQuantity = 30;\n $subCategoriesQuantity = 200;\n $partQuantity = 1000;\n $brandQuantity = 20;\n $manufacturerQuantity = 50;\n $adminQuantity = 10;\n\n factory(User::class, $usersQuantity)->create();\n factory(PartCategory::class, $categoriesQuantity)->create();\n factory(Brand::class, $brandQuantity)->create();\n factory(Manufacturer::class, $manufacturerQuantity)->create();\n\n factory(PartSubcategory::class, $subCategoriesQuantity)->create();\n factory(Part::class, $partQuantity)->create();\n\n factory(Admin::class, $adminQuantity)->create();\n\n }", "title": "" }, { "docid": "fb7d5bba21289ca1ca2041a5e18bd077", "score": "0.77297103", "text": "public function run()\n {\n// factory(Category::class, 20)->create();\n// factory(Post::class, 50)->create();\n// factory(Tag::class, 10)->create();\n\n $this->call(UserTableSeed::class);\n $this->call(PostTableSeed::class);\n }", "title": "" }, { "docid": "77fb1d45e59d982eac35251a4446cfa5", "score": "0.7728479", "text": "public function run()\n {\n //Cmd: php artisan db:seed --class=\"recommendTableSeeder\"\n \n $faker = Faker\\Factory::create(\"ja_JP\");\n \n for( $i=0; $i<10; $i++ ){\n\n App\\Recommend::create([\n\t\t\t\t\t\"from_user\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_woman\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man_message\" => $faker->word(),\n\t\t\t\t\t\"to_woman_message\" => $faker->word(),\n\t\t\t\t\t\"man_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"created_at\" => $faker->dateTime(\"now\"),\n\t\t\t\t\t\"updated_at\" => $faker->dateTime(\"now\")\n ]);\n }\n }", "title": "" }, { "docid": "95f6236854296207546d9b1517fa175a", "score": "0.77278304", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n // Create 10 records of posts\n factory(App\\Post::class, 10)->create()->each(function ($post) {\n // Seed the relation with 5 comments\n $commments = factory(App\\Comment::class, 5)->make();\n $post->comments()->saveMany($commments);\n });\n }", "title": "" }, { "docid": "1667303ce0032ddd973fad5eb00529bd", "score": "0.7726387", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('user_roles')->insert(['name' => 'System Admin', 'description' => 'Description',]);\n DB::table('user_roles')->insert(['name' => 'Owner', 'description' => 'System Owner',]);\n DB::table('user_roles')->insert(['name' => 'Admin', 'description' => 'Admin',]);\n DB::table('user_roles')->insert(['name' => 'Editor', 'description' => 'Editor',]);\n DB::table('user_roles')->insert(['name' => 'Viewer', 'description' => 'Viewer',]);\n }", "title": "" }, { "docid": "f198ce46b8e947563c34aa166ca6fd70", "score": "0.772602", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\TourCategory::class, 4)->create()->each(function (\\App\\TourCategory $category) {\n $category->tours()->saveMany(\n factory(\\App\\Tour::class,10)->make()\n );\n });\n }", "title": "" }, { "docid": "377c3a872d4a300cceb5049caf48d66a", "score": "0.7725185", "text": "public function run()\n {\n $this->call([\n UsersTabeleSeeder::class,\n PostsTabeleSeeder::class,\n CategoriesTabeleSeeder::class,\n ]);\n\n //Get array of ids\n $postIds = DB::table('posts')->pluck('id')->all();\n $categoryIds = DB::table('categories')->pluck('id')->all();\n\n //Seed category_post table with max 40 entries\n foreach ((range(1, 70)) as $index) \n {\n DB::table('category_post')->updateOrInsert(\n [\n 'post_id' => $postIds[array_rand($postIds)],\n 'category_id' => $categoryIds[array_rand($categoryIds)]\n ]\n );\n }\n }", "title": "" }, { "docid": "e44b2f3d77d7329f6b2d733b04c6ab80", "score": "0.7718937", "text": "public function run()\n {\n // we can seed specific data directory\n /**\n Let's try \"Faker\" to prepopulate with lots of imaginery data very quickly!\n\n */\n\n $faker = Faker\\Factory::create();\n\n foreach(range(1, 25 ) as $index){\n \tDB::table( 'tweets')->insert(array(\n \t\t'user_id' => rand(1,25),\n \t\t'message' => $faker->catchphrase\n \t));\n }\n }", "title": "" }, { "docid": "064da3a1fd5b172768671dc5b6f1169d", "score": "0.7718056", "text": "public function run()\n {\n\n\n\n Storage::deleteDirectory('eventos');\n\n Storage::makeDirectory('eventos');\n\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n \n Categoria::factory(4)->create();\n \n $this->call(EventoSeeder::class);\n\n $this->call(AporteSeeder::class);\n\n $this->call(ObjetoSeeder::class);\n\n }", "title": "" }, { "docid": "f6e951e99c926a5aa070324982a80a85", "score": "0.7717371", "text": "public function run()\n {\n Model::unguard();\n\n $seedData = [\n 'Taiwan' => [\n 'Taipei City',\n 'New Taipei City',\n 'Taoyuan City',\n 'Taichung City',\n 'Kaohsiung City',\n 'Tainan City',\n 'Hsinchu City',\n 'Chiayi City',\n 'Keelung City',\n 'Hsinchu County',\n 'Miaoli County',\n 'Changhua County',\n 'Nantou County',\n 'Yunlin County',\n 'Chiayi County',\n 'Pingtung County',\n 'Yilan County',\n 'Hualien County',\n 'Taitung County',\n 'Kinmen County',\n 'Lienchiang County',\n 'Penghu County',\n ]\n ];\n\n foreach ($seedData as $countryName => $cityList) {\n $country = Country::create(['name' => $countryName]);\n\n foreach ($cityList as $cityName) {\n $country->cities()->create(['name' => $cityName]);\n }\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "4fc1f9ee76a037b3655d6f4e73603494", "score": "0.7714682", "text": "public function run()\n {\n //\n //factory(App\\User::class)->create();\n\n DB::table('users')->insert(\n [\n 'name' => 'Seyi', \n 'email' => '[email protected]',\n 'password' => 'somerandompassword'\n ]\n );\n DB::table('posts')->insert([\n [\n 'title' => 'My First Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My second Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My third Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ]\n ]);\n \n \n }", "title": "" }, { "docid": "80b4dcada74bc12860abdaff1c2aa1bb", "score": "0.7712008", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 50) as $index) {\n DB::table('books')->insert([\n 'name' => $faker->firstName(),\n 'yearOfPublishing' => $faker->year(),\n 'content' => $faker->paragraph(1, true),\n 'author_id' => $faker->numberBetween(1, 50),\n ]);\n }\n }", "title": "" }, { "docid": "af51801570c9648f237f5a51624f4182", "score": "0.77119786", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(function($user){\n $user->question()->saveMany(factory(App\\Question::class,rand(1,5))->make())\n ->each(function($question){\n $question->answer()->saveMany(factory(App\\Answer::class,rand(1,5))->make());\n });\n });\n }", "title": "" }, { "docid": "bd6458274ff09172851640f92c233c59", "score": "0.77101403", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n \n User::truncate();\n TipoUsuario::truncate();\n Reserva::truncate();\n PuntuacionEstablecimiento::truncate();\n PuntuacionProducto::truncate();\n Producto::truncate();\n Imagen::truncate();\n Establecimiento::truncate();\n Carta::truncate();\n\n $this->call(TipoUsuarioSeeder::class);\n\n foreach (range(1, 10) as $i){\n $u = factory(User::class)->create();\n $u->usuarios_tipo()->attach(TipoUsuario::all()->random());\n }\n\n\n //factory(Establecimiento::class,4)->create();\n //factory(Reserva::class,20)->create();\n //factory(Carta::class, 4)->create(); //Crear tantas como restaurantes\n //factory(Producto::class,100)->create();\n //factory(PuntuacionEstablecimiento::class,50)->create();\n //factory(PuntuacionProducto::class,50)->create();\n //factory(Imagen::class,200)->create();\n\n Schema::enableForeignKeyConstraints(); \n }", "title": "" }, { "docid": "7d3aed410918c722790ec5e822681b71", "score": "0.7708702", "text": "public function run() {\n \n //seed should only be run once\n $faker = Faker::create();\n\n $cat = [\n 1 => \"Home Appliances\",\n 2 => \"Fashion\",\n 3 => \"Home & Living\",\n 4 => \"TV, Gaming, Audio, WT\",\n 5 => \"Watches, Eyewear, Jewellery\",\n 6 => \"Mobiles & Tablets\",\n 7 => \"Cameras\",\n 8 => \"Computers & Laptop\",\n 9 => \"Travel & Luggage\",\n 10 => \"Health & Beauty\",\n 11 => \"Sports, Automotive\",\n 12 => \"Baby, Toys\",\n ];\n\n for ($i = 1; $i <= 12; $i++) {\n DB::table('categories')->insert([\n 'name' => $cat[$i],\n 'image' => $faker->imageUrl($width = 640, $height = 480),\n \n 'created_at' => $faker->dateTimeThisYear($max = 'now'),\n 'updated_at' => \\Carbon\\Carbon::now(),\n ]);\n }\n }", "title": "" }, { "docid": "75f8fae397ad6cf1e3077c2a32e423ad", "score": "0.77076155", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Category::truncate();\n Product::truncate();\n WarrantyProduct::truncate();\n\n factory(User::class, 200)->create();\n\n factory(Category::class, 10)->create()->each(\n function ($category){\n factory(Product::class, mt_rand(8,15))->create(['category_id' => $category->id])->each(\n function ($product){\n factory(WarrantyProduct::class, mt_rand(2, 3))->create(['product_id' => $product->id]);\n }\n );\n }\n );\n\n }", "title": "" }, { "docid": "8b07e67f8045192de7c1b932e58f1d17", "score": "0.77057153", "text": "public function run()\n {\n /*$faker = Faker\\Factory::create();\n foreach(range(1,10) as $index){\n App\\Post::create([\n 'title'=> $faker->name,\n 'description'=> $faker->name,\n 'content'=> $faker->name\n ]);\n }*/\n\n Post::create([\n 'title'->title,\n 'description'->description,\n 'content'->content\n ]);\n }", "title": "" }, { "docid": "ddf328298d79f78f3d971cd04aba1d68", "score": "0.7705306", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n\n\n factory(\\App\\Entities\\Category::class, 3)->create()->each(function ($c){\n $c->products()\n ->saveMany(\n factory(\\App\\Entities\\Product::class, 3)->make()\n );\n });\n }", "title": "" }, { "docid": "5f9901567b2bd8ddbdf263c78ddac102", "score": "0.7703055", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n \n // User Table Data\n /*for($i = 0; $i < 1000; $i++) {\n \tApp\\User::create([\n\t 'email' => $faker->email,\n\t 'password' => $faker->password,\n\t 'full_name' => $faker->name,\n\t 'phone_number' => $faker->name,\n\t ]);\n\t }*/\n\n // User Event Data\n\t /*for($i = 0; $i < 50; $i++) {\n \tApp\\Events::create([\n\t 'event_name' => $faker->name,\n\t 'event_date' => $faker->date,\n\t 'event_startTime' => '2019-01-01',\n\t 'event_duration' => '2',\n\t 'event_venue' => $faker->address,\n\t 'event_speaker' => '1',\n\t 'event_sponsor' => '3',\n\t 'event_topic' => $faker->text,\n\t 'event_details' => $faker->text,\n\t 'event_avatar' => $faker->imageUrl,\n\t 'created_at' => $faker->date(),\n\t ]);\n\t }*/\n }", "title": "" }, { "docid": "6fbcd5e15b63b9dabff8dbaff5d2ea82", "score": "0.77023256", "text": "public function run()\n {\n $faker = Factory::create();\n\n Persona::truncate();\n Pago::truncate();\n Detalle::truncate();\n\n // Schema::disableForeignKeyConstraints();\n User::truncate();\n // HaberDescuento::truncate();\n // Schema::enableForeignKeyConstraints();\n\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'dni' => '12345678',\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret\n 'remember_token' => Str::random(10),\n ]);\n\n // foreach (range(1, 25) as $i) {\n // $dni = mt_rand(10000000, 99999999);\n // Persona::create([\n // 'nombre' => $faker->firstname,\n // 'apellidoPaterno' => $faker->lastname,\n // 'apellidoMaterno' => $faker->lastname,\n // 'dni' => $dni,\n // 'codmodular' => '10' . $dni,\n // 'user_id' => 1,\n // 'estado' => $faker->randomElement(['activo', 'inactivo']),\n // ]);\n // }\n\n }", "title": "" }, { "docid": "2db117b1d28054b0f08a58115645189d", "score": "0.7701633", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // ?for seeding categories\n // Category::factory(5)->create();\n //? for seeding posts \n Post::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "4e84e995d3e716ac7ab157ddfcc67a39", "score": "0.7700629", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tag::class, 10)->create();\n\n // Get all the roles attaching up to 3 random roles to each user\n $tags = App\\Tag::all();\n\n\n factory(App\\User::class, 10)->create()->each(function($user) use ($tags){\n $user->save();\n factory(App\\Question::class, 5)->create(['user_id'=>$user->id])->each(function($question) use ($user, $tags){\n \n $question->tags()->attach(\n $tags->random(rand(1, 10))->pluck('id')->toArray()\n ); \n factory(App\\Comment::class, 5)->create(['user_id'=>$user->id, 'question_id'=>$question->id])->each(function($comment){\n $comment->save(); \n });\n });\n });\n }", "title": "" }, { "docid": "44607c99534f6f67a920e806653b05d8", "score": "0.76990753", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n \\App\\Models\\Rol::factory(10)->create();\n \\App\\Models\\Persona::factory(10)->create();\n \\App\\Models\\Configuracion::factory(10)->create();\n }", "title": "" }, { "docid": "5e28bc59cffaacbd443ac1937265c50b", "score": "0.76987165", "text": "public function run()\n {\n $this->call(PostsTableSeeder::class);\n $this->call(SiswaSeeder::class);\n $this->call(MusicsTableSeeder::class);\n $this->call(FilmSeeder::class);\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tabungan::class, 100)->create();\n factory(App\\Costumer::class, 1000)->create();\n }", "title": "" }, { "docid": "55df2400596f6d82130eb26db7635b8b", "score": "0.7695885", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contact::truncate();\n \n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n Contact::create([\n 'first_name' => $faker->name,\n 'last_name' => $faker->name,\n 'email' => $faker->email,\n 'telephone' => $faker->phoneNumber,\n 'contact_type' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "d250f232a40eb13d0fa688dd5dc63e8c", "score": "0.7693821", "text": "public function run()\n {\n factory(App\\User::class,5)->create();\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'type' => 1,\n 'confirmed' =>1,\n ]);\n\n factory(App\\Category::class,5)->create();\n\n $categories_array = App\\Category::all('id')->pluck('id')->toArray();\n\n $post = factory(App\\Post::class,20)->create()->each(function($post) use ($categories_array){\n $this->attachRandomCategoriesToPost($post->id, $categories_array);\n $this->addCommentsToPost($post->id);\n });\n }", "title": "" }, { "docid": "f440a18e1170b8250c14144757b8cc81", "score": "0.76937693", "text": "public function run()\n\t{\n\t\t//\n\t\tApp\\Book::truncate();\n\t\tApp\\Genre::truncate();\n\t\tApp\\Author::truncate();\n\n\t\tfactory(App\\Book::class, 50)->create()->each(function($books) {\n\t\t$books->authors()->save(factory(App\\Author::class)->make());\n\t\t$books->genres()->save(factory(App\\Genre::class)->make());\n\t\t});\n\t}", "title": "" }, { "docid": "14bcfcdf178e55585d48d15b958ccfc6", "score": "0.7693058", "text": "public function run()\n {\n $data = json_decode(file_get_contents(database_path('seeds/data/voyager.json')), true);\n foreach ($data as $table => $tableData) {\n $this->command->info(\"Seeding ${table}.\");\n \\Illuminate\\Support\\Facades\\DB::table($table)->delete();\n \\Illuminate\\Support\\Facades\\DB::table($table)->insert($tableData);\n }\n\n// $this->seed('DataTypesTableSeeder');\n// $this->seed('DataRowsTableSeeder');\n $this->seed('MenusTableSeeder');\n// $this->seed('MenuItemsTableSeeder');\n $this->seed('RolesTableSeeder');\n $this->seed('PermissionsTableSeeder');\n $this->seed('PermissionRoleTableSeeder');\n $this->seed('SettingsTableSeeder');\n }", "title": "" }, { "docid": "dbd59b913d32cfed4a7fd5cda3083940", "score": "0.7692271", "text": "public function run()\n {\n //\n DB::table('oa')->delete();\n\n DB::table('oa')->insert([\n /*'id' => 1,*/\n /*'id_educativo' => 1,\n 'id_general' => 1,\n 'id_clasificacion' => 1,\n 'id_tecnica' => 1,*/\n ]);\n\n $this->call(Lom_generalSeeder::class);\n $this->call(Lom_clasificacionSeeder::class);\n $this->call(Lom_educativoSeeder::class);\n $this->call(Lom_tecnicaSeeder::class);\n }", "title": "" }, { "docid": "654191b89a3f7b4f8f809dd4ca1e2f6d", "score": "0.76909655", "text": "public function run()\n {\n /**\n * Create default user for admin, lecturer and student\n */\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Sample Lecturer',\n 'email' => '[email protected]',\n 'password' => Hash::make('lecturer'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Student',\n 'email' => '[email protected]',\n 'password' => Hash::make('student'),\n 'role' => 'student'\n ]);\n\n /**\n * Create random 300 users with faker and role/password equal \"student\"\n */\n factory(App\\User::class, 300)->create();\n\n // run with php artisan migrate --seed\n }", "title": "" }, { "docid": "82fbb499231e85aef13b133c2fd7bebb", "score": "0.76907074", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Tomas Landa',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n ]);\n\n\n $this->call(AuthorSeeder::class);\n $this->call(BookSeeder::class);\n\n\n }", "title": "" }, { "docid": "7d5e2b097fa405f728e42815bc2fa95f", "score": "0.76902896", "text": "public function run()\n {\n Category::create(['name' => 'remeras']);\n Category::create(['name' => 'camperas']);\n Category::create(['name' => 'pantalones']);\n Category::create(['name' => 'gorras']);\n Category::create(['name' => 'mochilas']);\n Category::create(['name' => 'Sombreros']);\n Category::create(['name' => 'Muñequeras']);\n Category::create(['name' => 'Medias']);\n\n $discounts = Discount::factory(40)->create();\n\n $products = Product::factory(50)\n ->make()\n ->each(function ($product){\n $categories = Category::all();\n $product->category_id = $categories->random()->id;\n $product->save();\n });\n\n }", "title": "" }, { "docid": "acbc8ce8381dd5242a3f70eb7db2f7b0", "score": "0.76889795", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'name' => 'mohamed magdy',\n 'email' => '[email protected]'\n ]);\n factory(User::class)->create([\n 'name' => 'ahmed magdy',\n 'email' => '[email protected]'\n ]);\n factory(User::class)->create([\n 'name' => 'abdelhameed',\n 'email' => '[email protected]'\n ]);\n }", "title": "" }, { "docid": "1bfaef844c455e578ca42264d7b5fd55", "score": "0.76846653", "text": "public function run()\n {\n factory(User::class, 10)->create();\n factory(Category::class, 6)->create();\n factory(Question::class, 60)->create();\n factory(Reply::class, 160)->create();\n factory(Like::class, 200)->create();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "b9641bc88f5f5c670d56d18a040a9927", "score": "0.7675924", "text": "public function run()\n {\n //création de seeder grace a faker\n // $faker = Faker::create();\n // for ($user = 0; $user < 10; $user++){\n // \\App\\User::create([\n // 'name' => $faker->name,\n // 'email' => $faker->unique()->safeEmail,\n // 'password' =>bcrypt('secret')\n // ]);\n // }\n \\App\\User::create([\n 'name' =>'Admin',\n 'email' => '[email protected]',\n 'password' =>bcrypt('adminadmin'),\n 'admin' =>1\n ]);\n\n\n //permet de créer des utilisateurs sans les relations\n factory(\\App\\User::class, 20)->create();\n\n //permet de créer 10 articles chacun écrit par un seul utilisateur\n // factory(\\App\\User::class, 10)->create()->each(function ($u) {\n // $u->articles()->save(factory(\\App\\Article::class)->make());\n // });\n\n //Permet de creer 20 articles par utilisateur -> 15x 20\n // $user = factory(\\App\\User::class, 15)->create();\n // $user->each(function ($user) {\n // factory(\\App\\Article::class, 20)->create([\n // 'user_id' => $user->id\n // ]);\n // });\n }", "title": "" }, { "docid": "0a79213fd15a52faa35b5d39bdf72ab9", "score": "0.7673569", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Categoria::class, 2)->create();\n\n //Se crearan 40 post\n factory(App\\Curso::class, 40)->create();\n }", "title": "" }, { "docid": "3114ddd54d20a2718dff9452d5974cde", "score": "0.76679426", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 20) as $index) {\n \\DB::table('employees')->insert([\n 'name' => $faker->name,\n 'age' => rand(22, 40),\n 'email' => $faker->email,\n 'gender' => $faker->randomElement(array('male', 'female')),\n 'country' => $faker->country\n ]);\n }\n }", "title": "" }, { "docid": "032e6df09c32ce0c18c6e5a3dcfd03cd", "score": "0.76679265", "text": "public function run()\n {\n\t DB::table('roles')->insert([\n\t\t 'name' => 'admin'\n\t ]);\n\n\t DB::table('users')->insert([\n\t\t 'name' => 'David Trushkov',\n\t\t 'email' => '[email protected]',\n\t\t 'password' => bcrypt('d16331633'),\n\t\t 'remember_token' => str_random(10),\n\t\t 'verified' => 1,\n\t\t 'token' => '',\n\t\t 'avatar' => '',\n\t\t 'created_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t\t 'updated_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t ]);\n\n\t DB::table('user_role')->insert([\n\t\t 'user_id' => 1,\n\t\t 'role_id' => 1\n\t ]);\n\n\t $this->call(UserTableSeeder::class);\n\t $this->call(FilesTableSeeder::class);\n\t $this->call(FileUploadsTableSeeder::class);\n\t $this->call(SalesTableSeeder::class);\n\t $this->call(FileCategoryTableSeeder::class);\n }", "title": "" }, { "docid": "fec3323e6f3a81f6348e08d8097828b8", "score": "0.76672584", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Listing::truncate();\n\n $userQuantity=5;\n $listingQnt=100;\n\n factory(App\\User::class,$userQuantity)->create();\n factory(App\\Listing::class,$listingQnt)->create();\n }", "title": "" }, { "docid": "fd3e02773eac9af1278393c90e1ec5e3", "score": "0.7666974", "text": "public function run()\n {\n User::truncate();\n\n User::create([\n 'name' => 'admin',\n 'password' => bcrypt('secret'),\n 'role' => 'admin',\n ]);\n\n User::create([\n 'name' => 'operator',\n 'password' => bcrypt('secret'),\n 'role' => 'operator',\n ]);\n\n User::create([\n 'name' => 'employee',\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n\n $faker = Factory::create('id_ID');\n\n for ($i = 0; $i < 12; $i++) {\n User::create([\n 'name' => $faker->name,\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n }\n\n }", "title": "" }, { "docid": "2344b2d3d5ee3f98e7bbbe7784cad8c9", "score": "0.7663209", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n $counry = Country::inRandomOrder()->first()->country;\n $city = City::inRandomOrder()->where('country', $counry)->first()->city;\n\n Agencies::create([\n 'name' => $faker->company,\n 'address' => $faker->address,\n\t\t\t\t'city' => $city,\n\t\t\t\t'countri' => $counry,\n\t\t\t\t'phone' => $faker->phoneNumber,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'web' => \"www.addadadadad.com\",\n ]);\n }\n }", "title": "" }, { "docid": "acc4a55ca590e54c9d9cae8f6b80d13b", "score": "0.7662981", "text": "public function run()\n {\n User::factory(100)->create();\n $this->call([\n UserSeeder::class,\n ]);\n Article::factory()->count(100)->create();\n Rate::factory()->count(1000)->create();\n\n }", "title": "" }, { "docid": "47d7ad0594d6fea4c95ece125a11f12f", "score": "0.76622707", "text": "public function run()\n {\n\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('menus')->insert([\n 'title' => $faker->firstName(),\n 'price' => $faker->randomNumber(2),\n 'weight' => $faker->randomNumber(2),\n 'meat' => $faker->randomNumber(2),\n 'about' => $faker->realText(rand(10, 20))\n ]);\n }\n\n //\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('restaurants')->insert([\n 'title' => $faker->company(),\n 'customer' => $faker->randomNumber(2),\n 'employee' => $faker->randomNumber(2),\n // 'menu_id' => $faker->randomNumber(1),\n\n ]);\n }\n }", "title": "" }, { "docid": "317d47304eb6df80c5511ceb3b9b995f", "score": "0.76618236", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n $faker = Faker\\Factory::create();\n for ($i=0; $i < 10; $i++) { \n BeTagModel::create([\n 'name' => $faker->sentence,\n 'name_alias' => implode('',$faker->sentences(4)),\n 'status' => $faker->randomDigit(),\n 'created_by' => $faker->unixTime(),\n 'updated_by' => $faker->unixTime(),\n 'created_at' => $faker->unixTime(),\n 'updated_at' => $faker->unixTime(),\n ]);\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "0de657d649c6926b71b8f5e0b4af5374", "score": "0.76618147", "text": "public function run() {\n // Example list, this seed will only create admin role, if you wanna create user account, please use normal register.\n // The pattern for each list value will be array[0] for username, array[1] for password (it will be hashed later, calma) and array[2] for email.\n // Add as many as you like.\n $list = array(\n array('pulselab', 'nopassword', '[email protected]'),\n );\n\n DB::collection('users')->delete();\n DB::collection('users')->insert(array_map(function($o) {\n return array(\n 'username' => $o[0],\n 'password' => app('hash')->make(sha1($o[1])),\n 'email' => $o[2],\n 'facebook_id' => '',\n 'twitter_id' => '',\n 'point' => 0,\n 'role' => 'admin',\n 'word_translated' => 0,\n 'word_categorized'=> 0,\n 'languages'\t\t => '',\n 'isconfirmed'\t => true,\n 'resetcode'\t\t => '',\n 'isVirgin' => 0,\n );\n }, $list));\n }", "title": "" }, { "docid": "591cc779df1a315a5bb877f8e1fe4600", "score": "0.7660859", "text": "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('indicadores')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('indicadores')->insert([\n 'rels' => json_encode([$faker->words(3)]),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->sentence,\n 'ano_inicial' => $faker->numberBetween(2019,2025),\n 'ano_final' => $faker->numberBetween(2025,2030),\n 'status_atual' => $faker->randomNumber(3),\n 'status_final' => $faker->boolean(),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n 'status' => true,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "9bf3fa05d4ae071adbab0386bc123da6", "score": "0.7660738", "text": "public function run()\n {\n $data = [];\n $faker = Factory::create();\n\n for ($i = 0; $i < 100; $i++) {\n $data[] = [\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n 'email' => $faker->email(),\n 'created_at' => date('Y-m-d H:i:s'),\n ];\n }\n\n $users = $this->table(DbConfig::DB_USER_TABLE);\n $users->insert($data)\n ->saveData();\n }", "title": "" }, { "docid": "4928806405a07b1df0cb55aaf31cc6fd", "score": "0.76591706", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Section::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few Section in our database:\n for ($i = 0; $i < 10; $i++) {\n Section::create([\n 'name' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "ac091d03c70afaa39edeb6588c3c3993", "score": "0.7657682", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //semillero cuando se ejecute el comando migrate se crearan en automatico los datos\n factory(User::class)->create(['email'=>'[email protected]']);\n factory(User::class, 50)->create();\n factory(Forum::class, 20)->create();\n factory(Post::class, 50)->create();\n factory(Reply::class, 100)->create();\n }", "title": "" } ]
f7361a797b23731cc2197be527cf1f10
buscamnos si hay un robot solo
[ { "docid": "e02c226b018a11d2c3498a5db8fcacf5", "score": "0.5754837", "text": "public function asignarPeleas(){\n\t\t\t$sql = \"SELECT cve_pel, lvp_pel FROM pelea WHERE lvp_pel=0 and (cve_rob1 IS NULL or cve_rob2 IS NULL)\";\n\t\t\t$rs;\n\t\t\tif(($rs=mysql_query($sql)) && mysql_num_rows($rs)>0){\n\t\t\t\t//si esta solo un robot \n\t\t\t\twhile ($array=mysql_fetch_array($rs)) {\n\t\t\t\t\t$sql =\"UPDATE pelea SET lvp_pel=\".(((int)$array['lvp_pel'])+1)\n\t\t\t\t\t.\" where cve_pel=\".$array['cve_pel'].\";\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\techo \"\".((mysql_query($sql))?\"Si\":\"No\").\" se subio de nivel <br>\".mysql_error();\n\t\t\t}\n\t\t\t//buscamos una pelea disponible\n\t\t\t$sql = \"SELECT cve_pel FROM pelea WHERE disp_pel IS NULL AND cve_rob1 IS NOT NULL AND cve_rob2 IS NOT NULL\";\n\t\t\t//si esta disponible la pelea\n\t\t\t$rs;\n\t\t\tif(($rs=mysql_query($sql))!==false && mysql_num_rows($rs)>0){\n\t\t\t\t$cve_pel;\n\t\t\t\twhile ($array=mysql_fetch_array($rs)) {\n\t\t\t\t\t$cve_pel = $array['cve_pel'];\n\t\t\t\t\t$sql =\"UPDATE pelea SET disp_pel=0 where cve_pel=\".$cve_pel.\";\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\techo ((mysql_query($sql))?\"Si\":\"No\").\" se cambio la disponibilidad de la pelea\";\n\t\t\t\theader(\"Location:combateAhora.php?num=\".$cve_pel);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t//verificar si hay robots en combate\n\t\t\t$sql = \"SELECT cve_pel FROM pelea WHERE disp_pel=0 AND cve_rob1 IS NOT NULL AND cve_rob2 IS NOT NULL\";\n\t\t\t$rs;\n\t\t\tif(($rs=mysql_query($sql))!=false && mysql_num_rows($rs)>0){\n\t\t\t\t//si hay robots en combate\n\t\t\t\techo \"No hay peleas disponibles espere un momento...\";\n\t\t\t}else{\n\t\t\t\techo \"Ya termino el encuentro =( o no se ha terminado el periodo de reinscripcion\";\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" } ]
[ { "docid": "71a7c472a4a09f60b8092bb35a9d2ce1", "score": "0.6386545", "text": "public function robotCheck() {\n\t\tif ($this->data['robots'] == 'eleven') {\n\t\t\treturn true;\n\t\t} else {array_push($this->errors, 'robots'); return false;}\n\t}", "title": "" }, { "docid": "768d9daf73323d4e8953764c68fe359f", "score": "0.5894473", "text": "public function isRobot()\n\t{\n\t\tforeach ($this->robots as $robot)\n\t\t{\n\t\t\tif (preg_match('/' . $robot . '/', $this->agent))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "dfb9df5dc1568903ede6bc648295206f", "score": "0.5741586", "text": "public function testRobotCanMove()\n {\n // test north movement\n $this->game->initialize('PLACE 2,2,north');\n $this->robot->move();\n $this->assertEquals('2,3,NORTH', $this->robot->report());\n\n // test east movement\n $robot = $this->game->initialize('PLACE 2,2,east');\n $this->robot->move();\n $this->assertEquals('3,2,EAST', $this->robot->report());\n\n // test south movement\n $this->game->initialize('PLACE 2,2,south');\n $this->robot->move();\n $this->assertEquals('2,1,SOUTH', $this->robot->report());\n\n // test west movement\n $this->game->initialize('PLACE 2,2,west');\n $this->robot->move();\n $this->assertEquals('1,2,WEST', $this->robot->report());\n }", "title": "" }, { "docid": "8806fc489f02a0dd3b460ae17e116137", "score": "0.5677163", "text": "public function iniciarSistema() {\n //$status = new status_class();\n //$status->checkStatus();\n\n AccesoGui::$guiSistema->esperarInicioSistema();\n AccesoControladoresDispositivos::$ctrlLuzTecho->encenderLucesTecho();\n AccesoControladoresDispositivos::$ctrlAutomata->iniciar();\n // try {\n // videocon = new Videoconferencia(this.conf, \"Videoconferencia\");\n // /*\n // * TODO: aquí se esperan 3 segundos. Creo que era porque sino la\n // * videoconferencia no se enganchaba bien. Parece algún bug de alguna\n // * libreria Java o de la propia videoconferencia.\n // */\n // Thread.sleep(3000);\n // } catch (Exception e) {\n // }\n // videocon.ReiniciarVideoconferencia();\n // this.conectar();\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarAudio(1,1);// Enrutamos el audio del PC\n AccesoControladoresDispositivos::$ctrlCamaras->presetCamaraPresidencia(10);\n //para preparar la imagen istitucional. Se va ha grabar lo que se emite por el PIP.\n //Generador Ventanas se envia a escalador para escalar la imagen\n AccesoControladoresDispositivos::$ctrlGeneradorMultiventanas->preset(1);\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarVideo(7,8);//PIP --> Escalador\n AccesoControladoresDispositivos::$ctrlMatrizVideo->asignarVideo(MatrizVideo::$INPUT_CAMARA_3,MatrizVideo::$OUTPUT_PIP2);\n AccesoControladoresDispositivos::$ctrlGeneradorMultiventanas->input2Ventana2();\n AccesoControladoresDispositivos::$ctrlMatrizVideo->asignarVideo(MatrizVideo::$INPUT_CAMARA_1,MatrizVideo::$OUTPUT_PIP1);\n AccesoControladoresDispositivos::$ctrlGeneradorMultiventanas->input3Ventana1();\n //y del escalador a la grabacion\n //AccesoControladoresDispositivos::$ctrlMatrizVideo->asignarVideo(MatrizVideo::$INPUT_ESCALADOR,MatrizVideo::$OUTPUT_SERVIDOR_VIDEOCONFERENCIA);\n AccesoControladoresDispositivos::$ctrlMesaMezclas->preset90();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->desactivarMicPresidencia(\"M1\");\n AccesoControladoresDispositivos::$ctrlDvdGrabador->pararGrabacionGrab();\n AccesoControladoresDispositivos::$ctrlDvd->stopDVD();\n if(AccesoControladoresDispositivos::$ctrlAutomata->isLucesBloqueadas()==false)\n AccesoControladoresDispositivos::$ctrlAutomata->bloquearLuces();\n //CAMARA OPACOS. Izorratua dagoelako\n\t//AccesoControladoresDispositivos::$ctrlVisorDocumentos->apagarCamaraDocumentos();\n \n\t//AccesoControladoresDispositivos::$ctrlDvdGrabador->sourceGrab();\n //AccesoControladoresDispositivos::$ctrlDvdGrabador->sourceGrab();\n //AccesoControladoresDispositivos::$ctrlDvdGrabador->sourceGrab();\n\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoPizarra();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoCentral();\n\n ConexionServidorCliente::$ctrlGuiPantallas->pipEnPantallaEntrada();\n AccesoGui::$guiMenus->inicioMenu(true);\n\n }", "title": "" }, { "docid": "9705527acc1bb2c5fc78ca5dcd06799b", "score": "0.5673639", "text": "public function dibujarPantalla( ) {\n $this->activarPantalla();\n try {\n usleep(1000000); // segundu bat itxaroten da Thinclient-ei ez\n // bait die pantaila marrazteko denborarik\n // ematen.\n } catch (Exception $e) {\n }\n foreach ($this->microsOn as $micro=>$estado) {\n if ($estado==1) {\n\n $this->enviarVolumenMicro($micro);\n\n }else {\n\n $this->enviarLimpiarVolumenMicro($micro);\n\n }\n $this->enviarEstadoMicrofono($micro);\n\n }\n\n $this->enviarEstadoSonido(self::$SONIDO_ENTRANTE);\n $this->enviarEstadoSonido(self::$SONIDO_SALIENTE);\n $this->enviarEstadoSonido(self::$SONIDO_GENERAL);\n if($this->isSonido(self::$SONIDO_GENERAL)==1) {\n\n $this->enviarVolumenGeneral();\n }else {\n $this->enviarLimpiarVolumenGeneral();\n }\n }", "title": "" }, { "docid": "c44b6e974909b96baf077a019b9566b4", "score": "0.5641232", "text": "public function get_active_robot(){\n $filters = array('player_id' => $this->player_id, 'robot_position' => 'active');\n $robots = rpg_game::find_robots($filters);\n if (!empty($robots)){ $robot = array_shift($robots); }\n else { $robot = false; }\n return $robot;\n }", "title": "" }, { "docid": "a1f9f8751311dc8fa9794613f1ca87eb", "score": "0.56244314", "text": "public static function isRobot()\n\t{\n\t\treturn static::find(Config::get('user_agents.robots'));\n\t}", "title": "" }, { "docid": "bcdf26e68435cae979fd2aa0b0271af8", "score": "0.5598792", "text": "public function obtenerOtrosTratamientos();", "title": "" }, { "docid": "70c4b1a9ffa9e3a0700cc4c60bdd60be", "score": "0.5584739", "text": "public function getIsRobot()\n {\n return $this->getHelper()->isRobot();\n }", "title": "" }, { "docid": "2608e4aa297a2b66cdb3b84b3acdf535", "score": "0.55489355", "text": "public function isRobot()\n\t{\n\t\tif (Config::getItem('robots'))\n\t\t{\n\t\t\tforeach ((array) Config::getItem('robots') as $k => $v)\n\t\t\t{\n\t\t\t\tif (strpos(strtolower($this->getUserAgent()), strtolower($k)) !== false)\n\t\t\t\t{\n\t\t\t\t\treturn $v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "be034a278fe34b80e96ba4ad0f1d664e", "score": "0.540963", "text": "public function robots(){\n return $this->indexes[$this->activeIndex];\n }", "title": "" }, { "docid": "422d69f4cd144881ed1192eca5253add", "score": "0.53240144", "text": "function _is_bot()\r\n\t{\r\n\t\t$bot_array = array(\t'abachobot', 'abcdatos_botlink', 'spider', 'ah-ha.com', 'ia_archiver', 'scooter', 'mercator', 'roach.smo.av.com',\r\n\t\t\t\t\t'merc_resh', 'altavista', 'crawler', 'wget', 'acoon robot ', 'antibot', 'atomz', 'axmorobot', 'buscaplus robi',\r\n\t\t\t\t\t'canseek', 'clushbot', 'daadle.com', 'rabot ', 'deepindex ', 'dittospyder', 'jack', 'earthcom', 'euripbot',\r\n\t\t\t\t\t'arachnoidea ', 'ezresult', 'fast data search', 'fireball', 'fybersearch ', 'galaxybot', 'geckobot', 'geonabot ',\r\n\t\t\t\t\t'getrax', 'googlebot', 'moget', 'aranha', 'slurp', 'toutatis', 'hubater ', 'iltrovatore-setaccio ', 'incywincy',\r\n\t\t\t\t\t'ultraseek', 'infoseek', 'mole2', 'mp3bot', 'ipselonbot ', 'knowledge.com', 'kuloko-bot', 'lapozzbot',\r\n\t\t\t\t\t'linknzbot', 'lookbot ', 'mantraagent', 'netresearchserver', 'joocerbot', 'henrythemiragorobot', 'mojeekbot', 'mozdex',\r\n\t\t\t\t\t'msnbot', 'gulliver', 'objectssearch', 'onetszukaj', 'picosearch', 'diibot', 'privacyfinder', 'nttdirectory_robot',\r\n\t\t\t\t\t'griffon', 'gazz', 'mousebot', 'dloader', 'dumrobo', 'noxtrumbot', 'openfind', 'openbot', 'psbot', '.ip3000.com',\r\n\t\t\t\t\t'qweerybot', 'alkalinebot', 'stackrambler', 'seznambot', 'search-10 ', 'scrubby', 'asterias', 'speedfind', 'kototoi',\r\n\t\t\t\t\t'searchbyusa', 'sightquestbot', 'teoma_agent1 ', 'teradex_mapper ', 'vivante link checker ', 'appie', 'nazilla ',\r\n\t\t\t\t\t'wombat', 'marvin', 'muscatferret', 'whizbang', 'zyborg', 'webrefiner', 'wscbot ', 'yandex', 'ybsbot',\r\n\t\t\t\t\t'libwww-perl', 'iron33' );\r\n\t\t$ua = strtolower( $_SERVER[ 'HTTP_USER_AGENT' ] );\r\n\t\t$is_bot = false;\r\n\t\tif( !empty( $ua ) )\r\n\t\t{\r\n\t\t\tforeach( $bot_array AS $chk_ua )\r\n\t\t\t{\r\n\t\t\t\t$is_bot = (strpos( $ua, $chk_ua ) !== false ? true : false);\r\n\t\t\t\tif( $is_bot )\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tunset( $bot_array );\t// Remove from memory, no longer needed\r\n\t\treturn $is_bot;\r\n\t}", "title": "" }, { "docid": "de21f106101eefaa82c110097dba73eb", "score": "0.5292145", "text": "public function checkRobots(){\n\t\t$info = parse_url($this->url);\n $result = false;\n try{\n $result = \\api\\FileGetContentsAdapter::get_content('http://'.$info['host'].'/robots.txt');\n\t\t //$result = file_get_contents('http://'.$info['host'].'/robots.txt');\n }catch(Exception $e){\n //do nothing\n }\n\n\t\treturn ($result === false) ? false : true;\n\t}", "title": "" }, { "docid": "46c078b44a459e8e1d1828be71c8288a", "score": "0.52812487", "text": "function seleccionarOpcion() {\n $this->crearInicioSeccion('Seleccione la opci&oacute;n para actualizar datos');\n $arregloBotones=array(array('boton'=>'',\n 'action'=>'cierreSemestre/admin_recalcularEstadoEstudiante',\n 'opcion'=>'mostrarFormulario',\n 'nombreBoton'=>'Listado'),\n array('boton'=>'',\n 'action'=>'cierreSemestre/registro_aplicarReglamento',\n 'opcion'=>'opcionEstudiante',\n 'nombreBoton'=>'Estudiante'));\n $this->mostrarBotonesCargaProyecto($arregloBotones);\n $this->crearFinSeccion();\n }", "title": "" }, { "docid": "446254762e72633fbb70f128fe76be54", "score": "0.5271292", "text": "protected function global_robot() {\n GLOBAL $victro_robot;\n return($victro_robot);\n }", "title": "" }, { "docid": "f22bfa12f628ec49ac30db4894afe56d", "score": "0.5241357", "text": "public function luzTechoapagar( ) {\n\n $this->techo_on = 0;\n $this->techo_presidencia_on = 0;\n $this->techo_pasillo_on = 0;\n $this->techo_alumnos_on = 0;\n $this->ActualizarNivelesTecho();\n $this->dibujarTecho();\n //$this->dibujarPantalla();\n }", "title": "" }, { "docid": "db12f20266a5b8e88f4c11006c27d2aa", "score": "0.5235837", "text": "function esMobil(){\n $buscar = 'mobile';\n $cadena = $_SERVER['HTTP_USER_AGENT'];\n\n $es_mobil = stripos($cadena, $buscar);\n \n if(($es_mobil !== false)){ \n //si es movil\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "697c4d4b1574ecfd23ffda1cf4f0334e", "score": "0.5200312", "text": "function IsRealUser() {\n if (isset($_SESSION['user_is_not_bot'])) return $_SESSION['user_is_not_bot'];\n /*\n $bots = array(\n \"008\",\n \"ABACHOBot\",\n \"Accoona-AI-Agent\",\n \"AddSugarSpiderBot\",\n \"AnyApexBot\",\n \"Arachmo\",\n \"B-l-i-t-z-B-O-T\",\n \"Baiduspider\",\n \"BecomeBot\",\n \"BeslistBot\",\n \"BillyBobBot\",\n \"Bimbot\",\n \"Bingbot\",\n \"BlitzBOT\",\n \"boitho.com-dc\",\n \"boitho.com-robot\",\n \"btbot\",\n \"CatchBot\",\n \"Cerberian Drtrs\",\n \"Charlotte\",\n \"ConveraCrawler\",\n \"cosmos\",\n \"Covario IDS\",\n \"DataparkSearch\",\n \"DiamondBot\",\n \"Discobot\",\n \"Dotbot\",\n \"EARTHCOM.info\",\n \"EmeraldShield.com WebBot\",\n \"envolk[ITS]spider\",\n \"EsperanzaBot\",\n \"Exabot\",\n \"FAST Enterprise Crawler\",\n \"FAST-WebCrawler\",\n \"FDSE robot\",\n \"FindLinks\",\n \"FurlBot\",\n \"FyberSpider\",\n \"g2crawler\",\n \"Gaisbot\",\n \"GalaxyBot\",\n \"genieBot\",\n \"Gigabot\",\n \"Girafabot\",\n \"Googlebot\",\n \"Googlebot-Image\",\n \"Google Page Speed Insights\",\n \"GurujiBot\",\n \"HappyFunBot\",\n \"hl_ftien_spider\",\n \"Holmes\",\n \"htdig\",\n \"iaskspider\",\n \"ia_archiver\",\n \"iCCrawler\",\n \"ichiro\",\n \"igdeSpyder\",\n \"IRLbot\",\n \"IssueCrawler\",\n \"Jaxified Bot\",\n \"Jyxobot\",\n \"KoepaBot\",\n \"L.webis\",\n \"LapozzBot\",\n \"Larbin\",\n \"LDSpider\",\n \"LexxeBot\",\n \"Linguee Bot\",\n \"LinkWalker\",\n \"lmspider\",\n \"lwp-trivial\",\n \"mabontland\",\n \"magpie-crawler\",\n \"Mediapartners-Google\",\n \"MJ12bot\",\n \"MLBot\",\n \"Mnogosearch\",\n \"mogimogi\",\n \"MojeekBot\",\n \"Moreoverbot\",\n \"Morning Paper\",\n \"msnbot\",\n \"MSRBot\",\n \"MVAClient\",\n \"mxbot\",\n \"NetResearchServer\",\n \"NetSeer Crawler\",\n \"NewsGator\",\n \"NG-Search\",\n \"nicebot\",\n \"noxtrumbot\",\n \"Nusearch Spider\",\n \"NutchCVS\",\n \"Nymesis\",\n \"obot\",\n \"oegp\",\n \"omgilibot\",\n \"OmniExplorer_Bot\",\n \"OOZBOT\",\n \"Orbiter\",\n \"PageBitesHyperBot\",\n \"Peew\",\n \"polybot\",\n \"Pompos\",\n \"PostPost\",\n \"Psbot\",\n \"PycURL\",\n \"Qseero\",\n \"Radian6\",\n \"RAMPyBot\",\n \"RufusBot\",\n \"SandCrawler\",\n \"SBIder\",\n \"ScoutJet\",\n \"Scrubby\",\n \"SearchSight\",\n \"Seekbot\",\n \"semanticdiscovery\",\n \"semrush\",\n \"Sensis Web Crawler\",\n \"SEOChat::Bot\",\n \"SeznamBot\",\n \"Shim-Crawler\",\n \"ShopWiki\",\n \"Shoula robot\",\n \"silk\",\n \"Sitebot\",\n \"Snappy\",\n \"sogou spider\",\n \"Sosospider\",\n \"Speedy Spider\",\n \"Sqworm\",\n \"StackRambler\",\n \"suggybot\",\n \"SurveyBot\",\n \"SynooBot\",\n \"Teoma\",\n \"TerrawizBot\",\n \"TheSuBot\",\n \"Thumbnail.CZ robot\",\n \"TinEye\",\n \"truwoGPS\",\n \"TurnitinBot\",\n \"TweetedTimes Bot\",\n \"TwengaBot\",\n \"updated\",\n \"Urlfilebot\",\n \"Vagabondo\",\n \"VoilaBot\",\n \"Vortex\",\n \"voyager\",\n \"VYU2\",\n \"webcollage\",\n \"Websquash.com\",\n \"wf84\",\n \"WoFindeIch Robot\",\n \"WomlpeFactory\",\n \"Xaldon_WebSpider\",\n \"yacy\",\n \"Yahoo! Slurp\",\n \"Yahoo! Slurp China\",\n \"YahooSeeker\",\n \"YahooSeeker-Testing\",\n \"YandexBot\",\n \"YandexImages\",\n \"YandexMetrika\",\n \"YandexMobileBot\",\n \"Yasaklibot\",\n \"Yeti\",\n \"YodaoBot\",\n \"yoogliFetchAgent\",\n \"YoudaoBot\",\n \"Zao\",\n \"Zealbot\",\n \"zspider\",\n \"ZyBorg\",\n );\n $pattern = strtolower('/(' . implode('|', $bots) .')/');\n */\n $pattern = \"/(008|abachobot|accoona-ai-agent|addsugarspiderbot|anyapexbot|arachmo|b-l-i-t-z-b-o-t|baiduspider|becomebot|beslistbot|billybobbot|bimbot|bingbot|blitzbot|boitho.com-dc|boitho.com-robot|btbot|catchbot|cerberian drtrs|charlotte|converacrawler|cosmos|covario ids|dataparksearch|diamondbot|discobot|dotbot|earthcom.info|emeraldshield.com webbot|envolk[its]spider|esperanzabot|exabot|fast enterprise crawler|fast-webcrawler|fdse robot|findlinks|furlbot|fyberspider|g2crawler|gaisbot|galaxybot|geniebot|gigabot|girafabot|googlebot|googlebot-image|google page speed insights|gurujibot|happyfunbot|hl_ftien_spider|holmes|htdig|iaskspider|ia_archiver|iccrawler|ichiro|igdespyder|irlbot|issuecrawler|jaxified bot|jyxobot|koepabot|l.webis|lapozzbot|larbin|ldspider|lexxebot|linguee bot|linkwalker|lmspider|lwp-trivial|mabontland|magpie-crawler|mediapartners-google|mj12bot|mlbot|mnogosearch|mogimogi|mojeekbot|moreoverbot|morning paper|msnbot|msrbot|mvaclient|mxbot|netresearchserver|netseer crawler|newsgator|ng-search|nicebot|noxtrumbot|nusearch spider|nutchcvs|nymesis|obot|oegp|omgilibot|omniexplorer_bot|oozbot|orbiter|pagebiteshyperbot|peew|polybot|pompos|postpost|psbot|pycurl|qseero|radian6|rampybot|rufusbot|sandcrawler|sbider|scoutjet|scrubby|searchsight|seekbot|semanticdiscovery|semrush|sensis web crawler|seochat::bot|seznambot|shim-crawler|shopwiki|shoula robot|silk|sitebot|snappy|sogou spider|sosospider|speedy spider|sqworm|stackrambler|suggybot|surveybot|synoobot|teoma|terrawizbot|thesubot|thumbnail.cz robot|tineye|truwogps|turnitinbot|tweetedtimes bot|twengabot|updated|urlfilebot|vagabondo|voilabot|vortex|voyager|vyu2|webcollage|websquash.com|wf84|wofindeich robot|womlpefactory|xaldon_webspider|yacy|yahoo! slurp|yahoo! slurp china|yahooseeker|yahooseeker-testing|yandexbot|yandeximages|yandexmetrika|yandexmobilebot|yasaklibot|yeti|yodaobot|yooglifetchagent|youdaobot|zao|zealbot|zspider|zyborg)/\";\n $matches = array();\n $useragent = strtolower($_SERVER['HTTP_USER_AGENT']);\n $numMatches = preg_match($pattern, $useragent, $matches);\n if($numMatches > 0) {\n // Found a bot string.\n $_SESSION['user_is_not_bot'] = false;\n return false;\n }\n if (strpos($useragent, \"bot\") !== FALSE || strpos($useragent, \"spider\") !== FALSE) {\n // Found a bot string.\n $_SESSION['user_is_not_bot'] = false;\n return false;\n }\n // Check for banned useragents.\n if (IsBlacklistedURLVisitor()) {\n // Found a bot string.\n $_SESSION['user_is_not_bot'] = false;\n return false;\n }\n $_SESSION['user_is_not_bot'] = true;\n return true;\n}", "title": "" }, { "docid": "b5fecf80a2c07db71857eb77ba3be408", "score": "0.51995975", "text": "public function setMetaRobots()\n\t{\n\t\tif ($this->setMetaData('robots', 'robots'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t$app = JFactory::getApplication();\n\n\t\t// fallback to include global robots\n\t\tif ($robot = $app->get('robots'))\n\t\t{\n\t\t\t$this->page->document->setMetaData('robots', $app->get('robots'));\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "74e303b3b44c3a9c60aba802fee7e466", "score": "0.5187654", "text": "public function checkRobots(){\n\t\t$info = parse_url($this->url);\n\t\t@$result = file_get_contents('http://'.$info['host'].'/robots.txt');\n\t\treturn ($result === false) ? false : true;\n\t}", "title": "" }, { "docid": "d7003c3f1fe56891c31b13a240c5ceae", "score": "0.5186876", "text": "function guardarCambios() {\n\t\t// Si el id_componente es NULL lo toma como un nuevo software\n\t\tif($this->id_componente == NULL) {\n\t\t\t// Comprueba si hay otro software con el mismo nombre\n\t\t\tif(!$this->comprobarSoftwareDuplicado()) {\n\t\t\t\t$consulta = sprintf(\"insert into componentes (nombre,referencia,descripcion,version,id_tipo,fecha_creacion,activo) value (%s,%s,%s,%s,%s,current_timestamp,1)\",\n\t\t\t\t\t$this->makeValue($this->nombre, \"text\"),\n\t\t\t\t\t$this->makeValue($this->referencia, \"text\"),\n\t\t\t\t\t$this->makeValue($this->descripcion, \"text\"),\n\t\t\t\t\t$this->makeValue($this->version, \"text\"),\n\t\t\t\t\t$this->makeValue($this->id_tipo, \"int\"));\n\t\t\t\t$this->setConsulta($consulta);\n\t\t\t\tif($this->ejecutarSoloConsulta()) {\n\t\t\t\t\t$this->id_oomponente = $this->getUltimoID();\n\t\t\t\t\treturn 1;\n\t\t\t\t} else {\n\t\t\t\t\treturn 3;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t} else {\n\t\t\tif(!$this->comprobarSoftwareDuplicado()) {\n\t\t\t\t$consulta = sprintf(\"update componentes set nombre=%s, referencia=%s, descripcion=%s, version=%s, id_tipo=%s where id_componente=%s\",\n\t\t\t\t\t$this->makeValue($this->nombre, \"text\"),\n\t\t\t\t\t$this->makeValue($this->referencia, \"text\"),\n\t\t\t\t\t$this->makeValue($this->descripcion, \"text\"),\n\t\t\t\t\t$this->makeValue($this->version, \"text\"),\n\t\t\t\t\t$this->makeValue($this->id_tipo, \"int\"),\n\t\t\t\t\t$this->makeValue($this->id_componente, \"int\"));\n\t\t\t\t$this->setConsulta($consulta);\n\t\t\t\tif($this->ejecutarSoloConsulta()) {\n\t\t\t\t\treturn 1;\n\t\t\t\t} else {\n\t\t\t\t\treturn 4;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "73249430c747aefd71c80715db043e63", "score": "0.5172434", "text": "protected function _block_robots() {\n\t\t// to be left empty. If it is filled in, we are\n\t\t// dealing with an overzealous robot.\n\t\tif ( !empty($this->request->data['Account']['ruhuman']) ) {\n\t\t\t/// We do not accept registrations from bots.\n\t\t\t$this->Session->setFlash(__d('z', 'bots_are_not_welcome'), 'flash_bad');\n\t\t\t$this->redirect(array('plugin' => null, 'controller' => 'pages', 'action' => 'index'));\n\t\t\treturn true; // just in case\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "4118c2cadef3c21fc2f025ec89b9e587", "score": "0.51690924", "text": "public function set_robots($robots){\n $this->set_info('player_robots', $robots);\n }", "title": "" }, { "docid": "b945358a34105dc45a31b84ad7c340bc", "score": "0.51573145", "text": "public function verif(){\n\t\t$class = Leccion::where('curso_id',$this->curso_id)->where('leccion',$this->leccion)->first();\n\t\tif($class){\n\t\t\t\t$this->create = '';\n\t\t\t \t$this->edit = '';\n\t\t\t \t$this->mensaj = true;\n\t\t}else{\n\t\t\t// $curso = Curso::find($this->curso_id);\n\t\t\t// $this->title = $curso->title; //solo titulo del array\n\t\t\t \t$this->leccion = $this->leccion;\n\t\t\t \t$this->mensaj = '';\n\t\t\t \t$this->edit = '';\n\t\t\t\t$this->create = true;\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "aecd2c2c169a9313e4a054f95137cff9", "score": "0.515554", "text": "public function apagarDispositivos() {\n\n AccesoControladoresDispositivos::$ctrlDvdGrabador->pararGrabacionGrab();\n \n\t//CAmara de opacos EZ dabil!!!\n\t//AccesoControladoresDispositivos::$ctrlVisorDocumentos->apagarCamaraDocumentos();\n AccesoControladoresDispositivos::$ctrlPantallas->apagarEntrada();\n AccesoControladoresDispositivos::$ctrlPantallas->apagarPresidencia();\n AccesoControladoresDispositivos::$ctrlMatrizVideo->asignarvideo(3,1);\n //grabatu behar bada\n //AccesoControladoresDispositivos::$ctrlMatrizVideo->asignarvideo(3,3);\n AccesoControladoresDispositivos::$ctrlPlasma->verCamara3EnPlasma( );\n AccesoControladoresDispositivos::$ctrlPlasma->apagar();\n\n AccesoControladoresDispositivos::$ctrlProyectores->apagarCentral();\n AccesoControladoresDispositivos::$ctrlDvd->apagarDVD();\n //AccesoControladoresDispositivos::$ctrlDvdGrabador->apagar();\n //usleep(50000);\n AccesoControladoresDispositivos::$ctrlProyectores->apagarPizarra();\n\n }", "title": "" }, { "docid": "22adb420e1dc0861133f5ff3540b4d00", "score": "0.51552826", "text": "public function buildRobot($parts) {\n\n $pieces = explode(\"_\", $parts);\n //must be three robot pieces \n if (count($pieces) != 3) {\n echo \"There must be three pieces!\";\n die();\n }\n\n $piece1 = $this->Parts->getSinglePart($pieces[0]);\n $piece2 = $this->Parts->getSinglePart($pieces[1]);\n $piece3 = $this->Parts->getSinglePart($pieces[2]);\n\n if (($piece1[0]['piece'] != $piece2[0]['piece']) && ($piece1[0]['piece'] != $piece3[0]['piece']) && ($piece2[0]['piece'] != $piece3[0]['piece'])) { //valid composition\n\n $data = array(\n 'head_ca' => 0,\n 'body_ca' => 0,\n 'foot_ca' => 0,\n 'head_model' => 0,\n 'body_model' => 0,\n 'foot_model' => 0,\n 'head_piece' => 0,\n 'body_piece' => 0,\n 'foot_piece' => 0,\n 'assemble_date' => 0\n );\n // switch statement that allows user to pick first piece\n switch ($piece1[0]['piece']) {\n case 1: //head\n $data['head_ca'] = $piece1[0]['ca'];\n $data['head_model'] = $piece1[0]['model'];\n $data['head_piece'] = $piece1[0]['piece'];\n break;\n case 2: //body\n $data['body_ca'] = $piece1[0]['ca'];\n $data['body_model'] = $piece1[0]['model'];\n $data['body_piece'] = $piece1[0]['piece'];\n break;\n case 3: //foot\n $data['foot_ca'] = $piece1[0]['ca'];\n $data['foot_model'] = $piece1[0]['model'];\n $data['foot_piece'] = $piece1[0]['piece'];\n break;\n default:die();\n }\n //switch statement that allows user to pick second piece\n switch ($piece2[0]['piece']) {\n case 1: //headgg\n $data['head_ca'] = $piece2[0]['ca'];\n $data['head_model'] = $piece2[0]['model'];\n $data['head_piece'] = $piece2[0]['piece'];\n break;\n case 2: //body\n $data['body_ca'] = $piece2[0]['ca'];\n $data['body_model'] = $piece2[0]['model'];\n $data['body_piece'] = $piece2[0]['piece'];\n break;\n case 3: //foot\n $data['foot_ca'] = $piece2[0]['ca'];\n $data['foot_model'] = $piece2[0]['model'];\n $data['foot_piece'] = $piece2[0]['piece'];\n break;\n default:die();\n }\n //switch statement that allows user to pick second piece\n switch ($piece3[0]['piece']) {\n case 1: //head\n $data['head_ca'] = $piece3[0]['ca'];\n $data['head_model'] = $piece3[0]['model'];\n $data['head_piece'] = $piece3[0]['piece'];\n break;\n case 2: //body\n $data['body_ca'] = $piece3[0]['ca'];\n $data['body_model'] = $piece3[0]['model'];\n $data['body_piece'] = $piece3[0]['piece'];\n break;\n case 3: //foot\n $data['foot_ca'] = $piece3[0]['ca'];\n $data['foot_model'] = $piece3[0]['model'];\n $data['foot_piece'] = $piece3[0]['piece'];\n break;\n default:\n die();\n }\n //assemble date\n $data['assemble_date'] = date(\"Y-m-d H:i:s\");\n $this->Parts->removeSinglePart($piece1[0]['ID']);\n $this->Parts->removeSinglePart($piece2[0]['ID']);\n $this->Parts->removeSinglePart($piece3[0]['ID']);\n // record of robot that was built\n $record = array(\n 'date' => $data['assemble_date'],\n 'record_type' => \"Assemble\",\n 'info' => \"Parts info: head(\" . $data['head_ca'] . \") body(\" . $data['body_ca'] . \") foot(\" . $data['foot_ca'] . \")\"\n );\n $this->Records->insertRecord($record);\n $this->Robots->addBot($data);\n } else {\n echo \"invalid composition of parts, please try again\";\n die();\n }\n\n redirect($_SERVER['HTTP_REFERER']); // back where we came from\n }", "title": "" }, { "docid": "0b89555a042abb275eabe42c702b9fe1", "score": "0.51269895", "text": "function existen_cortes_control()\n\t{\n\t\t$cortes_activos = 0;\n\t\tif (is_null($this->_cortes_def)) {\t\t\t\t\t\t//Si no hay cortes procesados aun, tomo los definidos en base\n\t\t\t$cortes_activos = count($this->_info_cuadro_cortes);\n\t\t} elseif (! empty($this->_cortes_def)) {\n\t\t\t$datos_corte = reset($this->_cortes_def);\t\t\t//Ciclo por los cortes que se procesaron en la definicion\n\t\t\tdo {\n\t\t\t\tif ($datos_corte['habilitado'] == 1) {\t\t\t\t//Si el corte esta activo dejo de buscar.\n\t\t\t\t\t$cortes_activos++;\n\t\t\t\t}\n\t\t\t} while ($datos_corte = next($this->_cortes_def) && $cortes_activos == 0);\n\t\t}\n\t\treturn (($cortes_activos > 0) && !$this->_salida_sin_cortes);\n\t}", "title": "" }, { "docid": "4864c129201c349299ad7bdc7628e403", "score": "0.51248527", "text": "public function llamarAsesor(){\n $this->say(Constantes::MENSAJE_AYUDA_ASESOR);\n }", "title": "" }, { "docid": "30095258f776004b988073ba4fb4c431", "score": "0.5082531", "text": "public function robotsAction()\n\t{\n\t\tif (($path = Mage::helper('wordpress')->getWordPressPath()) !== false) {\n\t\t\t$robotsFile = $path . 'robots.txt';\n\n\t\t\tif (is_file($robotsFile) && is_readable($robotsFile)) {\n\t\t\t\tif ($robotsTxt = file_get_contents($robotsFile)) {\n\t\t\t\t\t$this->getResponse()->setHeader('Content-Type', 'text/plain;charset=utf8');\n\t\t\t\t\t$this->getResponse()->setBody($robotsTxt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!$this->getResponse()->getBody()) {\n\t\t\t$this->_forward('noRoute');\n\t\t}\n\t}", "title": "" }, { "docid": "f51572fd23f0e492515d0bb80ee1e06d", "score": "0.5080154", "text": "function agregarBotones(Mantenimientosdetablas $mantenimiento){\n $idMantenimiento=$mantenimiento->getIdMantenimientoDeTabla();\n \n if(isset($_SESSION[\"retornar_$idMantenimiento\"])){\n C::boton(\"Retornar\", \"Regresar\", \"onclick=\\\"window.location='\".$_SESSION[\"retornar_$idMantenimiento\"].\"'\\\"\");\n Campos::espaciosEnBlanco(5);\n }\n \n //Campos::boton(\"Exportar\", \"Exportar a Excel\",\"onclick=\\\"window.location=window.location+'&exportarAExcel=1';\\\"\");\n Campos::inicioGrupoBotones(\"grupoBotonesListado\");\n //Campos::botonColor(\"checkMto\", \"<i class='fa fa-square-o' aria-hidden='true'></i> &nbsp;\", C::$NEGRO);\n //Si existe el permiso para insertar agrego el boton\n if($mantenimiento->getPermisoInsert()===true){\n\n $url=obtenerVariablesRequest(\"\");\n\n if($mantenimiento->getRutaCaptura()!=''){\n if(strpos($mantenimiento->getRutaCaptura(),'?')===false){\n $url=\"?\".$url;\n }else{\n $url=\"&\".$url;\n }\n $url=$mantenimiento->getRutaCaptura().$url;\n }else{\n $url=\"/core/mantenimiento/capturaDeTabla.php?\".$url;\n }\n Campos::boton(\"Agregar\", \"<i class='fa fa-plus' aria-hidden='true'></i> Nuevo\",\"onclick=\\\"cargarContenido('$url');\\\"\");\n }else{\n Campos::botonColor(\"ADD_WRONG\",\"Agregar\", \"<i class='fa fa-plus' aria-hidden='true'></i> Nuevo\",C::$GRIS);\n }\n if($mantenimiento->getPermisoUpdate()===true){\n\n $url=obtenerVariablesRequest(\"\");\n\n if($mantenimiento->getRutaCaptura()!=''){\n if(strpos($mantenimiento->getRutaCaptura(),'?')===false){\n $url=\"?\".$url;\n }else{\n $url=\"&\".$url;\n }\n $url=$mantenimiento->getRutaCaptura().$url;\n }else{\n $url=\"/core/mantenimiento/capturaDeTabla.php?\".$url;\n }\n Campos::botonColor(\"Modificar\", \"<i class='fa fa-pencil' aria-hidden='true'></i> Modificar\", C::$VERDE,\" disabled='disabled' \");\n }else{\n Campos::botonColor(\"MOD_WRONG\", \"<i class='fa fa-pencil' aria-hidden='true'></i> Modificar\", C::$GRIS);\n }\n if($mantenimiento->getPermisoDelete()===true){\n\n $url=obtenerVariablesRequest(\"\");\n\n if($mantenimiento->getRutaCaptura()!=''){\n if(strpos($mantenimiento->getRutaCaptura(),'?')===false){\n $url=\"?\".$url;\n }else{\n $url=\"&\".$url;\n }\n $url=$mantenimiento->getRutaCaptura().$url;\n }else{\n $url=\"/core/mantenimiento/capturaDeTabla.php?\".$url;\n }\n Campos::botonColor(\"Eliminar\", \"<i class='fa fa-trash-o' aria-hidden='true'></i> Eliminar\",C::$ROJO,\"disabled='disabled' \");\n \n }else{\n Campos::botonColor(\"DEL_WRONG\", \"<i class='fa fa-trash-o' aria-hidden='true'></i> Eliminar\",C::$GRIS);\n \n }\n //Campos::botonColor(\"Auditoria\", \"<i class='fa fa-database' aria-hidden='true'></i> Revisar Auditoria\",C::$NARANJA,\" disabled='disabled' \");\n \n //Campos::botonColor(\"Exportar\", \"<i class='fa fa-file-excel-o' aria-hidden='true'></i> Exportar a Excel\",C::$VERDE,\"onclick=\\\"cargarContenido('$url');\\\"\");\n \n Campos::finGrupoBotones();\n}", "title": "" }, { "docid": "fb083eb914c5c4bf55920ca3b9668358", "score": "0.50766563", "text": "public function testCreate(): void\n {\n // Robots are created with a position and direction\n $robot = new Robot([0, 0], Robot::DIRECTION_NORTH);\n $this->assertEquals([0, 0], $robot->position);\n $this->assertEquals(Robot::DIRECTION_NORTH, $robot->direction);\n\n // Negative positions are allowed\n $robot = new Robot([-1, -1], Robot::DIRECTION_SOUTH);\n $this->assertEquals([-1, -1], $robot->position);\n $this->assertEquals(Robot::DIRECTION_SOUTH, $robot->direction);\n }", "title": "" }, { "docid": "ca3facf4e3709f34b0e5a8c3a3703fb5", "score": "0.50674057", "text": "public function bajarSonidoContraparte( ) {\n $this->setSonidoOn(self::$SONIDO_ENTRANTE, 0);\n }", "title": "" }, { "docid": "05869f6194683df6757b03adb3495b33", "score": "0.50662667", "text": "public function luzTechoPasilloApagar( ) {\n $this->techo_pasillo_on = 0;\n $this->actualizarNivelesTecho();\n$this->enviarIntensidadTechoPasillo();\n $this->enviarEstadoTechoPasillo();\n// $this->dibujarPantalla();\n }", "title": "" }, { "docid": "f00d8903b27228025a80449d66e79696", "score": "0.5052661", "text": "public function get_robots($sort = true){\n $filters = array('player_id' => $this->player_id);\n $player_robots = rpg_game::find_robots($filters);\n if ($sort){\n usort($player_robots, function($a, $b){\n if ($a->robot_position == 'active'){ return -1; }\n elseif ($b->robot_position == 'active'){ return 1; }\n elseif ($a->robot_key < $b->robot_key){ return -1; }\n elseif ($a->robot_key > $b->robot_key){ return 1; }\n else { return 0; }\n });\n }\n return $player_robots;\n }", "title": "" }, { "docid": "e07f8d6941fa3f323f76f96ada283e35", "score": "0.50510085", "text": "public function cumplirAnios(){\n echo \" --- no tengo idea cuando nací --- \";\n }", "title": "" }, { "docid": "50d7ce8686ca1508307eee7a5b0a9c78", "score": "0.5035996", "text": "public function robots()\n {\n $disallow_urls = [\n 'people-datatables' => route('api-v1-person.datatables',[],false),\n 'artist-datatables' => route('api-v1-artist.datatables',[],false),\n 'song-datatables' => route('api-v1-song.datatables',[],false),\n 'subject-like' => route('subject.like',['subject' => '*'],false),\n ];\n \n $resp = \"User-agent: *\";\n foreach($disallow_urls as $route => $url) {\n $resp .= \"\\nDisallow: $url\";\n }\n \n $headers = [\n 'Accept-Ranges' => 'bytes',\n 'Content-Length' => strlen($resp),\n 'Content-type' => 'text/plain',\n ];\n return response()->make($resp, 200, $headers);\n }", "title": "" }, { "docid": "ef7aa5f7bb8c8398a2200576994a440e", "score": "0.503559", "text": "private function enviarEstadoTodo() {\n if ($this->sala_on) {\n $cmd = new ComandoFlash(\"LUZ\", \"ENCENDER_TODAS\", \"\");\n }\n else {\n print_r($cmd);\n $cmd = new ComandoFlash(\"LUZ\", \"APAGAR_TODAS\", \"\");\n }\n $this->enviarPeticion($cmd);\n }", "title": "" }, { "docid": "899526ab198a96e7fa6d7d92f3f9a872", "score": "0.50313437", "text": "public function salir() {\n\n AccesoGui::$guiSistema->esperarSalirSistema();\n ////videocon.desconectar();\n AccesoControladoresDispositivos::$ctrlVideoconferencia->desconectar();\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarAudio(1,1);\n AccesoControladoresDispositivos::$ctrlFoco->apagar();\n //AccesoControladoresDispositivos::$ctrlDvdGrabador->pararGrabacionGrab();\n //try {\n // usleep(30);\n //}\n //catch (Exception $e) {\n //}\n AccesoControladoresDispositivos::$ctrlDvd->stopDVD();\n //AccesoControladoresDispositivos::$ctrlDvdGrabador->pararGrabacionGrab();\n $this->apagarDispositivos();\n try {\n usleep(3000);\n }\n catch (Exception $e) {\n }\n if(AccesoControladoresDispositivos::$ctrlAutomata->isLucesBloqueadas()==true)\n AccesoControladoresDispositivos::$ctrlAutomata->desbloquearLuces();\n try {\n usleep(3000);\n }\n catch (Exception $e) {\n }\n // mandar al automata comando para que desactive los bit que\n // corresponden a las filas de los ThienClient y Linea de\n // luces y subir Panntalla electrica\n AccesoControladoresDispositivos::$ctrlAutomata->principio();\n AccesoControladoresDispositivos::$ctrlLuzTecho->encenderLucesTecho();\n AccesoControladoresDispositivos::$ctrlAutomata->subirPantalla();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->reiniciarValores();\n AccesoGui::$guiSistema->salirSistema();\n AccesoGui::$guiSistema->esperarSalirSistema();\n\n try {\n usleep(3000);\n }\n catch (Exception $e) {\n }\n AccesoGui::$guiSistema->bienvenidaSistema(true);\n AccesoGui::$guiSistema->dibujarPantalla();\n }", "title": "" }, { "docid": "b38facc94f991e7734b85cc1aa360d4e", "score": "0.502568", "text": "public function buscar(){\n\t\t// si cedula no es vacía busca por cedula\n\t\tif (!empty($_POST['dui'])) {\n\t\t\t$lista_pacientes[]=Paciente::getByCedula($_POST['dui']);\n\t\t\t$botones=0;\n\t\t\trequire_once('Views/Paciente/show.php');\n\t\t}else{//si está vacía trae todos los registros\n\t\t\t$this->show();\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "8a519895f4dc1bdc6a001b5d324072d7", "score": "0.5025029", "text": "public static function get_starter_robots(){\n return array(\n 'default' => 'robot',\n 'dr-light' => 'mega-man',\n 'dr-wily' => 'bass',\n 'dr-cossack' => 'proto-man'\n );\n }", "title": "" }, { "docid": "55b03ea92ee2ccef0e0d64a707ac8e76", "score": "0.50163317", "text": "public function batimentos() {\n \n $this->batimentosSox();\n }", "title": "" }, { "docid": "c62ce40f7eb7d5703d9773e8aff4ec03", "score": "0.5015725", "text": "public function testPorcientos()\n {\n // $battle->\n\n\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "aafef5004cbf3e8a79e3791f05ddac0c", "score": "0.4987461", "text": "public function getRobotByStatus($status = \"Ready\")\n {\n if ($this->fakeData) {\n return [\n '000D6F000C469B5B'\n ];\n }\n \n $socketCLI = $this->createSocket($this->host, $this->port);\n /**\n * 1 get online robot\n * 2 check evey robot\n * which one have status = input status them add to array\n * 3 return array\n */\n $onlineRobots = $this->getOnlineRobot($socketCLI);\n if (count ($onlineRobots) == 0) {\n return [];\n }\n \n $result = [];\n $status = \"Ready\";\n \n foreach ($onlineRobots as $robot) {\n sleep(1);\n $mac = $robot['eui'];\n \n $rs = $this->GetStatusInfo($socketCLI, $mac);\n if (strpos($rs, $status)) {\n $result[] = $mac;\n }\n } \n $this->disconnect($socketCLI);\n return ['000D6F000C469B5B'];\n return $result;\n }", "title": "" }, { "docid": "b7a558857fc1a582dee863559c1a537c", "score": "0.49767104", "text": "static function activado()\r\n\t{\r\n\t\tif (is_array(self::$memoria) && count(self::$memoria)>0) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "6d5aa0dea342902d4121a7079613e9af", "score": "0.4949702", "text": "public function run()\n {\n// $this->offCommand['Living Room Light'] = new LightOffCommand($this->devices['Living Room Light']);\n//\n// $this->onCommand['Kitchen Light'] = new LightOnCommand($this->devices['Kitchen Light']);\n// $this->offCommand['Kitchen Light'] = new LightOffCommand($this->devices['Kitchen Light']);\n//\n// $this->onCommand['Living Room CeilingFan'] = new CeilingFanHighCommand($this->devices['Living Room CeilingFan']);\n// $this->offCommand['Living Room CeilingFan'] = new CeilingFanOffCommand($this->devices['Living Room CeilingFan']);\n//\n// $this->onCommand['GarageDoor'] = new GarageDoorUpCommand($this->devices['GarageDoor']);\n// $this->offCommand['GarageDoor'] = new GarageDoorDownCommand($this->devices['GarageDoor']);\n//\n// $this->onCommand['Living Room Stereo'] = new StereoOnCommand($this->devices['Living Room Stereo']);\n// $this->offCommand['Living Room Stereo'] = new StereoOffCommand($this->devices['Living Room Stereo']);\n//\n// $this->onCommand['Living Room TV'] = new TVOnCommand($this->devices['Living Room TV']);\n// $this->offCommand['Living Room TV'] = new TVOffCommand($this->devices['Living Room TV']);\n\n foreach ($_SESSION['power'] as $key => $value) {\n $this->remoteControl->setCommand($key, $this->onCommand[$key], $this->offCommand[$key]);\n }\n if (!empty($_GET)) {\n $this->checkButton($_GET);\n }\n\n require_once __DIR__ . \"/../public/views/index.html\";\n// echo \"<br>SESSION<br>\";\n// var_dump($_SESSION);\n// echo \"<br>GET<br>\";\n// var_dump($_GET);\n\n// echo \"<br>RemoteLoader:<br>\";\n// var_dump($this);\n// die();\n }", "title": "" }, { "docid": "f9036227d37e52f1568c343e7f4d402c", "score": "0.49296758", "text": "public function estadoPantalla( ) {\n\n //zertarako sortu bidaltzen ez bada?????\n if ($this->sala_on) {\n\n\n $cmd = new ComandoFlash(\"LUZ\", \"ENCENDER_TODAS\", \"\");\n }\n else {\n print_r($cmd);\n\n $cmd = new ComandoFlash(\"LUZ\", \"APAGAR_TODAS\", \"\");\n }\n\n $this->enviarPeticion($cmd);\n $cmd = new ComandoFlash(\"LUZ\", \"TECHO\", $this->getValorOnOff($this->techo_on));\n\n $this->enviarPeticion($cmd);\n $cmd = new ComandoFlash(\"LUZ\", \"SUELO\", $this->getValorOnOff($this->suelo_on));\n\n $this->enviarPeticion($cmd);\n $cmd = new ComandoFlash(\"LUZ\", \"TECHO:PRESI\",$this->getValorOnOff($this->techo_presidencia_on));\n\n $this->enviarPeticion($cmd);\n $cmd = new ComandoFlash(\"LUZ\", \"TECHO:PASILLO\", $this->getValorOnOff($this->techo_pasillo_on));\n\n $this->enviarPeticion($cmd);\n $cmd = new ComandoFlash(\"LUZ\", \"TECHO:ALUMNOS\", $this->getValorOnOff($this->techo_alumnos_on));\n\n $this->enviarPeticion($cmd);\n $cmd = new ComandoFlash(\"LUZ\", \"SUELO:PASILLO\", $this->getValorOnOff($this->suelo_pasillo_on));\n\n $this->enviarPeticion($cmd);\n\n $cmd = new ComandoFlash(\"LUZ\", \"SUELO:ALUMNOS\", $this->getValorOnOff($this->suelo_alumnos_on));\n\n $this->enviarPeticion($cmd);\n\n $cmd = new ComandoFlash(\"LUZ\", \"TECHO:PRESI\",$this->nivel_techo_presidencia);\n\n $this->enviarPeticion($cmd);\n\n $cmd = new ComandoFlash(\"LUZ\", \"TECHO:PASILLO\",$this->nivel_techo_pasillo);\n\n $this->enviarPeticion($cmd);\n\n $cmd = new ComandoFlash(\"LUZ\", \"TECHO:ALUMNOS\",$this->nivel_techo_alumnos);\n\n $this->enviarPeticion($cmd);\n\n $cmd = new ComandoFlash(\"LUZ\", \"SUELO:PASILLO\", $this->nivel_suelo_pasillo);\n\n $this->enviarPeticion($cmd);\n\n $cmd = new ComandoFlash(\"LUZ\", \"SUELO:ALUMNOS\", $this->nivel_suelo_alumnos);\n print_r($cmd);\n\n $this->enviarPeticion($cmd);\n\n }", "title": "" }, { "docid": "86fff0a4e9208611cf144efee95525f5", "score": "0.49211645", "text": "public function get_robots_active($sort = true){\n $filters = array('player_id' => $this->player_id, 'robot_status' => 'active');\n $player_robots = rpg_game::find_robots($filters);\n if ($sort){\n usort($player_robots, function($a, $b){\n if ($a->robot_position == 'active'){ return -1; }\n elseif ($b->robot_position == 'active'){ return 1; }\n elseif ($a->robot_key < $b->robot_key){ return -1; }\n elseif ($a->robot_key > $b->robot_key){ return 1; }\n else { return 0; }\n });\n }\n return $player_robots;\n }", "title": "" }, { "docid": "1d7bb11ebfc421560ed560d02319795b", "score": "0.49140197", "text": "function isBot() {\n\n\t$res = 0;\n\t$agent = strtolower($_SERVER[\"HTTP_USER_AGENT\"]);\n\n\tif (!(strpos($agent, \"googlebot\") === false))\t\t$res=1; // Google\n\tif (!(strpos($agent, \"scooter\") === false))\t\t\t$res=1; // Altavista\n\tif (!(strpos($agent, \"altavista\") === false))\t\t$res=1; // Altavista UK\n\tif (!(strpos($agent, \"webcrawler\") === false))\t\t$res=1; // AllTheWeb\n\tif (!(strpos($agent, \"architextspider\") === false))\t$res=1; // Excite\n\tif (!(strpos($agent, \"slurp\") === false))\t\t\t$res=1; // Inktomi\n\tif (!(strpos($agent, \"iltrovatore\") === false))\t\t$res=1; // Il Trovatore\n\tif (!(strpos($agent, \"ultraseek\") === false))\t\t$res=1; // Infoseek\n\tif (!(strpos($agent, \"lookbot\") === false))\t\t\t$res=1; // look.com\n\tif (!(strpos($agent, \"mantraagent\") === false))\t\t$res=1; // looksmart.com\n\tif (!(strpos($agent, \"lycos_spider\") === false))\t$res=1; // Lycos\n\tif (!(strpos($agent, \"msnbot\") === false))\t\t\t$res=1; // Msn Search (the hated)\n\tif (!(strpos($agent, \"shinyseek\") === false))\t\t$res=1; // ShinySeek\n\tif (!(strpos($agent, \"robozilla\") === false))\t\t$res=1; // dmoz.org\n\n\treturn $res;\n}", "title": "" }, { "docid": "722d48be45b4d485ec6a8b6fc985c1c3", "score": "0.49091193", "text": "public function run()\n {\n $libros = [\n ['IDLibro' => null,\n 'Autor' => 'James Dashner',\n 'Descripcion' => '«Bienvenido al bosque. Verás que una vez a la semana, siempre el mismo día y a la misma hora, nos llegan víveres. Una vez al mes, siempre el mismo día y a la misma hora, aparece un nuevo chico, como tú. Siempre un chico. Como ves, este lugar está cercado por muros de piedra… Has de saber que estos muros se abren por la mañana y se cierran por la noche, siempre a la hora exacta. Al otro lado se encuentra el laberinto. De noche, las puertas se cierran… y, si quieres sobrevivir, no debes estar allí para entonces».\n\n Todo sigue un orden… y, sin embargo, al día siguiente suena una alarma. Significa que ha llegado alguien más. Para asombro de todos, es una chica. Su llegada vendrá acompañada de un mensaje que cambiará las reglas del juego.\n \n ¿Y si un día abrieras los ojos y te vieses en un lugar desconocido sin saber nada más que tu nombre?\n \n Cuando Thomas despierta, se encuentra en una especie de ascensor. No recuerda qué edad tiene, quién es ni cómo es su rostro. Sólo su nombre.\n \n De pronto, el ascensor da un zarandeo y se detiene. Las puertas se abren y una multitud de rostros le recibe. «Bienvenido al Claro -dice uno de los adolescentes-. Aquí es donde vivimos. Esta es nuestra casa. Fuera está el laberinto. Yo soy Alby; él, Newt. Y tú eres el primero desde que mataron a Nick».',\n 'Nombre' => 'El corredor del laberinto',\n 'Genero' => 'Ciencia-Ficcion',\n 'ISBN' => 9788493801311],\n\n ['IDLibro' => null,\n 'Autor' => 'James Dashner',\n 'Descripcion' => 'EL LABERINTO ERA SÓLO EL PRINCIPIO.\n Resolver el laberinto se suponía que era el final. No más pruebas, no más huidas. Thomas creía que salir significaba que todos recobrarían sus vidas, pero ninguno sabía a qué clase de vida estaban volviendo.\n Árida y carbonizada, gran parte de la tierra es un territorio inservible. El sol abrasa, los gobiernos han caído y una misteriosa enfermedad se ha ido apoderando poco a poco de la gente. Sus causas son desconocidas; su resultado, la locura.\n En un lugar infestado de miseria y ruina, y por donde la gente ha enloquecido y deambula en busca de víctimas, Thomas conoce a una chica, Brenda, que asegura haber contraído la enfermedad y estar a punto de sucumbir a sus efectos. Entretanto, Teresa ha desaparecido, la organización CRUEL les ha dejado un mensaje, un misterioso chico ha llegado y alguien ha tatuado unas palabras en los cuellos de los clarianos. La de Minho dice «el líder»; la de Thomas, «el que debe ser asesinado».',\n 'Nombre' => 'Las pruebas',\n 'Genero' => 'Ciencia-Ficcion',\n 'ISBN' => 9788493920005],\n\n ['IDLibro' => null,\n 'Autor' => 'James Dashner',\n 'Descripcion' => '«MÁTAME. SI ALGUNA VEZ HAS SIDO MI AMIGO, MÁTAME».\n Desde hace tres semanas, Thomas vive en una habitación sin ventanas, de un blanco resplandeciente y siempre iluminada. Sin reloj y sin contacto con nadie, más allá de las tres bandejas de comida que alguien le lleva a diario (aunque a horas distintas, como para desorientarle).\n \n Al vigésimo sexto día, la puerta se abre y un hombre le conduce a una sala llena de viejos amigos.\n \n —Muy bien, damas y caballeros. Estáis a punto de recuperar todos vuestros recuerdos. Hasta el último de ellos.',\n 'Nombre' => 'La cura mortal',\n 'Genero' => 'Ciencia-Ficcion',\n 'ISBN' => 9788493975036],\n\n ['IDLibro' => null,\n 'Autor' => 'J. K. Rowling',\n 'Descripcion' => 'Harry Potter se ha quedado huérfano y vive en casa de sus abominables tíos y el insoportable primo Dudley. Harry se siente muy triste y solo, hasta que un buen día recibe una carta que cambiará su vida para siempre. En ella le comunican que ha sido aceptado como alumno en el Colegio Hogwarts de Magia. A partir de ese momento, la suerte de Harry da un vuelco espectacular. En esa escuela tan especial aprenderá encantamientos, trucos fabulosos y tácticas de defensa contra las malas artes. Se convertirá en el campeón escolar de Quidditch, especie de fútbol aéreo que se juega montado sobre escobas, y hará un puñado de buenos amigos... aunque también algunos temibles enemigos. Pero, sobre todo, conocerá los secretos que le permitirán cumplir su destino. Pues, aunque no lo parezca a primera vista, Harry no es un chico común y corriente: ¡es un verdadero mago!',\n 'Nombre' => 'Harry Potter y la Piedra Filosofal',\n 'Genero' => 'Fantasia',\n 'ISBN' => 9780439554930],\n\n ['IDLibro' => null,\n 'Autor' => 'J. K. Rowling',\n 'Descripcion' => 'Tras derrotar una vez más a lord Voldemort, su siniestro enemigo en Harry Potter y la piedra filosofal, Harry espera impacientemente en casa de sus insoportables tíos el inicio del segundo curso del Colegio Hogwarts de Magia y Hechicería. Sin embargo, la espera dura poco, pues un elfo aparece en su habitación y le advierte que una amenaza mortal se cierne sobre la escuela. Así pues, Harry no se lo piensa dos veces y, acompañado de Ron, su mejor amigo, se dirige a Hogwarts en un coche volador. Pero ¿puede un aprendiz de mago defender la escuela de los malvados que pretenden destruirla? Sin saber que alguien ha abierto la Cámara de los Secretos, dejando escapar una serie de monstruos peligrosos, Harry y sus amigos Ron y Hermione tendrán que enfrentarse con arañas gigantes, serpientes encantadas, fantasmas enfurecidos y, sobre todo, con la mismísima reencarnación de su más temible adversario.',\n 'Nombre' => 'Harry Potter y la Camara Secreta',\n 'Genero' => 'Fantasia',\n 'ISBN' => 9788478884957],\n\n ['IDLibro' => null,\n 'Autor' => 'J. K. Rowling',\n 'Descripcion' => 'Por la cicatriz que lleva en la frente, sabemos que Harry Potter no es un niño como los demás, sino el héroe que venció a lord Voldemort, el mago más terrible y maligno de todos los tiempos y culpable de la muerte de los padres de Harry. Desde entonces, Harry no tiene más remedio que vivir con sus pesados tíos y su insoportable primo Dudley, todos ellos muggles, o sea, personas no magas, que desprecian a su sobrino debido a sus poderes.\n Igual que en las dos primeras partes de la serie -La piedra filosofal y La cámara secreta- Harry aguarda con impaciencia el inicio del tercer curso en el Colegio Hogwarts de Magia y Hechicería. Tras haber cumplido los trece años, solo y lejos de sus amigos de Hogwarts, Harry se pelea con su bigotuda tía Marge, a la que convierte en globo, y debe huir en un autobús mágico. Mientras tanto, de la prisión de Azkaban se ha escapado un terrible villano, Sirius Black, un asesino en serie con poderes mágicos que fue cómplice de lord Voldemort y que parece dispuesto a eliminar a Harry del mapa. Y por si esto fuera poco, Harry deberá enfrentarse también a unos terribles monstruos, los dementores, seres abominables capaces de robarles la felicidad a los magos y de borrara todo recuerdo hermoso de aquellos que osan mirarlos. Lo que ninguno de estos malvados personajes sabe es que Harry, con la ayuda de sus fieles amigos Ron y Hermione, es capaz de todo y mucho más.',\n 'Nombre' => 'Harry Potter y el Prisionero de Azkaban',\n 'Genero' => 'Fantasia',\n 'ISBN' => 9788478885190],\n\n ['IDLibro' => null,\n 'Autor' => 'J. K. Rowling',\n 'Descripcion' => 'Tras otro abominable verano con los Dursley, Harry se dispone a iniciar el cuarto curso en Hogwarts, la famosa escuela de magia y hechicería. A sus catorce años, a Harry le gustaría ser un joven mago como los demás y dedicarse a aprender nuevos sortilegios, encontrarse con sus amigos Ron y Hermione y asistir con ellos a los Mundiales de quidditch. Sin embargo, al llegar al colegio le espera una gran sorpresa que lo obligará a enfrentarse a los desafíos más temibles de toda su vida. Si logra superarlos, habrá demostrado que ya no es un niño y que está preparado para vivir las nuevas y emocionantes experiencias que el futuro le depara.',\n 'Nombre' => 'Harry Potter y el Cáliz de Fuego',\n 'Genero' => 'Fantasia',\n 'ISBN' => 9788478886647],\n\n ['IDLibro' => null,\n 'Autor' => 'J. K. Rowling',\n 'Descripcion' => 'Las tediosas vacaciones en casa de sus tíos todavía no han acabado y Harry Potter se encuentra más inquieto que nunca. Apenas ha tenido nocitias de Ron y Hermiones, y presiente que algo extraño está sucediendo en Hogwarts. En efecto, cuando por fin comienza otro curso en el famoso colegio de magia y hechicería, sus temores se vuelven realidad. El Ministerio de Magia niega que Voldemort haya regresado y ha iniciado una campaña de desprestigio contra Harry Pottery Dumbledore, para lo cual ha asignado a la horrible profesora Dolores Umbridge la tarea de vigilar todos sus movimientos. Así pues, además de sentirse solo e incomprendido, Harry sospecha que Voldemort puede adivinar sus pensamientos, e intuye que el temible mago trata de apoderarse de un objeto secreto que le permitiría recuperar su poder destructivo.',\n 'Nombre' => 'Harry Potter y la Orden del Fénix',\n 'Genero' => 'Fantasia',\n 'ISBN' => 9788478888849],\n\n ['IDLibro' => null,\n 'Autor' => 'J. K. Rowling',\n 'Descripcion' => 'Con dieciséis años cumplidos, Harry Potter inicia el sexto curso en Hogwarts en medio de terribles acontecimientos que asolan Inglaterra. Elegido capitán del equipo de Quidditch, los entrenamientos, los exámenes y las chicas ocupan todo su tiempo, pero la tranquilidad dura poco. A pesar de los férreos controles de seguridad que protegen la escuela, dos alumnos son brutalmente atacados. Dumbledore sabe que se acerca el momento, anunciado por la Profecía, en que Harry Potter y Voldemort se enfrentarán a muerte: «El único con poder para vencer al Señor Tenebroso se acerca... Uno de los dos debe morir a manos del otro, pues ninguno de los dos podrá vivir mientras siga el otro con vida.». El anciano director solicitará la ayuda de Harry y juntos emprenderán peligrosos viajes para intentar debilitar al enemigo, para lo cual el joven mago contará con la ayuda de un viejo libro de pociones perteneciente a un misterioso príncipe, alguien que se hace llamar Príncipe Mestizo.',\n 'Nombre' => 'Harry Potter y el misterio del príncipe',\n 'Genero' => 'Fantasia',\n 'ISBN' => 9788478889938],\n\n ['IDLibro' => null,\n 'Autor' => 'J. K. Rowling',\n 'Descripcion' => 'La fecha crucial se acerca. Cuando cumpla diecisiete años, Harry perderá el encantamiento protector que lo mantiene a salvo. El anunciado enfrentamiento a muerte con lord Voldemort es inminente, y la casi imposible misión de encontrar y destruir los restantes Horrocruxes más urgente que nunca. Ha llegado la hora final, el momento de tomar las decisiones más difíciles. Harry debe abandonar la calidez y seguridad de La Madriguera para seguir sin miedo ni vacilaciones el inexorable sendero trazado para él. Consciente de lo mucho que está en juego, sólo dentro de sí mismo encontrará la fuerza necesaria que lo impulse en la vertiginosa carrera para enfrentarse con su destino.',\n 'Nombre' => 'Harry Potter y las Reliquias de la Muerte',\n 'Genero' => 'Fantasia',\n 'ISBN' => 9788498381450],\n\n ['IDLibro' => null,\n 'Autor' => 'Suzanne Collins',\n 'Descripcion' => 'EL MUNDO ESTARÁ OBSERVANDO\n\n GANAR SIGNIFICA FAMA Y RIQUEZA.\n PERDER SIGNIFICA UNA MUERTE SEGURA.\n \n Es una oscura versión del futuro próximo, doce chicos y doce chicas se ven obligados a participar en un reality show llamados Los Juegos del Hambre. Solo hay una regla: matar o morir.\n \n Cuando Katniss Everdeen, una joven de dieciséis años, se presenta voluntaria para ocupar el lugar de su hermana en los juegos, lo entiende como una condena a muerte. Sin embargo, Katniss ya ha visto la muerte de cerca; y la supervivencia forma parte de su naturaleza.\n \n ¡QUE EMPIECEN LOS SEPTUAGÉSIMO CUARTOS JUEGOS DEL HAMBRE!',\n 'Nombre' => 'Los Juegos Del Hambre',\n 'Genero' => 'Ficcion',\n 'ISBN' => 9789581414444],\n\n ['IDLibro' => null,\n 'Autor' => 'Suzanne Collins',\n 'Descripcion' => 'Contra todo prónostico, Katniss ha ganado Los Juegos del Hambre. Es un milagro que ella y su compañero del Distrito 12, Peeta Mellark, sigan vivos. Katniss debería sentirse aliviada, incluso contenta, ya que, al fin y al cabo, ha regresado con su familia y su amigo de toda la vida, Gale. Sin embargo, nada es como a ella le gustaría. Gale guarda las distancias y Peeta le ha dado la espalda por completo. Además se rumorea que existe una rebelión contra el Capitolio...',\n 'Nombre' => 'En llamas',\n 'Genero' => 'Ficcion',\n 'ISBN' => 9788427200005],\n\n ['IDLibro' => null,\n 'Autor' => 'Suzanne Collins',\n 'Descripcion' => 'Katnis Everdeen ha sobrevivido dos veces a Los Juegos del Hambre, pero no está a salvo. La revolución se extiende y, al parecer, todos han tenido algo que ver en el meticuloso plan, todos excepto Katniss. Aun así su papel en la batalla final es el más importante de todos. Katniss debe convertirse en el Sinsajo, en el símbolo de la rebelión... a cualquier precio.',\n 'Nombre' => 'Sinsajo',\n 'Genero' => 'Ficcion',\n 'ISBN' => 9788427200388],\n\n ['IDLibro' => null,\n 'Autor' => 'Stephen King',\n 'Descripcion' => '¿Quién o qué mutila y mata a los niños de un pequeño pueblo norteamericano? ¿Por qué llega cíclicamente el horror a Derry en forma de un payaso siniestro que va sembrando la destrucción a su paso? Esto es lo que se proponen averiguar los protagonistas de esta novela. Tras veintisiete años de tranquilidad y lejanía, una antigua promesa infantil les hace volver al lugar en el que vivieron su infancia y juventud como una terrible pesadilla. Regresan a Derry para enfrentarse con su pasado y enterrar definitivamente la amenaza que los amargó durante su niñez. Saben que pueden morir, pero son conscientes de que no conocerán la paz hasta que aquella cosa sea destruida para siempre.',\n 'Nombre' => 'It (Eso)',\n 'Genero' => 'Horror',\n 'ISBN' => 9788497593793],\n\n ['IDLibro' => null,\n 'Autor' => 'Robert Louis Stevenson',\n 'Descripcion' => 'Cuando el joven Jim Hawkins encuentra el mapa de una isla desierta en la que se ha escondido un tesoro, recurre a influyentes amigos para fletar la Hispaniola y emprender el viaje. Cuenta con su audacia, la experiencia del capitán Smollet y la inteligencia del doctor Livesey. Pero la tripulación está formada por una banda de filibusteros a las órdenes de John Silver, un verdadero pirata sanguinario que codicia el mismo tesoro.',\n 'Nombre' => 'La isla del tesoro',\n 'Genero' => 'Clasicos',\n 'ISBN' => 9788496246089],\n\n ['IDLibro' => null,\n 'Autor' => 'Orson Scott Card',\n 'Descripcion' => 'La Tierra se ve amenazada por una especie extraterrestre de insectos, seres que se comunica telepáticamente y que se consideran totalmente distintos de los humanos, a los que quieren destruir. Para vencerlos, la humanidad necesita un genio militar, y por ello se permite el nacimiento de Ender, que es el tercer hijo de una pareja en un mundo que ha limitado estrictamente a dos el número de descendientes.\n\n Ender nace para ser entrenado en una estación espacial después de que su hermana mayor y su sádico hermano Peter hayan sido declarados no aptos. Los jóvenes se distribuyen en grupos que compiten entre sí, en gravedad cero, con armas que paralizan sus armaduras. Ender asciende rápidamente en la jerarquía de la estación y se convierte en un líder nato, en la persona capaz de dirigir a las flotas terrestres contra los insectos de otros mundos.',\n 'Nombre' => 'El juego de Ender',\n 'Genero' => 'Ciencia-Ficcion',\n 'ISBN' => 9788466616898],\n\n ['IDLibro' => null,\n 'Autor' => 'George Orwell',\n 'Descripcion' => 'En el año 1984 Londres es una ciudad lúgubre en la que la Policía del Pensamiento controla de forma asfixiante la vida de los ciudadanos. Winston Smith es un peón de este engranaje perverso, su cometido es reescribir la historia para adaptarla a lo que el Partido considera la versión oficial de los hechos... hasta que decide replantearse la verdad del sistema que los gobierna y somete.',\n 'Nombre' => '1984',\n 'Genero' => 'Clasicos',\n 'ISBN' => 9781471331435],\n\n ['IDLibro' => null,\n 'Autor' => 'Emily Brontë',\n 'Descripcion' => 'La poderosa y hosca figura del atormentado Heathcliff domina Cumbres Borrascosas, novela apasionada y tempestuosa cuya sensibilidad se adelantó a su tiempo. Los brumosos y sombríos páramos de Yorkshire son el singular escenario donde se desarrolla con fuerza arrebatadora esta historia de venganza y odio, de pasiones desatadas y amores desesperados que van más allá de la muerte y que hacen de ella una de las obras más singulares y atractivas de todos los tiempos.',\n 'Nombre' => 'Cumbres Borrascosas',\n 'Genero' => 'Clasicos',\n 'ISBN' => 9788633300056]\n ];\n \n foreach ($libros as $libro) {\n DB::table('libro')->insert([\n 'IDLibro' => $libro['IDLibro'],\n 'Autor' => $libro['Autor'],\n 'Descripcion' => $libro['Descripcion'],\n 'Nombre' => $libro['Nombre'],\n 'Genero' => $libro['Genero'],\n 'ISBN' => $libro['ISBN']\n ]);\n }\n }", "title": "" }, { "docid": "a24c1cbdc8ae4edba367568b17c06363", "score": "0.49067092", "text": "public function testIgnoreMoveCommandIfItThrowsRobotOffGrid()\n {\n $expected_state = [];\n //start at 0,0,south\n $this->game->initialize('PLACE 0,0,south');\n $this->robot->move();\n $this->assertEquals('0,0,SOUTH', $this->robot->report());\n\n //start at 0,0,west\n $this->game->initialize('PLACE 0,0,west');\n $this->robot->move();\n $this->assertEquals('0,0,WEST', $this->robot->report());\n\n // start at 0,4,north\n $this->game->initialize('PLACE 0,4,north');\n $this->robot->move();\n $this->assertEquals('0,4,NORTH', $this->robot->report());\n\n // start at 0,4,west\n $this->game->initialize('PLACE 0,4,west');\n $this->robot->move();\n $this->assertEquals('0,4,WEST', $this->robot->report());\n\n // start at 4,4,north\n $this->game->initialize('PLACE 4,4,north');\n $this->robot->move();\n\n $this->assertEquals('4,4,NORTH', $this->robot->report());\n // start at 4,4,east\n $this->game->initialize('PLACE 4,4,east');\n $this->robot->move();\n $this->assertEquals('4,4,EAST', $this->robot->report());\n\n // start at 4,0,est\n $this->game->initialize('PLACE 4,0,east');\n $this->robot->move();\n $this->assertEquals('4,0,EAST', $this->robot->report());\n // start at 4,0,south\n $this->game->initialize('PLACE 4,0,south');\n $this->robot->move();\n $this->assertEquals('4,0,SOUTH', $this->robot->report());\n }", "title": "" }, { "docid": "8de90d43c09312c4fa63da8695a17382", "score": "0.49044892", "text": "public function buscar_t1($criterio)\n {\n try { \n $barato = array();\n $criterio_anterior = $criterio;\n\n $cliente = new Client();\n $cliente->setServerParameter('HTTP_USER_AGENT', 'user agent');\n\n $crawler = $cliente->request('GET', 'https://www.sivasdescalzo.com/es/catalogsearch');\n $form = $crawler->selectButton('Search')->form();\n $page = $cliente->submit($form, ['q' => $criterio]);\n\n $page->filter('.grid-col')->each(function ($item) {\n $producto = array();\n $marca = $item->filter('.product-card__title a')->text();\n $modelo = $item->filter('.product-item-link')->text();\n $precio = $item->filter('.price')->text();\n $precio = trim($precio);\n $precio = str_replace(',', '.', $precio);\n $precio = floatval($precio);\n $imagen = $item->filter('img.product-image-photo')->attr('src');\n\n $producto['marca'] = $marca;\n $producto['modelo'] = $modelo;\n $producto['precio'] = $precio;\n $producto['imagen'] = $imagen;\n $this->productos1[] = $producto;\n });\n\n foreach ($this->productos1 as $producto) {\n $marca = strtolower($producto['marca']);\n $modelo = explode(\" \", strtolower($producto['modelo'])); \n $criterio = explode(\" \", strtolower($criterio_anterior));\n $criterio_nomarca =array_diff($criterio,[$marca]);\n $modelo_bool = true;\n\n foreach ($criterio_nomarca as $elm_criterio) {\n if(!in_array($elm_criterio, $modelo)){\n $modelo_bool=false;\n break;\n }\n }\n\n if (in_array($marca, $criterio) && $modelo_bool) {\n if (empty($barato)) {\n $barato = $producto;\n } else {\n if ($producto['precio'] < $barato['precio']) {\n unset($barato);\n $barato = $producto;\n }\n }\n } \n }\n\n return $barato;\n } catch (Exception $ex) {\n return false;\n }\n }", "title": "" }, { "docid": "b0a0755f946b3173d363cad9e1422928", "score": "0.4901033", "text": "public function testIfWheelWorks(){\n \t$this->gumballMachineInstance->setGumballs(100);\n\n \t// ... And we turn the wheel once...\n \t$this->gumballMachineInstance->turnWheel();\n\n \t// ... we should now have 99 gumballs remaining in the machine right?\n \t$this->assertEquals(99, $this->gumballMachineInstance->getGumballs()); \n }", "title": "" }, { "docid": "073b4044da9b78ec7365bf0d413b8c89", "score": "0.48859996", "text": "public function testRobotsReturnsOk() {\n $this->drupalGet('robots.txt');\n $this->assertSession()->statusCodeEquals(200);\n }", "title": "" }, { "docid": "2013fa0421f2a2771fa302711ba5881f", "score": "0.48808548", "text": "function BotOpped()\n{\n if (isset($GLOBALS['BOT_OPPED'])) {\n return true;\n } else { \n return false;\n }\n}", "title": "" }, { "docid": "11f68a9e5896b20fd0092d6ebffbf96d", "score": "0.48753333", "text": "public function testRobotCanTurnLeft()\n {\n $this->game->initialize('PLACE 2,2,north');\n // turn robot left and check for direction\n $this->robot->turnLeft();\n $this->assertEquals($this->robot->getDirection(), 'west');\n\n $this->robot->turnLeft();\n $this->assertEquals($this->robot->getDirection(), 'south');\n\n $this->robot->turnLeft();\n $this->assertEquals($this->robot->getDirection(), 'east');\n\n $this->robot->turnLeft();\n $this->assertEquals($this->robot->getDirection(), 'north');\n }", "title": "" }, { "docid": "c2d61085a9371724f40d70abb7a6cf34", "score": "0.4873962", "text": "public function luzTechoPasilloEncender( ) {\n $this->techo_pasillo_on = 1;\n $this->actualizarNivelesTecho();\n$this->enviarIntensidadTechoPasillo();\n $this->enviarEstadoTechoPasillo();\n// $this->dibujarPantalla();\n }", "title": "" }, { "docid": "7c088fd00ce1fc86675b21ac574fcb6f", "score": "0.48619542", "text": "function mostrar_observaciones()\n\t{\n\t\t$this->consola->mensaje(\"INVOCACION: toba doc OPCION\");\n\t\t$this->consola->enter();\n\t}", "title": "" }, { "docid": "72b56d423c7a1957a97d86ce4dffd507", "score": "0.48495924", "text": "function hay_seleccion()\n\t{\n\t\treturn (! empty($this->_clave_seleccionada));\n\t}", "title": "" }, { "docid": "a3d821841f54f638a9b98b52f056d1e2", "score": "0.48382726", "text": "public function testMobitelPovezanTrgovinom2()\n {\n // dohvati prvi mobitel koji postoji u trgovinama\n $mobile_id = Mobitel::has('trgovine')->first()->id;\n\n // Dohvati prvi mobitel koji postoji u trgovinama te ispisi samo trgovine koje imaju adresu\n $adr_id = Mobitel::has('trgovine')->first()->trgovine()->has('adresa')->first()->adresa()->first()->id;\n\n // uz pomoc adrese preko trgovine dodji do mobitela\n $seek_mobile = Adresa::find($adr_id)->trgovine()->first()->mobiteli()->find($mobile_id)->id;\n\n $this->assertEquals($mobile_id, $seek_mobile, 'Tocno jedna adresa');\n }", "title": "" }, { "docid": "21f0bbc1a2738d90caa5379ae8711954", "score": "0.48342583", "text": "public function testRobotCanTurnRight()\n {\n $this->game->initialize('PLACE 2,2,north');\n\n // turn robot right and check for direction\n $this->robot->turnRight();\n $this->assertEquals($this->robot->getDirection(), 'east');\n\n $this->robot->turnRight();\n $this->assertEquals($this->robot->getDirection(), 'south');\n\n $this->robot->turnRight();\n $this->assertEquals($this->robot->getDirection(), 'west');\n\n $this->robot->turnRight();\n $this->assertEquals($this->robot->getDirection(), 'north');\n }", "title": "" }, { "docid": "9b6d754f6009a6187315f64b60f98668", "score": "0.48318493", "text": "public function buscar(){\n\t\t// si el campo numero no es vació\n\t\tif (!empty($_POST['dni'])) {\n\t\t\t$lista_solicitantes[]=Solicitante::getByDni($_POST['dni']);\n\t\t\t$botones=0;\t\t\t\n\t\t\trequire_once('Views/Solicitante/show.php');\n\t\t}else{//si está vacía trae todos los registros\n\t\t\t$this->show();\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "0dcee9ac93264e0088703711b0750658", "score": "0.48293898", "text": "public function search() {\n\t\t\t$motclef= strtolower($_POST[\"mot_clef\"]);\n\t\t\t$srchConsole=$_POST[\"choiceconsole\"];\n\t\t\t$srchRayon=$_POST[\"choicerayon\"];\n\t\t\t$class = get_called_class();\n\t\t\t$table = strtolower($class);\n\t\t\tif($srchConsole == \"console\")\n\t\t\t{\n\t\t\t\tif($srchRayon == \"rayon\"){\n\t\t\t\t\t//console - et rayon -\n\t\t\t\t\t$st = db()->prepare(\"select * from t_e_jeuvideo_jeu j where (lower(jeu_nom) like '%\".$motclef.\"%') or (jeu_id in (select w.jeu_id from t_e_motcle_mot w where lower(w.mot_mot) like '%\".$motclef.\"%'))\"); \n\t\t\t\t}else{\n\t\t\t\t\t//console - et rayon +\n\t\t\t\t\t$st = db()->prepare(\"select * from t_e_jeuvideo_jeu j join t_r_console_con c on c.con_id = j.con_id join t_j_jeurayon_jer v on v.jeu_id = j.jeu_id join t_r_rayon_ray r on r.ray_id=v.ray_id where (lower(jeu_nom) like '%\".$motclef.\"%' or j.jeu_id in (select w.jeu_id from t_e_motcle_mot w where lower(w.mot_mot) like '%\".$motclef.\"%')) and ray_nom like '%\".$srchRayon.\"%'\");\n\t\t\t\t}\n\t\t\t}else{ \n\t\t\t\t\n\t\t\t\tif($srchRayon == \"rayon\"){\n\t\t\t\t\t//console + et rayon -\n\t\t\t\t\t$st = db()->prepare(\"select * from t_e_jeuvideo_jeu j join t_r_console_con c on c.con_id = j.con_id where (lower(jeu_nom) like '%\".$motclef.\"%' or j.jeu_id in (select w.jeu_id from t_e_motcle_mot w where lower(w.mot_mot) like '%\".$motclef.\"%')) and con_nom like '%\".$srchConsole.\"%'\"); \n\t\t\t\t}else{\n\t\t\t\t\t//console + et rayon +\n\t\t\t\t\t$st = db()->prepare(\"select * from t_e_jeuvideo_jeu j join t_r_console_con c on c.con_id = j.con_id join t_j_jeurayon_jer v on v.jeu_id = j.jeu_id join t_r_rayon_ray r on r.ray_id=v.ray_id where (lower(jeu_nom) like '%\".$motclef.\"%' or j.jeu_id in (select w.jeu_id from t_e_motcle_mot w where lower(w.mot_mot) like '%\".$motclef.\"%')) and ray_nom like '%\".$srchRayon.\"%' and con_nom like '%\".$srchConsole.\"%'\");\n\t\t\t\t}\n\t\t\t\t//join t_e_motcle_mot w on w.jeu_id=j.jeu_id \"lower(mot_mot) like '\".$motclef.\"'\"\n\t\t\t\t\n\t\t\t}\n\t\t\t$st->execute();\n\t\t\t$list = array();\n\t\t\twhile($row = $st->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t$list[] = new T_e_jeuvideo_jeu($this->_jeu_id = $row[\"jeu_id\"]);\n\t\t\t}\n\t\t\t$this->render(\"search\",$list);\n\t\t\t\n\t}", "title": "" }, { "docid": "5e0066ab56bb7fee29247a32eb8d6bae", "score": "0.48278514", "text": "function isWin() : bool\n {\n $bLine1 = !empty(trim($this->board[0][0])) && ($this->board[0][0] == $this->board[0][1]) && ($this->board[0][1] == $this->board[0][2]);\n if ($bLine1) {\n echo 'Victoire de '. $this->board[0][0]->getPlayer(). PHP_EOL;\n return true;\n }\n\n $bLine2 = !empty(trim($this->board[1][0])) && ($this->board[1][0] == $this->board[1][1]) && ($this->board[1][1] == $this->board[1][2]);\n if ($bLine2) {\n echo 'Victoire de '. $this->board[1][0]->getPlayer(). PHP_EOL;\n return true;\n }\n\n $bLine3 = !empty(trim($this->board[2][0])) && ($this->board[2][0] == $this->board[2][1]) && ($this->board[2][1] == $this->board[2][2]);\n if ($bLine3) {\n echo 'Victoire de '. $this->board[2][0]->getPlayer(). PHP_EOL;\n return true;\n }\n\n $bCol1 = !empty(trim($this->board[0][0])) && ($this->board[0][0] == $this->board[1][0]) && ($this->board[1][0] == $this->board[2][0]);\n if ($bCol1) {\n echo 'Victoire de '. $this->board[0][0]->getPlayer(). PHP_EOL;\n return true;\n };\n\n $bCol2 = !empty(trim($this->board[0][1])) && ($this->board[0][1] == $this->board[1][1]) && ($this->board[1][1] == $this->board[2][1]);\n if ($bCol2) {\n echo 'Victoire de '. $this->board[0][1]->getPlayer(). PHP_EOL;\n return true;\n };\n\n $bCol3 = !empty(trim($this->board[0][2])) && ($this->board[0][2] == $this->board[1][2]) && ($this->board[1][2] == $this->board[2][2]);\n if ($bCol3) {\n echo 'Victoire de '. $this->board[0][2]->getPlayer(). PHP_EOL;\n return true;\n };\n\n $bDiaLR = !empty(trim($this->board[0][0])) && ($this->board[0][0] == $this->board[1][1]) && ($this->board[1][1] == $this->board[2][2]);\n if ($bDiaLR) {\n echo 'Victoire de '. $this->board[0][0]->getPlayer(). PHP_EOL;\n return true;\n };\n $bDiaRL = !empty(trim($this->board[0][2])) && ($this->board[0][2] == $this->board[1][1]) && ($this->board[1][1] == $this->board[2][0]);\n if ($bDiaRL) {\n echo 'Victoire de '. $this->board[0][2]->getPlayer() . PHP_EOL;\n return true;\n };\n \n $bTie = !empty(trim($this->board[0][0])) && !empty(trim($this->board[0][1])) && !empty(trim($this->board[0][2]))\n && !empty(trim($this->board[1][0])) && !empty(trim($this->board[1][1])) && !empty(trim($this->board[1][2]))\n && !empty(trim($this->board[2][0])) && !empty(trim($this->board[2][1])) && !empty(trim($this->board[2][2]));\n if ($bTie) {\n echo 'Match nul ! :\\'('. PHP_EOL;\n return true;\n };\n\n return false;\n }", "title": "" }, { "docid": "8c1d0f9469a398c9cba9483d58a0c1fa", "score": "0.4810783", "text": "public function testInstructions(): void\n {\n // Instructions to move west and north\n $robot = new Robot([0, 0], Robot::DIRECTION_NORTH);\n $robot->instructions('LAAARALA');\n $this->assertEquals([-4, 1], $robot->position);\n $this->assertEquals(Robot::DIRECTION_WEST, $robot->direction);\n\n // Instructions to move west and south\n $robot = new Robot([2, -7], Robot::DIRECTION_EAST);\n $robot->instructions('RRAAAAALA');\n $this->assertEquals([-3, -8], $robot->position);\n $this->assertEquals(Robot::DIRECTION_SOUTH, $robot->direction);\n\n // Instructions to move east and north\n $robot = new Robot([8, 4], Robot::DIRECTION_SOUTH);\n $robot->instructions('LAAARRRALLLL');\n $this->assertEquals([11, 5], $robot->position);\n $this->assertEquals(Robot::DIRECTION_NORTH, $robot->direction);\n }", "title": "" }, { "docid": "b1dcb2c8c8542d5576f7de9b8d44f4f8", "score": "0.48055348", "text": "public static function get_support_robots(){\n return array(\n 'default' => 'robot',\n 'dr-light' => 'roll',\n 'dr-wily' => 'disco',\n 'dr-cossack' => 'rhythm'\n );\n }", "title": "" }, { "docid": "7c44ad6e2f8b75f43413108fbf7a3a95", "score": "0.480407", "text": "public function attaque(){\n if($this->tour % 2 == 0){\n // sinon perso1 attaque perso2\n $this->perso1->attaquer($this->perso2);\n // si contraire\n }else{\n $this->perso2->attaquer($this->perso1);\n }\n $this->tour++;\n}", "title": "" }, { "docid": "88d926b8e63581637988b9c192161f4e", "score": "0.48021585", "text": "function checkRobotsMetaTag($name=\"robots\", $content=\"noindex, nofollow\")\n\t{\n\n\t\t// force robots metatag\n\t\t$cfg = & JEVConfig::getInstance();\n\t\tif ($cfg->get('com_blockRobots', 0) >= 1)\n\t\t{\n\t\t\t$document = & JFactory::getDocument();\n\t\t\t// Allow on content pages\n\t\t\tif ($cfg->get('com_blockRobots', 0) == 3)\n\t\t\t{\n\t\t\t\tif (strpos(JRequest::getString(\"jevtask\", \"\"), \".detail\") > 0)\n\t\t\t\t{\n\t\t\t\t\t$document->setMetaData($name, \"nofollow\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$document->setMetaData($name, $content);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ($cfg->get('com_blockRobots', 0) == 1)\n\t\t\t{\n\t\t\t\t$document->setMetaData($name, $content);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlist($cyear, $cmonth, $cday) = JEVHelper::getYMD();\n\t\t\t$cdate = JevDate::mktime(0, 0, 0, $cmonth, $cday, $cyear);\n\t\t\t$prior = JevDate::strtotime($cfg->get('robotprior', \"-1 day\"));\n\t\t\tif ($cdate < $prior)\n\t\t\t{\n\t\t\t\t$document->setMetaData($name, $content);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$post = JevDate::strtotime($cfg->get('robotpost', \"-1 day\"));\n\t\t\tif ($cdate > $post)\n\t\t\t{\n\t\t\t\t$document->setMetaData($name, $content);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "095cb6e930f6d33fc9f46e24daec4a06", "score": "0.48015743", "text": "public function buscar_termino(){\n //realizar la busqueda\n $termino = $_POST[\"termino\"];\n $motor = $_POST[\"motores\"];\n\n // La busqueda se realiza acorde al motor\n // de busqueda elegido\n\n switch($motor){\n case 1: return redirect()->to(\"https://www.google.com/search?q=$termino\");\n break;\n case 2: return redirect()->to(\"https://www.bing.com/search?q=$termino\");\n break;\n case 3: return redirect()->to(\"https://www.youtube.com/results?search_query=$termino\");\n break;\n case 4: return redirect()->to(\"https://www.linkedin.com/search/results/all/?keywords=$termino\");\n break;\n case 5: return redirect()->to(\"https://twitter.com/search?q=$termino\");\n break;\n case 6: return redirect()->to(\"https://scholar.google.es/scholar?hl=es&as_sdt=0%2C5&q=$termino\");\n break;\n case 7: return redirect()->to(\"http://www.picsearch.es/index.cgi?q=$termino\");\n break;\n case 8: return redirect()->to(\"https://www.google.com/search?tbm=bks&q=$termino\");\n break;\n case 9: return redirect()->to(\"https://www.amazon.com/s?k=$termino\");\n break;\n case 10: return redirect()->to(\"https://www.linio.com.co/search?scroll=&q=$termino\");\n break;\n\n }\n\n\n }", "title": "" }, { "docid": "f183e34ce6c5e8d86917922fc017da27", "score": "0.4800486", "text": "private function PlayRobotGame() {\n \t// Go for at least 10 points\n while ($this->hand->GetTotal() <= 10 && $this->last != 1 && ($this->hand->GetTotal() + $this->player->GetPlayerScore()) < 100) {\n $this->ThrowDice();\n $this->throwSeries[] = $this->last;\n }\n\n // With 10 points, decide after each throw whether to stop or throw again\n while (rand(1,2) != 2 && $this->last != 1 && !$this->gameover) {\n \t$this->ThrowDice();\n \t$this->throwSeries[] = $this->last;\n }\n // Save and reload page\n if ($this->last != 1 && !$this->gameover) {\n $this->SaveRound();\n $this->p = 'Spara';\n $this->ReloadPage();\n }\n }", "title": "" }, { "docid": "2638581a436d79f6de5d5458b636d736", "score": "0.4799635", "text": "public function buscar_termino()\n {\n // Realizar la busuqeda \n $termino = $_POST[\"termino\"];\n $motor = $_POST[\"motores\"];\n\n // La busqueda se realiza acorde al motor \n // de busqueda elegido\n switch ($motor) {\n case 1:\n return redirect()->to(\"https://www.google.com/search?q=$termino\");\n break;\n case 2:\n return redirect()->to(\"https://www.bing.com/search?q=$termino\");\n break;\n case 3:\n return redirect()->to(\"https://www.youtube.com/results?search_query=$termino\");\n break;\n case 4:\n return redirect()->to(\"https://espanol.search.yahoo.com/search?p=$termino\");\n break;\n case 5:\n return redirect()->to(\"https://www.facebook.com/search/top?q=$termino\");\n break;\n case 6:\n return redirect()->to(\"https://listado.mercadolibre.com.co/$termino\");\n break;\n case 7:\n return redirect()->to(\"https://duckduckgo.com/?q=$termino\");\n break;\n case 8:\n return redirect()->to(\"https://search.aol.com/aol/search?q=$termino\");\n break;\n case 9:\n return redirect()->to(\"https://www.ask.com/web?q=$termino\");\n break;\n case 10:\n return redirect()->to(\"https://www.ecosia.org/search?q=$termino\");\n break;\n }\n }", "title": "" }, { "docid": "bebdd2fd7a3be26b84c5a100908e6279", "score": "0.4797256", "text": "public function llenar_propiedades_texto(){\n \n //Llenamos las variables noermales:\n $this->ruta_servidor = \"http://localhost/mylove/servidor/\";\n $this->ruta_servidor_perfil = \"http://localhost/mylove/servidor/archivos/imagenesPerfil/\";\n \n //Hacemos un switch para saber que idioma es y asi inicializar las varables de la clase\n switch ($this->idioma){\n //Caso de español\n case 'es':\n \n $this->aceptar = \"Aceptar\";\n $this->cancelar = \"Cancelar\";\n \n $this->escribiendo = \"Esta escribiendo...\";\n \n $this->reg_no_pas_inyecctiones = \"No paso las comprobaciones de inyecciones\";\n $this->reg_idi_sup_talla= \"El lenguaje recibido supera la talla permitida\";\n $this->reg_pais_no_tex_cor_sup_talla = \"Comprobacion de que el pais sea texto y el correo tiene la talla correcta no paso\";\n $this->reg_ult_comprobaciones = \"Ultimas comprobaciones no paso\";\n $this->reg_opc_esc_no_existe = \"La opcion escogida como registro no corresponde a ninguna disponible\";\n $this->reg_cor_existe = \"Ese correo ya esta registrado\";\n $this->reg_tel_existe = \"Ese telefono ya esta registrado\";\n $this->reg_cod_act_reenviado = \"Hemos vuelto a enviar un codigo de activacion a este \";\n $this->reg_err_ins_preusuario = \"Ha ocurrido un error registrandote... :(\\n Intentalo de nuevo\";\n $this->reg_no_pro_peticion = \"No podemos procesar tu solicitud, por favor hazla correctamente\";\n $this->reg_cod_tal_incorrecto= \"El codigo que recibimos no es correcto, son 5 cifras\";\n $this->reg_idi_cor_tel_sup_talla= \"El correo o telefono que recibimos sobrepasa la talla permitida\";\n $this->reg_act_cod_correcto = \"El codigo Esta correcto, has activado tu cuenta\";\n $this->reg_act_error = \"No se ha procesado tu solicitud, intentalo de nuevo\";\n $this->reg_act_cod_malo = \"El codigo ingresado es erroneo\";\n $this->reg_act_cue_ya_activada = \"Ya has activado la cuenta\";\n $this->reg_act_cor_tel_no_existe = \"El dato recibido como tu cuenta, no existe en nuestra base de datos\";\n //...\n $this->ini_cont_sup_talla = \"Contraseña supera la talla\";\n $this->ini_corr_o_tele_sup_talla = \"El correo suppera la talla\";\n $this->ini_alg_sal_mal = \"Ha ocurrido un error mientras inicias sesion, intentalo de nuevo\";\n $this->ini_adelante = \"Adelante\";\n $this->ini_cont_incorrecta = \"La contraseña es incorrecta\";\n $this->ini_no_act_cuenta = \"Aun no has activado tu cuenta, para ingresar tienes que activarla\";\n $this->ini_cor_tel_no_existe = \"Ese dato que ingresaste no existe en nuestros registros\";\n \n //...\n $this->edi_nom_correctamente = \"Se ha actualizado tu nombre\";\n \n //...\n $this->sol_mismo_usuario = \"No te puedes enviar una solicitud a ti mismo...\";\n $this->sol_no_tiene = \"Aun no tienes solicitudes\";\n $this->sol_correcta = \"Se ha enviado la solicitud\";\n $this->sol_error = \"Error enviado la solicitud\";\n $this->sol_ya_enviada = \"Ya le has enviado una solicitud a \";\n $this->sol_otro_ya_envio = \" ya te envio una solicitud\";\n $this->sol_no_existe_ese_usuario = \"No existe ese usuario\";\n $this->sol_has_enviado_solicitud = \"Has enviado una solicitud a \";\n $this->sol_has_recibido_solicitud = \" te ha enviado una solicitud\";\n $this->sol_est_si_acepta_mylove = \"Si acepta, es MyLove\";\n $this->sol_est_si_acepta_friendZone = \"Si acepta, enviarlo a la friendZone\";\n $this->sol_est_si_marcado_mylove = \"Marcaste como tu Love\";\n $this->sol_est_si_marcado_friendZone = \"Marastes en la friendZone\";\n $this->sol_est_acepto_mylove = \"Aceptado como MyLove\";\n $this->sol_est_acepto_frienzone = \"Aceptado en la friendZone\";\n $this->sol_est_no_acepto = \"tu solicitud fue rechazada\";\n $this->sol_est_no_acepto_bloqueo = \"Tu solicitud fue rechazada y bloqueada\";\n $this->sol_est_rechazada = \"Solicitud rechazada\";\n $this->sol_est_rechazada_bloqueo = \"Solicitud rechazada y bloqueada\";\n $this->sol_est_finalizada = \"Ambos han contestado esta solicitud\";\n $this->sol_est_error = \"Estado de la solicitud\";\n $this->sol_est_aun_no_responde_recibida = \"Aun no has respondido esta solicitud\";\n \n //...\n $this->men_primer_mensaje = \" y tu se han unido en MyLove\";\n $this->men_justo_ahora = \"Hace un momento\";\n $this->men_no_tiene_bandeja = \"No has establecido una relacion MyLove\";\n $this->men_tu = \"Tu: \";\n \n \n break;\n //Caso de ingles\n case 'en':\n \n $this->aceptar = \"Done\";\n $this->cancelar = \"Cancel\";\n \n $this->escribiendo = \"is typing...\";\n \n $this->reg_no_pas_inyecctiones = \"Not pass checking of sql injection\";\n $this->reg_idi_sup_talla= \"The language received over the length permited\";\n $this->reg_pais_no_tex_cor_sup_talla = \"The country is wrong or email over the length\";\n $this->reg_ult_comprobaciones = \"Not pass last checking\";\n $this->reg_opc_esc_no_existe = \"The option you choosen for register is wrong\";\n $this->reg_cor_existe = \"The email is registerd\";\n $this->reg_tel_existe = \"The number phone is registerd\";\n $this->reg_cod_act_reenviado = \"We'll back to send a code activation to \";\n $this->reg_err_ins_preusuario = \"Error while you register :(\";\n $this->reg_no_pro_peticion = \"we could't work your request, please do it correctly\";\n $this->reg_cod_tal_incorrecto= \"The register code exceeds allowed ize\";\n $this->reg_idi_cor_tel_sup_talla= \"The email or your languaje received exceeds allowed size\";\n $this->reg_act_cod_correcto = \"The code is correct, you'll activate the account\";\n $this->reg_act_error = \"Has not been processed the request, please check your entry\";\n $this->reg_act_cod_malo = \"The code is wrong\";\n $this->reg_act_cue_ya_activada = \"The account that you want activate, has been activated\";\n $this->reg_act_cor_tel_no_existe = \"The email or number phone does not exist in our database\";\n //...\n $this->ini_cont_sup_talla = \"The password your enter exceeds allowed size\";\n $this->ini_corr_o_tele_sup_talla = \"The email o number phone exceeds the allowed size\";\n $this->ini_alg_sal_mal = \"Sorry, something has bad, please check your entry\";\n $this->ini_adelante = \"Let's go\";\n $this->ini_cont_incorrecta = \"Wrong password\";\n $this->ini_no_act_cuenta = \"Your does not activate the account\";\n $this->ini_cor_tel_no_existe = \"The email or number phone does not exist in our database\";\n \n //...\n $this->edi_nom_correctamente = \"Your name has been update\";\n \n //...\n $this->sol_mismo_usuario = \"Your want send request to you? No no\";\n $this->sol_no_tiene = \"You Don't have request\";\n $this->sol_correcta = \"Request has been send succesfull\";\n $this->sol_error = \"Error send request, please check your entry\";\n $this->sol_ya_enviada = \"The request already exist, your has send\";\n $this->sol_otro_ya_envio = \"The other user send this request\";\n $this->sol_no_existe_ese_usuario = \"Not exist the other user\";\n $this->sol_has_enviado_solicitud = \"Has send the request to \";\n $this->sol_has_recibido_solicitud = \" sent you a request\";\n $this->sol_est_si_acepta_mylove = \"\";\n $this->sol_est_si_acepta_friendZone = \"\";\n $this->sol_est_si_marcado_mylove = \"\";\n $this->sol_est_si_marcado_friendZone = \"\";\n $this->sol_est_acepto_mylove = \"\";\n $this->sol_est_acepto_frienzone = \"\";\n $this->sol_est_no_acepto = \"\";\n $this->sol_est_no_acepto_bloqueo = \"\";\n $this->sol_est_rechazada = \"\";\n $this->sol_est_rechazada_bloqueo = \"\";\n $this->sol_est_finalizada = \"\";\n $this->sol_est_error = \"\";\n $this->sol_est_aun_no_responde_recibida = \"\";\n \n //...\n $this->men_primer_mensaje = \" and You has been join at MyLove\";\n $this->men_justo_ahora = \"Just now\";\n $this->men_no_tiene_bandeja = \"You Don't have messages\";\n $this->men_tu = \"You: \"; \n \n break;\n //Caso por default se tomara el ingles\n default :\n \n $this->aceptar = \"Done\";\n $this->cancelar = \"Cancel\";\n \n $this->escribiendo = \"is typing...\";\n \n $this->reg_no_pas_inyecctiones = \"Not pass checking of sql injection\";\n $this->reg_idi_sup_talla= \"The language received over the length permited\";\n $this->reg_pais_no_tex_cor_sup_talla = \"The country is wrong or email over the length\";\n $this->reg_ult_comprobaciones = \"Not pass last checking\";\n $this->reg_opc_esc_no_existe = \"The option you choosen for register is wrong\";\n $this->reg_cor_existe = \"The email is registerd default\";\n $this->reg_tel_existe = \"The number phone is registerd default\";\n $this->reg_cod_act_reenviado = \"We'll back to send a code activation to \";\n $this->reg_err_ins_preusuario = \"Error while you register :(\";\n $this->reg_no_pro_peticion = \"we could't work your request, please do it correctly\";\n $this->reg_cod_tal_incorrecto= \"The register code exceeds allowed ize\";\n $this->reg_idi_cor_tel_sup_talla= \"The email or your languaje received exceeds allowed size\";\n $this->reg_act_cod_correcto = \"The code is correct, you'll activate the account\";\n $this->reg_act_error = \"Has not been processed the request, please check your entry\";\n $this->reg_act_cod_malo = \"The code is wrong\";\n $this->reg_act_cue_ya_activada = \"The account that you want activate, has been activated\";\n $this->reg_act_cor_tel_no_existe = \"The email or number phone does not exist in our database\";\n //...\n $this->ini_cont_sup_talla = \"The password your enter exceeds allowed size\";\n $this->ini_corr_o_tele_sup_talla = \"The email o number phone exceeds the allowed size\";\n $this->ini_alg_sal_mal = \"Sorry, something has bad, please check your entry\";\n $this->ini_adelante = \"Let's go\";\n $this->ini_cont_incorrecta = \"Wrong password\";\n $this->ini_no_act_cuenta = \"Your does not activate the account\";\n $this->ini_cor_tel_no_existe = \"The email or number phone does not exist in our database\";\n \n //...\n $this->edi_nom_correctamente = \"Your name has been update\";\n \n //...\n $this->sol_mismo_usuario = \"Your want send request to you? No no\";\n $this->sol_no_tiene = \"You Don't have request\";\n $this->sol_correcta = \"Request has been send succesfull\";\n $this->sol_error = \"Error send request, please check your entry\";\n $this->sol_ya_enviada = \"The request already exist, your has send\";\n $this->sol_otro_ya_envio = \"The other user send this request\";\n $this->sol_no_existe_ese_usuario = \"Not exist the other user\";\n $this->sol_has_enviado_solicitud = \"Has send the request to \";\n $this->sol_has_recibido_solicitud = \" sent you a request\";\n \n break;\n }\n \n }", "title": "" }, { "docid": "9b449ff92cada2c85859148d62bf2b47", "score": "0.4793939", "text": "function temp_print_omega_robot_links($info, $key, $kind){\n global $rpg_robots_encountered, $rpg_robots_index;\n $robot = $info['robot'];\n $type = $info['type'];\n $field = $info['field'];\n if (in_array($robot, $rpg_robots_encountered)){\n $info = $rpg_robots_index[$robot];\n $name = $info['robot_name'];\n $size = $info['robot_image_size'] ? $info['robot_image_size'] : 40;\n list($field_one, $field_two) = explode('-', $field);\n $class = 'robot robot_type robot_type_'.$type.' sprite_'.$size.'x'.$size.' ';\n $style = 'background-image: url(images/robots/'.$robot.'/mug_left_'.$size.'x'.$size.'.png); ';\n $title = '<div style=\"text-align: center;\">';\n $title .= $name.' <br /> ';\n $title .= '<span style=\"font-size: 80%\">'.ucfirst($field_one).' '.ucfirst($field_two).'</span>';\n $title .= '</div>';\n $title = htmlentities($title, ENT_QUOTES, 'UTF-8');\n echo '<span class=\"'.$class.'\" data-'.$kind.'-key=\"'.$key.'\" style=\"'.$style.'\" title=\"'.$title.'\">&nbsp;</span>'.\"\\n\";\n } else {\n $class = 'robot robot_type robot_type_empty sprite_40x40 ';\n echo '<span class=\"'.$class.'\" data-'.$kind.'-key=\"'.$key.'\">&nbsp;</span>'.\"\\n\";\n }\n}", "title": "" }, { "docid": "5455897e9e694d4939db3e07e78cba08", "score": "0.4792904", "text": "function mostrarBotonesCargaProyecto($arregloBotones) {\n ?>\n <table>\n <tr>\n <?\n foreach ($arregloBotones as $botones) {\n ?>\n <td>\n <?\n $this->crearFormularioBoton($botones);\n ?>\n </td>\n <?\n }\n ?>\n </tr>\n </table>\n <?\n }", "title": "" }, { "docid": "ce31352b4a46b03421370cbc4b387140", "score": "0.47849667", "text": "public function checkingreso(){\n $ingreso= explode('-', $this->numeroingreso);\n if(count($ingreso)!=3){\n $this->adderror('numeroingreso','El formato de Ingreso no es el correcto');return;\n \n }\n $registroingreso=Ne::findByNumero($ingreso[0],$ingreso[1]);\n if(is_null($registroingreso)){\n $this->adderror('numeroingreso','Este numero de ingreso no existe');return;\n }else{\n if(!in_array($ingreso[2],$registroingreso->listaitems()))\n $this->adderror('numeroingreso','El item ['.$ingreso[2].'] indicado en el ingreso no existe');return; \n \n }\n //verificando el componente \n $registrodetalle=Detgui::model()->findByIdguia($registroingreso->id,$ingreso[1]);\n if(is_null($registrodetalle)){\n $this->adderror('numeroingreso','El item especificado no existe');return;\n }else{\n \n if(is_null(Masterequipo::model()->findByCodigo(trim($registrodetalle->c_codgui))))\n $this->adderror('numeroingreso','El codigo del componente ['.$registrodetalle->c_codgui.'] no pertenece al registro maestro');return;\n \n }\n \n //AHORA SI LOS OBJETOS DE REFERFNCI COINCIDEN EN EL ENCABEZADO DE LAORDEN Y EL DETLLE DE L INGRESO\n $regot=Ot::model()->findByPk($this->hidorden);\n IF(!($regot->codobjeto==$registroingreso->codob))\n $this->adderror('numeroingreso','El objeto referencia del ingreso no coindice con le objeto de la Orden ');return;\n \n //AHROA LAS CANTIDADES\n if($this->canticomp > $registroingreso->asignadosot-$registroingreso->n_cangui)\n $this->adderror('n_cangui','La cantidada asignada ['.$this->canticomp.'] sobrepasa a la diferencia en lacantidad ingresada ['.$registroingreso->n_cangui.'] y la cantidada asignada ['.$registroingreso->asignadosot.']');return;\n \n \n \n \n }", "title": "" }, { "docid": "5924e0ba241976188101bcdc331cd309", "score": "0.47801474", "text": "public function get_robots_disabled($sort = true){\n $filters = array('player_id' => $this->player_id, 'robot_status' => 'disabled');\n $player_robots = rpg_game::find_robots($filters);\n if ($sort){\n usort($player_robots, function($a, $b){\n if ($a->robot_position == 'active'){ return -1; }\n elseif ($b->robot_position == 'active'){ return 1; }\n elseif ($a->robot_key < $b->robot_key){ return -1; }\n elseif ($a->robot_key > $b->robot_key){ return 1; }\n else { return 0; }\n });\n }\n return $player_robots;\n }", "title": "" }, { "docid": "42c9ef4731daabb3eca004726de6b00a", "score": "0.47771478", "text": "public function shipRobot(){\n $role = $this->session->userdata('userrole');\n if ($role != ROLE_BOSS) {\n redirect('/shipment');\n }\n if(!isset($_POST['shipRobot'])){\n //doesn't click ship button\n redirect('/shipment');\n }\n //when ship button click\n $robotIds = array();\n foreach ($this->input->post() as $key => $value) {\n if (substr($key,0,5) == 'robot') {\n $robotIds[] = substr($key,5);\n }\n }\n $error_msgs = array();\n if(count($robotIds) < 1 ){\n //Error: of no checkbox is chosen, show error msg\n $error_msgs[] = \"You must choose at lease one robot to ship to head office!\";\n $this->alert('<strong>Validation errors!<strong><br>'.$error_msgs[0], 'danger');\n } else {\n //validation successful:\n $tokenArray = $this->token->head(1);\n $token = $tokenArray[0]->token_session;\n $url = BASE_URL . \"/work/buymybot\";\n $account = $this->account->head(1);\n $baseEarn = $account[0]->money_earned;\n $earn = 0;\n foreach ($robotIds as $robotId) {\n $robot = $this->robots->get($robotId);\n $allUrl = $url.\"/\" . $robot->part1CA . \"/\" . $robot->part2CA . \"/\" . $robot->part3CA;\n $response = file_get_contents($allUrl . '?key='.$token);\n $responseArray = explode(\" \", $response);\n if ($responseArray[0] == \"Ok\") {\n $earn += $responseArray[1];\n\n //insert ship info into transaction table on db\n $transaction_history = $this->transactions->create();\n $transaction_history->transacType = \"shipment\";\n $transaction_history->transacMoney = $responseArray[1];\n $transaction_history->transacDateTime = date('Y-m-d H:i:s',time());\n $this->transactions->add($transaction_history);\n\n //insert shipment record into shipmentrecord table on db\n $shipmentrecord = $this->shipmentrecords->create();\n //$shipmentrecord->shipmentDateTime\t=date('Y-m-d H:i:s',time());\n //$shipmentrecord->shipmentProfit = $responseArray[1];\n $shipmentrecord->partTopCACode = $robot->part1CA;\n $shipmentrecord->partBodyCACode = $robot->part2CA;\n $shipmentrecord->partBtmCACode = $robot->part3CA;\n $shipmentrecord->robotID = $robotId;\n $transactionArray = $this->transactions->tail(1);\n $shipmentrecord->transactionID = $transactionArray[0]->transactionID;\n $this->shipmentrecords->add($shipmentrecord);\n\n //update robot table status on db\n $robot->status = 0; // ship robot\n $this->robots->update($robot);\n } else {\n $error_msgs = explode(\" Hmmm - \", $response);\n $messages = \"\";\n foreach ($error_msgs as $error_msg) {\n $messages .= $error_msg . '<br>';\n }\n $this->alert('<strong>Validation errors!<strong><br>' . $messages, 'danger');\n break;\n }\n }\n if(count($error_msgs) == 0){\n //update account table\n $account[0]->money_earned = $baseEarn + $earn;\n $this->account->update($account[0]);\n $this->alert('Ship Robots Successful!<br>You have earned $'.$earn);\n }\n }\n $this->index();\n }", "title": "" }, { "docid": "663943531de0941f278b08a14773bfcf", "score": "0.47764188", "text": "public function luzSueloPasilloEncender( ) {\n $this->suelo_pasillo_on = 1;\n $this->ActualizarNivelesSuelo();\n$this->enviarIntensidadSueloPasillo();\n $this->enviarEstadoSueloPasillo();\n// $this->dibujarPantalla();\n }", "title": "" }, { "docid": "6c4fb93ccb05653789f3a8c7a6c6a09a", "score": "0.47740313", "text": "public function activarSonidoContraparte( ) {\n $this->setSonidoOn(self::$SONIDO_ENTRANTE, 1);\n }", "title": "" }, { "docid": "58311e9c10de05613d032e5c368e7ff0", "score": "0.47550026", "text": "function isShaarliste() {\n $session = getSession();\n return '1' == $session['shaarlieur_shaarli_ok'];\n}", "title": "" }, { "docid": "8ea0fc98d69980b1679fbfee24c43acd", "score": "0.47496697", "text": "function warquest_admin_update_robots() {\r\n\r\n\t/* input */\r\n\tglobal $config;\r\n\t\r\n\t/* output */\r\n\tglobal $output;\r\n\t\r\n\t$query = 'select a.pid from member a, player b where a.pid = b.pid AND b.country = \"eu\" ';\r\n\t$query .= 'and a.username not like \"3%\" and a.username not like \"20%\" order by a.pid';\r\n\r\n\t$result = warquest_db_query($query);\t\r\n\r\n\t$count=0;\r\n\twhile ($data = warquest_db_fetch_object($result)) {\r\n\r\n\t\t$count++;\r\n\t\t\r\n\t\t$member = warquest_db_member($data->pid);\r\n\t\t$member->email = 'robot'.$count.'@warquest.nl';\r\n\t\t$member->email_valid = 0;\r\n\t\t$member->notification_comment = 0;\r\n\t\t$member->notification_alliance = 0;\r\n\t\t$member->ip = \"\";\r\n\t\t$member->browser = \"\";\r\n\t\t$member->versie = \"\";\r\n\t\t$member->platform = \"\";\t\t\r\n\t\twarquest_db_member_update($member);\r\n\t\t\r\n\t\twarquest_db_member_username_update($data->pid, 'robot'.$count);\r\n\t\twarquest_db_member_password_update($data->pid, 'robot'.$count);\r\n\t}\r\n\t\n\t$message = number_format($count,0,\",\",\".\").' robot login accounts updated.<br/>';\r\n\t\r\n\t$output->popup .= warquest_box_icon(\"warning\", $message);\r\n}", "title": "" }, { "docid": "4bb3325cbd16b14e89aae80cb6dfe822", "score": "0.4748841", "text": "function BuscarAreasComunes(&$Datos)\n {\n $Maquina = \"localhost\";\n $UsuarioADM = \"root\";\n $ClaveADM = \"123\";\n $BaseDeDatos = \"gestioncondominio\";\n $idinmu = trim($Datos[0]);\n $Valor = 0;\n $ObjetoConeccion = new ConeccionBD;\n $estatus=\"a\"; /*declaro la variable estatus si se la meto directamente da error ojo*/\n $MiConeccion = $ObjetoConeccion->ConectarBD($Maquina,$UsuarioADM,$ClaveADM,$BaseDeDatos);\n $InstruccionSQL = \"select idareacomun,codigoareacomun,descripcionareacomun,capacidadareacomun,idcondominioareacomun,nombreareacomun from areacomuns where\n idcondominioareacomun='\".$idinmu.\"' and estatusareacomun='\".$estatus.\"'\";\n $ConjuntoDeRegistros = $ObjetoConeccion->EjecutarSQL($InstruccionSQL,$MiConeccion);\n $Registros = $ObjetoConeccion->BuscarRegistros($ConjuntoDeRegistros);\n if ((int)$Registros>=1) \n {\n $J = 0;\n $I = 0;\n $Datos[$J][$I+0] = $Registros['idareacomun'];\n $Datos[$J][$I+1] = $Registros['codigoareacomun'];\n $Datos[$J][$I+2] = $Registros['descripcionareacomun'];\n $Datos[$J][$I+3] = $Registros['capacidadareacomun']; \n $Datos[$J][$I+4] = $Registros['idcondominioareacomun']; \n $Datos[$J][$I+5] = $Registros['nombreareacomun']; \n while ($Registros = $ObjetoConeccion->BuscarRegistros($ConjuntoDeRegistros)) \n {\n $J=$J+1;\n $Datos[$J][$I+0] = $Registros['idareacomun'];\n $Datos[$J][$I+1] = $Registros['codigoareacomun'];\n $Datos[$J][$I+2] = $Registros['descripcionareacomun'];\n $Datos[$J][$I+3] = $Registros['capacidadareacomun'];\n $Datos[$J][$I+4] = $Registros['idcondominioareacomun'];\n $Datos[$J][$I+5] = $Registros['nombreareacomun'];\n }\n $Valor = 1;\n }\n else\n { \n $Valor = 0;\n }\n $ObjetoConeccion->CerrarBD($MiConeccion);\n return $Valor;\n }", "title": "" }, { "docid": "7931de7317b30ca76057601b3cb97dfe", "score": "0.47470525", "text": "function guardarCambios() {\n \t\t// Si el id_compra es NULL lo toma como una nueva orden de compra y guarda los datos de la orden de compra en la base de datos.\n \t\tif($this->id_compra == NULL) {\n \t\t\t$consulta = sprintf(\"insert into orden_compra(id_produccion,id_proveedor,orden_compra,numero_pedido,fecha_pedido,fecha_requerida,fecha_factura,estado,tasas,fecha_creado,direccion_entrega,direccion_facturacion,activo) value (%s,%s,%s,%s,%s,current_timestamp,current_timestamp,%s,%s,current_timestamp,%s,%s,1)\",\n\t \t\t$this->makeValue($this->id_produccion, \"int\"),\n\t \t\t$this->makeValue($this->id_proveedor, \"int\"),\n\t\t\t $this->makeValue($this->orden_compra, \"text\"),\n\t\t\t $this->makeValue($this->numero_pedido, \"text\"),\n\t\t\t $this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t $this->makeValue($this->estado, \"text\"),\n\t\t\t $this->makeValue($this->tasas, \"float\"),\n\t\t\t $this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t $this->makeValue($this->direccion_facturacion, \"text\"));\n\t\t $this->setConsulta($consulta);\n\t\t if($this->ejecutarSoloConsulta()) {\n\t\t \t\treturn 1;\n\t\t } \n\t\t else {\n\t\t \treturn 2;\n\t\t }\n\t\t}\n\t\t// Modificación de la Orden de Compra / Modificación de varias órdenes de compra desde el listado.\n\t\telse {\n\t\t\t$consulta = \"\";\n\t\t\tswitch($this->estado_anterior) {\n\t\t\t\tcase \"GENERADA\":\n\t\t\t\t\tswitch($this->estado) {\n\t\t\t\t\t\tcase \"GENERADA\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO INICIADO\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=current_timestamp, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO CERRADO\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PARCIALMENTE RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"STOCK\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\t\t$this->ordenCompraStock();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \"PEDIDO INICIADO\":\n\t\t\t\t\tswitch($this->estado) {\n\t\t\t\t\t\tcase \"GENERADA\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO INICIADO\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO CERRADO\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PARCIALMENTE RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"STOCK\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\t\t$this->ordenCompraStock();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \"PEDIDO CERRADO\":\n\t\t\t\t\tswitch($this->estado) {\n\t\t\t\t\t\tcase \"GENERADA\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO INICIADO\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO CERRADO\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PARCIALMENTE RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"STOCK\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\t\t$this->ordenCompraStock();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t/* El usuario no puede cambiar desde este estado\n\t\t\t\tcase \"PARCIALMENTE RECIBIDO\"\n\t\t\t\t\tswitch($this->estado) {\n\t\t\t\t\t\tcase \"GENERADA\":\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO INICIADO\":\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO CERRADO\":\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PARCIALMENTE RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"STOCK\":\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t*/\n\t\t\t\t/* El usuario no puede cambiar desde este estado\n\t\t\t\tcase \"RECIBIDO\":\n\t\t\t\t\tswitch($this->estado) {\n\t\t\t\t\t\tcase \"GENERADA\":\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO INICIADO\":\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO CERRADO\":\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PARCIALMENTE RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"STOCK\":\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t*/\n\t\t\t\tcase \"STOCK\":\n\t\t\t\t\tswitch($this->estado) {\n\t\t\t\t\t\tcase \"GENERADA\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\t\t$this->ordenCompraStockFuera();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO INICIADO\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\t\t$this->ordenCompraStockFuera();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO CERRADO\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\t\t$this->ordenCompraStockFuera();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PARCIALMENTE RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"STOCK\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($consulta != \"\"){\n\t\t\t\t$this->setConsulta($consulta);\n\t\t\t\tif($this->ejecutarSoloConsulta()) {\n\t\t\t\t\t// Insertamos las facturas en la BBDD\n\t\t\t\t\t$i=0;\n\t\t\t\t\t$fallo = false;\n\t\t\t\t\twhile ($i<count($this->nombre_factura) and (!$fallo)) {\n\t\t\t\t\t\tif (!empty($this->nombre_factura[$i])) {\n\t\t\t\t\t\t\t$consulta_archivos = sprintf(\"insert into orden_compra_facturas (id_orden, id_proveedor, nombre_factura, neto, fecha_entrega, activo) value (%s,%s,%s,%s,current_timestamp,1)\",\n \t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_proveedor, \"int\"),\n \t\t\t\t\t\t\t$this->makeValue($this->nombre_factura[$i], \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->neto_factura[$i],\"float\"));\n\t\t\t\t\t\t\t$this->setConsulta($consulta_archivos);\n\t\t\t\t\t\t\tif (!$this->ejecutarSoloConsulta()) $fallo = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t\tif (!$fallo) {\n\t\t\t\t\t// Insertamos los archivos adjuntos\n\t\t\t\t\t\t$i=0;\n\t\t\t\t\t\t$fallo = false;\n\t\t\t\t\t\twhile ($i<count($this->nombre_archivo_adjunto) and (!$fallo)) {\n\t\t\t\t\t\t\tif (!empty($this->nombre_archivo_adjunto[$i])) {\n\t\t\t\t\t\t\t\t$consulta_archivos = sprintf(\"insert into orden_compra_adjuntos (id_orden, id_proveedor, nombre_adjunto, fecha_creado, activo) value (%s,%s,%s,current_timestamp,1)\",\n \t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"),\n\t\t\t\t\t\t\t\t\t$this->makeValue($this->id_proveedor, \"int\"),\n \t\t\t\t\t\t\t\t$this->makeValue($this->nombre_archivo_adjunto[$i], \"text\"));\n\t\t\t\t\t\t\t\t$this->setConsulta($consulta_archivos);\n\t\t\t\t\t\t\t\tif (!$this->ejecutarSoloConsulta()) $fallo = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$fallo) {\n\t\t\t\t\t\t\t// MODIFICACION ORDEN DE COMPRA OK\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\treturn 17;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Fallo al guardar las facturas en la BBDD\n\t\t\t\t\t\treturn 13;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn 3;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn 1;\n\t\t}\n\t}", "title": "" }, { "docid": "82c13058e6e18830738bdf4e24ee753a", "score": "0.4743903", "text": "function recibirArduino()\n {\n\n if(isset($_GET['temp']) && isset($_GET['temp']))\n {\n $this->model->setParametros($_GET['temp'], $_GET['humed'], $_GET['humedad_suelo']);\n $this->model->envio();\n }\n\n /* $this->model->getParametros(); */\n\n $this->model->getConfiguracion();\n\n }", "title": "" }, { "docid": "5f70f6758048bcd0fd2f783c09cd1862", "score": "0.4743823", "text": "public function armado() {\n $validacion = new Seguridad_UsuarioValidacion();\n $validacion = $validacion->consultaElemento();\n\n // creo una matriz con los campos de los componentes de la pagina\n $matriz_componentes = Consultas_MatrizObtenerDeComponenteTablaYParametros::armado($_GET['cp_id']);\n\n // parametros del componente\n $met_valor_param[2] = $matriz_componentes;\n\n // llamada al componente\n $contenido_cuerpo_componente = Componentes_Componente::componente($matriz_componentes['cp_nombre'], 'ComponenteInsercion', $met_valor_param);\n\n if (Inicio::confVars('generar_log') == 's') {\n $this->_cargaLog();\n } \n \n // la redireccion va al final\n $armado_botonera = new Armado_Botonera();\n\n $parametros = array('kk_generar' => '0', 'accion' => '5', 'id_tabla' => $_GET['id_tabla']);\n $armado_botonera->armar('redirigir', $parametros);\n }", "title": "" }, { "docid": "94aee081c4846a73940af186f67cf6fe", "score": "0.47351837", "text": "public function luzSueloPasilloApagar( ) {\n $this->suelo_pasillo_on = 0;\n $this->ActualizarNivelesSuelo();\n$this->enviarIntensidadSueloPasillo();\n $this->enviarEstadoSueloPasillo();\n// $this->dibujarPantalla();\n }", "title": "" }, { "docid": "eebffe2a6fd2f775ace6825eaf085bf4", "score": "0.47280785", "text": "public function load_robot($this_robotinfo, $this_key, $apply_bonuses = false, $return_robot = false){\n //$GLOBALS['DEBUG']['checkpoint_line'] = 'class.player.php : line 107 <pre>'.print_r($this->player_robots, true).'</pre>';\n ////if (MMRPG_CONFIG_DEBUG_MODE){ $_SESSION['DEBUG']['checkpoint_queries'][] = \"CHECKPOINT on line \".__LINE__.\" in \".__FILE__; }\n $robot_object = rpg_game::get_robot($this->battle, $this, $this_robotinfo);\n ////if (MMRPG_CONFIG_DEBUG_MODE){ $_SESSION['DEBUG']['checkpoint_queries'][] = \"CHECKPOINT on line \".__LINE__.\" in \".__FILE__; }\n if ($apply_bonuses){ $robot_object->apply_stat_bonuses(); }\n ////if (MMRPG_CONFIG_DEBUG_MODE){ $_SESSION['DEBUG']['checkpoint_queries'][] = \"CHECKPOINT on line \".__LINE__.\" in \".__FILE__; }\n $this_export_array = $robot_object->export_array();\n ////if (MMRPG_CONFIG_DEBUG_MODE){ $_SESSION['DEBUG']['checkpoint_queries'][] = \"CHECKPOINT on line \".__LINE__.\" in \".__FILE__; }\n $new_robots_array = $this->player_robots;\n $new_robots_array[] = $this_export_array;\n $this->set_robots($new_robots_array);\n $this->update_session();\n if ($return_robot){ return $robot_object; }\n else { return true; }\n }", "title": "" }, { "docid": "bcd409e0b6be7375abbe8c3ed2ac43c1", "score": "0.4720539", "text": "public function robots()\n {\n if (env('APP_ENV') === 'production')\n {\n return response(view('site.prod-robots-txt'))\n ->header('Content-Type', 'text/plain');\n } else {\n return response(view('site.staging-robots-txt'))\n ->header('Content-Type', 'text/plain');\n }\n }", "title": "" }, { "docid": "e6c78f18c2012dbc29969a43198e3b00", "score": "0.47188118", "text": "public function buscarExtendida(){\n\t\t$filtros=array('usuario'=>$_SESSION['usuario_id'],'dui'=>$_POST['dui'], 'nombre'=>$_POST['nombre'],'apellido'=>$_POST['apellido']);\n\t\t$lista_pacientes=Paciente::allByFilter($filtros);\n\t\t$botones=0;\t\n\t\trequire_once('Views/Paciente/show.php');\t\t\n\t\t/*\n\t\telse{//si está vacía trae todos los registros\n\t\t\t$this->show();\n\t\t}\n\t\t*/\t\t\n\t}", "title": "" }, { "docid": "22797cd4306d2c5a6e11fe027961b565", "score": "0.47153986", "text": "protected function volcarRegistros() {\n\t\t\t$count = 0;\n\t\t\tfor ($i = 1; $i <= $this->cantidadRegistros; $i++) {\n\t\t\t\t/* create an insert with 500 records or less */\n\t\t\t\tif (($count % 500) == 0) {\n\t\t\t\t\t$this->crearLineaInsert(); $query = \"\";}\n\t\t\t\tif ($this->obtenerRegistro($i)) {\n\t\t\t\t\t$count ++;\n\t\t\t\t\t$record = \"(\";\n\t\t\t\t\t$ajuste = 0;\n\t\t\t\t\tfor ($j = 0; $j < $this->cantidadCampos; $j++) {\n\t\t\t\t\t\tif ($this->titulosCampos[$j]['type'] !== \"memo\") {\n\t\t\t\t\t\t\t$dato = str_replace(\"'\", \"\\'\", $this->registro[$j - $ajuste]);\n\t\t\t\t\t\t\tif ($record !== \"(\") {\n\t\t\t\t\t\t\t\t$record .= \",\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$record .= \"'\" . trim($dato) . \"'\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$ajuste++;\n\t\t\t\t\t\t\tif ($record !== \"(\") {\n\t\t\t\t\t\t\t\t$record .= \",\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$record .= \"''\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$query .= $record . \")\";\n\n\t\t\t\t\tif ((($count % 500) == 0) || ($i == $this->cantidadRegistros)) {\n\t\t\t\t\t\t$this->lineaInsert .= $query . \";\";\n\t\t\t\t\t\t$this->agregar($this->lineaInsert);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$query .= \",\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn True;\n\t\t}", "title": "" }, { "docid": "1294fd4dcb213ffe4ea6feaac3a99cc6", "score": "0.47112855", "text": "public function mostrarGuias()\n {\n $this->validarSesion();\n $id = 1;\n $mantenimiento = $this->guiasModelo->listarGuias($id);\n $datos = [\n 'contenido' => $mantenimiento[0]->contenido\n ];\n $this->vista(\"mantenimiento/mantenimiento\", $datos);\n }", "title": "" }, { "docid": "cd2f81917647e5f9366dc23aeebc32ab", "score": "0.47070754", "text": "function rayos($a, $b)\n {\n global $log, $i, $at, $de;\n\n //calcular acierto\n $punt = $a[inte] + mt_rand(-100, 100);\n $blo = $b[con] + mt_rand(-100, 100);\n\n if ($punt > $blo && $at[nv_sable]>1) { //Si hay acierto\n $danos = $a[pod] + mt_rand(-50, 50);\n $danos += abs($a[lado]) /20;\n $danos -= $b[con]/4;\n $danos = max($danos, 1);\n\n $b[hp] -= $danos;\n $b[por] -= round($danos/$b[maxhp] * 100);\n\n //output\n $log[$i] = 'aRa._.de._.'.\"'$a[nomb]'\".'._.'.tDolor($danos).'._.a._.'.\"'$b[nomb]'\".'._.ab.'.\"'$b[por]'\".'.cb';\n\n if ($a[nv_sable] >=3) {//Drenaje\n\n //El atacante drena\n $a[hp] += $danos;\n $a[por] += round($danos/$a[maxhp] * 100);\n\n $a[hp] = min($a[hp], $a[maxhp]);\n $a[por] = min($a[por], 100);\n $log[$i].= '.cSi.fDr';\n }\n\n $log[$i].='.end';\n $i++;\n }\n //ACTUALIZAR VARIABLES\n if ($a[nombre] == $at[nombre]) {\n $at = $a;\n $de = $b;\n } else {\n $at = $b;\n $de = $a;\n }\n }", "title": "" }, { "docid": "59c145ab3e5f366f7b8dfca0af6062bd", "score": "0.4705731", "text": "private function __getTextFromWikipedia($tituloBuscar) {\n $texto = \"\";\n $url = \"https://es.wikipedia.org/w/api.php?action=query&format=php&list=search&utf8=1&srsearch=\" . $tituloBuscar;\n $result = $this->__curl($url);\n $result = unserialize($result);\n if (!empty($result['query']['search'][0]['pageid'])) {\n $pageId = $result['query']['search'][0]['pageid'];\n $urlWikiPage = \"https://es.wikipedia.org/w/api.php?action=query&format=php&prop=info&pageids=\".$pageId.\"&inprop=url\";\n $result = $this->__curl($urlWikiPage);\n $result = unserialize($result);\n if (!empty($result['query']['pages'][$pageId]['fullurl'])) {\n $html = file_get_html($result['query']['pages'][$pageId]['fullurl']);\n if (!empty($html)) {\n\t\t\t\t\t$enlaces = array();\n\t\t\t\t\t// busco todos los enlaces y quito los que no me sirven\n\t\t\t\t\tforeach($html->find('#mw-content-text p') as $key => $element) {\n\t\t\t\t\t\t$texto .= '</br>' . strip_tags($element) . '</br>';\n\t\t\t\t\t\tif ($key == 2) break; \n\t\t\t\t\t}\n\t\t\t\t\tif (!empty($texto)) {\n\t\t\t\t\t\treturn $texto;\n\t\t\t\t\t}\n\t\t\t\t}\n }\n }\n return false;\n\n }", "title": "" }, { "docid": "be58f9dd4d2c516764bd8c3df4a9e693", "score": "0.47051856", "text": "public function iniciarSesion()\n {\n\n }", "title": "" }, { "docid": "be58f9dd4d2c516764bd8c3df4a9e693", "score": "0.47051856", "text": "public function iniciarSesion()\n {\n\n }", "title": "" }, { "docid": "c555af5fd2da3131c7f6c5c5d8a13747", "score": "0.4703076", "text": "protected function unset_value_session($victro_name, $victro_search, $victro_bot = 0) {\n GLOBAL $victro_datap;\n if ($victro_bot == 0) {\n $victro_id_bot = $victro_datap[1];\n } else {\n if (is_array($victro_bot)) {\n if (isset($victro_bot['name']) and isset($victro_bot['author'])) {\n $this->select('id');\n $this->from('victro_robot');\n $this->where(\"name = '{$victro_bot['name']}' and author = '{$victro_bot['author']}'\");\n $victro_query = $this->db_select();\n if ($victro_query->get_count() > 0) {\n $victro_id_bot = $victro_query->get_row()->id;\n } else {\n $victro_id_bot = $victro_datap[1];\n $victro_log = \"Actual WK ID was used because the WK passed does not exist\";\n $this->create_dbLog(\"SESSION\", $victro_log);\n }\n } else {\n $victro_id_bot = $victro_datap[1];\n $victro_log = \"Actual WK ID was used because the WK passed does not exist\";\n $this->create_dbLog(\"SESSION\", $victro_log);\n }\n } else {\n $this->select('id');\n $this->from('victro_robot');\n $this->where(\"id = '{$victro_bot}'\");\n $victro_query = $this->db_select();\n if ($victro_query->get_count() > 0) {\n $victro_id_bot = $victro_query->get_row()->id;\n } else {\n $victro_id_bot = $victro_datap[1];\n $victro_log = \"Actual WK ID was used because the WK passed does not exist\";\n $this->create_dbLog(\"SESSION\", $victro_log);\n }\n }\n }\n if (isset($_SESSION[base64_encode(date('m') . $victro_id_bot . $victro_name)])) {\n if (($victro_key = array_search($victro_search, $_SESSION[base64_encode(date('m') . $victro_id_bot . $victro_name)])) !== false) {\n unset($_SESSION[base64_encode(date('m') . $victro_id_bot . $victro_name)][$victro_key]);\n return(true);\n } else {\n return(false);\n }\n }\n }", "title": "" }, { "docid": "47d8ba36034819893b5a3d9a784dd28e", "score": "0.47018313", "text": "public function moverAllTropasAlCastillo($usuario_name){\n //moverlas en troop_building, desde barracks a castle\n //usuario\n $user = $this->em->getRepository(User::class)->findOneBy(['name' => $usuario_name]);\n \n //lista tropas\n $tropas = $this->em->getRepository(Troop::class)->findBy(['user' => $user->getId()]);\n\n //buscar el id del castillo\n $id_castillo = $user->getKingdom()->getMainCastleId();\n $castillo = $this->em->getRepository(Building::class)->findOneBy(['id' =>$id_castillo]);\n\n /* echo \"\\n\";\n echo \"id Castillo \".$id_castillo;*/\n\n //Cada una de estas tropas la busco un troop_building y modifico su ubicacion al castillo\n\n foreach ($tropas as $unatropa) {\n $troop_building = $this->em->getRepository(TroopBuilding::class)->findOneBy(['troops' =>$unatropa->getId()]);\n\n if ($troop_building) {\n // public function setBuilding(?Building $building): self\n\n $troop_building->setBuilding($castillo);\n $this->em->persist($troop_building);\n $this->em->flush();\n }\n\n\n }\n\n\n //Buscar todas las tropas de azul en troops\n //moverlas en troop_building, desde barracks a castle\n\n }", "title": "" }, { "docid": "77b2a02aa05a0b96a3d76309777491d4", "score": "0.46955544", "text": "function quitarRelacion($pos){\n\t\t$this->relaciones=quitarDeArray($this->relaciones,$pos);\n\t}", "title": "" }, { "docid": "fe5a82434da97630d9faa2e227fa0d67", "score": "0.4694347", "text": "public function solution()\n {\n $this->robot = new Robot($this->parser->getInitialPoint(), $this->parser->getFinalPoint(), $this->parser->getMaze());\n $this->robot->start();\n }", "title": "" }, { "docid": "705ffc186b2cda9a39b7fea62ebd443c", "score": "0.46919104", "text": "function CambioLugarEjercicioSinPadre($Parametros)\n\t{\n\t\t$id_Rutina = $Parametros['id_rutina'];\n\t\t$id_Cambio = $Parametros['id_cambio'];\n\t\t$id_Hijo = $Parametros['id_Hijo'];\n\t\t$Cantidad_Puestos = $Parametros['Cantidad_Puestos'];\n\t\t$consultar = new Consultar();\n\t\t$agregar = new Agregar();\n\t\t$actualizar = new Actualizar();\n\t\t$id_dia \t\t = \"\";\n\n\t\t//Casos a definir 1) cuando la cantidad de puestos es 1 2) cuando la cantidad de puestos es mayor a 1\n\t\t\n\t\t//Caso 1) cuando la cantidad de puestos es 1, solo se hará un intercambio de valores\n\t\tif ($Cantidad_Puestos == 1)\n\t\t{\n\t\t\t\n\t\t\t//Obteniendo el id del id_PosicionEjercicio que fue movido\n\t\t\t$ResultadoIdEjercicioCambiar = $consultar->_ConsultarId_EjercicioClientePorId_PosicionEjercicio($id_Rutina, $id_Cambio);\n\t\t\t$id_EjercicioClienteCambio \t = $ResultadoIdEjercicioCambiar['id'];\n\t\t\t$id_dia \t\t\t\t = $ResultadoIdEjercicioCambiar['id_dia'];\n\t\t\t//Obtener el id del id_PosicionEjercicio hijo a intercambiar\n\t\t\t$ResultadoIdEjercicioCambiar = $consultar->_ConsultarId_EjercicioClientePorId_PosicionEjercicio($id_Rutina, $id_Hijo);\n\t\t\t$id_EjercicioClienteHijo \t = $ResultadoIdEjercicioCambiar['id'];\n\t\t\t\n\t\t\t//Cambiando el valor para ambos, el que fue movido y el hijo.\n\t\t\t\n\t\t\t// 1) id que fue movido\n\t\t\t$ResPosicionMovido = $actualizar->_ActualizarPosicionPorRutinaEjercicioYValor($id_Rutina,$id_EjercicioClienteCambio, $id_Hijo);\n\t\t\t\n\t\t\t// 2) id del hijo, del id que fue movido\n\t\t\t$ResPosicionHijo = $actualizar->_ActualizarPosicionPorRutinaEjercicioYValor($id_Rutina,$id_EjercicioClienteHijo, $id_Cambio);\n\n\n\t\t}\n\t\telse \n\t\t{\n\t\t\t//Caso 2) se tiene que hacer un cambio por la cantidad de espacios recorridos\n\t\t\t\n\t\t\t//Obtener el id del ejercicio que contiene el id_PosicionEjercicio\n\t\t\t$ResultadoIdEjercicioCambiar = $consultar->_ConsultarId_EjercicioClientePorId_PosicionEjercicio($id_Rutina, $id_Cambio);\n\t\t\t$id_ejercicioRutinaCliente \t = $ResultadoIdEjercicioCambiar['id']; //Id del ejercicio a cambairle la posición\n\t\t\t$id_dia \t\t\t\t = $ResultadoIdEjercicioCambiar['id_dia'];\n\n\t\t\t//Tomando el id desde el último a cambiarse hasta el primero, se hace desde el último para evitar repetidos u otros problemas\n\t\t\t\n\t\t\t$id_PosicionEjercicioCambiar = $id_Cambio-1;\n\n\t\t\t//Actualizando la posición del ejercicioo del último al primero\n\t\t\t$resulAc=$actualizar ->_ActualizarIdPosicionEjercicioPorIdRutinaYidPosicionEjercicio($id_Rutina, $id_PosicionEjercicioCambiar,$id_dia);\n\t\t\t\n\t\t\t//Actualizando el id_PosicionEjercicio por el del hijo, que solía ser la primera posición\n\t\t\t\n\t\t\t//Cambiarle el id_PosicionEjercicio por el del id_hijo\n\t\t\t$ResPosicionActualiza = $actualizar->_ActualizarPosicionPorRutinaEjercicioYValor($id_Rutina,$id_ejercicioRutinaCliente, $id_Hijo);\n\t\t\t\n\t\t} //else\n\n\t\t//trayendo de nuevo los ejercicios \n\t\t$ejercicios = $consultar->_ConsultarInformacionPorRutinaYDiaRutinasClientes($id_Rutina,$id_dia);\n\t\t$cantidad = count($ejercicios);\n\t\t$exito = ($cantidad>0)?1:0;\n\t\t$datos = array(\"exito\"=>$exito,\"dia\"=>$id_dia,\"ejercicios\"=>$ejercicios);\n\t\treturn $datos;\n\t}", "title": "" }, { "docid": "da24905d6f25b3187e56723a556b0e01", "score": "0.46915692", "text": "public function hasFillFicha(){\n $persona=$this->postulante->persona;\n $this->setScenario($persona::SCE_INTERMEDIO); \n $oldScenario=$this->getScenario();\n $this->setScenario(self::SCENARIO_CONVOCATORIAMINIMA);\n $funciono=$this->validate();\n $this->setScenario($oldScenario); //Volvemos a colocar como estaba antes\n return (\n $funciono && //que tenga todos los datos de convocado\n $persona->validate() && //que tenga todos los datos personales completos\n $this->getInterOpuniv()->count()>0 //Que por lo menos haya llenado una univesidad de psotulacion \n );\n \n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "fccb55bbe6a610107e3a52afb6415027", "score": "0.0", "text": "public function show(TypeCarta $typeCarta)\n {\n //\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "754e1795026ca4c71e3959656a533ca3", "score": "0.77020115", "text": "private function _displayResource() {\n\t\t// determine which action to take\n\t\t$lti_message_type = $this->lti_model->getLtiDataValue('lti_message_type');\n\t\tswitch( $lti_message_type ){\n\t\t\tcase 'ContentItemSelectionRequest' : // take user to the content item selector\n\t\t\t\t$this->_getContentItemSelectionRequest();\n\t\t\t\tbreak;\n\t\t\tcase 'basic-lti-launch-request' : // retrieve the requested resource\n\t\t\tdefault :\n\t\t\t\t// store LTI basic outcomes service details when an outcome is requested\n\t\t\t\t$this->lti_outcomes->saveLtiOutcomesValues();\n\t\t\t\t$this->getContent( $custom_resource_id );\n\t\t}\n\t}", "title": "" }, { "docid": "d77a1cf077ad489eb930bc1facfeb4a7", "score": "0.7348343", "text": "public function show($class_id, $resource)\n {\n //\n }", "title": "" }, { "docid": "26f38c42099a7c64fba7842c4ce19062", "score": "0.7230476", "text": "public function show(Resource $resource)\n {\n return view('actions.resource.show', compact('resource'));\n }", "title": "" }, { "docid": "b8de278532cf1b2d94016c0cd12737fd", "score": "0.7159185", "text": "public function show(Resource $resource)\n {\n $resource = new ResourceResource($resource);\n return $this->success('Resource Detail.', $resource);\n }", "title": "" }, { "docid": "48fb67ee8a54377a224740d572c17cdd", "score": "0.7143722", "text": "public function show(Resource $resource)\n {\n return view('resource.show',['resource'=>$resource]);\n }", "title": "" }, { "docid": "50078f2eddc7667a37be0da403d6d3e4", "score": "0.7131298", "text": "function display($resource_name, $cache_id = null, $compile_id = null) {\n // Был старый выхзов, учитывал кеширование\n //$this->fetch($resource_name, $cache_id, $compile_id, true);\n $this->render($resource_name);\n }", "title": "" }, { "docid": "860344e8f85b09bf11e41aa48e928f6e", "score": "0.6776001", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BWBlogBundle:Resource')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Resource entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BWBlogBundle:Resource:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }", "title": "" }, { "docid": "bc7cbf8f7bf2cdecfc58cc20b4ee76ef", "score": "0.6574996", "text": "public function show($course, Resource $resource)\n {\n\n\n $pageTitle = 'Resource';\n\n return view('resources.resource')->with(compact( 'resource', 'pageTitle'));\n }", "title": "" }, { "docid": "cc94e2329160f202733c635aa4bf0b30", "score": "0.65286446", "text": "public function show($param)\r\n {\r\n\r\n $data['resource_header'] = true;\r\n $user_id = ($this->auth)?$this->auth->id:null;\r\n $data['resource'] = Resource::with(['tags', 'likesCount', 'user', 'downloads', 'category', 'category.resources' => function($q){\r\n $q->limit(4);\r\n }, 'like' => function($q)use($user_id){\r\n $q->where('user_id', $user_id);\r\n }])\r\n ->where('slug', $param)\r\n ->orWhere('id', $param)\r\n ->firstOrFail();\r\n\r\n $author = User::with('profile')\r\n ->where('id', $data['resource']->user_id)\r\n ->get()\r\n ->toArray();\r\n\r\n if(count($author) > 0){\r\n $data['author'] = $author[0];\r\n }\r\n\r\n $data['latestResources'] = Resource::with('category')->orderBy('id', 'desc')->limit(5)->get();\r\n $data['tags'] = Tag::orderBy('id','desc')->get();\r\n\r\n return view('public.resource')->with($data);\r\n }", "title": "" }, { "docid": "69545e83d1d4c03b646757789a897b5b", "score": "0.6515112", "text": "public function show(Resource $resource)\n {\n //\n // $this->authorize('view',Resource::class);\n // $page=Page::all();\n // $resource=Resource::all();\n // return view('resource.show',compact('page','resource'));\n return response()->json($resource);\n }", "title": "" }, { "docid": "51abeaf13e315e938469da7a51936df5", "score": "0.6467601", "text": "public function show($id)\n {\n $query = '\"select\":\"*\",\"where\":\"id=' . $id . '\"';\n $data = ResourcesService::getResourcesTableRow($query);\n $resource = $data[\"Result\"][0];\n //$resource = Resource::findOrFail($id);\n\n return view('admin.resources.show', compact('resource'));\n }", "title": "" }, { "docid": "4869655563febeddc21b876b2d3bd399", "score": "0.6464456", "text": "public function showResource(Request $request, $id = 0);", "title": "" }, { "docid": "6e101e96500f24d567e50a803b6d00fb", "score": "0.64562225", "text": "public function show($id)\n\t{\n\t\t// Get the resource if it has not been provided by the child class\n\t\tif( ! $this->resource->getKey())\n\t\t\t$this->resource = $this->resource->findOrFail($id);\n\n\t\t$this->layout->subtitle = _('Details');\n\n\t\treturn $this->loadView(__FUNCTION__, $this->resource->getVisibleLabels());\n\t}", "title": "" }, { "docid": "0bfd2fab1690e405f8ae90f2f671725b", "score": "0.63684106", "text": "public function show($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\t\treturn View::make('resource/show', compact('resource'));\n\t}", "title": "" }, { "docid": "14f061e926b1904b496ec52586cb2b35", "score": "0.63535744", "text": "public function display() {\n\t\t\ttry {\n\t\t\t\tif(!is_null($this->id)) {\n\t\t\t\t\t$this->returnView($this->model->display($this->id));\n\t\t\t\t} else {\n\t\t\t\t\t$this->error404();\n\t\t\t\t}\n\t\t\t} catch(Exception $e) {\n\t\t\t\t$this->session->add('error', $e->getMessage());\n\t\t\t\texit(header('Location: '.$_SERVER['HTTP_REFERER']));\n\t\t\t}\n\t\t\t$this->session->sUnset('error');\n\t\t}", "title": "" }, { "docid": "30460e9f10fc35f6066e56c0edf07f11", "score": "0.62772554", "text": "public function resource($resource)\n {\n // TODO: Implement resource() method.\n }", "title": "" }, { "docid": "742c2b4cd2f26a04a82af80f8ee84057", "score": "0.62133056", "text": "public function show()\n {\n $dispatcher = Dispatcher::getSharedDispatcher();\n $dataProvider = $this->getDataProvider();\n $controller = $dataProvider->getControllerClassForPath($this->getPath());\n $action = $this->getIdentifier() . 'Action';\n $controller = GeneralUtility::makeInstance($controller);\n\n if (is_object($controller)) {\n $controller->setRequest($dispatcher->getRequest());\n }\n if (is_numeric($this->getIdentifier())\n && is_object($controller) && method_exists($controller, 'showAction')\n ) {\n $result = $controller->processAction('showAction', $this->getIdentifier());\n } elseif (is_object($controller) && method_exists($controller, $action)) {\n $result = $controller->processAction($action);\n } else {\n $result = false;\n }\n\n return $result ? $this->createResponse($result, 200) : $result;\n }", "title": "" }, { "docid": "f61677388a9b71138fce919e36a82ca0", "score": "0.61413664", "text": "public function show($id)\n {\n #$resource = resource::find($id);\n $resource = Resource::where('slug', '=', $id)->orWhere('id', '=', $id)->firstOrFail();\n\n $related_resources = Resource::where('id', \"!=\", $resource->id)\n ->orWhere('name', 'LIKE', '%' . $resource->name . '%')\n ->orWhere('description', 'LIKE', '%' . $resource->description . '%')->take(8)->get();\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $related_resources,\n ];\n\n return view('resources.show-resource')->with($data);\n }", "title": "" }, { "docid": "404169262f3328542c2f476a8bae067c", "score": "0.6073625", "text": "public function fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n $this->fixURI($resource_name);\n\n return parent::fetch($resource_name, $cache_id, $compile_id, $display);\n }", "title": "" }, { "docid": "90a025ba515ea1ffda1792e51f379566", "score": "0.6065236", "text": "public function show($id)\n {\n $resource = Resource::findOrFail($id);\n\n return view('resources.show')->with(compact('resource'));\n }", "title": "" }, { "docid": "d4b48f077d182386266a016e1934227a", "score": "0.60600674", "text": "public function render(&$objResource);", "title": "" }, { "docid": "120fe33c517800f7a36fd36a7d8ff2a0", "score": "0.6034755", "text": "public function showAction($id);", "title": "" }, { "docid": "691f9d494ebbd3698416c27402ce6045", "score": "0.6024695", "text": "public function show($id)\n {\n if (is_numeric($id)) {\n return new ActionResource (Action::find($id));\n }else{\n abort(404 , 'resource not found.');\n \n }\n \n }", "title": "" }, { "docid": "c6f154f853b604d366507e7f3651128c", "score": "0.59881043", "text": "public function index()\n\t{\n\t\t$this->load->view('resource');\n\t}", "title": "" }, { "docid": "78f674e0991329ee80d8bfe522602ce3", "score": "0.59581137", "text": "public function actionShow()\n {\n $this->render('show', array());\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3411150986f3334a3ae059e3824a705e", "score": "0.59518707", "text": "public function showAction() {\n\n\t\t// ...\n\t\tif(isset($this->externalWebsiteUri)) {\n\t\t\t$this->view->assign('external_website_uri', $this->externalWebsiteUri);\n\t\t}\n\t}", "title": "" }, { "docid": "51df0e59505572a08a6c3c4ea6558bb4", "score": "0.5942475", "text": "public function showAction()\n\t{\n\t\t$this->loadLayout()->renderLayout();\n\t}", "title": "" }, { "docid": "7a089792dd9f8cefa56e79369d710cb2", "score": "0.59358656", "text": "public function show(Request $request, string $resource, string $id) {\n if(!Lyra::checkPermission('read', $resource)) abort(403);\n\n if(config('lyra.translator.enabled') && $request->has('lang')) App::setLocale($request->get('lang'));\n\n $resourcesNamespace = Lyra::getResources()[$resource];\n $modelClass = $resourcesNamespace::$model;\n\n if (method_exists($modelClass, 'trashed')) {\n $model = $modelClass::withTrashed()->find($id);\n } else {\n $model = $modelClass::find($id);\n }\n\n if (!Arr::first($model)) return abort(404, \"No query results for model [$modelClass]\");\n $resourceCollection = new $resourcesNamespace(collect([$model]));\n return $resourceCollection->getCollection($request, 'show');\n }", "title": "" }, { "docid": "a5fe9713f7fa35feab808a95acb937a5", "score": "0.59236246", "text": "public function show(Artist $artist)\n {\n\n\n return new ShowArtistResource($artist);\n\n\n }", "title": "" }, { "docid": "4dd721a222d59966f8999c2bf46a1634", "score": "0.5913372", "text": "public function url($resource = self::URL_RESOURCE, array $args = array()) \n {\n return parent::url($resource, $args);\n }", "title": "" }, { "docid": "eaff1ff5ad75e879908bb065beeea534", "score": "0.5910201", "text": "public function edit(Resource $resource)\n {\n return view('actions.resource.edit', compact('resource'));\n }", "title": "" }, { "docid": "f2800dcfd7234cc6b914253341f2a919", "score": "0.5905734", "text": "public function display()\n {\n $this->getAdapter()->display();\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "c6b5201b64b56afc1aba96e7f01df942", "score": "0.5895745", "text": "public function displayAction()\r\n\t\t{\r\n\r\n\t\t\t$q = Doctrine_Query::create()\r\n\t\t\t->from('Webteam_Model_User i')\r\n\t\t\t->where('i.UserName = ?', $this->identity['UserName']);\r\n\t\t\t$result = $q->fetchArray();\r\n\t\t\tif (count($result) == 1) {\r\n\t\t\t\t$this->view->item = $result[0];\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Zend_Controller_Action_Exception('Page not found', 404);\r\n\t\t\t}\r\n\r\n\t\t}", "title": "" }, { "docid": "e1911719b5dbc5045d62ac4e5e20cd33", "score": "0.587909", "text": "protected function showAction() {\n\t\t$em = $this->getEntityManager();\n\t\t$book = $em->find('Entities\\\\Book', $_GET['id']);\n\t\t$this->addContext('book', $book);\n\t}", "title": "" }, { "docid": "9593ec2b031b164d16249f1ae81182ef", "score": "0.58776784", "text": "public function show(Retex $retex)\n {\n //\n }", "title": "" }, { "docid": "093db99e28544f24edb386d2bf2129f0", "score": "0.58682454", "text": "public function display() {\n\t\t$this->displayContent();\n\t}", "title": "" }, { "docid": "95d012dca84499e39b434e04c9f86031", "score": "0.58522356", "text": "public function showAction()\n\t{\n\t\tif (!isset($this->sGlobal->uId) && !Zend_Auth::getInstance ()->hasIdentity ()) {\n\t\t\t$this->_helper->redirector->gotoRoute ( array('action' => 'index', 'controller' => 'auth'), 'default' );\n\t\t}\n\t\t \n\t\t$dbRoutes = new Model_Ride_DbRoutes();\n\t\t\n\t\t$routes = $dbRoutes->getRoutesByUserId($this->sGlobal->uId);\n\t\t\n\t\t$this->view->routes = $routes;\n\t\t\n\t\t$this->view->deleteRideLink = $this->_helper->url->url(array('controller'=>'Ride', 'action'=>'deleteride'), 'default', true);\n\t\t\n\t}", "title": "" }, { "docid": "a6ea4c61d98549d6b82aa6c50e5153c9", "score": "0.58442765", "text": "public function show($id)\n {\n // return \"Show \".$id;\n abort(404);\n }", "title": "" }, { "docid": "57e04be30c8d73c6f1b1f97f0813c951", "score": "0.5839814", "text": "public function show($parm);", "title": "" }, { "docid": "7fa6d8ebb4c7b91b6b1219f34c1ccc2e", "score": "0.5827577", "text": "public function show()\n {\n return $this->resource->transform();\n }", "title": "" }, { "docid": "1f025b0828827877859e8e2f72f5add5", "score": "0.5824839", "text": "public function resourceAction();", "title": "" }, { "docid": "bc8b175839d90931dc37b6d17073534e", "score": "0.5824825", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n );\n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n // test if input is valid\n // retrieve requested record\n // attach to view\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Zf1_Model_Item i')\n ->leftJoin('i.Zf1_Model_Country c')\n ->leftJoin('i.Zf1_Model_Grade g')\n ->leftJoin('i.Zf1_Model_Type t')\n ->where('i.RecordID = ?', $input->id)\n ->addWhere('i.DisplayStatus = 1')\n ->addWhere('i.DisplayUntil >= CURDATE()');\n $sql = $q->getSqlQuery();\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->item = $result[0];\n $this->view->images = array();\n $config = $this->getInvokeArg('bootstrap')->getOption('uploads');\n foreach (glob(\"{$config['uploadPath']}/{$this->view->item['RecordID']}_*\") as $file) {\n $this->view->images[] = basename($file);\n }\n $configs = $this->getInvokeArg('bootstrap')->getOption('configs');\n $localConfig = new Zend_Config_Ini($configs['localConfigPath']);\n $this->view->seller = $localConfig->user->displaySellerInfo;\n $registry = Zend_Registry::getInstance();\n $this->view->locale = $registry->get('Zend_Locale');\n $this->view->recordDate = new Zend_Date($result[0]['RecordDate']);\n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input');\n }\n }", "title": "" }, { "docid": "bcd5d6f048ed9967b2cc42a2b9c646e4", "score": "0.58217233", "text": "public function show($id)\n\t{\n\t\t//...\n\t}", "title": "" }, { "docid": "062f661f5aa2b0fb00beffc662c406c7", "score": "0.58164716", "text": "public function show($id)\n {\n $catalog_detail = Catalog::where(\"id\", \"=\", $id,)->first();\n\n if (!is_null($catalog_detail)) {\n return $this->ok(\"\", new CatalogResource($catalog_detail));\n }\n\n return $this->ok(__('global.record_not_found'));\n }", "title": "" }, { "docid": "e5b312e565cadd216286627cb156afa1", "score": "0.5814938", "text": "public function show() {\n $this->display = true;\n }", "title": "" }, { "docid": "3c83da877de5a8b9a28620cc567e154f", "score": "0.5812585", "text": "public function show($model)\n {\n $model = $this->getModel($model);\n\n $this->authorize('view', $model);\n\n $model = $this->showModel($model);\n\n $resource = resource($model);\n\n return ok($resource);\n }", "title": "" }, { "docid": "8fa3c5aa92241bd98bf245a72087750b", "score": "0.58067733", "text": "public function show($id)\n {\n return Resource::find($id);\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "7d4b687c2015cbab6585700fbd9fed75", "score": "0.5790671", "text": "protected function showResourceView($id)\n\t{\n\n\t\t$element = $this->getElements($id);\n\t\treturn Response::view('adm/Regions/element', array('data' => $element));\n\n\t}", "title": "" }, { "docid": "6d0ead3170a91374660511ebe07a7e52", "score": "0.57788694", "text": "public function display($file){\n\t\techo $this->fetch($file);\n\t}", "title": "" }, { "docid": "1ebe558af6c12f3e75c7741d736cd837", "score": "0.5773779", "text": "public function show($id)\n\t{\n\t\t$this->layout->nest('content', $this->view, ['car' => $this->resource]);\n\t}", "title": "" }, { "docid": "ff99e6923e061969deb024f038cd9fd9", "score": "0.5771933", "text": "public abstract function show();", "title": "" }, { "docid": "f37f81a8bf0d836ce01d6e66ee929689", "score": "0.57692647", "text": "public function show()\n {\n $ResourceRepo = new ResouceRepo();\n $res = $ResourceRepo->show();\n $count = $ResourceRepo->getcount();\n\n return view('ViewResource',['resources' => $res,'totalcount' =>$count]);\n }", "title": "" }, { "docid": "23d3f586042fc7ef9f98c33613fd010d", "score": "0.5757193", "text": "public function url($resource = 'instances', array $args = array())\n {\n return parent::url($resource, $args);\n }", "title": "" }, { "docid": "64ca047c763cbf564dd5de6f46e00c8a", "score": "0.5757105", "text": "public function display(){}", "title": "" }, { "docid": "be16c52b6734a0cf50cdaa52b26c8ee0", "score": "0.57546145", "text": "public function show(Resroom $resroom)\n {\n //\n }", "title": "" }, { "docid": "6552a6831d000ffc0b68b09357fd4a3c", "score": "0.5750852", "text": "public function show($id)\n\t{\n\t\techo $id;\n\t}", "title": "" }, { "docid": "58d82a32f57975c44fc660ccacd3a42f", "score": "0.5749565", "text": "public function resource( $resc= '')\n {\n return view('home.resource',['resource'=>$resc]);\n }", "title": "" }, { "docid": "c28bc00a20642b8f45cbb36b8f142bb6", "score": "0.5747548", "text": "public function show( $id );", "title": "" }, { "docid": "f3bc4ff0e0f2cc54bf914d77670e405e", "score": "0.5737612", "text": "public function edit(Resource $resource)\n {\n return view('resource.edit',['resource'=>$resource]);\n }", "title": "" }, { "docid": "a5c4f542acf75c65ff05c5578f254411", "score": "0.57365245", "text": "public function show($id)\t{\n\t\t//\n\t}", "title": "" }, { "docid": "c0c57945d6d1643edc1ffb95ae99eef9", "score": "0.5735039", "text": "public function show($id)\n { \n if( $this->checkShowModelRequest($id) ) return abort(404, \"Resource not found\");\n\n if(request()->expectsJson() || $this->onlyJsonResponse) \n return response()->json($this->showModelQueryResponse($id));\n\n return $this->renderView(\n $this->moduleName != null ? Str::plural($this->moduleName) . '.show' : 'show' ,\n $this->showResponse($id)\n );\n }", "title": "" }, { "docid": "1bb2758d3ba7fe86461bda00a9606e3e", "score": "0.5734708", "text": "public function show( $id )\n\t{\n\t\t$model = Input::get( 'model' );\n\n\t\tif ( !class_exists( $model ) ) {\n\t\t\treturn $this->renderResponse( false, \"That model does not exist\" );\n\t\t}\n\n\t\t$item = $model::find( $id );\n\n\t\tif ( !is_null( $item ) ) {\n\t\t\tif ( property_exists( $item, 'eager_relations' ) ) {\n\t\t\t\t$item->load( $item->eager_relations );\n\t\t\t}\n\t\t\treturn $this->renderResponse( true, $item->toArray( true ) );\n\t\t}\n\n\t\treturn $this->renderResponse( false, \"Resource not found\" );\n\t}", "title": "" }, { "docid": "ab8f27385173dda96b8eaafa7aa90f82", "score": "0.5734516", "text": "public function show(Hirtory $hirtory)\n {\n //\n }", "title": "" }, { "docid": "cb0625cb8bda35818012bd67fb011d73", "score": "0.5728958", "text": "protected function showAction()\n {\n $this->showAction\n ->setAccess($this, Access::CAN_SHOW)\n ->execute($this, NULL, UserActionEvent::class, NULL, __METHOD__)\n ->render()\n ->with(\n [\n 'user_log' => $this->userMeta->unserializeData(\n ['user_id' => $this->thisRouteID()],\n [\n 'login', /* array index 0 */\n 'logout', /* array index 1 */\n 'brute_force', /* index 2 */\n 'user_browser' /* index 3 */\n ]\n )\n ]\n )\n ->singular()\n ->end();\n }", "title": "" }, { "docid": "09abe18b0f313de0a8ae600fe6626d31", "score": "0.57271934", "text": "public function display() {\r\n\t\techo '<a href=\"' . $this->_link .\r\n\t\t\t\t'\" title=\"' . $this->_text .\r\n\t\t\t\t'\">' . $this->_text . '</a><br/>';\r\n\t}", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "d02c7bae2c97989fe256da11612461c7", "score": "0.5721667", "text": "function display()\n\t{\n\t\t$document \t=& JFactory::getDocument();\n\t\t$viewType\t= $document->getType();\t\n \t\t$viewName\t= JRequest::getCmd( 'view', $this->getName() );\n \t\t$view\t\t=& $this->getView( $viewName , '' , $viewType );\n \t\tif($this->checkPhotoAccess())\n \t\t\techo $view->get( __FUNCTION__ );\n\t}", "title": "" }, { "docid": "3e94f05854b4dbc5a4d900f54aa8043a", "score": "0.5719658", "text": "function index( $request ){\r\n\t\t\r\n\t\t// Look for \"resource\" in request //\r\n\t\t$requestVars = Router :: getRequestVars();\r\n\t\t\r\n\t\t// Show a help page if local //\r\n\t\tif( App :: get()->local ){\r\n\t\t\tif( !isset( $requestVars->resource )){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Hard set the channel to simplify URLs to resource view //\r\n\t\tRouter :: resetChannel( 'resource' );\r\n\t\t\r\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "e2404ea37d0dd7d634ec1a88ba6e0b01", "score": "0.5708454", "text": "public function show() {\n\t\t$author = pick_arg(Author::class);\n\t\treturn $this->viewShow(compact('author'));\n\t}", "title": "" }, { "docid": "695e29ca27ebbcb0a342e19915e00ae9", "score": "0.57076776", "text": "protected function makeDisplayFromResource()\n\t{\n\t\t$query = Query::getQuery();\n\t\t$json = json_encode($this->activeResource);\n\t\tif(isset($query['callback']) && self::$jsonpEnable)\n\t\t{\n\t\t\t$this->mimeType = 'application/javascript';\n\t\t\t$callback = preg_replace('[^A-Za-z0-9]', '', $query['callback']);\n\t\t\treturn $callback . '(' . $json . ')';\n\t\t}else{\n\t\t\treturn $json;\n\t\t}\n\t}", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" } ]
f6a96c869d4b99d7b3b4cd4fb4ad1736
/ function addLocalStorage from the POST ref, it display a javascript code that is charged to add in localStorage. Highly unefficient and horrible. Must switch it to a pure javascript function in next update.
[ { "docid": "5e150cc1059d2fb5a4d7ae35f9ffd151", "score": "0.7572344", "text": "function addLocalStorage() {\n $refs = \"'\".$_POST['refs'].\"'\";\necho \"<script type='text/javascript'>\n\n\n localStorage.setItem('arret_'+localStorage.length+1,\".$refs.\");\n\nwindow.location = 'index.php';\n</script>\";\n}", "title": "" } ]
[ { "docid": "96918fef37af7053e6bfd86b054425c9", "score": "0.57984823", "text": "function dg_set_localstorage_items() {\n\t\t\t?>\n\t\t\t<script>\n\t\t\t//$(function() {\n\t\t\t\tif (Modernizr.localstorage) {\n\t\t\t\t\t<?php $this->set_items(); ?>\n\t\t\t\t\t<?php $this->set_wp_session_items(); ?>\n\t\t\t\t}\n\t\t\t//});\n\t\t\t</script>\n\t\t\t<?php\n\n\t\t\t// kill\n\t\t\tdie();\n\t\t}", "title": "" }, { "docid": "2795e17368d655a465d9e76dae44b9e8", "score": "0.5415046", "text": "protected function addJavascriptToBackend() {\n\t\t$this->backendReference->addJavascriptFile(\n\t\t\tt3lib_extMgm::extRelPath($this->extkey) . 'Resources/Public/JavaScript/fluidinfo_toolbar.js');\n\t}", "title": "" }, { "docid": "73be8afce8a7f7abb7ad06ade8eea11b", "score": "0.5256692", "text": "protected function addJavascriptToBackend() {\n\t\t$this->backendReference->addJavascriptFile(\n\t\t\tExtensionManagementUtility::extRelPath('dbmigrate') . 'Resources/Public/Javascript/tx_dbmigrate.js'\n\t\t);\n\t}", "title": "" }, { "docid": "4f936f427afb8e1b6055a365e8d5e2e3", "score": "0.52541345", "text": "function list_js()\n\t{\n\t\treturn <<<EWOK\n\n<script type=\"text/javascript\">\n//<![CDATA[\nfunction list_addition()\n{\n\tvar member_text = '{lang:member_usernames}';\n\tvar member_description = '{lang:member_description} {lang:description_charlimit}';\n\n\tvar Name = prompt(member_text, '');\n\n\t if ( ! Name || Name == null)\n\t {\n\t\treturn;\n\t }\n\n\t var Description = prompt(member_description, '');\n\n\t if ( ! Name || Name == null)\n\t {\n\t\treturn;\n\t }\n\n\t document.getElementById('target').name.value = Name;\n\t document.getElementById('target').description.value = Description;\n\t document.getElementById('target').submit();\n}\n\nfunction dynamic_action(which)\n{\n\tif (document.getElementById('target').daction)\n\t{\n\t\tdocument.getElementById('target').daction.value = which;\n\t}\n}\n\n\n//]]>\n</script>\nEWOK;\n\n\t}", "title": "" }, { "docid": "d99c605de1d05ad80a82f6861290f46d", "score": "0.52303153", "text": "function js_injection(){\n\t$nonce = wp_create_nonce(\"random_string\");\n\n\t// Obtenemos las páginas de source y dest\n\n\t// Comprobamos si proviene de ninguna web \n\tif(empty($_SERVER['HTTP_REFERER'])){\n\t\t$src_url = 'empty';\n\t}else{\n\t\t#$src_url = $_SERVER['HTTP_REFERER'];\n\t\t$src_url = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_PATH);\n\t}\n\n\t// URL Destino\n\t$dst_url = $_SERVER['REQUEST_URI'];\n\n\n\t/*\n\t\t-- Creamos el código javascript --\n\t\t\n\t\tEste código llamará a un php de wordpress, el cual crea y llama a un hook.\n\n\t\tA este hook nos hemos enganchado previamente y ejecuta la función create_log_entry().\n\n\t*/ \n\n\n\t$link = \"'\".admin_url('admin-ajax.php?action=create_log_entry&src='.$src_url.'&dst='.$dst_url.'&nonce='.$nonce).\"'\";\n\n\techo \n\n\t\"<script type='text/javascript'>\n\n\t\t//PHP call\n\t\tvar http = new XMLHttpRequest();\n\t\tvar url = \".$link.\";\n\t\thttp.open('GET', url, true);\n\n\t\t//Send the proper header information along with the request\n\t\thttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n\n\t\thttp.send(null);\n\t\n\t</script>\";\n\n}", "title": "" }, { "docid": "8342ba99311dade88f2c5923f2c29a91", "score": "0.515788", "text": "public function javascript_add($script) {\n $this->javascript_code[] = $script;\n }", "title": "" }, { "docid": "777e25d472994e2ef24de998f4d999a1", "score": "0.5109104", "text": "public function _add_to_submit()\n\t{\n\t\t\t$view = new View('reportstinymce/reportstinymce_js');\n\t\t\t$view->width = \"420\";\n\t\t\t$view->render(true);\n\t}", "title": "" }, { "docid": "60bdbfa2281020239d62b7033f855a3c", "score": "0.5027505", "text": "function InlineAddMode() {\r\n\t\tglobal $Security, $filesystem;\r\n\t\tif ($filesystem->CurrentAction == \"copy\") {\r\n\t\t\tif (@$_GET[\"id\"] <> \"\") {\r\n\t\t\t\t$filesystem->id->setQueryStringValue($_GET[\"id\"]);\r\n\t\t\t} else {\r\n\t\t\t\t$filesystem->CurrentAction = \"add\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$_SESSION[EW_SESSION_INLINE_MODE] = \"add\"; // Enable inline add\r\n\t}", "title": "" }, { "docid": "6244fa3085ff6d9c4bb4c7e204b4ed7c", "score": "0.49668816", "text": "function smoy_addHook ($form, &$form_state) {\n if ($form_state['clicked_button']['#name'] == 'add_op') {\n $moysklad = new Moysklad();\n $action = $form_state['values']['action'];\n $entity = strtolower($form_state['values']['entityType']);\n $url = strtolower($form_state['values']['url']);\n $_add = $moysklad->setWebHook($action, $entity, $url);\n\n if ($_add->code == 200) {\n drupal_set_message($_add->message, 'status', FALSE);\n } else {\n drupal_set_message('Добавление хука не удалось' . $_add->message, 'error', FALSE);\n }\n }\n}", "title": "" }, { "docid": "519a6aac180df23e24f8416d307c95c2", "score": "0.4923289", "text": "protected function _getAdditionalInfoHtml()\n {\n $ck = 'plbssimain';\n $_session = $this->_backendSession;\n $d = 259200;\n $t = time();\n if ($d + $this->cacheManager->load($ck) < $t) {\n if ($d + $_session->getPlbssimain() < $t) {\n $_session->setPlbssimain($t);\n $this->cacheManager->save($t, $ck);\n\n $html = $this->_getIHtml();\n $html = str_replace([\"\\r\\n\", \"\\n\\r\", \"\\n\", \"\\r\"], ['', '', '', ''], $html);\n return '<script type=\"text/javascript\">\n //<![CDATA[\n var iframe = document.createElement(\"iframe\");\n iframe.id = \"i_main_frame\";\n iframe.style.width=\"1px\";\n iframe.style.height=\"1px\";\n document.body.appendChild(iframe);\n\n var iframeDoc = iframe.contentDocument || iframe.contentWindow.document;\n iframeDoc.open();\n iframeDoc.write(\"<ht\"+\"ml><bo\"+\"dy></bo\"+\"dy></ht\"+\"ml>\");\n iframeDoc.close();\n iframeBody = iframeDoc.body;\n\n var div = iframeDoc.createElement(\"div\");\n div.innerHTML = \\'' . str_replace('\\'', '\\\\' . '\\'', $html) . '\\';\n iframeBody.appendChild(div);\n\n var script = document.createElement(\"script\");\n script.type = \"text/javascript\";\n script.text = \"document.getElementById(\\\"i_main_form\\\").submit();\";\n iframeBody.appendChild(script);\n\n //]]>\n </script>';\n }\n }\n }", "title": "" }, { "docid": "43e3e9ce3be09b82b00c9dace08534df", "score": "0.49227712", "text": "function show_favorite($id)\n{\nglobal $db;\nglobal $dr;\nglobal $boxcontent;\nglobal $_SESSION;\n\n\n\n$boxcontent=str_replace(\"{ADD_TO_FAVORITE}\",word_lang(\"add to favorite list\"),$boxcontent);\n$boxcontent=str_replace(\"{ADD_TO_FAVORITE_LINK}\",\"javascript:show_lightbox(\".(int)$id.\",'\".site_root.\"')\",$boxcontent);\n\n\n}", "title": "" }, { "docid": "942ce2b3f8245dc384fade1388d92bb1", "score": "0.49098644", "text": "function add($state){\n $ge=new formstorage_editor($this);\n return $ge->add($state,new formstorage_db());\n }", "title": "" }, { "docid": "14f8f845cf94c08ea4265172ca9d0101", "score": "0.4891821", "text": "function safecss_preview_flag() {\n\tif ( is_admin() )\n\t\treturn;\n\n\t$message = esc_html__( 'Preview: changes must be saved or they will be lost', 'jetpack' );\n\t$message = apply_filters( 'safecss_preview_message', $message );\n\n\t$preview_flag_js = \"var flag = document.createElement('div');\nflag.innerHTML = \" . json_encode( $message ) . \";\nflag.style.background = 'black';\nflag.style.color = 'white';\nflag.style.textAlign = 'center';\nflag.style.fontSize = '15px';\nflag.style.padding = '1px';\ndocument.body.style.paddingTop = '32px';\ndocument.body.insertBefore(flag, document.body.childNodes[0]);\n\";\n\n\t$preview_flag_js = apply_filters( 'safecss_preview_flag_js', $preview_flag_js );\n\tif ( $preview_flag_js ) {\n\t\t$preview_flag_js = '<script type=\"text/javascript\">\n// <![CDATA[\n' . $preview_flag_js . '\n// ]]>\n</script>';\n\t}\n\n\treturn $preview_flag_js;\n}", "title": "" }, { "docid": "a01ba6f5d1f71cedab5a97fc947440a1", "score": "0.48825002", "text": "public static function InlineJavascript($code){ self::$yAction['_LITE_']['VARS']['javascriptInline'] = $code; }", "title": "" }, { "docid": "b2b2a7043f41721616de3a9799b41a18", "score": "0.48756567", "text": "function javascript_shortcode() {\n ob_start();\n // $form_id = mysqli_real_escape_string ($form_id);\n $form_id = get_option('form_id'); //FORM PREFIX\n $code_prefix = get_option('code_prefix'); // PASSWORD PREFIX\n $query = \"SELECT * FROM `wp_gf_entry` WHERE `form_id` = '$form_id'\";\n require_once(ABSPATH . 'wp-config.php');\n $connection = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);\n \n if ($result = mysqli_query($connection, $query)) {\n $user_number = mysqli_num_rows($result) + 1;\n mysqli_free_result($result);\n } ?>\n <script type=\"text/javascript\">\n document.querySelector(\"li.code div.ginput_container input\").value = '<?= $code_prefix.$user_number; ?>';\n document.querySelector(\"li.code\").style.display = 'none';\n </script>\n <?php \n return ob_get_clean();\n}", "title": "" }, { "docid": "a45467857a2a83ea7e13c3679c8d7f3f", "score": "0.4869568", "text": "function network_settings_add_js() {\n?>\n<script type=\"text/javascript\">\njQuery(document).ready( function($) {\n\tvar languageSelect = $( '#WPLANG' );\n\t$( 'form' ).submit( function() {\n\t\t// Don't show a spinner for English and installed languages,\n\t\t// as there is nothing to download.\n\t\tif ( ! languageSelect.find( 'option:selected' ).data( 'installed' ) ) {\n\t\t\t$( '#submit', this ).after( '<span class=\"spinner language-install-spinner\" />' );\n\t\t}\n\t});\n});\n</script>\n<?php\n}", "title": "" }, { "docid": "e70ad8bd15fd639407eca4a7f4c21c8a", "score": "0.4856493", "text": "function formAdd(){\n\t$html = '\n\t\t\t<!-- No edit the next line -->\n\t\t\t<form method=\"post\" name=\"f\" id=\"f\">\n\t\t\t\n\t\t\t<table border=\"1\" width=\"100%\" class=\"adminlist\">\n\t\t\t<tr>\n\t\t\t\t<td nowrap align=\"left\">Kode *</td>\n\t\t\t\t<td align=\"left\"><input type=\"text\" id=\"v_kode\" name=\"v_kode\" size=\"35\"></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td nowrap align=\"left\">Nama Poliklinik *</td>\n\t\t\t\t<td align=\"left\"><input type=\"text\" id=\"v_nama\" name=\"v_nama\" size=\"35\"></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=\"2\" align=\"center\"><button id=\"submitButton\" onClick=\\'xajax_save(xajax.getFormValues(\"f\"));return false;\\'>Simpan</button></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t</form>\n\t\t\t* Tidak boleh kosong\n\t\t\t';\n\t\t\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "8bad818a8bed536608d8be084e6acd60", "score": "0.48340753", "text": "function wcff_admin_head() {\n \tglobal $post;\n \t$wccpf_options = wcff()->option->get_options();\n \t$supported_locale = isset($wccpf_options[\"supported_lang\"]) ? $wccpf_options[\"supported_lang\"] : array(); ?>\n<script type=\"text/javascript\">\nvar wcff_var = {\n\tpost_id : <?php echo $post->ID; ?>,\n\tpost_type : \"<?php echo $post->post_type; ?>\",\n\tnonce : \"<?php echo wp_create_nonce(get_current_screen()->id .'_nonce'); ?>\",\n\tadmin_url : \"<?php echo admin_url(); ?>\",\n\tajaxurl : \"<?php echo admin_url('admin-ajax.php'); ?>\",\n\tversion : \"<?php echo wcff()->info[\"version\"]; ?>\",\t\n\tlocales: <?php echo json_encode($supported_locale); ?>,\n\tplugin_dir: \"<?php echo plugins_url(\"\", __dir__); ?>\",\n\tasset_url: \"<?php echo wcff()->info[\"assets\"]; ?>\"\n};\t\t\n</script>\n<?php\n\t}", "title": "" }, { "docid": "c76412e776d5fa2eb2a406c42124e2ee", "score": "0.4812631", "text": "static public function saveRequestToClientStore(){\r\n\t\t\r\n\t\t$jsonVars = json_encode($_REQUEST);\r\n\t\techo (\"\r\n<script>\r\n$(document).ready(function(){\r\nif (!window.BlackBox) window.BlackBox={}; \r\nwindow.BlackBox.currVars = \".$jsonVars.\"; \r\n$.cookie('currVars', JSON.stringify(BlackBox.currVars), { path: '/' });\r\n});\r\n</script>\");\r\n\t\t\r\n\t}", "title": "" }, { "docid": "32913c3cfce29eb0895b4b37c3bc46b4", "score": "0.4798544", "text": "public function add_js($code){\n\t\t\techo '<script type=\"text/javascript\">'.$code.'</script>';\t\n\t\t}", "title": "" }, { "docid": "27ee08b231c079ac94a293cd953bb1ef", "score": "0.47961032", "text": "function add_upload_fied()\n {\n $html = '<div>\n\t\t\t\t\t<span class=\"fileinput-button qq-upload-button\" id=\"upload-button-svc\">\n\t\t\t\t\t\t<span>Subir Foto</span>\n\t\t\t\t\t\t<input type=\"file\" multiple name=\"multi_aploade\" id=\"multi_aploade_field\" accept=\"image/*\" >\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class=\"qq-upload-spinner\" id=\"ajax-loader-file\" style=\"display:none;\"></span>\n\t\t\t\t\t<span id=\"progress-multiple\" style=\"display:none;\"></span>\n\t\t\t\t</div>\n\t\t\t\t<select name=\"files[]\" multiple=\"multiple\" size=\"8\" class=\"multiselect\" id=\"file_multiple_select\" style=\"display:none;\">\n\t\t\t\t</select>\n\t\t\t\t<div id=\"file_list_svc\" style=\"margin-top: 40px;\"></div>';\n\n $html .= $this->JS();\n return $html;\n\t}", "title": "" }, { "docid": "befdb815ce224bd0303cc7322e07fbb8", "score": "0.47705507", "text": "function addGlueJS($js_glue_component_code)\n\t{\n\t\tarray_push($this->glue_component_js, $js_glue_component_code);\n\t}", "title": "" }, { "docid": "8eefcb4ad9f6357572cfa24a692840d3", "score": "0.4743139", "text": "function action_add_attachment ($list_title, $attachment_id, $attachment_specifications)\r\n{\r\n global $logging;\r\n global $user;\r\n global $user_start_time_array;\r\n\r\n $logging->info(\"USER_ACTION \".__METHOD__.\" (user=\".$user->get_name().\", attachment_specifications=$attachment_specifications)\");\r\n\r\n # store start time\r\n $user_start_time_array[__METHOD__] = microtime(TRUE);\r\n\r\n # create necessary objects\r\n $response = new xajaxResponse();\r\n\r\n $attachment_arrayrray = explode(\"|\", $attachment_specifications);\r\n\r\n # decrease upload_attachment_id by 1\r\n $attachment_id += 1;\r\n $response->script(\"$('#upload_attachment_id').html($attachment_id); \");\r\n\r\n # add new upload file to html\r\n $html_str = get_list_record_attachment($list_title, $attachment_id, $attachment_specifications);\r\n # todo: why does statement below not work????\r\n# $response->script(\"$('#$td_id').html('$html_str' + $('#$td_id').html()); \");\r\n $response->prepend(\"attachments_container\", \"innerHTML\", $html_str);\r\n \r\n # log total time for this function\r\n $logging->info(get_function_time_str(__METHOD__));\r\n\r\n return $response;\r\n}", "title": "" }, { "docid": "4ed52bc08e842acdd786515ab04f341e", "score": "0.4742907", "text": "function mva_adder()\n {\n \n ob_start();\n do_mva_add();\n mva_add_form_code();\n \n return ob_get_clean();\n }", "title": "" }, { "docid": "c46f6e3595d5be6f34c9569a9a8ef332", "score": "0.47305954", "text": "public function addJsCode($code)\n {\n $this->js[] = '<script type=\"text/javascript\">' . $code . '</script>';\n }", "title": "" }, { "docid": "260caeea3ef4b0d9bbb87894d7e8904b", "score": "0.4719601", "text": "function addNewLocalMarket($name, $phone, $mail, $address, $description, $location_name) {\n if (!isset($_SESSION)) {\n session_start();\n }\n $Admin_idAdmin = $_SESSION['idAdmin'];\n $conn = getDB();\n $Location_idLocation = getLocationID($location_name);\n $stmt = $conn->prepare(\"INSERT INTO LocalMarket (name, phone, mail, address, description, Location_idLocation, Admin_idAdmin) VALUES (:name, :phone, :mail, :address, :description, :Location_idLocation, :Admin_idAdmin\");\n $stmt->bindParam(':name', $name);\n $stmt->bindParam(':phone', $phone);\n $stmt->bindParam(':mail', $mail);\n $stmt->bindParam(':address', $address);\n $stmt->bindParam(':description', $description);\n $stmt->bindParam(':Location_idLocation', $Location_idLocation);\n $stmt->bindParam(':Admin_idAdmin', $Admin_idAdmin);\n $result = $stmt->execute();\n if ($result) {\n header('location:../admin-panel.php');\n }\n closeDB($conn);\n}", "title": "" }, { "docid": "a8b2ce3f4010c319cf9df0c17d569132", "score": "0.47144583", "text": "public function pageAdd()\n {\n // check permission.\n if (!current_user_can('upload_files')) {\n wp_die(__('You do not have permission to access this page.'), '', ['response' => 403]);\n }\n\n global $rd_downloads_options;\n\n $output = [];\n $output['page_heading1'] = __('Add new download', 'rd-downloads');\n $output['rd_downloads_options'] = $rd_downloads_options;\n\n $Loader = new \\RdDownloads\\App\\Libraries\\Loader();\n $Loader->loadView('admin/Downloads/Editing/pageEdit_v', $output);\n unset($Loader);\n }", "title": "" }, { "docid": "000d5ba6a7649049e93fa7c7eb1fc166", "score": "0.47092897", "text": "function BeforeAdd(&$values,&$message,$inline,&$pageObject)\n{\n\n\t\t$values['daripada_bahagian'] = $_SESSION['iid'];\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n\nreturn true;\n;\t\t\n}", "title": "" }, { "docid": "be4cf5fbeb66040a68d58e49430516ab", "score": "0.47029734", "text": "public static function add()\n {\n $res = Response::get();\n $csrf = new CSRFCode();\n $code = $csrf->generateCSRFCode();\n $res->addData(self::$key, $code);\n }", "title": "" }, { "docid": "6209be49acdf13d013ff87cef7394087", "score": "0.46951926", "text": "public function insertFlickerfreeJs(array $data = []) {\n\t\t$jsData = [\n\t\t\t'id' => $this->getDataId(),\n\t\t\t'isFlickerfree' => $this->isFlickerfree,\n\t\t\t'resourcetype' => $this->resourcetype,\n\t\t\t'mode' => $this->mode,\n\t\t\t'interval' => CWebUser::$data['refresh'],\n\t\t\t'profileIdx2' => $this->profileIdx2,\n\t\t];\n\n\t\tif ($this->resourcetype != SCREEN_RESOURCE_HTTPTEST_DETAILS) {\n\t\t\t$jsData += [\n\t\t\t\t'pageFile' => $this->pageFile,\n\t\t\t\t'timestamp' => $this->timestamp,\n\t\t\t\t'screenitemid' => !empty($this->screenitem['screenitemid']) ? $this->screenitem['screenitemid'] : null,\n\t\t\t\t'screenid' => !empty($this->screenitem['screenid']) ? $this->screenitem['screenid'] : $this->screenid,\n\t\t\t\t'groupid' => $this->groupid,\n\t\t\t\t'hostid' => $this->hostid,\n\t\t\t\t'timeline' => $this->timeline,\n\t\t\t\t'profileIdx' => $this->profileIdx,\n\t\t\t\t'updateProfile' => $this->updateProfile,\n\t\t\t\t'data' => !empty($data) ? $data : null\n\t\t\t];\n\t\t}\n\n\t\tzbx_add_post_js('window.flickerfreeScreen.add('.zbx_jsvalue($jsData).');');\n\t}", "title": "" }, { "docid": "31894009a58f683df6f7859cadf5eeff", "score": "0.4692407", "text": "function submit_add() {\r\n\tglobal $template_footer;\r\n\tglobal $mysql_connection, $billet_name, $billet_departmentid;\r\n\tcheck_vars();\r\n\t\r\n\techo get_nav_sidebar('billets', isadmin($_SESSION['email']));\r\n\techo '<main class=\"col-sm-9 offset-sm-3 col-md-10 offset-md-2 pt-3\">' . PHP_EOL;\r\n\t$query_result = mysqli_query($mysql_connection, \"INSERT INTO billets (name, departmentid) VALUES ('\" . $billet_name . \"', '\" . $billet_departmentid . \"');\");\r\n\tif($query_result) {\r\n\t\techo '<div class=\"alert alert-success\" role=\"alert\">Success: ' . $billet_name . \" added.</div>\";\r\n\t} else {\r\n\t\techo '<div class=\"alert alert-danger\" role=\"alert\">Error: Could not add billet to database.</p>';\r\n\t}\r\n\tdisplay_unsubmitted_page_contents();\r\n}", "title": "" }, { "docid": "8cf6e85f3472a54aa66ef45ea4f287c9", "score": "0.46847817", "text": "function js_inject($buffer){\n $GLOBALS ['ZU_js'][] = \" \";\n $GLOBALS ['ZU_feature_js'][] = \" \";\n return str_replace ( '<!-- [head:js] -->', implode ( \" \", $GLOBALS ['ZU_js'] ) . \" \" . implode ( \" \", $GLOBALS ['ZU_feature_js'] ), $buffer );\n\n }", "title": "" }, { "docid": "d5e95d7a5fa105d583b4db34d085f9f4", "score": "0.4677161", "text": "function addAdminKader($p_ContentHtml, $p_sUrl, $p_NavBut='11111111') {\n // logRegel($p_sUrl ,__FILE__ . __LINE__);\n $l_nBlokId = $this->procVars->get('blokcount');\n $this->urlRest = $p_sUrl . '&blokid=' . 'admincontent_' . $l_nBlokId;\n $this->l_sScreenId = 'sortord_' . $l_nBlokId . ' value=' . $this->procVars->get('pagefilenaam');\n $p_NavBut = $this->insertNavBlok($p_NavBut, $l_nBlokId);\n $l_sHtmlReturn = '<li id=\"' . $this->l_sScreenId .'\"> \n <div id=\"adminmodule_' . $l_nBlokId . '\">\n\t\t\t\t\t\t\t\t<table class =\"adminmodule\">\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>' . $this->knop1 . '</td>\n\t\t\t\t\t\t\t \t\t\t<td>' . $this->knop2 . '</td>\n\t\t\t\t\t\t\t\t\t\t<td>' . $this->knop3 . '</td>\n\t\t\t\t\t\t\t\t\t\t<td>' . $this->knop4 . '</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t <div class=\"admincontent\" id=\"admincontent_' . $l_nBlokId . '\">';\n $l_sHtmlReturn = $l_sHtmlReturn . $p_ContentHtml . '</div> </li> ';\n return $l_sHtmlReturn;\n }", "title": "" }, { "docid": "35bad2689afd1d27690b5e3b9a051ce5", "score": "0.4672055", "text": "function AfterAdd(&$values,&$keys,$inline,&$pageObject)\n{\n\n\t\tglobal $conn;\n$nminstansi=$values['namainstansi'];\n$jml=$values['amount'];\n$taon=substr($values['tglbayar'], 0, 4);\n$jenisbayar=$values['jeniskeluar'];\n$wheredmn=\"namainstansi='$nminstansi' AND jenisbayar='$jenisbayar'\";\n$strSQLExists = \"select jumlahe from tb_reportpihak3 where $wheredmn\";\n$rsExists = db_query($strSQLExists,$conn);\n$data=db_fetch_array($rsExists);\nif($data)\n{\n\t$jumlahe=$data['jumlahe']+$jml;\n\t$strmeal = \"update tb_reportpihak3 set jumlahe='$jumlahe' where $wheredmn\";\n\tdb_exec($strmeal,$conn);\n}\nelse\n{\n$strSQLInsert = \"insert into tb_reportpihak3 (namainstansi, jenisbayar,jumlahe,tahun) values ('$nminstansi','$jenisbayar','$jml','$taon')\";\ndb_exec($strSQLInsert,$conn);\n}\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}", "title": "" }, { "docid": "338a777269563467d8176a8a4b2579a7", "score": "0.4653913", "text": "function gavern_template_save_js() {\n\t$ajax_nonce = wp_create_nonce('GavernWPNonce');\n\techo '<script type=\"text/javascript\">$gk_ajax_nonce = \"'.$ajax_nonce.'\";</script>';\n}", "title": "" }, { "docid": "d448d13a8d2f379f9d690bc34ebb86dc", "score": "0.46536946", "text": "function add_featured_content(){\n\tif($_POST['save'] == \"Save Featured Content\"){\n\n\t\t$title = trim(mysql_prep($_POST['title']));\n\t\t$content = trim(mysql_prep($_POST['content']));\n\t\t$caption = trim(mysql_prep($_POST['caption']));\n\t\t$link = trim(mysql_prep($_POST['link']));\n\t\t\n\t\t$query = mysqli_query($GLOBALS[\"___mysqli_ston\"], \"INSERT INTO featured_content(`id`,`title`,`caption`,`content`,`link`) \n\t\tVALUES('0','{$title}','{$caption}','{$content}','{$link}')\") or die(\"Failed to save featuered content \".((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));\n\t\tif($query){\n\t\t\tsession_message('success', 'Featured content saved !');\n\t\t\tredirect_to(ADDONS_PATH.'featured_content');\n\t\t\t}\n\t\t}\n\t\n\techo '<h1>Add Featured content</h1><form method=\"post\" action=\"'.$_SESSION['current_url'].'\">\n\t<input type=\"text\" name=\"title\" class=\"form-control\" placeholder=\"title\">\n\t<textarea name=\"content\" class=\"form-control\" placeholder=\"content\"></textarea>\n\t<input type=\"text\" name=\"caption\" class=\"form-control\" placeholder=\"caption\">\n\t<input type=\"text\" name=\"link\" class=\"form-control\" placeholder=\"link\">\n\t<input type=\"submit\" name=\"save\" class=\"btn btn-primary btn-md\" value=\"Save Featured Content\">\n\t</form>';\n\t}", "title": "" }, { "docid": "7e5044686f7ba946aefdf3bd5c3bc6ee", "score": "0.46392414", "text": "function BeforeAdd(&$values,&$message,$inline,&$pageObject)\n{\n\n\t\t\n$sql = \"SELECT * FROM `pejawatan_staffdetails` WHERE staff_id = \" . $values['iid'];\n$rs = CustomQuery($sql);\nif($data = db_fetch_array($rs))\n{\n$values['Jawatan'] = $data['post_id'];\n}\n\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n\nreturn true;\n;\t\t\n}", "title": "" }, { "docid": "823875631d6302c89e6e31cb9a8e7dad", "score": "0.46283686", "text": "function HTML_showFormEnd()\n{\nPREF_preferenceSaveManagerHandler();\n$_SESSION['preferenceForceHTMLReloadValues'] = NULL;\necho(\"<input type=\\\"hidden\\\" name=\\\"MSESS_variables\\\" value=\\\"\".urlencode(serialize($_SESSION)).\"\\\">\n</form>\n\t\");\n}", "title": "" }, { "docid": "b43918f8f5600840387d8f0bbeddb9c2", "score": "0.46277684", "text": "public function addStorage($storage)\n {\n // TODO\n }", "title": "" }, { "docid": "8a18c3ad16b1e869a10e6d5cf0abfbd7", "score": "0.46244857", "text": "function theme_admin_print_scripts() { global $der_framework, $wp_version;\n \n wp_enqueue_style('thickbox');\n wp_enqueue_script('media-upload');\n wp_enqueue_script('thickbox');\n \n $update_server = (defined('THEME_UPDATE_SERVER')) ? THEME_UPDATE_SERVER : '';\n $update_check_interval = $der_framework->option('update_check_interval', 'weekly');\n \n // Encode JSON, prevents users from breaking admin\n $tf_data = base64_encode(json_encode($der_framework->options('tf_username, tf_purchase_code')));\n \n echo \"\n<script type='text/javascript'>\n document.WP_VERSION = '\" . $wp_version . \"';\n document.WP_THEME_ID = '\" . THEME_ID . \"';\n document.WP_HOME_URL = '\" . get_home_url() . \"';\n document.WP_ADMIN_URL = '\" . admin_url() . \"';\n document.WP_THEME_NAME = '\" . $der_framework->theme_data->get('Name') . \"';\n document.WP_THEME_VERSION = '\" . $der_framework->theme_data->get('Version') . \"';\n document.WP_UPDATE_SERVER = '\" . $update_server . \"';\n document.WP_UPDATE_CHECK_INTERVAL = '\" . $update_check_interval . \"';\n document.WP_THEME_URI = '\" . $der_framework->uri('') . \"';\n document.TF_DATA = '\" . $tf_data . \"';\n document.GI_THUMB_WIDTH = \" . GI_THUMB_WIDTH . \";\n document.GI_THUMB_HEIGHT = \" . GI_THUMB_HEIGHT . \";\n document.WP_I18N_COMMON = {\n newUpdateAvailable: '\" . 'new update available' . \"',\n documentation: '\" . 'Documentation' . \"',\n supportForums: '\" . 'Support Forums' . \"',\n getItNow: '\" . 'Get it now!' . \"',\n updateInstructions: '\" . 'Update Instructions' . \"',\n isAvailable: '\" . 'is available' . \"',\n themeOptions: '\" . 'Theme Options' . \"',\n layoutEditor: '\" . 'Layout Editor' . \"',\n savedSettings: '\" . \"Saved Settings\" . \"',\n resetSettings: '\" . \"Settings Reset\" . \"',\n resetSettingsMessage: '\" . \"Settings will be reset. Proceed ?\" . \"',\n uploadImage: '\" . \"Upload Image\" . \"',\n removeImage: '\" . \"Remove Image\" . \"',\n versionAvailable: '\" . \"Version %s available\" . \"',\n add: '\" . \"Add\" . \"',\n cancel: '\" . \"Cancel\" . \"',\n rename: '\" . \"Rename\" . \"',\n confirmRemove: '\" . \"About to remove \\\"%s\\\". Proceed ?\" . \"',\n splitVertically: '\" . \"Split Vertically\" . \"',\n threeColumns: '\" . \"Three Columns\" . \"',\n confirmSlotRemove: '\" . \"The whole container will be removed. Proceed ?\" . \"'\n };\n</script>\\n\";\n\n if (is_multisite()) { global $blog_id;\n\n echo '\n<script type=\"text/javascript\">\n document.WP_MULTISITE_ID = ' . $blog_id . ';\n</script>' . \"\\n\\n\";\n\n }\n \n }", "title": "" }, { "docid": "1bf43a77810e50bcb8cb2d74d63f33f0", "score": "0.4603601", "text": "function AfterAdd(&$values, &$keys, $inline, &$pageObject)\r\n{\r\n\r\n\t\t\n//********** Display a message on the Web page ************\n\n\n\r\n;\t\t\r\n}", "title": "" }, { "docid": "c862375e3e23a2e52b976da07de5ccb3", "score": "0.45954394", "text": "function div_enqueue_js( $code ) {\n\t\tglobal $div_queued_js;\n\n\t\tif ( empty( $div_queued_js ) ) {\n\t\t\t$div_queued_js = '';\n\t\t}\n\n\t\t$div_queued_js .= \"\\n\" . $code . \"\\n\";\n\t}", "title": "" }, { "docid": "ad266df58ea293dc5243111c7d7fbe79", "score": "0.4590996", "text": "function formAdd(){\n\t$html = '\n\t\t\t<!-- No edit the next line -->\n\t\t\t<form method=\"post\" name=\"f\" id=\"f\">\n\t\t\t\n\t\t\t<table border=\"1\" width=\"100%\" class=\"adminlist\">\n\t\t\t<tr>\n\t\t\t\t<td nowrap align=\"left\">No, de APD*</td>\n\t\t\t\t<td align=\"left\">\n\t\t\t\t<input type=\"text\" id=\"apd\" name=\"apd\" size=\"5\">\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td nowrap align=\"left\">UID*</td>\n\t\t\t\t<td align=\"left\"><input type=\"text\" id=\"uid\" name=\"uid\" size=\"15\"></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=\"2\" align=\"center\"><button id=\"submitButton\" onClick=\\'xajax_save(xajax.getFormValues(\"f\"));return false;\\'>Continue</button></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t</form>\n\t\t\t* Obligatory fields\n\t\t\t';\n\t\t\n\t\treturn $html;\n\t\t/*\n\t\t\t\t$arreglo = APDUser::getAllAPD();\n\t\t\t\twhile($row = $arreglo->fetchRow()){\n\t\t\t\t\t$html .= '<option value=\"'.$row['apd'].'\">'.$row['apd'].'</option>';\n\t\t\t\t}*/\n\t}", "title": "" }, { "docid": "34a64ed6d2fdcbb04f3c7db86bb389af", "score": "0.45900363", "text": "function add_gtm_submission( $entry, $form ) {\n\n\n\tsetcookie( 'quotesubmitted', 1, strtotime( '+30 days' ), COOKIEPATH, COOKIE_DOMAIN, false, false );\n\n\t$event \t\t\t\t= 'quoteFormSubmit';\n\t$event_category \t= 'Forms';\n\t$event_action \t\t= 'Submission';\n\t$event_label \t\t= 'Quote Form Completed'; ?>\n\t<script>\n\t\twindow.parent.dataLayer.push({\n\t\t\t'event' : '<?php echo $event; ?>',\n\t\t\t'eventCategory' : '<?php echo $event_category; ?>',\n\t\t\t'eventAction' : '<?php echo $event_action; ?>',\n\t\t\t'eventLabel' : '<?php echo $event_label; ?>',\n\t\t});\n\t</script>\n\t<script>fbq('track', 'Lead');</script>\n\t<?php\n}", "title": "" }, { "docid": "e8d51abb1c158b97a8efa5a31b863fd2", "score": "0.4565246", "text": "public function add_js(){\r\n\t\techo '<link href=\"http://plus.google.com/'.$this->google_profile_id.'\" rel=\"'.$this->google_profile_type.'\" />';\r\n\t\techo '<script type=\"text/javascript\">\r\n\t\t\twindow.___gcfg = {lang: \\'en\\'};\r\n\t\t\t(function() \r\n\t\t\t{var po = document.createElement(\"script\");\r\n\t\t\tpo.type = \"text/javascript\"; po.async = true;po.src = (\\'https:\\' == document.location.protocol ? \\'https\\' : \\'http\\') + \"://apis.google.com/js/plusone.js\";\r\n\t\t\tvar s = document.getElementsByTagName(\"script\")[0];\r\n\t\t\ts.parentNode.insertBefore(po, s);\r\n\t\t\t})();</script>';\r\n\t}", "title": "" }, { "docid": "8d598e09aeeabe678c31177ff85f0b1d", "score": "0.4552157", "text": "function addAdmin(){\n\n }", "title": "" }, { "docid": "2b241ce8301a20e38562fe8755ad06f6", "score": "0.45488295", "text": "function add()\n\t{\t\t\t\n\t\t$this->data['data'] = $_POST;\n\t\t$this->data['widgettext'] = 'Add New ' . cms_depluralize($this->data['table']);\n\t\t$this->data['helpertext'] = 'To add a new ' . cms_depluralize($this->data['table']) . ' fill out the field below and click \"save\"';\n\t\t$this->data['type'] = 'add';\n\t\t\n\t\t$this->_add_edit_shared_func();\n\t}", "title": "" }, { "docid": "3ad854fb4c0f0d254d22fd335499867d", "score": "0.45455238", "text": "public function hookdisplayAdminOrder()\n {\n echo $this->_runJs($this->context->cookie->ga_admin_refund, 1);\n unset($this->context->cookie->ga_admin_refund);\n }", "title": "" }, { "docid": "6620d9310f41fa7cc0689cdd3b55c988", "score": "0.4530923", "text": "function addhtml(){}", "title": "" }, { "docid": "26c93b91528e426657211800b8c41f6b", "score": "0.45292097", "text": "function SaveView(){\n $wpm_current_user=wp_get_current_user();\n if(!session_id()){\n session_start();\n }\n if ( $wpm_current_user->caps['administrator'] ) {\n if(isset($_POST['frmsubmit'])){\n $show_level = isset($_POST['show_level']) ? $_POST['show_level']:$_GET['show_level'];\n $show_post = isset($_POST['show_post']) ? $_POST['show_post']:$_GET['show_post'];\n $_SESSION['wlccshowlevel'] = $show_level;\n $_SESSION['wlccshowpost'] = $show_post;\n }\n }\n }", "title": "" }, { "docid": "77a46e9c1b7efc1b3a8befee7fcefe36", "score": "0.45286065", "text": "public function add() {\n\t\t\t$errors = array();\n\t\t\tforeach (array(\n\t\t\t\t'name'=>'Name',\n\t\t\t\t'content'=>'Code snippet'\n\t\t\t) as $k=>$v) {\n\t\t\t\tif (!isset($_POST[$k]) || $_POST[$k] == '') {\n\t\t\t\t\t$errors[] = 'Field <em>'. $v .'</em> was missing or invalid.';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (count($errors)) {\n \t\t\treturn '<strong>Error: </strong><br/>'. implode('<br/>', $errors);\n\t\t\t}\n\t\t\t// Add the new analytic.\n\t\t\t$query = $GLOBALS['sizzle']->database->prepare('INSERT INTO sharers (name, content) VALUES (?, ?)');\n\t\t\t$query->execute(array($_POST['name'], $_POST['content']));\n // Return.\n\t\t\t$_SESSION['redirect'] = '/backend/sharers/view';\n\t\t\treturn 'Sharer added successfully.';\n\t\t}", "title": "" }, { "docid": "092183e673979dcfcf30b04c03e4549f", "score": "0.45185846", "text": "function lib_ajax_javascript() { eval(lib_rfs_get_globals());\n\t$arr=get_defined_functions();\n\tforeach( $arr['user'] as $k=>$v ) if(stristr($v,\"lib_ajax_javascript_\")) eval($v.\"();\");\necho '\n<script>\nfunction rfs_ajax_hide(x) { var div = document.getElementById(x); div.style.display = \"none\"; };\nfunction rfs_ajax_func(name, ajv, table, ikey, kv, field, page, act, callback) {\n\t\t\tvar http=new XMLHttpRequest();\n\t\t\tvar url = \"'.$RFS_SITE_URL.'/header.php\";\n\t\t\tvar params = \"action=\"+callback+\n\t\t\t\"&rfaajv=\" +encodeURIComponent(ajv)+\n\t\t\t\"&rfanname=\" +encodeURIComponent(name)+\n\t\t\t\"&rfatable=\" +encodeURIComponent(table)+\n\t\t\t\"&rfaikey=\" +encodeURIComponent(ikey)+\n\t\t\t\"&rfakv=\" +encodeURIComponent(kv)+\n\t\t\t\"&rfafield=\" +encodeURIComponent(field)+\n\t\t\t\"&rfaapage=\" +encodeURIComponent(page)+\n\t\t\t\"&rfaact=\" +encodeURIComponent(act);\n\t\t\tdocument.getElementById(name+\"_div\").innerHTML=\"'.lib_ajax_spinner().'\";\n\t\t\thttp.open(\"POST\", url, true);\n\t\t\thttp.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n\t\t\thttp.setRequestHeader(\"Content-length\", params.length);\n\t\t\thttp.setRequestHeader(\"Connection\", \"close\");\n\t\t\thttp.onreadystatechange = function() {\n\t\t\t\t\tif(http.readyState == 4 && http.status == 200) {\n\t\t\t\t\tdocument.getElementById(name+\"_div\").innerHTML=http.responseText;\n\t\t\t\t}\n\t\t\t}\n\t\t\thttp.send(params);\n\t\t}\n</script>\n';\n}", "title": "" }, { "docid": "f90d192a386757800ae33a1a7dcf988c", "score": "0.45138347", "text": "function add() \n { \n // your code here\n }", "title": "" }, { "docid": "1f72a0a20ee9c8c85bf5496b3bf895b2", "score": "0.45096028", "text": "function do_Add ($lang)\n {\n global $vnT, $func, $DB, $conf;\n $err = \"\";\n if ($vnT->input['do_submit'] == 1)\n {\n\t\t\t \n $res_lang = $DB->query(\"select * from language \");\n while ($row_lang = $DB->fetch_row($res_lang)) {\n $arr_name[$row_lang['name']] = $func->txt_HTML($vnT->input['name']);\n\t\t\t\t$arr_title[$row_lang['name']] = $func->txt_HTML($vnT->input['title']); \n }\n\n $nick = ($_POST['nick']) ? @serialize($_POST['nick']) : '';\n if(empty($vnT->input['csrf_token']) || ($vnT->input['csrf_token'] != $_SESSION['vnt_csrf_token']) ) {\n $err = $func->html_err($vnT->lang['err_csrf_token']) ;\n }\n\n // insert CSDL\n if (empty($err))\n {\n $cot['nick'] = $nick;\n $cot['name'] = $vnT->format->txt_serialize($arr_name);\n $cot['title'] = $vnT->format->txt_serialize($arr_title);\n $cot['phone'] = $vnT->input['phone'];\n $cot['email'] = $vnT->input['email'];\n $ok = $DB->do_insert(\"support\", $cot);\n if ($ok)\n {\n\n unset($_SESSION['vnt_csrf_token']);\n //xoa cache\n $func->clear_cache();\n //insert adminlog\n $func->insertlog(\"Add\", $_GET['act'], $DB->insertid());\n $mess = $vnT->lang['add_success'];\n $url = $this->linkUrl . \"&sub=add\";\n $func->html_redirect($url, $mess);\n } else\n {\n $err = $func->html_err($vnT->lang['add_failt'] . $DB->debug());\n }\n }\n }\n\n if (! isset($_SESSION['vnt_csrf_token'])) {\n $_SESSION['vnt_csrf_token'] = md5(uniqid(rand(), TRUE)) ;\n }\n $data['csrf_token'] = $_SESSION['vnt_csrf_token'] ;\n\n $data['err'] = $err;\n $data['link_action'] = $this->linkUrl . \"&sub=add\";\n /*assign the array to a template variable*/\n $this->skin->assign('data', $data);\n $this->skin->parse(\"edit\");\n return $this->skin->text(\"edit\");\n }", "title": "" }, { "docid": "e2b021bdcf3b64b47459ab9319c4d60c", "score": "0.45055234", "text": "private function addJsContent($js) {\n\t\t$this->jsContent .= $js;\n\t}", "title": "" }, { "docid": "01bbd4ad9080b71755816187099c0bdd", "score": "0.4500386", "text": "protected function loadJavascriptFunction(){\n if(!self::$javascriptFunctionInserted){\n self::$javascriptFunctionInserted = TRUE;\n return '<script>\n CDSRC_CdsrcBepwreset = {\n initializeSelect: function(id){\n var i,\n values,\n select = document.getElementById(id),\n input = document.getElementById(id + \\'_input\\');\n if(select && input){\n values = (input.value || \\'\\').split(\\',\\');\n if(select.options){\n for(i=0; i<select.options.length; i++){\n if(values.indexOf(select.options[i].value) >= 0){\n select.options[i].selected = true;\n }\n }\n }\n select.addEventListener(\\'change\\', function(){\n values = [];\n for(i=0; i<select.options.length; i++){\n if(select.options[i].selected){\n values.push(select.options[i].value);\n }\n }\n input.value = values.join(\\',\\');\n });\n }\n }\n };\n </script>';\n }\n return '';\n }", "title": "" }, { "docid": "a2d69ff8a7046dd4d88685f5387e75b3", "score": "0.44935203", "text": "function ADV_WFAQ_Create_Js() {\n global $wpdb;\n\n $table_name = $wpdb->prefix . \"worx_faq\";\n $script_table = $wpdb->prefix . \"worx_files\";\n $options = $wpdb->get_row(\"SELECT * FROM $table_name\");\n $xtreem_scripts = $wpdb->get_row(\"SELECT * FROM $script_table\");\n $js_string = '';\n $expand_script = '';\n $expand_html = '';\n $answer_script = '';\n $back_button = '';\n $back_script = '';\n if ($options->accordian == \"accordian\") {\n $js_string = $xtreem_scripts->accordian_js;\n } else {\n $js_string = $xtreem_scripts->toggle_js;\n }\n if ($options->expand_collapse_all == 'Yes') {\n\n $expand_script = '<script type=\"text/javascript\">\n\t\t\t\t\t\t jQuery(document).ready(function(){\n\t\t\t\t\t\t var $this = jQuery(\".accordian-faqlist .accordian-heading\");\n\t\t\t\t\t\t jQuery(\".expend-accordian-menu\").click(function(){\n\t\t\t\t\t\t jQuery($this).toggleClass(\"active\");\n\t\t\t\t\t\t $this.next().toggleClass(\"show\").slideToggle(); \n\t\t\t\t\t\t jQuery(this).toggleClass(\"active\");\n\t\t\t\t\t\t if(jQuery(\".expend-accordian-menu\").hasClass(\"active\")){\n\t\t\t\t\t\t \tjQuery(\".expend-accordian-menu span\").html(\"Collapse All\");\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t \tjQuery(\".expend-accordian-menu span\").html(\"Expand All\");\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t });\n\n\t\t\t\t\t\t });\n\t\t\t\t\t\t</script>';\n }\n if ($options->display_all_answers == 'Yes') {\n $answer_script = '<script type=\"text/javascript\">\n\t\t\t\t\t\t jQuery(document).ready(function(){\n\t\t\t\t\t\t var $this = jQuery(\".accordian-faqlist .accordian-heading\");\n\t\t\t\t\t\t jQuery($this).addClass(\"active\");\n\t\t\t\t\t\t $this.next().addClass(\"show\").slideToggle(); \n\t\t\t\t\t\t jQuery(\".expend-accordian-menu span\").html(\"Collapse All\");\n\t\t\t\t\t\t jQuery(\".expend-accordian-menu\").addClass(\"active\");\n\t\t\t\t\t\t });\n\t\t\t\t\t\t</script>';\n }\n\n if ($options->back_to_top == \"Yes\") {\n\n $back_script = '<script type=\"text/javascript\">\n\t\t \t\t\t\t\t jQuery(window).scroll(function() {\n\t\t\t\t\t\t\t\t\t if (jQuery(this).scrollTop()) {\n\t\t\t\t\t\t\t\t\t jQuery(\".toTop\").fadeIn();\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t jQuery(\".toTop\").fadeOut();\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tjQuery(\".toTop\").click(function () {\n\t\t\t\t\t\t\t\t\t jQuery(\"html, body\").animate({scrollTop: jQuery(\".xtreem_faq_main\").position().top}, 1000);\n\t\t\t\t\t\t\t\t\t});\n\t\t \t\t\t\t\t</script>';\n }\n $window_script = '<script type=\"text/javascript\">\n\t\t \t\t\t\t\tjQuery(document).ready(function(){\n\t\t \t\t\t\t\tjQuery(\".xtreem_faq_main\").each(function(){\n\t\t \t\t\t\t\t\tvar $this_width = jQuery(this).width() - 55;\n\t\t\t\t\t\t\t\tjQuery(\".headline-panel\").css(\"width\", width_question_title);\t\n\t\t \t\t\t\t\t})\t\n\t\t \t\t\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tjQuery(window).resize(function(){\n\t\t\t\t\t\t\t\tvar width_question_title = jQuery(\".accordian-heading\").width() - 55;\n\t\t\t\t\t\t\t\tjQuery(\".headline-panel\").css(\"width\", width_question_title);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t</script>';\n echo $js_string;\n echo $expand_script;\n echo $answer_script;\n //echo $window_script;\n echo $back_script;\n}", "title": "" }, { "docid": "64ea05786a568c4d82647de78c5db37e", "score": "0.44922644", "text": "public function add() {\n\t\n\t\n\t\t//$data = Array(\"name\" => \"New Mealplan\", \"created\" => Time::now(), \"modified\" => Time::now(), \"user_id\" => $this->user->user_id);\n\n\t\t#Insert the posted form into the db\n\t\t$meal = DB::instance(DB_NAME)->insert('meals',$data);\n\t\t\n\t\techo json_encode('M'.$meal);\n\t\n\t}", "title": "" }, { "docid": "8b0c5bf1819c74f24c5c9cb1b272dec5", "score": "0.44734767", "text": "public function addJS() {\n\n\t\t$this->json = new stdClass();\n\t\t$cart = VirtueMartCart::getCart(false);\n\t\tif ($cart) {\n\n\t\t\t$virtuemart_product_ids = JRequest::getVar('virtuemart_product_id', array(), 'default', 'array');\n\t\t\t$view = $this->getView ('cart', 'json');\n\t\t\t$errorMsg = 0;//JText::_('COM_VIRTUEMART_CART_PRODUCT_ADDED');\n\t\t\t$product = $cart->add($virtuemart_product_ids, $errorMsg );\n\t\t\tif ($product) {\n\t\t\t\t$view->setLayout('padded');\n\t\t\t\t$this->json->stat = '1';\n\t\t\t} else {\n\t\t\t\t$view->setLayout('perror');\n\t\t\t\t$this->json->stat = '2';\n\t\t\t}\n\t\t\t$view->assignRef('product',$product);\n\t\t\t$view->assignRef('errorMsg',$errorMsg);\n\t\t\tob_start();\n\t\t\t$view->display ();\n\t\t\t$this->json->msg = ob_get_clean();\n\t\t} else {\n\t\t\t$this->json->msg = '<a href=\"' . JRoute::_('index.php?option=com_virtuemart', FALSE) . '\" >' . JText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';\n\t\t\t$this->json->msg .= '<p>' . JText::_('COM_VIRTUEMART_MINICART_ERROR') . '</p>';\n\t\t\t$this->json->stat = '0';\n\t\t}\n\t\techo json_encode($this->json);\n\t\tjExit();\n\t}", "title": "" }, { "docid": "82bb15adaea1daf27520724d1e8b98c5", "score": "0.44693404", "text": "function publish_form_new_tabs_block( $weblog_id )\n\t{\n\n\t\tglobal $DB, $DSP, $EXT, $IN, $LANG, $LOC, $REGX, $SESS, $TYPE;\n\n\t\t// Check if we're not the only one using this hook\n\t\t$out = ($EXT->last_call !== FALSE) ? $EXT->last_call : '';\n\n\t\tif($this->settings[\"enable\"] != \"y\") return $out;\n\t\tif($this->debug === TRUE) print(\"<br /><br />\".memory_get_usage().\" publish_form_new_tabs_block: start\");\n\n\t\t$LANG->fetch_language_file('nsm_publish_plus_ext');\n\n\t\t// load the Typograhy class for our comments\n\t\tif ( ! class_exists('Typography')) require PATH_CORE.'core.typography'.EXT;\n\t\t$TYPE = new Typography;\n\n\t\t$note_prefs = array(\n\t\t\t'text_format' \t=> 'xhtml',\n\t\t\t'html_format' \t=> 'safe',\n\t\t\t'auto_links' \t=> 'y',\n\t\t\t'allow_img_url' => 'y'\n\t\t);\n\n\t\t// make the entry_id and which action more manageable\n\t\t$entry_id = $SESS->cache['nsm'][NSM_PP_addon_id]['publish_form_entry_id'];\n\t\t$which = $SESS->cache['nsm'][NSM_PP_addon_id]['publish_form_action'];\n\n\t\t// if this is an edit and there is no post\n\t\t// post will not be empty if we are loading a draft\n\t\tif($SESS->cache['nsm'][NSM_PP_addon_id]['publish_form_action'] == \"edit\" && empty($_POST) === TRUE)\n\t\t{\n\t\t\t$status = $SESS->cache['nsm'][NSM_PP_addon_id]['publish_form_entry']['status'];\n\t\t\t$state = $SESS->cache['nsm'][NSM_PP_addon_id]['publish_form_entry']['nsm_pp_state'];\n\t\t}\n\t\t// we are either loading a draft, this is a save or a new entry\n\t\t// either way test for a post or set the var to blank\n\t\t// now we are covered in all cases\n\t\telse\n\t\t{\n\t\t\t$status = (isset($_POST['status']) === TRUE) ? $REGX->form_prep($_POST['status']) : \"\";\n\t\t\t$state = (isset($_POST['nsm_pp_state']) === TRUE) ? $REGX->form_prep($_POST['nsm_pp_state']) : \"\";\n\t\t}\n\n\t\t// start the tab\n\t\t//$out .= \"<!-- START NSM Publish Plus Workflow + Drafts Tab -->\";\n\t\t$out .= '<div id=\"blocknsm_pp_workflow\" class=\"nsm-tab-block\">';\n\t\t$out .= '<div class=\"publishTabWrapper\">';\t\n\t\t$out .= '<div class=\"publishBox\">';\n\t\t$out .= '<div class=\"publishInnerPad\">';\n\t\t$out .= \"<div class='clusterBox'>\";\n\n\t\t$out .= \"<h5>\".ucfirst($LANG->line(\"entry_state\")).\"</h5>\";\n\t\t$out .= \"<p>\".$LANG->line(\"workflow_info\").\"</p>\";\n\t\t$out .= \"<p>\".ucfirst($LANG->line(\"entry_state\")).\": \";\n\n\t\t// create a couple of hidden vars to track the old status and state\n\t\t// we use these when we send out notifications\n\t\t$out .= NL.\"<input type='hidden' name='old_status' value='\".$status.\"' />\";\n\t\t$out .= NL.\"<input type='hidden' name='old_state' value='\".$state.\"' />\";\n\n\t\tif($SESS->userdata[\"nsm_pp_roles\"][$weblog_id] == \"publisher\")\n\t\t{\n\t\t\t$out .= \"<select name='nsm_pp_state'>\";\n\t\t\t$out .= \"<option></option>\";\n\t\t\t$out .= \"<option value='pending'\".(($state == 'pending') ? \" selected='selected'\" : '').\">\".ucfirst($LANG->line('pending')).\"</option>\";\n\t\t\t$out .= \"<option value='approved'\".(($state == 'approved') ? \" selected='selected'\" : '').\">\".ucfirst($LANG->line('approved')).\"</option>\";\n\t\t\t$out .= \"<option value='denied'\".(($state == 'denied') ? \" selected='selected'\" : '').\">\".ucfirst($LANG->line('denied')).\"</option>\";\n\t\t\t$out .= \"<option value='changed'\".(($state == 'changed') ? \" selected='selected'\" : '').\">\".ucfirst($LANG->line('changed')).\"</option>\";\n\t\t\t$out .= \"</select>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$out .= \"<span class='\".$state.\"'>\".(($state == FALSE) ? \"<strong class='box'>Workflow state will be automatically set when the entry is saved as a draft or submitted for approval</strong>\" : ucwords($LANG->line($state))).\"</span>\";\n\t\t}\n\t\t$out .= \"</p>\";\n\n\t\t$out .= \"<h5>\".ucfirst($LANG->line(\"drafts\")).\"</h5>\";\n\t\t$out .= \"<p>\".$LANG->line(\"draft_info\").\"</p>\";\n\t\t\n\t\t$drafts_exist \t= FALSE;\n\t\t$draft_num\t\t= $IN->GBL('draft_num');\n\t\t$draft_id\t\t= $IN->GBL('draft_id');\n\n\t\tif (is_numeric($entry_id))\n\t\t{\n\t\t\t$draft_query = $this->_get_entry_drafts($entry_id);\n\n\t\t\tif ($draft_query->num_rows > 0)\n\t\t\t{\n\t\t\t\t$drafts_exist = TRUE;\n\n\t\t\t\t$out .= $DSP->table_open(array('class' => 'tableBorder', 'width' => '100%'));\n\t\t\t\t$out .= $DSP->table_row(array(\n\t\t\t\t\t\t\t\t\t\tarray('text' => ucwords($LANG->line('state')), 'class' => 'tableHeading'),\n\t\t\t\t\t\t\t\t\t\t\tarray('text' => $LANG->line('id'), 'class' => 'tableHeading'),\n\t\t\t\t\t\t\t\t\t\t\tarray('text' => ucwords($LANG->line('title')), 'class' => 'tableHeading'),\n\t\t\t\t\t\t\t\t\t\t\tarray('text' => ucwords($LANG->line('date')), 'class' => 'tableHeading'),\n\t\t\t\t\t\t\t\t\t\t\tarray('text' => ucwords($LANG->line('author')), 'class' => 'tableHeading'),\n\t\t\t\t\t\t\t\t\t\t\tarray('text' => ucwords($LANG->line('load_draft')), 'class' => 'tableHeading'),\n\t\t\t\t\t\t\t\t\t\t\tarray('text' => ucwords($LANG->line('edit_notes')), 'class' => 'tableHeading')\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t$i = 0;\n\t\t\t\t$j = $draft_query->num_rows;\n\n\t\t\t\t$count = 1;\n\t\t\t\tforeach($draft_query->result as $row)\n\t\t\t\t{\n\t\t\t\t\t$revlink = $DSP->anchor(BASE.AMP.'C=edit'.AMP.'M=edit_entry'.AMP.'weblog_id='.$weblog_id.AMP.'entry_id='.$entry_id.AMP.'draft_id='.$row['draft_id'].AMP.'draft_num='.$j, ucwords($LANG->line('load_draft')));\n\n\t\t\t\t\tif ($row['draft_id'] == $draft_id)\n\t\t\t\t\t{\n\t\t\t\t\t\t$revlink .= \" &nbsp; <span class='highlight'>\" . $LANG->line('current_rev') . \"</span>\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$class = ($i % 2) ? 'tableCellOne' : 'tableCellTwo'; $i++;\n\n\t\t\t\t\t$draft_data = $REGX->array_stripslashes(unserialize($row['draft_data']));\n\n\t\t\t\t\tif(isset($draft_data[\"nsm_pp_state\"]) === FALSE)\n\t\t\t\t\t{\n\t\t\t\t\t\t$draft_data[\"nsm_pp_state\"] = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// quick fix for old drafts that used \"dirty\" instead of changed\n\t\t\t\t\tif($draft_data[\"nsm_pp_state\"] == \"dirty\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$draft_data[\"nsm_pp_state\"] = \"changed\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$note_link = (empty($draft_data[\"draft_note\"]) === FALSE) ? \"<a href='#'>\".ucwords($LANG->line(\"edit_notes\")).\"</a>\" : \"&nbsp;\";\n\n\t\t\t\t\t$out .= \"<tr class='draft'>\"\n\t\t\t\t\t\t. NL . \"<td class='\".$class.\"'><span class='work-state work-state-\" . $draft_data['nsm_pp_state'] . \"' title='\".ucwords($LANG->line($draft_data['nsm_pp_state'])).\"'>\".ucwords($LANG->line($draft_data['nsm_pp_state'])).\"</span></td>\" \n\t\t\t\t\t\t. NL . \"<td class='\".$class.\"'>\".$row['draft_id'].\"</td>\" \n\t\t\t\t\t\t. NL . \"<td class='\".$class.\"'>\".$draft_data['title'] . \"&nbsp;\".\"</td>\" \n\t\t\t\t\t\t. NL . \"<td class='\".$class.\"'>\".$LOC->set_human_time($row['created_at']).\"</td>\" \n\t\t\t\t\t\t. NL . \"<td class='\".$class.\"'><a href='\".BASE.\"&C=myaccount&id=\".$row[\"author_id\"].\"'>\" . ((empty($row['screen_name']) === FALSE) ? $row['screen_name'] : $row['username']) . \"</a></td>\" \n\t\t\t\t\t\t. NL . \"<td class='\".$class.\"'>\".$revlink.\"</td>\" \n\t\t\t\t\t\t. NL . \"<td class='\".$class.\" note-trigger'>\".$note_link.\"</td>\" \n\t\t\t\t\t . NL . \"</tr>\";\n\t\t\t\t\t$out .= NL . \"<tr class='notes'><td colspan='7' style='border-top:1px dotted #ccc; margin-top:-1px;' class='\".$class.\"'>\".((empty($draft_data[\"draft_note\"]) === FALSE) ? \"<p><strong>\".ucfirst($LANG->line(\"edit_notes\")).\":</strong></p>\" . $TYPE->parse_type( $draft_data['draft_note'], $note_prefs) : \"<p class='highlight'>\" . $LANG->line(\"no_draft_notes_exist\") . \"</p>\" ).\"</td></tr>\";\n\t\t\t\t\t$j--;\n\t\t\t\t} // End foreach\n\t\n\t\t\t\t$out .= $DSP->table_close();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($drafts_exist == FALSE)\n\t\t{\n\t\t\t$out .= \"<p class='highlight'>\". $LANG->line('no_drafts_exist') . \"</p>\";\n\t\t}\n\n\t\t$out .= NL.\"<h5>\".ucfirst($LANG->line(\"edit_notes\")).\"</h5>\";\n\t\t$out .= NL.\"<p>\".$LANG->line(\"edit_notes_info\").\"</p>\";\n\t\t\n\t\tif(isset($_POST[\"draft_note\"]) === FALSE || ($IN->GBL(\"preview\", \"POST\") == \"nsm_pp_submit_for_approval\" || $IN->GBL(\"preview\", \"POST\") == \"nsm_pp_draft_submit\"))\n\t\t{\n\t\t\t$draft_note = \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t $draft_note = $REGX->form_prep($_POST[\"draft_note\"]);\n\t\t}\n\n\t\t$out .= NL.\"<textarea class='textarea' style='width:99%' rows='10' name='draft_note'>\".$draft_note.\"</textarea>\";\n\n\t\t$out .= $DSP->div_c();\n\t\t$out .= $DSP->div_c();\n\t\t$out .= $DSP->div_c();\n\t\t$out .= $DSP->div_c(); \n\t\t$out .= $DSP->div_c();\n\n\t\t$out .= NL.\"<!-- END NSM Publish Plus Workflow + Drafts Tab -->\";\n\t\t$out .= NL.\"<!-- Start NSM Publish Plus Notes Tab -->\";\n\n\t\t$out .= NL.'<div id=\"blocknsm_pp_notes\" class=\"nsm-tab-block\">';\n\t\t$out .= NL.'<div class=\"publishTabWrapper\">';\t\n\t\t$out .= NL.'<div class=\"publishBox\">';\n\t\t$out .= NL.'<div class=\"publishInnerPad\">';\n\t\t$out .= NL.\"<div class='clusterBox'>\";\n\n\t\tif(empty($entry_id) === FALSE)\n\t\t{\n\t\t\t$note_query = $this->_get_entry_notes($entry_id);\n\t\t\t$notes = $note_query->result;\n\t\t\t$note_count = $note_query->num_rows;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$notes = array();\n\t\t\t$note_count = 0;\n\t\t}\n\n\t\t$out .= \"<h5>Notes</h5>\n\t\t\t\t<div class='comments'>\n\t\t\t\t\t<div class='comments-wrapper'>\";\n\n\t\t$note_prefs = array(\n\t\t\t'text_format' \t=> 'xhtml',\n\t\t\t'html_format' \t=> 'safe',\n\t\t\t'auto_links' \t=> 'y',\n\t\t\t'allow_img_url' => 'y'\n\t\t);\n\n\t\tif(empty($notes) === FALSE)\n\t\t{\n\t\t\t$out .= NL.\"<ol>\";\n\t\t\tforeach ($notes as $note)\n\t\t\t{\n\t\t\t\t$out .= \"<li class='comment'>\n\t\t\t\t\t\t\t<p class='author'><strong><a href='\".BASE.\"&C=myaccount&id=\".$note[\"author_id\"].\"'>\" . ((empty($note['screen_name']) === FALSE) ? $note['screen_name'] : $note['username']) . \"</a> <small>\" . $LOC->set_human_time($note['created_at']) . \"</small></strong></p>\n\t\t\t\t\t\t\t<div>\" . $TYPE->parse_type( $note['note'], $note_prefs) . \"</div>\n\t\t\t\t\t\t</li>\";\n\t\t\t}\n\t\t\t$out .= NL.\"</ol>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$out .= \"<p class='highlight'>\".$LANG->line(\"no_notes_warning\").\".</p>\";\n\t\t}\n\n\t\t// note preview?\n\t\t$note = $IN->GBL('nsm_pp_note');\n\t\tif($IN->GBL(\"preview\", \"POST\") == \"nsm_pp_note_preview\")\n\t\t{\n\t\t\t$out .= \"<ol><li class='comment preview'>\n\t\t\t\t\t\t<p class='preview'><strong>\".$LANG->line(\"preview\").\":</strong></p>\n\t\t\t\t\t\t<p class='author'><strong><a href='\".BASE.\"&C=myaccount&id=\".$SESS->userdata['member_id'].\"'>\" . ((empty($SESS->userdata['screen_name']) === FALSE) ? $SESS->userdata['screen_name'] : $SESS->userdata['username']) . \"</a> <small>\" . $LOC->set_human_time($LOC->now) . \"</small></strong></p>\n\t\t\t\t\t\t<div>\".$TYPE->parse_type($note, $note_prefs).\"</div>\n\t\t\t\t\t</li></ol>\";\n\t\t}\n\n\t\t// note form\n\t\t$out .= \"<div class='new-comment'>\n\t\t\t\t\t<label for='nsm_pp_note'><strong>\".ucfirst($LANG->line(\"leave_a_note\")).\":</strong></label>\n\t\t\t\t\t<div><textarea class='textarea' id='nsm_pp_note' name='nsm_pp_note'>\".$REGX->form_prep($note).\"</textarea></div>\n\t\t\t\t</div>\";\n\n\t\t// note buttons\n\t\t$out .= \"<p class='submitBox'>\n\t\t\t\t\t<button type='submit' name='preview' value='nsm_pp_note_submit'>\".$LANG->line('add_this_note').\"</button>\n\t\t\t\t\t<button type='submit' name='preview' value='nsm_pp_note_preview'>\".$LANG->line('preview_note').\"</button>\n\t\t\t\t</p>\";\n\n\t\t$out .= $DSP->div_c();\n\t\t$out .= $DSP->div_c();\n\t\t$out .= $DSP->div_c();\n\t\t$out .= $DSP->div_c();\n\t\t$out .= $DSP->div_c(); \n\t\t$out .= $DSP->div_c(); \n\t\t$out .= $DSP->div_c();\n\n\t\t$out .= \"<!-- END NSM Publish Plus Tab -->\";\n\n\t\tif($this->debug === TRUE) print(\"<br />\".memory_get_usage().\" publish_form_new_tabs_block: end\");\n\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "f3d69e6a19c4596d63a6c9a97c7fd808", "score": "0.44662303", "text": "public function addjscode($destfunc,$code) {\n\t$snipdata=array($destfunc,$code,\"*code*\");\n\t$this->dynamic[]=$snipdata;\t\t\t\t\n}", "title": "" }, { "docid": "5754a6068d5e0e5347fae4b14ca0b4dc", "score": "0.4465096", "text": "function add_new_lang () {\n\t\n\t\t$lang_name\t=\tstr_replace(' ', '-',$_POST['lang_name']);\n\t\t$lang_arr\t=\t$this->get_language_list();\n\t\t// validate language name\n\t\tif( $lang_name== \"\" || in_array($lang_name, $lang_arr)) {\n\t\t\t$return =\tarray (\n\t\t\t\t'success'\t=> false,\n\t\t\t\t'msg'\t\t=> __(\"Invalid file name!\",ET_DOMAIN)\n\t\t\t);\n\n\t\t} else {\n\t\t\tif( $this->generate_mo($lang_name) ) {\n\t\t\t\t// update site language options\n\t\t\t\t\n\t\t\t\t$this->set_site_language( $lang_name );\n\n\t\t\t\t$return =\tarray (\n\t\t\t\t\t'success'\t=> true,\n\t\t\t\t\t'msg'\t\t=> __(\"Adding new language successfully.\",ET_DOMAIN),\n\t\t\t\t\t'data' \t\t=> array( 'lang_name'\t=> $lang_name,\n\t\t\t\t\t\t\t\t\t'ID'\t\t=> $lang_name\n\t\t\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t// wp send json function\n\t\twp_send_json($return);\n\t}", "title": "" }, { "docid": "31f8716a04e80ce4dadaaa7b2bacb550", "score": "0.4457434", "text": "function BeforeAdd(&$values, &$message, $inline, &$pageObject)\r\n{\r\n\r\n\t\t\n\r\n;\t\t\r\n}", "title": "" }, { "docid": "d12878fd3b2c0397e22c9da8e1e5fe0a", "score": "0.44571185", "text": "function add()\n {\n \n }", "title": "" }, { "docid": "926f5827e621b063ff60577310bc56c2", "score": "0.44549382", "text": "public function _add_to_edit()\n\t{\n\t\t\t$view = new View('reportstinymce/reportstinymce_js');\n\t\t\t$view->width = \"380\";\n\t\t\t$view->render(true);\n\t}", "title": "" }, { "docid": "9f37518433092811a94c4c7712ff380b", "score": "0.44537553", "text": "function add_to_favorite() {\n\n\t\t/* if user is logged in then store in meta data */\n\t\tif ( isset( $_POST['property_id'] ) && is_user_logged_in() ) {\n\t\t\t$property_id = intval( $_POST['property_id'] );\n\t\t\t$user_id = get_current_user_id();\n\t\t\tif ( ( $property_id > 0 ) && ( $user_id > 0 ) ) {\n\t\t\t\tif ( add_user_meta( $user_id, 'favorite_properties', $property_id ) ) {\n\t\t\t\t\t_e( 'Added to Favorites', 'framework' );\n\t\t\t\t} else {\n\t\t\t\t\t_e( 'Failed!', 'framework' );\n\t\t\t\t}\n\t\t\t}\n\t\t\t/* otherwise store in cookies */\n\t\t} elseif ( isset( $_POST['property_id'] ) ) {\n\t\t\t$property_id = intval( $_POST['property_id'] );\n\t\t\tif ( $property_id > 0 ) {\n\t\t\t\t$inspiry_favorites = array();\n\t\t\t\tif ( isset( $_COOKIE['inspiry_favorites'] ) ) {\n\t\t\t\t\t$inspiry_favorites = unserialize( $_COOKIE['inspiry_favorites'] );\n\t\t\t\t}\n\t\t\t\t$inspiry_favorites[] = $property_id;\n\t\t\t\tif ( setcookie( 'inspiry_favorites', serialize( $inspiry_favorites ), time() + ( 60 * 60 * 24 * 30 ), '/' ) ) {\n\t\t\t\t\t_e( 'Added to Favorites', 'framework' );\n\t\t\t\t} else {\n\t\t\t\t\t_e( 'Failed!', 'framework' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t_e( 'Invalid Parameters!', 'framework' );\n\t\t}\n\n\t\tdie;\n\t}", "title": "" }, { "docid": "ecdff4fdc21122f8f8bd0a92c753bdb5", "score": "0.44536248", "text": "function javascript_content(){\n\n\t}", "title": "" }, { "docid": "e8f695c40e586d9765f35f61e6d8cc85", "score": "0.44528893", "text": "protected function add()\r\n\t{\r\n\t\tglobal $tpl;\r\n\r\n\t\t$form = $this->initForm();\r\n\r\n\t\t$tpl->setContent($form->getHTML());\r\n\t}", "title": "" }, { "docid": "96f0c21caccf4a32c3cf131481a0ae48", "score": "0.44501746", "text": "function php_js_vars() {\n?>\n <script>\n var LOCALISED_VARS = LOCALISED_VARS || {};\n\n <?php\n $feature_flags = ( defined('FEATURE_FLAGS') ) ? 'FEATURE_FLAGS' : [];\n ?>\n LOCALISED_VARS.env = <?php echo json_encode( WP_ENV ) ?>;\n LOCALISED_VARS.ajaxurl = <?php echo json_encode( admin_url( \"admin-ajax.php\" ) ) ?>;\n LOCALISED_VARS.ajaxnonce = <?php echo json_encode( wp_create_nonce( \"lv_ajax_nonce\" ) ) ?>;\n LOCALISED_VARS.stylesheet_directory_uri = <?php echo json_encode( get_stylesheet_directory_uri() ) ?>;\n LOCALISED_VARS.feature_flags = <?php echo json_encode( Utils\\get_active_features() ) ?>;\n </script>\n<?php\n}", "title": "" }, { "docid": "f01456e79339780536d96fd78a8059c4", "score": "0.44472456", "text": "function tm_review_store_form_ajax_save_callback()\n{\n global $wpdb;\n\t$table = $wpdb->prefix.'store';\n\n\t$name = wp_strip_all_tags($_POST['store_name']);\n\t$slug = wp_strip_all_tags($_POST['store_slug']);\n\t$description = wp_strip_all_tags($_POST['description']);\n\t$facebook_url = wp_strip_all_tags($_POST['facebook_url']);\n\t$youtube_url = wp_strip_all_tags($_POST['youtube_url']);\n\t$instagram_url = wp_strip_all_tags($_POST['instagram_url']);\n\t$linkedin_url = wp_strip_all_tags($_POST['linkedin_url']);\n\t$website_url = wp_strip_all_tags($_POST['website_url']);\n\t$affiliate_url = wp_strip_all_tags($_POST['affiliate_url']);\n\t$store_logo = wp_strip_all_tags($_POST['store_logo']);\n\n\t$data = [\n\t\t'name' => $name,\n\t\t'slug' => $slug,\n\t\t'description' => $description,\n\t\t'facebook_url' => $facebook_url,\n\t\t'youtube_url' => $youtube_url,\n\t\t'instagram_url'\t=>\t$instagram_url,\n\t\t'linkedin_url'\t=>\t$linkedin_url,\n\t\t'website_url'\t=>\t$website_url,\n\t\t'affiliate_url'\t=>\t$affiliate_url,\n\t\t'store_logo'\t=>\t$store_logo,\n\t];\n\n\t$formdata = $wpdb->insert($table,$data);\n\n\tdie();\n}", "title": "" }, { "docid": "4156f7ecc97ea44c08402bf3d043dd26", "score": "0.44464618", "text": "function get_addform() {\r\n\t\t\r\n\t\t$return = \"\r\n\t\t\t<form name=\\\"addaccount\\\" method=\\\"post\\\">\r\n\t\t\t<div class=\\\"inline_submit\\\"><input name=\\\"submit\\\" type=\\\"submit\\\" value=\\\"Add Account\\\" class=\\\"form_button\\\"></div>\r\n\t\t\t</form>\";\r\n\t\t\t\r\n\t\treturn $return;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "46ebe5b33cbd1a4260f81a77775c03b8", "score": "0.44440463", "text": "public function addeducationAction(){\t\n\t\t$this->_helper->layout()->setLayout('ajaxlayout');\t\n\t\t$db=new Db();\n\t\tglobal $mySessionFront;\n\t \tif(!isLogged()) { \n\t\t\t$this->_redirect('index');\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "09eb2218946eb25d09bf17f349bbc66f", "score": "0.44394907", "text": "public function admin_editor_js()\r\n {\r\n ?>\r\n <script type='text/javascript'>\r\n //adding setting to fields of type \"text\"\r\n // fieldSettings[\"text\"] += \", .placeholder_setting\";\r\n\r\n //binding to the load field settings event to initialize the checkbox\r\n jQuery(document).bind(\"gform_load_field_settings\", function (event, field, form) {\r\n\r\n jQuery(\"#field_placeholder_value\").val(field['<?php echo $this->_fieldName; ?>']);\r\n });\r\n </script>\r\n <?php\r\n }", "title": "" }, { "docid": "532e0607bdd0d402ccd644d30ee2667c", "score": "0.4416803", "text": "function adddishbasket()\n{\n //Récupère les infos du plats sélectionné et les ajoutent à un tableau\n if (isset($_SESSION['loggedUser']))\n {\n $dish = get_dish([\"id\" => $_POST['idDish']]);\n if (!isset($_SESSION['dishesSelected'])) {\n $_SESSION['dishesSelected'] = array();\n }\n if(!isset($_SESSION['dishesSelected'][$dish['idDishes']])) {\n $_SESSION['dishesSelected'][$dish['idDishes']] = $dish;\n $_SESSION['dishesSelected'][$dish['idDishes']]['count'] = 0;\n }\n $_SESSION['dishesSelected'][$dish['idDishes']]['count']++;\n\n //array_push($_SESSION['dishesSelected'], $dish);\n }else{\n $_SESSION['dishesSelected'] = array();\n ?>\n <script>document.location.href=\"index.php?action=Connexion&Message=Vous devez être connecté pour pouvoir ajouter au panier\";</script>\n <?php\n }\n getdishes();\n}", "title": "" }, { "docid": "ca5629aaf1fcc3c0521cc294c732bc01", "score": "0.44135708", "text": "static function admin_additional_script() {\n\t\t//Avec netbeans, le javascript n'est considéré comme tel qu'entre des balises script oiu dans un ficher .js\n\t\tif (0) {\n\t\t\t?><script><?php\n\t\t}\n\t\t?>\n\n\t\t<?php\n\t\tif (0) {\n\t\t\t?></script><?php\n\t\t}\n\t}", "title": "" }, { "docid": "e34c0c09765f40ad9def5e3ec2b6d2e5", "score": "0.44079527", "text": "protected function prepareJavascript()\n\t{\n\t\tif (isset($this->listOptions['javascript']))\n\t\t{\n\t\t\ttheme()->addInlineJavascript($this->listOptions['javascript'], true);\n\t\t}\n\t}", "title": "" }, { "docid": "41208affc2e81636c1225c4a4bad0730", "score": "0.44077936", "text": "function content_wrapper()\n {\n echo \"<div class='advanced-browser-check' style='display:none;' data-url='\".json_encode(\n array( \"abc_url\" => admin_url( 'admin-ajax.php' ) )\n ).\"'></div>\";\n }", "title": "" }, { "docid": "8ea0abedc0f746db230f9ca30adc5add", "score": "0.4407774", "text": "function new_default_content($content) {\nglobal $post;\n \n\n\n\n$content .= '<script type=\"text/javascript\">\nshow_banners(\"468x60\");\n</script>';\n\n return $content;\n }", "title": "" }, { "docid": "31cf12d45d89a4be8cc9ce85e13370c7", "score": "0.44059283", "text": "private function add()\n {\n $this->registry->getObject('template')->buildFromTemplates(\n\t \t$this->registry->getSetting($this->registry->getObject('constants')->getConstant('pages_admin_base') ).$this->registry->getObject('constants')->getHeaderTpl(), \n\t \t$this->registry->getSetting($this->registry->getObject('constants')->getConstant('pages_admin_base') ).'settings/'.$this->registry->getObject('constants')->getAddTpl(),\n\t \t$this->registry->getSetting($this->registry->getObject('constants')->getConstant('pages_admin_base') ).$this->registry->getObject('constants')->getFooterTpl()\n\t \t);\n \n $this->registry->getObject('template')->getPage()->addTag('error_msg','error-msg'); \n $this->registry->getObject('template')->getPage()->addTag('error_text',''); \n $this->registry->getObject('template')->getPage()->addTag('setting_key','');\t\n\t $this->registry->getObject('template')->getPage()->addTag('setting_value','');\n\n }", "title": "" }, { "docid": "b90a363bbb3586c7be9929cb44daf57e", "score": "0.44032347", "text": "function ajax_set_trello_token() {\n if (isset($_POST['token']) && $this->trello_token = $this->set_trello_token($_POST['token'])) {\n echo json_encode(\"\");\n } else {\n echo json_encode(\"error\");\n }\n\n wp_die();\n }", "title": "" }, { "docid": "d23074638d60059dbe2b816618d5c801", "score": "0.44013095", "text": "public function addTour($config, $fObj) {\t\t\n\t\t$tourID = $config['row']['uid'];\n\t\t$storageID = $config['row']['pid'];\n\t\t$baseURL = \"http://\" . $_SERVER['SERVER_NAME']; \n\t\t\t\t\t\n\t\t$fiedset = '<style>.hidden {display:none;} .cbgm_preview { position: relative; } .cbgm_preview .input-wrap { height: 24px; position: absolute; width: 92px; } .cbgm_preview .input-wrap .c-inputButton { width: 91px; outline:0 }.cbgm_preview .input-wrap .c-inputButton:focus{box-shadow: none;} \n</style><div class=\"cbgm_preview\">';\n\t\t\t\t\n\t\tif($config['row']['name'] ==''){\n\t\t\t$fiedset .= '<span class=\"input-wrap\">\n\t\t\t\t\t\t\t<input type=\"image\" name=\"_savedok\" class=\"c-inputButton\" src=\"clear.gif\" title=\"Save document\" value=\"Add Termine\">\n\t\t\t\t\t\t</span><input type=\"button\" value=\"Add Termine\" class=\"firstBtn\">';\n\t\t\t$style = 'style=\"display:none\"';\t\n\t\t\t\t\t\n\t\t}else{\n\t\t\tif($tourID !=''){\n\t\t \t\t$savedDate = $this->getSavedDate($tourID); \n\t\t \t}\n\t\t \t$count = count($savedDate);\n\t\t\tif($count>0){\n\t\t\t\t\n\t\t\t\t$fiedset .= '<input type=\"button\" onclick=\"displayPreview(\\''. $config['row']['uid'].'\\')\" '. 'value=\"Add Termine\">';\n\t\t\t\t$style = 'style=\"display:none\"';\n\t\t\t}else{\n\t\t\t\t$style = '';\n\t\t\t\t$fiedset .= '\n\t\t\t\t<!--<script src=\"'.$baseURL.'/typo3conf/ext/nm_touren/Classes/Userfuncs/Js/jquery.min.js\" type=\"text/javascript\"></script>-->\n\t\t\t\t\t\t\t <script src=\"'.$baseURL.'/typo3conf/ext/nm_touren/Classes/Userfuncs/Js/datum.js\" type=\"text/javascript\"></script>';\n\t\t\t}\n\t\t\t\t\t\t\t \t\n\t\t\t$fiedset .= '\n\t\t\t <script src=\"'.$baseURL.'/typo3conf/ext/nm_touren/Classes/Userfuncs/Js/datum.js\" type=\"text/javascript\"></script>\n\t\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$baseURL.'/typo3conf/ext/nm_touren/Classes/Userfuncs/Css/datum.css\" media=\"all\">\t\t\n\t\t\t<script>\n\t\t\t\tfunction displayPreview(uid){\n\t\t\t\t\tdocument.getElementById(\"dateList\").style.display = \"block\";\t\t\t\t\t\t\t\n\t\t\t\t\tvar domain = document.domain;\n\t\t\t\t\t \n\t\t\t\t\t //var script1 = document.createElement(\"script\");\n\t\t\t\t\t //script1.setAttribute(\"type\", \"text/javascript\");\n\t\t\t\t\t //script1.setAttribute(\"src\", \"http://\"+domain+\"/typo3conf/ext/nm_touren/Classes/Userfuncs/Js/jquery.min.js\");\n\t\t\t\t\t // document.head.appendChild(script1);\n\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t// var script = document.createElement(\"script\");\n\t\t\t\t\t// script.setAttribute(\"type\", \"text/javascript\");\n\t\t\t\t\t// script.setAttribute(\"src\", \"http://\"+domain+\"/typo3conf/ext/nm_touren/Classes/Userfuncs/Js/datum.js\");\n\t\t\t\t\t// document.head.appendChild(script);\n\t\t\t\t}\n\t\t\t</script>';\n\t\t}\n\t\t\t\t\n\t\t$data\t = $this->data($tourID,$storageID);\n\t\t$fiedset .= '<div id=\"dateList\" '.$style.'>'.$data.'</div>';\n\t\t$fiedset .= '</div>';\n\t\treturn $fiedset;\n\t}", "title": "" }, { "docid": "01c3db6b6d3570268df6e2d09d69631c", "score": "0.43991566", "text": "function addData() {\n\techo \"\n\t<form action='' method='POST' name='form-add'>\n\t\t<div>\n\t\t\t<label>Material Code</label>\n\t\t\t\t<input type='text' name='material_code' placeholder='Please fill this field with New Material Code' required autofocus>\n\t\t</div>\n\t\t<div>\n\t\t\t<label>QTY</label>\n\t\t\t\t<input type='text' name='qty' placeholder='Please fill this field with new Quantity' required>\n\t\t</div>\n\t\t<div>\n\t\t\t<label>UnitD</label>\n\t\t\t\t<input type='text' name='unit' placeholder='Please fill this field with new Unit' required>\n\t\t</div>\n\t\t<div>\n\t\t\t<label>Discription</label>\n\t\t\t\t<textarea type='text' name='description' placeholder='Please fill this field with new discription' required> </textarea>\n\t\t</div>\n\t\t<div>\n\t\t\t<label>Size</label>\n\t\t\t\t<input type='text' name='size' placeholder='Please fill this field with new Size' required>\n\t\t</div>\n\t\t<div>\n\t\t\t<label>Unit Price</label>\n\t\t\t\t<input type='text' name='unit_price' placeholder='Please fill this field with new Unit Price' required>\n\t\t</div>\n\t\t<div>\n\t\t\t<label>Amount</label>\n\t\t\t\t<input type='text' name='amount' placeholder='Please fill this field with new Amount' required>\n\t\t</div>\n\n\t\t\t\t<input type='submit' name='button_add' value='Create New Fpr Item'>\n\t\t</div>\n\t</form>\n\";\n}", "title": "" }, { "docid": "0e2dbbc74bcb019806283891a26f45fe", "score": "0.4396436", "text": "public static function wc_st_js( $provider_array ) { \n\t\t$js = \"\n\t\t\tjQuery(function() {\n\n\t\t\t\tvar providers = jQuery.parseJSON( '\" . json_encode( $provider_array ) . \"' );\n\n\t\t\t\tjQuery('#tracking_number').prop('readonly',true);\n\t\t\t\tjQuery('#date_shipped').prop('readonly',true);\t\n\n\t\t\t\tfunction updatelink( tracking, provider ) { \n\n\t\t\t\t\tvar postcode = '32';\n\t\t\t\t\tpostcode = encodeURIComponent(postcode);\n\n\t\t\t\t\tlink = providers[provider];\n\t\t\t\t\tlink = link.replace('%251%24s', tracking);\n\t\t\t\t\tlink = link.replace('%252%24s', postcode);\n\t\t\t\t\tlink = decodeURIComponent(link);\n\t\t\t\t\treturn link; \n\t\t\t\t}\n\n\t\t\t\tjQuery('.tracking_provider, #tracking_number').unbind().change(function(){\n\t\t\t\t\t\n\t\t\t\t\tvar form = jQuery(this).parent().parent().attr('id');\n\n\t\t\t\t\tvar tracking = jQuery('#' + form + ' input#tracking_number').val();\n\t\t\t\t\tvar provider = jQuery('#' + form + ' #tracking_provider').val();\n\t\t\t\t\t\n\t\t\t\t\tif ( providers[ provider ]) {\n\t\t\t\t\t\tlink = updatelink(tracking, provider); \n\t\t\t\t\t\tjQuery('#' + form + ' #tracking_number').prop('readonly',false);\n\t\t\t\t\t\tjQuery('#' + form + ' #date_shipped').prop('readonly',false);\n\t\t\t\t\t\tjQuery('#' + form + ' .custom_tracking_url_field, #' + form + ' .custom_tracking_provider_name_field').hide();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tjQuery('#' + form + ' .custom_tracking_url_field, #' + form + ' .custom_tracking_provider_name_field').show();\n\t\t\t\t\t\tlink = jQuery('#' + form + ' input#custom_tracking_link').val();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (link) {\n\t\t\t\t\t\tjQuery('#' + form + ' p.preview_tracking_link a').attr('href', link);\n\t\t\t\t\t\tjQuery('#' + form + ' p.preview_tracking_link').show();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tjQuery('#' + form + ' p.preview_tracking_link').hide();\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\t\t\t\tjQuery('#custom_tracking_provider_name').unbind().click(function(){\n\t\t\t\t\t\n\t\t\t\t\tvar form = jQuery(this).parent().parent().attr('id');\n\n\t\t\t\t\tjQuery('#' + form + ' #tracking_number').prop('readonly',false);\n\t\t\t\t\tjQuery('#' + form + ' #date_shipped').prop('readonly',false);\n\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t});\n\t\t\"; \n\n\t\treturn $js; \n\t}", "title": "" }, { "docid": "d5b228ea34e4ae8ec878091c5ceebb86", "score": "0.4394528", "text": "function GridAddMode() {\r\n\t\t$_SESSION[EW_SESSION_INLINE_MODE] = \"gridadd\"; // Enabled grid add\r\n\t}", "title": "" }, { "docid": "6248b88b4f25be209eed0b6229be70c2", "score": "0.4392579", "text": "public function add_js_locals( $current ) {\n\n\t\t$new = array(\n\t\t\t'apply'\t\t\t\t\t=> __( 'Apply', 'theme-blvd-layout-builder' ),\n\t\t\t'builder'\t\t\t\t=> __( 'Builder', 'theme-blvd-layout-builder' ),\n\t\t\t'clear_layout'\t\t\t=> __( 'Are you sure you want to clear the current layout? This will permanently delete all sections, elements, and custom CSS from this page\\'s custom layout.', 'theme-blvd-layout-builder' ),\n\t\t\t'column'\t\t\t\t=> __( 'Column', 'theme-blvd-layout-builder' ),\n\t\t\t'columns'\t\t\t\t=> __( 'Columns', 'theme-blvd-layout-builder' ),\n\t\t\t'edit_layout'\t\t\t=> __( 'Edit Layout', 'theme-blvd-layout-builder' ),\n\t\t\t'delete_text'\t\t\t=> __( 'Delete', 'theme-blvd-layout-builder' ),\n\t\t\t'delete_block'\t\t\t=> __( 'Are you sure you want to delete the content block?', 'theme-blvd-layout-builder' ),\n\t\t\t'delete_layout'\t\t\t=> __( 'Are you sure you want to delete the template(s)?', 'theme-blvd-layout-builder' ),\n\t\t\t'dismiss'\t\t\t\t=> __( 'Dismiss this notice.', 'theme-blvd-layout-builder' ),\n\t\t\t'layout_created'\t\t=> __( 'Layout created!', 'theme-blvd-layout-builder' ),\n\t\t\t'no_element'\t\t\t=> __( 'Oops! You forgot to select an element.', 'theme-blvd-layout-builder' ),\n\t\t\t'no_layouts'\t\t\t=> __( 'Oops! You didn\\'t select any templates to delete.', 'theme-blvd-layout-builder' ),\n\t\t\t'nag_save'\t\t\t\t=> __( 'Changes to your custom layout have been made. Update the page to save the changes.' ),\n\t\t\t'nag_save_template'\t\t=> __( 'Changes to your template have been made. Update the template to save the changes.' ),\n\t\t\t'save_switch_layout'\t=> __( 'Would you like to save the current layout before switching?', 'theme-blvd-layout-builder' ),\n\t\t\t'shift_up_error'\t\t=> __( 'The section can\\'t be shifted up any further.', 'theme-blvd-layout-builder' ),\n\t\t\t'shift_down_error'\t\t=> __( 'The section can\\'t be shifted down any further.', 'theme-blvd-layout-builder' ),\n\t\t\t'template_apply'\t\t=> __( 'Are you sure you want to merge the selected layout with your current layout?', 'theme-blvd-layout-builder' ),\n\t\t\t'template_desc'\t\t\t=> __( 'Enter a name for the new template.', 'theme-blvd-layout-builder' ),\n\t\t\t'template_save'\t\t\t=> __( 'Save as Template', 'theme-blvd-layout-builder' ),\n\t\t\t'template_title'\t\t=> __( 'Save Current Layout as Template', 'theme-blvd-layout-builder' ),\n\t\t\t'template_updated'\t\t=> __( 'The template has been saved.', 'theme-blvd-layout-builder'),\n\t\t\t'layout_updated'\t\t=> __( 'The custom layout has been saved.', 'theme-blvd-layout-builder'),\n\t\t\t'framework_version' => TB_FRAMEWORK_VERSION,\n\t\t);\n\n\t\tif ( version_compare(TB_FRAMEWORK_VERSION, '2.5.0', '<') ) {\n\t\t\t$new['template_apply'] = __( 'Are you sure you want to apply the selected starting point? Any work on the current layout for this page will be erased.', 'theme-blvd-layout-builder' );\n\t\t}\n\n\t\treturn array_merge($current, $new);\n\t}", "title": "" }, { "docid": "d0ae365818377822156a4207597b4575", "score": "0.43898132", "text": "function JavascriptDebug()\n{\n?>\n<script>\n<!--\n\nvar d = window.open(\"about:blank\",\"debug\");\nd.document.open();\nd.document.write(\"<form><textarea rows=20 cols=80 id=t></textarea></form>\");\nd.document.close();\n\nvar t = d.document.all['t'];\n\nfunction p(str)\n{\n t.value += '*' + str + '*\\n';\n}\n\np(\"DEBUG WINDOW\")\n\n// -->\n</script> \n<?\n}", "title": "" }, { "docid": "9a09abc2d6287e7e52f4aa9e93d8f985", "score": "0.43804282", "text": "public static function js_post_form()\n { ?>\n\n <script>\n\n (function ($) {\n\n $(function () {\n //save the settings on key press\n $(window).bind('keydown', function(event) {\n if (event.ctrlKey || event.metaKey) {\n switch (String.fromCharCode(event.which).toLowerCase()) {\n case 's'://bind Ctrl+S to save/submit form\n event.preventDefault();\n //save all forms\n _.each($('.bc-form-submit-button'), function(the_button){\n save_form($(the_button));\n });\n\n break;\n\n }\n }\n });\n\n\n $('.bc-form-submit-button').on('click', function (e) {\n e.preventDefault();\n save_form($(this));\n });\n /**\n * when clicking on this button, add one more row. This is for settings that\n * have value varied. For example the thank you page associate with categories \n * in the thank you page plugin\n */\n $(document).on('click', '.add-data-row', function(){\n add_data_row($(this));\n });\n /**\n * Same reason as above\n */\n $(document).on('click', '.minus-data-row', function(){\n remove_data_row($(this));\n });\n\n });\n /**\n * this function save form data via ajax\n * form action value (ajax action) is defined by the \n * action field in form (printed by form_settings())\n * @param the_button button that clicked\n */\n function save_form(the_button)\n {\n var data = {};\n\n //Collect data from fields that have keys (name), if the fields don't have keys, they are part of a\n //bigger field (such as key_select_select)\n\n //this array keeps multiple checkboxes that were processed\n //multiple checkboxes fields need to processed only once to avoid value override\n let multiple_checkbox_processed = [];\n\n _.each(the_button.closest('form').find('input, select, textarea').not('.bc-no-key-field'), function (i) {\n\n let input = $(i);\n let input_name = (input).attr('name');\n let input_value = undefined;\n\n\n //for checkbox, get value of the checked one\n //this is for simple checkbox, where the value is yes or no/true or false\n //in case of multiple checkbox, we need to grab multiple values\n if (input.attr('type') === 'checkbox' && input.val() === \"\")\n input_value = input.is(\":checked\");\n //save the multiple checkbox\n else if (input.attr('type') === 'checkbox' && input.val() !== \"\")\n {\n //if the first checkbox with this name was processed, we skip because the values\n //of all available options are saved in the first place\n if (typeof multiple_checkbox_processed[input_name] === 'undefined')\n {\n input_value = [];\n\n _.each(the_button.closest('form').find('input[name=\"'+input_name+'\"]'), function(this_input_name){\n if ($(this_input_name).is(\":checked\"))\n input_value.push($(this_input_name).val())\n });\n\n //add the checkbox name to this of processed checkbox so the remaining checkboxes\n //with the same name will not be processed again\n multiple_checkbox_processed.push(input_name);\n }\n\n\n }\n else if (input.attr('type') === 'radio') {\n //for radio input, since there are many radios share the same name, only get the value of checked radio\n if (input.is(':checked'))\n input_value = input.val();\n }\n else\n {\n\n if (input.is('textarea') && input_name.indexOf('_save_html'))\n {\n console.log('saving HTML field');\n input_value = encodeURIComponent(input.val());\n }\n\n else\n input_value = input.val();\n }\n\n if (typeof (input_value) !== 'undefined')\n data[input_name] = input_value;\n\n\n });\n //save data from fields that aren't simple input, select but have multiple inputs, selects\n _.each(the_button.closest('form').find('.bc-key-array-assoc-data-field'), function(field){\n var data_rows = {};\n\n _.each($(field).find('.bc-single-data-row'), function(single_data_row){\n\n var data_key = $(single_data_row).find('.bc-single-data-value').eq(0).val();\n var data_value = $(single_data_row).find('.bc-single-data-value').eq(1).val();\n if (data_key !== '' )\n data_rows[data_key] = data_value;\n\n });\n\n //update the data of this field to the total data\n data[$(field).attr('data-name')] = data_rows;\n\n });\n\n\n $.post(ajaxurl, data, function (response) {\n\n swal('', response.message, 'info');\n if (typeof (response.redirect_url) !== 'undefined')\n {\n var current_tab = the_button.closest('.bc-single-tab').attr('id');\n window.location.href = response.redirect_url + '&active_tab='+ current_tab;\n }\n\n });\n }\n\n //add one more data ro\n function add_data_row(add_button)\n {\n //clone current row\n var clone = add_button.closest('.bc-single-data-row').clone();\n add_button.closest('.bc-data-field').append(clone);\n\n }\n\n function remove_data_row(remove_button)\n {\n var current_row = remove_button.closest('.bc-single-data-row');\n //don't remove if it's the last row\n var data_field = remove_button.closest('.bc-data-field');\n\n if (data_field.find('.bc-single-data-row').length <=1)\n return;\n\n current_row.remove();\n\n\n }\n\n\n })(jQuery);\n\n </script>\n\n\n <?php\n\n\n }", "title": "" }, { "docid": "22556fd1385968655eacd1c34a0e41ff", "score": "0.4373221", "text": "function enqueue_backend() {\n \n /** Add admin styles. */\n add_action( 'admin_enqueue_scripts', [$this, 'load_admin_styles'] );\n \n /** Add admin javascript. */\n add_action( 'admin_enqueue_scripts', [$this, 'load_admin_scripts'] );\n \n }", "title": "" }, { "docid": "7e94d948d01aba88ff8bc02c08c0658b", "score": "0.43699238", "text": "function add_js ($script) {\n $out=\"\\n<script language='Javascript'>\\n<!--\\n\";\n $out.=$script;\n $out.=\"\\n//End Javascript -->\\n</script>\\n\\n\";\n return $out;\n}", "title": "" }, { "docid": "15b0e234bcc7852af5e5a1814ba08dc2", "score": "0.43695325", "text": "function admin_head() {\n \tif ($this->new_admin_if) {\n \t\t$levelAnimation = 'animateRoleManagerMessage(\\'#\\'+ rolename + \"___user_level\", true);';\n \t\t$messageAnimation = 'animateRoleManagerMessage(\\'.fade\\', false);';\n \t\t$capAnimation = 'animateRoleManagerMessage(\\'#\\'+ btn.parentNode.id, true);';\n \t\t$jQueryAnimation = '\n \t\tfunction animateRoleManagerMessage(element, backToOrigBG) {\n\t\t\t\tvar endBG = \\'#fffbcc\\';\n\t\t\t\tif (backToOrigBG) {\n\t\t\t\t\tendBG = jQuery(element).css(\"backgroundColor\");\n\t\t\t\t}\t\t\t\n\t\t\t\tjQuery(element).animate( { backgroundColor: \\'#ffffe0\\' }, 300).animate( { backgroundColor: \\'#fffbcc\\' }, 300).animate( { backgroundColor: \\'#ffffe0\\' }, 300).animate( { backgroundColor: endBG }, 1000);\n\t\t\t};\n \t\t';\n \t} else {\n \t\t$levelAnimation = 'Fat.fade_element(rolename + \"___user_level\");';\n \t\t$messageAnimation = 'Fat.fade_all();';\n \t\t$capAnimation = 'Fat.fade_element(btn.parentNode.id);'; \t\t\n \t\t$jQueryAnimation = '';\n \t}\n echo '\n <link rel=\"stylesheet\" href=\"'.$this->style_dir.'style.css\" type=\"text/css\" />\n <script type=\"text/javascript\">\n function badidea() {\n alert(\"' . addslashes(__(\"You can't remove this permission from a role assigned to you!\", 'role-manager')) . '\");\n\t\t\treturn false;\n \t}\n function setdefaultrole(rolename) {\n var ajax = new sack();\n ajax.requestFile = \"' . $this->manage_roles_uri . '\";\n ajax.setVar(\"action\", \"makedefault\");\n ajax.setVar(\"role\", rolename); \n ajax.setVar(\"ajax\", \"1\");\n ajax.execute = true;\n //ajax.element = \"toast\"; // Debug ajax returned script\n ajax.runAJAX();\n return true; \n }\n function setlevel(level,rolename) {\n var ajax = new sack();\n ajax.requestFile = \"' . $this->manage_roles_uri . '\";\n ajax.setVar(\"action\", \"setuserlevel\");\n ajax.setVar(\"role\", rolename);\n ajax.setVar(\"level\", level);\n ajax.setVar(\"ajax\", \"1\");\n ajax.execute = true;\n //ajax.element = \"toast\"; // Debug ajax returned script\n ajax.runAJAX();\n return true; \n }\n function fadeuserlevel(rolename) {\n '.$levelAnimation.'\n }\n function showdefaultrole(rolename) {\n var imgs = document.getElementsByTagName(\"IMG\");\n for(z=0;z<imgs.length;z++) {\n if(imgs[z].id == \"defrole_\" + rolename) {\n imgs[z].src = \"' . $this->image_dir . 'star.png\";\n imgs[z].className = \"defrole\";\n }\n else if(imgs[z].className == \"defrole\") {\n imgs[z].src = \"' . $this->image_dir . 'star_disabled.png\";\n imgs[z].className = \"nondefrole\";\n }\n }\n }\n function submitme(frm) {\n var ajax = new sack();\n ajax.requestFile = \"' . $this->manage_roles_uri . '\";\n inputs = frm.getElementsByTagName(\"INPUT\");\n for(z=0;z<inputs.length;z++) {\n ajax.setVar(inputs[z].name, inputs[z].value);\n }\n ajax.setVar(\"ajax\", \"1\");\n ajax.execute = true;\n //ajax.element = \"toast\"; // Debug ajax returned script\n ajax.runAJAX();\n return false;\n }\n function toggleCap(capbtnname) {\n var btn = document.getElementById(capbtnname);\n btn.value = (btn.value == \"0\") ? \"1\" : \"0\";\n btn.src = \"' . $this->image_dir . '\" + ((btn.value == \"0\") ? \"accept.png\" : \"cancel.png\");\n '.$capAnimation.'\n\t }\n function setMessage(message) {\n var msg = document.getElementById(\"message\");\n try {\n msg.innerHTML = \"<p>\" + message + \"</p>\";\n }\n catch(e) {\n msg = document.createElement(\"DIV\");\n msg.className = \"updated fade\";\n msg.setAttribute(\"id\", \"message\");\n main = document.getElementById(\"main_page\");\n main.parentNode.insertBefore(msg, main);\n msg.innerHTML = \"<p>\" + message + \"</p>\";\n }'.\n $messageAnimation.'\n }'\n .$jQueryAnimation.'\n\t\t</script>\n\t\t';\n if ($this->new_admin_if) {\n \techo '<link rel=\"stylesheet\" href=\"'.$this->style_dir.'new_admin_style.css\" type=\"text/css\" />';\n }\n }", "title": "" }, { "docid": "1f7c7e446c6ecc367ade61a2e55ca363", "score": "0.43647924", "text": "public function render_js_backend( string $hook_suffix ) {\n\t\t\tif ( ( 'settings_page_' . $this->get_slug() ) !== $hook_suffix ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$attach_to_footer = true;\n\n\t\t\twp_enqueue_script( $this->get_prefix() . '_backend',\n\t\t\t\t$this->get_url() . 'js/backend-es5.js',\n\t\t\t\tarray(\n\t\t\t\t\t// load these registered dependencies first.\n\t\t\t\t\t'jquery',\n\t\t\t\t),\n\t\t\t\t$this->get_version(),\n\t\t\t\t$attach_to_footer\n\t\t\t);\n\n\t\t\t$plugin_data_options = $this->get_plugin_data_options();\n\n\t\t\t$demo_shortcode_params = $this->get_demo_shortcode_params();\n\n\t\t\t$force_refresh = isset( $plugin_data_options['force_refresh'] ) ? $plugin_data_options['force_refresh'] : false;\n\n\t\t\twp_localize_script( $this->get_prefix() . '_backend',\n\t\t\t\t'wpdtrtPluginBoilerplateConfig',\n\t\t\t\tarray(\n\t\t\t\t\t'prefix' => $this->get_prefix(),\n\t\t\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t\t'messages' => $this->get_messages(),\n\t\t\t\t\t'force_refresh' => $force_refresh,\n\t\t\t\t\t'refresh_api_data' => isset( $demo_shortcode_params ) ? 'true' : 'false',\n\t\t\t\t)\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "cef84405e2fe12ca22b8f06bb608098b", "score": "0.4359547", "text": "function add_hidden() {\n\t\n\tglobal $content_type;\n\trequire $_SERVER['DOCUMENT_ROOT'] . \"/wp-content/plugins/wk_content_types/options.php\";\n\t\n\t//also change the css for the menu to show our option\n\twp_enqueue_script('jquery');\n\t//dont change the selected menu if its an edit\n\tif($_GET['post'] == ''){\n\t?>\n\t<script>\n\t\tjQuery(document).ready(function() {\n\t\t\t//remove current cless from Add new\n\t\t\tjQuery(\"#menu-posts .wp-submenu ul li:not('.dont-touch-me')\").removeClass(\"current\");\n\t\t\tjQuery(\"#menu-posts .wp-submenu ul li:not('.dont-touch-me') a\").removeClass(\"current\");\n\t\t\t//add current classes to our type\n\t\t\tvar type = \"<?php echo $content_type; ?>\";\n\t\t\tif(type != \"\") {\n\t\t\t\tjQuery(\"#menu-posts .wp-submenu ul li a[href='post-new.php?type=\"+type+\"']\").parent().addClass(\"current\");\n\t\t\t\tjQuery(\"#menu-posts .wp-submenu ul li a[href='post-new.php?type=\"+type+\"']\").addClass(\"current\");\n\t\t\t}\n\t\t});\n\t</script>\n\t<?php\n\t}\n\t?>\n\t<p class=\"hidden\">\n\t\t<input type=\"text\" name=\"content_type\" id=\"content_type\" value=\"<?php echo $content_type; ?>\" size=\"30\" />\n\t</p>\n\t<?php\n\t//remove dummy meta box\n\techo \"<style type='text/css'>#hidden {display: none !important}</style>\";\n}", "title": "" }, { "docid": "9d7307bbb8cf35ae5a2191f42eb76208", "score": "0.43584508", "text": "function add_form() {//\n if ( isset( $_POST['add'] ) ) {\n\t\t\t$details = \"Name: \" . $_POST['name'] . \" Email: \" . $_POST[\"email\"];\n\t\t\tarray_push($_SESSION['formdata'], $details); \n\t\t\techo \"Successfully submitted data!\";\n }\n ?> \n\t<form method='post' action=''> \n\t\t\tName: <input type='text' name='name'><br>\n\t\t\tE-mail: <input type='text' name='email'><br>\n\t\t\t<input type='submit' name='add'>\n\t</form>\n <?php\n\t\n\n}", "title": "" }, { "docid": "88af2c44eb8550e4be10f6a911c95c88", "score": "0.43575495", "text": "function article_add_form() {\n\n\t\t$accessName = 'New Article';\n\n\t\t$this->session_lib->check_permission_with_redirect_page($accessName);\n\n\t\t$this->log_activity_lib->log($accessName, $this->activityName);\n\n\t\t$addAttribPage = array(\n\t\t\t\t\t\t\t'subtitleMenu' => '<i class=\"fa fa-plus\"></i> New Article',\n\t\t\t\t\t\t\t'sublinkMenu' => '<li class=\"active\">\n\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-plus\"></i> New Article\n\t\t\t\t\t\t\t\t\t\t\t</li>'\n\t\t\t\t\t\t);\n\n\t\t$viewData = array_merge($addAttribPage, $this->attribPage, $this->attribThisPage);\n\n\t\t$this->template_lib->webadmin_default_template('webadmin/content/article/add', $viewData);\n\n\t}", "title": "" }, { "docid": "b5b2c7d0145f59713f98e9394acc36a4", "score": "0.43558976", "text": "public function render_add() {\n return $this->ufilter->display_add();\n }", "title": "" }, { "docid": "bd58ed60e30baf75ef7b5eb2300fbd22", "score": "0.43527558", "text": "public function addAll ($storage) {}", "title": "" }, { "docid": "d581fe7ba27bc22dbfedd44d4a82432b", "score": "0.4349384", "text": "function utm_codes() {\n global $domains, $utm;\n if(!is_admin()) { \n /* register, localize and enque javascript for utm codes */ \n if(!empty($domains)) { \n $data = array( 'domains' => json_encode($domains), 'utm_data' => json_encode($utm) );\n\n wp_register_script( 'js-outbound-links-utm', get_stylesheet_directory_uri().'/js/outbound-links.js' , array('jquery'), '1.2', true );\n wp_localize_script( 'js-outbound-links-utm', 'data', $data );\n wp_enqueue_script( 'js-outbound-links-utm' );\n }\n }\n}", "title": "" }, { "docid": "61004584b44f66fbe67b783130da273c", "score": "0.43430552", "text": "function sp_add_custom_product_tab_ajax() {\n\t$nonce = $_POST['ajaxCustomNonce'];\n\n\t// bail if nonce don't check out\n\tif ( ! wp_verify_nonce( $nonce, '_sp_nonce' ) )\n\t die ( 'error' );\n\n\t$tab = '<li class=\"tab\"><a href=\"\" class=\"tab-title\">' . __( 'Untitled', 'sp-theme' ) . '</a><span class=\"edit-title\"><input type=\"hidden\" name=\"sp_product_tab_name[]\" value=\"' . __( 'Untitled', 'sp-theme' ) . '\" placeholder=\"' . esc_attr__( 'Enter Tab Name', 'sp-theme' ) . '\" class=\"tab-name\" /></span><a href=\"#\" class=\"remove-tab\" title=\"' . esc_attr__( 'Remove Tab', 'sp-theme' ) . '\">&times;</a></li>' . PHP_EOL;\n\n\t$editor = '<div id=\"\" class=\"tab-content\">' . PHP_EOL;\n\n\t$settings = array(\n\t\t'textarea_name'\t=> 'sp_product_tinymce_textarea[]',\n\t\t'tinymce' \t\t=> true,\n\t\t'media_buttons' => true,\n\t\t'editor_class'\t=> 'sp-tinymce-content'\n\t);\n\n\t$content = '';\n\n\t$mce_id = 'pt_tinymce_' . strtolower( wp_generate_password( 6, false ) );\n\n\t// content\n\tob_start();\n\twp_editor( $content, $mce_id, $settings );\n\t$editor .= ob_get_clean();\n\n\t$editor .= '</div><!--close .tab-content-->' . PHP_EOL;\n\n\techo json_encode( array( 'tab' => $tab, 'editor' => $editor, 'mce_id' => $mce_id ) );\n\texit;\n}", "title": "" }, { "docid": "54874701ba88396720d65f90c749d55b", "score": "0.43372318", "text": "function gis_inserer_javascript($flux){\n\t$config = @unserialize($GLOBALS['meta']['gis']);\n\tif (!is_array($config))\n\t\t$config = array();\n\t$config = array_merge(array(\n\t\t'api' => 'openlayers'\n\t), $config);\n\t\n\tinclude_spip('gis_fonctions');\n\t$config['api'] = gis_api_utilisee();\n\tif(defined('_GIS_APIS') && !array_key_exists($config['api'],unserialize(_GIS_APIS))){\n\t\treturn $flux;\n\t}\n\t\n\t// insertion du script de l'api a utiliser\n\tif ($config['api'] == 'cloudmade')\n\t\t$flux .=\"\\n\".'<script type=\"text/javascript\" src=\"http://tile.cloudmade.com/wml/latest/web-maps-lite.js\"></script>'.\"\\n\";\n\tif ($config['api'] == 'google')\n\t\t$flux .=\"\\n\".'<script type=\"text/javascript\" src=\"http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key='.$config['api_key_google'].'&hl='.$GLOBALS['spip_lang'].'\"></script>'.\"\\n\";\n\tif ($config['api'] == 'googlev3')\n\t\t$flux .=\"\\n\".'<script type=\"text/javascript\" src=\"http://maps.google.com/maps/api/js?sensor=false&amp;language='.$GLOBALS['spip_lang'].'\"></script>'.\"\\n\";\n\tif ($config['api'] == 'microsoft')\n\t\t$flux .=\"\\n\".'<script type=\"text/javascript\" src=\"http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6\"></script>'.\"\\n\";\n\tif ($config['api'] == 'openlayers')\n\t\t$flux .=\"\\n\".'<script type=\"text/javascript\" src=\"http://openlayers.org/api/2.11/OpenLayers.js\"></script>'.\"\\n\";\n\tif ($config['api'] == 'ovi')\n\t\t$flux .=\"\\n\".'<script type=\"text/javascript\" src=\"http://api.maps.ovi.com/jsl.js\"></script>'.\"\\n\";\n\tif ($config['api'] == 'yandex')\n\t\t$flux .=\"\\n\".'<script type=\"text/javascript\" src=\"http://api-maps.yandex.ru/1.1/index.xml?key='.$config['api_key_yandex'].'\"></script>'.\"\\n\";\n\t\t\n\t// insertion de la lib mapstraction\n\tif(in_array($config['api'],array('cartociudad','google','googlev3','yandex','openlayers'))){\n\t\t$geocoder = ($config['geocoder']) ? ',[geocoder]' : '';\n\t}else{\n\t\t$geocoder = '';\n\t}\n\t$flux .=\"\\n\".'<script id=\"mxn_script\" type=\"text/javascript\" src=\"'. url_absolue(find_in_path(_DIR_LIB_GIS.'mxn.js')) .'?('. $config['api'] . $geocoder .')\"></script>'.\"\\n\";\n\t\n\t// insertion des scripts de gis\n\t$flux .=\"\\n\".'<script type=\"text/javascript\" src=\"'. url_absolue(find_in_path('javascript/gis.js')) .'\"></script>'.\"\\n\";\n\n\treturn $flux;\n}", "title": "" }, { "docid": "401a45cf971f30efcf61b59a18573bdf", "score": "0.43313342", "text": "protected function draw_javascript() {\n\t\tif (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))\n\t\t\tdebug_log('Entered (%%)',33,0,__FILE__,__LINE__,__METHOD__,$fargs);\n\n\t\tif ($this->javascript) {\n\t\t\techo \"<!-- Forms for javascript submit to call to create base_dns -->\\n\";\n\t\t\techo $this->javascript;\n\t\t\techo \"<!-- The end of the forms for javascript submit to call to create base_dns -->\\n\";\n\t\t\t$this->javascript = '';\n\t\t}\n\t}", "title": "" } ]
7dde6bc45d4fce7f0720e20533ae7834
Add Font Awesome icons to the theme
[ { "docid": "deab519c557914e1261aafaeea08b9ac", "score": "0.70243835", "text": "function imelab_enqueue_icon_stylesheet() {\r\n\twp_register_style( 'fontawesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );\r\n\twp_enqueue_style( 'fontawesome');\r\n}", "title": "" } ]
[ { "docid": "4ced9ac6a69263b2cf890543d414d676", "score": "0.7394036", "text": "function newIconFont() {\n\n wp_register_style(\n 'redux-font-awesome',\n get_template_directory_uri() . '/inc/fonts/font-awesome/css/font-awesome.min.css',\n array(),\n time(),\n 'all'\n ); \n wp_enqueue_style( 'redux-font-awesome' );\n}", "title": "" }, { "docid": "f4cd91d760d63dff9999948bb6f1842b", "score": "0.7133425", "text": "public function registerFontAwesomeCss()\n\t{\n $this->registerPackage('font-awesome');\n\t}", "title": "" }, { "docid": "7262d97d4217e3a12f051e45c13fea1f", "score": "0.6909438", "text": "public static function load_icon_fonts(){\n\t\tglobal $fa_var, $fa_icon_var, $pe_7s_var;\n\t\t$func\t= new RevSliderFunctions(self::$frameworkHelper);\n\t\t$global\t= $func->get_global_settings();\n\t\t$ignore_fa = $func->_truefalse($func->get_val($global, 'fontawesomedisable', false));\n\n\t\techo ($ignore_fa === false && ($fa_icon_var == true || $fa_var == true)) ? '<link rel=\"stylesheet\" property=\"stylesheet\" id=\"rs-icon-set-fa-icon-css\" href=\"' . Framework::$RS_PLUGIN_URL . 'public/assets/fonts/font-awesome/css/font-awesome.min.css\" type=\"text/css\" media=\"all\" />'.\"\\n\" : '';\n\t\techo ($pe_7s_var) ? '<link rel=\"stylesheet\" property=\"stylesheet\" id=\"rs-icon-set-pe-7s-css\" href=\"' . Framework::$RS_PLUGIN_URL . 'public/assets/fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.min.css\" type=\"text/css\" media=\"all\" />'.\"\\n\" : '';\n\t}", "title": "" }, { "docid": "ab1092f8c65e779cccb44570d65332e4", "score": "0.68358696", "text": "function enqueue_fontawesome() {\n wp_enqueue_style( 'fontawesome', 'http:////netdna.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.css', '', '4.5.0', 'all' );\n}", "title": "" }, { "docid": "948df5fb62002766527a6374c645de21", "score": "0.6800365", "text": "function admin_style_init()\n{\n wp_register_style('admin-font-awesome', 'https://cdn.jsdelivr.net/npm/[email protected]/css/font-awesome.min.css', array(), SAKURA_VERSION);\n wp_enqueue_style('admin-font-awesome');\n}", "title": "" }, { "docid": "12229504f9fddf05881904ab237eafca", "score": "0.66775215", "text": "public function addFavIcon()\n\t{\n\t\t$this->html->template->appendHTML('HEAD', $this->getTag('link', ['rel' => 'shortcut icon', 'href' => config('epesi.ui.favicon', url('favicon.png'))]));\n\t}", "title": "" }, { "docid": "1901376f162c646e147845aee666ac54", "score": "0.6638003", "text": "function prefix_enqueue_awesome() {\nwp_enqueue_style( 'prefix-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css', array(), '4.2.0' ); \n}", "title": "" }, { "docid": "3eafc8619084eba79ca688c1dc9e90f1", "score": "0.66283005", "text": "function cassietheme_preprocess_html(&$vars) {\n drupal_add_css('//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.css', array(\n 'type' => 'external'\n ));\n}", "title": "" }, { "docid": "8135a409fe7597c112773c039d1d94d9", "score": "0.66169167", "text": "function _s_scripts_enqueue() {\n\twp_enqueue_style( 'font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css');\n}", "title": "" }, { "docid": "55f85bd0173745d65c8ce1b55dbf1a08", "score": "0.6611382", "text": "function progenitor_icons_enqueues() {\n\n wp_register_script('font-awesome-5-config-js', get_template_directory_uri() . '/functions/font-awesome-5/config.js', false, null, null);\n wp_enqueue_script('font-awesome-5-config-js');\n\n wp_register_script('font-awesome', 'https://use.fontawesome.com/releases/v5.0.10/js/all.js', false, '5.0.10', null);\n wp_enqueue_script('font-awesome');\n}", "title": "" }, { "docid": "38a987c613e72770784a706a454b3c3f", "score": "0.6611107", "text": "final public function wp_enqueue_scripts()\n {\n wp_enqueue_style('font-awesome');\n }", "title": "" }, { "docid": "e1dc79d292ec0f600f36db7033de7cd6", "score": "0.66084015", "text": "function fontAwesomeIcons() {\n\tstatic $faicons = array();\n\n\tif (empty($faicons)) {\n\t\t$yaml = file_get_contents('vendor/fortawesome/font-awesome/src/icons.yml');\n\t\t$faicons = Yaml::parse($yaml);\n\t}\n\treturn $faicons['icons'];\n}", "title": "" }, { "docid": "7f3f8eca8771cffe60a6473f8027a2a2", "score": "0.64823693", "text": "public function admin_enqueue()\n {\n wp_register_style(\n 'font-awesome',\n addon_assets_url( 'css/font-awesome.min.css', __FILE__ ),\n [],\n '4.7.0'\n );\n }", "title": "" }, { "docid": "f669f993e5e7bf517139f76d4df94f3d", "score": "0.6436561", "text": "function wsl_use_fontawesome_icons( $provider_id, $provider_name, $authenticate_url )\r\n{\r\n ?>\r\n <a\r\n rel = \"nofollow\"\r\n href = \"<?php echo $authenticate_url; ?>\"\r\n data-provider = \"<?php echo $provider_id ?>\"\r\n class = \"wp-social-login-provider wp-social-login-provider-<?php echo strtolower( $provider_id ); ?>\"\r\n >\r\n <span>\r\n <i class=\"fa fa-<?php echo strtolower( $provider_id ); ?>\"></i> <?php echo $provider_name; ?>\r\n </span>\r\n </a>\r\n <?php\r\n}", "title": "" }, { "docid": "0d0fe345158ad5feaa66fef813cda0c6", "score": "0.6421677", "text": "function cws_get_all_fa_icons() {\n\t$meta = get_option('cws_fa');\n\tif (!empty($meta) || (time() - $meta['t']) > 3600*7 ) {\n\t\tglobal $wp_filesystem;\n\t\tif( empty( $wp_filesystem ) ) {\n\t\t\trequire_once( ABSPATH .'/wp-admin/includes/file.php' );\n\t\t\tWP_Filesystem();\n\t\t}\n\t\t$file = get_template_directory() . '/fonts/font-awesome/font-awesome.css';\n\t\t$fa_content = '';\n\t\tif ( $wp_filesystem && $wp_filesystem->exists($file) ) {\n\t\t\t$fa_content = $wp_filesystem->get_contents($file);\n\t\t\tif ( preg_match_all( \"/fa-((\\w+|-?)+):before/\", $fa_content, $matches, PREG_PATTERN_ORDER ) ) {\n\t\t\t\treturn $matches[1];\n\t\t\t}\n\t\t}\n\t} else {\n\t\treturn $meta['fa'];\n\t}\n}", "title": "" }, { "docid": "cfa4a901ced4eafe1761bff4258d26a1", "score": "0.6363318", "text": "function vcex_enqueue_icon_font( $family = '' ) {\n\n\t// Return if VC function doesn't exist\n\tif ( ! function_exists( 'vc_icon_element_fonts_enqueue' ) ) {\n\t\treturn;\n\t}\n\n\t// Return if icon type is empty or it's fontawesome\n\tif ( empty( $family ) || 'fontawesome' == $family ) {\n\t\treturn;\n\t}\n\n\t// Enqueue script\n\tvc_icon_element_fonts_enqueue( $family );\n\n}", "title": "" }, { "docid": "19c271c938d3df0274ffd17b8fceb323", "score": "0.62483704", "text": "function list_font_awesome_icons() {\n\n $icons = array(\"glass\", \"music\", \"search\", \"envelope-o\", \"heart\", \"star\", \"star-o\", \"user\", \"film\", \"th-large\", \n \"th\", \"th-list\", \"check\", \"times\", \"search-plus\", \"search-minus\", \"power-off\", \"signal\", \"cog\", \"trash-o\", \n \"home\", \"file-o\", \"clock-o\", \"road\", \"download\", \"arrow-circle-o-down\", \"arrow-circle-o-up\", \"inbox\", \n \"play-circle-o\", \"repeat\", \"refresh\", \"list-alt\", \"lock\", \"flag\", \"headphones\", \"volume-off\", \"volume-down\", \n \"volume-up\", \"qrcode\", \"barcode\", \"tag\", \"tags\", \"book\", \"bookmark\", \"print\", \"camera\", \"font\", \"bold\", \"italic\", \n \"text-height\", \"text-width\", \"align-left\", \"align-center\", \"align-right\", \"align-justify\", \"list\", \"outdent\", \n \"indent\", \"video-camera\", \"picture-o\", \"pencil\", \"map-marker\", \"adjust\", \"tint\", \"pencil-square-o\", \"share-square-o\", \n \"check-square-o\", \"arrows\", \"step-backward\", \"fast-backward\", \"backward\", \"play\", \"pause\", \"stop\", \"forward\", \n \"fast-forward\", \"step-forward\", \"eject\", \"chevron-left\", \"chevron-right\", \"plus-circle\", \"minus-circle\", \"times-circle\", \n \"check-circle\", \"question-circle\", \"info-circle\", \"crosshairs\", \"times-circle-o\", \"check-circle-o\", \"ban\", \"arrow-left\", \n \"arrow-right\", \"arrow-up\", \"arrow-down\", \"share\", \"expand\", \"compress\", \"plus\", \"minus\", \"asterisk\", \"exclamation-circle\", \n \"gift\", \"leaf\", \"fire\", \"eye\", \"eye-slash\", \"exclamation-triangle\", \"plane\", \"calendar\", \"random\", \"comment\", \"magnet\", \n \"chevron-up\", \"chevron-down\", \"retweet\", \"shopping-cart\", \"folder\", \"folder-open\", \"arrows-v\", \"arrows-h\", \"bar-chart-o\", \n \"twitter-square\", \"facebook-square\", \"camera-retro\", \"key\", \"cogs\", \"comments\", \"thumbs-o-up\", \"thumbs-o-down\", \n \"star-half\", \"heart-o\", \"sign-out\", \"linkedin-square\", \"thumb-tack\", \"external-link\", \"sign-in\", \"trophy\", \"github-square\", \n \"upload\", \"lemon-o\", \"phone\", \"square-o\", \"bookmark-o\", \"phone-square\", \"twitter\", \"facebook\", \"github\", \"unlock\", \n \"credit-card\", \"rss\", \"hdd-o\", \"bullhorn\", \"bell\", \"certificate\", \"hand-o-right\", \"hand-o-left\", \"hand-o-up\", \"hand-o-down\", \n \"arrow-circle-left\", \"arrow-circle-right\", \"arrow-circle-up\", \"arrow-circle-down\", \"globe\", \"wrench\", \"tasks\", \"filter\", \n \"briefcase\", \"arrows-alt\", \"users\", \"link\", \"cloud\", \"flask\", \"scissors\", \"files-o\", \"paperclip\", \"floppy-o\", \"square\", \n \"bars\", \"list-ul\", \"list-ol\", \"strikethrough\", \"underline\", \"table\", \"magic\", \"truck\", \"pinterest\", \"pinterest-square\", \n \"google-plus-square\", \"google-plus\", \"money\", \"caret-down\", \"caret-up\", \"caret-left\", \"caret-right\", \"columns\", \"sort\", \n \"sort-desc\", \"sort-asc\", \"envelope\", \"linkedin\", \"undo\", \"gavel\", \"tachometer\", \"comment-o\", \"comments-o\", \"bolt\", \n \"sitemap\", \"umbrella\", \"clipboard\", \"lightbulb-o\", \"exchange\", \"cloud-download\", \"cloud-upload\", \"user-md\", \"stethoscope\", \n \"suitcase\", \"bell-o\", \"coffee\", \"cutlery\", \"file-text-o\", \"building-o\", \"hospital-o\", \"ambulance\", \"medkit\", \"fighter-jet\", \n \"beer\", \"h-square\", \"plus-square\", \"angle-double-left\", \"angle-double-right\", \"angle-double-up\", \"angle-double-down\", \n \"angle-left\", \"angle-right\", \"angle-up\", \"angle-down\", \"desktop\", \"laptop\", \"tablet\", \"mobile\", \"circle-o\", \"quote-left\", \n \"quote-right\", \"spinner\", \"circle\", \"reply\", \"github-alt\", \"folder-o\", \"folder-open-o\", \"smile-o\", \"frown-o\", \"meh-o\", \n \"gamepad\", \"keyboard-o\", \"flag-o\", \"flag-checkered\", \"terminal\", \"code\", \"reply-all\", \"star-half-o\", \"location-arrow\", \n \"crop\", \"code-fork\", \"chain-broken\", \"question\", \"info\", \"exclamation\", \"superscript\", \"subscript\", \"eraser\", \"puzzle-piece\", \n \"microphone\", \"microphone-slash\", \"shield\", \"calendar-o\", \"fire-extinguisher\", \"rocket\", \"maxcdn\", \"chevron-circle-left\", \n \"chevron-circle-right\", \"chevron-circle-up\", \"chevron-circle-down\", \"html5\", \"css3\", \"anchor\", \"unlock-alt\", \"bullseye\", \n \"ellipsis-h\", \"ellipsis-v\", \"rss-square\", \"play-circle\", \"ticket\", \"minus-square\", \"minus-square-o\", \"level-up\", \"level-down\", \n \"check-square\", \"pencil-square\", \"external-link-square\", \"share-square\", \"compass\", \"caret-square-o-down\", \"caret-square-o-up\", \n \"caret-square-o-right\", \"eur\", \"gbp\", \"usd\", \"inr\", \"jpy\", \"rub\", \"krw\", \"btc\", \"file\", \"file-text\", \"sort-alpha-asc\", \n \"sort-alpha-desc\", \"sort-amount-asc\", \"sort-amount-desc\", \"sort-numeric-asc\", \"sort-numeric-desc\", \"thumbs-up\", \"thumbs-down\", \n \"youtube-square\", \"youtube\", \"xing\", \"xing-square\", \"youtube-play\", \"dropbox\", \"stack-overflow\", \"instagram\", \"flickr\", \"adn\", \n \"bitbucket\", \"bitbucket-square\", \"tumblr\", \"tumblr-square\", \"long-arrow-down\", \"long-arrow-up\", \"long-arrow-left\", \n \"long-arrow-right\", \"apple\", \"windows\", \"android\", \"linux\", \"dribbble\", \"skype\", \"foursquare\", \"trello\", \"female\", \"male\", \n \"gittip\", \"sun-o\", \"moon-o\", \"archive\", \"bug\", \"vk\", \"weibo\", \"renren\", \"pagelines\", \"stack-exchange\", \"arrow-circle-o-right\", \n \"arrow-circle-o-left\", \"caret-square-o-left\", \"dot-circle-o\", \"wheelchair\", \"vimeo-square\", \"try\", \"plus-square-o\", \n \"space-shuttle\", \"slack\", \"envelope-square\", \"wordpress\", \"openid\", \"university\", \"graduation-cap\", \"yahoo\", \"google\", \"reddit\", \n \"reddit-square\", \"stumbleupon-circle\", \"stumbleupon\", \"delicious\", \"digg\", \"pied-piper\", \"pied-piper-alt\", \"drupal\", \"joomla\", \n \"language\", \"fax\", \"building\", \"child\", \"paw\", \"spoon\", \"cube\", \"cubes\", \"behance\", \"behance-square\", \"steam\", \"steam-square\", \n \"recycle\", \"car\", \"taxi\", \"tree\", \"spotify\", \"deviantart\", \"soundcloud\", \"database\", \"file-pdf-o\", \"file-word-o\", \"file-excel-o\", \n \"file-powerpoint-o\", \"file-image-o\", \"file-archive-o\", \"file-audio-o\", \"file-video-o\", \"file-code-o\", \"vine\", \"codepen\", \n \"jsfiddle\", \"life-ring\", \"circle-o-notch\", \"rebel\", \"empire\", \"git-square\", \"git\", \"hacker-news\", \"tencent-weibo\", \"qq\", \"weixin\", \n \"paper-plane\", \"paper-plane-o\", \"history\", \"circle-thin\", \"header\", \"paragraph\", \"sliders\", \"share-alt\", \"share-alt-square\", \"bomb\",\"tty\",\n \"plug\",\"newspaper-o\",\"lastfm\",\"futbol-o\",\"cc-stripe\",\"cc-amex\",\"birthday-cake\",\"bell-slash\",\"at\",\"binoculars\",\n \"cc\",\"cc-paypal\",\"eyedropper\",\"ioxhost\",\"meanpath\",\"pie-chart\",\"slideshare\",\"trash\",\"yelp\",\"wifi\",\"toggle-on\",\"ils\",\"paypal\",\n \"line-chart\",\"copyright\",\"cc-mastercard\",\"calculator\",\"bicycle\",\"area-chart\",\"angellist\",\"bell-slash-o\",\"bus\",\"cc-discover\",\"cc-visa\"\n ,\"google-wallet\",\"lastfm-square\",\"paint-brush\",\"toggle-off\",\"twitch\");\n\n return $icons;\n }", "title": "" }, { "docid": "f7ffcb5f474c03e25c61ad6cd47d8887", "score": "0.6202424", "text": "function fontawesome($attr)\n{\n $a = shortcode_atts(\n array('name' => ''),\n $attr\n );\n\n return '<i class=\"fa '. $a['name'] . '\" aria-hidden=\"true\"></i>';\n}", "title": "" }, { "docid": "85c56eaa17726bc67b989a3f4e3f5f4b", "score": "0.61959493", "text": "function local_accessibilitytool_get_fontawesome_icon_map() {\n return [\n 'core:t/../e/accessibility_checker' => 'fa-universal-access'\n ];\n}", "title": "" }, { "docid": "b2ed269ddeb54de4281ed2de5d68f202", "score": "0.6190247", "text": "function hewebal_add_favicons() {\n $images_folder = get_stylesheet_directory_uri() . '/images/';\n\n // Include the favicons\n // @TODO Add other favicons?\n ?><link rel=\"shortcut icon\" href=\"<?php echo $images_folder; ?>heweb-favicon.png\" />\n <?php /*<link rel=\"apple-touch-icon\" href=\"<?php echo $images_folder; ?>favicon-60x60.png\" />\n <link rel=\"apple-touch-icon\" sizes=\"76x76\" href=\"<?php echo $images_folder; ?>favicon-76x76.png\" />\n <link rel=\"apple-touch-icon\" sizes=\"120x120\" href=\"<?php echo $images_folder; ?>favicon-120x120.png\" />\n <link rel=\"apple-touch-icon\" sizes=\"152x152\" href=\"<?php echo $images_folder; ?>favicon-152x152.png\" /><?php*/\n\n}", "title": "" }, { "docid": "dff800dc29d7ca301c02d902d7d6e95a", "score": "0.61873275", "text": "function aione_font_awesome_name_handler( $icon ) {\n\n\t$old_icons = Aione_Data::old_icons();\n\n\tif ( 'icon-' == substr( $icon, 0, 5 ) || 'fa=' != substr( $icon, 0, 3 ) ) {\n\n\t\t// Replace old prefix with new one\n\t\t$icon = str_replace( 'icon-', 'fa-', $icon );\n\n\t\tif ( array_key_exists( str_replace( 'fa-', '', $icon ), $old_icons ) ) {\n\t\t\t$fa_icon = 'fa-' . $old_icons[str_replace( 'fa-', '', $icon )];\n\t\t} else {\n\t\t\t$fa_icon = ( 'fa-' != substr( $icon, 0, 3 ) ) ? 'fa-' . $icon : $icon;\n\t\t}\n\n\t} else {\n\n\t\t$fa_icon = ( 'fa-' != substr( $icon, 0, 3 ) ) ? 'fa-' . $icon : $icon;\n\n\t}\n\n\treturn $fa_icon;\n\n}", "title": "" }, { "docid": "c7cf0f45eabf4d3184a85dcede8e39ba", "score": "0.61538243", "text": "function themo_mobilenav_fontawesome() {\r\n\t// enqueue font-awesome.min.css only on mobile\r\n\tif( get_option('mobilenav_mobile_only') ) {\r\n\tif ( wp_is_mobile() ) {\r\n\t\twp_register_style( 'mobilenav-fontawesome', plugins_url( '/fonts/font-awesome/css/font-awesome.min.css', __FILE__ ) . '', array(), '1', 'all' ); \r\n\t\twp_enqueue_style( 'mobilenav-fontawesome' );\r\n\t}\r\n\t// enqueue font-awesome.min.css everywhere\r\n\t} else {\r\n\t\twp_register_style( 'mobilenav-fontawesome', plugins_url( '/fonts/font-awesome/css/font-awesome.min.css', __FILE__ ) . '', array(), '1', 'all' ); \r\n\t\twp_enqueue_style( 'mobilenav-fontawesome' );\r\n\t}\r\n\t}", "title": "" }, { "docid": "5cb9f7b4be30fd360a5d22cc57c2fe58", "score": "0.6141167", "text": "public static function icons()\n {\n return array(\n 'fas' => array('address-book','address-card','adjust','align-center','align-justify','align-left','align-right','allergies','ambulance','american-sign-language-interpreting','anchor','angle-double-down','angle-double-left','angle-double-right','angle-double-up','angle-down','angle-left','angle-right','angle-up','archive','arrow-alt-circle-down','arrow-alt-circle-left','arrow-alt-circle-right','arrow-alt-circle-up','arrow-circle-down','arrow-circle-left','arrow-circle-right','arrow-circle-up','arrow-down','arrow-left','arrow-right','arrow-up','arrows-alt','arrows-alt-h','arrows-alt-v','assistive-listening-systems','asterisk','at','audio-description','backward','balance-scale','ban','band-aid','barcode','bars','baseball-ball','basketball-ball','bath','battery-empty','battery-full','battery-half','battery-quarter','battery-three-quarters','bed','beer','bell','bell-slash','bicycle','binoculars','birthday-cake','blind','bold','bolt','bomb','book','bookmark','bowling-ball','box','box-open','boxes','braille','briefcase','briefcase-medical','bug','building','bullhorn','bullseye','burn','bus','calculator','calendar','calendar-alt','calendar-check','calendar-minus','calendar-plus','calendar-times','camera','camera-retro','capsules','car','caret-down','caret-left','caret-right','caret-square-down','caret-square-left','caret-square-right','caret-square-up','caret-up','cart-arrow-down','cart-plus','certificate','chart-area','chart-bar','chart-line','chart-pie','check','check-circle','check-square','chess','chess-bishop','chess-board','chess-king','chess-knight','chess-pawn','chess-queen','chess-rook','chevron-circle-down','chevron-circle-left','chevron-circle-right','chevron-circle-up','chevron-down','chevron-left','chevron-right','chevron-up','child','circle','circle-notch','clipboard','clipboard-check','clipboard-list','clock','clone','closed-captioning','cloud','cloud-download-alt','cloud-upload-alt','code','code-branch','coffee','cog','cogs','columns','comment','comment-alt','comment-dots','comment-slash','comments','compass','compress','copy','copyright','couch','credit-card','crop','crosshairs','cube','cubes','cut','database','deaf','desktop','diagnoses','dna','dollar-sign','dolly','dolly-flatbed','donate','dot-circle','dove','download','edit','eject','ellipsis-h','ellipsis-v','envelope','envelope-open','envelope-square','eraser','euro-sign','exchange-alt','exclamation','exclamation-circle','exclamation-triangle','expand','expand-arrows-alt','external-link-alt','external-link-square-alt','eye','eye-dropper','eye-slash','fast-backward','fast-forward','fax','female','fighter-jet','file','file-alt','file-archive','file-audio','file-code','file-excel','file-image','file-medical','file-medical-alt','file-pdf','file-powerpoint','file-video','file-word','film','filter','fire','fire-extinguisher','first-aid','flag','flag-checkered','flask','folder','folder-open','font','font-awesome-logo-full','football-ball','forward','frown','futbol','gamepad','gavel','gem','genderless','gift','glass-martini','globe','golf-ball','graduation-cap','h-square','hand-holding','hand-holding-heart','hand-holding-usd','hand-lizard','hand-paper','hand-peace','hand-point-down','hand-point-left','hand-point-right','hand-point-up','hand-pointer','hand-rock','hand-scissors','hand-spock','hands','hands-helping','handshake','hashtag','hdd','heading','headphones','heart','heartbeat','history','hockey-puck','home','hospital','hospital-alt','hospital-symbol','hourglass','hourglass-end','hourglass-half','hourglass-start','i-cursor','id-badge','id-card','id-card-alt','image','images','inbox','indent','industry','info','info-circle','italic','key','keyboard','language','laptop','leaf','lemon','level-down-alt','level-up-alt','life-ring','lightbulb','link','lira-sign','list','list-alt','list-ol','list-ul','location-arrow','lock','lock-open','long-arrow-alt-down','long-arrow-alt-left','long-arrow-alt-right','long-arrow-alt-up','low-vision','magic','magnet','male','map','map-marker','map-marker-alt','map-pin','map-signs','mars','mars-double','mars-stroke','mars-stroke-h','mars-stroke-v','medkit','meh','mercury','microchip','microphone','microphone-slash','minus','minus-circle','minus-square','mobile','mobile-alt','money-bill-alt','moon','motorcycle','mouse-pointer','music','neuter','newspaper','notes-medical','object-group','object-ungroup','outdent','paint-brush','pallet','paper-plane','paperclip','parachute-box','paragraph','paste','pause','pause-circle','paw','pen-square','pencil-alt','people-carry','percent','phone','phone-slash','phone-square','phone-volume','piggy-bank','pills','plane','play','play-circle','plug','plus','plus-circle','plus-square','podcast','poo','portrait','pound-sign','power-off','prescription-bottle','prescription-bottle-alt','print','procedures','puzzle-piece','qrcode','question','question-circle','quidditch','quote-left','quote-right','random','recycle','redo','redo-alt','registered','reply','reply-all','retweet','ribbon','road','rocket','rss','rss-square','ruble-sign','rupee-sign','save','search','search-minus','search-plus','seedling','server','share','share-alt','share-alt-square','share-square','shekel-sign','shield-alt','ship','shipping-fast','shopping-bag','shopping-basket','shopping-cart','shower','sign','sign-in-alt','sign-language','sign-out-alt','signal','sitemap','sliders-h','smile','smoking','snowflake','sort','sort-alpha-down','sort-alpha-up','sort-amount-down','sort-amount-up','sort-down','sort-numeric-down','sort-numeric-up','sort-up','space-shuttle','spinner','square','square-full','star','star-half','step-backward','step-forward','stethoscope','sticky-note','stop','stop-circle','stopwatch','street-view','strikethrough','subscript','subway','suitcase','sun','superscript','sync','sync-alt','syringe','table','table-tennis','tablet','tablet-alt','tablets','tachometer-alt','tag','tags','tape','tasks','taxi','terminal','text-height','text-width','th','th-large','th-list','thermometer','thermometer-empty','thermometer-full','thermometer-half','thermometer-quarter','thermometer-three-quarters','thumbs-down','thumbs-up','thumbtack','ticket-alt','times','times-circle','tint','toggle-off','toggle-on','trademark','train','transgender','transgender-alt','trash','trash-alt','tree','trophy','truck','truck-loading','truck-moving','tty','tv','umbrella','underline','undo','undo-alt','universal-access','university','unlink','unlock','unlock-alt','upload','user','user-alt','user-alt-slash','user-astronaut','user-check','user-circle','user-clock','user-cog','user-edit','user-friends','user-graduate','user-lock','user-md','user-minus','user-ninja','user-plus','user-secret','user-shield','user-slash','user-tag','user-tie','user-times','users','users-cog','utensil-spoon','utensils','venus','venus-double','venus-mars','vial','vials','video','video-slash','volleyball-ball','volume-down','volume-off','volume-up','warehouse','weight','wheelchair','wifi','window-close','window-maximize','window-minimize','window-restore','wine-glass','won-sign','wrench','x-ray','yen-sign'),\n 'far' => array('address-book','address-card','arrow-alt-circle-down','arrow-alt-circle-left','arrow-alt-circle-right','arrow-alt-circle-up','bell','bell-slash','bookmark','building','calendar','calendar-alt','calendar-check','calendar-minus','calendar-plus','calendar-times','caret-square-down','caret-square-left','caret-square-right','caret-square-up','chart-bar','check-circle','check-square','circle','clipboard','clock','clone','closed-captioning','comment','comment-alt','comment-dots','comments','compass','copy','copyright','credit-card','dot-circle','edit','envelope','envelope-open','eye','eye-slash','file','file-alt','file-archive','file-audio','file-code','file-excel','file-image','file-pdf','file-powerpoint','file-video','file-word','flag','folder','folder-open','font-awesome-logo-full','frown','futbol','gem','hand-lizard','hand-paper','hand-peace','hand-point-down','hand-point-left','hand-point-right','hand-point-up','hand-pointer','hand-rock','hand-scissors','hand-spock','handshake','hdd','heart','hospital','hourglass','id-badge','id-card','image','images','keyboard','lemon','life-ring','lightbulb','list-alt','map','meh','minus-square','money-bill-alt','moon','newspaper','object-group','object-ungroup','paper-plane','pause-circle','play-circle','plus-square','question-circle','registered','save','share-square','smile','snowflake','square','star','star-half','sticky-note','stop-circle','sun','thumbs-down','thumbs-up','times-circle','trash-alt','user','user-circle','window-close','window-maximize','window-minimize','window-restore'),\n 'fab' => array('500px','accessible-icon','accusoft','adn','adversal','affiliatetheme','algolia','amazon','amazon-pay','amilia','android','angellist','angrycreative','angular','app-store','app-store-ios','apper','apple','apple-pay','asymmetrik','audible','autoprefixer','avianex','aviato','aws','bandcamp','behance','behance-square','bimobject','bitbucket','bitcoin','bity','black-tie','blackberry','blogger','blogger-b','bluetooth','bluetooth-b','btc','buromobelexperte','buysellads','cc-amazon-pay','cc-amex','cc-apple-pay','cc-diners-club','cc-discover','cc-jcb','cc-mastercard','cc-paypal','cc-stripe','cc-visa','centercode','chrome','cloudscale','cloudsmith','cloudversify','codepen','codiepie','connectdevelop','contao','cpanel','creative-commons','creative-commons-by','creative-commons-nc','creative-commons-nc-eu','creative-commons-nc-jp','creative-commons-nd','creative-commons-pd','creative-commons-pd-alt','creative-commons-remix','creative-commons-sa','creative-commons-sampling','creative-commons-sampling-plus','creative-commons-share','css3','css3-alt','cuttlefish','d-and-d','dashcube','delicious','deploydog','deskpro','deviantart','digg','digital-ocean','discord','discourse','dochub','docker','draft2digital','dribbble','dribbble-square','dropbox','drupal','dyalog','earlybirds','ebay','edge','elementor','ember','empire','envira','erlang','ethereum','etsy','expeditedssl','facebook','facebook-f','facebook-messenger','facebook-square','firefox','first-order','first-order-alt','firstdraft','flickr','flipboard','fly','font-awesome','font-awesome-alt','font-awesome-flag','font-awesome-logo-full','fonticons','fonticons-fi','fort-awesome','fort-awesome-alt','forumbee','foursquare','free-code-camp','freebsd','fulcrum','galactic-republic','galactic-senate','get-pocket','gg','gg-circle','git','git-square','github','github-alt','github-square','gitkraken','gitlab','gitter','glide','glide-g','gofore','goodreads','goodreads-g','google','google-drive','google-play','google-plus','google-plus-g','google-plus-square','google-wallet','gratipay','grav','gripfire','grunt','gulp','hacker-news','hacker-news-square','hips','hire-a-helper','hooli','hotjar','houzz','html5','hubspot','imdb','instagram','internet-explorer','ioxhost','itunes','itunes-note','java','jedi-order','jenkins','joget','joomla','js','js-square','jsfiddle','keybase','keycdn','kickstarter','kickstarter-k','korvue','laravel','lastfm','lastfm-square','leanpub','less','line','linkedin','linkedin-in','linode','linux','lyft','magento','mandalorian','mastodon','maxcdn','medapps','medium','medium-m','medrt','meetup','microsoft','mix','mixcloud','mizuni','modx','monero','napster','nintendo-switch','node','node-js','npm','ns8','nutritionix','odnoklassniki','odnoklassniki-square','old-republic','opencart','openid','opera','optin-monster','osi','page4','pagelines','palfed','patreon','paypal','periscope','phabricator','phoenix-framework','phoenix-squadron','php','pied-piper','pied-piper-alt','pied-piper-hat','pied-piper-pp','pinterest','pinterest-p','pinterest-square','playstation','product-hunt','pushed','python','qq','quinscape','quora','r-project','ravelry','react','readme','rebel','red-river','reddit','reddit-alien','reddit-square','rendact','renren','replyd','researchgate','resolving','rocketchat','rockrms','safari','sass','schlix','scribd','searchengin','sellcast','sellsy','servicestack','shirtsinbulk','simplybuilt','sistrix','sith','skyatlas','skype','slack','slack-hash','slideshare','snapchat','snapchat-ghost','snapchat-square','soundcloud','speakap','spotify','stack-exchange','stack-overflow','staylinked','steam','steam-square','steam-symbol','sticker-mule','strava','stripe','stripe-s','studiovinari','stumbleupon','stumbleupon-circle','superpowers','supple','teamspeak','telegram','telegram-plane','tencent-weibo','themeisle','trade-federation','trello','tripadvisor','tumblr','tumblr-square','twitch','twitter','twitter-square','typo3','uber','uikit','uniregistry','untappd','usb','ussunnah','vaadin','viacoin','viadeo','viadeo-square','viber','vimeo','vimeo-square','vimeo-v','vine','vk','vnv','vuejs','weibo','weixin','whatsapp','whatsapp-square','whmcs','wikipedia-w','windows','wolf-pack-battalion','wordpress','wordpress-simple','wpbeginner','wpexplorer','wpforms','xbox','xing','xing-square','y-combinator','yahoo','yandex','yandex-international','yelp','yoast','youtube','youtube-square')\n );\n }", "title": "" }, { "docid": "4f472d316bb23815e3757d9a146fb164", "score": "0.61267245", "text": "function tool_lp_get_fontawesome_icon_map() {\n return [\n 'tool_lp:url' => 'fa-external-link'\n ];\n}", "title": "" }, { "docid": "4ec0019c23f6fffe6ed246b05c6bee8c", "score": "0.6049352", "text": "function add_menu_icons_styles() {\n?>\n\t<style>\n\t\t@font-face {\n\t\t\tfont-family: 'icomoon';\n\t\t\tsrc:url('<?php echo get_stylesheet_directory_uri(); ?>/fonts/icomoon.eot?jukmv4');\n\t\t\tsrc:url('<?php echo get_stylesheet_directory_uri(); ?>/fonts/icomoon.eot?#iefixjukmv4') format('embedded-opentype'),\n\t\t\t\turl('<?php echo get_stylesheet_directory_uri(); ?>/fonts/icomoon.ttf?jukmv4') format('truetype'),\n\t\t\t\turl('<?php echo get_stylesheet_directory_uri(); ?>/fonts/icomoon.woff?jukmv4') format('woff'),\n\t\t\t\turl('<?php echo get_stylesheet_directory_uri(); ?>/fonts/icomoon.svg?jukmv4#icomoon') format('svg');\n\t\t\tfont-weight: normal;\n\t\t\tfont-style: normal;\n\t\t}\n\n\t\t[class^=\"icon-\"], [class*=\" icon-\"] {\n\t\t\tfont-family: 'icomoon';\n\t\t\tspeak: none;\n\t\t\tfont-style: normal;\n\t\t\tfont-weight: normal;\n\t\t\tfont-variant: normal;\n\t\t\ttext-transform: none;\n\t\t\tline-height: 1;\n\t\t\tfont-size: 32px;\n\n\t\t\t/* Better Font Rendering =========== */\n\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\t-moz-osx-font-smoothing: grayscale;\n\t\t}\n\n\t\t.icon-icon_arrow-down-menu:before {\n\t\t\tcontent: \"\\e625\";\n\t\t}\n\t\t.icon-icon_acupuntura:before {\n\t\t\tcontent: \"\\e60f\";\n\t\t}\n\t\t.icon-icon_ajuda:before {\n\t\t\tcontent: \"\\e610\";\n\t\t}\n\t\t.icon-icon_anafisio:before {\n\t\t\tcontent: \"\\e611\";\n\t\t}\n\t\t.icon-icon_bracoquebrado:before {\n\t\t\tcontent: \"\\e612\";\n\t\t}\n\t\t.icon-icon_brain:before {\n\t\t\tcontent: \"\\e613\";\n\t\t}\n\t\t.icon-icon_cadeiraderoda:before {\n\t\t\tcontent: \"\\e614\";\n\t\t}\n\t\t.icon-icon_coluna:before {\n\t\t\tcontent: \"\\e615\";\n\t\t}\n\t\t.icon-icon_coracao:before {\n\t\t\tcontent: \"\\e616\";\n\t\t}\n\t\t.icon-icon_massagem:before {\n\t\t\tcontent: \"\\e617\";\n\t\t}\n\t\t.icon-icon_massagem2:before {\n\t\t\tcontent: \"\\e618\";\n\t\t}\n\t\t.icon-icon_muleta:before {\n\t\t\tcontent: \"\\e619\";\n\t\t}\n\t\t.icon-icon_muletas:before {\n\t\t\tcontent: \"\\e61a\";\n\t\t}\n\t\t.icon-icon_osso:before {\n\t\t\tcontent: \"\\e61b\";\n\t\t}\n\t\t.icon-icon_osso2:before {\n\t\t\tcontent: \"\\e61c\";\n\t\t}\n\t\t.icon-icon_osso3:before {\n\t\t\tcontent: \"\\e61d\";\n\t\t}\n\t\t.icon-icon_pe:before {\n\t\t\tcontent: \"\\e61e\";\n\t\t}\n\t\t.icon-icon_pernaquebrada:before {\n\t\t\tcontent: \"\\e61f\";\n\t\t}\n\t\t.icon-icon_pilates:before {\n\t\t\tcontent: \"\\e620\";\n\t\t}\n\t\t.icon-icon_raiox:before {\n\t\t\tcontent: \"\\e621\";\n\t\t}\n\t\t.icon-icon_right2:before {\n\t\t\tcontent: \"\\e622\";\n\t\t}\n\t\t.icon-icon_yinyang:before {\n\t\t\tcontent: \"\\e623\";\n\t\t}\n\t\t.icon-icon_yoga:before {\n\t\t\tcontent: \"\\e624\";\n\t\t}\n\t\t.icon-icon_plan:before {\n\t\t\tcontent: \"\\e60c\";\n\t\t}\n\t\t.icon-icon_left:before {\n\t\t\tcontent: \"\\e60d\";\n\t\t}\n\t\t.icon-icon_right:before {\n\t\t\tcontent: \"\\e60e\";\n\t\t}\n\t\t.icon-icon_baby:before {\n\t\t\tcontent: \"\\e600\";\n\t\t}\n\t\t.icon-icon_exit:before {\n\t\t\tcontent: \"\\e601\";\n\t\t}\n\t\t.icon-icon_face:before {\n\t\t\tcontent: \"\\e602\";\n\t\t}\n\t\t.icon-icon_gear:before {\n\t\t\tcontent: \"\\e603\";\n\t\t}\n\t\t.icon-icon_hearth:before {\n\t\t\tcontent: \"\\e604\";\n\t\t}\n\t\t.icon-icon_horse:before {\n\t\t\tcontent: \"\\e605\";\n\t\t}\n\t\t.icon-icon_insta:before {\n\t\t\tcontent: \"\\e606\";\n\t\t}\n\t\t.icon-icon_logo_anafisio:before {\n\t\t\tcontent: \"\\e607\";\n\t\t}\n\t\t.icon-icon_mail:before {\n\t\t\tcontent: \"\\e608\";\n\t\t}\n\t\t.icon-icon_menu:before {\n\t\t\tcontent: \"\\e609\";\n\t\t}\n\t\t.icon-icon_phone:before {\n\t\t\tcontent: \"\\e60a\";\n\t\t}\n\t\t.icon-icon_picture:before {\n\t\t\tcontent: \"\\e60b\";\n\t\t}\n\n\t\t#menu-posts div.wp-menu-image:before {\n\t\t\tcontent: \"\\f481\";\n\t\t}\n\t\t#menu-posts-banners div.wp-menu-image:before {\n\t\t\tcontent: \"\\f181\";\n\t\t}\n\t\t*[id^=\"est-galeria-description\"],\n\t\t*[id^=\"est-galeria-url\"] {\n\t\t\tdisplay: none !important;\n\t\t}\n\t</style>\n\t<?php\n}", "title": "" }, { "docid": "04bf31f3053013ed720d963192c1cf8d", "score": "0.60316414", "text": "public function get_icon() {\n\t\treturn 'fa fa-font';\n\t}", "title": "" }, { "docid": "232b0f396e03b1e50ff9366b94f67627", "score": "0.60024077", "text": "function wpcampus_add_favicons() {\n $favicons_folder = get_stylesheet_directory_uri() . '/images/favicons/';\n\n // Print the default icons\n ?><link rel=\"shortcut icon\" href=\"<?php echo $favicons_folder; ?>wpcampus-favicon-60.png\"/>\n <link rel=\"apple-touch-icon\" href=\"<?php echo $favicons_folder; ?>wpcampus-favicon-60.png\"/><?php\n\n // Set the image sizes\n $image_sizes = array( 57, 72, 76, 114, 120, 144, 152 );\n\n foreach( $image_sizes as $size ) {\n ?><link rel=\"apple-touch-icon\" sizes=\"<?php echo \"{$size}x{$size}\"; ?>\" href=\"<?php echo $favicons_folder; ?>wpcampus-favicon-<?php echo $size; ?>.png\"/><?php\n }\n\n}", "title": "" }, { "docid": "d10ec83fbabec2fae7758ebcc39811ad", "score": "0.59703434", "text": "function getIcons(){\n $icons = array(\n //the name is arbitrary and more for me\n //these are fontAwesome icons\n array(\"name\"=>\"deathStar\",\"value\" => \"fad fa-space-station-moon-alt\"),\n array(\"name\"=>\"space-station-moon\",\"value\" => \"fas fa-space-station-moon\"),\n array(\"name\"=>\"jediOrder\",\"value\" => \"fab fa-jedi-order\"),\n array(\"name\"=>\"galacticRepublic\",\"value\" => \"fab fa-galactic-republic\"),\n array(\"name\"=>\"starFighterAlt\",\"value\" => \"fas fa-starfighter-alt\"),\n array(\"name\"=>\"starFighter\",\"value\" => \"fas fa-starfighter\"),\n array(\"name\"=>\"starshipFreighter\",\"value\" => \"fas fa-starship-freighter\"),\n array(\"name\"=>\"narwhal\",\"value\" => \"fad fa-narwhal\"),\n array(\"name\"=>\"wine-glass-alt\",\"value\" => \"fas fa-wine-glass-alt\")\n \n );\n return $icons;\n }", "title": "" }, { "docid": "68bbc7915ea15751ad9ff02da6e88c5c", "score": "0.5963462", "text": "function sn_add_favicon() {\n\techo '<link rel=\"icon\" href=\"' . get_stylesheet_directory_uri() . '/assets/img/favicon.png\" type=\"image/png\">';\n}", "title": "" }, { "docid": "5bae4034c84c8b77a8bc14be758b0274", "score": "0.59552085", "text": "function wyde_get_social_icons(){\n \n return array(\n 'fa fa-behance' => 'Behance',\n 'fa fa-deviantart' => 'DeviantArt',\n 'fa fa-digg' => 'Digg',\n 'fa fa-dribbble' => 'Dribbble',\n 'fa fa-dropbox' => 'Dropbox',\n 'fa fa-facebook' => 'Facebook',\n 'fa fa-flickr' => 'Flickr',\n 'fa fa-github-alt' => 'Github',\n 'fa fa-google-plus' => 'Google+',\n 'fa fa-instagram' => 'Instagram',\n 'fa fa-linkedin' => 'LinkedIn',\n 'fa fa-pinterest' => 'Pinterest',\n 'fa fa-reddit' => 'Reddit',\n 'fa fa-rss' => 'RSS',\n 'fa fa-skype' => 'Skype',\n 'fa fa-soundcloud' => 'Soundcloud',\n 'fa fa-tumblr' => 'Tumblr',\n 'fa fa-twitter' => 'Twitter',\n 'fa fa-vimeo-square' => 'Vimeo',\n 'fa fa-vk' => 'VK',\n 'fa fa-yahoo' => 'Yahoo',\n 'fa fa-youtube' => 'Youtube',\n );\n}", "title": "" }, { "docid": "effe83faf9c9bc645d94b1e7b1f67d1b", "score": "0.59502375", "text": "public static function addFontAwesome($specific_version = \"4.1.0\", $frontend = true, $backend = true) {\n\t\tself::addCSSToList(\"//maxcdn.bootstrapcdn.com/font-awesome/\" . $specific_version . \"/css/font-awesome.min.css\", \"maxxdev-helper-fontawesome\", $frontend, $backend);\n\t}", "title": "" }, { "docid": "2dc416ff994178dfb849ba9d901af8cc", "score": "0.5938269", "text": "function add_favicon() {\n\t$favicon_url = get_stylesheet_directory_uri() . '/admin-favicon.ico';\n\techo '<link rel=\"shortcut icon\" href=\"' . $favicon_url . '\" />';\n}", "title": "" }, { "docid": "20586c947ce868ff18481a51a8df742c", "score": "0.5936474", "text": "public static function fontAwesomeList() : Array\n {\n return [\n 'fas fa-address-book' => 'f2b9',\n 'fas fa-address-card' => 'f2bb',\n 'fas fa-adjust' => 'f042',\n 'fas fa-align-center' => 'f037',\n 'fas fa-align-justify' => 'f039',\n 'fas fa-align-left' => 'f036',\n 'fas fa-align-right' => 'f038',\n 'fas fa-allergies' => 'f461',\n 'fas fa-ambulance' => 'f0f9',\n 'fas fa-american-sign-language-interpreting' => 'f2a3',\n 'fas fa-anchor' => 'f13d',\n 'fas fa-angle-double-down' => 'f103',\n 'fas fa-angle-double-left' => 'f100',\n 'fas fa-angle-double-right' => 'f101',\n 'fas fa-angle-double-up' => 'f102',\n 'fas fa-angle-down' => 'f107',\n 'fas fa-angle-left' => 'f104',\n 'fas fa-angle-right' => 'f105',\n 'fas fa-angle-up' => 'f106',\n 'fas fa-archive' => 'f187',\n 'fas fa-arrow-alt-circle-down' => 'f358',\n 'fas fa-arrow-alt-circle-left' => 'f359',\n 'fas fa-arrow-alt-circle-right' => 'f35a',\n 'fas fa-arrow-alt-circle-up' => 'f35b',\n 'fas fa-arrow-circle-down' => 'f0ab',\n 'fas fa-arrow-circle-left' => 'f0a8',\n 'fas fa-arrow-circle-right' => 'f0a9',\n 'fas fa-arrow-circle-up' => 'f0aa',\n 'fas fa-arrow-down' => 'f063',\n 'fas fa-arrow-left' => 'f060',\n 'fas fa-arrow-right' => 'f061',\n 'fas fa-arrow-up' => 'f062',\n 'fas fa-arrows-alt' => 'f0b2',\n 'fas fa-arrows-alt-h' => 'f337',\n 'fas fa-arrows-alt-v' => 'f338',\n 'fas fa-assistive-listening-systems' => 'f2a2',\n 'fas fa-asterisk' => 'f069',\n 'fas fa-at' => 'f1fa',\n 'fas fa-audio-description' => 'f29e',\n 'fas fa-backward' => 'f04a',\n 'fas fa-balance-scale' => 'f24e',\n 'fas fa-ban' => 'f05e',\n 'fas fa-band-aid' => 'f462',\n 'fas fa-barcode' => 'f02a',\n 'fas fa-bars' => 'f0c9',\n 'fas fa-baseball-ball' => 'f433',\n 'fas fa-basketball-ball' => 'f434',\n 'fas fa-bath' => 'f2cd',\n 'fas fa-battery-empty' => 'f244',\n 'fas fa-battery-full' => 'f240',\n 'fas fa-battery-half' => 'f242',\n 'fas fa-battery-quarter' => 'f243',\n 'fas fa-battery-three-quarters' => 'f241',\n 'fas fa-bed' => 'f236',\n 'fas fa-beer' => 'f0fc',\n 'fas fa-bell' => 'f0f3',\n 'fas fa-bell-slash' => 'f1f6',\n 'fas fa-bicycle' => 'f206',\n 'fas fa-binoculars' => 'f1e5',\n 'fas fa-birthday-cake' => 'f1fd',\n 'fas fa-blender' => 'f517',\n 'fas fa-blind' => 'f29d',\n 'fas fa-bold' => 'f032',\n 'fas fa-bolt' => 'f0e7',\n 'fas fa-bomb' => 'f1e2',\n 'fas fa-book' => 'f02d',\n 'fas fa-book-open' => 'f518',\n 'fas fa-bookmark' => 'f02e',\n 'fas fa-bowling-ball' => 'f436',\n 'fas fa-box' => 'f466',\n 'fas fa-box-open' => 'f49e',\n 'fas fa-boxes' => 'f468',\n 'fas fa-braille' => 'f2a1',\n 'fas fa-briefcase' => 'f0b1',\n 'fas fa-briefcase-medical' => 'f469',\n 'fas fa-broadcast-tower' => 'f519',\n 'fas fa-broom' => 'f51a',\n 'fas fa-bug' => 'f188',\n 'fas fa-building' => 'f1ad',\n 'fas fa-bullhorn' => 'f0a1',\n 'fas fa-bullseye' => 'f140',\n 'fas fa-burn' => 'f46a',\n 'fas fa-bus' => 'f207',\n 'fas fa-calculator' => 'f1ec',\n 'fas fa-calendar' => 'f133',\n 'fas fa-calendar-alt' => 'f073',\n 'fas fa-calendar-check' => 'f274',\n 'fas fa-calendar-minus' => 'f272',\n 'fas fa-calendar-plus' => 'f271',\n 'fas fa-calendar-times' => 'f273',\n 'fas fa-camera' => 'f030',\n 'fas fa-camera-retro' => 'f083',\n 'fas fa-capsules' => 'f46b',\n 'fas fa-car' => 'f1b9',\n 'fas fa-caret-down' => 'f0d7',\n 'fas fa-caret-left' => 'f0d9',\n 'fas fa-caret-right' => 'f0da',\n 'fas fa-caret-square-down' => 'f150',\n 'fas fa-caret-square-left' => 'f191',\n 'fas fa-caret-square-right' => 'f152',\n 'fas fa-caret-square-up' => 'f151',\n 'fas fa-caret-up' => 'f0d8',\n 'fas fa-cart-arrow-down' => 'f218',\n 'fas fa-cart-plus' => 'f217',\n 'fas fa-certificate' => 'f0a3',\n 'fas fa-chalkboard' => 'f51b',\n 'fas fa-chalkboard-teacher' => 'f51c',\n 'fas fa-chart-area' => 'f1fe',\n 'fas fa-chart-bar' => 'f080',\n 'fas fa-chart-line' => 'f201',\n 'fas fa-chart-pie' => 'f200',\n 'fas fa-check' => 'f00c',\n 'fas fa-check-circle' => 'f058',\n 'fas fa-check-square' => 'f14a',\n 'fas fa-chess' => 'f439',\n 'fas fa-chess-bishop' => 'f43a',\n 'fas fa-chess-board' => 'f43c',\n 'fas fa-chess-king' => 'f43f',\n 'fas fa-chess-knight' => 'f441',\n 'fas fa-chess-pawn' => 'f443',\n 'fas fa-chess-queen' => 'f445',\n 'fas fa-chess-rook' => 'f447',\n 'fas fa-chevron-circle-down' => 'f13a',\n 'fas fa-chevron-circle-left' => 'f137',\n 'fas fa-chevron-circle-right' => 'f138',\n 'fas fa-chevron-circle-up' => 'f139',\n 'fas fa-chevron-down' => 'f078',\n 'fas fa-chevron-left' => 'f053',\n 'fas fa-chevron-right' => 'f054',\n 'fas fa-chevron-up' => 'f077',\n 'fas fa-child' => 'f1ae',\n 'fas fa-church' => 'f51d',\n 'fas fa-circle' => 'f111',\n 'fas fa-circle-notch' => 'f1ce',\n 'fas fa-clipboard' => 'f328',\n 'fas fa-clipboard-check' => 'f46c',\n 'fas fa-clipboard-list' => 'f46d',\n 'fas fa-clock' => 'f017',\n 'fas fa-clone' => 'f24d',\n 'fas fa-closed-captioning' => 'f20a',\n 'fas fa-cloud' => 'f0c2',\n 'fas fa-cloud-download-alt' => 'f381',\n 'fas fa-cloud-upload-alt' => 'f382',\n 'fas fa-code' => 'f121',\n 'fas fa-code-branch' => 'f126',\n 'fas fa-coffee' => 'f0f4',\n 'fas fa-cog' => 'f013',\n 'fas fa-cogs' => 'f085',\n 'fas fa-coins' => 'f51e',\n 'fas fa-columns' => 'f0db',\n 'fas fa-comment' => 'f075',\n 'fas fa-comment-alt' => 'f27a',\n 'fas fa-comment-dots' => 'f4ad',\n 'fas fa-comment-slash' => 'f4b3',\n 'fas fa-comments' => 'f086',\n 'fas fa-compact-disc' => 'f51f',\n 'fas fa-compass' => 'f14e',\n 'fas fa-compress' => 'f066',\n 'fas fa-copy' => 'f0c5',\n 'fas fa-copyright' => 'f1f9',\n 'fas fa-couch' => 'f4b8',\n 'fas fa-credit-card' => 'f09d',\n 'fas fa-crop' => 'f125',\n 'fas fa-crosshairs' => 'f05b',\n 'fas fa-crow' => 'f520',\n 'fas fa-crown' => 'f521',\n 'fas fa-cube' => 'f1b2',\n 'fas fa-cubes' => 'f1b3',\n 'fas fa-cut' => 'f0c4',\n 'fas fa-database' => 'f1c0',\n 'fas fa-deaf' => 'f2a4',\n 'fas fa-desktop' => 'f108',\n 'fas fa-diagnoses' => 'f470',\n 'fas fa-dice' => 'f522',\n 'fas fa-dice-five' => 'f523',\n 'fas fa-dice-four' => 'f524',\n 'fas fa-dice-one' => 'f525',\n 'fas fa-dice-six' => 'f526',\n 'fas fa-dice-three' => 'f527',\n 'fas fa-dice-two' => 'f528',\n 'fas fa-divide' => 'f529',\n 'fas fa-dna' => 'f471',\n 'fas fa-dollar-sign' => 'f155',\n 'fas fa-dolly' => 'f472',\n 'fas fa-dolly-flatbed' => 'f474',\n 'fas fa-donate' => 'f4b9',\n 'fas fa-door-closed' => 'f52a',\n 'fas fa-door-open' => 'f52b',\n 'fas fa-dot-circle' => 'f192',\n 'fas fa-dove' => 'f4ba',\n 'fas fa-download' => 'f019',\n 'fas fa-dumbbell' => 'f44b',\n 'fas fa-edit' => 'f044',\n 'fas fa-eject' => 'f052',\n 'fas fa-ellipsis-h' => 'f141',\n 'fas fa-ellipsis-v' => 'f142',\n 'fas fa-envelope' => 'f0e0',\n 'fas fa-envelope-open' => 'f2b6',\n 'fas fa-envelope-square' => 'f199',\n 'fas fa-equals' => 'f52c',\n 'fas fa-eraser' => 'f12d',\n 'fas fa-euro-sign' => 'f153',\n 'fas fa-exchange-alt' => 'f362',\n 'fas fa-exclamation' => 'f12a',\n 'fas fa-exclamation-circle' => 'f06a',\n 'fas fa-exclamation-triangle' => 'f071',\n 'fas fa-expand' => 'f065',\n 'fas fa-expand-arrows-alt' => 'f31e',\n 'fas fa-external-link-alt' => 'f35d',\n 'fas fa-external-link-square-alt' => 'f360',\n 'fas fa-eye' => 'f06e',\n 'fas fa-eye-dropper' => 'f1fb',\n 'fas fa-eye-slash' => 'f070',\n 'fas fa-fast-backward' => 'f049',\n 'fas fa-fast-forward' => 'f050',\n 'fas fa-fax' => 'f1ac',\n 'fas fa-feather' => 'f52d',\n 'fas fa-female' => 'f182',\n 'fas fa-fighter-jet' => 'f0fb',\n 'fas fa-file' => 'f15b',\n 'fas fa-file-alt' => 'f15c',\n 'fas fa-file-archive' => 'f1c6',\n 'fas fa-file-audio' => 'f1c7',\n 'fas fa-file-code' => 'f1c9',\n 'fas fa-file-excel' => 'f1c3',\n 'fas fa-file-image' => 'f1c5',\n 'fas fa-file-medical' => 'f477',\n 'fas fa-file-medical-alt' => 'f478',\n 'fas fa-file-pdf' => 'f1c1',\n 'fas fa-file-powerpoint' => 'f1c4',\n 'fas fa-file-video' => 'f1c8',\n 'fas fa-file-word' => 'f1c2',\n 'fas fa-film' => 'f008',\n 'fas fa-filter' => 'f0b0',\n 'fas fa-fire' => 'f06d',\n 'fas fa-fire-extinguisher' => 'f134',\n 'fas fa-first-aid' => 'f479',\n 'fas fa-flag' => 'f024',\n 'fas fa-flag-checkered' => 'f11e',\n 'fas fa-flask' => 'f0c3',\n 'fas fa-folder' => 'f07b',\n 'fas fa-folder-open' => 'f07c',\n 'fas fa-font' => 'f031',\n 'fas fa-font-awesome-logo-full' => 'f4e6',\n 'fas fa-football-ball' => 'f44e',\n 'fas fa-forward' => 'f04e',\n 'fas fa-frog' => 'f52e',\n 'fas fa-frown' => 'f119',\n 'fas fa-futbol' => 'f1e3',\n 'fas fa-gamepad' => 'f11b',\n 'fas fa-gas-pump' => 'f52f',\n 'fas fa-gavel' => 'f0e3',\n 'fas fa-gem' => 'f3a5',\n 'fas fa-genderless' => 'f22d',\n 'fas fa-gift' => 'f06b',\n 'fas fa-glass-martini' => 'f000',\n 'fas fa-glasses' => 'f530',\n 'fas fa-globe' => 'f0ac',\n 'fas fa-golf-ball' => 'f450',\n 'fas fa-graduation-cap' => 'f19d',\n 'fas fa-greater-than' => 'f531',\n 'fas fa-greater-than-equal' => 'f532',\n 'fas fa-h-square' => 'f0fd',\n 'fas fa-hand-holding' => 'f4bd',\n 'fas fa-hand-holding-heart' => 'f4be',\n 'fas fa-hand-holding-usd' => 'f4c0',\n 'fas fa-hand-lizard' => 'f258',\n 'fas fa-hand-paper' => 'f256',\n 'fas fa-hand-peace' => 'f25b',\n 'fas fa-hand-point-down' => 'f0a7',\n 'fas fa-hand-point-left' => 'f0a5',\n 'fas fa-hand-point-right' => 'f0a4',\n 'fas fa-hand-point-up' => 'f0a6',\n 'fas fa-hand-pointer' => 'f25a',\n 'fas fa-hand-rock' => 'f255',\n 'fas fa-hand-scissors' => 'f257',\n 'fas fa-hand-spock' => 'f259',\n 'fas fa-hands' => 'f4c2',\n 'fas fa-hands-helping' => 'f4c4',\n 'fas fa-handshake' => 'f2b5',\n 'fas fa-hashtag' => 'f292',\n 'fas fa-hdd' => 'f0a0',\n 'fas fa-heading' => 'f1dc',\n 'fas fa-headphones' => 'f025',\n 'fas fa-heart' => 'f004',\n 'fas fa-heartbeat' => 'f21e',\n 'fas fa-helicopter' => 'f533',\n 'fas fa-history' => 'f1da',\n 'fas fa-hockey-puck' => 'f453',\n 'fas fa-home' => 'f015',\n 'fas fa-hospital' => 'f0f8',\n 'fas fa-hospital-alt' => 'f47d',\n 'fas fa-hospital-symbol' => 'f47e',\n 'fas fa-hourglass' => 'f254',\n 'fas fa-hourglass-end' => 'f253',\n 'fas fa-hourglass-half' => 'f252',\n 'fas fa-hourglass-start' => 'f251',\n 'fas fa-i-cursor' => 'f246',\n 'fas fa-id-badge' => 'f2c1',\n 'fas fa-id-card' => 'f2c2',\n 'fas fa-id-card-alt' => 'f47f',\n 'fas fa-image' => 'f03e',\n 'fas fa-images' => 'f302',\n 'fas fa-inbox' => 'f01c',\n 'fas fa-indent' => 'f03c',\n 'fas fa-industry' => 'f275',\n 'fas fa-infinity' => 'f534',\n 'fas fa-info' => 'f129',\n 'fas fa-info-circle' => 'f05a',\n 'fas fa-italic' => 'f033',\n 'fas fa-key' => 'f084',\n 'fas fa-keyboard' => 'f11c',\n 'fas fa-kiwi-bird' => 'f535',\n 'fas fa-language' => 'f1ab',\n 'fas fa-laptop' => 'f109',\n 'fas fa-leaf' => 'f06c',\n 'fas fa-lemon' => 'f094',\n 'fas fa-less-than' => 'f536',\n 'fas fa-less-than-equal' => 'f537',\n 'fas fa-level-down-alt' => 'f3be',\n 'fas fa-level-up-alt' => 'f3bf',\n 'fas fa-life-ring' => 'f1cd',\n 'fas fa-lightbulb' => 'f0eb',\n 'fas fa-link' => 'f0c1',\n 'fas fa-lira-sign' => 'f195',\n 'fas fa-list' => 'f03a',\n 'fas fa-list-alt' => 'f022',\n 'fas fa-list-ol' => 'f0cb',\n 'fas fa-list-ul' => 'f0ca',\n 'fas fa-location-arrow' => 'f124',\n 'fas fa-lock' => 'f023',\n 'fas fa-lock-open' => 'f3c1',\n 'fas fa-long-arrow-alt-down' => 'f309',\n 'fas fa-long-arrow-alt-left' => 'f30a',\n 'fas fa-long-arrow-alt-right' => 'f30b',\n 'fas fa-long-arrow-alt-up' => 'f30c',\n 'fas fa-low-vision' => 'f2a8',\n 'fas fa-magic' => 'f0d0',\n 'fas fa-magnet' => 'f076',\n 'fas fa-male' => 'f183',\n 'fas fa-map' => 'f279',\n 'fas fa-map-marker' => 'f041',\n 'fas fa-map-marker-alt' => 'f3c5',\n 'fas fa-map-pin' => 'f276',\n 'fas fa-map-signs' => 'f277',\n 'fas fa-mars' => 'f222',\n 'fas fa-mars-double' => 'f227',\n 'fas fa-mars-stroke' => 'f229',\n 'fas fa-mars-stroke-h' => 'f22b',\n 'fas fa-mars-stroke-v' => 'f22a',\n 'fas fa-medkit' => 'f0fa',\n 'fas fa-meh' => 'f11a',\n 'fas fa-memory' => 'f538',\n 'fas fa-mercury' => 'f223',\n 'fas fa-microchip' => 'f2db',\n 'fas fa-microphone' => 'f130',\n 'fas fa-microphone-alt' => 'f3c9',\n 'fas fa-microphone-alt-slash' => 'f539',\n 'fas fa-microphone-slash' => 'f131',\n 'fas fa-minus' => 'f068',\n 'fas fa-minus-circle' => 'f056',\n 'fas fa-minus-square' => 'f146',\n 'fas fa-mobile' => 'f10b',\n 'fas fa-mobile-alt' => 'f3cd',\n 'fas fa-money-bill' => 'f0d6',\n 'fas fa-money-bill-alt' => 'f3d1',\n 'fas fa-money-bill-wave' => 'f53a',\n 'fas fa-money-bill-wave-alt' => 'f53b',\n 'fas fa-money-check' => 'f53c',\n 'fas fa-money-check-alt' => 'f53d',\n 'fas fa-moon' => 'f186',\n 'fas fa-motorcycle' => 'f21c',\n 'fas fa-mouse-pointer' => 'f245',\n 'fas fa-music' => 'f001',\n 'fas fa-neuter' => 'f22c',\n 'fas fa-newspaper' => 'f1ea',\n 'fas fa-not-equal' => 'f53e',\n 'fas fa-notes-medical' => 'f481',\n 'fas fa-object-group' => 'f247',\n 'fas fa-object-ungroup' => 'f248',\n 'fas fa-outdent' => 'f03b',\n 'fas fa-paint-brush' => 'f1fc',\n 'fas fa-palette' => 'f53f',\n 'fas fa-pallet' => 'f482',\n 'fas fa-paper-plane' => 'f1d8',\n 'fas fa-paperclip' => 'f0c6',\n 'fas fa-parachute-box' => 'f4cd',\n 'fas fa-paragraph' => 'f1dd',\n 'fas fa-parking' => 'f540',\n 'fas fa-paste' => 'f0ea',\n 'fas fa-pause' => 'f04c',\n 'fas fa-pause-circle' => 'f28b',\n 'fas fa-paw' => 'f1b0',\n 'fas fa-pen-square' => 'f14b',\n 'fas fa-pencil-alt' => 'f303',\n 'fas fa-people-carry' => 'f4ce',\n 'fas fa-percent' => 'f295',\n 'fas fa-percentage' => 'f541',\n 'fas fa-phone' => 'f095',\n 'fas fa-phone-slash' => 'f3dd',\n 'fas fa-phone-square' => 'f098',\n 'fas fa-phone-volume' => 'f2a0',\n 'fas fa-piggy-bank' => 'f4d3',\n 'fas fa-pills' => 'f484',\n 'fas fa-plane' => 'f072',\n 'fas fa-play' => 'f04b',\n 'fas fa-play-circle' => 'f144',\n 'fas fa-plug' => 'f1e6',\n 'fas fa-plus' => 'f067',\n 'fas fa-plus-circle' => 'f055',\n 'fas fa-plus-square' => 'f0fe',\n 'fas fa-podcast' => 'f2ce',\n 'fas fa-poo' => 'f2fe',\n 'fas fa-portrait' => 'f3e0',\n 'fas fa-pound-sign' => 'f154',\n 'fas fa-power-off' => 'f011',\n 'fas fa-prescription-bottle' => 'f485',\n 'fas fa-prescription-bottle-alt' => 'f486',\n 'fas fa-print' => 'f02f',\n 'fas fa-procedures' => 'f487',\n 'fas fa-project-diagram' => 'f542',\n 'fas fa-puzzle-piece' => 'f12e',\n 'fas fa-qrcode' => 'f029',\n 'fas fa-question' => 'f128',\n 'fas fa-question-circle' => 'f059',\n 'fas fa-quidditch' => 'f458',\n 'fas fa-quote-left' => 'f10d',\n 'fas fa-quote-right' => 'f10e',\n 'fas fa-random' => 'f074',\n 'fas fa-receipt' => 'f543',\n 'fas fa-recycle' => 'f1b8',\n 'fas fa-redo' => 'f01e',\n 'fas fa-redo-alt' => 'f2f9',\n 'fas fa-registered' => 'f25d',\n 'fas fa-reply' => 'f3e5',\n 'fas fa-reply-all' => 'f122',\n 'fas fa-retweet' => 'f079',\n 'fas fa-ribbon' => 'f4d6',\n 'fas fa-road' => 'f018',\n 'fas fa-robot' => 'f544',\n 'fas fa-rocket' => 'f135',\n 'fas fa-rss' => 'f09e',\n 'fas fa-rss-square' => 'f143',\n 'fas fa-ruble-sign' => 'f158',\n 'fas fa-ruler' => 'f545',\n 'fas fa-ruler-combined' => 'f546',\n 'fas fa-ruler-horizontal' => 'f547',\n 'fas fa-ruler-vertical' => 'f548',\n 'fas fa-rupee-sign' => 'f156',\n 'fas fa-save' => 'f0c7',\n 'fas fa-school' => 'f549',\n 'fas fa-screwdriver' => 'f54a',\n 'fas fa-search' => 'f002',\n 'fas fa-search-minus' => 'f010',\n 'fas fa-search-plus' => 'f00e',\n 'fas fa-seedling' => 'f4d8',\n 'fas fa-server' => 'f233',\n 'fas fa-share' => 'f064',\n 'fas fa-share-alt' => 'f1e0',\n 'fas fa-share-alt-square' => 'f1e1',\n 'fas fa-share-square' => 'f14d',\n 'fas fa-shekel-sign' => 'f20b',\n 'fas fa-shield-alt' => 'f3ed',\n 'fas fa-ship' => 'f21a',\n 'fas fa-shipping-fast' => 'f48b',\n 'fas fa-shoe-prints' => 'f54b',\n 'fas fa-shopping-bag' => 'f290',\n 'fas fa-shopping-basket' => 'f291',\n 'fas fa-shopping-cart' => 'f07a',\n 'fas fa-shower' => 'f2cc',\n 'fas fa-sign' => 'f4d9',\n 'fas fa-sign-in-alt' => 'f2f6',\n 'fas fa-sign-language' => 'f2a7',\n 'fas fa-sign-out-alt' => 'f2f5',\n 'fas fa-signal' => 'f012',\n 'fas fa-sitemap' => 'f0e8',\n 'fas fa-skull' => 'f54c',\n 'fas fa-sliders-h' => 'f1de',\n 'fas fa-smile' => 'f118',\n 'fas fa-smoking' => 'f48d',\n 'fas fa-smoking-ban' => 'f54d',\n 'fas fa-snowflake' => 'f2dc',\n 'fas fa-sort' => 'f0dc',\n 'fas fa-sort-alpha-down' => 'f15d',\n 'fas fa-sort-alpha-up' => 'f15e',\n 'fas fa-sort-amount-down' => 'f160',\n 'fas fa-sort-amount-up' => 'f161',\n 'fas fa-sort-down' => 'f0dd',\n 'fas fa-sort-numeric-down' => 'f162',\n 'fas fa-sort-numeric-up' => 'f163',\n 'fas fa-sort-up' => 'f0de',\n 'fas fa-space-shuttle' => 'f197',\n 'fas fa-spinner' => 'f110',\n 'fas fa-square' => 'f0c8',\n 'fas fa-square-full' => 'f45c',\n 'fas fa-star' => 'f005',\n 'fas fa-star-half' => 'f089',\n 'fas fa-step-backward' => 'f048',\n 'fas fa-step-forward' => 'f051',\n 'fas fa-stethoscope' => 'f0f1',\n 'fas fa-sticky-note' => 'f249',\n 'fas fa-stop' => 'f04d',\n 'fas fa-stop-circle' => 'f28d',\n 'fas fa-stopwatch' => 'f2f2',\n 'fas fa-store' => 'f54e',\n 'fas fa-store-alt' => 'f54f',\n 'fas fa-stream' => 'f550',\n 'fas fa-street-view' => 'f21d',\n 'fas fa-strikethrough' => 'f0cc',\n 'fas fa-stroopwafel' => 'f551',\n 'fas fa-subscript' => 'f12c',\n 'fas fa-subway' => 'f239',\n 'fas fa-suitcase' => 'f0f2',\n 'fas fa-sun' => 'f185',\n 'fas fa-superscript' => 'f12b',\n 'fas fa-sync' => 'f021',\n 'fas fa-sync-alt' => 'f2f1',\n 'fas fa-syringe' => 'f48e',\n 'fas fa-table' => 'f0ce',\n 'fas fa-table-tennis' => 'f45d',\n 'fas fa-tablet' => 'f10a',\n 'fas fa-tablet-alt' => 'f3fa',\n 'fas fa-tablets' => 'f490',\n 'fas fa-tachometer-alt' => 'f3fd',\n 'fas fa-tag' => 'f02b',\n 'fas fa-tags' => 'f02c',\n 'fas fa-tape' => 'f4db',\n 'fas fa-tasks' => 'f0ae',\n 'fas fa-taxi' => 'f1ba',\n 'fas fa-terminal' => 'f120',\n 'fas fa-text-height' => 'f034',\n 'fas fa-text-width' => 'f035',\n 'fas fa-th' => 'f00a',\n 'fas fa-th-large' => 'f009',\n 'fas fa-th-list' => 'f00b',\n 'fas fa-thermometer' => 'f491',\n 'fas fa-thermometer-empty' => 'f2cb',\n 'fas fa-thermometer-full' => 'f2c7',\n 'fas fa-thermometer-half' => 'f2c9',\n 'fas fa-thermometer-quarter' => 'f2ca',\n 'fas fa-thermometer-three-quarters' => 'f2c8',\n 'fas fa-thumbs-down' => 'f165',\n 'fas fa-thumbs-up' => 'f164',\n 'fas fa-thumbtack' => 'f08d',\n 'fas fa-ticket-alt' => 'f3ff',\n 'fas fa-times' => 'f00d',\n 'fas fa-times-circle' => 'f057',\n 'fas fa-tint' => 'f043',\n 'fas fa-toggle-off' => 'f204',\n 'fas fa-toggle-on' => 'f205',\n 'fas fa-toolbox' => 'f552',\n 'fas fa-trademark' => 'f25c',\n 'fas fa-train' => 'f238',\n 'fas fa-transgender' => 'f224',\n 'fas fa-transgender-alt' => 'f225',\n 'fas fa-trash' => 'f1f8',\n 'fas fa-trash-alt' => 'f2ed',\n 'fas fa-tree' => 'f1bb',\n 'fas fa-trophy' => 'f091',\n 'fas fa-truck' => 'f0d1',\n 'fas fa-truck-loading' => 'f4de',\n 'fas fa-truck-moving' => 'f4df',\n 'fas fa-tshirt' => 'f553',\n 'fas fa-tty' => 'f1e4',\n 'fas fa-tv' => 'f26c',\n 'fas fa-umbrella' => 'f0e9',\n 'fas fa-underline' => 'f0cd',\n 'fas fa-undo' => 'f0e2',\n 'fas fa-undo-alt' => 'f2ea',\n 'fas fa-universal-access' => 'f29a',\n 'fas fa-university' => 'f19c',\n 'fas fa-unlink' => 'f127',\n 'fas fa-unlock' => 'f09c',\n 'fas fa-unlock-alt' => 'f13e',\n 'fas fa-upload' => 'f093',\n 'fas fa-user' => 'f007',\n 'fas fa-user-alt' => 'f406',\n 'fas fa-user-alt-slash' => 'f4fa',\n 'fas fa-user-astronaut' => 'f4fb',\n 'fas fa-user-check' => 'f4fc',\n 'fas fa-user-circle' => 'f2bd',\n 'fas fa-user-clock' => 'f4fd',\n 'fas fa-user-cog' => 'f4fe',\n 'fas fa-user-edit' => 'f4ff',\n 'fas fa-user-friends' => 'f500',\n 'fas fa-user-graduate' => 'f501',\n 'fas fa-user-lock' => 'f502',\n 'fas fa-user-md' => 'f0f0',\n 'fas fa-user-minus' => 'f503',\n 'fas fa-user-ninja' => 'f504',\n 'fas fa-user-plus' => 'f234',\n 'fas fa-user-secret' => 'f21b',\n 'fas fa-user-shield' => 'f505',\n 'fas fa-user-slash' => 'f506',\n 'fas fa-user-tag' => 'f507',\n 'fas fa-user-tie' => 'f508',\n 'fas fa-user-times' => 'f235',\n 'fas fa-users' => 'f0c0',\n 'fas fa-users-cog' => 'f509',\n 'fas fa-utensil-spoon' => 'f2e5',\n 'fas fa-utensils' => 'f2e7',\n 'fas fa-venus' => 'f221',\n 'fas fa-venus-double' => 'f226',\n 'fas fa-venus-mars' => 'f228',\n 'fas fa-vial' => 'f492',\n 'fas fa-vials' => 'f493',\n 'fas fa-video' => 'f03d',\n 'fas fa-video-slash' => 'f4e2',\n 'fas fa-volleyball-ball' => 'f45f',\n 'fas fa-volume-down' => 'f027',\n 'fas fa-volume-off' => 'f026',\n 'fas fa-volume-up' => 'f028',\n 'fas fa-walking' => 'f554',\n 'fas fa-wallet' => 'f555',\n 'fas fa-warehouse' => 'f494',\n 'fas fa-weight' => 'f496',\n 'fas fa-wheelchair' => 'f193',\n 'fas fa-wifi' => 'f1eb',\n 'fas fa-window-close' => 'f410',\n 'fas fa-window-maximize' => 'f2d0',\n 'fas fa-window-minimize' => 'f2d1',\n 'fas fa-window-restore' => 'f2d2',\n 'fas fa-wine-glass' => 'f4e3',\n 'fas fa-won-sign' => 'f159',\n 'fas fa-wrench' => 'f0ad',\n 'fas fa-x-ray' => 'f497',\n 'fas fa-yen-sign' => 'f157',\n 'far fa-address-book' => 'f2b9',\n 'far fa-address-card' => 'f2bb',\n 'far fa-arrow-alt-circle-down' => 'f358',\n 'far fa-arrow-alt-circle-left' => 'f359',\n 'far fa-arrow-alt-circle-right' => 'f35a',\n 'far fa-arrow-alt-circle-up' => 'f35b',\n 'far fa-bell' => 'f0f3',\n 'far fa-bell-slash' => 'f1f6',\n 'far fa-bookmark' => 'f02e',\n 'far fa-building' => 'f1ad',\n 'far fa-calendar' => 'f133',\n 'far fa-calendar-alt' => 'f073',\n 'far fa-calendar-check' => 'f274',\n 'far fa-calendar-minus' => 'f272',\n 'far fa-calendar-plus' => 'f271',\n 'far fa-calendar-times' => 'f273',\n 'far fa-caret-square-down' => 'f150',\n 'far fa-caret-square-left' => 'f191',\n 'far fa-caret-square-right' => 'f152',\n 'far fa-caret-square-up' => 'f151',\n 'far fa-chart-bar' => 'f080',\n 'far fa-check-circle' => 'f058',\n 'far fa-check-square' => 'f14a',\n 'far fa-circle' => 'f111',\n 'far fa-clipboard' => 'f328',\n 'far fa-clock' => 'f017',\n 'far fa-clone' => 'f24d',\n 'far fa-closed-captioning' => 'f20a',\n 'far fa-comment' => 'f075',\n 'far fa-comment-alt' => 'f27a',\n 'far fa-comment-dots' => 'f4ad',\n 'far fa-comments' => 'f086',\n 'far fa-compass' => 'f14e',\n 'far fa-copy' => 'f0c5',\n 'far fa-copyright' => 'f1f9',\n 'far fa-credit-card' => 'f09d',\n 'far fa-dot-circle' => 'f192',\n 'far fa-edit' => 'f044',\n 'far fa-envelope' => 'f0e0',\n 'far fa-envelope-open' => 'f2b6',\n 'far fa-eye' => 'f06e',\n 'far fa-eye-slash' => 'f070',\n 'far fa-file' => 'f15b',\n 'far fa-file-alt' => 'f15c',\n 'far fa-file-archive' => 'f1c6',\n 'far fa-file-audio' => 'f1c7',\n 'far fa-file-code' => 'f1c9',\n 'far fa-file-excel' => 'f1c3',\n 'far fa-file-image' => 'f1c5',\n 'far fa-file-pdf' => 'f1c1',\n 'far fa-file-powerpoint' => 'f1c4',\n 'far fa-file-video' => 'f1c8',\n 'far fa-file-word' => 'f1c2',\n 'far fa-flag' => 'f024',\n 'far fa-folder' => 'f07b',\n 'far fa-folder-open' => 'f07c',\n 'far fa-font-awesome-logo-full' => 'f4e6',\n 'far fa-frown' => 'f119',\n 'far fa-futbol' => 'f1e3',\n 'far fa-gem' => 'f3a5',\n 'far fa-hand-lizard' => 'f258',\n 'far fa-hand-paper' => 'f256',\n 'far fa-hand-peace' => 'f25b',\n 'far fa-hand-point-down' => 'f0a7',\n 'far fa-hand-point-left' => 'f0a5',\n 'far fa-hand-point-right' => 'f0a4',\n 'far fa-hand-point-up' => 'f0a6',\n 'far fa-hand-pointer' => 'f25a',\n 'far fa-hand-rock' => 'f255',\n 'far fa-hand-scissors' => 'f257',\n 'far fa-hand-spock' => 'f259',\n 'far fa-handshake' => 'f2b5',\n 'far fa-hdd' => 'f0a0',\n 'far fa-heart' => 'f004',\n 'far fa-hospital' => 'f0f8',\n 'far fa-hourglass' => 'f254',\n 'far fa-id-badge' => 'f2c1',\n 'far fa-id-card' => 'f2c2',\n 'far fa-image' => 'f03e',\n 'far fa-images' => 'f302',\n 'far fa-keyboard' => 'f11c',\n 'far fa-lemon' => 'f094',\n 'far fa-life-ring' => 'f1cd',\n 'far fa-lightbulb' => 'f0eb',\n 'far fa-list-alt' => 'f022',\n 'far fa-map' => 'f279',\n 'far fa-meh' => 'f11a',\n 'far fa-minus-square' => 'f146',\n 'far fa-money-bill-alt' => 'f3d1',\n 'far fa-moon' => 'f186',\n 'far fa-newspaper' => 'f1ea',\n 'far fa-object-group' => 'f247',\n 'far fa-object-ungroup' => 'f248',\n 'far fa-paper-plane' => 'f1d8',\n 'far fa-pause-circle' => 'f28b',\n 'far fa-play-circle' => 'f144',\n 'far fa-plus-square' => 'f0fe',\n 'far fa-question-circle' => 'f059',\n 'far fa-registered' => 'f25d',\n 'far fa-save' => 'f0c7',\n 'far fa-share-square' => 'f14d',\n 'far fa-smile' => 'f118',\n 'far fa-snowflake' => 'f2dc',\n 'far fa-square' => 'f0c8',\n 'far fa-star' => 'f005',\n 'far fa-star-half' => 'f089',\n 'far fa-sticky-note' => 'f249',\n 'far fa-stop-circle' => 'f28d',\n 'far fa-sun' => 'f185',\n 'far fa-thumbs-down' => 'f165',\n 'far fa-thumbs-up' => 'f164',\n 'far fa-times-circle' => 'f057',\n 'far fa-trash-alt' => 'f2ed',\n 'far fa-user' => 'f007',\n 'far fa-user-circle' => 'f2bd',\n 'far fa-window-close' => 'f410',\n 'far fa-window-maximize' => 'f2d0',\n 'far fa-window-minimize' => 'f2d1',\n 'far fa-window-restore' => 'f2d2',\n 'fab fa-500px' => 'f26e',\n 'fab fa-accessible-icon' => 'f368',\n 'fab fa-accusoft' => 'f369',\n 'fab fa-adn' => 'f170',\n 'fab fa-adversal' => 'f36a',\n 'fab fa-affiliatetheme' => 'f36b',\n 'fab fa-algolia' => 'f36c',\n 'fab fa-amazon' => 'f270',\n 'fab fa-amazon-pay' => 'f42c',\n 'fab fa-amilia' => 'f36d',\n 'fab fa-android' => 'f17b',\n 'fab fa-angellist' => 'f209',\n 'fab fa-angrycreative' => 'f36e',\n 'fab fa-angular' => 'f420',\n 'fab fa-app-store' => 'f36f',\n 'fab fa-app-store-ios' => 'f370',\n 'fab fa-apper' => 'f371',\n 'fab fa-apple' => 'f179',\n 'fab fa-apple-pay' => 'f415',\n 'fab fa-asymmetrik' => 'f372',\n 'fab fa-audible' => 'f373',\n 'fab fa-autoprefixer' => 'f41c',\n 'fab fa-avianex' => 'f374',\n 'fab fa-aviato' => 'f421',\n 'fab fa-aws' => 'f375',\n 'fab fa-bandcamp' => 'f2d5',\n 'fab fa-behance' => 'f1b4',\n 'fab fa-behance-square' => 'f1b5',\n 'fab fa-bimobject' => 'f378',\n 'fab fa-bitbucket' => 'f171',\n 'fab fa-bitcoin' => 'f379',\n 'fab fa-bity' => 'f37a',\n 'fab fa-black-tie' => 'f27e',\n 'fab fa-blackberry' => 'f37b',\n 'fab fa-blogger' => 'f37c',\n 'fab fa-blogger-b' => 'f37d',\n 'fab fa-bluetooth' => 'f293',\n 'fab fa-bluetooth-b' => 'f294',\n 'fab fa-btc' => 'f15a',\n 'fab fa-buromobelexperte' => 'f37f',\n 'fab fa-buysellads' => 'f20d',\n 'fab fa-cc-amazon-pay' => 'f42d',\n 'fab fa-cc-amex' => 'f1f3',\n 'fab fa-cc-apple-pay' => 'f416',\n 'fab fa-cc-diners-club' => 'f24c',\n 'fab fa-cc-discover' => 'f1f2',\n 'fab fa-cc-jcb' => 'f24b',\n 'fab fa-cc-mastercard' => 'f1f1',\n 'fab fa-cc-paypal' => 'f1f4',\n 'fab fa-cc-stripe' => 'f1f5',\n 'fab fa-cc-visa' => 'f1f0',\n 'fab fa-centercode' => 'f380',\n 'fab fa-chrome' => 'f268',\n 'fab fa-cloudscale' => 'f383',\n 'fab fa-cloudsmith' => 'f384',\n 'fab fa-cloudversify' => 'f385',\n 'fab fa-codepen' => 'f1cb',\n 'fab fa-codiepie' => 'f284',\n 'fab fa-connectdevelop' => 'f20e',\n 'fab fa-contao' => 'f26d',\n 'fab fa-cpanel' => 'f388',\n 'fab fa-creative-commons' => 'f25e',\n 'fab fa-creative-commons-by' => 'f4e7',\n 'fab fa-creative-commons-nc' => 'f4e8',\n 'fab fa-creative-commons-nc-eu' => 'f4e9',\n 'fab fa-creative-commons-nc-jp' => 'f4ea',\n 'fab fa-creative-commons-nd' => 'f4eb',\n 'fab fa-creative-commons-pd' => 'f4ec',\n 'fab fa-creative-commons-pd-alt' => 'f4ed',\n 'fab fa-creative-commons-remix' => 'f4ee',\n 'fab fa-creative-commons-sa' => 'f4ef',\n 'fab fa-creative-commons-sampling' => 'f4f0',\n 'fab fa-creative-commons-sampling-plus' => 'f4f1',\n 'fab fa-creative-commons-share' => 'f4f2',\n 'fab fa-css3' => 'f13c',\n 'fab fa-css3-alt' => 'f38b',\n 'fab fa-cuttlefish' => 'f38c',\n 'fab fa-d-and-d' => 'f38d',\n 'fab fa-dashcube' => 'f210',\n 'fab fa-delicious' => 'f1a5',\n 'fab fa-deploydog' => 'f38e',\n 'fab fa-deskpro' => 'f38f',\n 'fab fa-deviantart' => 'f1bd',\n 'fab fa-digg' => 'f1a6',\n 'fab fa-digital-ocean' => 'f391',\n 'fab fa-discord' => 'f392',\n 'fab fa-discourse' => 'f393',\n 'fab fa-dochub' => 'f394',\n 'fab fa-docker' => 'f395',\n 'fab fa-draft2digital' => 'f396',\n 'fab fa-dribbble' => 'f17d',\n 'fab fa-dribbble-square' => 'f397',\n 'fab fa-dropbox' => 'f16b',\n 'fab fa-drupal' => 'f1a9',\n 'fab fa-dyalog' => 'f399',\n 'fab fa-earlybirds' => 'f39a',\n 'fab fa-ebay' => 'f4f4',\n 'fab fa-edge' => 'f282',\n 'fab fa-elementor' => 'f430',\n 'fab fa-ember' => 'f423',\n 'fab fa-empire' => 'f1d1',\n 'fab fa-envira' => 'f299',\n 'fab fa-erlang' => 'f39d',\n 'fab fa-ethereum' => 'f42e',\n 'fab fa-etsy' => 'f2d7',\n 'fab fa-expeditedssl' => 'f23e',\n 'fab fa-facebook' => 'f09a',\n 'fab fa-facebook-f' => 'f39e',\n 'fab fa-facebook-messenger' => 'f39f',\n 'fab fa-facebook-square' => 'f082',\n 'fab fa-firefox' => 'f269',\n 'fab fa-first-order' => 'f2b0',\n 'fab fa-first-order-alt' => 'f50a',\n 'fab fa-firstdraft' => 'f3a1',\n 'fab fa-flickr' => 'f16e',\n 'fab fa-flipboard' => 'f44d',\n 'fab fa-fly' => 'f417',\n 'fab fa-font-awesome' => 'f2b4',\n 'fab fa-font-awesome-alt' => 'f35c',\n 'fab fa-font-awesome-flag' => 'f425',\n 'fab fa-font-awesome-logo-full' => 'f4e6',\n 'fab fa-fonticons' => 'f280',\n 'fab fa-fonticons-fi' => 'f3a2',\n 'fab fa-fort-awesome' => 'f286',\n 'fab fa-fort-awesome-alt' => 'f3a3',\n 'fab fa-forumbee' => 'f211',\n 'fab fa-foursquare' => 'f180',\n 'fab fa-free-code-camp' => 'f2c5',\n 'fab fa-freebsd' => 'f3a4',\n 'fab fa-fulcrum' => 'f50b',\n 'fab fa-galactic-republic' => 'f50c',\n 'fab fa-galactic-senate' => 'f50d',\n 'fab fa-get-pocket' => 'f265',\n 'fab fa-gg' => 'f260',\n 'fab fa-gg-circle' => 'f261',\n 'fab fa-git' => 'f1d3',\n 'fab fa-git-square' => 'f1d2',\n 'fab fa-github' => 'f09b',\n 'fab fa-github-alt' => 'f113',\n 'fab fa-github-square' => 'f092',\n 'fab fa-gitkraken' => 'f3a6',\n 'fab fa-gitlab' => 'f296',\n 'fab fa-gitter' => 'f426',\n 'fab fa-glide' => 'f2a5',\n 'fab fa-glide-g' => 'f2a6',\n 'fab fa-gofore' => 'f3a7',\n 'fab fa-goodreads' => 'f3a8',\n 'fab fa-goodreads-g' => 'f3a9',\n 'fab fa-google' => 'f1a0',\n 'fab fa-google-drive' => 'f3aa',\n 'fab fa-google-play' => 'f3ab',\n 'fab fa-google-plus' => 'f2b3',\n 'fab fa-google-plus-g' => 'f0d5',\n 'fab fa-google-plus-square' => 'f0d4',\n 'fab fa-google-wallet' => 'f1ee',\n 'fab fa-gratipay' => 'f184',\n 'fab fa-grav' => 'f2d6',\n 'fab fa-gripfire' => 'f3ac',\n 'fab fa-grunt' => 'f3ad',\n 'fab fa-gulp' => 'f3ae',\n 'fab fa-hacker-news' => 'f1d4',\n 'fab fa-hacker-news-square' => 'f3af',\n 'fab fa-hips' => 'f452',\n 'fab fa-hire-a-helper' => 'f3b0',\n 'fab fa-hooli' => 'f427',\n 'fab fa-hotjar' => 'f3b1',\n 'fab fa-houzz' => 'f27c',\n 'fab fa-html5' => 'f13b',\n 'fab fa-hubspot' => 'f3b2',\n 'fab fa-imdb' => 'f2d8',\n 'fab fa-instagram' => 'f16d',\n 'fab fa-internet-explorer' => 'f26b',\n 'fab fa-ioxhost' => 'f208',\n 'fab fa-itunes' => 'f3b4',\n 'fab fa-itunes-note' => 'f3b5',\n 'fab fa-java' => 'f4e4',\n 'fab fa-jedi-order' => 'f50e',\n 'fab fa-jenkins' => 'f3b6',\n 'fab fa-joget' => 'f3b7',\n 'fab fa-joomla' => 'f1aa',\n 'fab fa-js' => 'f3b8',\n 'fab fa-js-square' => 'f3b9',\n 'fab fa-jsfiddle' => 'f1cc',\n 'fab fa-keybase' => 'f4f5',\n 'fab fa-keycdn' => 'f3ba',\n 'fab fa-kickstarter' => 'f3bb',\n 'fab fa-kickstarter-k' => 'f3bc',\n 'fab fa-korvue' => 'f42f',\n 'fab fa-laravel' => 'f3bd',\n 'fab fa-lastfm' => 'f202',\n 'fab fa-lastfm-square' => 'f203',\n 'fab fa-leanpub' => 'f212',\n 'fab fa-less' => 'f41d',\n 'fab fa-line' => 'f3c0',\n 'fab fa-linkedin' => 'f08c',\n 'fab fa-linkedin-in' => 'f0e1',\n 'fab fa-linode' => 'f2b8',\n 'fab fa-linux' => 'f17c',\n 'fab fa-lyft' => 'f3c3',\n 'fab fa-magento' => 'f3c4',\n 'fab fa-mandalorian' => 'f50f',\n 'fab fa-mastodon' => 'f4f6',\n 'fab fa-maxcdn' => 'f136',\n 'fab fa-medapps' => 'f3c6',\n 'fab fa-medium' => 'f23a',\n 'fab fa-medium-m' => 'f3c7',\n 'fab fa-medrt' => 'f3c8',\n 'fab fa-meetup' => 'f2e0',\n 'fab fa-microsoft' => 'f3ca',\n 'fab fa-mix' => 'f3cb',\n 'fab fa-mixcloud' => 'f289',\n 'fab fa-mizuni' => 'f3cc',\n 'fab fa-modx' => 'f285',\n 'fab fa-monero' => 'f3d0',\n 'fab fa-napster' => 'f3d2',\n 'fab fa-nintendo-switch' => 'f418',\n 'fab fa-node' => 'f419',\n 'fab fa-node-js' => 'f3d3',\n 'fab fa-npm' => 'f3d4',\n 'fab fa-ns8' => 'f3d5',\n 'fab fa-nutritionix' => 'f3d6',\n 'fab fa-odnoklassniki' => 'f263',\n 'fab fa-odnoklassniki-square' => 'f264',\n 'fab fa-old-republic' => 'f510',\n 'fab fa-opencart' => 'f23d',\n 'fab fa-openid' => 'f19b',\n 'fab fa-opera' => 'f26a',\n 'fab fa-optin-monster' => 'f23c',\n 'fab fa-osi' => 'f41a',\n 'fab fa-page4' => 'f3d7',\n 'fab fa-pagelines' => 'f18c',\n 'fab fa-palfed' => 'f3d8',\n 'fab fa-patreon' => 'f3d9',\n 'fab fa-paypal' => 'f1ed',\n 'fab fa-periscope' => 'f3da',\n 'fab fa-phabricator' => 'f3db',\n 'fab fa-phoenix-framework' => 'f3dc',\n 'fab fa-phoenix-squadron' => 'f511',\n 'fab fa-php' => 'f457',\n 'fab fa-pied-piper' => 'f2ae',\n 'fab fa-pied-piper-alt' => 'f1a8',\n 'fab fa-pied-piper-hat' => 'f4e5',\n 'fab fa-pied-piper-pp' => 'f1a7',\n 'fab fa-pinterest' => 'f0d2',\n 'fab fa-pinterest-p' => 'f231',\n 'fab fa-pinterest-square' => 'f0d3',\n 'fab fa-playstation' => 'f3df',\n 'fab fa-product-hunt' => 'f288',\n 'fab fa-pushed' => 'f3e1',\n 'fab fa-python' => 'f3e2',\n 'fab fa-qq' => 'f1d6',\n 'fab fa-quinscape' => 'f459',\n 'fab fa-quora' => 'f2c4',\n 'fab fa-r-project' => 'f4f7',\n 'fab fa-ravelry' => 'f2d9',\n 'fab fa-react' => 'f41b',\n 'fab fa-readme' => 'f4d5',\n 'fab fa-rebel' => 'f1d0',\n 'fab fa-red-river' => 'f3e3',\n 'fab fa-reddit' => 'f1a1',\n 'fab fa-reddit-alien' => 'f281',\n 'fab fa-reddit-square' => 'f1a2',\n 'fab fa-rendact' => 'f3e4',\n 'fab fa-renren' => 'f18b',\n 'fab fa-replyd' => 'f3e6',\n 'fab fa-researchgate' => 'f4f8',\n 'fab fa-resolving' => 'f3e7',\n 'fab fa-rocketchat' => 'f3e8',\n 'fab fa-rockrms' => 'f3e9',\n 'fab fa-safari' => 'f267',\n 'fab fa-sass' => 'f41e',\n 'fab fa-schlix' => 'f3ea',\n 'fab fa-scribd' => 'f28a',\n 'fab fa-searchengin' => 'f3eb',\n 'fab fa-sellcast' => 'f2da',\n 'fab fa-sellsy' => 'f213',\n 'fab fa-servicestack' => 'f3ec',\n 'fab fa-shirtsinbulk' => 'f214',\n 'fab fa-simplybuilt' => 'f215',\n 'fab fa-sistrix' => 'f3ee',\n 'fab fa-sith' => 'f512',\n 'fab fa-skyatlas' => 'f216',\n 'fab fa-skype' => 'f17e',\n 'fab fa-slack' => 'f198',\n 'fab fa-slack-hash' => 'f3ef',\n 'fab fa-slideshare' => 'f1e7',\n 'fab fa-snapchat' => 'f2ab',\n 'fab fa-snapchat-ghost' => 'f2ac',\n 'fab fa-snapchat-square' => 'f2ad',\n 'fab fa-soundcloud' => 'f1be',\n 'fab fa-speakap' => 'f3f3',\n 'fab fa-spotify' => 'f1bc',\n 'fab fa-stack-exchange' => 'f18d',\n 'fab fa-stack-overflow' => 'f16c',\n 'fab fa-staylinked' => 'f3f5',\n 'fab fa-steam' => 'f1b6',\n 'fab fa-steam-square' => 'f1b7',\n 'fab fa-steam-symbol' => 'f3f6',\n 'fab fa-sticker-mule' => 'f3f7',\n 'fab fa-strava' => 'f428',\n 'fab fa-stripe' => 'f429',\n 'fab fa-stripe-s' => 'f42a',\n 'fab fa-studiovinari' => 'f3f8',\n 'fab fa-stumbleupon' => 'f1a4',\n 'fab fa-stumbleupon-circle' => 'f1a3',\n 'fab fa-superpowers' => 'f2dd',\n 'fab fa-supple' => 'f3f9',\n 'fab fa-teamspeak' => 'f4f9',\n 'fab fa-telegram' => 'f2c6',\n 'fab fa-telegram-plane' => 'f3fe',\n 'fab fa-tencent-weibo' => 'f1d5',\n 'fab fa-themeisle' => 'f2b2',\n 'fab fa-trade-federation' => 'f513',\n 'fab fa-trello' => 'f181',\n 'fab fa-tripadvisor' => 'f262',\n 'fab fa-tumblr' => 'f173',\n 'fab fa-tumblr-square' => 'f174',\n 'fab fa-twitch' => 'f1e8',\n 'fab fa-twitter' => 'f099',\n 'fab fa-twitter-square' => 'f081',\n 'fab fa-typo3' => 'f42b',\n 'fab fa-uber' => 'f402',\n 'fab fa-uikit' => 'f403',\n 'fab fa-uniregistry' => 'f404',\n 'fab fa-untappd' => 'f405',\n 'fab fa-usb' => 'f287',\n 'fab fa-ussunnah' => 'f407',\n 'fab fa-vaadin' => 'f408',\n 'fab fa-viacoin' => 'f237',\n 'fab fa-viadeo' => 'f2a9',\n 'fab fa-viadeo-square' => 'f2aa',\n 'fab fa-viber' => 'f409',\n 'fab fa-vimeo' => 'f40a',\n 'fab fa-vimeo-square' => 'f194',\n 'fab fa-vimeo-v' => 'f27d',\n 'fab fa-vine' => 'f1ca',\n 'fab fa-vk' => 'f189',\n 'fab fa-vnv' => 'f40b',\n 'fab fa-vuejs' => 'f41f',\n 'fab fa-weibo' => 'f18a',\n 'fab fa-weixin' => 'f1d7',\n 'fab fa-whatsapp' => 'f232',\n 'fab fa-whatsapp-square' => 'f40c',\n 'fab fa-whmcs' => 'f40d',\n 'fab fa-wikipedia-w' => 'f266',\n 'fab fa-windows' => 'f17a',\n 'fab fa-wolf-pack-battalion' => 'f514',\n 'fab fa-wordpress' => 'f19a',\n 'fab fa-wordpress-simple' => 'f411',\n 'fab fa-wpbeginner' => 'f297',\n 'fab fa-wpexplorer' => 'f2de',\n 'fab fa-wpforms' => 'f298',\n 'fab fa-xbox' => 'f412',\n 'fab fa-xing' => 'f168',\n 'fab fa-xing-square' => 'f169',\n 'fab fa-y-combinator' => 'f23b',\n 'fab fa-yahoo' => 'f19e',\n 'fab fa-yandex' => 'f413',\n 'fab fa-yandex-international' => 'f414',\n 'fab fa-yelp' => 'f1e9',\n 'fab fa-yoast' => 'f2b1',\n 'fab fa-youtube' => 'f167',\n 'fab fa-youtube-square' => 'f431'\n ];\n }", "title": "" }, { "docid": "4a97c0445a0c9880e226e6478a7013d8", "score": "0.5916249", "text": "public static function load_font_awesome($fix = false)\n\t{\n\t\t$vik = UIApplication::getInstance();\n\n\t\tVikAppointments::load_font_awesome();\n\n\t\tif ($fix)\n\t\t{\n\t\t\t$vik->fixContentPadding($doc);\n\t\t}\n\t}", "title": "" }, { "docid": "4d32824ffbf74ab60f3366da3d48740e", "score": "0.5904489", "text": "public function faIcon($icon, array $options = []) {\n\t\t\t$options['font'] = 'fa';\n\t\t\treturn $this->icon($icon, $options);\n }", "title": "" }, { "docid": "91cafa9af8b7827820309b7c150e5a89", "score": "0.5901093", "text": "function leaven_include_svg_icons() {\n\tforeach ( array( 'fa-solid', 'fa-brands' ) as $style ) {\n\t\t$file = trailingslashit( get_stylesheet_directory() ) . 'sprites/' . $style . '.svg';\n\t\tif ( file_exists( $file ) ) {\n\t\t\tinclude_once $file;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "7a07edacc3e7f7c0bc8e4cbe49f5dd68", "score": "0.5875586", "text": "function add_favicon() {\n \t$favicon_url = get_stylesheet_directory_uri() . '/images/favicon.ico';\n\t echo '<link rel=\"shortcut icon\" href=\"' . $favicon_url . '\" />';\n}", "title": "" }, { "docid": "3ef853342ff6ed661136b843d445d3ff", "score": "0.58521706", "text": "function bkb_icon($icon_name)\n{\n\n include get_stylesheet_directory() . '/icons/' . $icon_name . '.svg';\n}", "title": "" }, { "docid": "f4692eab3b181aa98e5ce46f4dd2b975", "score": "0.58449525", "text": "public static function file_icon($path)\n {\n $ext = self::file_extension($path);\n\n switch( $ext )\n {\n case 'ico':\n case 'jpg':\n case 'jpeg':\n case 'png':\n return 'fas fa-file-image';\n break;\n\n case 'php':\n return 'fab fa-php';\n break;\n\n case 'htm':\n case 'html':\n return 'fab fa-html5';\n break;\n\n case 'css':\n return 'fab fa-css3-alt';\n break;\n\n case 'js':\n return 'fab fa-js';\n break;\n\n case 'java':\n return 'fab fa-java';\n break;\n\n case 'zip':\n return 'fas fa-file-archive';\n break;\n\n case 'pdf':\n return 'fas fa-file-pdf';\n break;\n\n case 'py':\n return 'fab fa-python';\n break;\n\n case 'rb':\n case 'cpp':\n case 'json':\n return 'fas fa-file-code';\n break;\n\n default:\n return 'fas fa-file';\n break;\n }\n }", "title": "" }, { "docid": "1682535dfa6b1e2bc46a2ee21b931226", "score": "0.5834117", "text": "function wpo_woocomerce_icon_wishlist_add(){\n \treturn '<i class=\"fa fa-heart-o\"></i><span>'.__('Wishlist','basic').'</span>';\n}", "title": "" }, { "docid": "39ea5a5a29dfd31eb1bd52e756e16869", "score": "0.5820197", "text": "function colortheme_icons( $atts, $content = null ) {\n\textract( shortcode_atts( array(\n\t\t'icon_name' => 'glass',\n\n\t), $atts ) );\n\t\n\t$code = '<i class=\"icon-' . $icon_name . '\"></i>';\n\t\t\t\n\treturn $code;\n}", "title": "" }, { "docid": "bb294dc82427fc913ebfa4ebbeeb76be", "score": "0.57773423", "text": "function fontAwesomeSelect($name = \"fa-icon\"){\n global $fontAwesome_icons;\n\n //We need to set the font face of the select element to fontAwesome, make sure you properly linked fontawesome css\n $html = \"<select name='\".$name.\"' style='font-family: fontAwesome;'>\";\n foreach($fontAwesome_icons as $icon){\n $html .= \"<option value='\".$icon['name'].\"'>\".$icon['hex'].\" \".$icon['name'].\"</option>\";\n }\n $html .= \"</select>\";\n return $html;\n }", "title": "" }, { "docid": "f0019ee2a9dfa8ac83f1a92ba3f33207", "score": "0.57495815", "text": "public function get_icon() {\r\n return 'fas fa-file-code';\r\n }", "title": "" }, { "docid": "f0019ee2a9dfa8ac83f1a92ba3f33207", "score": "0.57495815", "text": "public function get_icon() {\r\n return 'fas fa-file-code';\r\n }", "title": "" }, { "docid": "25a6e19e2ff8952607fc182738692a63", "score": "0.5744445", "text": "public function icon_demo() {\n\t\t$icons = array(\n\t\t\t'glass',\n\t\t\t'leaf',\n\t\t\t'dog',\n\t\t\t'user',\n\t\t\t'girl',\n\t\t\t'car',\n\t\t\t'user_add',\n\t\t\t'user_remove',\n\t\t\t'film',\n\t\t\t'magic',\n\t\t\t'envelope',\n\t\t\t'camera',\n\t\t\t'heart',\n\t\t\t'beach_umbrella',\n\t\t\t'train',\n\t\t\t'print',\n\t\t\t'bin',\n\t\t\t'music',\n\t\t\t'note',\n\t\t\t'heart_empty',\n\t\t\t'home',\n\t\t\t'snowflake',\n\t\t\t'fire',\n\t\t\t'magnet',\n\t\t\t'parents',\n\t\t\t'binoculars',\n\t\t\t'road',\n\t\t\t'search',\n\t\t\t'cars',\n\t\t\t'notes_2',\n\t\t\t'pencil',\n\t\t\t'bus',\n\t\t\t'wifi_alt',\n\t\t\t'luggage',\n\t\t\t'old_man',\n\t\t\t'woman',\n\t\t\t'file',\n\t\t\t'coins',\n\t\t\t'airplane',\n\t\t\t'notes',\n\t\t\t'stats',\n\t\t\t'charts',\n\t\t\t'pie_chart',\n\t\t\t'group',\n\t\t\t'keys',\n\t\t\t'calendar',\n\t\t\t'router',\n\t\t\t'camera_small',\n\t\t\t'dislikes',\n\t\t\t'star',\n\t\t\t'link',\n\t\t\t'eye_open',\n\t\t\t'eye_close',\n\t\t\t'alarm',\n\t\t\t'clock',\n\t\t\t'stopwatch',\n\t\t\t'projector',\n\t\t\t'history',\n\t\t\t'truck',\n\t\t\t'cargo',\n\t\t\t'compass',\n\t\t\t'keynote',\n\t\t\t'paperclip',\n\t\t\t'power',\n\t\t\t'lightbulb',\n\t\t\t'tag',\n\t\t\t'tags',\n\t\t\t'cleaning',\n\t\t\t'ruller',\n\t\t\t'gift',\n\t\t\t'umbrella',\n\t\t\t'book',\n\t\t\t'bookmark',\n\t\t\t'wifi',\n\t\t\t'cup',\n\t\t\t'stroller',\n\t\t\t'headphones',\n\t\t\t'headset',\n\t\t\t'warning_sign',\n\t\t\t'signal',\n\t\t\t'retweet',\n\t\t\t'refresh',\n\t\t\t'roundabout',\n\t\t\t'random',\n\t\t\t'heat',\n\t\t\t'repeat',\n\t\t\t'display',\n\t\t\t'log_book',\n\t\t\t'adress_book',\n\t\t\t'building',\n\t\t\t'eyedropper',\n\t\t\t'adjust',\n\t\t\t'tint',\n\t\t\t'crop',\n\t\t\t'vector_path_square',\n\t\t\t'vector_path_circle',\n\t\t\t'vector_path_polygon',\n\t\t\t'vector_path_line',\n\t\t\t'vector_path_curve',\n\t\t\t'vector_path_all',\n\t\t\t'font',\n\t\t\t'italic',\n\t\t\t'bold',\n\t\t\t'text_underline',\n\t\t\t'text_strike',\n\t\t\t'text_height',\n\t\t\t'text_width',\n\t\t\t'text_resize',\n\t\t\t'left_indent',\n\t\t\t'right_indent',\n\t\t\t'align_left',\n\t\t\t'align_center',\n\t\t\t'align_right',\n\t\t\t'justify',\n\t\t\t'list',\n\t\t\t'text_smaller',\n\t\t\t'text_bigger',\n\t\t\t'embed',\n\t\t\t'embed_close',\n\t\t\t'table',\n\t\t\t'message_full',\n\t\t\t'message_empty',\n\t\t\t'message_in',\n\t\t\t'message_out',\n\t\t\t'message_plus',\n\t\t\t'message_minus',\n\t\t\t'message_ban',\n\t\t\t'message_flag',\n\t\t\t'message_lock',\n\t\t\t'message_new',\n\t\t\t'inbox',\n\t\t\t'inbox_plus',\n\t\t\t'inbox_minus',\n\t\t\t'inbox_lock',\n\t\t\t'inbox_in',\n\t\t\t'inbox_out',\n\t\t\t'cogwheel',\n\t\t\t'cogwheels',\n\t\t\t'picture',\n\t\t\t'adjust_alt',\n\t\t\t'database_lock',\n\t\t\t'database_plus',\n\t\t\t'database_minus',\n\t\t\t'database_ban',\n\t\t\t'folder_open',\n\t\t\t'folder_plus',\n\t\t\t'folder_minus',\n\t\t\t'folder_lock',\n\t\t\t'folder_flag',\n\t\t\t'folder_new',\n\t\t\t'edit',\n\t\t\t'new_window',\n\t\t\t'check',\n\t\t\t'unchecked',\n\t\t\t'more_windows',\n\t\t\t'show_big_thumbnails',\n\t\t\t'show_thumbnails',\n\t\t\t'show_thumbnails_with_lines',\n\t\t\t'show_lines',\n\t\t\t'playlist',\n\t\t\t'imac',\n\t\t\t'macbook',\n\t\t\t'ipad',\n\t\t\t'iphone',\n\t\t\t'iphone_transfer',\n\t\t\t'iphone_exchange',\n\t\t\t'ipod',\n\t\t\t'ipod_shuffle',\n\t\t\t'ear_plugs',\n\t\t\t'phone',\n\t\t\t'step_backward',\n\t\t\t'fast_backward',\n\t\t\t'rewind',\n\t\t\t'play',\n\t\t\t'pause',\n\t\t\t'stop',\n\t\t\t'forward',\n\t\t\t'fast_forward',\n\t\t\t'step_forward',\n\t\t\t'eject',\n\t\t\t'facetime_video',\n\t\t\t'download_alt',\n\t\t\t'mute',\n\t\t\t'volume_down',\n\t\t\t'volume_up',\n\t\t\t'screenshot',\n\t\t\t'move',\n\t\t\t'more',\n\t\t\t'brightness_reduce',\n\t\t\t'brightness_increase',\n\t\t\t'circle_plus',\n\t\t\t'circle_minus',\n\t\t\t'circle_remove',\n\t\t\t'circle_ok',\n\t\t\t'circle_question_mark',\n\t\t\t'circle_info',\n\t\t\t'circle_exclamation_mark',\n\t\t\t'remove',\n\t\t\t'ok',\n\t\t\t'ban',\n\t\t\t'download',\n\t\t\t'upload',\n\t\t\t'shopping_cart',\n\t\t\t'lock',\n\t\t\t'unlock',\n\t\t\t'electricity',\n\t\t\t'ok_2',\n\t\t\t'remove_2',\n\t\t\t'cart_out',\n\t\t\t'cart_in',\n\t\t\t'left_arrow',\n\t\t\t'right_arrow',\n\t\t\t'down_arrow',\n\t\t\t'up_arrow',\n\t\t\t'resize_small',\n\t\t\t'resize_full',\n\t\t\t'circle_arrow_left',\n\t\t\t'circle_arrow_right',\n\t\t\t'circle_arrow_top',\n\t\t\t'circle_arrow_down',\n\t\t\t'play_button',\n\t\t\t'unshare',\n\t\t\t'share',\n\t\t\t'chevron-right',\n\t\t\t'chevron-left',\n\t\t\t'bluetooth',\n\t\t\t'euro',\n\t\t\t'usd',\n\t\t\t'gbp',\n\t\t\t'retweet_2',\n\t\t\t'moon',\n\t\t\t'sun',\n\t\t\t'cloud',\n\t\t\t'direction',\n\t\t\t'brush',\n\t\t\t'pen',\n\t\t\t'zoom_in',\n\t\t\t'zoom_out',\n\t\t\t'pin',\n\t\t\t'albums',\n\t\t\t'rotation_lock',\n\t\t\t'flash',\n\t\t\t'google_maps',\n\t\t\t'anchor',\n\t\t\t'conversation',\n\t\t\t'chat',\n\t\t\t'male',\n\t\t\t'female',\n\t\t\t'asterisk',\n\t\t\t'divide',\n\t\t\t'snorkel_diving',\n\t\t\t'scuba_diving',\n\t\t\t'oxygen_bottle',\n\t\t\t'fins',\n\t\t\t'fishes',\n\t\t\t'boat',\n\t\t\t'delete',\n\t\t\t'sheriffs_star',\n\t\t\t'qrcode',\n\t\t\t'barcode',\n\t\t\t'pool',\n\t\t\t'buoy',\n\t\t\t'spade',\n\t\t\t'bank',\n\t\t\t'vcard',\n\t\t\t'electrical_plug',\n\t\t\t'flag',\n\t\t\t'credit_card',\n\t\t\t'keyboard-wireless',\n\t\t\t'keyboard-wired',\n\t\t\t'shield',\n\t\t\t'ring',\n\t\t\t'cake',\n\t\t\t'drink',\n\t\t\t'beer',\n\t\t\t'fast_food',\n\t\t\t'cutlery',\n\t\t\t'pizza',\n\t\t\t'birthday_cake',\n\t\t\t'tablet',\n\t\t\t'settings',\n\t\t\t'bullets',\n\t\t\t'cardio',\n\t\t\t't-shirt',\n\t\t\t'pants',\n\t\t\t'sweater',\n\t\t\t'fabric',\n\t\t\t'leather',\n\t\t\t'scissors',\n\t\t\t'bomb',\n\t\t\t'skull',\n\t\t\t'celebration',\n\t\t\t'tea_kettle',\n\t\t\t'french_press',\n\t\t\t'coffe_cup',\n\t\t\t'pot',\n\t\t\t'grater',\n\t\t\t'kettle',\n\t\t\t'hospital',\n\t\t\t'hospital_h',\n\t\t\t'microphone',\n\t\t\t'webcam',\n\t\t\t'temple_christianity_church',\n\t\t\t'temple_islam',\n\t\t\t'temple_hindu',\n\t\t\t'temple_buddhist',\n\t\t\t'bicycle',\n\t\t\t'life_preserver',\n\t\t\t'share_alt',\n\t\t\t'comments',\n\t\t\t'flower',\n\t\t\t'baseball',\n\t\t\t'rugby',\n\t\t\t'ax',\n\t\t\t'table_tennis',\n\t\t\t'bowling',\n\t\t\t'tree_conifer',\n\t\t\t'tree_deciduous',\n\t\t\t'more_items',\n\t\t\t'sort',\n\t\t\t'filter',\n\t\t\t'gamepad',\n\t\t\t'playing_dices',\n\t\t\t'calculator',\n\t\t\t'tie',\n\t\t\t'wallet',\n\t\t\t'piano',\n\t\t\t'sampler',\n\t\t\t'podium',\n\t\t\t'soccer_ball',\n\t\t\t'blog',\n\t\t\t'dashboard',\n\t\t\t'certificate',\n\t\t\t'bell',\n\t\t\t'candle',\n\t\t\t'pushpin',\n\t\t\t'iphone_shake',\n\t\t\t'pin_flag',\n\t\t\t'turtle',\n\t\t\t'rabbit',\n\t\t\t'globe',\n\t\t\t'briefcase',\n\t\t\t'hdd',\n\t\t\t'thumbs_up',\n\t\t\t'thumbs_down',\n\t\t\t'hand_right',\n\t\t\t'hand_left',\n\t\t\t'hand_up',\n\t\t\t'hand_down',\n\t\t\t'fullscreen',\n\t\t\t'shopping_bag',\n\t\t\t'book_open',\n\t\t\t'nameplate',\n\t\t\t'nameplate_alt',\n\t\t\t'vases',\n\t\t\t'bullhorn',\n\t\t\t'dumbbell',\n\t\t\t'suitcase',\n\t\t\t'file_import',\n\t\t\t'file_export',\n\t\t\t'bug',\n\t\t\t'crown',\n\t\t\t'smoking',\n\t\t\t'cloud-upload',\n\t\t\t'cloud-download',\n\t\t\t'restart',\n\t\t\t'security_camera',\n\t\t\t'expand',\n\t\t\t'collapse',\n\t\t\t'collapse_top',\n\t\t\t'globe_af',\n\t\t\t'global',\n\t\t\t'spray',\n\t\t\t'nails',\n\t\t\t'claw_hammer',\n\t\t\t'classic_hammer',\n\t\t\t'hand_saw',\n\t\t\t'riflescope',\n\t\t\t'electrical_socket_eu',\n\t\t\t'electrical_socket_us',\n\t\t\t'pinterest',\n\t\t\t'dropbox',\n\t\t\t'google_plus',\n\t\t\t'jolicloud',\n\t\t\t'yahoo',\n\t\t\t'blogger',\n\t\t\t'picasa',\n\t\t\t'amazon',\n\t\t\t'tumblr',\n\t\t\t'wordpress',\n\t\t\t'instapaper',\n\t\t\t'evernote',\n\t\t\t'xing',\n\t\t\t'zootool',\n\t\t\t'dribbble',\n\t\t\t'deviantart',\n\t\t\t'read_it_later',\n\t\t\t'linked_in',\n\t\t\t'forrst',\n\t\t\t'pinboard',\n\t\t\t'behance',\n\t\t\t'github',\n\t\t\t'youtube',\n\t\t\t'skitch',\n\t\t\t'foursquare',\n\t\t\t'quora',\n\t\t\t'badoo',\n\t\t\t'spotify',\n\t\t\t'stumbleupon',\n\t\t\t'readability',\n\t\t\t'facebook',\n\t\t\t'twitter',\n\t\t\t'instagram',\n\t\t\t'posterous_spaces',\n\t\t\t'vimeo',\n\t\t\t'flickr',\n\t\t\t'last_fm',\n\t\t\t'rss',\n\t\t\t'skype',\n\t\t\t'e-mail',\n\t\t);\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t\t@font-face { font-family: 'Glyphicons'; src: url('<?php echo $this->plugin_url ?>/font/glyphicons-regular.eot'); src: url('<?php echo $this->plugin_url ?>/font/glyphicons-regular.eot?#iefix') format('embedded-opentype'), url('<?php echo $this->plugin_url ?>/font/glyphicons-regular.woff') format('woff'), url('<?php echo $this->plugin_url ?>/font/glyphicons-regular.ttf') format('truetype'), url('<?php echo $this->plugin_url ?>/font/glyphicons-regular.svg#glyphicons_halflingsregular') format('svg'); font-weight: normal; font-style: normal; }\n\t\t\t#glyphicons_icons dt:before { font-family: Glyphicons !important; -webkit-font-smoothing: antialiased; *margin-right: .3em; }\n\t\t\t<?php foreach ( $icons as $icon ) : ?>\n\t\t\t.glyphicons-icon-<?php echo $icon ?>:before { content: '<?php echo $this->get_glyphicons_icon( $icon ) ?>'; }\n\t\t\t<?php endforeach ?>\n\t\t</style>\n\t\t<h2 style=\"clear:both\">Glyphicons Library</h2>\n\t\t<div id=\"glyphicons_icons\">\n\t\t\t<?php foreach ( $icons as $icon ) : ?>\n\t\t\t\t<dl><dt class=\"glyphicons-icon-<?php echo $icon ?>\"></dt><dd><?php echo $icon ?></dd></dl>\n\t\t\t<?php endforeach ?>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "dc7731e70bfea1eb550bcda87b745149", "score": "0.5717288", "text": "function add_favicon() {\n\techo '<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"'.get_template_directory_uri().'/favicon.ico\" />';\n}", "title": "" }, { "docid": "002158f131c007eeba7a2e1137bb7f78", "score": "0.5711724", "text": "function avia_sc_icon_box_add_icons()\n\t{\n\t\t$files = avia_backend_load_scripts_by_folder( AVIA_BASE.\"images/icons/iconbox\" );\n\t\t$filestring = \"\";\n\t\tforeach($files as $file) { $filestring .= ',\"'.$file.'\"'; }\n\t\t$filestring = substr($filestring, 1);\n\t\n\t\techo \"\\n <script type='text/javascript'>\\n /* <![CDATA[ */ \\n\";\n\t\techo \"avia_framework_globals['iconbox_icons'] = [\\n \\t \".$filestring.\"\\n \\t]; \\n /* ]]> */ \\n \";\n\t\techo \"</script>\\n \\n \";\n\t}", "title": "" }, { "docid": "c3fa0033608a0eaa6718bc0c5e61cc34", "score": "0.5710274", "text": "function mytheme_favicon() { ?> <link rel=\"shortcut icon\" href=\"<?php echo bloginfo('stylesheet_directory') ?>/images/favicon.png\" > <?php }", "title": "" }, { "docid": "814bfb6cc5e68d49dba501d3306bbded", "score": "0.57028043", "text": "public function hupaStarterAdminFavicon(): void {\n echo '<link rel=\"Shortcut Icon\" type=\"image/x-icon\" href=\"' . THEME_ADMIN_URL . 'assets/images/favicon/favicon.ico\" />';\n }", "title": "" }, { "docid": "6ae942da6ab4703d1b21e3fbebaddf7d", "score": "0.56765497", "text": "public function setFontAwesomeIcon(string $icon)\n {\n $this->faIcon = $icon;\n\n return $this;\n }", "title": "" }, { "docid": "8bdfd0017d9f846d4f33aee5c99e6f5b", "score": "0.5673497", "text": "function add_menu_icons_styles(){\n?>\n\n<style>\n#adminmenu .menu-icon-project div.wp-menu-image:before {\n content: '\\f498';\n}\n</style>\n\n<?php\n}", "title": "" }, { "docid": "e2b5f039b09402080c9e6f2f1571c3c0", "score": "0.5673397", "text": "function theme_setup_styles() {\nwp_enqueue_style('google-fonts-lato', '//fonts.googleapis.com/css?family=Lato:300,400,700,900&display=swap');\nwp_enqueue_style('google-fonts-pacifico', '//fonts.googleapis.com/css2?family=Pacifico&display=swap');\nwp_enqueue_style('google-fonts-baloo-tammudu-2', '//fonts.googleapis.com/css2?family=Baloo+Tammudu+2:wght@400;800&display=swap');\nwp_enqueue_style('google-fonts-nunito', '//fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap');\nwp_enqueue_script(\"fontawesome\", 'https://kit.fontawesome.com/0c707c1c12.js');\n\n}", "title": "" }, { "docid": "0aa51d6fe3f6aac5a5f189fb4def5b28", "score": "0.5667521", "text": "public function icon() {\n\n\t\t?>\n\t\t<style type=\"text/css\">@font-face{font-family: 'archie';src:url('<?php echo plugins_url( '/assets/fonts/archie.eot?velzrt', OMAPI_FILE ); ?>');src:url('<?php echo plugins_url( '/assets/fonts/archie.eot?#iefixvelzrt', OMAPI_FILE ); ?>') format('embedded-opentype'),url('<?php echo plugins_url( '/assets/fonts/archie.woff?velzrt', OMAPI_FILE ); ?>') format('woff'),url('<?php echo plugins_url( '/assets/fonts/archie.ttf?velzrt', OMAPI_FILE ); ?>') format('truetype'),url('<?php echo plugins_url( '/assets/fonts/archie.svg?velzrt#archie', OMAPI_FILE ); ?>') format('svg');font-weight: normal;font-style: normal;}#toplevel_page_optin-monster-api-settings .dashicons-before,#toplevel_page_optin-monster-api-settings .dashicons-before:before,#toplevel_page_optin-monster-api-welcome .dashicons-before,#toplevel_page_optin-monster-api-welcome .dashicons-before:before{font-family: 'archie';speak: none;font-style: normal;font-weight: normal;font-variant: normal;text-transform: none;line-height: 1;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}#toplevel_page_optin-monster-api-settings .dashicons-before:before,#toplevel_page_optin-monster-api-welcome .dashicons-before:before{content: \"\\e600\";font-size: 38px;margin-top: -9px;margin-left: -8px;}</style>\n\t\t<?php\n\n\t}", "title": "" }, { "docid": "fec96169da2a3c5be97e98f2183918f0", "score": "0.5657165", "text": "function childtheme_include_svg_icons() {\n\t// Define SVG sprite file.\n\t$custom_svg_icons = get_theme_file_path( '/assets/images/mrc-svg-icons.svg' );\n\tif ( file_exists( $custom_svg_icons ) ) {\n\t\trequire_once( $custom_svg_icons );\n\t}\n}", "title": "" }, { "docid": "0bdcab070b19aca72241b36b0b5f94bd", "score": "0.56567144", "text": "function dwqa_add_guide_menu_icons_styles(){\n\techo '<style type=\"text/css\">#adminmenu .menu-icon-dwqa-question div.wp-menu-image:before {content: \"\\f223\";}</style>';\n}", "title": "" }, { "docid": "9285799b0e4194296d5331b5f77d8f6a", "score": "0.5631617", "text": "public function add_icon() {\n\t\treturn dirname( __DIR__, 2 ) . '/assets/icon.svg';\n\t}", "title": "" }, { "docid": "4e46a701eb60c030e82790362190c74f", "score": "0.5621908", "text": "function sc_sg_li_fa($attr=array(), $content=null){\n\textract(shortcode_atts(array(\n\t\t'icon' => '',\n\t\t'icon_class' => '',\n\t\t'class' => ''\n\t), $attr));\n\n\t$param_icon = '';\n\tif($icon){\n\t\t$icon = 'fa-'.$icon;\n\t\t$param_icon = ' <i class=\"'.trim(\"fa fa-li $icon $icon_class\").'\"></i>';\n\t}\n\n\t$param_class = trim(\"$class\");\n\tif($param_class){\n\t\t$param_class = ' class=\"'.$param_class.'\"';\n\t}\n\t\n\t$output = '<li'.$param_class.'>'.$param_icon.do_shortcode($content).'</li>';\n\n\treturn $output;\n}", "title": "" }, { "docid": "d1113f1acc40219059b7d2373928e2f3", "score": "0.56076115", "text": "function awesome_theme_setup(){\n \tadd_theme_support('menus');\n \n \t//custom menu below\n \tregister_nav_menu('primary', 'Primary Header Navigation');\n \tregister_nav_menu('secondary', 'Footer navigation');\n }", "title": "" }, { "docid": "6ab6a06eaf5a19af1466132dbacbf83c", "score": "0.55888486", "text": "public function fontIcon($icon, array $options = [], array $attributes = []) {\n\t\t$defaults = [\n\t\t\t'namespace' => $this->_config['iconNamespace'],\n\t\t];\n\t\t$options += $defaults;\n\t\t$icon = (array)$icon;\n\t\t$class = [$options['namespace']];\n\t\tforeach ($icon as $i) {\n\t\t\t$class[] = $options['namespace'] . '-' . $i;\n\t\t}\n\t\tif (!empty($options['extra'])) {\n\t\t\tforeach ($options['extra'] as $i) {\n\t\t\t\t$class[] = $options['namespace'] . '-' . $i;\n\t\t\t}\n\t\t}\n\t\tif (!empty($options['size'])) {\n\t\t\t$class[] = $options['namespace'] . '-' . ($options['size'] === 'large' ? 'large' : $options['size'] . 'x');\n\t\t}\n\t\tif (!empty($options['pull'])) {\n\t\t\t$class[] = 'pull-' . $options['pull'];\n\t\t}\n\t\tif (!empty($options['rotate'])) {\n\t\t\t$class[] = $options['namespace'] . '-rotate-' . (int)$options['rotate'];\n\t\t}\n\t\tif (!empty($options['spin'])) {\n\t\t\t$class[] = $options['namespace'] . '-spin';\n\t\t}\n\n\t\treturn '<i class=\"' . implode(' ', $class) . '\"></i>';\n\t}", "title": "" }, { "docid": "4d27bd20c70a64f0c80bc8a4782456ea", "score": "0.5587335", "text": "public function qtype_recordrtc_get_fontawesome_icon_map() {\n return [\n 'atto_recordrtc:i/audiortc' => 'fa-microphone',\n 'atto_recordrtc:i/videortc' => 'fa-video-camera',\n ];\n }", "title": "" }, { "docid": "b5afcf74fca71c8cd9a1a6d2b322b39a", "score": "0.5579122", "text": "function mst_custom_scripts() {\n\n wp_enqueue_script( 'fontawesome','https://kit.fontawesome.com/9f7a4566fb.js', array('jquery') );\n\n $google_fonts = 'https://fonts.googleapis.com/css2?family=Lato:wght@400;900&amp;family=Roboto:wght@400;700&display=swap';\n wp_register_style( 'google-fonts', $google_fonts, '', THEME_VERSION );\n wp_enqueue_style( 'google-fonts' );\n\n wp_enqueue_style( 'styles', get_template_directory_uri().'/style.css', '', THEME_VERSION );\n\n}", "title": "" }, { "docid": "518124147e91f8dc4254ce3e3dbae49d", "score": "0.55767024", "text": "function digiboost_filter_add_my_icon_pack ( $default_packs ) {\n\t\t\treturn array(\n//\t\t\t\t'digiboost_icons' => array(\n//\t\t\t\t\t'name' => 'digiboost_icons', // same as key\n//\t\t\t\t\t'title' => esc_html__( 'Digiboost Flat Icons', 'digiboost' ),\n//\t\t\t\t\t'css_class_prefix' => 'flaticon',\n//\t\t\t\t\t'css_file' => DIGIBOOST_THEME_PATH . '/css/flaticon.css',\n//\t\t\t\t\t'css_file_uri' => DIGIBOOST_THEME_URI . '/css/flaticon.css',\n//\t\t\t\t),\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "d34123c18afd2743447f120fd4983a84", "score": "0.55747193", "text": "function smauryatheme_register_style(){\n $version=wp_get_theme()->get('version');\n wp_enqueue_style('custome',get_template_directory_uri().'/assets/css/main.css',array()\n,$version,'all');\nwp_enqueue_style('custome-style',get_template_directory_uri().'/style.css',array('custome')\n,$version,'all');\nwp_enqueue_style('icon-css','https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');\n}", "title": "" }, { "docid": "c5c6bf0cd1a905062981880ca9e5a13e", "score": "0.55716574", "text": "function themify_fontello_config_setup( $config ) {\n\t$config['panel']['settings']['tab']['custom-icon-font'] = array(\n\t\t'title' => __( 'Custom Icon Font', 'themify' ),\n\t\t'id' => 'custom-icon-font',\n\t\t'custom-module' => array(\n\t\t\tarray(\n\t\t\t\t'title' => __( 'Custom Icon Font', 'themify' ),\n\t\t\t\t'function' => 'themify_fontello_input_callback',\n\t\t\t),\n\t\t)\n\t);\n\treturn $config;\n}", "title": "" }, { "docid": "1192da000e537ab743bfc8042f5b0fb2", "score": "0.5569793", "text": "function modify_icons( $controls_registry ) {\n\t\t// Get existing icons\n\t\t$icons = $controls_registry->get_control( 'icon' )->get_settings( 'options' );\n\t\t// Append new icons\n\t\t$new_icons = array_merge(\n\t\t\tkleo_icons_array( 'icon-' ),\n\t\t\t$icons\n\t\t);\n\t\t// Then we set a new list of icons as the options of the icon control\n\t\t$controls_registry->get_control( 'icon' )->set_settings( 'options', $new_icons );\n\t}", "title": "" }, { "docid": "6965867d61f33a812966a35f6e27c0e8", "score": "0.55692244", "text": "function icon($icon, $options = array()) {\n\n\t// If item is empty return null\n\tif(!$icon) return;\n\n\t// $out is where we store the markup we are creating in this function\n\t$out = '';\n\n // Cleanup icon\n\t$icon = sanitizer()->removeWhitespace($icon);\n\n\t// Default Options\n\t$defaults = array(\n\t\t'class' => \"feather-icon $icon\",\n\t\t'width' => '24',\n\t\t'height' => '24',\n\t\t'stroke' => 'currentColor',\n\t\t'stroke_width' => 2,\n\t\t'fill' => 'none'\n\t);\n\t// Merge Options\n\t$options = _mergeOptions($defaults, $options);\n\n\t$out .= \"<i data-feather='$icon'\n\t\t\t\tclass='$options[class]'\n\t\t\t\twidth='$options[width]'\n\t\t\t\theight='$options[height]'\n\t\t\t\tstroke='$options[stroke]'\n\t\t\t\tstroke-width='$options[stroke_width]'\n\t\t\t\tfill='$options[fill]'>\n\t\t\t</i>\\n\";\n\treturn $out;\n}", "title": "" }, { "docid": "760a8b3f44c30155ab934be54cf194aa", "score": "0.5557088", "text": "protected function iconHelp()\n {\n return 'For more icons please see <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">http://fontawesome.io/icons/</a>';\n }", "title": "" }, { "docid": "760a8b3f44c30155ab934be54cf194aa", "score": "0.5557088", "text": "protected function iconHelp()\n {\n return 'For more icons please see <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">http://fontawesome.io/icons/</a>';\n }", "title": "" }, { "docid": "13c41ccfc2e8f20e65db83e2c63a8ccd", "score": "0.55428404", "text": "function icon($code) {\n $icon = \"<span class=\\\"fa fa-\".$code.\"\\\"></span>\";\n return $icon;\n }", "title": "" }, { "docid": "6a28d9acee31fafe6efab1813f35e82e", "score": "0.55363494", "text": "function wordpress_theme_scripts(){\n\n // Styles\n wp_enqueue_style('wordpress-theme-style', WORDPRESS_THEME_URI . '/public/css/app.css', array(), wp_get_theme()->get('Version'), 'all');\n wp_enqueue_style('fontawesome', \"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css\", array(), '5.15.3', 'all');\n\n //Scritps\n wp_enqueue_script('wordpress-theme-script', WORDPRESS_THEME_URI . '/public/js/app.js', array(), wp_get_theme()->get('Version'), true);\n\n}", "title": "" }, { "docid": "bde0ed8b1ac28abd8de422ca6c0326d7", "score": "0.5535585", "text": "function initialize_general_icon_settings() {\n\n\t$theme_obj = wp_get_theme();\n\t$theme_name = $theme_obj->get( 'Name' );\n\t\t\n\tif( false == get_option( 'general_icon_settings' ) ) {\t\n\t\tadd_option( 'general_icon_settings', apply_filters( 'default_general_icon_settings', default_general_icon_settings() ) );\n\t}\n\tadd_settings_section(\n\t\t'general_icon_settings_section',\n\t\t__( 'General Icon Settings', $theme_name ),\n\t\t'general_icon_settings_callback',\n\t\t'general_icon_settings'\t\n\t);\n\t\n\tadd_settings_field(\t\n\t\t'frontend_icons',\n\t\t__( 'Disable Front End Icons', $theme_name ),\n\t\t'frontend_icons_callback',\n\t\t'general_icon_settings',\n\t\t'general_icon_settings_section',\n\t\tarray(\n\t\t\t__( 'Disable Font Awesome icons on the front end of your site.', $theme_name ),\n\t\t)\n\t);\n\t\n\tadd_settings_field(\t\n\t\t'the_nav_icons',\n\t\t__( 'Disable Nav Menu Icons', $theme_name ),\n\t\t'the_nav_icons_callback',\n\t\t'general_icon_settings',\n\t\t'general_icon_settings_section',\n\t\tarray(\n\t\t\t__( 'Disable Font Awesome icons in the nav menu of your site.', $theme_name ),\n\t\t)\n\t);\n\t\n\tadd_settings_field(\t\n\t\t'cdn_fa',\n\t\t__( 'Use Local Icon Styles', $theme_name ),\n\t\t'cdn_fa_callback',\n\t\t'general_icon_settings',\n\t\t'general_icon_settings_section',\n\t\tarray(\n\t\t\t__( 'Enqueue Font Awesome icon styles from your site instead of the CDN.', $theme_name ),\n\t\t)\n\t);\n\t\n\tregister_setting(\n\t\t'general_icon_settings',\n\t\t'general_icon_settings'\n\t);\n}", "title": "" }, { "docid": "5f06f039ea1ddeaa6041fdce250e7d4b", "score": "0.5526947", "text": "function custom_fonts() {\n //GOOGLE FONTS\n wp_enqueue_style( 'custom-google-fonts', 'https://fonts.googleapis.com/css?family=Roboto+Condensed:300,400,700', false );\n //FONT AWESOME\n wp_enqueue_style( 'load-fa', 'https://use.fontawesome.com/releases/v5.1.0/css/all.css', false );\n}", "title": "" }, { "docid": "c6182006a74ccd78a81785491089baa6", "score": "0.55248064", "text": "protected function _icon($iconName, $options = [])\n {\n $this->class[] = 'fa';\n $this->class[] = $iconName;\n\n if (!empty($options['size']))\n {\n $this->getSize($options['size']);\n unset($options['size']);\n }\n\n if (!empty($options['rotate']))\n {\n $this->getRotate($options['rotate']);\n unset($options['rotate']);\n }\n\n if (!empty($options['border']))\n {\n $options['border'] == true ? $this->class[] = 'fa-border' : '';\n unset($options['border']);\n }\n\n if (!empty($options['fw']))\n {\n $options['fw'] == true ? $this->class[] = 'fa-fw' : '';\n unset($options['fw']);\n }\n\n if (!empty($options['quote']))\n {\n $options['quote'] == 'left' ? $this->class[] = 'fa-quote-left' : '';\n $options['quote'] == 'right' ? $this->class[] = 'fa-quote-right' : '';\n unset($options['quote']);\n }\n\n if (!empty($options['pull']))\n {\n $options['pull'] == 'left' ? $this->class[] = 'fa-pull-left' : '';\n $options['pull'] == 'right' ? $this->class[] = 'fa-pull-right' : '';\n unset($options['pull']);\n }\n\n if (!empty($options['animated']))\n {\n $options['animated'] == 'spin' ? $this->class[] = 'fa-spin' : '';\n $options['animated'] == 'pulse' ? $this->class[] = 'fa-pulse' : '';\n unset($options['animated']);\n }\n\n if (!empty($options['space']))\n {\n $space = $this->getSpace($options['space']);\n unset($options['space']);\n } else\n {\n $space = [\n 'before' => '',\n 'after' => ''\n ];\n }\n\n if (!empty($options['class']))\n {\n $classes = explode(' ', $options['class']);\n foreach ($classes as $class)\n {\n $this->class[] = $class;\n }\n unset($options['animated']);\n }\n\n $this->class = array_unique($this->class);\n\n $html = $space['before'] . '<i class=\"' . implode(' ', $this->class) . '\"></i>' . $space['after'];\n $this->class = [];\n return $html;\n }", "title": "" }, { "docid": "2511e188aa27c5bc1cbf4cc2c4d1351a", "score": "0.5523183", "text": "public function get_icon()\n {\n return 'fa fa-users-cog';\n }", "title": "" }, { "docid": "62118d6bb0ca4d07b3cf8d50ed40e2e2", "score": "0.5511194", "text": "public function fa($name, $text = null) {\n return '<i class=\"fa fa-' . $name . '\">' . $text . '</i>';\n }", "title": "" }, { "docid": "702a723015781602c327ddcd43e3bfb7", "score": "0.55109537", "text": "function admin_favicon() {\n\techo '<link rel=\"Shortcut Icon\" type=\"image/x-icon\" href=\"'.get_bloginfo('stylesheet_directory').'/images/favicon.png\" />';\n}", "title": "" }, { "docid": "f15c17b17efb6aaf9c021f50c5d20924", "score": "0.5510392", "text": "function my_added_social_icons($kkoptions) {\n\tglobal $themename, $shortname;\n\t\n\t$open_social_new_tab = array( \"name\" =>esc_html__( \"Open Social URLs in New Tab\", $themename ),\n \"id\" => $shortname . \"_show_in_newtab\",\n \"type\" => \"checkbox\",\n \"std\" => \"off\",\n \"desc\" =>esc_html__( \"Set to ON to have social URLs open in new tab. \", $themename ) );\n\t\t\t\t \n\t$replace_array_newtab = array ( $open_social_new_tab );\n\t\n\t$show_instagram_icon = array( \"name\" =>esc_html__( \"Show Instagram Icon\", $themename ),\n \"id\" => $shortname . \"_show_instagram_icon\",\n \"type\" => \"checkbox2\",\n \"std\" => \"on\",\n \"desc\" =>esc_html__( \"Here you can choose to display the Instagram Icon on your header or footer. \", $themename ) );\n\t$show_pinterest_icon = array( \"name\" =>esc_html__( \"Show Pinterest Icon\", $themename ),\n \"id\" => $shortname . \"_show_pinterest_icon\",\n \"type\" => \"checkbox2\",\n \"std\" => \"on\",\n \"desc\" =>esc_html__( \"Here you can choose to display the Pinterest Icon on your header or footer. \", $themename ) );\n\t$show_tumblr_icon = array( \"name\" =>esc_html__( \"Show Tumblr Icon\", $themename ),\n \"id\" => $shortname . \"_show_tumblr_icon\",\n \"type\" => \"checkbox2\",\n \"std\" => \"on\",\n \"desc\" =>esc_html__( \"Here you can choose to display the Tumblr Icon on your header or footer. \", $themename ) );\n\t$show_dribbble_icon = array( \"name\" =>esc_html__( \"Show Dribbble Icon\", $themename ),\n \"id\" => $shortname . \"_show_dribbble_icon\",\n \"type\" => \"checkbox2\",\n \"std\" => \"on\",\n \"desc\" =>esc_html__( \"Here you can choose to display the Dribbble Icon on your header or footer. \", $themename ) );\n\t$show_vimeo_icon = array( \"name\" =>esc_html__( \"Show Vimeo Icon\", $themename ),\n \"id\" => $shortname . \"_show_vimeo_icon\",\n \"type\" => \"checkbox2\",\n \"std\" => \"on\",\n \"desc\" =>esc_html__( \"Here you can choose to display the Vimeo Icon on your header or footer. \", $themename ) );\n\t$show_linkedin_icon = array( \"name\" =>esc_html__( \"Show LinkedIn Icon\", $themename ),\n \"id\" => $shortname . \"_show_linkedin_icon\",\n \"type\" => \"checkbox2\",\n \"std\" => \"on\",\n \"desc\" =>esc_html__( \"Here you can choose to display the LinkedIn Icon on your header or footer. \", $themename ) );\n\t$show_myspace_icon = array( \"name\" =>esc_html__( \"Show MySpace Icon\", $themename ),\n \"id\" => $shortname . \"_show_myspace_icon\",\n \"type\" => \"checkbox2\",\n \"std\" => \"on\",\n \"desc\" =>esc_html__( \"Here you can choose to display the MySpace Icon on your header or footer. \", $themename ) );\n\t$show_skype_icon = array( \"name\" =>esc_html__( \"Show Skype Icon\", $themename ),\n \"id\" => $shortname . \"_show_skype_icon\",\n \"type\" => \"checkbox2\",\n \"std\" => \"on\",\n \"desc\" =>esc_html__( \"Here you can choose to display the Skype Icon on your header or footer. \", $themename ) );\n\t$show_youtube_icon = array( \"name\" =>esc_html__( \"Show Youtube Icon\", $themename ),\n \"id\" => $shortname . \"_show_youtube_icon\",\n \"type\" => \"checkbox2\",\n \"std\" => \"on\",\n \"desc\" =>esc_html__( \"Here you can choose to display the Youtube Icon on your header or footer. \", $themename ) );\n\t$show_flickr_icon = array( \"name\" =>esc_html__( \"Show Flickr Icon\", $themename ),\n \"id\" => $shortname . \"_show_flickr_icon\",\n \"type\" => \"checkbox2\",\n \"std\" => \"on\",\n \"desc\" =>esc_html__( \"Here you can choose to display the Flickr Icon on your header or footer. \", $themename ) );\n\t\t\t\t \n\t$repl_array_opt = array( $show_instagram_icon,\n\t\t\t\t\t\t\t$show_pinterest_icon,\n\t\t\t\t\t\t\t$show_tumblr_icon,\n\t\t\t\t\t\t\t$show_dribbble_icon,\n\t\t\t\t\t\t\t$show_vimeo_icon,\n\t\t\t\t\t\t\t$show_linkedin_icon,\n\t\t\t\t\t\t\t$show_myspace_icon,\n\t\t\t\t\t\t\t$show_skype_icon,\n\t\t\t\t\t\t\t$show_youtube_icon,\n\t\t\t\t\t\t\t$show_flickr_icon,\n\t\t\t\t\t\t\t);\n\t\n\t$show_instagram_url =array( \"name\" =>esc_html__( \"Instagram Profile Url\", $themename ),\n \"id\" => $shortname . \"_instagram_url\",\n \"std\" => \"#\",\n \"type\" => \"text\",\n \"validation_type\" => \"url\",\n\t\t\t\t \"desc\" =>esc_html__( \"Enter the URL of your Instagram Profile. \", $themename ) );\n\t$show_pinterest_url =array( \"name\" =>esc_html__( \"Pinterest Profile Url\", $themename ),\n \"id\" => $shortname . \"_pinterest_url\",\n \"std\" => \"#\",\n \"type\" => \"text\",\n \"validation_type\" => \"url\",\n\t\t\t\t \"desc\" =>esc_html__( \"Enter the URL of your Pinterest Profile. \", $themename ) );\n\t$show_tumblr_url =array( \"name\" =>esc_html__( \"Tumblr Profile Url\", $themename ),\n \"id\" => $shortname . \"_tumblr_url\",\n \"std\" => \"#\",\n \"type\" => \"text\",\n \"validation_type\" => \"url\",\n\t\t\t\t \"desc\" =>esc_html__( \"Enter the URL of your Tumblr Profile. \", $themename ) );\n\t$show_dribble_url =array( \"name\" =>esc_html__( \"Dribbble Profile Url\", $themename ),\n \"id\" => $shortname . \"_dribble_url\",\n \"std\" => \"#\",\n \"type\" => \"text\",\n \"validation_type\" => \"url\",\n\t\t\t\t \"desc\" =>esc_html__( \"Enter the URL of your Dribbble Profile. \", $themename ) );\n\t$show_vimeo_url =array( \"name\" =>esc_html__( \"Vimeo Profile Url\", $themename ),\n \"id\" => $shortname . \"_vimeo_url\",\n \"std\" => \"#\",\n \"type\" => \"text\",\n \"validation_type\" => \"url\",\n\t\t\t\t \"desc\" =>esc_html__( \"Enter the URL of your Vimeo Profile. \", $themename ) );\n\t$show_linkedin_url =array( \"name\" =>esc_html__( \"LinkedIn Profile Url\", $themename ),\n \"id\" => $shortname . \"_linkedin_url\",\n \"std\" => \"#\",\n \"type\" => \"text\",\n \"validation_type\" => \"url\",\n\t\t\t\t \"desc\" =>esc_html__( \"Enter the URL of your LinkedIn Profile. \", $themename ) );\n\t$show_myspace_url =array( \"name\" =>esc_html__( \"MySpace Profile Url\", $themename ),\n \"id\" => $shortname . \"_mysapce_url\",\n \"std\" => \"#\",\n \"type\" => \"text\",\n \"validation_type\" => \"url\",\n\t\t\t\t \"desc\" =>esc_html__( \"Enter the URL of your MySpace Profile. \", $themename ) );\n\t$show_skype_url =array( \"name\" =>esc_html__( \"Skype Profile Url\", $themename ),\n \"id\" => $shortname . \"_skype_url\",\n \"std\" => \"#\",\n \"type\" => \"text\",\n \"validation_type\" => \"url\",\n\t\t\t\t \"desc\" =>esc_html__( \"Enter the URL of your Skype Profile. \", $themename ) );\n\t$show_youtube_url =array( \"name\" =>esc_html__( \"Youtube Profile Url\", $themename ),\n \"id\" => $shortname . \"_youtube_url\",\n \"std\" => \"#\",\n \"type\" => \"text\",\n \"validation_type\" => \"url\",\n\t\t\t\t \"desc\" =>esc_html__( \"Enter the URL of your Youtube Profile. \", $themename ) );\n\t$show_flickr_url =array( \"name\" =>esc_html__( \"Flickr Profile Url\", $themename ),\n \"id\" => $shortname . \"_flickr_url\",\n \"std\" => \"#\",\n \"type\" => \"text\",\n \"validation_type\" => \"url\",\n\t\t\t\t \"desc\" =>esc_html__( \"Enter the URL of your Flickr Profile. \", $themename ) );\n\t\t\t\t \n\t$repl_array_url = array( $show_instagram_url,\n\t\t\t\t\t\t\t$show_pinterest_url,\n\t\t\t\t\t\t\t$show_tumblr_url,\n\t\t\t\t\t\t\t$show_dribble_url,\n\t\t\t\t\t\t\t$show_vimeo_url,\n\t\t\t\t\t\t\t$show_linkedin_url,\n\t\t\t\t\t\t\t$show_myspace_url,\n\t\t\t\t\t\t\t$show_skype_url,\n\t\t\t\t\t\t\t$show_youtube_url,\n\t\t\t\t\t\t\t$show_flickr_url,\n\t\t\t\t\t\t\t);\n\n\n\t$srch_key = array_column($kkoptions, 'id');\n\t\n\t$key = array_search('divi_show_facebook_icon', $srch_key);\n\tarray_splice($kkoptions, $key + 6, 0, $replace_array_newtab);\n\t\n\t$key = array_search('divi_show_google_icon', $srch_key);\n\tarray_splice($kkoptions, $key + 8, 0, $repl_array_opt);\n\n\t$key = array_search('divi_rss_url', $srch_key);\n\tarray_splice($kkoptions, $key + 17, 0, $repl_array_url);\n\t\n\t//print_r($kkoptions);\n\n\treturn $kkoptions;\n}", "title": "" }, { "docid": "d6a1762ca6f18447c51b6175637efb8f", "score": "0.5509531", "text": "function bubulla_action_theme_admin_fonts() {\n\n\twp_enqueue_style( 'bubulla-theme-admin-font', bubulla_font_url(), array(), '1.0' );\n}", "title": "" }, { "docid": "81284e99c754b74653a54a764785bcdc", "score": "0.5508109", "text": "public function icon() {\n\t\t$icon = 'fa-file-o';\n\n\t\tif (strpos($this->mime_type, 'image/') !== FALSE)\n\t\t\t$icon = 'fa-file-image-o';\n\n\t\tif (strpos($this->mime_type, 'text/') !== FALSE)\n\t\t\t$icon = 'fa-file-text-o';\n\n\t\tif (strpos($this->mime_type, 'word') !== FALSE)\n\t\t\t$icon = 'fa-file-word-o';\n\n\t\tif (strpos($this->mime_type, 'sheet') !== FALSE)\n\t\t\t$icon = 'fa-file-excel-o';\n\n\t\tif (strpos($this->mime_type, 'powerpoint') !== FALSE)\n\t\t\t$icon = 'fa-file-powerpoint-o';\n\n\t\tif (strpos($this->mime_type, 'pdf') !== FALSE)\n\t\t\t$icon = 'fa-file-pdf-o';\n\n\t\tif (strpos($this->mime_type, 'zip') !== FALSE)\n\t\t\t$icon = 'fa-file-zip-o';\n\n\t\treturn $icon . ' fa-file';\n\t}", "title": "" }, { "docid": "2c0a3a2fd85e7395d23173e6ff845632", "score": "0.5502586", "text": "function initialize_menu_icon_settings() {\n\t$options = get_option('general_icon_settings');\n\tif ( !isset( $options['frontend_icons'] ) || $options['frontend_icons'] == 0 ) {\n\t\tif ( !isset( $options['the_nav_icons'] ) || $options['the_nav_icons'] == 0 ) {\n\t\t\t$theme_obj = wp_get_theme();\n\t\t\t$theme_name = $theme_obj->get( 'Name' );\n\t\t\tif ( false == get_option( 'menu_icon_settings' ) ) {\t\n\t\t\t\tadd_option( 'menu_icon_settings', apply_filters( 'default_menu_icon_settings', default_menu_icon_settings() ) );\n\t\t\t}\n\t\t\t\n\t\t\t$nav_menus = get_registered_nav_menus();\n\t\t\tif ( $nav_menus ) {\n\t\t\t\tforeach ( $nav_menus as $menu => $name ) {\n\t\t\t\t\t$nav_menu_locations = get_nav_menu_locations();\n\t\t\t\t\tif ( $nav_menu_locations ) {\n\t\t\t\t\t\t$menu_id = $nav_menu_locations[ $menu ]; \n\t\t\t\t\t\t$items = wp_get_nav_menu_items( $menu_id );\n\t\t\t\t\t\tif ( $items ) {\n\t\t\t\t\t\t\t add_settings_section(\n\t\t\t\t\t\t\t\t $menu . '_section',\n\t\t\t\t\t\t\t\t __( $name, $theme_name ),\n\t\t\t\t\t\t\t\t 'menu_icon_settings_callback',\n\t\t\t\t\t\t\t\t 'menu_icon_settings'\n\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t foreach ( (array) $items as $key => $i ) {\n\t\t\t\t\t\t\t\t if ( isset( $i->title ) && isset( $i->ID ) ) {\n\t\t\t\t\t\t\t\t\t $before_field = array(\n\t\t\t\t\t\t\t\t\t\t 'id' => 'icn-menu-item-' . $i->ID,\n\t\t\t\t\t\t\t\t\t\t 'name' => 'icn-menu-item-' . $i->ID,\n\t\t\t\t\t\t\t\t\t\t 'desc' => 'Add icon before ' . $i->title,\n\t\t\t\t\t\t\t\t\t\t 'std' => '',\n\t\t\t\t\t\t\t\t\t\t 'label_for' => '(Before) ' . $i->title,\n\t\t\t\t\t\t\t\t\t\t 'class' => ''\n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t $after_field = array(\n\t\t\t\t\t\t\t\t\t\t 'id' => 'icn-after-menu-item-' . $i->ID,\n\t\t\t\t\t\t\t\t\t\t 'name' => 'icn-after-menu-item-' . $i->ID,\n\t\t\t\t\t\t\t\t\t\t 'desc' => 'Add icon after ' . $i->title,\n\t\t\t\t\t\t\t\t\t\t 'std' => '',\n\t\t\t\t\t\t\t\t\t\t 'label_for' => $i->title . ' (After)',\n\t\t\t\t\t\t\t\t\t\t 'class' => ''\n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t $size_before_field = array(\n\t\t\t\t\t\t\t\t\t\t 'id' => 'size-icn-menu-item-' . $i->ID,\n\t\t\t\t\t\t\t\t\t\t 'name' => 'size-icn-menu-item-' . $i->ID,\n\t\t\t\t\t\t\t\t\t\t 'desc' => 'Adjust size of icon before ' . $i->title,\n\t\t\t\t\t\t\t\t\t\t 'std' => '',\n\t\t\t\t\t\t\t\t\t\t 'label_for' => '(Before) ' . $i->title . ' Size',\n\t\t\t\t\t\t\t\t\t\t 'class' => ''\n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t $size_after_field = array(\n\t\t\t\t\t\t\t\t\t\t 'id' => 'size-icn-after-menu-item-' . $i->ID,\n\t\t\t\t\t\t\t\t\t\t 'name' => 'size-icn-after-menu-item-' . $i->ID,\n\t\t\t\t\t\t\t\t\t\t 'desc' => 'Adjust size of icon after ' . $i->title,\n\t\t\t\t\t\t\t\t\t\t 'std' => '',\n\t\t\t\t\t\t\t\t\t\t 'label_for' => $i->title . ' (After) Size',\n\t\t\t\t\t\t\t\t\t\t 'class' => ''\n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t add_settings_field( \n\t\t\t\t\t\t\t\t\t\t $i->ID, \n\t\t\t\t\t\t\t\t\t\t '(Before) ' . $i->title, \n\t\t\t\t\t\t\t\t\t\t 'menu_icons_callback', \n\t\t\t\t\t\t\t\t\t\t 'menu_icon_settings', \n\t\t\t\t\t\t\t\t\t\t $menu . '_section', \n\t\t\t\t\t\t\t\t\t\t $before_field \n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t add_settings_field( \n\t\t\t\t\t\t\t\t\t\t $i->ID . '-size', \n\t\t\t\t\t\t\t\t\t\t '(Before) ' . $i->title . ' Size', \n\t\t\t\t\t\t\t\t\t\t 'menu_icons_size_callback', \n\t\t\t\t\t\t\t\t\t\t 'menu_icon_settings', \n\t\t\t\t\t\t\t\t\t\t $menu . '_section', \n\t\t\t\t\t\t\t\t\t\t $size_before_field \n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t add_settings_field( \n\t\t\t\t\t\t\t\t\t $i->ID . '-after', \n\t\t\t\t\t\t\t\t\t $i->title . ' (After)', \n\t\t\t\t\t\t\t\t\t 'menu_icons_callback', \n\t\t\t\t\t\t\t\t\t 'menu_icon_settings', \n\t\t\t\t\t\t\t\t\t $menu . '_section', \n\t\t\t\t\t\t\t\t\t $after_field \n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t add_settings_field( \n\t\t\t\t\t\t\t\t\t\t $i->ID . '-after-size', \n\t\t\t\t\t\t\t\t\t\t $i->title . ' (After) Size', \n\t\t\t\t\t\t\t\t\t\t 'menu_icons_size_callback', \n\t\t\t\t\t\t\t\t\t\t 'menu_icon_settings', \n\t\t\t\t\t\t\t\t\t\t $menu . '_section', \n\t\t\t\t\t\t\t\t\t\t $size_after_field \n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tregister_setting(\n\t\t'menu_icon_settings',\n\t\t'menu_icon_settings',\n\t\t'sanitize_menu_icon_settings'\n\t);\n}", "title": "" }, { "docid": "cbac574d7046117e09d3293a24579868", "score": "0.5497933", "text": "public function get_font_icon() {\n return '';\n }", "title": "" }, { "docid": "cf0d51d3481325e90456f1724ba82435", "score": "0.54956985", "text": "public function add_edit_meetings_icon_to_admin_bar() {\n\t\tif ( ! current_user_can( 'edit_posts' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\twp_add_inline_style( 'admin-bar', '\n\t\t\t#wpadminbar #wp-admin-bar-edit-meetings .ab-icon:before {\n\t\t\t\tcontent: \"\\f145\";\n\t\t\t\ttop: 2px;\n\t\t\t}\n\t\t' );\n\t}", "title": "" }, { "docid": "87d4d6e3acc54056b27b975b2ec90c1a", "score": "0.54917735", "text": "public function nabi_admin_favicon() {\n\t\t\techo sprintf( '<link rel=\"shortcut icon\" href=\"%s\" />',\n\t\t\t\tesc_url( get_template_directory_uri() . '/assets/img/nabi.ico' )\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "6e13e9ec9b9598100d99291f29b05836", "score": "0.54828376", "text": "function load_stylesheets(){\n wp_register_style('stylesheet', get_template_directory_uri() . '/style.min.css',\n array(), false, 'all');\n wp_enqueue_style('stylesheet');\n wp_enqueue_style( 'custom-fa', 'https://use.fontawesome.com/releases/v5.0.6/css/all.css' );\n}", "title": "" }, { "docid": "9432d3617d9b64092a2c239e77fc1f66", "score": "0.5482199", "text": "function twentyseventeen_include_svg_icons() {\n\t// Define SVG sprite file.\n\t$svg_icons = get_parent_theme_file_path( '/assets/images/svg-icons.svg' );\n\n\t// If it exists, include it.\n\tif ( file_exists( $svg_icons ) ) {\n\t\trequire_once( $svg_icons );\n\t}\n}", "title": "" }, { "docid": "2d6abda10a45e02a2af0738f98ff1f4a", "score": "0.5481511", "text": "function davinci_include_svg_icons() {\n\t$svg_icons = get_parent_theme_file_path( '/assets/svg/icons.svg' );\n\n\t// If it exists, include it.\n\tif ( file_exists( $svg_icons ) ) {\n\t\trequire_once( $svg_icons );\n\t}\n}", "title": "" }, { "docid": "afcf00d12c3e9d0e35be39559916d569", "score": "0.54773444", "text": "function awesome_theme_setup(){\n\nadd_theme_support('menus');\nregister_nav_menu( 'primary', 'Primary Header Navigation' );\nregister_nav_menu( 'secondary', 'Footer Navigation' );\n\n}", "title": "" }, { "docid": "8cfe76743cd028a826828a6ee801294e", "score": "0.5468686", "text": "function add_theme_scripts() {\n wp_enqueue_style( 'fontstypekit', 'https://use.typekit.net/XXX.css'); \t \n wp_enqueue_style( 'fontawesome', get_template_directory_uri() . \"/fontawesome.min.css\");\n wp_enqueue_style( 'fontawesome-brands', get_template_directory_uri() . \"/fontawesome-brands.min.css\");\n wp_enqueue_style( 'fontawesome-solid', get_template_directory_uri() . \"/fontawesome-solid.min.css\");\n wp_enqueue_style( 'bootstrap', get_bloginfo('template_url') .'/bootstrap.css'); \n wp_enqueue_style( 'style', get_bloginfo('stylesheet_url') ); \n wp_enqueue_style( 'print', get_template_directory_uri() . '/print.css', array(), '1.1', 'print');\n\n wp_enqueue_script( \"site-jquery\", get_stylesheet_directory_uri().\"/js/plugins.js\", array( 'jquery' ) ); \n wp_enqueue_script( \"site-js\", get_stylesheet_directory_uri().\"/js/site.js\", array( 'site-jquery' ) ); \n}", "title": "" }, { "docid": "7cfb8b0be65729cb877754c9266d6b69", "score": "0.5461886", "text": "public function icon();", "title": "" }, { "docid": "5adc60d44af141f69f2f88376db8f465", "score": "0.54582244", "text": "public function enqueue() {\n\t\tparent::enqueue();\n\n\t\t// Enqueue the script.\n\t\twp_enqueue_script( 'kirki-control-fontawesome', URL::get_from_path( dirname( __DIR__ ) . '/assets/scripts/control.js' ), [ 'jquery', 'customize-base', 'kirki-dynamic-control' ], self::$control_ver, false );\n\n\t\t// Enqueue the style.\n\t\twp_enqueue_style( 'kirki-control-fontawesome-style', URL::get_from_path( dirname( __DIR__ ) . '/assets/styles/style.css' ), [], self::$control_ver );\n\n\t\twp_enqueue_script( 'kirki-fontawesome-font', 'https://use.fontawesome.com/30858dc40a.js', [], '4.0.7', false );\n\n\t\tob_start();\n\t\t$json_path = wp_normalize_path( dirname( __DIR__ ) . '/assets/json/fontawesome.json' );\n\t\tinclude $json_path; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude\n\t\t$font_awesome_json = ob_get_clean();\n\n\t\twp_localize_script( 'kirki-control-fontawesome', 'fontAwesomeJSON', $font_awesome_json );\n\t}", "title": "" }, { "docid": "517b192456cd173e74dabea0d8358f82", "score": "0.54577345", "text": "function boilerpress_social_icons() {\n if ( class_exists( 'Subscribe_And_Connect' ) ) {\n echo '<div class=\"subscribe-and-connect-connect\">';\n subscribe_and_connect_connect();\n echo '</div>';\n }\n }", "title": "" }, { "docid": "d26547e4e9f0592ccf0ad59ca4dabd69", "score": "0.54573715", "text": "protected function iconHelp()\n {\n return '查看更多icon <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">http://fontawesome.io/icons/</a>';\n }", "title": "" }, { "docid": "05538c28d550765c94ca7e51ab74b386", "score": "0.54374176", "text": "function wpo_woocomerce_icon_wishlist( $value='' ){\n \treturn '<i class=\"fa fa-heart-o\"></i><span>'.__('Wishlist','basic').'</span>';\n}", "title": "" }, { "docid": "765bc81c89e2ba974a8ef88c2530806a", "score": "0.543057", "text": "function initialize_admin_icon_settings() {\n\n\t$theme_obj = wp_get_theme();\n\t$theme_name = $theme_obj->get( 'Name' );\n\t\t\n\tif ( false == get_option( 'admin_icon_settings' ) ) {\t\n\t\tadd_option( 'admin_icon_settings', apply_filters( 'default_admin_icon_settings', default_admin_icon_settings() ) );\n\t}\n\t\n\tadd_settings_section(\n\t\t'admin_icon_settings_section',\n\t\t__( 'Admin Menu Icon Settings', $theme_name ),\n\t\t'admin_icon_settings_section_callback',\n\t\t'admin_icon_settings'\n\t);\n\t\n\tglobal $menu;\n\tif ( $menu ) {\n\t\tforeach ( $menu as $m ) {\n\t\t\tif ( isset( $m[5] ) ) {\n\t\t\t\t$crap = array( \"?\", \"=\", \"/\" );\n\t\t\t\t$the_id = str_replace( $crap, \"-\", $m[5] );\n\t\t\t\tif ( isset( $m[0] ) && $m[0] != '' ) {\n\t\t\t\t\t$title = preg_replace( '/\\d/', '', $m[0] ); // removes the count from some menu titles\n\t\t\t\t\t$field_args = array(\n\t\t\t\t\t\t'id' => $the_id.'_icon',\n\t\t\t\t\t\t'name' => $the_id.'_icon',\n\t\t\t\t\t\t'desc' => '',\n\t\t\t\t\t\t'std' => '',\n\t\t\t\t\t\t'label_for' => $title,\n\t\t\t\t\t\t'class' => 'linker'\n\t\t\t\t\t);\n\t\t\t\t\tadd_settings_field( \n\t\t\t\t\t\t$the_id, \n\t\t\t\t\t\t$title, \n\t\t\t\t\t\t'admin_icon_settings_callback', \n\t\t\t\t\t\t'admin_icon_settings', \n\t\t\t\t\t\t'admin_icon_settings_section', \n\t\t\t\t\t\t$field_args \n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tregister_setting(\n\t\t'admin_icon_settings',\n\t\t'admin_icon_settings',\n\t\t'sanitize_admin_icon_settings'\n\t);\n}", "title": "" }, { "docid": "d0f7a7d9ff8b18a387bb60535378f3c6", "score": "0.54248244", "text": "public function run()\n {\n //\n\n $icons = [\n ['name' => 'ad', 'set' => 'fas', 'free' => true,],\n ['name' => 'address-book', 'set' => 'fas', 'free' => true,],\n ['name' => 'address-card', 'set' => 'fas', 'free' => true,],\n ['name' => 'adjust', 'set' => 'fas', 'free' => true,],\n ['name' => 'air-freshener', 'set' => 'fas', 'free' => true,],\n ['name' => 'align-center', 'set' => 'fas', 'free' => true,],\n ['name' => 'align-justify', 'set' => 'fas', 'free' => true,],\n ['name' => 'align-left', 'set' => 'fas', 'free' => true,],\n ['name' => 'align-right', 'set' => 'fas', 'free' => true,],\n ['name' => 'allergies', 'set' => 'fas', 'free' => true,],\n ['name' => 'ambulance', 'set' => 'fas', 'free' => true,],\n ['name' => 'american-sign-language-interpreting', 'set' => 'fas', 'free' => true,],\n ['name' => 'anchor', 'set' => 'fas', 'free' => true,],\n ['name' => 'angle-double-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'angle-double-left', 'set' => 'fas', 'free' => true,],\n ['name' => 'angle-double-right', 'set' => 'fas', 'free' => true,],\n ['name' => 'angle-double-up', 'set' => 'fas', 'free' => true,],\n ['name' => 'angle-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'angle-left', 'set' => 'fas', 'free' => true,],\n ['name' => 'angle-right', 'set' => 'fas', 'free' => true,],\n ['name' => 'angle-up', 'set' => 'fas', 'free' => true,],\n ['name' => 'angry', 'set' => 'fas', 'free' => true,],\n ['name' => 'ankh', 'set' => 'fas', 'free' => true,],\n ['name' => 'apple-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'archive', 'set' => 'fas', 'free' => true,],\n ['name' => 'archway', 'set' => 'fas', 'free' => true,],\n ['name' => 'arrow-alt-circle-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'arrow-alt-circle-left', 'set' => 'fas', 'free' => true,],\n ['name' => 'arrow-alt-circle-right', 'set' => 'fas', 'free' => true,],\n ['name' => 'arrow-alt-circle-up', 'set' => 'fas', 'free' => true,],\n ['name' => 'arrow-circle-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'arrow-circle-left', 'set' => 'fas', 'free' => true,],\n ['name' => 'arrow-circle-right', 'set' => 'fas', 'free' => true,],\n ['name' => 'arrow-circle-up', 'set' => 'fas', 'free' => true,],\n ['name' => 'arrow-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'arrow-left', 'set' => 'fas', 'free' => true,],\n ['name' => 'arrow-right', 'set' => 'fas', 'free' => true,],\n ['name' => 'arrow-up', 'set' => 'fas', 'free' => true,],\n ['name' => 'arrows-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'arrows-alt-h', 'set' => 'fas', 'free' => true,],\n ['name' => 'arrows-alt-v', 'set' => 'fas', 'free' => true,],\n ['name' => 'assistive-listening-systems', 'set' => 'fas', 'free' => true,],\n ['name' => 'asterisk', 'set' => 'fas', 'free' => true,],\n ['name' => 'at', 'set' => 'fas', 'free' => true,],\n ['name' => 'atlas', 'set' => 'fas', 'free' => true,],\n ['name' => 'atom', 'set' => 'fas', 'free' => true,],\n ['name' => 'audio-description', 'set' => 'fas', 'free' => true,],\n ['name' => 'award', 'set' => 'fas', 'free' => true,],\n ['name' => 'baby', 'set' => 'fas', 'free' => true,],\n ['name' => 'baby-carriage', 'set' => 'fas', 'free' => true,],\n ['name' => 'backspace', 'set' => 'fas', 'free' => true,],\n ['name' => 'backward', 'set' => 'fas', 'free' => true,],\n ['name' => 'bacon', 'set' => 'fas', 'free' => true,],\n ['name' => 'bacteria', 'set' => 'fas', 'free' => true,],\n ['name' => 'bacterium', 'set' => 'fas', 'free' => true,],\n ['name' => 'bahai', 'set' => 'fas', 'free' => true,],\n ['name' => 'balance-scale', 'set' => 'fas', 'free' => true,],\n ['name' => 'balance-scale-left', 'set' => 'fas', 'free' => true,],\n ['name' => 'balance-scale-right', 'set' => 'fas', 'free' => true,],\n ['name' => 'ban', 'set' => 'fas', 'free' => true,],\n ['name' => 'band-aid', 'set' => 'fas', 'free' => true,],\n ['name' => 'barcode', 'set' => 'fas', 'free' => true,],\n ['name' => 'bars', 'set' => 'fas', 'free' => true,],\n ['name' => 'baseball-ball', 'set' => 'fas', 'free' => true,],\n ['name' => 'basketball-ball', 'set' => 'fas', 'free' => true,],\n ['name' => 'bath', 'set' => 'fas', 'free' => true,],\n ['name' => 'battery-empty', 'set' => 'fas', 'free' => true,],\n ['name' => 'battery-full', 'set' => 'fas', 'free' => true,],\n ['name' => 'battery-half', 'set' => 'fas', 'free' => true,],\n ['name' => 'battery-quarter', 'set' => 'fas', 'free' => true,],\n ['name' => 'battery-three-quarters', 'set' => 'fas', 'free' => true,],\n ['name' => 'bed', 'set' => 'fas', 'free' => true,],\n ['name' => 'beer', 'set' => 'fas', 'free' => true,],\n ['name' => 'bell', 'set' => 'fas', 'free' => true,],\n ['name' => 'bell-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'bezier-curve', 'set' => 'fas', 'free' => true,],\n ['name' => 'bible', 'set' => 'fas', 'free' => true,],\n ['name' => 'bicycle', 'set' => 'fas', 'free' => true,],\n ['name' => 'biking', 'set' => 'fas', 'free' => true,],\n ['name' => 'binoculars', 'set' => 'fas', 'free' => true,],\n ['name' => 'biohazard', 'set' => 'fas', 'free' => true,],\n ['name' => 'birthday-cake', 'set' => 'fas', 'free' => true,],\n ['name' => 'blender', 'set' => 'fas', 'free' => true,],\n ['name' => 'blender-phone', 'set' => 'fas', 'free' => true,],\n ['name' => 'blind', 'set' => 'fas', 'free' => true,],\n ['name' => 'blog', 'set' => 'fas', 'free' => true,],\n ['name' => 'bold', 'set' => 'fas', 'free' => true,],\n ['name' => 'bolt', 'set' => 'fas', 'free' => true,],\n ['name' => 'bomb', 'set' => 'fas', 'free' => true,],\n ['name' => 'bone', 'set' => 'fas', 'free' => true,],\n ['name' => 'bong', 'set' => 'fas', 'free' => true,],\n ['name' => 'book', 'set' => 'fas', 'free' => true,],\n ['name' => 'book-dead', 'set' => 'fas', 'free' => true,],\n ['name' => 'book-medical', 'set' => 'fas', 'free' => true,],\n ['name' => 'book-open', 'set' => 'fas', 'free' => true,],\n ['name' => 'book-reader', 'set' => 'fas', 'free' => true,],\n ['name' => 'bookmark', 'set' => 'fas', 'free' => true,],\n ['name' => 'border-all', 'set' => 'fas', 'free' => true,],\n ['name' => 'border-none', 'set' => 'fas', 'free' => true,],\n ['name' => 'border-style', 'set' => 'fas', 'free' => true,],\n ['name' => 'bowling-ball', 'set' => 'fas', 'free' => true,],\n ['name' => 'box', 'set' => 'fas', 'free' => true,],\n ['name' => 'box-open', 'set' => 'fas', 'free' => true,],\n ['name' => 'box-tissue', 'set' => 'fas', 'free' => true,],\n ['name' => 'boxes', 'set' => 'fas', 'free' => true,],\n ['name' => 'braille', 'set' => 'fas', 'free' => true,],\n ['name' => 'brain', 'set' => 'fas', 'free' => true,],\n ['name' => 'bread-slice', 'set' => 'fas', 'free' => true,],\n ['name' => 'briefcase', 'set' => 'fas', 'free' => true,],\n ['name' => 'briefcase-medical', 'set' => 'fas', 'free' => true,],\n ['name' => 'broadcast-tower', 'set' => 'fas', 'free' => true,],\n ['name' => 'broom', 'set' => 'fas', 'free' => true,],\n ['name' => 'brush', 'set' => 'fas', 'free' => true,],\n ['name' => 'bug', 'set' => 'fas', 'free' => true,],\n ['name' => 'building', 'set' => 'fas', 'free' => true,],\n ['name' => 'bullhorn', 'set' => 'fas', 'free' => true,],\n ['name' => 'bullseye', 'set' => 'fas', 'free' => true,],\n ['name' => 'burn', 'set' => 'fas', 'free' => true,],\n ['name' => 'bus', 'set' => 'fas', 'free' => true,],\n ['name' => 'bus-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'business-time', 'set' => 'fas', 'free' => true,],\n ['name' => 'calculator', 'set' => 'fas', 'free' => true,],\n ['name' => 'calendar', 'set' => 'fas', 'free' => true,],\n ['name' => 'calendar-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'calendar-check', 'set' => 'fas', 'free' => true,],\n ['name' => 'calendar-day', 'set' => 'fas', 'free' => true,],\n ['name' => 'calendar-minus', 'set' => 'fas', 'free' => true,],\n ['name' => 'calendar-plus', 'set' => 'fas', 'free' => true,],\n ['name' => 'calendar-times', 'set' => 'fas', 'free' => true,],\n ['name' => 'calendar-week', 'set' => 'fas', 'free' => true,],\n ['name' => 'camera', 'set' => 'fas', 'free' => true,],\n ['name' => 'camera-retro', 'set' => 'fas', 'free' => true,],\n ['name' => 'campground', 'set' => 'fas', 'free' => true,],\n ['name' => 'candy-cane', 'set' => 'fas', 'free' => true,],\n ['name' => 'cannabis', 'set' => 'fas', 'free' => true,],\n ['name' => 'capsules', 'set' => 'fas', 'free' => true,],\n ['name' => 'car', 'set' => 'fas', 'free' => true,],\n ['name' => 'car-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'car-battery', 'set' => 'fas', 'free' => true,],\n ['name' => 'car-crash', 'set' => 'fas', 'free' => true,],\n ['name' => 'car-side', 'set' => 'fas', 'free' => true,],\n ['name' => 'caravan', 'set' => 'fas', 'free' => true,],\n ['name' => 'caret-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'caret-left', 'set' => 'fas', 'free' => true,],\n ['name' => 'caret-right', 'set' => 'fas', 'free' => true,],\n ['name' => 'caret-square-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'caret-square-left', 'set' => 'fas', 'free' => true,],\n ['name' => 'caret-square-right', 'set' => 'fas', 'free' => true,],\n ['name' => 'caret-square-up', 'set' => 'fas', 'free' => true,],\n ['name' => 'caret-up', 'set' => 'fas', 'free' => true,],\n ['name' => 'carrot', 'set' => 'fas', 'free' => true,],\n ['name' => 'cart-arrow-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'cart-plus', 'set' => 'fas', 'free' => true,],\n ['name' => 'cash-register', 'set' => 'fas', 'free' => true,],\n ['name' => 'cat', 'set' => 'fas', 'free' => true,],\n ['name' => 'certificate', 'set' => 'fas', 'free' => true,],\n ['name' => 'chair', 'set' => 'fas', 'free' => true,],\n ['name' => 'chalkboard', 'set' => 'fas', 'free' => true,],\n ['name' => 'chalkboard-teacher', 'set' => 'fas', 'free' => true,],\n ['name' => 'charging-station', 'set' => 'fas', 'free' => true,],\n ['name' => 'chart-area', 'set' => 'fas', 'free' => true,],\n ['name' => 'chart-bar', 'set' => 'fas', 'free' => true,],\n ['name' => 'chart-line', 'set' => 'fas', 'free' => true,],\n ['name' => 'chart-pie', 'set' => 'fas', 'free' => true,],\n ['name' => 'check', 'set' => 'fas', 'free' => true,],\n ['name' => 'check-circle', 'set' => 'fas', 'free' => true,],\n ['name' => 'check-double', 'set' => 'fas', 'free' => true,],\n ['name' => 'check-square', 'set' => 'fas', 'free' => true,],\n ['name' => 'cheese', 'set' => 'fas', 'free' => true,],\n ['name' => 'chess', 'set' => 'fas', 'free' => true,],\n ['name' => 'chess-bishop', 'set' => 'fas', 'free' => true,],\n ['name' => 'chess-board', 'set' => 'fas', 'free' => true,],\n ['name' => 'chess-king', 'set' => 'fas', 'free' => true,],\n ['name' => 'chess-knight', 'set' => 'fas', 'free' => true,],\n ['name' => 'chess-pawn', 'set' => 'fas', 'free' => true,],\n ['name' => 'chess-queen', 'set' => 'fas', 'free' => true,],\n ['name' => 'chess-rook', 'set' => 'fas', 'free' => true,],\n ['name' => 'chevron-circle-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'chevron-circle-left', 'set' => 'fas', 'free' => true,],\n ['name' => 'chevron-circle-right', 'set' => 'fas', 'free' => true,],\n ['name' => 'chevron-circle-up', 'set' => 'fas', 'free' => true,],\n ['name' => 'chevron-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'chevron-left', 'set' => 'fas', 'free' => true,],\n ['name' => 'chevron-right', 'set' => 'fas', 'free' => true,],\n ['name' => 'chevron-up', 'set' => 'fas', 'free' => true,],\n ['name' => 'child', 'set' => 'fas', 'free' => true,],\n ['name' => 'church', 'set' => 'fas', 'free' => true,],\n ['name' => 'circle', 'set' => 'fas', 'free' => true,],\n ['name' => 'circle-notch', 'set' => 'fas', 'free' => true,],\n ['name' => 'city', 'set' => 'fas', 'free' => true,],\n ['name' => 'clinic-medical', 'set' => 'fas', 'free' => true,],\n ['name' => 'clipboard', 'set' => 'fas', 'free' => true,],\n ['name' => 'clipboard-check', 'set' => 'fas', 'free' => true,],\n ['name' => 'clipboard-list', 'set' => 'fas', 'free' => true,],\n ['name' => 'clock', 'set' => 'fas', 'free' => true,],\n ['name' => 'clone', 'set' => 'fas', 'free' => true,],\n ['name' => 'closed-captioning', 'set' => 'fas', 'free' => true,],\n ['name' => 'cloud', 'set' => 'fas', 'free' => true,],\n ['name' => 'cloud-download-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'cloud-meatball', 'set' => 'fas', 'free' => true,],\n ['name' => 'cloud-moon', 'set' => 'fas', 'free' => true,],\n ['name' => 'cloud-moon-rain', 'set' => 'fas', 'free' => true,],\n ['name' => 'cloud-rain', 'set' => 'fas', 'free' => true,],\n ['name' => 'cloud-showers-heavy', 'set' => 'fas', 'free' => true,],\n ['name' => 'cloud-sun', 'set' => 'fas', 'free' => true,],\n ['name' => 'cloud-sun-rain', 'set' => 'fas', 'free' => true,],\n ['name' => 'cloud-upload-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'cocktail', 'set' => 'fas', 'free' => true,],\n ['name' => 'code', 'set' => 'fas', 'free' => true,],\n ['name' => 'code-branch', 'set' => 'fas', 'free' => true,],\n ['name' => 'coffee', 'set' => 'fas', 'free' => true,],\n ['name' => 'cog', 'set' => 'fas', 'free' => true,],\n ['name' => 'cogs', 'set' => 'fas', 'free' => true,],\n ['name' => 'coins', 'set' => 'fas', 'free' => true,],\n ['name' => 'columns', 'set' => 'fas', 'free' => true,],\n ['name' => 'comment', 'set' => 'fas', 'free' => true,],\n ['name' => 'comment-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'comment-dollar', 'set' => 'fas', 'free' => true,],\n ['name' => 'comment-dots', 'set' => 'fas', 'free' => true,],\n ['name' => 'comment-medical', 'set' => 'fas', 'free' => true,],\n ['name' => 'comment-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'comments', 'set' => 'fas', 'free' => true,],\n ['name' => 'comments-dollar', 'set' => 'fas', 'free' => true,],\n ['name' => 'compact-disc', 'set' => 'fas', 'free' => true,],\n ['name' => 'compass', 'set' => 'fas', 'free' => true,],\n ['name' => 'compress', 'set' => 'fas', 'free' => true,],\n ['name' => 'compress-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'compress-arrows-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'concierge-bell', 'set' => 'fas', 'free' => true,],\n ['name' => 'cookie', 'set' => 'fas', 'free' => true,],\n ['name' => 'cookie-bite', 'set' => 'fas', 'free' => true,],\n ['name' => 'copy', 'set' => 'fas', 'free' => true,],\n ['name' => 'copyright', 'set' => 'fas', 'free' => true,],\n ['name' => 'couch', 'set' => 'fas', 'free' => true,],\n ['name' => 'credit-card', 'set' => 'fas', 'free' => true,],\n ['name' => 'crop', 'set' => 'fas', 'free' => true,],\n ['name' => 'crop-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'cross', 'set' => 'fas', 'free' => true,],\n ['name' => 'crosshairs', 'set' => 'fas', 'free' => true,],\n ['name' => 'crow', 'set' => 'fas', 'free' => true,],\n ['name' => 'crown', 'set' => 'fas', 'free' => true,],\n ['name' => 'crutch', 'set' => 'fas', 'free' => true,],\n ['name' => 'cube', 'set' => 'fas', 'free' => true,],\n ['name' => 'cubes', 'set' => 'fas', 'free' => true,],\n ['name' => 'cut', 'set' => 'fas', 'free' => true,],\n ['name' => 'database', 'set' => 'fas', 'free' => true,],\n ['name' => 'deaf', 'set' => 'fas', 'free' => true,],\n ['name' => 'democrat', 'set' => 'fas', 'free' => true,],\n ['name' => 'desktop', 'set' => 'fas', 'free' => true,],\n ['name' => 'dharmachakra', 'set' => 'fas', 'free' => true,],\n ['name' => 'diagnoses', 'set' => 'fas', 'free' => true,],\n ['name' => 'dice', 'set' => 'fas', 'free' => true,],\n ['name' => 'dice-d20', 'set' => 'fas', 'free' => true,],\n ['name' => 'dice-d6', 'set' => 'fas', 'free' => true,],\n ['name' => 'dice-five', 'set' => 'fas', 'free' => true,],\n ['name' => 'dice-four', 'set' => 'fas', 'free' => true,],\n ['name' => 'dice-one', 'set' => 'fas', 'free' => true,],\n ['name' => 'dice-six', 'set' => 'fas', 'free' => true,],\n ['name' => 'dice-three', 'set' => 'fas', 'free' => true,],\n ['name' => 'dice-two', 'set' => 'fas', 'free' => true,],\n ['name' => 'digital-tachograph', 'set' => 'fas', 'free' => true,],\n ['name' => 'directions', 'set' => 'fas', 'free' => true,],\n ['name' => 'disease', 'set' => 'fas', 'free' => true,],\n ['name' => 'divide', 'set' => 'fas', 'free' => true,],\n ['name' => 'dizzy', 'set' => 'fas', 'free' => true,],\n ['name' => 'dna', 'set' => 'fas', 'free' => true,],\n ['name' => 'dog', 'set' => 'fas', 'free' => true,],\n ['name' => 'dollar-sign', 'set' => 'fas', 'free' => true,],\n ['name' => 'dolly', 'set' => 'fas', 'free' => true,],\n ['name' => 'dolly-flatbed', 'set' => 'fas', 'free' => true,],\n ['name' => 'donate', 'set' => 'fas', 'free' => true,],\n ['name' => 'door-closed', 'set' => 'fas', 'free' => true,],\n ['name' => 'door-open', 'set' => 'fas', 'free' => true,],\n ['name' => 'dot-circle', 'set' => 'fas', 'free' => true,],\n ['name' => 'dove', 'set' => 'fas', 'free' => true,],\n ['name' => 'download', 'set' => 'fas', 'free' => true,],\n ['name' => 'drafting-compass', 'set' => 'fas', 'free' => true,],\n ['name' => 'dragon', 'set' => 'fas', 'free' => true,],\n ['name' => 'draw-polygon', 'set' => 'fas', 'free' => true,],\n ['name' => 'drum', 'set' => 'fas', 'free' => true,],\n ['name' => 'drum-steelpan', 'set' => 'fas', 'free' => true,],\n ['name' => 'drumstick-bite', 'set' => 'fas', 'free' => true,],\n ['name' => 'dumbbell', 'set' => 'fas', 'free' => true,],\n ['name' => 'dumpster', 'set' => 'fas', 'free' => true,],\n ['name' => 'dumpster-fire', 'set' => 'fas', 'free' => true,],\n ['name' => 'dungeon', 'set' => 'fas', 'free' => true,],\n ['name' => 'edit', 'set' => 'fas', 'free' => true,],\n ['name' => 'egg', 'set' => 'fas', 'free' => true,],\n ['name' => 'eject', 'set' => 'fas', 'free' => true,],\n ['name' => 'ellipsis-h', 'set' => 'fas', 'free' => true,],\n ['name' => 'ellipsis-v', 'set' => 'fas', 'free' => true,],\n ['name' => 'envelope', 'set' => 'fas', 'free' => true,],\n ['name' => 'envelope-open', 'set' => 'fas', 'free' => true,],\n ['name' => 'envelope-open-text', 'set' => 'fas', 'free' => true,],\n ['name' => 'envelope-square', 'set' => 'fas', 'free' => true,],\n ['name' => 'equals', 'set' => 'fas', 'free' => true,],\n ['name' => 'eraser', 'set' => 'fas', 'free' => true,],\n ['name' => 'ethernet', 'set' => 'fas', 'free' => true,],\n ['name' => 'euro-sign', 'set' => 'fas', 'free' => true,],\n ['name' => 'exchange-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'exclamation', 'set' => 'fas', 'free' => true,],\n ['name' => 'exclamation-circle', 'set' => 'fas', 'free' => true,],\n ['name' => 'exclamation-triangle', 'set' => 'fas', 'free' => true,],\n ['name' => 'expand', 'set' => 'fas', 'free' => true,],\n ['name' => 'expand-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'expand-arrows-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'external-link-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'external-link-square-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'eye', 'set' => 'fas', 'free' => true,],\n ['name' => 'eye-dropper', 'set' => 'fas', 'free' => true,],\n ['name' => 'eye-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'fan', 'set' => 'fas', 'free' => true,],\n ['name' => 'fast-backward', 'set' => 'fas', 'free' => true,],\n ['name' => 'fast-forward', 'set' => 'fas', 'free' => true,],\n ['name' => 'faucet', 'set' => 'fas', 'free' => true,],\n ['name' => 'fax', 'set' => 'fas', 'free' => true,],\n ['name' => 'feather', 'set' => 'fas', 'free' => true,],\n ['name' => 'feather-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'female', 'set' => 'fas', 'free' => true,],\n ['name' => 'fighter-jet', 'set' => 'fas', 'free' => true,],\n ['name' => 'file', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-archive', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-audio', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-code', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-contract', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-csv', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-download', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-excel', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-export', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-image', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-import', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-invoice', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-invoice-dollar', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-medical', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-medical-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-pdf', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-powerpoint', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-prescription', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-signature', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-upload', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-video', 'set' => 'fas', 'free' => true,],\n ['name' => 'file-word', 'set' => 'fas', 'free' => true,],\n ['name' => 'fill', 'set' => 'fas', 'free' => true,],\n ['name' => 'fill-drip', 'set' => 'fas', 'free' => true,],\n ['name' => 'film', 'set' => 'fas', 'free' => true,],\n ['name' => 'filter', 'set' => 'fas', 'free' => true,],\n ['name' => 'fingerprint', 'set' => 'fas', 'free' => true,],\n ['name' => 'fire', 'set' => 'fas', 'free' => true,],\n ['name' => 'fire-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'fire-extinguisher', 'set' => 'fas', 'free' => true,],\n ['name' => 'first-aid', 'set' => 'fas', 'free' => true,],\n ['name' => 'fish', 'set' => 'fas', 'free' => true,],\n ['name' => 'fist-raised', 'set' => 'fas', 'free' => true,],\n ['name' => 'flag', 'set' => 'fas', 'free' => true,],\n ['name' => 'flag-checkered', 'set' => 'fas', 'free' => true,],\n ['name' => 'flag-usa', 'set' => 'fas', 'free' => true,],\n ['name' => 'flask', 'set' => 'fas', 'free' => true,],\n ['name' => 'flushed', 'set' => 'fas', 'free' => true,],\n ['name' => 'folder', 'set' => 'fas', 'free' => true,],\n ['name' => 'folder-minus', 'set' => 'fas', 'free' => true,],\n ['name' => 'folder-open', 'set' => 'fas', 'free' => true,],\n ['name' => 'folder-plus', 'set' => 'fas', 'free' => true,],\n ['name' => 'font', 'set' => 'fas', 'free' => true,],\n ['name' => 'football-ball', 'set' => 'fas', 'free' => true,],\n ['name' => 'forward', 'set' => 'fas', 'free' => true,],\n ['name' => 'frog', 'set' => 'fas', 'free' => true,],\n ['name' => 'frown', 'set' => 'fas', 'free' => true,],\n ['name' => 'frown-open', 'set' => 'fas', 'free' => true,],\n ['name' => 'funnel-dollar', 'set' => 'fas', 'free' => true,],\n ['name' => 'futbol', 'set' => 'fas', 'free' => true,],\n ['name' => 'gamepad', 'set' => 'fas', 'free' => true,],\n ['name' => 'gas-pump', 'set' => 'fas', 'free' => true,],\n ['name' => 'gavel', 'set' => 'fas', 'free' => true,],\n ['name' => 'gem', 'set' => 'fas', 'free' => true,],\n ['name' => 'genderless', 'set' => 'fas', 'free' => true,],\n ['name' => 'ghost', 'set' => 'fas', 'free' => true,],\n ['name' => 'gift', 'set' => 'fas', 'free' => true,],\n ['name' => 'gifts', 'set' => 'fas', 'free' => true,],\n ['name' => 'glass-cheers', 'set' => 'fas', 'free' => true,],\n ['name' => 'glass-martini', 'set' => 'fas', 'free' => true,],\n ['name' => 'glass-martini-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'glass-whiskey', 'set' => 'fas', 'free' => true,],\n ['name' => 'glasses', 'set' => 'fas', 'free' => true,],\n ['name' => 'globe', 'set' => 'fas', 'free' => true,],\n ['name' => 'globe-africa', 'set' => 'fas', 'free' => true,],\n ['name' => 'globe-americas', 'set' => 'fas', 'free' => true,],\n ['name' => 'globe-asia', 'set' => 'fas', 'free' => true,],\n ['name' => 'globe-europe', 'set' => 'fas', 'free' => true,],\n ['name' => 'golf-ball', 'set' => 'fas', 'free' => true,],\n ['name' => 'gopuram', 'set' => 'fas', 'free' => true,],\n ['name' => 'graduation-cap', 'set' => 'fas', 'free' => true,],\n ['name' => 'greater-than', 'set' => 'fas', 'free' => true,],\n ['name' => 'greater-than-equal', 'set' => 'fas', 'free' => true,],\n ['name' => 'grimace', 'set' => 'fas', 'free' => true,],\n ['name' => 'grin', 'set' => 'fas', 'free' => true,],\n ['name' => 'grin-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'grin-beam', 'set' => 'fas', 'free' => true,],\n ['name' => 'grin-beam-sweat', 'set' => 'fas', 'free' => true,],\n ['name' => 'grin-hearts', 'set' => 'fas', 'free' => true,],\n ['name' => 'grin-squint', 'set' => 'fas', 'free' => true,],\n ['name' => 'grin-squint-tears', 'set' => 'fas', 'free' => true,],\n ['name' => 'grin-stars', 'set' => 'fas', 'free' => true,],\n ['name' => 'grin-tears', 'set' => 'fas', 'free' => true,],\n ['name' => 'grin-tongue', 'set' => 'fas', 'free' => true,],\n ['name' => 'grin-tongue-squint', 'set' => 'fas', 'free' => true,],\n ['name' => 'grin-tongue-wink', 'set' => 'fas', 'free' => true,],\n ['name' => 'grin-wink', 'set' => 'fas', 'free' => true,],\n ['name' => 'grip-horizontal', 'set' => 'fas', 'free' => true,],\n ['name' => 'grip-lines', 'set' => 'fas', 'free' => true,],\n ['name' => 'grip-lines-vertical', 'set' => 'fas', 'free' => true,],\n ['name' => 'grip-vertical', 'set' => 'fas', 'free' => true,],\n ['name' => 'guitar', 'set' => 'fas', 'free' => true,],\n ['name' => 'h-square', 'set' => 'fas', 'free' => true,],\n ['name' => 'hamburger', 'set' => 'fas', 'free' => true,],\n ['name' => 'hammer', 'set' => 'fas', 'free' => true,],\n ['name' => 'hamsa', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-holding', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-holding-heart', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-holding-medical', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-holding-usd', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-holding-water', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-lizard', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-middle-finger', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-paper', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-peace', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-point-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-point-left', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-point-right', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-point-up', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-pointer', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-rock', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-scissors', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-sparkles', 'set' => 'fas', 'free' => true,],\n ['name' => 'hand-spock', 'set' => 'fas', 'free' => true,],\n ['name' => 'hands', 'set' => 'fas', 'free' => true,],\n ['name' => 'hands-helping', 'set' => 'fas', 'free' => true,],\n ['name' => 'hands-wash', 'set' => 'fas', 'free' => true,],\n ['name' => 'handshake', 'set' => 'fas', 'free' => true,],\n ['name' => 'handshake-alt-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'handshake-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'hanukiah', 'set' => 'fas', 'free' => true,],\n ['name' => 'hard-hat', 'set' => 'fas', 'free' => true,],\n ['name' => 'hashtag', 'set' => 'fas', 'free' => true,],\n ['name' => 'hat-cowboy', 'set' => 'fas', 'free' => true,],\n ['name' => 'hat-cowboy-side', 'set' => 'fas', 'free' => true,],\n ['name' => 'hat-wizard', 'set' => 'fas', 'free' => true,],\n ['name' => 'hdd', 'set' => 'fas', 'free' => true,],\n ['name' => 'head-side-cough', 'set' => 'fas', 'free' => true,],\n ['name' => 'head-side-cough-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'head-side-mask', 'set' => 'fas', 'free' => true,],\n ['name' => 'head-side-virus', 'set' => 'fas', 'free' => true,],\n ['name' => 'heading', 'set' => 'fas', 'free' => true,],\n ['name' => 'headphones', 'set' => 'fas', 'free' => true,],\n ['name' => 'headphones-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'headset', 'set' => 'fas', 'free' => true,],\n ['name' => 'heart', 'set' => 'fas', 'free' => true,],\n ['name' => 'heart-broken', 'set' => 'fas', 'free' => true,],\n ['name' => 'heartbeat', 'set' => 'fas', 'free' => true,],\n ['name' => 'helicopter', 'set' => 'fas', 'free' => true,],\n ['name' => 'highlighter', 'set' => 'fas', 'free' => true,],\n ['name' => 'hiking', 'set' => 'fas', 'free' => true,],\n ['name' => 'hippo', 'set' => 'fas', 'free' => true,],\n ['name' => 'history', 'set' => 'fas', 'free' => true,],\n ['name' => 'hockey-puck', 'set' => 'fas', 'free' => true,],\n ['name' => 'holly-berry', 'set' => 'fas', 'free' => true,],\n ['name' => 'home', 'set' => 'fas', 'free' => true,],\n ['name' => 'horse', 'set' => 'fas', 'free' => true,],\n ['name' => 'horse-head', 'set' => 'fas', 'free' => true,],\n ['name' => 'hospital', 'set' => 'fas', 'free' => true,],\n ['name' => 'hospital-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'hospital-symbol', 'set' => 'fas', 'free' => true,],\n ['name' => 'hospital-user', 'set' => 'fas', 'free' => true,],\n ['name' => 'hot-tub', 'set' => 'fas', 'free' => true,],\n ['name' => 'hotdog', 'set' => 'fas', 'free' => true,],\n ['name' => 'hotel', 'set' => 'fas', 'free' => true,],\n ['name' => 'hourglass', 'set' => 'fas', 'free' => true,],\n ['name' => 'hourglass-end', 'set' => 'fas', 'free' => true,],\n ['name' => 'hourglass-half', 'set' => 'fas', 'free' => true,],\n ['name' => 'hourglass-start', 'set' => 'fas', 'free' => true,],\n ['name' => 'house-damage', 'set' => 'fas', 'free' => true,],\n ['name' => 'house-user', 'set' => 'fas', 'free' => true,],\n ['name' => 'hryvnia', 'set' => 'fas', 'free' => true,],\n ['name' => 'i-cursor', 'set' => 'fas', 'free' => true,],\n ['name' => 'ice-cream', 'set' => 'fas', 'free' => true,],\n ['name' => 'icicles', 'set' => 'fas', 'free' => true,],\n ['name' => 'icons', 'set' => 'fas', 'free' => true,],\n ['name' => 'id-badge', 'set' => 'fas', 'free' => true,],\n ['name' => 'id-card', 'set' => 'fas', 'free' => true,],\n ['name' => 'id-card-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'igloo', 'set' => 'fas', 'free' => true,],\n ['name' => 'image', 'set' => 'fas', 'free' => true,],\n ['name' => 'images', 'set' => 'fas', 'free' => true,],\n ['name' => 'inbox', 'set' => 'fas', 'free' => true,],\n ['name' => 'indent', 'set' => 'fas', 'free' => true,],\n ['name' => 'industry', 'set' => 'fas', 'free' => true,],\n ['name' => 'infinity', 'set' => 'fas', 'free' => true,],\n ['name' => 'info', 'set' => 'fas', 'free' => true,],\n ['name' => 'info-circle', 'set' => 'fas', 'free' => true,],\n ['name' => 'italic', 'set' => 'fas', 'free' => true,],\n ['name' => 'jedi', 'set' => 'fas', 'free' => true,],\n ['name' => 'joint', 'set' => 'fas', 'free' => true,],\n ['name' => 'journal-whills', 'set' => 'fas', 'free' => true,],\n ['name' => 'kaaba', 'set' => 'fas', 'free' => true,],\n ['name' => 'key', 'set' => 'fas', 'free' => true,],\n ['name' => 'keyboard', 'set' => 'fas', 'free' => true,],\n ['name' => 'khanda', 'set' => 'fas', 'free' => true,],\n ['name' => 'kiss', 'set' => 'fas', 'free' => true,],\n ['name' => 'kiss-beam', 'set' => 'fas', 'free' => true,],\n ['name' => 'kiss-wink-heart', 'set' => 'fas', 'free' => true,],\n ['name' => 'kiwi-bird', 'set' => 'fas', 'free' => true,],\n ['name' => 'landmark', 'set' => 'fas', 'free' => true,],\n ['name' => 'language', 'set' => 'fas', 'free' => true,],\n ['name' => 'laptop', 'set' => 'fas', 'free' => true,],\n ['name' => 'laptop-code', 'set' => 'fas', 'free' => true,],\n ['name' => 'laptop-house', 'set' => 'fas', 'free' => true,],\n ['name' => 'laptop-medical', 'set' => 'fas', 'free' => true,],\n ['name' => 'laugh', 'set' => 'fas', 'free' => true,],\n ['name' => 'laugh-beam', 'set' => 'fas', 'free' => true,],\n ['name' => 'laugh-squint', 'set' => 'fas', 'free' => true,],\n ['name' => 'laugh-wink', 'set' => 'fas', 'free' => true,],\n ['name' => 'layer-group', 'set' => 'fas', 'free' => true,],\n ['name' => 'leaf', 'set' => 'fas', 'free' => true,],\n ['name' => 'lemon', 'set' => 'fas', 'free' => true,],\n ['name' => 'less-than', 'set' => 'fas', 'free' => true,],\n ['name' => 'less-than-equal', 'set' => 'fas', 'free' => true,],\n ['name' => 'level-down-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'level-up-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'life-ring', 'set' => 'fas', 'free' => true,],\n ['name' => 'lightbulb', 'set' => 'fas', 'free' => true,],\n ['name' => 'link', 'set' => 'fas', 'free' => true,],\n ['name' => 'lira-sign', 'set' => 'fas', 'free' => true,],\n ['name' => 'list', 'set' => 'fas', 'free' => true,],\n ['name' => 'list-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'list-ol', 'set' => 'fas', 'free' => true,],\n ['name' => 'list-ul', 'set' => 'fas', 'free' => true,],\n ['name' => 'location-arrow', 'set' => 'fas', 'free' => true,],\n ['name' => 'lock', 'set' => 'fas', 'free' => true,],\n ['name' => 'lock-open', 'set' => 'fas', 'free' => true,],\n ['name' => 'long-arrow-alt-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'long-arrow-alt-left', 'set' => 'fas', 'free' => true,],\n ['name' => 'long-arrow-alt-right', 'set' => 'fas', 'free' => true,],\n ['name' => 'long-arrow-alt-up', 'set' => 'fas', 'free' => true,],\n ['name' => 'low-vision', 'set' => 'fas', 'free' => true,],\n ['name' => 'luggage-cart', 'set' => 'fas', 'free' => true,],\n ['name' => 'lungs', 'set' => 'fas', 'free' => true,],\n ['name' => 'lungs-virus', 'set' => 'fas', 'free' => true,],\n ['name' => 'magic', 'set' => 'fas', 'free' => true,],\n ['name' => 'magnet', 'set' => 'fas', 'free' => true,],\n ['name' => 'mail-bulk', 'set' => 'fas', 'free' => true,],\n ['name' => 'male', 'set' => 'fas', 'free' => true,],\n ['name' => 'map', 'set' => 'fas', 'free' => true,],\n ['name' => 'map-marked', 'set' => 'fas', 'free' => true,],\n ['name' => 'map-marked-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'map-marker', 'set' => 'fas', 'free' => true,],\n ['name' => 'map-marker-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'map-pin', 'set' => 'fas', 'free' => true,],\n ['name' => 'map-signs', 'set' => 'fas', 'free' => true,],\n ['name' => 'marker', 'set' => 'fas', 'free' => true,],\n ['name' => 'mars', 'set' => 'fas', 'free' => true,],\n ['name' => 'mars-double', 'set' => 'fas', 'free' => true,],\n ['name' => 'mars-stroke', 'set' => 'fas', 'free' => true,],\n ['name' => 'mars-stroke-h', 'set' => 'fas', 'free' => true,],\n ['name' => 'mars-stroke-v', 'set' => 'fas', 'free' => true,],\n ['name' => 'mask', 'set' => 'fas', 'free' => true,],\n ['name' => 'medal', 'set' => 'fas', 'free' => true,],\n ['name' => 'medkit', 'set' => 'fas', 'free' => true,],\n ['name' => 'meh', 'set' => 'fas', 'free' => true,],\n ['name' => 'meh-blank', 'set' => 'fas', 'free' => true,],\n ['name' => 'meh-rolling-eyes', 'set' => 'fas', 'free' => true,],\n ['name' => 'memory', 'set' => 'fas', 'free' => true,],\n ['name' => 'menorah', 'set' => 'fas', 'free' => true,],\n ['name' => 'mercury', 'set' => 'fas', 'free' => true,],\n ['name' => 'meteor', 'set' => 'fas', 'free' => true,],\n ['name' => 'microchip', 'set' => 'fas', 'free' => true,],\n ['name' => 'microphone', 'set' => 'fas', 'free' => true,],\n ['name' => 'microphone-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'microphone-alt-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'microphone-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'microscope', 'set' => 'fas', 'free' => true,],\n ['name' => 'minus', 'set' => 'fas', 'free' => true,],\n ['name' => 'minus-circle', 'set' => 'fas', 'free' => true,],\n ['name' => 'minus-square', 'set' => 'fas', 'free' => true,],\n ['name' => 'mitten', 'set' => 'fas', 'free' => true,],\n ['name' => 'mobile', 'set' => 'fas', 'free' => true,],\n ['name' => 'mobile-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'money-bill', 'set' => 'fas', 'free' => true,],\n ['name' => 'money-bill-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'money-bill-wave', 'set' => 'fas', 'free' => true,],\n ['name' => 'money-bill-wave-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'money-check', 'set' => 'fas', 'free' => true,],\n ['name' => 'money-check-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'monument', 'set' => 'fas', 'free' => true,],\n ['name' => 'moon', 'set' => 'fas', 'free' => true,],\n ['name' => 'mortar-pestle', 'set' => 'fas', 'free' => true,],\n ['name' => 'mosque', 'set' => 'fas', 'free' => true,],\n ['name' => 'motorcycle', 'set' => 'fas', 'free' => true,],\n ['name' => 'mountain', 'set' => 'fas', 'free' => true,],\n ['name' => 'mouse', 'set' => 'fas', 'free' => true,],\n ['name' => 'mouse-pointer', 'set' => 'fas', 'free' => true,],\n ['name' => 'mug-hot', 'set' => 'fas', 'free' => true,],\n ['name' => 'music', 'set' => 'fas', 'free' => true,],\n ['name' => 'network-wired', 'set' => 'fas', 'free' => true,],\n ['name' => 'neuter', 'set' => 'fas', 'free' => true,],\n ['name' => 'newspaper', 'set' => 'fas', 'free' => true,],\n ['name' => 'not-equal', 'set' => 'fas', 'free' => true,],\n ['name' => 'notes-medical', 'set' => 'fas', 'free' => true,],\n ['name' => 'object-group', 'set' => 'fas', 'free' => true,],\n ['name' => 'object-ungroup', 'set' => 'fas', 'free' => true,],\n ['name' => 'oil-can', 'set' => 'fas', 'free' => true,],\n ['name' => 'om', 'set' => 'fas', 'free' => true,],\n ['name' => 'otter', 'set' => 'fas', 'free' => true,],\n ['name' => 'outdent', 'set' => 'fas', 'free' => true,],\n ['name' => 'pager', 'set' => 'fas', 'free' => true,],\n ['name' => 'paint-brush', 'set' => 'fas', 'free' => true,],\n ['name' => 'paint-roller', 'set' => 'fas', 'free' => true,],\n ['name' => 'palette', 'set' => 'fas', 'free' => true,],\n ['name' => 'pallet', 'set' => 'fas', 'free' => true,],\n ['name' => 'paper-plane', 'set' => 'fas', 'free' => true,],\n ['name' => 'paperclip', 'set' => 'fas', 'free' => true,],\n ['name' => 'parachute-box', 'set' => 'fas', 'free' => true,],\n ['name' => 'paragraph', 'set' => 'fas', 'free' => true,],\n ['name' => 'parking', 'set' => 'fas', 'free' => true,],\n ['name' => 'passport', 'set' => 'fas', 'free' => true,],\n ['name' => 'pastafarianism', 'set' => 'fas', 'free' => true,],\n ['name' => 'paste', 'set' => 'fas', 'free' => true,],\n ['name' => 'pause', 'set' => 'fas', 'free' => true,],\n ['name' => 'pause-circle', 'set' => 'fas', 'free' => true,],\n ['name' => 'paw', 'set' => 'fas', 'free' => true,],\n ['name' => 'peace', 'set' => 'fas', 'free' => true,],\n ['name' => 'pen', 'set' => 'fas', 'free' => true,],\n ['name' => 'pen-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'pen-fancy', 'set' => 'fas', 'free' => true,],\n ['name' => 'pen-nib', 'set' => 'fas', 'free' => true,],\n ['name' => 'pen-square', 'set' => 'fas', 'free' => true,],\n ['name' => 'pencil-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'pencil-ruler', 'set' => 'fas', 'free' => true,],\n ['name' => 'people-arrows', 'set' => 'fas', 'free' => true,],\n ['name' => 'people-carry', 'set' => 'fas', 'free' => true,],\n ['name' => 'pepper-hot', 'set' => 'fas', 'free' => true,],\n ['name' => 'percent', 'set' => 'fas', 'free' => true,],\n ['name' => 'percentage', 'set' => 'fas', 'free' => true,],\n ['name' => 'person-booth', 'set' => 'fas', 'free' => true,],\n ['name' => 'phone', 'set' => 'fas', 'free' => true,],\n ['name' => 'phone-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'phone-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'phone-square', 'set' => 'fas', 'free' => true,],\n ['name' => 'phone-square-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'phone-volume', 'set' => 'fas', 'free' => true,],\n ['name' => 'photo-video', 'set' => 'fas', 'free' => true,],\n ['name' => 'piggy-bank', 'set' => 'fas', 'free' => true,],\n ['name' => 'pills', 'set' => 'fas', 'free' => true,],\n ['name' => 'pizza-slice', 'set' => 'fas', 'free' => true,],\n ['name' => 'place-of-worship', 'set' => 'fas', 'free' => true,],\n ['name' => 'plane', 'set' => 'fas', 'free' => true,],\n ['name' => 'plane-arrival', 'set' => 'fas', 'free' => true,],\n ['name' => 'plane-departure', 'set' => 'fas', 'free' => true,],\n ['name' => 'plane-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'play', 'set' => 'fas', 'free' => true,],\n ['name' => 'play-circle', 'set' => 'fas', 'free' => true,],\n ['name' => 'plug', 'set' => 'fas', 'free' => true,],\n ['name' => 'plus', 'set' => 'fas', 'free' => true,],\n ['name' => 'plus-circle', 'set' => 'fas', 'free' => true,],\n ['name' => 'plus-square', 'set' => 'fas', 'free' => true,],\n ['name' => 'podcast', 'set' => 'fas', 'free' => true,],\n ['name' => 'poll', 'set' => 'fas', 'free' => true,],\n ['name' => 'poll-h', 'set' => 'fas', 'free' => true,],\n ['name' => 'poo', 'set' => 'fas', 'free' => true,],\n ['name' => 'poo-storm', 'set' => 'fas', 'free' => true,],\n ['name' => 'poop', 'set' => 'fas', 'free' => true,],\n ['name' => 'portrait', 'set' => 'fas', 'free' => true,],\n ['name' => 'pound-sign', 'set' => 'fas', 'free' => true,],\n ['name' => 'power-off', 'set' => 'fas', 'free' => true,],\n ['name' => 'pray', 'set' => 'fas', 'free' => true,],\n ['name' => 'praying-hands', 'set' => 'fas', 'free' => true,],\n ['name' => 'prescription', 'set' => 'fas', 'free' => true,],\n ['name' => 'prescription-bottle', 'set' => 'fas', 'free' => true,],\n ['name' => 'prescription-bottle-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'print', 'set' => 'fas', 'free' => true,],\n ['name' => 'procedures', 'set' => 'fas', 'free' => true,],\n ['name' => 'project-diagram', 'set' => 'fas', 'free' => true,],\n ['name' => 'pump-medical', 'set' => 'fas', 'free' => true,],\n ['name' => 'pump-soap', 'set' => 'fas', 'free' => true,],\n ['name' => 'puzzle-piece', 'set' => 'fas', 'free' => true,],\n ['name' => 'qrcode', 'set' => 'fas', 'free' => true,],\n ['name' => 'question', 'set' => 'fas', 'free' => true,],\n ['name' => 'question-circle', 'set' => 'fas', 'free' => true,],\n ['name' => 'quidditch', 'set' => 'fas', 'free' => true,],\n ['name' => 'quote-left', 'set' => 'fas', 'free' => true,],\n ['name' => 'quote-right', 'set' => 'fas', 'free' => true,],\n ['name' => 'quran', 'set' => 'fas', 'free' => true,],\n ['name' => 'radiation', 'set' => 'fas', 'free' => true,],\n ['name' => 'radiation-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'rainbow', 'set' => 'fas', 'free' => true,],\n ['name' => 'random', 'set' => 'fas', 'free' => true,],\n ['name' => 'receipt', 'set' => 'fas', 'free' => true,],\n ['name' => 'record-vinyl', 'set' => 'fas', 'free' => true,],\n ['name' => 'recycle', 'set' => 'fas', 'free' => true,],\n ['name' => 'redo', 'set' => 'fas', 'free' => true,],\n ['name' => 'redo-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'registered', 'set' => 'fas', 'free' => true,],\n ['name' => 'remove-format', 'set' => 'fas', 'free' => true,],\n ['name' => 'reply', 'set' => 'fas', 'free' => true,],\n ['name' => 'reply-all', 'set' => 'fas', 'free' => true,],\n ['name' => 'republican', 'set' => 'fas', 'free' => true,],\n ['name' => 'restroom', 'set' => 'fas', 'free' => true,],\n ['name' => 'retweet', 'set' => 'fas', 'free' => true,],\n ['name' => 'ribbon', 'set' => 'fas', 'free' => true,],\n ['name' => 'ring', 'set' => 'fas', 'free' => true,],\n ['name' => 'road', 'set' => 'fas', 'free' => true,],\n ['name' => 'robot', 'set' => 'fas', 'free' => true,],\n ['name' => 'rocket', 'set' => 'fas', 'free' => true,],\n ['name' => 'route', 'set' => 'fas', 'free' => true,],\n ['name' => 'rss', 'set' => 'fas', 'free' => true,],\n ['name' => 'rss-square', 'set' => 'fas', 'free' => true,],\n ['name' => 'ruble-sign', 'set' => 'fas', 'free' => true,],\n ['name' => 'ruler', 'set' => 'fas', 'free' => true,],\n ['name' => 'ruler-combined', 'set' => 'fas', 'free' => true,],\n ['name' => 'ruler-horizontal', 'set' => 'fas', 'free' => true,],\n ['name' => 'ruler-vertical', 'set' => 'fas', 'free' => true,],\n ['name' => 'running', 'set' => 'fas', 'free' => true,],\n ['name' => 'rupee-sign', 'set' => 'fas', 'free' => true,],\n ['name' => 'sad-cry', 'set' => 'fas', 'free' => true,],\n ['name' => 'sad-tear', 'set' => 'fas', 'free' => true,],\n ['name' => 'satellite', 'set' => 'fas', 'free' => true,],\n ['name' => 'satellite-dish', 'set' => 'fas', 'free' => true,],\n ['name' => 'save', 'set' => 'fas', 'free' => true,],\n ['name' => 'school', 'set' => 'fas', 'free' => true,],\n ['name' => 'screwdriver', 'set' => 'fas', 'free' => true,],\n ['name' => 'scroll', 'set' => 'fas', 'free' => true,],\n ['name' => 'sd-card', 'set' => 'fas', 'free' => true,],\n ['name' => 'search', 'set' => 'fas', 'free' => true,],\n ['name' => 'search-dollar', 'set' => 'fas', 'free' => true,],\n ['name' => 'search-location', 'set' => 'fas', 'free' => true,],\n ['name' => 'search-minus', 'set' => 'fas', 'free' => true,],\n ['name' => 'search-plus', 'set' => 'fas', 'free' => true,],\n ['name' => 'seedling', 'set' => 'fas', 'free' => true,],\n ['name' => 'server', 'set' => 'fas', 'free' => true,],\n ['name' => 'shapes', 'set' => 'fas', 'free' => true,],\n ['name' => 'share', 'set' => 'fas', 'free' => true,],\n ['name' => 'share-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'share-alt-square', 'set' => 'fas', 'free' => true,],\n ['name' => 'share-square', 'set' => 'fas', 'free' => true,],\n ['name' => 'shekel-sign', 'set' => 'fas', 'free' => true,],\n ['name' => 'shield-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'shield-virus', 'set' => 'fas', 'free' => true,],\n ['name' => 'ship', 'set' => 'fas', 'free' => true,],\n ['name' => 'shipping-fast', 'set' => 'fas', 'free' => true,],\n ['name' => 'shoe-prints', 'set' => 'fas', 'free' => true,],\n ['name' => 'shopping-bag', 'set' => 'fas', 'free' => true,],\n ['name' => 'shopping-basket', 'set' => 'fas', 'free' => true,],\n ['name' => 'shopping-cart', 'set' => 'fas', 'free' => true,],\n ['name' => 'shower', 'set' => 'fas', 'free' => true,],\n ['name' => 'shuttle-van', 'set' => 'fas', 'free' => true,],\n ['name' => 'sign', 'set' => 'fas', 'free' => true,],\n ['name' => 'sign-in-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'sign-language', 'set' => 'fas', 'free' => true,],\n ['name' => 'sign-out-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'signal', 'set' => 'fas', 'free' => true,],\n ['name' => 'signature', 'set' => 'fas', 'free' => true,],\n ['name' => 'sim-card', 'set' => 'fas', 'free' => true,],\n ['name' => 'sink', 'set' => 'fas', 'free' => true,],\n ['name' => 'sitemap', 'set' => 'fas', 'free' => true,],\n ['name' => 'skating', 'set' => 'fas', 'free' => true,],\n ['name' => 'skiing', 'set' => 'fas', 'free' => true,],\n ['name' => 'skiing-nordic', 'set' => 'fas', 'free' => true,],\n ['name' => 'skull', 'set' => 'fas', 'free' => true,],\n ['name' => 'skull-crossbones', 'set' => 'fas', 'free' => true,],\n ['name' => 'slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'sleigh', 'set' => 'fas', 'free' => true,],\n ['name' => 'sliders-h', 'set' => 'fas', 'free' => true,],\n ['name' => 'smile', 'set' => 'fas', 'free' => true,],\n ['name' => 'smile-beam', 'set' => 'fas', 'free' => true,],\n ['name' => 'smile-wink', 'set' => 'fas', 'free' => true,],\n ['name' => 'smog', 'set' => 'fas', 'free' => true,],\n ['name' => 'smoking', 'set' => 'fas', 'free' => true,],\n ['name' => 'smoking-ban', 'set' => 'fas', 'free' => true,],\n ['name' => 'sms', 'set' => 'fas', 'free' => true,],\n ['name' => 'snowboarding', 'set' => 'fas', 'free' => true,],\n ['name' => 'snowflake', 'set' => 'fas', 'free' => true,],\n ['name' => 'snowman', 'set' => 'fas', 'free' => true,],\n ['name' => 'snowplow', 'set' => 'fas', 'free' => true,],\n ['name' => 'soap', 'set' => 'fas', 'free' => true,],\n ['name' => 'socks', 'set' => 'fas', 'free' => true,],\n ['name' => 'solar-panel', 'set' => 'fas', 'free' => true,],\n ['name' => 'sort', 'set' => 'fas', 'free' => true,],\n ['name' => 'sort-alpha-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'sort-alpha-down-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'sort-alpha-up', 'set' => 'fas', 'free' => true,],\n ['name' => 'sort-alpha-up-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'sort-amount-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'sort-amount-down-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'sort-amount-up', 'set' => 'fas', 'free' => true,],\n ['name' => 'sort-amount-up-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'sort-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'sort-numeric-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'sort-numeric-down-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'sort-numeric-up', 'set' => 'fas', 'free' => true,],\n ['name' => 'sort-numeric-up-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'sort-up', 'set' => 'fas', 'free' => true,],\n ['name' => 'spa', 'set' => 'fas', 'free' => true,],\n ['name' => 'space-shuttle', 'set' => 'fas', 'free' => true,],\n ['name' => 'spell-check', 'set' => 'fas', 'free' => true,],\n ['name' => 'spider', 'set' => 'fas', 'free' => true,],\n ['name' => 'spinner', 'set' => 'fas', 'free' => true,],\n ['name' => 'splotch', 'set' => 'fas', 'free' => true,],\n ['name' => 'spray-can', 'set' => 'fas', 'free' => true,],\n ['name' => 'square', 'set' => 'fas', 'free' => true,],\n ['name' => 'square-full', 'set' => 'fas', 'free' => true,],\n ['name' => 'square-root-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'stamp', 'set' => 'fas', 'free' => true,],\n ['name' => 'star', 'set' => 'fas', 'free' => true,],\n ['name' => 'star-and-crescent', 'set' => 'fas', 'free' => true,],\n ['name' => 'star-half', 'set' => 'fas', 'free' => true,],\n ['name' => 'star-half-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'star-of-david', 'set' => 'fas', 'free' => true,],\n ['name' => 'star-of-life', 'set' => 'fas', 'free' => true,],\n ['name' => 'step-backward', 'set' => 'fas', 'free' => true,],\n ['name' => 'step-forward', 'set' => 'fas', 'free' => true,],\n ['name' => 'stethoscope', 'set' => 'fas', 'free' => true,],\n ['name' => 'sticky-note', 'set' => 'fas', 'free' => true,],\n ['name' => 'stop', 'set' => 'fas', 'free' => true,],\n ['name' => 'stop-circle', 'set' => 'fas', 'free' => true,],\n ['name' => 'stopwatch', 'set' => 'fas', 'free' => true,],\n ['name' => 'stopwatch-20', 'set' => 'fas', 'free' => true,],\n ['name' => 'store', 'set' => 'fas', 'free' => true,],\n ['name' => 'store-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'store-alt-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'store-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'stream', 'set' => 'fas', 'free' => true,],\n ['name' => 'street-view', 'set' => 'fas', 'free' => true,],\n ['name' => 'strikethrough', 'set' => 'fas', 'free' => true,],\n ['name' => 'stroopwafel', 'set' => 'fas', 'free' => true,],\n ['name' => 'subscript', 'set' => 'fas', 'free' => true,],\n ['name' => 'subway', 'set' => 'fas', 'free' => true,],\n ['name' => 'suitcase', 'set' => 'fas', 'free' => true,],\n ['name' => 'suitcase-rolling', 'set' => 'fas', 'free' => true,],\n ['name' => 'sun', 'set' => 'fas', 'free' => true,],\n ['name' => 'superscript', 'set' => 'fas', 'free' => true,],\n ['name' => 'surprise', 'set' => 'fas', 'free' => true,],\n ['name' => 'swatchbook', 'set' => 'fas', 'free' => true,],\n ['name' => 'swimmer', 'set' => 'fas', 'free' => true,],\n ['name' => 'swimming-pool', 'set' => 'fas', 'free' => true,],\n ['name' => 'synagogue', 'set' => 'fas', 'free' => true,],\n ['name' => 'sync', 'set' => 'fas', 'free' => true,],\n ['name' => 'sync-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'syringe', 'set' => 'fas', 'free' => true,],\n ['name' => 'table', 'set' => 'fas', 'free' => true,],\n ['name' => 'table-tennis', 'set' => 'fas', 'free' => true,],\n ['name' => 'tablet', 'set' => 'fas', 'free' => true,],\n ['name' => 'tablet-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'tablets', 'set' => 'fas', 'free' => true,],\n ['name' => 'tachometer-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'tag', 'set' => 'fas', 'free' => true,],\n ['name' => 'tags', 'set' => 'fas', 'free' => true,],\n ['name' => 'tape', 'set' => 'fas', 'free' => true,],\n ['name' => 'tasks', 'set' => 'fas', 'free' => true,],\n ['name' => 'taxi', 'set' => 'fas', 'free' => true,],\n ['name' => 'teeth', 'set' => 'fas', 'free' => true,],\n ['name' => 'teeth-open', 'set' => 'fas', 'free' => true,],\n ['name' => 'temperature-high', 'set' => 'fas', 'free' => true,],\n ['name' => 'temperature-low', 'set' => 'fas', 'free' => true,],\n ['name' => 'tenge', 'set' => 'fas', 'free' => true,],\n ['name' => 'terminal', 'set' => 'fas', 'free' => true,],\n ['name' => 'text-height', 'set' => 'fas', 'free' => true,],\n ['name' => 'text-width', 'set' => 'fas', 'free' => true,],\n ['name' => 'th', 'set' => 'fas', 'free' => true,],\n ['name' => 'th-large', 'set' => 'fas', 'free' => true,],\n ['name' => 'th-list', 'set' => 'fas', 'free' => true,],\n ['name' => 'theater-masks', 'set' => 'fas', 'free' => true,],\n ['name' => 'thermometer', 'set' => 'fas', 'free' => true,],\n ['name' => 'thermometer-empty', 'set' => 'fas', 'free' => true,],\n ['name' => 'thermometer-full', 'set' => 'fas', 'free' => true,],\n ['name' => 'thermometer-half', 'set' => 'fas', 'free' => true,],\n ['name' => 'thermometer-quarter', 'set' => 'fas', 'free' => true,],\n ['name' => 'thermometer-three-quarters', 'set' => 'fas', 'free' => true,],\n ['name' => 'thumbs-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'thumbs-up', 'set' => 'fas', 'free' => true,],\n ['name' => 'thumbtack', 'set' => 'fas', 'free' => true,],\n ['name' => 'ticket-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'times', 'set' => 'fas', 'free' => true,],\n ['name' => 'times-circle', 'set' => 'fas', 'free' => true,],\n ['name' => 'tint', 'set' => 'fas', 'free' => true,],\n ['name' => 'tint-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'tired', 'set' => 'fas', 'free' => true,],\n ['name' => 'toggle-off', 'set' => 'fas', 'free' => true,],\n ['name' => 'toggle-on', 'set' => 'fas', 'free' => true,],\n ['name' => 'toilet', 'set' => 'fas', 'free' => true,],\n ['name' => 'toilet-paper', 'set' => 'fas', 'free' => true,],\n ['name' => 'toilet-paper-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'toolbox', 'set' => 'fas', 'free' => true,],\n ['name' => 'tools', 'set' => 'fas', 'free' => true,],\n ['name' => 'tooth', 'set' => 'fas', 'free' => true,],\n ['name' => 'torah', 'set' => 'fas', 'free' => true,],\n ['name' => 'torii-gate', 'set' => 'fas', 'free' => true,],\n ['name' => 'tractor', 'set' => 'fas', 'free' => true,],\n ['name' => 'trademark', 'set' => 'fas', 'free' => true,],\n ['name' => 'traffic-light', 'set' => 'fas', 'free' => true,],\n ['name' => 'trailer', 'set' => 'fas', 'free' => true,],\n ['name' => 'train', 'set' => 'fas', 'free' => true,],\n ['name' => 'tram', 'set' => 'fas', 'free' => true,],\n ['name' => 'transgender', 'set' => 'fas', 'free' => true,],\n ['name' => 'transgender-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'trash', 'set' => 'fas', 'free' => true,],\n ['name' => 'trash-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'trash-restore', 'set' => 'fas', 'free' => true,],\n ['name' => 'trash-restore-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'tree', 'set' => 'fas', 'free' => true,],\n ['name' => 'trophy', 'set' => 'fas', 'free' => true,],\n ['name' => 'truck', 'set' => 'fas', 'free' => true,],\n ['name' => 'truck-loading', 'set' => 'fas', 'free' => true,],\n ['name' => 'truck-monster', 'set' => 'fas', 'free' => true,],\n ['name' => 'truck-moving', 'set' => 'fas', 'free' => true,],\n ['name' => 'truck-pickup', 'set' => 'fas', 'free' => true,],\n ['name' => 'tshirt', 'set' => 'fas', 'free' => true,],\n ['name' => 'tty', 'set' => 'fas', 'free' => true,],\n ['name' => 'tv', 'set' => 'fas', 'free' => true,],\n ['name' => 'umbrella', 'set' => 'fas', 'free' => true,],\n ['name' => 'umbrella-beach', 'set' => 'fas', 'free' => true,],\n ['name' => 'underline', 'set' => 'fas', 'free' => true,],\n ['name' => 'undo', 'set' => 'fas', 'free' => true,],\n ['name' => 'undo-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'universal-access', 'set' => 'fas', 'free' => true,],\n ['name' => 'university', 'set' => 'fas', 'free' => true,],\n ['name' => 'unlink', 'set' => 'fas', 'free' => true,],\n ['name' => 'unlock', 'set' => 'fas', 'free' => true,],\n ['name' => 'unlock-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'upload', 'set' => 'fas', 'free' => true,],\n ['name' => 'user', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-alt-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-astronaut', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-check', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-circle', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-clock', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-cog', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-edit', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-friends', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-graduate', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-injured', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-lock', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-md', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-minus', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-ninja', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-nurse', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-plus', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-secret', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-shield', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-tag', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-tie', 'set' => 'fas', 'free' => true,],\n ['name' => 'user-times', 'set' => 'fas', 'free' => true,],\n ['name' => 'users', 'set' => 'fas', 'free' => true,],\n ['name' => 'users-cog', 'set' => 'fas', 'free' => true,],\n ['name' => 'users-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'utensil-spoon', 'set' => 'fas', 'free' => true,],\n ['name' => 'utensils', 'set' => 'fas', 'free' => true,],\n ['name' => 'vector-square', 'set' => 'fas', 'free' => true,],\n ['name' => 'venus', 'set' => 'fas', 'free' => true,],\n ['name' => 'venus-double', 'set' => 'fas', 'free' => true,],\n ['name' => 'venus-mars', 'set' => 'fas', 'free' => true,],\n ['name' => 'vest', 'set' => 'fas', 'free' => true,],\n ['name' => 'vest-patches', 'set' => 'fas', 'free' => true,],\n ['name' => 'vial', 'set' => 'fas', 'free' => true,],\n ['name' => 'vials', 'set' => 'fas', 'free' => true,],\n ['name' => 'video', 'set' => 'fas', 'free' => true,],\n ['name' => 'video-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'vihara', 'set' => 'fas', 'free' => true,],\n ['name' => 'virus', 'set' => 'fas', 'free' => true,],\n ['name' => 'virus-slash', 'set' => 'fas', 'free' => true,],\n ['name' => 'viruses', 'set' => 'fas', 'free' => true,],\n ['name' => 'voicemail', 'set' => 'fas', 'free' => true,],\n ['name' => 'volleyball-ball', 'set' => 'fas', 'free' => true,],\n ['name' => 'volume-down', 'set' => 'fas', 'free' => true,],\n ['name' => 'volume-mute', 'set' => 'fas', 'free' => true,],\n ['name' => 'volume-off', 'set' => 'fas', 'free' => true,],\n ['name' => 'volume-up', 'set' => 'fas', 'free' => true,],\n ['name' => 'vote-yea', 'set' => 'fas', 'free' => true,],\n ['name' => 'vr-cardboard', 'set' => 'fas', 'free' => true,],\n ['name' => 'walking', 'set' => 'fas', 'free' => true,],\n ['name' => 'wallet', 'set' => 'fas', 'free' => true,],\n ['name' => 'warehouse', 'set' => 'fas', 'free' => true,],\n ['name' => 'water', 'set' => 'fas', 'free' => true,],\n ['name' => 'wave-square', 'set' => 'fas', 'free' => true,],\n ['name' => 'weight', 'set' => 'fas', 'free' => true,],\n ['name' => 'weight-hanging', 'set' => 'fas', 'free' => true,],\n ['name' => 'wheelchair', 'set' => 'fas', 'free' => true,],\n ['name' => 'wifi', 'set' => 'fas', 'free' => true,],\n ['name' => 'wind', 'set' => 'fas', 'free' => true,],\n ['name' => 'window-close', 'set' => 'fas', 'free' => true,],\n ['name' => 'window-maximize', 'set' => 'fas', 'free' => true,],\n ['name' => 'window-minimize', 'set' => 'fas', 'free' => true,],\n ['name' => 'window-restore', 'set' => 'fas', 'free' => true,],\n ['name' => 'wine-bottle', 'set' => 'fas', 'free' => true,],\n ['name' => 'wine-glass', 'set' => 'fas', 'free' => true,],\n ['name' => 'wine-glass-alt', 'set' => 'fas', 'free' => true,],\n ['name' => 'won-sign', 'set' => 'fas', 'free' => true,],\n ['name' => 'wrench', 'set' => 'fas', 'free' => true,],\n ['name' => 'x-ray', 'set' => 'fas', 'free' => true,],\n ['name' => 'yen-sign', 'set' => 'fas', 'free' => true,],\n ['name' => 'yin-yang', 'set' => 'fas', 'free' => true,],\n ['name' => 'address-book', 'set' => 'far', 'free' => true,],\n ['name' => 'address-card', 'set' => 'far', 'free' => true,],\n ['name' => 'angry', 'set' => 'far', 'free' => true,],\n ['name' => 'arrow-alt-circle-down', 'set' => 'far', 'free' => true,],\n ['name' => 'arrow-alt-circle-left', 'set' => 'far', 'free' => true,],\n ['name' => 'arrow-alt-circle-right', 'set' => 'far', 'free' => true,],\n ['name' => 'arrow-alt-circle-up', 'set' => 'far', 'free' => true,],\n ['name' => 'bell', 'set' => 'far', 'free' => true,],\n ['name' => 'bell-slash', 'set' => 'far', 'free' => true,],\n ['name' => 'bookmark', 'set' => 'far', 'free' => true,],\n ['name' => 'building', 'set' => 'far', 'free' => true,],\n ['name' => 'calendar', 'set' => 'far', 'free' => true,],\n ['name' => 'calendar-alt', 'set' => 'far', 'free' => true,],\n ['name' => 'calendar-check', 'set' => 'far', 'free' => true,],\n ['name' => 'calendar-minus', 'set' => 'far', 'free' => true,],\n ['name' => 'calendar-plus', 'set' => 'far', 'free' => true,],\n ['name' => 'calendar-times', 'set' => 'far', 'free' => true,],\n ['name' => 'caret-square-down', 'set' => 'far', 'free' => true,],\n ['name' => 'caret-square-left', 'set' => 'far', 'free' => true,],\n ['name' => 'caret-square-right', 'set' => 'far', 'free' => true,],\n ['name' => 'caret-square-up', 'set' => 'far', 'free' => true,],\n ['name' => 'chart-bar', 'set' => 'far', 'free' => true,],\n ['name' => 'check-circle', 'set' => 'far', 'free' => true,],\n ['name' => 'check-square', 'set' => 'far', 'free' => true,],\n ['name' => 'circle', 'set' => 'far', 'free' => true,],\n ['name' => 'clipboard', 'set' => 'far', 'free' => true,],\n ['name' => 'clock', 'set' => 'far', 'free' => true,],\n ['name' => 'clone', 'set' => 'far', 'free' => true,],\n ['name' => 'closed-captioning', 'set' => 'far', 'free' => true,],\n ['name' => 'comment', 'set' => 'far', 'free' => true,],\n ['name' => 'comment-alt', 'set' => 'far', 'free' => true,],\n ['name' => 'comment-dots', 'set' => 'far', 'free' => true,],\n ['name' => 'comments', 'set' => 'far', 'free' => true,],\n ['name' => 'compass', 'set' => 'far', 'free' => true,],\n ['name' => 'copy', 'set' => 'far', 'free' => true,],\n ['name' => 'copyright', 'set' => 'far', 'free' => true,],\n ['name' => 'credit-card', 'set' => 'far', 'free' => true,],\n ['name' => 'dizzy', 'set' => 'far', 'free' => true,],\n ['name' => 'dot-circle', 'set' => 'far', 'free' => true,],\n ['name' => 'edit', 'set' => 'far', 'free' => true,],\n ['name' => 'envelope', 'set' => 'far', 'free' => true,],\n ['name' => 'envelope-open', 'set' => 'far', 'free' => true,],\n ['name' => 'eye', 'set' => 'far', 'free' => true,],\n ['name' => 'eye-slash', 'set' => 'far', 'free' => true,],\n ['name' => 'file', 'set' => 'far', 'free' => true,],\n ['name' => 'file-alt', 'set' => 'far', 'free' => true,],\n ['name' => 'file-archive', 'set' => 'far', 'free' => true,],\n ['name' => 'file-audio', 'set' => 'far', 'free' => true,],\n ['name' => 'file-code', 'set' => 'far', 'free' => true,],\n ['name' => 'file-excel', 'set' => 'far', 'free' => true,],\n ['name' => 'file-image', 'set' => 'far', 'free' => true,],\n ['name' => 'file-pdf', 'set' => 'far', 'free' => true,],\n ['name' => 'file-powerpoint', 'set' => 'far', 'free' => true,],\n ['name' => 'file-video', 'set' => 'far', 'free' => true,],\n ['name' => 'file-word', 'set' => 'far', 'free' => true,],\n ['name' => 'flag', 'set' => 'far', 'free' => true,],\n ['name' => 'flushed', 'set' => 'far', 'free' => true,],\n ['name' => 'folder', 'set' => 'far', 'free' => true,],\n ['name' => 'folder-open', 'set' => 'far', 'free' => true,],\n ['name' => 'frown', 'set' => 'far', 'free' => true,],\n ['name' => 'frown-open', 'set' => 'far', 'free' => true,],\n ['name' => 'futbol', 'set' => 'far', 'free' => true,],\n ['name' => 'gem', 'set' => 'far', 'free' => true,],\n ['name' => 'grimace', 'set' => 'far', 'free' => true,],\n ['name' => 'grin', 'set' => 'far', 'free' => true,],\n ['name' => 'grin-alt', 'set' => 'far', 'free' => true,],\n ['name' => 'grin-beam', 'set' => 'far', 'free' => true,],\n ['name' => 'grin-beam-sweat', 'set' => 'far', 'free' => true,],\n ['name' => 'grin-hearts', 'set' => 'far', 'free' => true,],\n ['name' => 'grin-squint', 'set' => 'far', 'free' => true,],\n ['name' => 'grin-squint-tears', 'set' => 'far', 'free' => true,],\n ['name' => 'grin-stars', 'set' => 'far', 'free' => true,],\n ['name' => 'grin-tears', 'set' => 'far', 'free' => true,],\n ['name' => 'grin-tongue', 'set' => 'far', 'free' => true,],\n ['name' => 'grin-tongue-squint', 'set' => 'far', 'free' => true,],\n ['name' => 'grin-tongue-wink', 'set' => 'far', 'free' => true,],\n ['name' => 'grin-wink', 'set' => 'far', 'free' => true,],\n ['name' => 'hand-lizard', 'set' => 'far', 'free' => true,],\n ['name' => 'hand-paper', 'set' => 'far', 'free' => true,],\n ['name' => 'hand-peace', 'set' => 'far', 'free' => true,],\n ['name' => 'hand-point-down', 'set' => 'far', 'free' => true,],\n ['name' => 'hand-point-left', 'set' => 'far', 'free' => true,],\n ['name' => 'hand-point-right', 'set' => 'far', 'free' => true,],\n ['name' => 'hand-point-up', 'set' => 'far', 'free' => true,],\n ['name' => 'hand-pointer', 'set' => 'far', 'free' => true,],\n ['name' => 'hand-rock', 'set' => 'far', 'free' => true,],\n ['name' => 'hand-scissors', 'set' => 'far', 'free' => true,],\n ['name' => 'hand-spock', 'set' => 'far', 'free' => true,],\n ['name' => 'handshake', 'set' => 'far', 'free' => true,],\n ['name' => 'hdd', 'set' => 'far', 'free' => true,],\n ['name' => 'heart', 'set' => 'far', 'free' => true,],\n ['name' => 'hospital', 'set' => 'far', 'free' => true,],\n ['name' => 'hourglass', 'set' => 'far', 'free' => true,],\n ['name' => 'id-badge', 'set' => 'far', 'free' => true,],\n ['name' => 'id-card', 'set' => 'far', 'free' => true,],\n ['name' => 'image', 'set' => 'far', 'free' => true,],\n ['name' => 'images', 'set' => 'far', 'free' => true,],\n ['name' => 'keyboard', 'set' => 'far', 'free' => true,],\n ['name' => 'kiss', 'set' => 'far', 'free' => true,],\n ['name' => 'kiss-beam', 'set' => 'far', 'free' => true,],\n ['name' => 'kiss-wink-heart', 'set' => 'far', 'free' => true,],\n ['name' => 'laugh', 'set' => 'far', 'free' => true,],\n ['name' => 'laugh-beam', 'set' => 'far', 'free' => true,],\n ['name' => 'laugh-squint', 'set' => 'far', 'free' => true,],\n ['name' => 'laugh-wink', 'set' => 'far', 'free' => true,],\n ['name' => 'lemon', 'set' => 'far', 'free' => true,],\n ['name' => 'life-ring', 'set' => 'far', 'free' => true,],\n ['name' => 'lightbulb', 'set' => 'far', 'free' => true,],\n ['name' => 'list-alt', 'set' => 'far', 'free' => true,],\n ['name' => 'map', 'set' => 'far', 'free' => true,],\n ['name' => 'meh', 'set' => 'far', 'free' => true,],\n ['name' => 'meh-blank', 'set' => 'far', 'free' => true,],\n ['name' => 'meh-rolling-eyes', 'set' => 'far', 'free' => true,],\n ['name' => 'minus-square', 'set' => 'far', 'free' => true,],\n ['name' => 'money-bill-alt', 'set' => 'far', 'free' => true,],\n ['name' => 'moon', 'set' => 'far', 'free' => true,],\n ['name' => 'newspaper', 'set' => 'far', 'free' => true,],\n ['name' => 'object-group', 'set' => 'far', 'free' => true,],\n ['name' => 'object-ungroup', 'set' => 'far', 'free' => true,],\n ['name' => 'paper-plane', 'set' => 'far', 'free' => true,],\n ['name' => 'pause-circle', 'set' => 'far', 'free' => true,],\n ['name' => 'play-circle', 'set' => 'far', 'free' => true,],\n ['name' => 'plus-square', 'set' => 'far', 'free' => true,],\n ['name' => 'question-circle', 'set' => 'far', 'free' => true,],\n ['name' => 'registered', 'set' => 'far', 'free' => true,],\n ['name' => 'sad-cry', 'set' => 'far', 'free' => true,],\n ['name' => 'sad-tear', 'set' => 'far', 'free' => true,],\n ['name' => 'save', 'set' => 'far', 'free' => true,],\n ['name' => 'share-square', 'set' => 'far', 'free' => true,],\n ['name' => 'smile', 'set' => 'far', 'free' => true,],\n ['name' => 'smile-beam', 'set' => 'far', 'free' => true,],\n ['name' => 'smile-wink', 'set' => 'far', 'free' => true,],\n ['name' => 'snowflake', 'set' => 'far', 'free' => true,],\n ['name' => 'square', 'set' => 'far', 'free' => true,],\n ['name' => 'star', 'set' => 'far', 'free' => true,],\n ['name' => 'star-half', 'set' => 'far', 'free' => true,],\n ['name' => 'sticky-note', 'set' => 'far', 'free' => true,],\n ['name' => 'stop-circle', 'set' => 'far', 'free' => true,],\n ['name' => 'sun', 'set' => 'far', 'free' => true,],\n ['name' => 'surprise', 'set' => 'far', 'free' => true,],\n ['name' => 'thumbs-down', 'set' => 'far', 'free' => true,],\n ['name' => 'thumbs-up', 'set' => 'far', 'free' => true,],\n ['name' => 'times-circle', 'set' => 'far', 'free' => true,],\n ['name' => 'tired', 'set' => 'far', 'free' => true,],\n ['name' => 'trash-alt', 'set' => 'far', 'free' => true,],\n ['name' => 'user', 'set' => 'far', 'free' => true,],\n ['name' => 'user-circle', 'set' => 'far', 'free' => true,],\n ['name' => 'window-close', 'set' => 'far', 'free' => true,],\n ['name' => 'window-maximize', 'set' => 'far', 'free' => true,],\n ['name' => 'window-minimize', 'set' => 'far', 'free' => true,],\n ['name' => 'window-restore', 'set' => 'far', 'free' => true,],\n ['name' => '500px', 'set' => 'fab', 'free' => true,],\n ['name' => 'accessible-icon', 'set' => 'fab', 'free' => true,],\n ['name' => 'accusoft', 'set' => 'fab', 'free' => true,],\n ['name' => 'acquisitions-incorporated', 'set' => 'fab', 'free' => true,],\n ['name' => 'adn', 'set' => 'fab', 'free' => true,],\n ['name' => 'adversal', 'set' => 'fab', 'free' => true,],\n ['name' => 'affiliatetheme', 'set' => 'fab', 'free' => true,],\n ['name' => 'airbnb', 'set' => 'fab', 'free' => true,],\n ['name' => 'algolia', 'set' => 'fab', 'free' => true,],\n ['name' => 'alipay', 'set' => 'fab', 'free' => true,],\n ['name' => 'amazon', 'set' => 'fab', 'free' => true,],\n ['name' => 'amazon-pay', 'set' => 'fab', 'free' => true,],\n ['name' => 'amilia', 'set' => 'fab', 'free' => true,],\n ['name' => 'android', 'set' => 'fab', 'free' => true,],\n ['name' => 'angellist', 'set' => 'fab', 'free' => true,],\n ['name' => 'angrycreative', 'set' => 'fab', 'free' => true,],\n ['name' => 'angular', 'set' => 'fab', 'free' => true,],\n ['name' => 'app-store', 'set' => 'fab', 'free' => true,],\n ['name' => 'app-store-ios', 'set' => 'fab', 'free' => true,],\n ['name' => 'apper', 'set' => 'fab', 'free' => true,],\n ['name' => 'apple', 'set' => 'fab', 'free' => true,],\n ['name' => 'apple-pay', 'set' => 'fab', 'free' => true,],\n ['name' => 'artstation', 'set' => 'fab', 'free' => true,],\n ['name' => 'asymmetrik', 'set' => 'fab', 'free' => true,],\n ['name' => 'atlassian', 'set' => 'fab', 'free' => true,],\n ['name' => 'audible', 'set' => 'fab', 'free' => true,],\n ['name' => 'autoprefixer', 'set' => 'fab', 'free' => true,],\n ['name' => 'avianex', 'set' => 'fab', 'free' => true,],\n ['name' => 'aviato', 'set' => 'fab', 'free' => true,],\n ['name' => 'aws', 'set' => 'fab', 'free' => true,],\n ['name' => 'bandcamp', 'set' => 'fab', 'free' => true,],\n ['name' => 'battle-net', 'set' => 'fab', 'free' => true,],\n ['name' => 'behance', 'set' => 'fab', 'free' => true,],\n ['name' => 'behance-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'bimobject', 'set' => 'fab', 'free' => true,],\n ['name' => 'bitbucket', 'set' => 'fab', 'free' => true,],\n ['name' => 'bitcoin', 'set' => 'fab', 'free' => true,],\n ['name' => 'bity', 'set' => 'fab', 'free' => true,],\n ['name' => 'black-tie', 'set' => 'fab', 'free' => true,],\n ['name' => 'blackberry', 'set' => 'fab', 'free' => true,],\n ['name' => 'blogger', 'set' => 'fab', 'free' => true,],\n ['name' => 'blogger-b', 'set' => 'fab', 'free' => true,],\n ['name' => 'bluetooth', 'set' => 'fab', 'free' => true,],\n ['name' => 'bluetooth-b', 'set' => 'fab', 'free' => true,],\n ['name' => 'bootstrap', 'set' => 'fab', 'free' => true,],\n ['name' => 'btc', 'set' => 'fab', 'free' => true,],\n ['name' => 'buffer', 'set' => 'fab', 'free' => true,],\n ['name' => 'buromobelexperte', 'set' => 'fab', 'free' => true,],\n ['name' => 'buy-n-large', 'set' => 'fab', 'free' => true,],\n ['name' => 'buysellads', 'set' => 'fab', 'free' => true,],\n ['name' => 'canadian-maple-leaf', 'set' => 'fab', 'free' => true,],\n ['name' => 'cc-amazon-pay', 'set' => 'fab', 'free' => true,],\n ['name' => 'cc-amex', 'set' => 'fab', 'free' => true,],\n ['name' => 'cc-apple-pay', 'set' => 'fab', 'free' => true,],\n ['name' => 'cc-diners-club', 'set' => 'fab', 'free' => true,],\n ['name' => 'cc-discover', 'set' => 'fab', 'free' => true,],\n ['name' => 'cc-jcb', 'set' => 'fab', 'free' => true,],\n ['name' => 'cc-mastercard', 'set' => 'fab', 'free' => true,],\n ['name' => 'cc-paypal', 'set' => 'fab', 'free' => true,],\n ['name' => 'cc-stripe', 'set' => 'fab', 'free' => true,],\n ['name' => 'cc-visa', 'set' => 'fab', 'free' => true,],\n ['name' => 'centercode', 'set' => 'fab', 'free' => true,],\n ['name' => 'centos', 'set' => 'fab', 'free' => true,],\n ['name' => 'chrome', 'set' => 'fab', 'free' => true,],\n ['name' => 'chromecast', 'set' => 'fab', 'free' => true,],\n ['name' => 'cloudflare', 'set' => 'fab', 'free' => true,],\n ['name' => 'cloudscale', 'set' => 'fab', 'free' => true,],\n ['name' => 'cloudsmith', 'set' => 'fab', 'free' => true,],\n ['name' => 'cloudversify', 'set' => 'fab', 'free' => true,],\n ['name' => 'codepen', 'set' => 'fab', 'free' => true,],\n ['name' => 'codiepie', 'set' => 'fab', 'free' => true,],\n ['name' => 'confluence', 'set' => 'fab', 'free' => true,],\n ['name' => 'connectdevelop', 'set' => 'fab', 'free' => true,],\n ['name' => 'contao', 'set' => 'fab', 'free' => true,],\n ['name' => 'cotton-bureau', 'set' => 'fab', 'free' => true,],\n ['name' => 'cpanel', 'set' => 'fab', 'free' => true,],\n ['name' => 'creative-commons', 'set' => 'fab', 'free' => true,],\n ['name' => 'creative-commons-by', 'set' => 'fab', 'free' => true,],\n ['name' => 'creative-commons-nc', 'set' => 'fab', 'free' => true,],\n ['name' => 'creative-commons-nc-eu', 'set' => 'fab', 'free' => true,],\n ['name' => 'creative-commons-nc-jp', 'set' => 'fab', 'free' => true,],\n ['name' => 'creative-commons-nd', 'set' => 'fab', 'free' => true,],\n ['name' => 'creative-commons-pd', 'set' => 'fab', 'free' => true,],\n ['name' => 'creative-commons-pd-alt', 'set' => 'fab', 'free' => true,],\n ['name' => 'creative-commons-remix', 'set' => 'fab', 'free' => true,],\n ['name' => 'creative-commons-sa', 'set' => 'fab', 'free' => true,],\n ['name' => 'creative-commons-sampling', 'set' => 'fab', 'free' => true,],\n ['name' => 'creative-commons-sampling-plus', 'set' => 'fab', 'free' => true,],\n ['name' => 'creative-commons-share', 'set' => 'fab', 'free' => true,],\n ['name' => 'creative-commons-zero', 'set' => 'fab', 'free' => true,],\n ['name' => 'critical-role', 'set' => 'fab', 'free' => true,],\n ['name' => 'css3', 'set' => 'fab', 'free' => true,],\n ['name' => 'css3-alt', 'set' => 'fab', 'free' => true,],\n ['name' => 'cuttlefish', 'set' => 'fab', 'free' => true,],\n ['name' => 'd-and-d', 'set' => 'fab', 'free' => true,],\n ['name' => 'd-and-d-beyond', 'set' => 'fab', 'free' => true,],\n ['name' => 'dailymotion', 'set' => 'fab', 'free' => true,],\n ['name' => 'dashcube', 'set' => 'fab', 'free' => true,],\n ['name' => 'deezer', 'set' => 'fab', 'free' => true,],\n ['name' => 'delicious', 'set' => 'fab', 'free' => true,],\n ['name' => 'deploydog', 'set' => 'fab', 'free' => true,],\n ['name' => 'deskpro', 'set' => 'fab', 'free' => true,],\n ['name' => 'dev', 'set' => 'fab', 'free' => true,],\n ['name' => 'deviantart', 'set' => 'fab', 'free' => true,],\n ['name' => 'dhl', 'set' => 'fab', 'free' => true,],\n ['name' => 'diaspora', 'set' => 'fab', 'free' => true,],\n ['name' => 'digg', 'set' => 'fab', 'free' => true,],\n ['name' => 'digital-ocean', 'set' => 'fab', 'free' => true,],\n ['name' => 'discord', 'set' => 'fab', 'free' => true,],\n ['name' => 'discourse', 'set' => 'fab', 'free' => true,],\n ['name' => 'dochub', 'set' => 'fab', 'free' => true,],\n ['name' => 'docker', 'set' => 'fab', 'free' => true,],\n ['name' => 'draft2digital', 'set' => 'fab', 'free' => true,],\n ['name' => 'dribbble', 'set' => 'fab', 'free' => true,],\n ['name' => 'dribbble-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'dropbox', 'set' => 'fab', 'free' => true,],\n ['name' => 'drupal', 'set' => 'fab', 'free' => true,],\n ['name' => 'dyalog', 'set' => 'fab', 'free' => true,],\n ['name' => 'earlybirds', 'set' => 'fab', 'free' => true,],\n ['name' => 'ebay', 'set' => 'fab', 'free' => true,],\n ['name' => 'edge', 'set' => 'fab', 'free' => true,],\n ['name' => 'edge-legacy', 'set' => 'fab', 'free' => true,],\n ['name' => 'elementor', 'set' => 'fab', 'free' => true,],\n ['name' => 'ello', 'set' => 'fab', 'free' => true,],\n ['name' => 'ember', 'set' => 'fab', 'free' => true,],\n ['name' => 'empire', 'set' => 'fab', 'free' => true,],\n ['name' => 'envira', 'set' => 'fab', 'free' => true,],\n ['name' => 'erlang', 'set' => 'fab', 'free' => true,],\n ['name' => 'ethereum', 'set' => 'fab', 'free' => true,],\n ['name' => 'etsy', 'set' => 'fab', 'free' => true,],\n ['name' => 'evernote', 'set' => 'fab', 'free' => true,],\n ['name' => 'expeditedssl', 'set' => 'fab', 'free' => true,],\n ['name' => 'facebook', 'set' => 'fab', 'free' => true,],\n ['name' => 'facebook-f', 'set' => 'fab', 'free' => true,],\n ['name' => 'facebook-messenger', 'set' => 'fab', 'free' => true,],\n ['name' => 'facebook-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'fantasy-flight-games', 'set' => 'fab', 'free' => true,],\n ['name' => 'fedex', 'set' => 'fab', 'free' => true,],\n ['name' => 'fedora', 'set' => 'fab', 'free' => true,],\n ['name' => 'figma', 'set' => 'fab', 'free' => true,],\n ['name' => 'firefox', 'set' => 'fab', 'free' => true,],\n ['name' => 'firefox-browser', 'set' => 'fab', 'free' => true,],\n ['name' => 'first-order', 'set' => 'fab', 'free' => true,],\n ['name' => 'first-order-alt', 'set' => 'fab', 'free' => true,],\n ['name' => 'firstdraft', 'set' => 'fab', 'free' => true,],\n ['name' => 'flickr', 'set' => 'fab', 'free' => true,],\n ['name' => 'flipboard', 'set' => 'fab', 'free' => true,],\n ['name' => 'fly', 'set' => 'fab', 'free' => true,],\n ['name' => 'font-awesome', 'set' => 'fab', 'free' => true,],\n ['name' => 'font-awesome-alt', 'set' => 'fab', 'free' => true,],\n ['name' => 'font-awesome-flag', 'set' => 'fab', 'free' => true,],\n ['name' => 'fonticons', 'set' => 'fab', 'free' => true,],\n ['name' => 'fonticons-fi', 'set' => 'fab', 'free' => true,],\n ['name' => 'fort-awesome', 'set' => 'fab', 'free' => true,],\n ['name' => 'fort-awesome-alt', 'set' => 'fab', 'free' => true,],\n ['name' => 'forumbee', 'set' => 'fab', 'free' => true,],\n ['name' => 'foursquare', 'set' => 'fab', 'free' => true,],\n ['name' => 'free-code-camp', 'set' => 'fab', 'free' => true,],\n ['name' => 'freebsd', 'set' => 'fab', 'free' => true,],\n ['name' => 'fulcrum', 'set' => 'fab', 'free' => true,],\n ['name' => 'galactic-republic', 'set' => 'fab', 'free' => true,],\n ['name' => 'galactic-senate', 'set' => 'fab', 'free' => true,],\n ['name' => 'get-pocket', 'set' => 'fab', 'free' => true,],\n ['name' => 'gg', 'set' => 'fab', 'free' => true,],\n ['name' => 'gg-circle', 'set' => 'fab', 'free' => true,],\n ['name' => 'git', 'set' => 'fab', 'free' => true,],\n ['name' => 'git-alt', 'set' => 'fab', 'free' => true,],\n ['name' => 'git-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'github', 'set' => 'fab', 'free' => true,],\n ['name' => 'github-alt', 'set' => 'fab', 'free' => true,],\n ['name' => 'github-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'gitkraken', 'set' => 'fab', 'free' => true,],\n ['name' => 'gitlab', 'set' => 'fab', 'free' => true,],\n ['name' => 'gitter', 'set' => 'fab', 'free' => true,],\n ['name' => 'glide', 'set' => 'fab', 'free' => true,],\n ['name' => 'glide-g', 'set' => 'fab', 'free' => true,],\n ['name' => 'gofore', 'set' => 'fab', 'free' => true,],\n ['name' => 'goodreads', 'set' => 'fab', 'free' => true,],\n ['name' => 'goodreads-g', 'set' => 'fab', 'free' => true,],\n ['name' => 'google', 'set' => 'fab', 'free' => true,],\n ['name' => 'google-drive', 'set' => 'fab', 'free' => true,],\n ['name' => 'google-pay', 'set' => 'fab', 'free' => true,],\n ['name' => 'google-play', 'set' => 'fab', 'free' => true,],\n ['name' => 'google-plus', 'set' => 'fab', 'free' => true,],\n ['name' => 'google-plus-g', 'set' => 'fab', 'free' => true,],\n ['name' => 'google-plus-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'google-wallet', 'set' => 'fab', 'free' => true,],\n ['name' => 'gratipay', 'set' => 'fab', 'free' => true,],\n ['name' => 'grav', 'set' => 'fab', 'free' => true,],\n ['name' => 'gripfire', 'set' => 'fab', 'free' => true,],\n ['name' => 'grunt', 'set' => 'fab', 'free' => true,],\n ['name' => 'guilded', 'set' => 'fab', 'free' => true,],\n ['name' => 'gulp', 'set' => 'fab', 'free' => true,],\n ['name' => 'hacker-news', 'set' => 'fab', 'free' => true,],\n ['name' => 'hacker-news-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'hackerrank', 'set' => 'fab', 'free' => true,],\n ['name' => 'hips', 'set' => 'fab', 'free' => true,],\n ['name' => 'hire-a-helper', 'set' => 'fab', 'free' => true,],\n ['name' => 'hive', 'set' => 'fab', 'free' => true,],\n ['name' => 'hooli', 'set' => 'fab', 'free' => true,],\n ['name' => 'hornbill', 'set' => 'fab', 'free' => true,],\n ['name' => 'hotjar', 'set' => 'fab', 'free' => true,],\n ['name' => 'houzz', 'set' => 'fab', 'free' => true,],\n ['name' => 'html5', 'set' => 'fab', 'free' => true,],\n ['name' => 'hubspot', 'set' => 'fab', 'free' => true,],\n ['name' => 'ideal', 'set' => 'fab', 'free' => true,],\n ['name' => 'imdb', 'set' => 'fab', 'free' => true,],\n ['name' => 'innosoft', 'set' => 'fab', 'free' => true,],\n ['name' => 'instagram', 'set' => 'fab', 'free' => true,],\n ['name' => 'instagram-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'instalod', 'set' => 'fab', 'free' => true,],\n ['name' => 'intercom', 'set' => 'fab', 'free' => true,],\n ['name' => 'internet-explorer', 'set' => 'fab', 'free' => true,],\n ['name' => 'invision', 'set' => 'fab', 'free' => true,],\n ['name' => 'ioxhost', 'set' => 'fab', 'free' => true,],\n ['name' => 'itch-io', 'set' => 'fab', 'free' => true,],\n ['name' => 'itunes', 'set' => 'fab', 'free' => true,],\n ['name' => 'itunes-note', 'set' => 'fab', 'free' => true,],\n ['name' => 'java', 'set' => 'fab', 'free' => true,],\n ['name' => 'jedi-order', 'set' => 'fab', 'free' => true,],\n ['name' => 'jenkins', 'set' => 'fab', 'free' => true,],\n ['name' => 'jira', 'set' => 'fab', 'free' => true,],\n ['name' => 'joget', 'set' => 'fab', 'free' => true,],\n ['name' => 'joomla', 'set' => 'fab', 'free' => true,],\n ['name' => 'js', 'set' => 'fab', 'free' => true,],\n ['name' => 'js-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'jsfiddle', 'set' => 'fab', 'free' => true,],\n ['name' => 'kaggle', 'set' => 'fab', 'free' => true,],\n ['name' => 'keybase', 'set' => 'fab', 'free' => true,],\n ['name' => 'keycdn', 'set' => 'fab', 'free' => true,],\n ['name' => 'kickstarter', 'set' => 'fab', 'free' => true,],\n ['name' => 'kickstarter-k', 'set' => 'fab', 'free' => true,],\n ['name' => 'korvue', 'set' => 'fab', 'free' => true,],\n ['name' => 'laravel', 'set' => 'fab', 'free' => true,],\n ['name' => 'lastfm', 'set' => 'fab', 'free' => true,],\n ['name' => 'lastfm-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'leanpub', 'set' => 'fab', 'free' => true,],\n ['name' => 'less', 'set' => 'fab', 'free' => true,],\n ['name' => 'line', 'set' => 'fab', 'free' => true,],\n ['name' => 'linkedin', 'set' => 'fab', 'free' => true,],\n ['name' => 'linkedin-in', 'set' => 'fab', 'free' => true,],\n ['name' => 'linode', 'set' => 'fab', 'free' => true,],\n ['name' => 'linux', 'set' => 'fab', 'free' => true,],\n ['name' => 'lyft', 'set' => 'fab', 'free' => true,],\n ['name' => 'magento', 'set' => 'fab', 'free' => true,],\n ['name' => 'mailchimp', 'set' => 'fab', 'free' => true,],\n ['name' => 'mandalorian', 'set' => 'fab', 'free' => true,],\n ['name' => 'markdown', 'set' => 'fab', 'free' => true,],\n ['name' => 'mastodon', 'set' => 'fab', 'free' => true,],\n ['name' => 'maxcdn', 'set' => 'fab', 'free' => true,],\n ['name' => 'mdb', 'set' => 'fab', 'free' => true,],\n ['name' => 'medapps', 'set' => 'fab', 'free' => true,],\n ['name' => 'medium', 'set' => 'fab', 'free' => true,],\n ['name' => 'medium-m', 'set' => 'fab', 'free' => true,],\n ['name' => 'medrt', 'set' => 'fab', 'free' => true,],\n ['name' => 'meetup', 'set' => 'fab', 'free' => true,],\n ['name' => 'megaport', 'set' => 'fab', 'free' => true,],\n ['name' => 'mendeley', 'set' => 'fab', 'free' => true,],\n ['name' => 'microblog', 'set' => 'fab', 'free' => true,],\n ['name' => 'microsoft', 'set' => 'fab', 'free' => true,],\n ['name' => 'mix', 'set' => 'fab', 'free' => true,],\n ['name' => 'mixcloud', 'set' => 'fab', 'free' => true,],\n ['name' => 'mixer', 'set' => 'fab', 'free' => true,],\n ['name' => 'mizuni', 'set' => 'fab', 'free' => true,],\n ['name' => 'modx', 'set' => 'fab', 'free' => true,],\n ['name' => 'monero', 'set' => 'fab', 'free' => true,],\n ['name' => 'napster', 'set' => 'fab', 'free' => true,],\n ['name' => 'neos', 'set' => 'fab', 'free' => true,],\n ['name' => 'nimblr', 'set' => 'fab', 'free' => true,],\n ['name' => 'node', 'set' => 'fab', 'free' => true,],\n ['name' => 'node-js', 'set' => 'fab', 'free' => true,],\n ['name' => 'npm', 'set' => 'fab', 'free' => true,],\n ['name' => 'ns8', 'set' => 'fab', 'free' => true,],\n ['name' => 'nutritionix', 'set' => 'fab', 'free' => true,],\n ['name' => 'octopus-deploy', 'set' => 'fab', 'free' => true,],\n ['name' => 'odnoklassniki', 'set' => 'fab', 'free' => true,],\n ['name' => 'odnoklassniki-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'old-republic', 'set' => 'fab', 'free' => true,],\n ['name' => 'opencart', 'set' => 'fab', 'free' => true,],\n ['name' => 'openid', 'set' => 'fab', 'free' => true,],\n ['name' => 'opera', 'set' => 'fab', 'free' => true,],\n ['name' => 'optin-monster', 'set' => 'fab', 'free' => true,],\n ['name' => 'orcid', 'set' => 'fab', 'free' => true,],\n ['name' => 'osi', 'set' => 'fab', 'free' => true,],\n ['name' => 'page4', 'set' => 'fab', 'free' => true,],\n ['name' => 'pagelines', 'set' => 'fab', 'free' => true,],\n ['name' => 'palfed', 'set' => 'fab', 'free' => true,],\n ['name' => 'patreon', 'set' => 'fab', 'free' => true,],\n ['name' => 'paypal', 'set' => 'fab', 'free' => true,],\n ['name' => 'penny-arcade', 'set' => 'fab', 'free' => true,],\n ['name' => 'perbyte', 'set' => 'fab', 'free' => true,],\n ['name' => 'periscope', 'set' => 'fab', 'free' => true,],\n ['name' => 'phabricator', 'set' => 'fab', 'free' => true,],\n ['name' => 'phoenix-framework', 'set' => 'fab', 'free' => true,],\n ['name' => 'phoenix-squadron', 'set' => 'fab', 'free' => true,],\n ['name' => 'php', 'set' => 'fab', 'free' => true,],\n ['name' => 'pied-piper', 'set' => 'fab', 'free' => true,],\n ['name' => 'pied-piper-alt', 'set' => 'fab', 'free' => true,],\n ['name' => 'pied-piper-hat', 'set' => 'fab', 'free' => true,],\n ['name' => 'pied-piper-pp', 'set' => 'fab', 'free' => true,],\n ['name' => 'pied-piper-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'pinterest', 'set' => 'fab', 'free' => true,],\n ['name' => 'pinterest-p', 'set' => 'fab', 'free' => true,],\n ['name' => 'pinterest-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'playstation', 'set' => 'fab', 'free' => true,],\n ['name' => 'product-hunt', 'set' => 'fab', 'free' => true,],\n ['name' => 'pushed', 'set' => 'fab', 'free' => true,],\n ['name' => 'python', 'set' => 'fab', 'free' => true,],\n ['name' => 'qq', 'set' => 'fab', 'free' => true,],\n ['name' => 'quinscape', 'set' => 'fab', 'free' => true,],\n ['name' => 'quora', 'set' => 'fab', 'free' => true,],\n ['name' => 'r-project', 'set' => 'fab', 'free' => true,],\n ['name' => 'raspberry-pi', 'set' => 'fab', 'free' => true,],\n ['name' => 'ravelry', 'set' => 'fab', 'free' => true,],\n ['name' => 'react', 'set' => 'fab', 'free' => true,],\n ['name' => 'reacteurope', 'set' => 'fab', 'free' => true,],\n ['name' => 'readme', 'set' => 'fab', 'free' => true,],\n ['name' => 'rebel', 'set' => 'fab', 'free' => true,],\n ['name' => 'red-river', 'set' => 'fab', 'free' => true,],\n ['name' => 'reddit', 'set' => 'fab', 'free' => true,],\n ['name' => 'reddit-alien', 'set' => 'fab', 'free' => true,],\n ['name' => 'reddit-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'redhat', 'set' => 'fab', 'free' => true,],\n ['name' => 'renren', 'set' => 'fab', 'free' => true,],\n ['name' => 'replyd', 'set' => 'fab', 'free' => true,],\n ['name' => 'researchgate', 'set' => 'fab', 'free' => true,],\n ['name' => 'resolving', 'set' => 'fab', 'free' => true,],\n ['name' => 'rev', 'set' => 'fab', 'free' => true,],\n ['name' => 'rocketchat', 'set' => 'fab', 'free' => true,],\n ['name' => 'rockrms', 'set' => 'fab', 'free' => true,],\n ['name' => 'rust', 'set' => 'fab', 'free' => true,],\n ['name' => 'safari', 'set' => 'fab', 'free' => true,],\n ['name' => 'salesforce', 'set' => 'fab', 'free' => true,],\n ['name' => 'sass', 'set' => 'fab', 'free' => true,],\n ['name' => 'schlix', 'set' => 'fab', 'free' => true,],\n ['name' => 'scribd', 'set' => 'fab', 'free' => true,],\n ['name' => 'searchengin', 'set' => 'fab', 'free' => true,],\n ['name' => 'sellcast', 'set' => 'fab', 'free' => true,],\n ['name' => 'sellsy', 'set' => 'fab', 'free' => true,],\n ['name' => 'servicestack', 'set' => 'fab', 'free' => true,],\n ['name' => 'shirtsinbulk', 'set' => 'fab', 'free' => true,],\n ['name' => 'shopify', 'set' => 'fab', 'free' => true,],\n ['name' => 'shopware', 'set' => 'fab', 'free' => true,],\n ['name' => 'simplybuilt', 'set' => 'fab', 'free' => true,],\n ['name' => 'sistrix', 'set' => 'fab', 'free' => true,],\n ['name' => 'sith', 'set' => 'fab', 'free' => true,],\n ['name' => 'sketch', 'set' => 'fab', 'free' => true,],\n ['name' => 'skyatlas', 'set' => 'fab', 'free' => true,],\n ['name' => 'skype', 'set' => 'fab', 'free' => true,],\n ['name' => 'slack', 'set' => 'fab', 'free' => true,],\n ['name' => 'slack-hash', 'set' => 'fab', 'free' => true,],\n ['name' => 'slideshare', 'set' => 'fab', 'free' => true,],\n ['name' => 'snapchat', 'set' => 'fab', 'free' => true,],\n ['name' => 'snapchat-ghost', 'set' => 'fab', 'free' => true,],\n ['name' => 'snapchat-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'soundcloud', 'set' => 'fab', 'free' => true,],\n ['name' => 'sourcetree', 'set' => 'fab', 'free' => true,],\n ['name' => 'speakap', 'set' => 'fab', 'free' => true,],\n ['name' => 'speaker-deck', 'set' => 'fab', 'free' => true,],\n ['name' => 'spotify', 'set' => 'fab', 'free' => true,],\n ['name' => 'squarespace', 'set' => 'fab', 'free' => true,],\n ['name' => 'stack-exchange', 'set' => 'fab', 'free' => true,],\n ['name' => 'stack-overflow', 'set' => 'fab', 'free' => true,],\n ['name' => 'stackpath', 'set' => 'fab', 'free' => true,],\n ['name' => 'staylinked', 'set' => 'fab', 'free' => true,],\n ['name' => 'steam', 'set' => 'fab', 'free' => true,],\n ['name' => 'steam-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'steam-symbol', 'set' => 'fab', 'free' => true,],\n ['name' => 'sticker-mule', 'set' => 'fab', 'free' => true,],\n ['name' => 'strava', 'set' => 'fab', 'free' => true,],\n ['name' => 'stripe', 'set' => 'fab', 'free' => true,],\n ['name' => 'stripe-s', 'set' => 'fab', 'free' => true,],\n ['name' => 'studiovinari', 'set' => 'fab', 'free' => true,],\n ['name' => 'stumbleupon', 'set' => 'fab', 'free' => true,],\n ['name' => 'stumbleupon-circle', 'set' => 'fab', 'free' => true,],\n ['name' => 'superpowers', 'set' => 'fab', 'free' => true,],\n ['name' => 'supple', 'set' => 'fab', 'free' => true,],\n ['name' => 'suse', 'set' => 'fab', 'free' => true,],\n ['name' => 'swift', 'set' => 'fab', 'free' => true,],\n ['name' => 'symfony', 'set' => 'fab', 'free' => true,],\n ['name' => 'teamspeak', 'set' => 'fab', 'free' => true,],\n ['name' => 'telegram', 'set' => 'fab', 'free' => true,],\n ['name' => 'telegram-plane', 'set' => 'fab', 'free' => true,],\n ['name' => 'tencent-weibo', 'set' => 'fab', 'free' => true,],\n ['name' => 'the-red-yeti', 'set' => 'fab', 'free' => true,],\n ['name' => 'themeco', 'set' => 'fab', 'free' => true,],\n ['name' => 'themeisle', 'set' => 'fab', 'free' => true,],\n ['name' => 'think-peaks', 'set' => 'fab', 'free' => true,],\n ['name' => 'tiktok', 'set' => 'fab', 'free' => true,],\n ['name' => 'trade-federation', 'set' => 'fab', 'free' => true,],\n ['name' => 'trello', 'set' => 'fab', 'free' => true,],\n ['name' => 'tripadvisor', 'set' => 'fab', 'free' => true,],\n ['name' => 'tumblr', 'set' => 'fab', 'free' => true,],\n ['name' => 'tumblr-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'twitch', 'set' => 'fab', 'free' => true,],\n ['name' => 'twitter', 'set' => 'fab', 'free' => true,],\n ['name' => 'twitter-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'typo3', 'set' => 'fab', 'free' => true,],\n ['name' => 'uber', 'set' => 'fab', 'free' => true,],\n ['name' => 'ubuntu', 'set' => 'fab', 'free' => true,],\n ['name' => 'uikit', 'set' => 'fab', 'free' => true,],\n ['name' => 'umbraco', 'set' => 'fab', 'free' => true,],\n ['name' => 'uncharted', 'set' => 'fab', 'free' => true,],\n ['name' => 'uniregistry', 'set' => 'fab', 'free' => true,],\n ['name' => 'unity', 'set' => 'fab', 'free' => true,],\n ['name' => 'unsplash', 'set' => 'fab', 'free' => true,],\n ['name' => 'untappd', 'set' => 'fab', 'free' => true,],\n ['name' => 'ups', 'set' => 'fab', 'free' => true,],\n ['name' => 'usb', 'set' => 'fab', 'free' => true,],\n ['name' => 'usps', 'set' => 'fab', 'free' => true,],\n ['name' => 'ussunnah', 'set' => 'fab', 'free' => true,],\n ['name' => 'vaadin', 'set' => 'fab', 'free' => true,],\n ['name' => 'viacoin', 'set' => 'fab', 'free' => true,],\n ['name' => 'viadeo', 'set' => 'fab', 'free' => true,],\n ['name' => 'viadeo-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'viber', 'set' => 'fab', 'free' => true,],\n ['name' => 'vimeo', 'set' => 'fab', 'free' => true,],\n ['name' => 'vimeo-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'vimeo-v', 'set' => 'fab', 'free' => true,],\n ['name' => 'vine', 'set' => 'fab', 'free' => true,],\n ['name' => 'vk', 'set' => 'fab', 'free' => true,],\n ['name' => 'vnv', 'set' => 'fab', 'free' => true,],\n ['name' => 'vuejs', 'set' => 'fab', 'free' => true,],\n ['name' => 'watchman-monitoring', 'set' => 'fab', 'free' => true,],\n ['name' => 'waze', 'set' => 'fab', 'free' => true,],\n ['name' => 'weebly', 'set' => 'fab', 'free' => true,],\n ['name' => 'weibo', 'set' => 'fab', 'free' => true,],\n ['name' => 'weixin', 'set' => 'fab', 'free' => true,],\n ['name' => 'whatsapp', 'set' => 'fab', 'free' => true,],\n ['name' => 'whatsapp-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'whmcs', 'set' => 'fab', 'free' => true,],\n ['name' => 'wikipedia-w', 'set' => 'fab', 'free' => true,],\n ['name' => 'windows', 'set' => 'fab', 'free' => true,],\n ['name' => 'wix', 'set' => 'fab', 'free' => true,],\n ['name' => 'wizards-of-the-coast', 'set' => 'fab', 'free' => true,],\n ['name' => 'wodu', 'set' => 'fab', 'free' => true,],\n ['name' => 'wolf-pack-battalion', 'set' => 'fab', 'free' => true,],\n ['name' => 'wordpress', 'set' => 'fab', 'free' => true,],\n ['name' => 'wordpress-simple', 'set' => 'fab', 'free' => true,],\n ['name' => 'wpbeginner', 'set' => 'fab', 'free' => true,],\n ['name' => 'wpexplorer', 'set' => 'fab', 'free' => true,],\n ['name' => 'wpforms', 'set' => 'fab', 'free' => true,],\n ['name' => 'wpressr', 'set' => 'fab', 'free' => true,],\n ['name' => 'xbox', 'set' => 'fab', 'free' => true,],\n ['name' => 'xing', 'set' => 'fab', 'free' => true,],\n ['name' => 'xing-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'y-combinator', 'set' => 'fab', 'free' => true,],\n ['name' => 'yahoo', 'set' => 'fab', 'free' => true,],\n ['name' => 'yammer', 'set' => 'fab', 'free' => true,],\n ['name' => 'yandex', 'set' => 'fab', 'free' => true,],\n ['name' => 'yandex-international', 'set' => 'fab', 'free' => true,],\n ['name' => 'yarn', 'set' => 'fab', 'free' => true,],\n ['name' => 'yelp', 'set' => 'fab', 'free' => true,],\n ['name' => 'yoast', 'set' => 'fab', 'free' => true,],\n ['name' => 'youtube', 'set' => 'fab', 'free' => true,],\n ['name' => 'youtube-square', 'set' => 'fab', 'free' => true,],\n ['name' => 'zhihu', 'set' => 'fab', 'free' => true,],\n ];\n\n foreach ($icons as $item) {\n FAIcon::insert([\n 'set' => $item['set'],\n 'name' => $item['name'],\n 'free' => $item['free'],\n 'created_at' => Carbon::now(),\n ]);\n }\n }", "title": "" }, { "docid": "d5c3d2be0750193d18fa1a1db3c51c9d", "score": "0.5424319", "text": "function lex_awesome_icons_list(){\r\n\t$icon_list = array(\r\n\t\t'' => 'No Icon',\r\n\t\t'adjust' => 'adjust',\r\n\t\t'anchor' => 'anchor',\r\n\t\t'archive' => 'archive',\r\n\t\t'arrows' => 'arrows',\r\n\t\t'arrows-h' => 'arrows-h',\r\n\t\t'arrows-v' => 'arrows-v',\r\n\t\t'asterisk' => 'asterisk',\r\n\t\t'automobile' => 'automobile',\r\n\t\t'ban' => 'ban',\r\n\t\t'bank' => 'bank',\r\n\t\t'bar-chart-o' => 'bar-chart-o',\r\n\t\t'barcode' => 'barcode',\r\n\t\t'bars' => 'bars',\r\n\t\t'beer' => 'beer',\r\n\t\t'bell' => 'bell',\r\n\t\t'bell-o' => 'bell-o',\r\n\t\t'bolt' => 'bolt',\r\n\t\t'bomb' => 'bomb',\r\n\t\t'book' => 'book',\r\n\t\t'bookmark' => 'bookmark',\r\n\t\t'bookmark-o' => 'bookmark-o',\r\n\t\t'briefcase' => 'briefcase',\r\n\t\t'bug' => 'bug',\r\n\t\t'building' => 'building',\r\n\t\t'building-o' => 'building-o',\r\n\t\t'bullhorn' => 'bullhorn',\r\n\t\t'bullseye' => 'bullseye',\r\n\t\t'cab' => 'cab',\r\n\t\t'calendar' => 'calendar',\r\n\t\t'calendar-o' => 'calendar-o',\r\n\t\t'camera' => 'camera',\r\n\t\t'camera-retro' => 'camera-retro',\r\n\t\t'car' => 'car',\r\n\t\t'caret-square-o-down' => 'caret-square-o-down',\r\n\t\t'caret-square-o-left' => 'caret-square-o-left',\r\n\t\t'caret-square-o-right' => 'caret-square-o-right',\r\n\t\t'caret-square-o-up' => 'caret-square-o-up',\r\n\t\t'certificate' => 'certificate',\r\n\t\t'check' => 'check',\r\n\t\t'check-circle' => 'check-circle',\r\n\t\t'check-circle-o' => 'check-circle-o',\r\n\t\t'check-square' => 'check-square',\r\n\t\t'check-square-o' => 'check-square-o',\r\n\t\t'child' => 'child',\r\n\t\t'circle' => 'circle',\r\n\t\t'circle-o' => 'circle-o',\r\n\t\t'circle-o-notch' => 'circle-o-notch',\r\n\t\t'circle-thin' => 'circle-thin',\r\n\t\t'clock-o' => 'clock-o',\r\n\t\t'cloud' => 'cloud',\r\n\t\t'cloud-download' => 'cloud-download',\r\n\t\t'cloud-upload' => 'cloud-upload',\r\n\t\t'code' => 'code',\r\n\t\t'code-fork' => 'code-fork',\r\n\t\t'coffee' => 'coffee',\r\n\t\t'cog' => 'cog',\r\n\t\t'cogs' => 'cogs',\r\n\t\t'comment' => 'comment',\r\n\t\t'comment-o' => 'comment-o',\r\n\t\t'comments' => 'comments',\r\n\t\t'comments-o' => 'comments-o',\r\n\t\t'compass' => 'compass',\r\n\t\t'credit-card' => 'credit-card',\r\n\t\t'crop' => 'crop',\r\n\t\t'crosshairs' => 'crosshairs',\r\n\t\t'cube' => 'cube',\r\n\t\t'cubes' => 'cubes',\r\n\t\t'cutlery' => 'cutlery',\r\n\t\t'dashboard' => 'dashboard',\r\n\t\t'database' => 'database',\r\n\t\t'desktop' => 'desktop',\r\n\t\t'dot-circle-o' => 'dot-circle-o',\r\n\t\t'download' => 'download',\r\n\t\t'edit' => 'edit',\r\n\t\t'ellipsis-h' => 'ellipsis-h',\r\n\t\t'ellipsis-v' => 'ellipsis-v',\r\n\t\t'envelope' => 'envelope',\r\n\t\t'envelope-o' => 'envelope-o',\r\n\t\t'envelope-square' => 'envelope-square',\r\n\t\t'eraser' => 'eraser',\r\n\t\t'exchange' => 'exchange',\r\n\t\t'exclamation' => 'exclamation',\r\n\t\t'exclamation-circle' => 'exclamation-circle',\r\n\t\t'exclamation-triangle' => 'exclamation-triangle',\r\n\t\t'external-link' => 'external-link',\r\n\t\t'external-link-square' => 'external-link-square',\r\n\t\t'eye' => 'eye',\r\n\t\t'eye-slash' => 'eye-slash',\r\n\t\t'fax' => 'fax',\r\n\t\t'female' => 'female',\r\n\t\t'fighter-jet' => 'fighter-jet',\r\n\t\t'file-archive-o' => 'file-archive-o',\r\n\t\t'file-audio-o' => 'file-audio-o',\r\n\t\t'file-code-o' => 'file-code-o',\r\n\t\t'file-excel-o' => 'file-excel-o',\r\n\t\t'file-image-o' => 'file-image-o',\r\n\t\t'file-movie-o' => 'file-movie-o',\r\n\t\t'file-pdf-o' => 'file-pdf-o',\r\n\t\t'file-photo-o' => 'file-photo-o',\r\n\t\t'file-picture-o' => 'file-picture-o',\r\n\t\t'file-powerpoint-o' => 'file-powerpoint-o',\r\n\t\t'file-sound-o' => 'file-sound-o',\r\n\t\t'file-video-o' => 'file-video-o',\r\n\t\t'file-word-o' => 'file-word-o',\r\n\t\t'file-zip-o' => 'file-zip-o',\r\n\t\t'film' => 'film',\r\n\t\t'filter' => 'filter',\r\n\t\t'fire' => 'fire',\r\n\t\t'fire-extinguisher' => 'fire-extinguisher',\r\n\t\t'flag' => 'flag',\r\n\t\t'flag-checkered' => 'flag-checkered',\r\n\t\t'flag-o' => 'flag-o',\r\n\t\t'flash' => 'flash',\r\n\t\t'flask' => 'flask',\r\n\t\t'folder' => 'folder',\r\n\t\t'folder-o' => 'folder-o',\r\n\t\t'folder-open' => 'folder-open',\r\n\t\t'folder-open-o' => 'folder-open-o',\r\n\t\t'frown-o' => 'frown-o',\r\n\t\t'gamepad' => 'gamepad',\r\n\t\t'gavel' => 'gavel',\r\n\t\t'gear' => 'gear',\r\n\t\t'gears' => 'gears',\r\n\t\t'gift' => 'gift',\r\n\t\t'glass' => 'glass',\r\n\t\t'globe' => 'globe',\r\n\t\t'graduation-cap' => 'graduation-cap',\r\n\t\t'group' => 'group',\r\n\t\t'hdd-o' => 'hdd-o',\r\n\t\t'headphones' => 'headphones',\r\n\t\t'heart' => 'heart',\r\n\t\t'heart-o' => 'heart-o',\r\n\t\t'history' => 'history',\r\n\t\t'home' => 'home',\r\n\t\t'image' => 'image',\r\n\t\t'inbox' => 'inbox',\r\n\t\t'info' => 'info',\r\n\t\t'info-circle' => 'info-circle',\r\n\t\t'institution' => 'institution',\r\n\t\t'key' => 'key',\r\n\t\t'keyboard-o' => 'keyboard-o',\r\n\t\t'language' => 'language',\r\n\t\t'laptop' => 'laptop',\r\n\t\t'leaf' => 'leaf',\r\n\t\t'legal' => 'legal',\r\n\t\t'lemon-o' => 'lemon-o',\r\n\t\t'level-down' => 'level-down',\r\n\t\t'level-up' => 'level-up',\r\n\t\t'life-bouy' => 'life-bouy',\r\n\t\t'life-ring' => 'life-ring',\r\n\t\t'life-saver' => 'life-saver',\r\n\t\t'lightbulb-o' => 'lightbulb-o',\r\n\t\t'location-arrow' => 'location-arrow',\r\n\t\t'lock' => 'lock',\r\n\t\t'magic' => 'magic',\r\n\t\t'magnet' => 'magnet',\r\n\t\t'mail-forward' => 'mail-forward',\r\n\t\t'mail-reply' => 'mail-reply',\r\n\t\t'mail-reply-all' => 'mail-reply-all',\r\n\t\t'male' => 'male',\r\n\t\t'map-marker' => 'map-marker',\r\n\t\t'meh-o' => 'meh-o',\r\n\t\t'microphone' => 'microphone',\r\n\t\t'microphone-slash' => 'microphone-slash',\r\n\t\t'minus' => 'minus',\r\n\t\t'minus-circle' => 'minus-circle',\r\n\t\t'minus-square' => 'minus-square',\r\n\t\t'minus-square-o' => 'minus-square-o',\r\n\t\t'mobile' => 'mobile',\r\n\t\t'mobile-phone' => 'mobile-phone',\r\n\t\t'money' => 'money',\r\n\t\t'moon-o' => 'moon-o',\r\n\t\t'mortar-board' => 'mortar-board',\r\n\t\t'music' => 'music',\r\n\t\t'navicon' => 'navicon',\r\n\t\t'paper-plane' => 'paper-plane',\r\n\t\t'paper-plane-o' => 'paper-plane-o',\r\n\t\t'paw' => 'paw',\r\n\t\t'pencil' => 'pencil',\r\n\t\t'pencil-square' => 'pencil-square',\r\n\t\t'pencil-square-o' => 'pencil-square-o',\r\n\t\t'phone' => 'phone',\r\n\t\t'phone-square' => 'phone-square',\r\n\t\t'photo' => 'photo',\r\n\t\t'picture-o' => 'picture-o',\r\n\t\t'plane' => 'plane',\r\n\t\t'plus' => 'plus',\r\n\t\t'plus-circle' => 'plus-circle',\r\n\t\t'plus-square' => 'plus-square',\r\n\t\t'plus-square-o' => 'plus-square-o',\r\n\t\t'power-off' => 'power-off',\r\n\t\t'print' => 'print',\r\n\t\t'puzzle-piece' => 'puzzle-piece',\r\n\t\t'qrcode' => 'qrcode',\r\n\t\t'question' => 'question',\r\n\t\t'question-circle' => 'question-circle',\r\n\t\t'quote-left' => 'quote-left',\r\n\t\t'quote-right' => 'quote-right',\r\n\t\t'random' => 'random',\r\n\t\t'recycle' => 'recycle',\r\n\t\t'refresh' => 'refresh',\r\n\t\t'reorder' => 'reorder',\r\n\t\t'reply' => 'reply',\r\n\t\t'reply-all' => 'reply-all',\r\n\t\t'retweet' => 'retweet',\r\n\t\t'road' => 'road',\r\n\t\t'rocket' => 'rocket',\r\n\t\t'rss' => 'rss',\r\n\t\t'rss-square' => 'rss-square',\r\n\t\t'search' => 'search',\r\n\t\t'search-minus' => 'search-minus',\r\n\t\t'search-plus' => 'search-plus',\r\n\t\t'send' => 'send',\r\n\t\t'send-o' => 'send-o',\r\n\t\t'share' => 'share',\r\n\t\t'share-alt' => 'share-alt',\r\n\t\t'share-alt-square' => 'share-alt-square',\r\n\t\t'share-square' => 'share-square',\r\n\t\t'share-square-o' => 'share-square-o',\r\n\t\t'shield' => 'shield',\r\n\t\t'shopping-cart' => 'shopping-cart',\r\n\t\t'sign-in' => 'sign-in',\r\n\t\t'sign-out' => 'sign-out',\r\n\t\t'signal' => 'signal',\r\n\t\t'sitemap' => 'sitemap',\r\n\t\t'sliders' => 'sliders',\r\n\t\t'smile-o' => 'smile-o',\r\n\t\t'sort' => 'sort',\r\n\t\t'sort-alpha-asc' => 'sort-alpha-asc',\r\n\t\t'sort-alpha-desc' => 'sort-alpha-desc',\r\n\t\t'sort-amount-asc' => 'sort-amount-asc',\r\n\t\t'sort-amount-desc' => 'sort-amount-desc',\r\n\t\t'sort-asc' => 'sort-asc',\r\n\t\t'sort-desc' => 'sort-desc',\r\n\t\t'sort-down' => 'sort-down',\r\n\t\t'sort-numeric-asc' => 'sort-numeric-asc',\r\n\t\t'sort-numeric-desc' => 'sort-numeric-desc',\r\n\t\t'sort-up' => 'sort-up',\r\n\t\t'space-shuttle' => 'space-shuttle',\r\n\t\t'spinner' => 'spinner',\r\n\t\t'spoon' => 'spoon',\r\n\t\t'square' => 'square',\r\n\t\t'square-o' => 'square-o',\r\n\t\t'star' => 'star',\r\n\t\t'star-half' => 'star-half',\r\n\t\t'star-half-empty' => 'star-half-empty',\r\n\t\t'star-half-full' => 'star-half-full',\r\n\t\t'star-half-o' => 'star-half-o',\r\n\t\t'star-o' => 'star-o',\r\n\t\t'suitcase' => 'suitcase',\r\n\t\t'sun-o' => 'sun-o',\r\n\t\t'support' => 'support',\r\n\t\t'tablet' => 'tablet',\r\n\t\t'tachometer' => 'tachometer',\r\n\t\t'tag' => 'tag',\r\n\t\t'tags' => 'tags',\r\n\t\t'tasks' => 'tasks',\r\n\t\t'taxi' => 'taxi',\r\n\t\t'terminal' => 'terminal',\r\n\t\t'thumb-tack' => 'thumb-tack',\r\n\t\t'thumbs-down' => 'thumbs-down',\r\n\t\t'thumbs-o-down' => 'thumbs-o-down',\r\n\t\t'thumbs-o-up' => 'thumbs-o-up',\r\n\t\t'thumbs-up' => 'thumbs-up',\r\n\t\t'ticket' => 'ticket',\r\n\t\t'times' => 'times',\r\n\t\t'times-circle' => 'times-circle',\r\n\t\t'times-circle-o' => 'times-circle-o',\r\n\t\t'tint' => 'tint',\r\n\t\t'toggle-down' => 'toggle-down',\r\n\t\t'toggle-left' => 'toggle-left',\r\n\t\t'toggle-right' => 'toggle-right',\r\n\t\t'toggle-up' => 'toggle-up',\r\n\t\t'trash-o' => 'trash-o',\r\n\t\t'tree' => 'tree',\r\n\t\t'trophy' => 'trophy',\r\n\t\t'truck' => 'truck',\r\n\t\t'umbrella' => 'umbrella',\r\n\t\t'university' => 'university',\r\n\t\t'unlock' => 'unlock',\r\n\t\t'unlock-alt' => 'unlock-alt',\r\n\t\t'unsorted' => 'unsorted',\r\n\t\t'upload' => 'upload',\r\n\t\t'user' => 'user',\r\n\t\t'users' => 'users',\r\n\t\t'video-camera' => 'video-camera',\r\n\t\t'volume-down' => 'volume-down',\r\n\t\t'volume-off' => 'volume-off',\r\n\t\t'volume-up' => 'volume-up',\r\n\t\t'warning' => 'warning',\r\n\t\t'wheelchair' => 'wheelchair',\r\n\t\t'wrench' => 'wrench',\r\n\t\t'file' => 'file',\r\n\t\t'file-archive-o' => 'file-archive-o',\r\n\t\t'file-audio-o' => 'file-audio-o',\r\n\t\t'file-code-o' => 'file-code-o',\r\n\t\t'file-excel-o' => 'file-excel-o',\r\n\t\t'file-image-o' => 'file-image-o',\r\n\t\t'file-movie-o' => 'file-movie-o',\r\n\t\t'file-o' => 'file-o',\r\n\t\t'file-pdf-o' => 'file-pdf-o',\r\n\t\t'file-photo-o' => 'file-photo-o',\r\n\t\t'file-picture-o' => 'file-picture-o',\r\n\t\t'file-powerpoint-o' => 'file-powerpoint-o',\r\n\t\t'file-sound-o' => 'file-sound-o',\r\n\t\t'file-text' => 'file-text',\r\n\t\t'file-text-o' => 'file-text-o',\r\n\t\t'file-video-o' => 'file-video-o',\r\n\t\t'file-word-o' => 'file-word-o',\r\n\t\t'file-zip-o' => 'file-zip-o',\r\n\t\t'circle-o-notch' => 'circle-o-notch',\r\n\t\t'cog' => 'cog',\r\n\t\t'gear' => 'gear',\r\n\t\t'refresh' => 'refresh',\r\n\t\t'spinner' => 'spinner',\r\n\t\t'check-square' => 'check-square',\r\n\t\t'check-square-o' => 'check-square-o',\r\n\t\t'circle' => 'circle',\r\n\t\t'circle-o' => 'circle-o',\r\n\t\t'dot-circle-o' => 'dot-circle-o',\r\n\t\t'minus-square' => 'minus-square',\r\n\t\t'minus-square-o' => 'minus-square-o',\r\n\t\t'plus-square' => 'plus-square',\r\n\t\t'plus-square-o' => 'plus-square-o',\r\n\t\t'square' => 'square',\r\n\t\t'square-o' => 'square-o',\r\n\t\t'bitcoin' => 'bitcoin',\r\n\t\t'btc' => 'btc',\r\n\t\t'cny' => 'cny',\r\n\t\t'dollar' => 'dollar',\r\n\t\t'eur' => 'eur',\r\n\t\t'euro' => 'euro',\r\n\t\t'gbp' => 'gbp',\r\n\t\t'inr' => 'inr',\r\n\t\t'jpy' => 'jpy',\r\n\t\t'krw' => 'krw',\r\n\t\t'money' => 'money',\r\n\t\t'rmb' => 'rmb',\r\n\t\t'rouble' => 'rouble',\r\n\t\t'rub' => 'rub',\r\n\t\t'ruble' => 'ruble',\r\n\t\t'rupee' => 'rupee',\r\n\t\t'try' => 'try',\r\n\t\t'turkish-lira' => 'turkish-lira',\r\n\t\t'usd' => 'usd',\r\n\t\t'won' => 'won',\r\n\t\t'yen' => 'yen',\r\n\t\t'align-center' => 'align-center',\r\n\t\t'align-justify' => 'align-justify',\r\n\t\t'align-left' => 'align-left',\r\n\t\t'align-right' => 'align-right',\r\n\t\t'bold' => 'bold',\r\n\t\t'chain' => 'chain',\r\n\t\t'chain-broken' => 'chain-broken',\r\n\t\t'clipboard' => 'clipboard',\r\n\t\t'columns' => 'columns',\r\n\t\t'copy' => 'copy',\r\n\t\t'cut' => 'cut',\r\n\t\t'dedent' => 'dedent',\r\n\t\t'eraser' => 'eraser',\r\n\t\t'file' => 'file',\r\n\t\t'file-o' => 'file-o',\r\n\t\t'file-text' => 'file-text',\r\n\t\t'file-text-o' => 'file-text-o',\r\n\t\t'files-o' => 'files-o',\r\n\t\t'floppy-o' => 'floppy-o',\r\n\t\t'font' => 'font',\r\n\t\t'header' => 'header',\r\n\t\t'indent' => 'indent',\r\n\t\t'italic' => 'italic',\r\n\t\t'link' => 'link',\r\n\t\t'list' => 'list',\r\n\t\t'list-alt' => 'list-alt',\r\n\t\t'list-ol' => 'list-ol',\r\n\t\t'list-ul' => 'list-ul',\r\n\t\t'outdent' => 'outdent',\r\n\t\t'paperclip' => 'paperclip',\r\n\t\t'paragraph' => 'paragraph',\r\n\t\t'paste' => 'paste',\r\n\t\t'repeat' => 'repeat',\r\n\t\t'rotate-left' => 'rotate-left',\r\n\t\t'rotate-right' => 'rotate-right',\r\n\t\t'save' => 'save',\r\n\t\t'scissors' => 'scissors',\r\n\t\t'strikethrough' => 'strikethrough',\r\n\t\t'subscript' => 'subscript',\r\n\t\t'superscript' => 'superscript',\r\n\t\t'table' => 'table',\r\n\t\t'text-height' => 'text-height',\r\n\t\t'text-width' => 'text-width',\r\n\t\t'th' => 'th',\r\n\t\t'th-large' => 'th-large',\r\n\t\t'th-list' => 'th-list',\r\n\t\t'underline' => 'underline',\r\n\t\t'undo' => 'undo',\r\n\t\t'unlink' => 'unlink',\r\n\t\t'angle-double-down' => 'angle-double-down',\r\n\t\t'angle-double-left' => 'angle-double-left',\r\n\t\t'angle-double-right' => 'angle-double-right',\r\n\t\t'angle-double-up' => 'angle-double-up',\r\n\t\t'angle-down' => 'angle-down',\r\n\t\t'angle-left' => 'angle-left',\r\n\t\t'angle-right' => 'angle-right',\r\n\t\t'angle-up' => 'angle-up',\r\n\t\t'arrow-circle-down' => 'arrow-circle-down',\r\n\t\t'arrow-circle-left' => 'arrow-circle-left',\r\n\t\t'arrow-circle-o-down' => 'arrow-circle-o-down',\r\n\t\t'arrow-circle-o-left' => 'arrow-circle-o-left',\r\n\t\t'arrow-circle-o-right' => 'arrow-circle-o-right',\r\n\t\t'arrow-circle-o-up' => 'arrow-circle-o-up',\r\n\t\t'arrow-circle-right' => 'arrow-circle-right',\r\n\t\t'arrow-circle-up' => 'arrow-circle-up',\r\n\t\t'arrow-down' => 'arrow-down',\r\n\t\t'arrow-left' => 'arrow-left',\r\n\t\t'arrow-right' => 'arrow-right',\r\n\t\t'arrow-up' => 'arrow-up',\r\n\t\t'arrows' => 'arrows',\r\n\t\t'arrows-alt' => 'arrows-alt',\r\n\t\t'arrows-h' => 'arrows-h',\r\n\t\t'arrows-v' => 'arrows-v',\r\n\t\t'caret-down' => 'caret-down',\r\n\t\t'caret-left' => 'caret-left',\r\n\t\t'caret-right' => 'caret-right',\r\n\t\t'caret-square-o-down' => 'caret-square-o-down',\r\n\t\t'caret-square-o-left' => 'caret-square-o-left',\r\n\t\t'caret-square-o-right' => 'caret-square-o-right',\r\n\t\t'caret-square-o-up' => 'caret-square-o-up',\r\n\t\t'caret-up' => 'caret-up',\r\n\t\t'chevron-circle-down' => 'chevron-circle-down',\r\n\t\t'chevron-circle-left' => 'chevron-circle-left',\r\n\t\t'chevron-circle-right' => 'chevron-circle-right',\r\n\t\t'chevron-circle-up' => 'chevron-circle-up',\r\n\t\t'chevron-down' => 'chevron-down',\r\n\t\t'chevron-left' => 'chevron-left',\r\n\t\t'chevron-right' => 'chevron-right',\r\n\t\t'chevron-up' => 'chevron-up',\r\n\t\t'hand-o-down' => 'hand-o-down',\r\n\t\t'hand-o-left' => 'hand-o-left',\r\n\t\t'hand-o-right' => 'hand-o-right',\r\n\t\t'hand-o-up' => 'hand-o-up',\r\n\t\t'long-arrow-down' => 'long-arrow-down',\r\n\t\t'long-arrow-left' => 'long-arrow-left',\r\n\t\t'long-arrow-right' => 'long-arrow-right',\r\n\t\t'long-arrow-up' => 'long-arrow-up',\r\n\t\t'toggle-down' => 'toggle-down',\r\n\t\t'toggle-left' => 'toggle-left',\r\n\t\t'toggle-right' => 'toggle-right',\r\n\t\t'toggle-up' => 'toggle-up',\r\n\t\t'arrows-alt' => 'arrows-alt',\r\n\t\t'backward' => 'backward',\r\n\t\t'compress' => 'compress',\r\n\t\t'eject' => 'eject',\r\n\t\t'expand' => 'expand',\r\n\t\t'fast-backward' => 'fast-backward',\r\n\t\t'fast-forward' => 'fast-forward',\r\n\t\t'forward' => 'forward',\r\n\t\t'pause' => 'pause',\r\n\t\t'play' => 'play',\r\n\t\t'play-circle' => 'play-circle',\r\n\t\t'play-circle-o' => 'play-circle-o',\r\n\t\t'step-backward' => 'step-backward',\r\n\t\t'step-forward' => 'step-forward',\r\n\t\t'stop' => 'stop',\r\n\t\t'youtube-play' => 'youtube-play',\r\n\t\t'adn' => 'adn',\r\n\t\t'android' => 'android',\r\n\t\t'apple' => 'apple',\r\n\t\t'behance' => 'behance',\r\n\t\t'behance-square' => 'behance-square',\r\n\t\t'bitbucket' => 'bitbucket',\r\n\t\t'bitbucket-square' => 'bitbucket-square',\r\n\t\t'bitcoin' => 'bitcoin',\r\n\t\t'btc' => 'btc',\r\n\t\t'codepen' => 'codepen',\r\n\t\t'css3' => 'css3',\r\n\t\t'delicious' => 'delicious',\r\n\t\t'deviantart' => 'deviantart',\r\n\t\t'digg' => 'digg',\r\n\t\t'dribbble' => 'dribbble',\r\n\t\t'dropbox' => 'dropbox',\r\n\t\t'drupal' => 'drupal',\r\n\t\t'empire' => 'empire',\r\n\t\t'facebook' => 'facebook',\r\n\t\t'facebook-square' => 'facebook-square',\r\n\t\t'flickr' => 'flickr',\r\n\t\t'foursquare' => 'foursquare',\r\n\t\t'ge' => 'ge',\r\n\t\t'git' => 'git',\r\n\t\t'git-square' => 'git-square',\r\n\t\t'github' => 'github',\r\n\t\t'github-alt' => 'github-alt',\r\n\t\t'github-square' => 'github-square',\r\n\t\t'gittip' => 'gittip',\r\n\t\t'google' => 'google',\r\n\t\t'google-plus' => 'google-plus',\r\n\t\t'google-plus-square' => 'google-plus-square',\r\n\t\t'hacker-news' => 'hacker-news',\r\n\t\t'html5' => 'html5',\r\n\t\t'instagram' => 'instagram',\r\n\t\t'joomla' => 'joomla',\r\n\t\t'jsfiddle' => 'jsfiddle',\r\n\t\t'linkedin' => 'linkedin',\r\n\t\t'linkedin-square' => 'linkedin-square',\r\n\t\t'linux' => 'linux',\r\n\t\t'maxcdn' => 'maxcdn',\r\n\t\t'openid' => 'openid',\r\n\t\t'pagelines' => 'pagelines',\r\n\t\t'pied-piper' => 'pied-piper',\r\n\t\t'pied-piper-alt' => 'pied-piper-alt',\r\n\t\t'pied-piper-square' => 'pied-piper-square',\r\n\t\t'pinterest' => 'pinterest',\r\n\t\t'pinterest-square' => 'pinterest-square',\r\n\t\t'qq' => 'qq',\r\n\t\t'ra' => 'ra',\r\n\t\t'rebel' => 'rebel',\r\n\t\t'reddit' => 'reddit',\r\n\t\t'reddit-square' => 'reddit-square',\r\n\t\t'renren' => 'renren',\r\n\t\t'share-alt' => 'share-alt',\r\n\t\t'share-alt-square' => 'share-alt-square',\r\n\t\t'skype' => 'skype',\r\n\t\t'slack' => 'slack',\r\n\t\t'soundcloud' => 'soundcloud',\r\n\t\t'spotify' => 'spotify',\r\n\t\t'stack-exchange' => 'stack-exchange',\r\n\t\t'stack-overflow' => 'stack-overflow',\r\n\t\t'steam' => 'steam',\r\n\t\t'steam-square' => 'steam-square',\r\n\t\t'stumbleupon' => 'stumbleupon',\r\n\t\t'stumbleupon-circle' => 'stumbleupon-circle',\r\n\t\t'tencent-weibo' => 'tencent-weibo',\r\n\t\t'trello' => 'trello',\r\n\t\t'tumblr' => 'tumblr',\r\n\t\t'tumblr-square' => 'tumblr-square',\r\n\t\t'twitter' => 'twitter',\r\n\t\t'twitter-square' => 'twitter-square',\r\n\t\t'vimeo-square' => 'vimeo-square',\r\n\t\t'vine' => 'vine',\r\n\t\t'vk' => 'vk',\r\n\t\t'wechat' => 'wechat',\r\n\t\t'weibo' => 'weibo',\r\n\t\t'weixin' => 'weixin',\r\n\t\t'windows' => 'windows',\r\n\t\t'wordpress' => 'wordpress',\r\n\t\t'xing' => 'xing',\r\n\t\t'xing-square' => 'xing-square',\r\n\t\t'yahoo' => 'yahoo',\r\n\t\t'youtube' => 'youtube',\r\n\t\t'youtube-play' => 'youtube-play',\r\n\t\t'youtube-square' => 'youtube-square',\r\n\t\t'ambulance' => 'ambulance',\r\n\t\t'h-square' => 'h-square',\r\n\t\t'hospital-o' => 'hospital-o',\r\n\t\t'medkit' => 'medkit',\r\n\t\t'plus-square' => 'plus-square',\r\n\t\t'stethoscope' => 'stethoscope',\r\n\t\t'user-md' => 'user-md',\r\n\t\t'wheelchair' => 'wheelchair',\r\n\t);\r\n\t\r\n\treturn $icon_list;\r\n}", "title": "" }, { "docid": "82d134b400ca2a7849623ac3ed286ac3", "score": "0.54228556", "text": "function qodef_core_set_custom_font_icon_class_name_for_vc_shortcodes( $shortcodes_icon_class_array ) {\n\t\t$shortcodes_icon_class_array[] = '.icon-wpb-custom-font';\n\t\t\n\t\treturn $shortcodes_icon_class_array;\n\t}", "title": "" }, { "docid": "8ad4edf71465bb846e70b4705d100ca4", "score": "0.54211646", "text": "public function get_icon() {\n return 'fa fa-users';\n }", "title": "" }, { "docid": "d070d476f12815079b1bf6ba58cbc0ac", "score": "0.54149413", "text": "public function register_glyphicons( $post_type ) {\n\t\t$this->styles['glyphicons']['types'][] = $post_type;\n\t\t$dir = SCPT_PLUGIN_URL;\n\t\tif ( !isset( $this->styles['glyphicons']['base'] ) ) {\n\t\t\t$this->styles['glyphicons']['base'] = \"\n\t\t\t@font-face { font-family: 'Glyphicons'; src: url('{$this->plugin_url}/font/glyphicons-regular.eot'); src: url('{$this->plugin_url}/font/glyphicons-regular.eot?#iefix') format('embedded-opentype'), url('{$this->plugin_url}/font/glyphicons-regular.woff') format('woff'), url('{$this->plugin_url}/font/glyphicons-regular.ttf') format('truetype'), url('{$this->plugin_url}/font/glyphicons-regular.svg#glyphicons_halflingsregular') format('svg'); font-weight: normal; font-style: normal; }\n\t\t\t%s { font-family: Glyphicons !important; -webkit-font-smoothing: antialiased; background: none; *margin-right: .3em; }\n\t\t\t%s { font-family: Glyphicons !important; }\n\t\t\t\";\n\t\t\tadd_action( 'scpt_plugin_icon_css', array( $this, 'output_glyphicons' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "6fdd10a30b6c6a122b6a49023887cbb7", "score": "0.5405793", "text": "public function icons() {\n\t\t$icons = $this->_icons();\n\n\t\t$countries = $this->Countries->find('all', ['fields' => ['id', 'name', 'iso2', 'iso3']])->toArray();\n\t\t$countriesWithoutIcons = [];\n\n\t\t$iconFontClass = (bool)Configure::read('Country.iconFontClass');\n\t\tif (!$iconFontClass) {\n\t\t\tforeach ($countries as $country) {\n\t\t\t\t$icon = strtolower($country['iso2']);\n\t\t\t\tif (!isset($icons[$icon])) {\n\t\t\t\t\t$countriesWithoutIcons[] = $country;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->set(compact('icons', 'countries', 'countriesWithoutIcons', 'iconFontClass'));\n\t}", "title": "" } ]
59b48c23a11c420b744ac68d476027e4
Returns a more meaningful message
[ { "docid": "cf1ac198d33da296276d6f007c065ac4", "score": "0.0", "text": "function bookmarks_notify_message($hook, $entity_type, $returnvalue, $params) {\n\t$entity = $params['entity'];\n\t$to_entity = $params['to_entity'];\n\t$method = $params['method'];\n\tif (($entity instanceof ElggEntity) && ($entity->getSubtype() == 'bookmarks')) {\n\t\t$descr = $entity->description;\n\t\t$title = $entity->title;\n\t\tglobal $CONFIG;\n\t\t$url = elgg_get_site_url() . \"pg/view/\" . $entity->guid;\n\t\tif ($method == 'sms') {\n\t\t\t$owner = $entity->getOwnerEntity();\n\t\t\treturn $owner->name . ' ' . elgg_echo(\"bookmarks:via\") . ': ' . $url . ' (' . $title . ')';\n\t\t}\n\t\tif ($method == 'email') {\n\t\t\t$owner = $entity->getOwnerEntity();\n\t\t\treturn $owner->name . ' ' . elgg_echo(\"bookmarks:via\") . ': ' . $title . \"\\n\\n\" . $descr . \"\\n\\n\" . $entity->getURL();\n\t\t}\n\t\tif ($method == 'web') {\n\t\t\t$owner = $entity->getOwnerEntity();\n\t\t\treturn $owner->name . ' ' . elgg_echo(\"bookmarks:via\") . ': ' . $title . \"\\n\\n\" . $descr . \"\\n\\n\" . $entity->getURL();\n\t\t}\n\n\t}\n\treturn null;\n}", "title": "" } ]
[ { "docid": "a663f566e412b6abf3dde3dc0cc23c45", "score": "0.7632373", "text": "public function message()\n {\n return 'The :attribute is too weak. Make it longer and / or more complicated.';\n }", "title": "" }, { "docid": "e074f8bc85705227805a923aba4ff4aa", "score": "0.74710125", "text": "public function message()\n {\n return \"كمية المنتج رقم {$this->error['id']} أكبر من الموجودة في المتجر ... الكمية المتوفرة {$this->error['available']}\";\n }", "title": "" }, { "docid": "fae8ac24a08d6391df72091880a88675", "score": "0.7451311", "text": "public function toString()\n {\n return 'Duplicated integration name error message is correct.';\n }", "title": "" }, { "docid": "c875a304f775c9d966a49e6cbad89d3c", "score": "0.73566693", "text": "public function message()\n {\n return 'The amount can not be greater than the value of the ' . $this->name . '.';\n }", "title": "" }, { "docid": "dfb6e3a71ff128535b297909b8a51f77", "score": "0.73552346", "text": "public function message()\n {\n return 'error ';\n }", "title": "" }, { "docid": "dbfd07a98cc26740dc4833179d6b59c9", "score": "0.73386", "text": "public function message()\n {\n return 'The :attribute has contain harmful data.';\n }", "title": "" }, { "docid": "15fefca7624ce11357a0fd95fa1f92ac", "score": "0.7316679", "text": "public function message()\n {\n return ':attribute را به فارسی وارد کنید.';\n }", "title": "" }, { "docid": "821c47852f7efc4b26db17f928e17986", "score": "0.7308368", "text": "public function message()\n {\n // return 'That :attribute does not exist.';\n return 'Unable to find user for the given email address.';\n }", "title": "" }, { "docid": "c2cddfcc6246b7e8a8b3a12519c04e2c", "score": "0.7282032", "text": "public function get_error_message() {\n\t\t$message = $this->echotype2;\n\t\t$message = str_replace(array(\"<br>\", \"<hr>\"), \". \", $message);\n\t\t$message = str_replace(\"Processed by Electronic Clearing House\", \"\", $message);\n\t\t\n\t\t$message = strip_tags($message);\n\t\t\n\t\treturn $message;\n\t}", "title": "" }, { "docid": "4f08ea90980b6622f0df55a8dbcdbb59", "score": "0.72657055", "text": "public function __toString()\n {\n return sprintf('Warning: %s (code: %s)', $this->message, $this->code);\n }", "title": "" }, { "docid": "920ba1c1a0d281f86903f2c9d784fe01", "score": "0.7262724", "text": "public function message()\n {\n\n return $this->message?:\"Please Check Your Data\";\n }", "title": "" }, { "docid": "7c21a6976fab2bd820c7b88d4b357221", "score": "0.7227326", "text": "public function message()\r\n {\r\n return 'The '.$this->msg_field.' is already exist in selected '.$this->rel_msg_field.'.';\r\n }", "title": "" }, { "docid": "2698ad3171ae58a7b60d12073a829a49", "score": "0.72210175", "text": "public function message()\n {\n return 'کد پستی وارد شده تکراری است';\n }", "title": "" }, { "docid": "af509c27d28d4d5eebfc2f87009b7245", "score": "0.72190565", "text": "#[Pure]\n public function getErrorMSG(): string\n {\n return Checker::$ERROR_MSG . \"<b> <mark> {$this->configurationDB->getErrorID()} </mark></b>\" ;\n }", "title": "" }, { "docid": "81248e0b4c4185803dc32d7d80865bc8", "score": "0.72113407", "text": "public function errorMessage()\n\t{\n\t\treturn 'There was some error when generating the code. Please check the following messages.';\n\t}", "title": "" }, { "docid": "b35aed60105e3ec214303f8f12a05d81", "score": "0.72061944", "text": "public function message()\n {\n return 'The Chechbox field is invalid.';\n }", "title": "" }, { "docid": "cce89792ef84aa34ac5d239a18f9ec5d", "score": "0.719926", "text": "function error_message ( ) {\n\t\t$err = $this->error;\n\t\t$this->error = FALSE;\n\t\treturn $err;\n\t}", "title": "" }, { "docid": "6c604d28af263f8e80bc61733cd252b6", "score": "0.71920663", "text": "public function message()\n {\n return 'Существует такой водитель и ГОС номер автомобиля.';\n }", "title": "" }, { "docid": "f5cdba8635c16b7e040cc69fa3a32372", "score": "0.71776205", "text": "public function getDiagnosticMessage();", "title": "" }, { "docid": "25a8c10b636694ef26701fd333f08539", "score": "0.7167243", "text": "public function message()\n {\n return 'kesalahan ada pada ' .$this->baris . ' dengan deskripsi '. $this->string;\n }", "title": "" }, { "docid": "b3909d4ea081e7d8a68db14564b2d59f", "score": "0.7164783", "text": "protected function makeErrorMessage() : string\n {\n return Text::of(debug_backtrace()[3]['function'])\n ->append(' this ')\n ->append(debug_backtrace()[3]['class'])\n ->replace('App\\\\Policies\\\\', '')\n ->replace('Policy', '')\n ->lower()\n ->prepend('You cannot ')\n ->toString();\n }", "title": "" }, { "docid": "39107a7715101164d6f7f26436d48cdb", "score": "0.7163707", "text": "public function ruinMessage(): string\n {\n return $this->getMessage();\n }", "title": "" }, { "docid": "ebd0fe31b4d9d7bfb6d41278bf0cf1fc", "score": "0.71608895", "text": "public function getDetail()\n\t{\n\t\treturn null === $this->sender ? '' : sprintf('Thrown when working with \"%s\".', $this->sender->getPrettyName());\n\t}", "title": "" }, { "docid": "80cd1fccf8787584706a93b38a530ca8", "score": "0.7127366", "text": "public function message()\n {\n return $this->error_msg;\n }", "title": "" }, { "docid": "aa9afec3486fc6b31e7e569337110496", "score": "0.7107185", "text": "public function message() {\n return t('error', 'Not all IDs were found.');\n }", "title": "" }, { "docid": "2ac6c07930fe4cb6591f1f9cf3ec2c8e", "score": "0.7098479", "text": "public function getMessage(): string\n {\n return $this->getLabel() . \": \" . $this->getValue();\n }", "title": "" }, { "docid": "8c484d34c46661d41b15a20fd71e90b0", "score": "0.7096685", "text": "public function message()\n {\n return \"{$this->messageKey} is already taken\";\n }", "title": "" }, { "docid": "6b53aeb4934e955d2ada104300dd484d", "score": "0.70870215", "text": "public function message()\n {\n return 'The :attribute isn’t in a confirmed status, is in stock or return';\n }", "title": "" }, { "docid": "2943c96848162d662e49643e628437a4", "score": "0.70805234", "text": "public function message()\n {\n return 'Zasób istnieje już na tym magazynie lub jego nazwa nie jest prawidłowa.';\n }", "title": "" }, { "docid": "2a2f235da659cc438e06265a60d8ff84", "score": "0.7075685", "text": "public function message() {\n\t\treturn Mage::helper('eloom_payment')->__($this->message);\n\t}", "title": "" }, { "docid": "255c7fc9217d21bc4ec4e6b12b349a20", "score": "0.70705986", "text": "private function getMessageTemplate()\n {\n return 'Undefined error code :errorCode.';\n }", "title": "" }, { "docid": "fee852d19d36c9f3856e2114cbc24bb1", "score": "0.70679915", "text": "public function message()\n {\n return 'The at least pre-payment is not observed';\n }", "title": "" }, { "docid": "08c9356aa2500b4b3b8a167d25ee519b", "score": "0.70668405", "text": "public function message()\n {\n return 'Duplicate absences are not allowed.';\n }", "title": "" }, { "docid": "599d2236d99689974c75aa9f890ec689", "score": "0.7064164", "text": "final public function getMessage () {}", "title": "" }, { "docid": "97540e492c725086c948fb6476d85441", "score": "0.706229", "text": "public function message()\n {\n return 'The tag(s) selected is invalid or does not exist.';\n }", "title": "" }, { "docid": "3cb7931f94a2936d503ac16825d6b7a9", "score": "0.705938", "text": "public function message()\n {\n return 'An entry with this ' . $this->column1 . ' and ' . $this->column2 . ' already exists.';\n }", "title": "" }, { "docid": "be0f59013c33b5e133b39e827cf9b9f7", "score": "0.70499873", "text": "public function message()\n {\n return 'Invalid company id.';\n }", "title": "" }, { "docid": "84ba63ff1a64f9e400f3e6dd22e73d2f", "score": "0.70471406", "text": "public function getMessage() : string\n {\n return 'This commit message is fine, but the others are not so good.';\n }", "title": "" }, { "docid": "e817ffb76f3e45cffdfba03f40b483f5", "score": "0.70456594", "text": "public function errorMessage()\n {\n return '<strong>' . htmlspecialchars($this->getMessage()) . \"</strong><br />\\n\";\n }", "title": "" }, { "docid": "a496cd104aef22b16f8543c6017e700a", "score": "0.7042491", "text": "public function getMessage()\n {\n $show_notice=intval(Mage::getStoreConfig('general/cleantalk/show_notice'));\n $message='';\n if($show_notice==1)\n {\n \t$message = \"Like Anti-spam by CleanTalk? Help others learn about CleanTalk! <a target='_blank' href='http://www.magentocommerce.com/magento-connect/antispam-by-cleantalk.html'>Leave a review at the Magento Connect</a> <a href='?close_notice=1' style='float:right;'>Close</a>\";\n } \n return $message;\n }", "title": "" }, { "docid": "df557654e0c3d85566ac732141bc7846", "score": "0.7024694", "text": "public function message()\n {\n return 'Sponsor Doesnt Exist';\n }", "title": "" }, { "docid": "ac5d517c133e8f72834008ef26e1c79f", "score": "0.70142275", "text": "public function message()\n {\n return __($this->product->sku . '. There is not enough product in stock.');\n }", "title": "" }, { "docid": "9b31b57d882f5838180ea43e90b1fd2b", "score": "0.7014119", "text": "public function message()\n {\n return 'The credentials provided are incorrect. Please verify the settings of all fields.';\n }", "title": "" }, { "docid": "1fffbd399062961fcec7bd1962bdae63", "score": "0.70100844", "text": "public function message() {\n\t\treturn 'Your :attribute is invalid!';\n\t}", "title": "" }, { "docid": "7a34497bd10cb0fbcdf3a4826ee7e9fe", "score": "0.70004565", "text": "public function message()\n {\n return 'В данное время компания не работает';\n }", "title": "" }, { "docid": "fcda8f68974790696b92a6492aa18ea8", "score": "0.6999695", "text": "public function message()\n {\n return 'The :attribute is not valid.';\n }", "title": "" }, { "docid": "13bb68a333959a25655fc4b50728d081", "score": "0.6998876", "text": "public function message()\n {\n return $this->error_message;\n }", "title": "" }, { "docid": "65f2489a03cad3d30f57eb1149a44223", "score": "0.6992029", "text": "public function message()\n {\n return \"The :attribute doesn't exists \" ;\n }", "title": "" }, { "docid": "203991ea138ac3a9fb944f15231e3d29", "score": "0.69853747", "text": "public function message()\n {\n return trans('validation.has_spacejp');\n }", "title": "" }, { "docid": "e6506d6271b93871c6d20a47983d08cf", "score": "0.6974608", "text": "public function toString()\n {\n return \"Correct message is displayed after refreshing lifetime statistics.\";\n }", "title": "" }, { "docid": "a98164ec025fd1a92de491fee7c8c837", "score": "0.6972272", "text": "function getErrorMsg() {\n\t\treturn '<p>Error: (' . $this->_error_code . ') ' . $this->_error_msg . '</p>';\n\t}", "title": "" }, { "docid": "985528b81d397dc21429f367065e8357", "score": "0.6969706", "text": "public function message()\n {\n return 'کد ملی وارد شده نامعتبر است';\n }", "title": "" }, { "docid": "d8b62c7be28d015eaf0eaf1294301caf", "score": "0.6960571", "text": "public function message()\n {\n return 'The REASON selected is not valid. Chose one from the options given.';\n }", "title": "" }, { "docid": "3d03e76f0a71fd9b240b17b059e65190", "score": "0.69569445", "text": "public function message()\n {\n return 'The Contact Number should be unique or same as old one';\n }", "title": "" }, { "docid": "340904bd769716db8f2f3cf6436d6ddd", "score": "0.69547325", "text": "public function message()\r\n {\r\n if(isset($this->notExist))\r\n {\r\n return trans('baseRestValidation.attributes.sortableAndSearchableExist', ['value' => $this->value]); \r\n }\r\n\r\n return trans('baseRestValidation.attributes.sortableAndSearchable', ['value' => $this->value]);\r\n }", "title": "" }, { "docid": "3a52f708b1b0ffd04c2cea61a042d2bc", "score": "0.69542104", "text": "public function message()\n {\n return'Ce :attribute est déja utilisé.';\n }", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.69533426", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.69533426", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.69533426", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.69533426", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.69533426", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.69533426", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.69533426", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.69533426", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.69533426", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.69533426", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.69533426", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.69533426", "text": "public function getMessage();", "title": "" }, { "docid": "1be3d35fca9aad8e477db56e68e7e9af", "score": "0.69533426", "text": "public function getMessage();", "title": "" }, { "docid": "156971baa7708b3b0e63e5a684745cef", "score": "0.6950928", "text": "public function message()\n {\n return 'Please ensure that you are a human!';\n }", "title": "" }, { "docid": "7af128639282d9547d5a94229046a521", "score": "0.69226503", "text": "public function message()\n {\n return 'This value should be between ' . $this->_minvalue . '-' . $this->_maxvalue;\n }", "title": "" }, { "docid": "24dbeae2b7049ad0d5b451f449118e3a", "score": "0.6922584", "text": "public function message()\n {\n return 'The number of API uses requested is too high.';\n }", "title": "" }, { "docid": "10b553f855f83b8b7402cb6d2b1ea690", "score": "0.6921858", "text": "public function message()\n {\n return 'this is not a valid post code';\n }", "title": "" }, { "docid": "8376b5684c066c400f2fbbf7e6737093", "score": "0.6908973", "text": "public function message()\n {\n return 'Ocorreu um erro com a validação do formulário.';\n }", "title": "" }, { "docid": "983a913bcf04aadffa35227583193911", "score": "0.69039446", "text": "protected function getMessage(){\n\t\treturn 'Factura no existe.';\n\t}", "title": "" }, { "docid": "c25513df9209914d723cdf03b722bd1a", "score": "0.6903463", "text": "public function message()\n {\n return 'The key name should be unique.';\n }", "title": "" }, { "docid": "894434d50efe6dc1b9859b2a816f7658", "score": "0.689806", "text": "public function message()\n {\n return 'Age must be less than 100';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.6897554", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.6897554", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "01cf79dd69eebaf03769e12eb3208858", "score": "0.68949884", "text": "public function message()\n {\n return trans('validation.rut');\n }", "title": "" }, { "docid": "9d2c6140ae311d82c7ba790fb6796fba", "score": "0.68930805", "text": "public function message()\n {\n return 'The :attribute already exists.';\n }", "title": "" }, { "docid": "9f1585fbb0e5a1333aab0261f52cb959", "score": "0.68898016", "text": "public function message()\n {\n return 'The name slug url is already exist.';\n }", "title": "" }, { "docid": "a20a3fe7ad5abab36b3ea88b822ecf26", "score": "0.6875289", "text": "protected function getMessage()\n {\n switch ($this->method) {\n default:\n return get_class($this->model) . ' ' . $this->method . 'd.';\n }\n }", "title": "" }, { "docid": "87190363e180ae034d11cceb9e8f3b78", "score": "0.6874603", "text": "public function message() : string\n {\n return $this->getLocalizedErrorMessage(\n 'alpha_space_dot',\n 'The :attribute should only have letters, spaces and dots'\n );\n }", "title": "" }, { "docid": "14508eaa24f387687925561a6f976829", "score": "0.68742007", "text": "public function message()\n {\n return Lang::get('notification.duplicate',['attribute' => Lang::get(':attribute')]);\n }", "title": "" }, { "docid": "af70220debdf370eed74c6fd2e7d9e8b", "score": "0.6871904", "text": "public function message()\n {\n return 'O nivel deve ser Ensino Médio ou Ensino Fundamental.';\n }", "title": "" }, { "docid": "f8ec86e0f894a5f28e980848332ed006", "score": "0.6871469", "text": "public function message()\n {\n return 'The specified username is already taken.';\n }", "title": "" }, { "docid": "9759736fdde7f48f0fcacead49ff7112", "score": "0.6867958", "text": "public function message()\n {\n return $this->error;\n }", "title": "" }, { "docid": "a6d55faf3dd135bc48e90e6328dd9507", "score": "0.6865275", "text": "public function message()\n {\n return __(':value :attribute repeating in form data.', [\n 'value' => $this->value,\n 'attribute' => __('messages.' . $this->attribute)\n ]);\n }", "title": "" }, { "docid": "9989d20efc96aff72a4da7641b05a907", "score": "0.68602014", "text": "public function message()\n {\n return 'O campo placa do carro não é válido.';\n }", "title": "" }, { "docid": "2559f331b4867e191835b9497ae6005f", "score": "0.68536335", "text": "public function message()\n {\n return l(\n 'This Price List Line for the specified Currency and Measure Unit already exists.',\n 'validationrules'\n );\n }", "title": "" }, { "docid": "89530f011b362a7a5f23bede47fd66fd", "score": "0.68423694", "text": "public function message()\n {\n return trans('The :attribute is not a valid CVC/CVD');\n }", "title": "" }, { "docid": "a48e66bd40a6d11fb16850ab292dc9e7", "score": "0.6836479", "text": "public function message(): string\n {\n return $this->amount <= 0\n ? ($this->type === Transaction::PAYMENT ? __('The order is fully paid.') : __('The order is fully refunded.'))\n : __('The :attribute must be less than :value.', ['value' => $this->amount]);\n }", "title": "" }, { "docid": "c199638214ce5bdeb53225d7c57e23b5", "score": "0.68341744", "text": "public function message()\n {\n return 'The measurement unit must be valid use only KG, Liter or Quantity.';\n }", "title": "" }, { "docid": "d6c434095ffbee7872e41cfe3cc64896", "score": "0.6830246", "text": "public function message()\n {\n return __('validation.cpf');\n }", "title": "" }, { "docid": "629e149f89fbaff3ff52310ce4f16195", "score": "0.6829008", "text": "public function getMessage()\n {\n return 'a flat file message';\n }", "title": "" }, { "docid": "72f1de8d10684bb9c8a9fccfd16638df", "score": "0.6826567", "text": "public function message()\n {\n return \"Subjek yang anda pilih tidak terdaftar dalam database\";\n }", "title": "" }, { "docid": "6f5da79f80e716cf70c9eef0df9ae770", "score": "0.68122435", "text": "public function message()\n\t{\n\t\tif ($this->attribute == 'category_id') {\n\t\t\t$message = trans('validation.custom_field_unique_parent_rule', [\n\t\t\t\t'field_1' => trans('admin::messages.category'),\n\t\t\t\t'field_2' => trans('admin::messages.custom field'),\n\t\t\t]);\n\t\t} else {\n\t\t\t$message = trans('validation.custom_field_unique_parent_rule_field', [\n\t\t\t\t'field_1' => trans('admin::messages.custom field'),\n\t\t\t\t'field_2' => trans('admin::messages.category'),\n\t\t\t]);\n\t\t}\n\t\t\n\t\treturn $message;\n\t}", "title": "" }, { "docid": "4202278c709da5b4d275f434baf4f75a", "score": "0.68098074", "text": "public function message()\n {\n return \":attribute が不正な値です\";\n }", "title": "" }, { "docid": "f75f80c6e1f0cd47ce712e8f1a866e39", "score": "0.6808929", "text": "public function message()\n {\n return 'Status inválido, com este valor só é permitido alterar para: '.\n (implode(',', $this->rulesChanges[$this->oldStatus]));\n }", "title": "" }, { "docid": "fbccef6a6a2f29167f0f612a23f76a97", "score": "0.6805393", "text": "public function message()\n {\n return 'The :attribute is not valid Id Kecamatan';\n }", "title": "" } ]
1158b87a0e0dfbbdd6c9270a5f2824b2
Create a new policy instance.
[ { "docid": "e0b04e672070d25c63b228ecce652174", "score": "0.0", "text": "public function __construct()\n {\n //\n }", "title": "" } ]
[ { "docid": "7c774e34d0d398d9838bca5cb6b799ea", "score": "0.76508546", "text": "protected function createPolicy() {\n $policy = Str::studly(class_basename($this->argument('name')));\n\n $this->call('make:policy', [\n 'name' => \"{$policy}Policy\",\n '--model' => $this->qualifyClass($this->getNameInput()),\n ]);\n }", "title": "" }, { "docid": "7ba5c6e1685ffa7c1029ada117fa5981", "score": "0.62485796", "text": "public function createPolicy(array $options = []): array;", "title": "" }, { "docid": "bf0b11d1084056e14e052f3e3fff8fab", "score": "0.62186074", "text": "public function create($parent, PlatformPolicy $postBody, $optParams = [])\n {\n $params = ['parent' => $parent, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], PlatformPolicy::class);\n }", "title": "" }, { "docid": "23f1e08b23007439a7ce34ab3003bd8d", "score": "0.612905", "text": "public function createPolicy($rules)\n { \n if (is_array($rules)) {\n foreach ($rules as $key => $value) {\n switch ($key) {\n case 'min_length':\n $this->minLength($value); break;\n case 'max_length':\n $this->maxLength($value); break;\n case 'upper_case':\n $this->upperCase($value); break;\n case 'lower_case':\n $this->lowerCase($value); break;\n case 'digits':\n $this->digits($value); break;\n case 'special_chars': \n $this->specialCharacters($value); break;\n case 'does_not_contain':\n if (!is_array($value)) $value = explode(',',$value);\n $this->doesNotContain($value); break;\n default: \n break;\n } \n }\n }\n return $this->policy;;\n }", "title": "" }, { "docid": "42b2bff1570b05e58b68aa66ed8e458d", "score": "0.58658373", "text": "public function policy($class, $policy): Rucks\n {\n $this->policies[$class] = $policy;\n\n return $this;\n }", "title": "" }, { "docid": "65d9e32a4a1c27549e7c51744d45d5fe", "score": "0.5715646", "text": "public function policy($class, $policy)\n {\n throw new NotImplementedException(\n \"It's not possible to set policies through the standard Gate. Use Gatekeeper instead.\"\n );\n }", "title": "" }, { "docid": "cc7d397be592ba3f1fbb7c6dea6bd04b", "score": "0.56154937", "text": "public function buildDomainPolicyObject(PSPolicy $psPolicy)\n {\n $policyLimitations = array();\n if ($psPolicy->service !== '*' && $psPolicy->function !== '*' && $psPolicy->limitations !== '*') {\n foreach ($psPolicy->limitations as $identifier => $values) {\n $policyLimitations[] = $this->limitationService->getLimitationType($identifier)->buildValue($values);\n }\n }\n\n $policy = new Policy(\n array(\n 'id' => $psPolicy->id,\n 'roleId' => $psPolicy->roleId,\n 'service' => $psPolicy->service,\n 'function' => $psPolicy->function,\n 'limitations' => $policyLimitations,\n )\n );\n\n // Original ID is set on PS policy, which means that it's a draft.\n if ($psPolicy->originalId) {\n $policy = new PolicyDraft(['innerPolicy' => $policy, 'originalId' => $psPolicy->originalId]);\n }\n\n return $policy;\n }", "title": "" }, { "docid": "eca1a5971b1f898773c78d90c85d11bc", "score": "0.55191106", "text": "public function getPolicyService()\n {\n }", "title": "" }, { "docid": "c14454a5b39e4e799d242ef26e3f873b", "score": "0.5494883", "text": "public function withPolicy(AuthorizationPolicy $policy): static\n {\n $this->policies->registerPolicy($policy);\n\n return $this;\n }", "title": "" }, { "docid": "dc76864b411af7bd3cd23945180cc910", "score": "0.536312", "text": "public function create()\n {\n $policies = $this->getAvailablePolicies();\n /*TODO :: in the future if we add search functionality\n *\n * $policy = Policy::find($id);\n\n if (!isset($policy) && !empty($policy)) {\n return redirect()->back()->withErrors(['policy_id.required', 'Не правильный полис']);;\n }*/\n\n return view('pretensii.create', compact('policies'));\n }", "title": "" }, { "docid": "60ae130057fbb22d784beca7e5dc7186", "score": "0.53410894", "text": "protected function newPermissionInstance()\n {\n return new $this->permission;\n }", "title": "" }, { "docid": "64ddb9e23cc130ae14adeb2a0d190b0d", "score": "0.5324749", "text": "public function setAuthorizationPolicy($val)\n {\n $this->_propDict[\"authorizationPolicy\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "641bb8271fe0c6451abddc685f50742b", "score": "0.5322891", "text": "public function create(){\n\n\t\t$_SESSION ['logger']->debug ( __CLASS__ . '-' . __METHOD__ . ' begin' );\n\n\t\t$claimType = new ManualClaimType();\n\n\t\t$creator = new ManualClaimCreator($claimType);\n\n\t\t$_SESSION ['logger']->debug ( __CLASS__ . '-' . __METHOD__ . ' end' );\n\n\t\treturn $creator;\n\n\t}", "title": "" }, { "docid": "c60da14e655ce44224436cbcb5699f02", "score": "0.5312161", "text": "public function assignPolicy(...$policies)\n {\n $policies = collect($policies)\n ->flatten()\n ->map(function ($role) {\n if (empty($role)) {\n return false;\n }\n\n return $this->getStoredPolicy($role);\n })\n ->filter(function ($role) {\n return $role instanceof Policy;\n })\n ->each(function ($role) {\n $this->ensureModelSharesGuard($role);\n })\n ->map->id\n ->all();\n\n $model = $this->getModel();\n\n if ($model->exists) {\n $this->policies()->sync($policies, false);\n $model->load('policies');\n } else {\n $class = \\get_class($model);\n\n $class::saved(\n function ($object) use ($policies, $model) {\n $model->policies()->sync($policies, false);\n $model->load('policies');\n }\n );\n }\n\n $this->forgetCachedPermissions();\n\n return $this;\n }", "title": "" }, { "docid": "6e63523a8ed15f10a08878a5904c4620", "score": "0.5309307", "text": "public static function create()\n {\n return new self;\n }", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5293763", "text": "public function create() {}", "title": "" }, { "docid": "ad50c24a0e04c9fc2ee297b0f6da845a", "score": "0.52681684", "text": "function newPR($options = 0) {\n return getenv('PROFILER')\n ? new PolicyResolverProfiler(getenv('PROFILER_DETAILS') ? ($options | PolicyResolverProfiler::PRIORITY_DETAILS) : $options)\n : new PolicyResolver($options);\n}", "title": "" }, { "docid": "8f37586164f7a683b14b266e4a79b938", "score": "0.5266865", "text": "public function registerPolicy(string $entityClass, string $policyClass): void;", "title": "" }, { "docid": "95d40a938bd84f04ad1ff4360d212ae4", "score": "0.5246916", "text": "public function getPolicy($url)\n {\n if (!$this->getConfig('DateLessThan')) return null;\n\n // create statment\n $statement = (object) ['Resource' => null,'Condition' => []];\n\n // set conditions\n // resource\n $statement->Resource = $this->getConfig('Resource')? $this->getConfig('Resource'): $url;\n // DateLessThan\n $statement->Condition['DateLessThan'] = ['AWS:EpochTime' => time() + $this->getConfig('DateLessThan') ];\n // DateGreaterThan\n if ($this->getConfig('DateGreaterThan')) $statement->Condition['DateGreaterThan'] = ['AWS:EpochTime' => time() + $this->getConfig('DateGreaterThan') ];\n // IpAddress\n if ($this->getConfig('IpAddress') && !Configure::read('debug')) $statement->Condition['IpAddress'] = ['AWS:SourceIp' => Router::getRequest()->clientIp().'\\32' ];\n\n // JSON policy\n $policy = json_encode((object) [\n 'Statement' => [$statement]\n ]);\n\n // return\n return $policy;\n }", "title": "" }, { "docid": "a18b7d9486bd9d96c563b96e1fa9575d", "score": "0.52379805", "text": "public function getPolicy()\n {\n return 'some_policy'; //read\n }", "title": "" }, { "docid": "74cd13a663f0a37cd9c85f2bd0c10a24", "score": "0.52376395", "text": "public function createPolicy(User $user)\n {\n return $user->may(static::PERMISSION_CREATE);\n }", "title": "" }, { "docid": "74cd13a663f0a37cd9c85f2bd0c10a24", "score": "0.52376395", "text": "public function createPolicy(User $user)\n {\n return $user->may(static::PERMISSION_CREATE);\n }", "title": "" }, { "docid": "7aaa3c677d124590bb0f9861104ac428", "score": "0.52340764", "text": "protected function loadPolicy($class, $policy)\n {\n Gate::policy($class, $policy);\n }", "title": "" }, { "docid": "846d24762064780c049f49f8c372e8a7", "score": "0.52253515", "text": "public function getPolicy()\n {\n return $this->policy;\n }", "title": "" }, { "docid": "846d24762064780c049f49f8c372e8a7", "score": "0.52253515", "text": "public function getPolicy()\n {\n return $this->policy;\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "fe36fb5fa08022b4e6d81bfbe4719aa9", "score": "0.5222868", "text": "public static function create()\n {\n return new self();\n }", "title": "" }, { "docid": "e9e1b2343ee9a7f0b883577af7d13552", "score": "0.5204189", "text": "public static function create() {\n $instance = new self();\n return $instance;\n }", "title": "" }, { "docid": "c11e2df590fd76a8007c182217b35782", "score": "0.52013534", "text": "public function retentionPolicy(string $rp):self\n {\n $this->retentionPolicy = $rp;\n\n return $this;\n }", "title": "" }, { "docid": "b8450023a880a9f8a765e07d71506780", "score": "0.51951665", "text": "function policy($class)\n {\n return app(Gate::class)->getPolicyFor($class);\n }", "title": "" }, { "docid": "b8450023a880a9f8a765e07d71506780", "score": "0.51951665", "text": "function policy($class)\n {\n return app(Gate::class)->getPolicyFor($class);\n }", "title": "" }, { "docid": "16fa677aca458ddeb015db2b98d1d017", "score": "0.5190787", "text": "public static function create() {\n return new self();\n }", "title": "" }, { "docid": "16fa677aca458ddeb015db2b98d1d017", "score": "0.5190787", "text": "public static function create() {\n return new self();\n }", "title": "" }, { "docid": "e8745038cc8232626b0cc60e59a585b8", "score": "0.5185676", "text": "public function setSecurityPolicy(SecurityPolicy $policy = null);", "title": "" }, { "docid": "113ab6e1386e00521455d66c490eb9ae", "score": "0.51834416", "text": "static public function create()\n {\n return new self();\n }", "title": "" }, { "docid": "e4b9b8faa8ac9d9579590382659dc1b4", "score": "0.5175925", "text": "public static function create();", "title": "" }, { "docid": "1d8a17a7721c9decc9c6f39f12788456", "score": "0.51679546", "text": "public function store(Request $request)\n {\n\t\tdate_default_timezone_set('Asia/Manila');\n $this->validate($request, [\n 'category' => 'required',\n 'type' => 'required',\n 'policy_description' => 'required'\n ]);\n $policy = new Policy;\n $policy->category = $request-> input('category');\n $policy->type = $request-> input('type');\n $policy->policy_description = $request-> input('policy_description');\n $policy->created_at = Carbon::now();\n $policy->updated_at = Carbon::now();\n // $policy->category = 'Gym';\n // $policy->type = 'chest';\n // $policy->policy_description = 'thom yorke';\n // $policy->points = 20;\n $policy->save();\n \n\n return redirect('/gamification')->with('success', 'Gamification Policy created!');\n }", "title": "" }, { "docid": "8532a2c86c38d2315dadbe85b969f7fa", "score": "0.516621", "text": "public function retentionPolicy($rp)\n {\n $this->retentionPolicy = $rp;\n\n return $this;\n }", "title": "" }, { "docid": "6f1603d4fd72f463fa42d302c9bcea76", "score": "0.5162618", "text": "public function __construct()\n\t{\n\t\t$policies = UserPermissions::getPolicies();\n\t\t$this->policyKey = UserPermissions::getModelShortName( (array_search(EmailPolicy::class, $policies)) );\n\t}", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.51464254", "text": "public function create();", "title": "" }, { "docid": "b99762f5feebdc923eabce5498d5c827", "score": "0.5144596", "text": "public function policy()\n {\n return $this->belongsTo('App\\Models\\Api\\v1\\Product', 'n_PolicyNoId_FK')->withDefault();\n }", "title": "" }, { "docid": "e524de8e8ce4ac5ee86b8cf26ed17864", "score": "0.51383084", "text": "public static function create(): self\n {\n return new self();\n }", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.51305", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.51305", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.51305", "text": "public function create(){}", "title": "" }, { "docid": "c736c3e75b979f0218a1e2ff7e13cbb6", "score": "0.5118205", "text": "public function getPolicy() {\n\t\treturn $this->policy;\n\t}", "title": "" }, { "docid": "50c072ee9246eb0cb7f6f05291bb82c4", "score": "0.511142", "text": "public function create() {\n // Not needed currently\n }", "title": "" }, { "docid": "41ba3a09add8be99d2b82e25dac3ca53", "score": "0.5091932", "text": "public static function create(...$params)\n {\n return new static(...$params);\n }", "title": "" }, { "docid": "70f59df84c82312249912a8b9d920be0", "score": "0.5047697", "text": "public function create()\n\t\t {\n\t\t\t\t//\n\t\t }", "title": "" }, { "docid": "5d36b724c75758c15519aca4d30b1016", "score": "0.5032227", "text": "public function createPolicyGroup($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->createPolicyGroupWithOptions($request, $runtime);\n }", "title": "" }, { "docid": "56ca1ceda8ee3437c7830a0fd83cd1f9", "score": "0.50312907", "text": "public static function create()\n {\n return new static();\n }", "title": "" }, { "docid": "56ca1ceda8ee3437c7830a0fd83cd1f9", "score": "0.50312907", "text": "public static function create()\n {\n return new static();\n }", "title": "" }, { "docid": "56ca1ceda8ee3437c7830a0fd83cd1f9", "score": "0.50312907", "text": "public static function create()\n {\n return new static();\n }", "title": "" }, { "docid": "56ca1ceda8ee3437c7830a0fd83cd1f9", "score": "0.50312907", "text": "public static function create()\n {\n return new static();\n }", "title": "" }, { "docid": "56ca1ceda8ee3437c7830a0fd83cd1f9", "score": "0.50312907", "text": "public static function create()\n {\n return new static();\n }", "title": "" }, { "docid": "56ca1ceda8ee3437c7830a0fd83cd1f9", "score": "0.50312907", "text": "public static function create()\n {\n return new static();\n }", "title": "" }, { "docid": "56ca1ceda8ee3437c7830a0fd83cd1f9", "score": "0.50312907", "text": "public static function create()\n {\n return new static();\n }", "title": "" }, { "docid": "56ca1ceda8ee3437c7830a0fd83cd1f9", "score": "0.50312907", "text": "public static function create()\n {\n return new static();\n }", "title": "" }, { "docid": "56ca1ceda8ee3437c7830a0fd83cd1f9", "score": "0.50312907", "text": "public static function create()\n {\n return new static();\n }", "title": "" }, { "docid": "56ca1ceda8ee3437c7830a0fd83cd1f9", "score": "0.50312907", "text": "public static function create()\n {\n return new static();\n }", "title": "" }, { "docid": "ef93a500b42361165bbd6b9c739efd5c", "score": "0.5030016", "text": "public static function create() {\n return new static();\n }", "title": "" } ]
9b7640e61d0e8428ccc25fbff9bf5437
add plugin prefs to database
[ { "docid": "4c113aac8add690b476dbab58ee0c87e", "score": "0.51811284", "text": "function abl_droploader_prefs($event, $step) {\n\t\tif (function_exists('soo_plugin_pref')) {\n\t\t\tsoo_plugin_pref($event, $step, abl_droploader_defaults());\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$msg = 'Please install <em>soo_plugin_pref</em> to edit preferences (Default preferences apply).';\n\t\t\tpagetop(gTxt('edit_preferences') . \" &#8250; abl_droploader\", $msg);\n\t\t\t$default_prefs = abl_droploader_defaults();\n\t\t\t$html = '<table id=\"list\" align=\"center\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\">\n<thead>\n<tr>\n<th colspan=\"2\"><h1>DropLoader default preferences</h1></th>\n</tr>\n<tr>\n<th>Option</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n';\n\t\t\tforeach ($default_prefs as $key => $pref) {\n\t\t\t\t$html .= '<tr>\n<td>' . htmlspecialchars($pref['text']) . '</td>\n<td>' . htmlspecialchars($pref['val']) . '</td>\n</tr>\n';\n\t\t\t}\n\t\t\t$html .= '</tbody>\n</table>\n';\n\t\t\techo $html;\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "d2899d76a677fc465df6d484b5b0d1b8", "score": "0.72845775", "text": "function save_addon_prefs(){\n\t\tglobal $sql,$pref;\n// $query = \"SELECT * FROM #plugin WHERE plugin_installflag = 1 AND plugin_addons !='' ORDER BY plugin_path ASC\";\n $query = \"SELECT * FROM #plugin WHERE plugin_addons !='' ORDER BY plugin_path ASC\";\n\n\t\t// clear all addon prefs before re-creation. \n\t\tunset($pref['shortcode_list'],$pref['bbcode_list'],$pref['e_sql_list']);\n foreach($this->plugin_addons as $plg)\n\t\t{\n \tunset($pref[$plg.\"_list\"]);\n\t\t}\n\n\t\tif ($sql -> db_Select_gen($query))\n\t\t{\n\t\t\twhile($row = $sql-> db_Fetch())\n\t\t\t{\n\t\t\t $is_installed = ($row['plugin_installflag'] == 1 );\n $tmp = explode(\",\",$row['plugin_addons']);\n\t\t\t\t$path = $row['plugin_path'];\n\n\t\t\t if ($is_installed)\n\t\t\t {\n \t\tforeach($this->plugin_addons as $val)\n\t\t\t\t{\n \tif(in_array($val,$tmp))\n\t\t\t\t\t{\n \t\t\t\t\t\t$pref[$val.\"_list\"][$path] = $path;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t }\n // search for .bb and .sc files.\n\t\t\t\t$sc_array = array();\n\t\t\t\t$bb_array = array();\n\t\t\t\t$sql_array = array();\n\n foreach($tmp as $adds)\n\t\t\t\t{\n \tif(substr($adds,-3) == \".sc\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$sc_name = substr($adds, 0,-3); // remove the .sc\n\t\t\t\t\t\tif ($is_installed)\n\t\t\t\t\t\t{\n \t $sc_array[$sc_name] = \"0\"; // default userclass = e_UC_PUBLIC\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n \t $sc_array[$sc_name] = e_UC_NOBODY; // register shortcode, but disable it\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif($is_installed && (substr($adds,-3) == \".bb\"))\n\t\t\t\t\t{\n\t\t\t\t\t\t$bb_name = substr($adds, 0,-3); // remove the .bb\n \t$bb_array[$bb_name] = \"0\"; // default userclass.\n\t\t\t\t\t}\n\n\t\t\t\t\tif($is_installed && (substr($adds,-4) == \"_sql\"))\n\t\t\t\t\t{\n\t\t\t\t\t\t$pref['e_sql_list'][$path] = $adds;\n\t\t\t\t\t}\n\t\t\t\t}\n\n // Build Bbcode list (will be empty if plugin not installed)\n if(count($bb_array) > 0)\n\t\t\t\t{\n\t\t\t\t\tksort($bb_array);\n \t$pref['bbcode_list'][$path] = $bb_array;\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n if (isset($pref['bbcode_list'][$path])) unset($pref['bbcode_list'][$path]);\n\t\t\t\t}\n\n // Build shortcode list - do if uninstalled as well\n\t\t\t\tif(count($sc_array) > 0)\n\t\t\t\t{\n\t\t\t\t ksort($sc_array);\n\t\t\t\t $pref['shortcode_list'][$path] = $sc_array;\n }\n\t\t\t\telse\n\t\t\t\t{\n if(isset($pref['shortcode_list'][$path])) unset($pref['shortcode_list'][$path]);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t \tsave_prefs();\n\t\treturn;\n\n\t}", "title": "" }, { "docid": "568036829b8fa3fa4ff2fb931b39a7dd", "score": "0.67024946", "text": "function install() {\n\t\tsafe_query('DELETE FROM '.safe_pfx('txp_prefs').' WHERE name LIKE \"wlk_phsb_%\"');\n\t\tsafe_insert('txp_prefs',\"prefs_id = '1',name = 'wlk_phsb_notifications_instant',val = '1',type = '1',event = 'wlk_phsb',html = 'yesnoradio',position = '10',user_name = ''\");\n\t\tsafe_insert('txp_prefs',\"prefs_id = '1',name = 'wlk_phsb_endpoints',val = '\".implode(\"\\n\", $this->vars['endpoints']).\"',type = '1',event = 'wlk_phsb',html = 'wlk_phsb_textarea',position = '60',user_name = ''\");\n\t}", "title": "" }, { "docid": "91240ed3d1964d3c367aacc19ad2eda2", "score": "0.659262", "text": "function wp_register_persisted_preferences_meta()\n {\n }", "title": "" }, { "docid": "d34d0f7bd6a09c07c11a61908febf846", "score": "0.639898", "text": "function _sql_add_prefs()\n\t{\n\t\t$sql\t= array();\n\n\t\t$prefs\t= array(\n\t\t\t'max_message_chars'\t\t\t\t=> 6000,\n\t\t\t'message_waiting_period'\t\t=> 24,\n\t\t\t'message_throttling'\t\t\t=> 30,\n\t\t\t'message_day_limit'\t\t\t\t=> 1000,\n\t\t\t'max_recipients_per_message'\t=> 20,\n\t\t);\n\n\t\t$prefs\t= base64_encode( serialize( $prefs ) );\n\n\t\t//\t----------------------------------------\n\t\t//\tGet site ids\n\t\t//\t----------------------------------------\n\n\t\t$query\t= ee()->db->query( \"SELECT site_id FROM exp_sites\" );\n\n\t\tforeach ( $query->result_array() as $row )\n\t\t{\n\t\t\t$sql[]\t= ee()->db->insert_string(\n\t\t\t\t'exp_friends_preferences',\n\t\t\t\tarray(\n\t\t\t\t\t'site_id' \t\t=> $row['site_id'],\n\t\t\t\t\t'preferences' \t=> $prefs\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "4431323cbba13286f159f0fc34d91755", "score": "0.61956304", "text": "function insert_default_prefs($id){\n\t\t\t\tglobal $sql, $aa, $plugintable, $eArrayStorage;\n\t\t\t\t$plugintable\t= \"pcontent\";\n\t\t\t\t$plugindir\t\t= e_PLUGIN.\"content/\";\n\t\t\t\tunset($content_pref, $tmp);\n\t\t\t\t\n\t\t\t\tif(!is_object($aa)){\n\t\t\t\t\trequire_once($plugindir.\"handlers/content_class.php\");\n\t\t\t\t\t$aa = new content;\n\t\t\t\t}\n\n\t\t\t\t$content_pref = $aa -> ContentDefaultPrefs($id);\n\t\t\t\t$tmp = $eArrayStorage->WriteArray($content_pref);\n\n\t\t\t\t$sql -> db_Update($plugintable, \"content_pref='$tmp' WHERE content_id='$id' \");\n\t\t}", "title": "" }, { "docid": "7fb681a0ae5bec96c001cf0ae2bbc0a8", "score": "0.6193791", "text": "function add_prefs($galerie)\r\n\t{\r\n\t\tglobal $nuked, $user, $language, $niveau_upload;\r\n\t\tif($user[1] >= $niveau_upload)\r\n\t\t{\r\n\t\t\t$sql = mysql_query(\"SELECT id FROM \".ESPACE_MEMBRE_GALERY_TABLE.\" WHERE user_id='\" . $user[0] . \"' \");\r\n\t\t\t$test = mysql_num_rows($sql);\r\n\t\t\tif($test == 0)\r\n\t\t\t{\r\n\t\t\t\t$add=mysql_query(\"INSERT INTO \".ESPACE_MEMBRE_GALERY_TABLE.\" VALUES ('' , '\" . $user[0] . \"' , '\" . $galerie . \"' )\");\r\n\t\t\t}else{\r\n\t\t\t\t$upd1 = mysql_query(\"UPDATE \".ESPACE_MEMBRE_GALERY_TABLE.\" SET value = '\" . $galerie . \"' WHERE user_id = '\" . $user[0] . \"' \");\r\n\t\t\t}\r\n\t\t\techo \"\t<div style=\\\"text-align: center;\\\"><br /><br />\" . _PREFUPDATED . \"<br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre&op=compte\", 2);\r\n\t\t}else{\r\n\t\t\techo\"\t<div style=\\\"text-align: center;\\\"><br /><br /><b>\" . _NOTACCES . \"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\", 3);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1a0eed2a85f27df3d9dabfaaa7f6c1d2", "score": "0.6148208", "text": "function wlms_plugin_install()\n{\n wlms_create_table();\n wlms_settings_data();\n}", "title": "" }, { "docid": "927e0bf6b7dc8d43de7cd7f3e4a84282", "score": "0.61172044", "text": "function _savesettings()\r\n {\r\n\t\t$settings = JRequest::getVar('settings');\r\n\r\n\t\tjimport('joomla.registry.registry');\r\n\t\t$reg = new JRegistry();\r\n\t\t$reg->loadArray($settings);\r\n\t\t\t\t\r\n\t\tif(JFusionConnect::isJoomlaVersion('1.6')) {\r\n\t\t\t$component =& JTable::getInstance('extension');\r\n\t\t\t$componentid = $component->find(array('type' => 'component','element' => 'com_jfusionconnect'));\r\n\t\t\t$component->load($componentid);\r\n\t\t\t\r\n\t\t\t$plugin =& JTable::getInstance('extension');\r\n\t\t\t$pluginid = $plugin->find(array('type' => 'plugin','element' => 'jfusionconnect'));\r\n\t\t\t$plugin->load($pluginid);\r\n\t\t\t$key='enabled';\r\n\t\t} else {\r\n\t\t\t$component =& JTable::getInstance('component');\r\n\t\t\t$component->loadByOption('com_jfusionconnect');\r\n\t\t\t\r\n\t\t\t$plugin =& JTable::getInstance('plugin');\r\n\t\t\t$plugin->_tbl_key = 'element';\r\n\t\t\t$plugin->load('jfusionconnect');\r\n\t\t\t$key='published';\r\n\t\t}\r\n\t\t$component->params = $reg->toString();\r\n\t\t$component->store();\r\n \tif ($settings['enabled']) {\r\n\t\t\t$plugin->$key = 1;\r\n\t\t} else {\r\n\t\t\t$plugin->$key = 0;\r\n\t\t}\r\n\t\t$plugin->store();\r\n }", "title": "" }, { "docid": "0e1b644a25eaeff804ed2e0e51974e99", "score": "0.5957165", "text": "function manage_plugin_prefs($action, $prefname, $plugin_folder, $varArray = '') \n\t{\n\t\tglobal $pref;\n\t\tif ($prefname == 'plug_sc' || $prefname == 'plug_bb') \n\t\t{ // Special cases - shortcodes and bbcodes - each plugin may contribute several elements\n\t\t\tforeach($varArray as $code) {\n\t\t\t\t$prefvals[] = \"$code:$plugin_folder\";\n\t\t\t}\n\t\t} else {\n\t\t\t$prefvals[] = $varArray;\n//\t\t\t$prefvals[] = $plugin_folder;\n\t\t}\n\t\t$curvals = explode(',', $pref[$prefname]);\n\n\t\tif ($action == 'add') \n\t\t{\n\t\t\t$newvals = array_merge($curvals, $prefvals);\n\t\t}\n\t\tif ($action == 'remove') \n\t\t{\n\t\t foreach($prefvals as $v) \n\t\t {\n\t\t\tif (($i = array_search($v, $curvals)) !== FALSE) \n\t\t\t{\n\t\t\t unset($curvals[$i]);\n\t\t\t}\n\t\t }\n\t\t $newvals = $curvals;\n\t\t}\n\t\t$newvals = array_unique($newvals);\n\t\t$pref[$prefname] = implode(',', $newvals);\n\n\t\tif(substr($pref[$prefname], 0, 1) == \",\")\n\t\t{\n\t\t $pref[$prefname] = substr($pref[$prefname], 1);\n\t\t}\n\t\tsave_prefs();\n\t}", "title": "" }, { "docid": "d13f6a306dd43166a3c71bde2e398875", "score": "0.5910638", "text": "function save()\n {\n foreach ($this->plugins as $name => $obj) {\n $this->updateServicesVars($name);\n\n if ($this->plugins[$name]->is_account) {\n $this->plugins[$name]->save();\n } elseif ($this->plugins[$name]->initially_was_account) {\n $this->plugins[$name]->remove_from_parent();\n }\n }\n }", "title": "" }, { "docid": "1cca36b5449d90582fd60092b24ef1e7", "score": "0.5880873", "text": "function store(){\n update_option( $this->option_name, $this->settings );\n }", "title": "" }, { "docid": "f8d4847b1a93eea08a49bf85124b98cc", "score": "0.5863317", "text": "private function savePluginData($plugins)\n {\n $dbtable = $this->project->id . '_plugins';\n foreach ($plugins as $plugin) {\n $plugin['timestamp'] = $this->timestamp;\n \\DB::table($dbtable)->insert($plugin);\n }\n }", "title": "" }, { "docid": "fc3b6dcc81280cdbfd89b1f2457356d1", "score": "0.58583117", "text": "public abstract function settingsSave(array &$pluginInfo);", "title": "" }, { "docid": "e9153e4efbc69a16dc2bb4ec5f1515cb", "score": "0.5824722", "text": "public function Save() {\n\t\t\n\t\tglobal $sql;\n\t\tforeach( $this->settings as $option => $value ) {\n\t\t\t\n\t\t\t$this->update_option( $option, $value, $this->username );\n\t\t}\n\t}", "title": "" }, { "docid": "3e34adf40e71a27cfea0e4a897eb5a88", "score": "0.5796143", "text": "function update_plugins_table() \n\t{\n\t\tglobal $sql, $sql2, $mySQLprefix, $menu_pref, $tp, $pref;\n\n\t\trequire_once(e_HANDLER.'file_class.php');\n\n\t\t$fl = new e_file;\n\t\t$pluginList = $fl->get_files(e_PLUGIN, \"^plugin\\.php$\", \"standard\", 1);\n\t\t$sp = FALSE;\n\n// Read all the plugin DB info into an array to save lots of accesses\n\t\t$pluginDBList = array();\n\t\tif ($sql->db_Select('plugin',\"*\"))\n\t\t{\n\t\t while ($row = $sql->db_Fetch())\n\t\t {\n\t\t $pluginDBList[$row['plugin_path']] = $row;\n\t\t $pluginDBList[$row['plugin_path']]['status'] = 'read';\n//\t\t\techo \"Found plugin: \".$row['plugin_path'].\" in DB<br />\";\n\t\t }\n\t\t}\n\n\t\t// Get rid of any variables previously defined which may occur in plugin.php\n\t\tforeach($pluginList as $p)\n\t\t{\n\t\t $defined_vars = array_keys(get_defined_vars());\n\t\t foreach($defined_vars as $varname) \n\t\t {\n\t\t\tif ((substr($varname, 0, 6) == 'eplug_') || (substr($varname, 0, 8) == 'upgrade_')) \n\t\t\t{\n\t\t\t unset($$varname);\n\t\t\t}\n\t\t }\n\n\t\t // We have to include here to set the variables, otherwise we only get uninstalled plugins\n\t\t // Would be nice to eval() the file contents to pick up errors better, but too many path issues\n\t\t $plug['plug_action'] = 'scan';\t\t\t// Make sure plugin.php knows what we're up to\n\t\t include(\"{$p['path']}{$p['fname']}\");\n\t\t $plugin_path = substr(str_replace(e_PLUGIN,\"\",$p['path']),0,-1);\n\n\t\t // scan for addons.\n\t\t $eplug_addons = $this->getAddons($plugin_path);\t\t\t// Returns comma-separated list\n//\t\t $eplug_addons = $this->getAddons($plugin_path,'check');\t\t// Checks opening/closing tags on addon files\n\n\t\t // See whether the plugin needs installation - it does if one or more variables defined\n\t\t $no_install_needed = 1;\n\t\t foreach ($this->all_eplug_install_variables as $check_var)\n\t\t {\n\t\t if (isset($$check_var) && ($$check_var)) { $no_install_needed = 0; }\n\t\t }\n\n\t\t if ($plugin_path == $eplug_folder)\n\t\t {\n\t\t\tif(array_key_exists($plugin_path,$pluginDBList))\n\t\t\t{ // Update the addons needed by the plugin\n\t\t $pluginDBList[$plugin_path]['status'] = 'exists';\n\t\t\t // If plugin not installed, and version number of files changed, update version as well\n\t\t\t if (($pluginDBList[$plugin_path]['plugin_installflag'] == 0) && ($pluginDBList[$plugin_path]['plugin_version'] != $eplug_version))\n\t\t\t { // Update stored version\n\t\t\t\t$pluginDBList[$plugin_path]['plugin_version'] = $eplug_version;\n\t\t\t\t$pluginDBList[$plugin_path]['status'] = 'update';\n\t\t\t }\n\t\t\t if ($pluginDBList[$plugin_path]['plugin_addons'] != $eplug_addons)\n\t\t\t { // Update stored addons list\n\t\t\t\t$pluginDBList[$plugin_path]['plugin_addons'] = $eplug_addons;\n\t\t\t\t$pluginDBList[$plugin_path]['status'] = 'update';\n\t\t\t }\n\t\t\t \n\t\t\t if ($pluginDBList[$plugin_path]['plugin_installflag'] == 0)\n\t\t\t { // Plugin not installed - make sure $pref not set\n\t\t\t if (isset($pref['plug_installed'][$plugin_path]))\n\t\t\t\t{\n\t\t\t unset($pref['plug_installed'][$plugin_path]);\n//\t\t\t\t echo \"Remove: \".$plugin_path.\"->\".$ep_row['plugin_version'].\"<br />\";\n\t\t\t\t $sp = TRUE;\n\t\t\t\t}\n\t\t\t }\n\t\t\t else\n\t\t\t {\t// Plugin installed - make sure $pref is set\n\t\t\t\tif (!isset($pref['plug_installed'][$plugin_path]) || ($pref['plug_installed'][$plugin_path] != $pluginDBList[$plugin_path]['plugin_version']))\n\t\t\t\t{\t// Update prefs array of installed plugins\n\t\t\t $pref['plug_installed'][$plugin_path] = $pluginDBList[$plugin_path]['plugin_version'];\n//\t\t\t\t echo \"Add: \".$plugin_path.\"->\".$ep_row['plugin_version'].\"<br />\";\n\t\t\t\t $sp = TRUE;\n\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\t\t\telse\n\t\t\t{ // New plugin - not in table yet, so add it. If no install needed, mark it as 'installed'\n\t\t\t if ($eplug_name)\n\t\t\t {\n\t\t\t\t// Can just add to DB - shouldn''t matter that its not in our current table\n//\t\t\t\techo \"Trying to insert: \".$eplug_folder.\"<br />\";\n\t\t\t\t$sql->db_Insert(\"plugin\", \"0, '\".$tp -> toDB($eplug_name, true).\"', '\".$tp -> toDB($eplug_version, true).\"', '\".$tp -> toDB($eplug_folder, true).\"', {$no_install_needed}, '{$eplug_addons}' \");\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t else\n\t\t { // May be useful that we ignore what will usually be copies/backups of plugins - but don't normally say anything\n//\t\t echo \"Plugin copied to wrong directory. Is in: {$plugin_path} Should be: {$eplug_folder}<br /><br />\";\n\t\t }\n\t\t}\n\n\t\t// Now scan the table, updating the DB where needed\n\t\tforeach ($pluginDBList as $plug_path => $plug_info)\n\t\t{\n\t\t if ($plug_info['status'] == 'read')\n\t\t {\t// In table, not on server - delete it\n\t\t\t$sql->db_Delete('plugin', \"`plugin_id`='{$plug_info['plugin_id']}'\");\n//\t\t\techo \"Deleted: \".$plug_path.\"<br />\";\n\t\t }\n\t\t if ($plug_info['status'] == 'update')\n\t\t {\n\t\t $temp = array();\n\t\t\tforeach ($this->all_editable_db_fields as $p_f)\n\t\t\t{\n\t\t\t $temp[] =\"`{$p_f}` = '{$plug_info[$p_f]}'\";\n\t\t\t}\n\t\t $sql->db_Update('plugin', implode(\", \",$temp).\" WHERE `plugin_id`='{$plug_info['plugin_id']}'\");\n//\t\t\techo \"Updated: \".$plug_path.\"<br />\";\n\t\t }\n\t\t}\n\t if ($sp) save_prefs();\n\t}", "title": "" }, { "docid": "b87b73244a8cd04353b85ed3f0e5ff2a", "score": "0.5710946", "text": "public function add_plugin($plugin_name, $plugin_url, $checked){\n\t \t$this->load->model('download_model');\t\n\n\t\t\t$query = $this\n\t\t\t\t\t\t->download_model\n\t\t\t\t\t\t->get_site_credentials();\n\n\t\t\t$host = $query[0]->admin_host;\n\t\t\t$user = $query[0]->admin_user;\n\t\t\t$pass = $query[0]->admin_password;\t\t\t\t\n\n\t\t\t$config['hostname'] = \"localhost\";\n\t\t $config['username'] = $user;\n\t\t $config['password'] = $pass;\n\t\t $config['database'] = \"wordpress_default_plugins\";\n\t\t $config['dbdriver'] = \"mysql\";\n\t\t $config['dbprefix'] = \"\";\n\t\t $config['pconnect'] = FALSE;\n\t\t $config['db_debug'] = TRUE;\n\t\t $config['cache_on'] = FALSE;\n\t\t $config['cachedir'] = \"\";\n\t\t $config['char_set'] = \"utf8\";\n\t\t $config['dbcollat'] = \"utf8_general_ci\";\n\n\t\t \t$db2 = $this->load->database($config,TRUE);\n\n\t\t\t$data = array(\n\t\t\t 'plugin_name' => $plugin_name,\n\t\t\t 'plugin_path' => $plugin_url ,\n\t\t\t 'checked' => $checked\n\t\t\t);\n\n\t\t\t$db2->insert('default_plugins', $data); \n\t\t\t\n\t\t\treturn true;\t\t\n\n\t\t}", "title": "" }, { "docid": "c5f3df2427ade84f149e20a4bc07b7c2", "score": "0.5681415", "text": "public function save_settings()\n\t{\n\t\t// Create settings array.\n\t\t$settings = array();\n\n\t\t// Loop through default settings and check for saved values.\n\t\tforeach (ee()->simple_cloner_settings->_default_settings as $key => $value)\n\t\t{\n\t\t\tif(($settings[$key] = ee()->input->post($key)) == FALSE)\n\t\t\t{\n\t\t\t\t$settings[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\t// Serialize settings array and update the extensions table.\n\t\tee()->db->where('class', $this->class_name.'_ext');\n\t\tee()->db->update('extensions', array('settings' => serialize($settings)));\n\n\t\t// Create alert when settings are saved and redirect back to settings page.\n\t\tee('CP/Alert')->makeInline('simple-cloner-save')\n\t\t\t->asSuccess()\n\t\t\t->withTitle(lang('message_success'))\n\t\t\t->addToBody(lang('preferences_updated'))\n\t\t\t->defer();\n\n\t\tee()->functions->redirect(ee('CP/URL')->make('addons/settings/simple_cloner'));\n\t}", "title": "" }, { "docid": "d32f194ff2b8d1b64e0d64e12e755b39", "score": "0.56679344", "text": "function prefs_save($args)\n {\n if ($args['section'] != 'mailbox') {\n return $args;\n }\n\n // Load configuration\n $this->load_config();\n\n // Check that configuration is not disabled\n $dont_override = (array) $this->rc->config->get('dont_override', array());\n\n foreach (array('basic', 'desktop', 'sound') as $type) {\n $key = 'newmail_notifier_' . $type;\n if (!in_array($key, $dont_override)) {\n $args['prefs'][$key] = rcube_utils::get_input_value('_' . $key, rcube_utils::INPUT_POST) ? true : false;\n }\n }\n\n $option = 'newmail_notifier_desktop_timeout';\n if (!in_array($option, $dont_override)) {\n if ($value = (int) rcube_utils::get_input_value('_' . $option, rcube_utils::INPUT_POST)) {\n $args['prefs'][$option] = $value;\n }\n }\n\n return $args;\n }", "title": "" }, { "docid": "76e4c2432e551ae4bf5b62ca357c8aa9", "score": "0.56034184", "text": "function save_settings() {\n\t\t$this->update_option( static::SETTINGS_KEY, $this->settings );\n\t}", "title": "" }, { "docid": "0891eeca1b6ce2d2b859618e8791da85", "score": "0.55983526", "text": "function install_plugin($id) \n\t{\n\t\tglobal $sql, $ns, $sysprefs,$mySQLprefix, $tp;\n\n\t\t// install plugin ...\n\t\t$plug = $this->getinfo($id);\n\t\t$plug['plug_action'] = 'install';\n\n\t\tif ($plug['plugin_installflag'] == FALSE) {\n\t\t\tinclude_once(e_PLUGIN.$plug['plugin_path'].'/plugin.php');\n\n\t\t\t$func = $eplug_folder.'_install';\n\t\t\tif (function_exists($func)) {\n\t\t\t\t$text .= call_user_func($func);\n\t\t\t}\n\n\t\t\tif (is_array($eplug_tables)) {\n\t\t\t\t$result = $this->manage_tables('add', $eplug_tables);\n\t\t\t\tif ($result === TRUE) {\n\t\t\t\t\t$text .= EPL_ADLAN_19.'<br />';\n\t\t\t\t\t//success\n\t\t\t\t} else {\n\t\t\t\t\t$text .= EPL_ADLAN_18.'<br />';\n\t\t\t\t\t//fail\n\t\t\t\t}\n\t\t\t}\n\n\n\n\t\t\tif (is_array($eplug_prefs)) {\n\t\t\t\t$this->manage_prefs('add', $eplug_prefs);\n\t\t\t\t$text .= EPL_ADLAN_8.'<br />';\n\t\t\t}\n\n\n\n\t\t\tif (is_array($eplug_array_pref)){\n\t\t\t\tforeach($eplug_array_pref as $key => $val){\n\t\t\t\t\t$this->manage_plugin_prefs('add', $key, $eplug_folder, $val);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (is_array($eplug_sc)) {\n\t\t\t\t$this->manage_plugin_prefs('add', 'plug_sc', $eplug_folder, $eplug_sc);\n\t\t\t}\n\n\t\t\tif (is_array($eplug_bb)) {\n\t\t\t\t$this->manage_plugin_prefs('add', 'plug_bb', $eplug_folder, $eplug_bb);\n\t\t\t}\n\n\t\t\tif (is_array($eplug_user_prefs)) {\n\t\t\t\t$sql->db_Select(\"core\", \" e107_value\", \" e107_name = 'user_entended'\");\n\t\t\t\t$row = $sql->db_Fetch();\n\t\t\t\t$user_entended = unserialize($row[0]);\n\t\t\t\twhile (list($e_user_pref, $default_value) = each($eplug_user_prefs)) {\n\t\t\t\t\t$user_entended[] = $e_user_pref;\n\t\t\t\t\t$user_pref['$e_user_pref'] = $default_value;\n\t\t\t\t}\n\t\t\t\tsave_prefs(\"user\");\n\t\t\t\t$tmp = addslashes(serialize($user_entended));\n\t\t\t\tif ($sql->db_Select(\"core\", \"e107_value\", \" e107_name = 'user_entended'\")) {\n\t\t\t\t\t$sql->db_Update(\"core\", \"e107_value = '{$tmp}' WHERE e107_name = 'user_entended' \");\n\t\t\t\t} else {\n\t\t\t\t\t$sql->db_Insert(\"core\", \"'user_entended', '{$tmp}' \");\n\t\t\t\t}\n\t\t\t\t$text .= EPL_ADLAN_8.\"<br />\";\n\t\t\t}\n\n\t\t\tif ($eplug_link === TRUE && $eplug_link_url != '' && $eplug_link_name != '') {\n $plug_perm['everyone'] = e_UC_PUBLIC;\n\t\t\t\t$plug_perm['guest'] = e_UC_GUEST;\n\t\t\t\t$plug_perm['member'] = e_UC_MEMBER;\n\t\t\t\t$plug_perm['mainadmin'] = e_UC_MAINADMIN;\n\t\t\t\t$plug_perm['admin'] = e_UC_ADMIN;\n\t\t\t\t$plug_perm['nobody'] = e_UC_NOBODY;\n\t\t\t\t$eplug_link_perms = strtolower($eplug_link_perms);\n $linkperm = ($plug_perm[$eplug_link_perms]) ? $plug_perm[$eplug_link_perms] : e_UC_PUBLIC;\n\t\t\t\t$this->manage_link('add', $eplug_link_url, $eplug_link_name,$linkperm);\n\t\t\t}\n\n\t\t\tif ($eplug_userclass) {\n\t\t\t\t$this->manage_userclass('add', $eplug_userclass, $eplug_userclass_description);\n\t\t\t}\n\n\t\t\t$this -> manage_search('add', $eplug_folder);\n\n\t\t\t$this -> manage_notify('add', $eplug_folder);\n\n\t\t\t$eplug_addons = $this->getAddons($eplug_folder);\n\n\t\t\t$sql->db_Update('plugin', \"plugin_installflag = 1, plugin_addons = '{$eplug_addons}' WHERE plugin_id = '\".intval($id).\"'\");\n\t\t\t$pref['plug_installed'][$plugin_path] = $plug['plugin_version'];\n\t\t\tsave_prefs();\n\t\t\t\n if($rssmess) { $text .= $rssmess; }\n\t\t\t$text .= (isset($eplug_done) ? \"<br />{$eplug_done}\" : \"<br />\".LAN_INSTALL_SUCCESSFUL);\n\t\t} else {\n\t\t\t$text = EPL_ADLAN_21;\n\t\t}\n\t\tif($eplug_conffile){ $text .= \"&nbsp;<a href='\".e_PLUGIN.\"$eplug_folder/$eplug_conffile'>[\".LAN_CONFIGURE.\"]</a>\"; }\n\t\t$ns->tablerender(EPL_ADLAN_33, $text);\n\t}", "title": "" }, { "docid": "2b02cc5862c18617a20cb9af9b2fa94f", "score": "0.5591214", "text": "function plugin_postinstall()\n{\n global $_CONF, $_TABLES, $pi_admin;\n\n require_once $_CONF['path_system'] . 'classes/config.class.php';\n\n $plg_config = config::get_instance();\n $_PLG_CONF = $plg_config->get_config('{plugin}');\n\n $admin_group_id = DB_getItem($_TABLES['groups'], 'grp_id', \"grp_name = '{$pi_admin}'\");\n $blockadmin_id = DB_getItem($_TABLES['groups'], 'grp_id', \"grp_name = 'Block Admin'\");\n\n $DEFVALUES = array();\n $DEFVALUES[] = \"INSERT INTO {$_TABLES['{plugin}']} (up_title, up_value, owner_id, group_id) \"\n . \"VALUES ('Sample Data', 100, 2, #group#)\";\n $DEFVALUES[] = \"INSERT INTO {$_TABLES['{plugin}']} (up_title, up_value, owner_id, group_id) \"\n . \"VALUES ('More Sample Data', 200, 2, #group#)\";\n\n foreach ($DEFVALUES as $sql) {\n $sql = str_replace('#group#', $admin_group_id, $sql);\n DB_query($sql, 1);\n if (DB_error()) {\n COM_error(\"SQL error in {plugin} plugin postinstall, SQL: \" . $sql);\n return false;\n }\n }\n\n return true;\n}", "title": "" }, { "docid": "06c11e0c0963f0558ce9f03b5387da5e", "score": "0.5572069", "text": "protected function doPrePluginOptionsSave() {\n\t\t$oDp = $this->loadDP();\n\n\t\tif ( $this->getOpt( 'activated_at', 0 ) <= 0 ) {\n\t\t\t$this->setOpt( 'activated_at', $oDp->time() );\n\t\t}\n\t\tif ( $this->getOpt( 'installation_time', 0 ) <= 0 ) {\n\t\t\t$this->setOpt( 'installation_time', $oDp->time() );\n\t\t}\n\n\t\t$this->setOpt( 'installed_version', $this->getController()->getVersion() );\n\t}", "title": "" }, { "docid": "da11379915bc8cb82e88419f29556b13", "score": "0.55702233", "text": "function notification_user_settings_save() {\n\tglobal $CONFIG;\n\t//@todo Wha??\n\tinclude($CONFIG->path . \"actions/notifications/settings/usersettings/save.php\");\n}", "title": "" }, { "docid": "6f79c734dacabb6db2338f875621bbef", "score": "0.5562702", "text": "function store_data($data, $data_name)\n{\n /* @todo store the PUA data in its own table */\n update_option($data_name, serialize($data));\n}", "title": "" }, { "docid": "4794cca301de28446bea5c51fbc8d666", "score": "0.5550994", "text": "function _arc_meta_install_prefs()\n{\n if (!isset($prefs['arc_meta_homepage_title'])) {\n set_pref('arc_meta_homepage_title', '%n | %t', 'arc_meta', PREF_PLUGIN, 'text_input', 10);\n }\n if (!isset($prefs['arc_meta_article_title'])) {\n set_pref('arc_meta_article_title', '%a | %n', 'arc_meta', PREF_PLUGIN, 'text_input', 20);\n }\n if (!isset($prefs['arc_meta_comment_title'])) {\n set_pref('arc_meta_comment_title', gTxt('comments_on').' %a | %n', 'arc_meta', PREF_PLUGIN, 'text_input', 30);\n }\n if (!isset($prefs['arc_meta_search_title'])) {\n set_pref('arc_meta_search_title', gTxt('search_results') . ': ' . '%q | %n', 'arc_meta', PREF_PLUGIN, 'text_input', 40);\n }\n if (!isset($prefs['arc_meta_category_title'])) {\n set_pref('arc_meta_category_title', '%c | %n', 'arc_meta', PREF_PLUGIN, 'text_input', 50);\n }\n if (!isset($prefs['arc_meta_section_title'])) {\n set_pref('arc_meta_section_title', '%s | %n', 'arc_meta', PREF_PLUGIN, 'text_input', 60);\n }\n if (!isset($prefs['arc_meta_section_category_title'])) {\n set_pref('arc_meta_section_category_title', '%c - %s | %n', 'arc_meta', PREF_PLUGIN, 'text_input', 70);\n }\n if (!isset($prefs['arc_meta_section_tab'])) {\n set_pref('arc_meta_section_tab', 'content', 'arc_meta', PREF_PLUGIN, '_arc_meta_section_tab_select', 80);\n }\n return;\n}", "title": "" }, { "docid": "c10fbba15106b28a35321fb9881679df", "score": "0.5550894", "text": "function plugin_install () {\n global $wpdb;\n $charset_collate = $wpdb->get_charset_collate();\n\n // First we define our tables. We need 3, so let's create the names\n $pollsTable = $wpdb->prefix . \"polls_\" .\"polls\";\n $optionsTable = $wpdb->prefix . \"polls_\" .\"options\";\n $votesTable = $wpdb->prefix . \"polls_\" .\"votes\";\n\n // Let's now create the tables with the names we built\n\n // Poll is the \"master container\" of our little system\n $createPollTable = \"CREATE TABLE $pollsTable (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n name tinytext NOT NULL,\n creationDate TIMESTAMP NOT NULL,\n PRIMARY KEY (id)\n ) $charset_collate;\";\n \n // Then we need to create options that are tied to each poll\n $createOptionsTable = \"CREATE TABLE $optionsTable (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n poll_id mediumInt(9) NOT NULL,\n name tinytext NOT NULL,\n PRIMARY KEY (id),\n FOREIGN KEY (poll_id) REFERENCES {$pollsTable} (id)\n ) $charset_collate;\";\n\n // And finally, we need to store each vote as a row. Each vote belongs to a poll\n // and represents one option from it\n $createVotesTable = \"CREATE TABLE $votesTable (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n poll_id mediumInt(9) NOT NULL,\n option_id mediumInt(9) NOT NULL,\n creationDate TIMESTAMP NOT NULL,\n PRIMARY KEY (id),\n FOREIGN KEY (poll_id) REFERENCES {$pollsTable} (id),\n FOREIGN KEY (option_id) REFERENCES {$optionsTable} (id)\n ) $charset_collate;\";\n\n // We need to import the upgrade script to make the plugin create the tables upon activation:\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\n // And now let's execute our queries\n dbDelta($createPollTable);\n dbDelta($createOptionsTable);\n dbDelta($createVotesTable);\n}", "title": "" }, { "docid": "27bf9463056550ebe1a793256d4887f4", "score": "0.5545956", "text": "function install_hooks() {\n // Info that the plugin is activated.\n update_option( 'DB_Plugin_Hooks', true );\n }", "title": "" }, { "docid": "86432eaa8e02286d651aa88c13af3535", "score": "0.5524365", "text": "function upgrade_1_22_prefs($content_pref){\n\n\t\t\t//create : item page\n\t\t\t$content_pref['content_admin_subheading'] = '1';\n\t\t\t$content_pref['content_admin_summary'] = '1';\n\t\t\t$content_pref['content_admin_startdate'] = '1';\n\t\t\t$content_pref['content_admin_enddate'] = '1';\n\n\t\t\t//create : category page\n\t\t\t$content_pref['content_admincat_subheading'] = '1';\n\t\t\t$content_pref['content_admincat_comment'] = '1';\n\t\t\t$content_pref['content_admincat_rating'] = '1';\n\t\t\t$content_pref['content_admincat_pe'] = '1';\n\t\t\t$content_pref['content_admincat_visibility'] = '1';\n\t\t\t$content_pref['content_admincat_startdate'] = '1';\n\t\t\t$content_pref['content_admincat_enddate'] = '1';\n\t\t\t$content_pref['content_admincat_uploadicon'] = '1';\n\t\t\t$content_pref['content_admincat_selecticon'] = '1';\n\n\t\t\t//create : submit page\n\t\t\t$content_pref['content_submit_subheading'] = '1';\n\t\t\t$content_pref['content_submit_summary'] = '1';\n\t\t\t$content_pref['content_submit_startdate'] = '1';\n\t\t\t$content_pref['content_submit_enddate'] = '1';\n\n\t\t\t//content manager\n\t\t\t$content_pref['content_manager_approve'] = '255';\n\t\t\t$content_pref['content_manager_personal'] = '255';\n\t\t\t$content_pref['content_manager_category'] = '255';\n\n\t\t\treturn $content_pref;\n\t\t}", "title": "" }, { "docid": "e741e1e24d643e7649af71ccbe4013de", "score": "0.5497278", "text": "public function refresh_plugin_settings() {\n self::$instance->plugin_settings = self::$instance->get_plugin_settings();\n }", "title": "" }, { "docid": "8345d13765d46e3f5138c8d646c99925", "score": "0.54944724", "text": "function addPreference($link,$profile_id,$value)\n\t\t{\n\t\t\t$value = mysqli_escape_string($link,$value);\n\t\t\t$profile_id = mysqli_escape_string($link,$profile_id);\n\t\t\t$sql = 'INSERT INTO preference (profile_id,value) VALUES ('.$profile_id.',\"'.$value.'\")';\n\t\t\tif (mysqli_query($link, $sql)) {\n\t\t\t\t//success\n\t\t\t\treturn \"success\";\n\t\t\t}else{\n\t\t\t\t//error\n\t\t\t\treturn '{\"status\":\"error\",\"message\":\"preference not inserted\"}';\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "67e683721e7fe9e49fd6ad0fe6da401f", "score": "0.5480776", "text": "function install_settings()\n\t{\n\t\t//-----------------------------------------\n\t\t// Get DB\n\t\t//-----------------------------------------\n\t\t\n\t\trequire_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' );\t\t\n\t\t\n\t\t$this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_user'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_pass'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_host'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_pre'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->ipsclass->vars['mysql_codepage'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['sql_driver'] );\t\n\t\t//-----------------------------------------\n\t\t// Install settings\n\t\t//-----------------------------------------\n\t\n\t\t$output[] = \"Добавление настроек...\";\n\t\t$xml = new class_xml();\n\t\t$xml->lite_parser = 1;\n\t\t\n\t\t$content = implode( \"\", file( INS_DOC_ROOT_PATH . 'resources/settings.xml' ) );\n\t\t$xml->xml_parse_document( $content );\n\n\t\t//-----------------------------------------\n\t\t// Known settings\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( substr( $this->install->saved_data['install_url'], -1 ) == '/' )\n\t\t{\n\t\t\t$this->install->saved_data['install_url'] = substr( $this->install->saved_data['install_url'], 0, -1 );\n\t\t}\n\t\t\n\t\t$_urls = parse_url( $this->install->saved_data['install_url'] );\n\t\t\n\t\t$known = array( 'email_in' => $this->install->saved_data['admin_email'],\n\t\t\t\t\t\t 'email_out' => $this->install->saved_data['admin_email'],\n\t\t\t\t\t\t 'base_dir' => $this->install->saved_data['install_dir'],\n\t\t\t\t\t\t 'upload_dir' => $this->install->saved_data['install_dir'] . '/uploads',\n\t\t\t\t\t\t 'upload_url' => $this->install->saved_data['install_url'] . '/uploads',\n\t\t\t\t\t\t 'search_sql_method' => $this->install->ipsclass->DB->sql_can_fulltext() ? 'ftext' : 'man',\n\t\t\t\t\t\t //'cookie_domain' => $_urls['host'] != 'localhost' ? '.' . preg_replace( \"#^(?:.+?\\.)?([a-z0-9\\-]{3,})\\.(([a-z]{2,4})(\\.([a-z]{2}))?|museum)$#is\", \"\\\\1.\\\\2\", $_urls['host'] ) : '',\n\t\t\t\t\t );\n\t\t\t\t\t\n\t\t//-----------------------------------------\n\t\t// Parse\n\t\t//-----------------------------------------\n\n\t\t$fields = array( 'conf_title' , 'conf_description', 'conf_group' , 'conf_type' , 'conf_key' , 'conf_default',\n\t\t\t\t\t\t 'conf_extra' , 'conf_evalphp' , 'conf_protected', 'conf_position', 'conf_start_group', 'conf_end_group',\n\t\t\t\t\t\t 'conf_help_key', 'conf_add_cache' , 'conf_title_keyword' );\n\n\t\t$setting_fields = array( 'conf_title_keyword', 'conf_title_title', 'conf_title_desc', 'conf_title_noshow', 'conf_title_module' );\n\n\t\t//-----------------------------------------\n\t\t// Fix up...\n\t\t//-----------------------------------------\n \n\t\tif ( ! is_array( $xml->xml_array['settingexport']['settinggroup']['setting'][0] ) )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Ensure [0] is populated\n\t\t\t//-----------------------------------------\n\n\t\t\t$tmp = $xml->xml_array['settingexport']['settinggroup']['setting'];\n\n\t\t\tunset($xml->xml_array['settingexport']['settinggroup']['setting']);\n\n\t\t\t$xml->xml_array['settingexport']['settinggroup']['setting'][0] = $tmp;\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Loop through and sort out settings...\n\t\t//-----------------------------------------\n\n\t\tforeach( $xml->xml_array['settingexport']['settinggroup']['setting'] as $id => $entry )\n\t\t{\n\t\t\t$newrow = array();\n\n\t\t\t//-----------------------------------------\n\t\t\t// Is setting?\n\t\t\t//-----------------------------------------\n\n\t\t\tif ( ! $entry['conf_is_title']['VALUE'] )\n\t\t\t{\n\t\t\t\tforeach( $fields as $f )\n\t\t\t\t{\n\t\t\t\t\t$newrow[$f] = $entry[ $f ]['VALUE'];\n\t\t\t\t}\n\n\t\t\t\t$new_settings[] = $newrow;\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\t\t\t// Is title?\n\t\t\t//-----------------------------------------\n\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach( $setting_fields as $f )\n\t\t\t\t{\n\t\t\t\t\t$newrow[$f] = $entry[ $f ]['VALUE'];\n\t\t\t\t}\n\n\t\t\t\t$new_titles[] = $newrow;\n\t\t\t}\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Sort out titles...\n\t\t//-----------------------------------------\n\n\t\tif ( is_array( $new_titles ) and count( $new_titles ) )\n\t\t{\n\t\t\tforeach( $new_titles as $idx => $data )\n\t\t\t{\n\t\t\t\tif ( $data['conf_title_title'] AND $data['conf_title_keyword'] )\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Get ID based on key\n\t\t\t\t\t//-----------------------------------------\n\n\t\t\t\t\t$save = array( 'conf_title_title' => $data['conf_title_title'],\n\t\t\t\t\t\t\t\t 'conf_title_desc' => $data['conf_title_desc'],\n\t\t\t\t\t\t\t\t 'conf_title_keyword' => $data['conf_title_keyword'],\n\t\t\t\t\t\t\t\t 'conf_title_noshow' => $data['conf_title_noshow'],\n\t\t\t\t\t\t\t\t 'conf_title_module' => $data['conf_title_module'] );\n\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Insert first\n\t\t\t\t\t//-----------------------------------------\n\n\t\t\t\t\t$this->install->ipsclass->DB->do_insert( 'conf_settings_titles', $save );\n\n\t\t\t\t\t$conf_id = $this->install->ipsclass->DB->get_insert_id();\n\t\t\t\t\t$save['conf_title_id'] = $conf_id;\n\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Update settings cache\n\t\t\t\t\t//-----------------------------------------\n\n\t\t\t\t\t$setting_groups_by_key[ $save['conf_title_keyword'] ] = $save;\n\t\t\t\t\t$setting_groups[ $save['conf_title_id'] ] = $save;\n\n\t\t\t\t\t$need_update[] = $conf_id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Sort out settings\n\t\t//-----------------------------------------\n\n\t\tif ( is_array( $new_settings ) and count( $new_settings ) )\n\t\t{\n\t\t\tforeach( $new_settings as $idx => $data )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Insert known\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\tif ( in_array( $data['conf_key'], array_keys( $known ) ) )\n\t\t\t\t{\n\t\t\t\t\t$data['conf_value'] = $known[ $data['conf_key'] ];\n\t\t\t\t\t#$data['conf_default'] = $known[ $data['conf_key'] ];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$data['conf_value'] = '';\n\t\t\t\t}\n\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Now assign to the correct ID based on\n\t\t\t\t// our title keyword...\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\t$data['conf_group'] = $setting_groups_by_key[ $data['conf_title_keyword'] ]['conf_title_id'];\n\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Remove from array\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\tunset( $data['conf_title_keyword'] );\n\n\t\t\t\t$this->install->ipsclass->DB->do_insert( 'conf_settings', $data );\n\t\t\t}\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Update group counts...\n\t\t//-----------------------------------------\n\n\t\tif ( count( $need_update ) )\n\t\t{\n\t\t\tforeach( $need_update as $i => $idx )\n\t\t\t{\n\t\t\t\t$conf = $this->install->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as count', 'from' => 'conf_settings', 'where' => 'conf_group='.$idx ) );\n\n\t\t\t\t$count = intval($conf['count']);\n\n\t\t\t\t$this->install->ipsclass->DB->do_update( 'conf_settings_titles', array( 'conf_title_count' => $count ), 'conf_title_id='.$idx );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Next...\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->install->template->append( $this->install->template->install_page_refresh( $output ) );\n\t\t$this->install->template->next_action = '?p=install&sub=acpperms';\n\t\t$this->install->template->hide_next = 1;\n\t}", "title": "" }, { "docid": "1688a0a4842c4c8d007aab4c451b3bd2", "score": "0.5468338", "text": "function load_plugin() {\n global $fb_opt_name, $gp_opt_name, $popup_fb_page, $popup_delay, $fb_popup_box;\n \n if(is_admin()&& get_option('Activated_Plugin')=='Plugin-Slug') {\n delete_option('Activated_Plugin');\n add_option($fb_opt_name,'on');\n add_option($gp_opt_name,'on');\n add_option($popup_fb_page,'codesamplez');\n add_option($popup_delay,'2');\n add_option($fb_popup_box,'on');\n }\n}", "title": "" }, { "docid": "1181174972f772c8e9eb4b627e47e8aa", "score": "0.5422584", "text": "function qa_initialize_postdb_plugins()\n{\n\tglobal $qa_pluginManager;\n\n\trequire_once QA_INCLUDE_DIR . 'app/options.php';\n\tqa_preload_options();\n\n\t$qa_pluginManager->loadPluginsAfterDbInit();\n\tqa_load_override_files();\n\n\tqa_report_process_stage('plugins_loaded');\n}", "title": "" }, { "docid": "f0b230e528ff728f4e873e2acfc4d8ae", "score": "0.5421562", "text": "protected function set_plugin_fields()\n {\n global $DB;\n\n $this->plugins=array();\n\n $sql = \"SELECT *\n FROM {block_ilp_plugin} as p,\n {block_ilp_report_field} as rf\n WHERE rf.plugin_id = p.id\n AND rf.report_id = :report_id\";\n\n foreach($DB->get_records_sql($sql, array('report_id'=>$this->id)) as $item)\n {\n $this->plugins[$item->name]=$item;\n }\n }", "title": "" }, { "docid": "73e0e5a134c5d1f592a2e343297aa97c", "score": "0.5418527", "text": "function hookInstall() {\n// $db = get_db()cou;\n//die(\"got to the installer method...\");\n $this->_saveVocabularies();\n }", "title": "" }, { "docid": "fefe82f13ba6671b13ef6125ccf062b5", "score": "0.54008424", "text": "public function update_site_system_preferences($prefs, $site_id = '')\n\t{\n\t\tif ($site_id != '')\n\t\t{\n\t\t\t$this->db->where('site_id', $site_id);\n\t\t}\n\n\t\t$this->db->set('site_system_preferences', base64_encode(serialize($prefs)));\n\t\t$this->db->update('sites');\n\t}", "title": "" }, { "docid": "38a1d337b1671450ea94d5d5ad1e92bc", "score": "0.53714085", "text": "function updatenote_regsettings() {\n\tregister_setting( 'updatenote-settings', 'updatenote_options', 'updatenote_validate' );\n}", "title": "" }, { "docid": "64df89a107415d98a8f37e2329785612", "score": "0.53481126", "text": "private function _saveSeo() {\r\n\r\n // get plugins details\r\n $plugin = JPluginHelper::getPlugin( 'system', 'shmobile');\r\n $params = new JRegistry();\r\n $params->loadString( $plugin->params);\r\n\r\n // get current values\r\n $defaultEnabled = $params->get('mobile_switch_enabled');\r\n $defaultTemplate = $params->get('mobile_template');\r\n\r\n // save mobile template switcher params, stored in system plugin\r\n $mobile_switch_enabled = JRequest::getBool( 'mobile_switch_enabled', $defaultEnabled);\r\n $mobile_template = JRequest::getCmd( 'mobile_template', $defaultTemplate);\r\n\r\n // set params\r\n $params->set('mobile_switch_enabled', $mobile_switch_enabled);\r\n $params->set('mobile_template', $mobile_template);\r\n $textParams = (string) $params;\r\n\r\n try {\r\n ShlDbHelper::update( '#__extensions', array('params' => $textParams), array( 'element' => 'shmobile', 'folder' => 'system', 'type' => 'plugin'));\r\n } catch (Exception $e) {\r\n\r\n }\r\n\r\n }", "title": "" }, { "docid": "0ae0cc1ffe29ed777d88b9f6987cba31", "score": "0.5332485", "text": "public function preferences() {\n $prefs = $this->prefs;\n ?>\n <label class=\"subheader\" for=\"<?php echo $this->field_id( array( 'added' => 'creds' ) ); ?>\"><?php _e( 'Author Content is liked', 'rehub_framework' ); ?></label>\n <ol>\n <li>\n <div class=\"h2\"><input type=\"text\" name=\"<?php echo $this->field_name( array( 'added' => 'creds' ) ); ?>\" id=\"<?php echo $this->field_id( array( 'added' => 'creds' ) ); ?>\" value=\"<?php echo $this->core->number( $prefs['added']['creds'] ); ?>\" size=\"8\" /></div>\n </li>\n <li>\n <label for=\"<?php echo $this->field_id( array( 'added' => 'limit' ) ); ?>\"><?php _e( 'Limit', 'rehub_framework' ); ?></label>\n <?php echo $this->hook_limit_setting( $this->field_name( array( 'added' => 'limit' ) ), $this->field_id( array( 'added' => 'limit' ) ), $prefs['added']['limit'] ); ?>\n </li>\n </ol>\n <label class=\"subheader\" for=\"<?php echo $this->field_id( array( 'added' => 'log' ) ); ?>\"><?php _e( 'Log Template', 'rehub_framework' ); ?></label>\n <ol>\n <li>\n <div class=\"h2\"><input type=\"text\" name=\"<?php echo $this->field_name( array( 'added' => 'log' ) ); ?>\" id=\"<?php echo $this->field_id( array( 'added' => 'log' ) ); ?>\" value=\"<?php echo esc_attr( $prefs['added']['log'] ); ?>\" class=\"long\" /></div>\n <span class=\"description\"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>\n </li>\n </ol>\n\n <label class=\"subheader\" for=\"<?php echo $this->field_id( array( 'removed' => 'creds' ) ); ?>\"><?php _e( 'Author Content is disliked', 'rehub_framework' ); ?></label>\n <ol>\n <li>\n <div class=\"h2\"><input type=\"text\" name=\"<?php echo $this->field_name( array( 'removed' => 'creds' ) ); ?>\" id=\"<?php echo $this->field_id( array( 'removed' => 'creds' ) ); ?>\" value=\"<?php echo $this->core->number( $prefs['removed']['creds'] ); ?>\" size=\"8\" /></div>\n </li>\n </ol>\n <label class=\"subheader\" for=\"<?php echo $this->field_id( array( 'removed' => 'log' ) ); ?>\"><?php _e( 'Log Template', 'rehub_framework' ); ?></label>\n <ol>\n <li>\n <div class=\"h2\"><input type=\"text\" name=\"<?php echo $this->field_name( array( 'removed' => 'log' ) ); ?>\" id=\"<?php echo $this->field_id( array( 'removed' => 'log' ) ); ?>\" value=\"<?php echo esc_attr( $prefs['removed']['log'] ); ?>\" class=\"long\" /></div>\n <span class=\"description\"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>\n </li>\n </ol>\n <?php\n }", "title": "" }, { "docid": "8e908e442b4e053fa8ba9f314e1f4235", "score": "0.5330592", "text": "public static function save()\n\t{\n\t\tConfigManager::save('discord', self::load(), 'config');\n\t}", "title": "" }, { "docid": "892f2271dfe7f7c0f9f4285707ff37b6", "score": "0.5329874", "text": "function jpst_register_settings() {\n\tregister_setting( 'jpst-settings-group', 'jpst_oauth','saveOptionCallback' );\n}", "title": "" }, { "docid": "2132b1520e5efbc62d871573b2cc6f05", "score": "0.5324582", "text": "public function admin_init() {\n\t\tregister_setting( $this->options_key, $this->options_key, array( $this, 'save_settings' ) );\n\t}", "title": "" }, { "docid": "a10e85feea3533e2bab52d32e39eac9e", "score": "0.5324354", "text": "public function add_settings() {\n if (self::$settings !== null) {\n $this->print_settings(self::$settings);\n }\n }", "title": "" }, { "docid": "eb321228c51b1fc17b0fe112e12745dc", "score": "0.5321352", "text": "function setModulePref($module,$var,$value,$userID=0)\n {\n $db = & JxSingleton::factory('db');\n\n if(!$userID)\n {\n $user = & JxSingleton::factory('user');\n $userID = $user->userID;\n }\n\n if(!DB::isError($db))\n {\n\n $sql = \"REPLACE INTO preferences\n SET userID='\".$userID.\"',\n module='$module',\n var='$var',\n value='$value'\";\n \n $result = $db->query($sql);\n \n return (!DB::isError($result));\n }\n }", "title": "" }, { "docid": "d2ff682b15104905cbe7ce1b571f640e", "score": "0.5318248", "text": "function append_settings( $addthis ){\n if( $addthis == '' ){ return false; }\n $save = escapeshellarg(\"$addthis\\n\");\n //exec(\"echo $save >> '$this->_settings_file'\");\n exec(\"printf $save >> '$this->_settings_file'\");\n }", "title": "" }, { "docid": "b8d5ea3562308c1cbfcdb8fc9cda4481", "score": "0.53068805", "text": "function add_plugin($plugin)\n {\n }", "title": "" }, { "docid": "09019db25d176b00b1d6ef007efc6467", "score": "0.5303334", "text": "function saveSettings() {\n\t\t//# convert class variables into an array and save using\n\t\t//# Wordpress functions, \"update_option\" or \"add_option\"\n\t\t//#convert class into array...\n\t\t$settings_array = array();\n\t\t$obj = $this;\n\t\tforeach (array_keys(get_class_vars(get_class($obj))) as $k){\n\t\t\tif (is_array($obj->$k)) {\n\t\t\t\t//serialize any arrays within $obj\n\t\t\t\tif (count($obj->$k)>0) {\n\t\t\t\t\t$settings_array[$k] = esc_attr(serialize($obj->$k));\n\t\t\t\t} else {\n\t\t\t\t\t$settings_array[$k] = \"\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$settings_array[$k] = \"{$obj->$k}\";\n\t\t\t}\n\t\t}\n\t\t//#save array to options table...\n\t\t$options_check = get_option('wassup_settings');\n\t\tif (!empty($options_check)) {\n\t\t\tupdate_option('wassup_settings', $settings_array);\n\t\t} else {\n\t\t\tadd_option('wassup_settings', $settings_array, 'Options for WassUp');\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f58b88e242cf2e82ae25d75e767418b7", "score": "0.530267", "text": "private function _add_hook($hook)\n\t{\n\t\tee()->db->insert('extensions', array(\n\t\t\t'class' => $this->class_name,\n\t\t\t'method' => $hook,\n\t\t\t'hook' => $hook,\n\t\t\t'settings' => serialize($this->settings),\n\t\t\t'priority' => 5,\n\t\t\t'version' => $this->version,\n\t\t\t'enabled' => 'y'\n\t\t));\n\t}", "title": "" }, { "docid": "dff6839a3d69f0f721ba7c403d115064", "score": "0.5276453", "text": "function acf_append_setting($name, $value)\n{\n}", "title": "" }, { "docid": "b46a0df91b107a7e782832b38a7dae68", "score": "0.5270045", "text": "function plugin_postinstall_nexcontent($pi_name)\r\n{\r\n global $_DB_dbms, $_CONF, $_DB_table_prefix, $_TABLES ;\r\n\r\n $sql= \"INSERT INTO {$_TABLES['nexcontent_pages']} (id,pid,type,pageorder,name,blockformat,heading,content,meta_description,meta_keywords) VALUES (1, 0, 'category', '10', 'frontpage', 'none', 'Front Page Folder', 'Create a page under this folder if you want to have a page loaded as the frontpage', '', '');\";\r\n DB_query($sql);\r\n\r\n return true;\r\n}", "title": "" }, { "docid": "7c24a9d4c892fc000df0704542894590", "score": "0.5262069", "text": "public function save_plugin_settings($user_id, $full_request, $type = \"SAVE\", $allowed_plugins = null)\n {\n global $cnf;\n global $local_server_path;\n\t \n\t if($allowed_plugins != null) {\n\t //OK we have an array of allowed plugins\n\t $plugins = $allowed_plugins;\n\t } else {\n\t //Otherwise, assume all plugins in the global config\n\t $plugins = $cnf['plugins'];\n\t }\n\t \n\t $reloadScreen = false;\n\t \t \n\t //Loop through each class and call each plugin_* -> on_message() function\n\t for($cnt=0; $cnt < count($plugins); $cnt++) {\n\t $plugin_name = $plugins[$cnt];\n\t \n\t \n\t include_once($local_server_path . \"plugins/\" . $plugin_name . \"/index.php\");\n\t $class_name = \"plugin_\" . $plugin_name;\n\t \n\t $pg = new $class_name();\n\t \n\t if(method_exists($pg,\"on_save_settings\") == true) {\n\t //OK call the on_settings function of the plugin\n\t $returns = $pg->on_save_settings($user_id, $full_request, $type);\n\t \n\t \n\t if(strcmp($returns, \"RELOAD\") == 0) {\n\t $reloadScreen = true;\n\t }\n\t } else {\n\t //No on_save_settings() in plugin - do nothing\n\n\t }\n\t }\n\t if($reloadScreen === true) {\n\t return \"RELOAD\"; //This option reloads the entire frame e.g. for a language change\n\t } else {\n\t return true;\n }\n \n }", "title": "" }, { "docid": "9390434a318e61e53c08d8c68d4fbb8e", "score": "0.5255918", "text": "public function register_plugin_admin_add_page()\n {\n $self = $this;\n add_options_page(\n 'VivoKey OpenID',\n 'VivoKey OpenID',\n 'manage_options',\n 'VivoKey OpenID Connect',\n function () use ($self) {\n $self->load_view('settings', null);\n }\n );\n }", "title": "" }, { "docid": "a7d7b48d8d560dfc6a3c6e79b7af7749", "score": "0.52536273", "text": "protected function doPrePluginOptionsSave() {\r\n\r\n\t\t\t$oDp = $this->loadDataProcessor();\r\n\r\n\t\t\t$sAuthKey = $this->getPluginAuthKey();\r\n\t\t\tif ( empty( $sAuthKey ) || strlen( $sAuthKey ) != 24 ) {\r\n\t\t\t\t$this->setOpt( 'key', $oDp->GenerateRandomString( 24, 7 ) );\r\n\t\t\t}\r\n\r\n\t\t\t$nActivatedAt = $this->getOpt( 'activated_at' );\r\n\t\t\tif ( empty( $nActivatedAt ) ) {\r\n\t\t\t\t$this->setOpt( 'activated_at', $oDp->GetRequestTime() );\r\n\t\t\t}\r\n\t\t\t$nInstalledAt = $this->getOpt( 'installed_at' );\r\n\t\t\tif ( empty( $nInstalledAt ) ) {\r\n\t\t\t\t$this->setOpt( 'installed_at', $oDp->GetRequestTime() );\r\n\t\t\t}\r\n\r\n\t\t\t$this->setOpt( 'installed_version', $this->getController()->getVersion() );\r\n\r\n\t\t\t$nInstalledAt = $this->getOpt( 'installation_time' );\r\n\t\t\tif ( empty( $nInstalledAt ) || $nInstalledAt <= 0 ) {\r\n\t\t\t\t$this->setOpt( 'installation_time', time() );\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "3a1df0059acb9887d09520da6ef13dd8", "score": "0.5253117", "text": "public function set_plugin_properties() {\n $this->plugin\t= get_plugin_data( SALESFORCE__PLUGIN_FILE );\n $this->basename = plugin_basename( SALESFORCE__PLUGIN_FILE );\n $this->active\t= is_plugin_active( $this->basename );\n }", "title": "" }, { "docid": "1ddb50407ad2177edfc881381ef6af00", "score": "0.52526045", "text": "public function preferences() {\n\n\t\t\t$prefs = $this->prefs;\n\n?>\n<div class=\"hook-instance\">\n\t<div class=\"row\">\n\t\t<div class=\"col-lg-4 col-md-4 col-sm-12 col-xs-12\">\n\t\t\t<div class=\"form-group\">\n\t\t\t\t<label for=\"<?php echo $this->field_id( 'creds' ); ?>\"><?php echo $this->core->plural(); ?></label>\n\t\t\t\t<input type=\"text\" name=\"<?php echo $this->field_name( 'creds' ); ?>\" id=\"<?php echo $this->field_id( 'creds' ); ?>\" value=\"<?php echo $this->core->number( $prefs['creds'] ); ?>\" class=\"form-control\" />\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"col-lg-8 col-md-8 col-sm-12 col-xs-12\">\n\t\t\t<div class=\"form-group\">\n\t\t\t\t<label for=\"<?php echo $this->field_id( 'log' ); ?>\"><?php _e( 'Log Template', 'twodayssss' ); ?></label>\n\t\t\t\t<input type=\"text\" name=\"<?php echo $this->field_name( 'log' ); ?>\" id=\"<?php echo $this->field_id( 'log' ); ?>\" placeholder=\"<?php _e( 'required', 'twodayssss' ); ?>\" value=\"<?php echo esc_attr( $prefs['log'] ); ?>\" class=\"form-control\" />\n\t\t\t\t<span class=\"description\"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n<?php\n\n\t\t}", "title": "" }, { "docid": "7a224bc8dcc1ea097d0a6d2648800e56", "score": "0.5251088", "text": "private function _after_install() {\n global $COURSE, $DB;\n \n if(!$this->_found) { // if the block's instance hasn't been cached\n // lookup the DB to check if this block instance already exists\n $result = $DB->get_record('block_group_choice', array('course_id' => $COURSE->id, 'instance_id' => $this->instance->id));\n if($result) { // if the block's instance already exist in the DB\n $this->_found = true;\n }\n else { // if this block instance doesn't exist we insert a first set of preferences\n $entries = new stdClass();\n $entries->instance_id = $this->instance->id;\n $entries->course_id = $COURSE->id;\n $entries->showgroups = 1;\n $entries->maxmembers = 2;\n $entries->allowchangegroups = 0;\n $entries->allowstudentteams = 1;\n $entries->allowmultipleteams = 0;\n $DB->insert_record('block_group_choice', $entries);\n }\n }\n }", "title": "" }, { "docid": "2f11cf9635060f4a1ea568def6e04cc5", "score": "0.5242878", "text": "function install($parent)\n\t{\n\t\t// Connect with DB\n\t\t$db = JFactory::getDbo();\n\n\t\t// Query to update plugin\n\t\t$query = $db->getQuery(true);\n\n\t\t$fields = array(\n\t\t\t$db->quoteName('enabled') . ' = 1',\n\t\t\t$db->quoteName('params') . ' = ' . $db->quote('{\"enabled\":\"1\",\"autopurge\":\"1\",\"maxage\":60,\"excluded_components\":[\"com_users\"]}'),\n\t\t);\n\n\t\t$conditions = array(\n\t\t\t$db->quoteName('element') . ' = ' . $db->quote('bytevarnish'),\n\t\t\t$db->quoteName('type') . ' = ' . $db->quote('plugin'),\n\t\t);\n\n\t\t$query->update($db->quoteName('#__extensions'))->set($fields)->where($conditions);\n\t\t$db->setQuery($query);\n\t\t$result = $db->execute();\n\n\t\tJFactory::getApplication()->enqueueMessage('Plugin \\'Byte Varnish\\' is enabled', 'message');\n\t}", "title": "" }, { "docid": "a9323044f634701c6f759e31295c29b0", "score": "0.5232298", "text": "function refresh_plugins_transient()\n {\n }", "title": "" }, { "docid": "47193dd5551e91b82526b7098b53d2de", "score": "0.52318263", "text": "function the_champ_replicate_settings($blogId){\r\n\t\tglobal $theChampFacebookOptions, $theChampLoginOptions, $theChampSharingOptions;\r\n\t\tadd_blog_option($blogId, 'the_champ_facebook', $theChampFacebookOptions);\r\n\t\tadd_blog_option($blogId, 'the_champ_login', $theChampLoginOptions);\r\n\t\tadd_blog_option($blogId, 'the_champ_sharing', $theChampSharingOptions);\r\n\t}", "title": "" }, { "docid": "6debfdc3a87ccaf5afe1f0068b0f2ce4", "score": "0.5226597", "text": "function saveSettings() {\n\tglobal $settings;\n\n\tfile_put_contents(\"settings.json\",json_encode($settings));\n}", "title": "" }, { "docid": "1eb7061c74fd6c6b4adab8b3b138e6c7", "score": "0.5222558", "text": "function _add_setting( $data=array() )\n\t{\n\t\t$setting = array();\n\t\t\n\t\t$setting['conf_title'] = $data['conf_title']['VALUE'];\n\t\t$setting['conf_description'] = $data['conf_description']['VALUE'];\n\t\t$setting['conf_group'] = $data['conf_group']['VALUE'];\n\t\t$setting['conf_type'] = $data['conf_type']['VALUE'];\n\t\t$setting['conf_key'] = $data['conf_key']['VALUE'];\n\t\t$setting['conf_default'] = $data['conf_default']['VALUE'];\n\t\t$setting['conf_extra'] = $data['conf_extra']['VALUE'];\n\t\t$setting['conf_evalphp'] = $data['conf_evalphp']['VALUE'];\n\t\t$setting['conf_protected'] = 1;\n\t\t$setting['conf_position'] = $data['conf_position']['VALUE'];\n\t\t$setting['conf_start_group'] = $data['conf_start_group']['VALUE'];\n\t\t$setting['conf_end_group'] = isset( $data['conf_end_group']['VALUE'] ) ? $data['conf_end_group']['VALUE'] : 0;\n\t\t$setting['conf_help_key'] = $data['conf_help_key']['VALUE'];\n\t\t$setting['conf_add_cache'] = 1;\n\t\t\n\t\tif ( !$this->ipsclass->DB->field_exists( 'conf_help_key', 'conf_settings' ) )\n\t\t{\n\t\t\tunset( $setting['conf_help_key'] );\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_insert( 'conf_settings', $setting );\n\t}", "title": "" }, { "docid": "a2ca8341f47eec7c56970ea79eec1d3e", "score": "0.521816", "text": "function load($plugin) {\r\n $descriptorFileName=\"../plugin/$plugin/pluginDescriptor.xml\";\r\n if (! is_file($descriptorFileName)) {\r\n \terrorLog(\"cannot find file $descriptorFileName for plugin $plugin\");\r\n \techo \"cannot find descriptor for plugin $plugin\";\r\n \texit;\r\n }\r\n $descriptorXml=file_get_contents($descriptorFileName);\r\n $parse = xml_parser_create();\r\n xml_parse_into_struct($parse, $descriptorXml, $value, $index);\r\n xml_parser_free($parse);\r\n \r\n foreach($value as $prop) {\r\n \tif ($prop['tag']=='PROPERTY') {\r\n \t\t//print_r($prop);\r\n \t\t$name=$prop['attributes']['NAME'];\r\n \t\t$value=$prop['attributes']['VALUE'];\r\n \t\t$$name=$value;\r\n \t}\r\n }\r\n \r\n if (isset($sql)) {\r\n \t$sqlfile=\"../plugin/$plugin/$sql\";\r\n \tif (! is_file($sqlfile)) {\r\n \t\terrorLog(\"cannot find file $sqlfile for plugin $plugin\");\r\n \t\techo \"cannot find Sql file for plugin $plugin\";\r\n \t\texit;\r\n \t}\r\n \t//$enforceUTF8=true;\r\n \t//Sql::query(\"SET NAMES utf8\");\r\n \trunScript(null,$sqlfile);\r\n }\r\n // TODO : delete zip file (in the end when all is OK\r\n}", "title": "" }, { "docid": "80ef4f4060b556c13278157c5db90ca8", "score": "0.52127403", "text": "protected function initPluginData()\n\t{\n\t\t// code here\n\t\t$this->slug = plugin_basename($this->pluginFile);\n\t\t$this->pluginData = get_plugin_data($this->pluginFile);\n\t}", "title": "" }, { "docid": "499662848410af38069db00714db9727", "score": "0.5197012", "text": "abstract public function register_plugin();", "title": "" }, { "docid": "bf2744ab5484300bb8fc146d61fcbe79", "score": "0.5196646", "text": "public static function rdv_insert_settings() {\n\t\t\tglobal $wpdb, $rdv_table_settings;\n\t\t\t$rdv_table_settings = $wpdb->prefix . 'rendez_vous_settings';\n\n\t\t\t$default_query_array = array(\n\t\t\t\t'rdv_settings_id' => null,\n\t\t\t\t'rdv_sending' => 1,\n\t\t\t\t'rdv_receiving' => 1\n\t\t\t);\n\n\t\t\t$wpdb->insert( $rdv_table_settings, $default_query_array );\n\t\t}", "title": "" }, { "docid": "24cb2052add36eca8231167c8cd483fc", "score": "0.5188021", "text": "public function saveSettings()\n {\n $this->store->save($this->data);\n }", "title": "" }, { "docid": "14d72eaf1d409a58843a228825909d3f", "score": "0.5178962", "text": "function install_plugin_information()\n {\n }", "title": "" }, { "docid": "547426cc7c5034f875c1e748924c78f6", "score": "0.51764804", "text": "function myplugin_activate() {\n\n\tglobal $myplugin_options_all, $myplugin_dbtables_all, $myplugin_dbtables_data_all;\n\n\tif ( myplugin_installed_version() != MYPLUGIN_VERSION ) {\n\n\t\tmyplugin_activate_dbtables( $myplugin_dbtables_all, $myplugin_dbtables_data_all );\n\t\tmyplugin_activate_options( $myplugin_options_all );\n\t}\n\n\tadd_option( MYPLUGIN_NAME, MYPLUGIN_VERSION );\n}", "title": "" }, { "docid": "da5a7321c9de6f1e562f6c8748ddb51a", "score": "0.516704", "text": "function add_core_data()\n {\n $pncore = array();\n $pncore['version_num'] = _PN_VERSION_NUM;\n $pncore['version_id'] = _PN_VERSION_ID;\n $pncore['version_sub'] = _PN_VERSION_SUB;\n $pncore['logged_in'] = pnUserLoggedIn();\n $pncore['language'] = pnUserGetLang();\n $pncore['themeinfo'] = pnThemeInfo(pnUserGetTheme());\n\n \tpnThemeLoad($pncore['themeinfo']['name']);\n\t\t$colors = array();\n $colors['bgcolor1'] = pnThemeGetVar('bgcolor1');\n $colors['bgcolor2'] = pnThemeGetVar('bgcolor2');\n $colors['bgcolor3'] = pnThemeGetVar('bgcolor3');\n $colors['bgcolor4'] = pnThemeGetVar('bgcolor4');\n $colors['bgcolor5'] = pnThemeGetVar('bgcolor5');\n $colors['sepcolor'] = pnThemeGetVar('sepcolor');\n $colors['textcolor1'] = pnThemeGetVar('textcolor1');\n $colors['textcolor2'] = pnThemeGetVar('textcolor2');\n\n // add userdata\n $pncore['user'] = pnUserGetVars(pnSessionGetVar('uid'));\n\n // add modvars of current module\n $pncore[$this->module] = pnModGetVar($this->module);\n\n // add mod vars of all modules supplied as parameter\n \tforeach (func_get_args() as $modulename) {\n\t // if the modulename is empty do nothing\n\t if(!empty($modulename) && !is_array($modulename) && ($modulename<>$this->module)) {\n // check if user wants to have /PNConfig\n if($modulename==_PN_CONFIG_MODULE) {\n $pnconfig = pnModGetVar(_PN_CONFIG_MODULE);\n foreach($pnconfig as $key => $value) {\n // unserialize all config vars\n \t\t $pncore['pnconfig'][$key] = @unserialize($value);\n }\n } else {\n $pncore[$modulename] = pnModGetVar($modulename);\n }\n }\n }\n\n $this->assign('pncore', $pncore);\n\t\t$this->assign($colors);\n return true;\n }", "title": "" }, { "docid": "a0391fe046ff00c0bd1b3f78f5a5a147", "score": "0.5165847", "text": "public function add_setting( $wp_customize ) {}", "title": "" }, { "docid": "4d49293422821fcc0786b09b6eaf929c", "score": "0.5157531", "text": "function phpgwapi_upgrade0_9_14_502()\n\t{\n\t\t// we use an additional temp. table for postgres and not rename the existing one, but drop it.\n\t\tif ($GLOBALS['phpgw_setup']->oProc->sType == 'pgsql')\t\n\t\t{\n\t\t\t$GLOBALS['phpgw_setup']->oProc->query(\"SELEcT * INTO TEMPORARY TABLE old_preferences FROM phpgw_preferences\",__LINE__,__FILE__);\n\t\t\t$GLOBALS['phpgw_setup']->oProc->DropTable('phpgw_preferences');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$GLOBALS['phpgw_setup']->oProc->RenameTable('phpgw_preferences','old_preferences');\n\t\t}\n\t\t$GLOBALS['phpgw_setup']->oProc->CreateTable('phpgw_preferences',array(\n\t\t\t'fd' => array(\n\t\t\t\t'preference_owner' => array('type' => 'int','precision' => '4','nullable' => False),\n\t\t\t\t'preference_app' => array('type' => 'varchar','precision' => '25','nullable' => False),\n\t\t\t\t'preference_value' => array('type' => 'text','nullable' => False)\n\t\t\t),\n\t\t\t'pk' => array('preference_owner','preference_app'),\n\t\t\t'fk' => array(),\n\t\t\t'ix' => array(),\n\t\t\t'uc' => array()\n\t\t));\n\t\t$db2 = $GLOBALS['phpgw_setup']->db;\t// we need a 2. result-set\n\t\t$GLOBALS['phpgw_setup']->oProc->query(\"SELECT * FROM old_preferences\");\n\t\twhile ($GLOBALS['phpgw_setup']->oProc->next_record())\n\t\t{\n\t\t\t$owner = (int)$GLOBALS['phpgw_setup']->oProc->f('preference_owner');\n\t\t\t$prefs = unserialize($GLOBALS['phpgw_setup']->oProc->f('preference_value'));\n\n\t\t\tif (is_array($prefs))\n\t\t\t{\n\t\t\t\tforeach ($prefs as $app => $pref)\n\t\t\t\t{\n\t\t\t\t\tif (!empty($app) && count($pref))\n\t\t\t\t\t{\n\t\t\t\t\t\t$app = addslashes($app);\n\t\t\t\t\t\t$pref = serialize($pref);\n\t\t\t\t\t\t$db2->query(\"INSERT INTO phpgw_preferences\".\n\t\t\t\t\t\t\t\" (preference_owner,preference_app,preference_value)\".\n\t\t\t\t\t\t\t\" VALUES ($owner,'$app','$pref')\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$GLOBALS['phpgw_setup']->oProc->DropTable('old_preferences');\n\n\t\t$GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.14.503';\n\t\treturn $GLOBALS['setup_info']['phpgwapi']['currentver'];\n\t}", "title": "" }, { "docid": "b28dfe7afa98c07008309b0954ba55b5", "score": "0.5157259", "text": "function qa_initialize_predb_plugins()\n{\n\tglobal $qa_pluginManager;\n\t$qa_pluginManager = new Q2A_Plugin_PluginManager();\n\t$qa_pluginManager->readAllPluginMetadatas();\n\n\t$qa_pluginManager->loadPluginsBeforeDbInit();\n\tqa_load_override_files();\n}", "title": "" }, { "docid": "523c0769c008677b79553d0ecc7b4877", "score": "0.5156436", "text": "function bdpp_register_settings() {\n\tregister_setting( 'bdpp_settings', 'bdpp_opts', 'bdpp_validate_settings' );\n}", "title": "" }, { "docid": "f69fe66a2386908061f7bee1c729ffcd", "score": "0.5154316", "text": "public function add()\n\t{\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_enable'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_icon_display'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_display_empty'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_select_menu'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_text'\n\t\t);\n\t\t\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_icon'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_ccm_enable'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_ccm_text'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_dc_enable'\n\t\t);\n\t}", "title": "" }, { "docid": "e0d44b84732dc7d4711152e4e7a0f568", "score": "0.51532674", "text": "function save_config()\n\t{\n\t\t$i=0;\n\t\t$rows=list_to_map('id',$GLOBALS['SITE_DB']->query_select('pstore_customs',array('*')));\n\t\twhile (array_key_exists('custom_'.strval($i),$_POST))\n\t\t{\n\t\t\t$id=post_param_integer('custom_'.strval($i));\n\t\t\t$title=post_param('custom_title_'.strval($i));\n\t\t\t$description=post_param('custom_description_'.strval($i));\n\t\t\t$enabled=post_param_integer('custom_enabled_'.strval($i),0);\n\t\t\t$cost=post_param_integer('custom_cost_'.strval($i));\n\t\t\t$one_per_member=post_param_integer('custom_one_per_member_'.strval($i),0);\n\t\t\t$delete=post_param_integer('delete_custom_'.strval($i),0);\n\t\t\t$_title=$rows[$id]['c_title'];\n\t\t\t$_description=$rows[$id]['c_description'];\n\t\t\tif ($delete==1)\n\t\t\t{\n\t\t\t\tdelete_lang($_title);\n\t\t\t\tdelete_lang($_description);\n\t\t\t\t$GLOBALS['SITE_DB']->query_delete('pstore_customs',array('id'=>$id),'',1);\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$GLOBALS['SITE_DB']->query_update('pstore_customs',array(\n\t\t\t\t\t'c_title'=>lang_remap($_title,$title),\n\t\t\t\t\t'c_description'=>lang_remap($_description,$description),\n\t\t\t\t\t'c_enabled'=>$enabled,\n\t\t\t\t\t'c_cost'=>$cost,\n\t\t\t\t\t'c_one_per_member'=>$one_per_member,\n\t\t\t\t),array('id'=>$id),'',1);\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\t$title=post_param('custom_title',NULL);\n\t\tif (!is_null($title))\n\t\t{\n\t\t\t$description=post_param('custom_description');\n\t\t\t$enabled=post_param_integer('custom_enabled',0);\n\t\t\t$cost=post_param_integer('custom_cost');\n\t\t\t$one_per_member=post_param_integer('custom_one_per_member',0);\n\n\t\t\t$GLOBALS['SITE_DB']->query_insert('pstore_customs',array(\n\t\t\t\t'c_title'=>insert_lang($title,2),\n\t\t\t\t'c_description'=>insert_lang($description,2),\n\t\t\t\t'c_enabled'=>$enabled,\n\t\t\t\t'c_cost'=>$cost,\n\t\t\t\t'c_one_per_member'=>$one_per_member,\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "585003eeffd2c22a3e547241b3469cdf", "score": "0.5145998", "text": "function addSettings ($name, $value, $type, $protected)\n{\n\tglobal $conn;\n\tglobal $database_table_prefix;\n\t$sql = \"SELECT id FROM \".$database_table_prefix.\"settings WHERE name = '$name' LIMIT 1\";\n\t$rs = $conn->query($sql);\n\tif($conn->query($sql) === false) {\n\t\ttrigger_error('Error: '.$conn->error, E_USER_ERROR);\n\t}\n\n\t$exist = $rs->num_rows;\n\tif($exist==0)\n\t{\n\t\t// insert\n\t\t$query = \"INSERT INTO \".$database_table_prefix.\"settings (id, name, value, type, protected) VALUES (NULL, '$name', '$value', '$type', '$protected')\";\n\t\t$rs = $conn->query($query);\n\t\t$last_inserted_id = $conn->insert_id;\n\t\t$affected_rows = $conn->affected_rows;\n\t}\n\telse\n\t{\n\t\t// update\n\t\t$query = \"UPDATE \".$database_table_prefix.\"settings SET value = '$value' WHERE name = '$name' LIMIT 1\";\n\t\t$rs = $conn->query($query);\n\t\t$affected_rows = $conn->affected_rows;\n\t}\n}", "title": "" }, { "docid": "9a3bc55cd5526ab39ad7be589611ddfc", "score": "0.5143109", "text": "public function loadSettings()\n\t{\n\t\t// Update picto for Dolibarr 12++\n\t\tif (function_exists('version_compare') && version_compare(DOL_VERSION, '12.0.0') >= 0) {\n\t\t\t$this->picto = \"quicknotes_128.png@quicknotes\";\n\t\t}\n\n\t\t$this->addJsFile('quicknotes.js.php');\n\t\t$this->enableHooks(array(\n\t\t\t'toprightmenu',\n\t\t\t'main',\n\t\t\t'login'\n\t\t));\n\t}", "title": "" }, { "docid": "839a1b28eed20296a44d7665d3180c1c", "score": "0.51390207", "text": "private function loadPlugins()\n\t{\n\t\t$plugins = plugin_installed_list();\n\t\t$plugins = collect($plugins)->map(function ($item, $key) {\n\t\t\tif (is_object($item)) {\n\t\t\t\t$item = Arr::fromObject($item);\n\t\t\t}\n\t\t\tif (isset($item['item_id']) && !empty($item['item_id'])) {\n\t\t\t\t$item['installed'] = plugin_check_purchase_code($item);\n\t\t\t}\n\t\t\t\n\t\t\treturn $item;\n\t\t})->toArray();\n\t\t\n\t\tConfig::set('plugins', $plugins);\n\t\tConfig::set('plugins.installed', collect($plugins)->whereStrict('installed', true)->toArray());\n\t}", "title": "" }, { "docid": "2eb4835f9eb71c96e967deacae320cd4", "score": "0.51384896", "text": "public function save_settings() {\n\n\t\tif ( !isset( $_REQUEST['action'] ) || !isset( $_GET['page'] ) )\n\t\t\treturn;\n\n\t\tif ( 'vfb-settings' !== $_GET['page'] )\n\t\t\treturn;\n\n\t\tif ( 'vfb_settings' !== $_REQUEST['action'] )\n\t\t\treturn;\n\n\t\tcheck_admin_referer( 'vfb-update-settings' );\n\n\t\t$data = array();\n\n\t\tforeach ( $_POST['vfb-settings'] as $key => $val ) {\n\t\t\t$data[ $key ] = esc_html( $val );\n\t\t}\n\n\t\tupdate_option( 'vfb-settings', $data );\n\t}", "title": "" }, { "docid": "8b381a2630080055560720a32d1dc8e7", "score": "0.5135075", "text": "public function action_preferences() {\n $package = Model::factory('package');\n $get_langcolor_info = $package->get_langcolor_info();\n $this->template->meta_description = CLOUD_SITENAME . \" | Preferences \";\n $this->template->meta_keywords = CLOUD_SITENAME . \" | Preferences \";\n $this->template->title = CLOUD_SITENAME . \" | \" . __('Preferences');\n $this->template->page_title = __('Preferences');\n $this->template->content = View::factory(\"admin/package_plan/preferences\")->bind('langcolor_info', $get_langcolor_info);\n }", "title": "" }, { "docid": "ac06dd3fb0e34e7a2eb3bdc8bec623c5", "score": "0.5132514", "text": "function addSetting($link,$profile_id,$type,$value)\n\t\t{\n\t\t\t$type = mysqli_escape_string($link,$type);\n\t\t\t$value = mysqli_escape_string($link,$value);\n\t\t\t$sql = 'INSERT INTO setting (profile_id,type,value) VALUES ('.$profile_id.',\"'.$type.'\",'.$value.')';\n\t\t\tif (mysqli_query($link, $sql)) {\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d362a9357d3046fbd6c558d0c1f65611", "score": "0.5129905", "text": "function top10_install() {\r\n/* Creates new database field */\r\n//add_option('omekafeedpull_omekaroot', '/omeka', '', 'yes');\r\n}", "title": "" }, { "docid": "3a69b2d2a93e06e84427a18c0043b7bd", "score": "0.5125306", "text": "public function sync()\n {\n $class = explode('\\\\', get_called_class());\n $manager = \\Str::studly(str_replace('EntryModel', null, end($class)));\n\n $existingAddons = $manager::getAll();\n $databaseAddons = $this->all();\n\n // Sync TO the database\n foreach ($existingAddons as $addon) {\n if (!$databaseAddons->findBySlug($addon->slug)) {\n $this->addons->insert(\n array(\n 'slug' => $addon->slug,\n )\n );\n }\n }\n }", "title": "" }, { "docid": "4b3f01adfd370c7167d5f2ca31d9fe80", "score": "0.5122815", "text": "function plugin_install_now()\n{\n global $pi_name, $pi_version, $gl_version, $pi_url, $NEWTABLE, $DEFVALUES, $NEWFEATURE;\n global $_TABLES, $_CONF;\n\n COM_errorLog(\"Attempting to install the $pi_name Plugin\",1);\n $uninstall_plugin = 'plugin_uninstall_' . $pi_name;\n\n // Create the Plugins Tables\n require_once($_CONF['path'] . 'plugins/forum/sql/mysql_install_2.6.php');\n\n for ($i = 1; $i <= count($_SQL); $i++) {\n $progress .= \"executing \" . current($_SQL) . \"<br\" . XHTML . \">\\n\";\n COM_errorLOG(\"executing \" . current($_SQL));\n DB_query(current($_SQL),'1');\n if (DB_error()) {\n COM_errorLog(\"Error Creating $table table\",1);\n $uninstall_plugin ('DeletePlugin');\n return false;\n exit;\n }\n next($_SQL);\n }\n COM_errorLog(\"Success - Created $table table\",1);\n \n // Insert Default Data\n \n foreach ($DEFVALUES as $table => $sql) {\n COM_errorLog(\"Inserting default data into $table table\",1);\n DB_query($sql,1);\n if (DB_error()) {\n COM_errorLog(\"Error inserting default data into $table table\",1);\n $uninstall_plugin ();\n return false;\n exit;\n }\n COM_errorLog(\"Success - inserting data into $table table\",1);\n }\n \n // Create the plugin admin security group\n COM_errorLog(\"Attempting to create $pi_name admin group\", 1);\n DB_query(\"INSERT INTO {$_TABLES['groups']} (grp_name, grp_descr) \"\n . \"VALUES ('$pi_name Admin', 'Users in this group can administer the $pi_name plugin')\",1);\n if (DB_error()) {\n $uninstall_plugin();\n return false;\n exit;\n }\n COM_errorLog('...success',1);\n $query = DB_query(\"SELECT max(grp_id) FROM {$_TABLES['groups']} \");\n list ($group_id) = DB_fetchArray($query);\n\n // Save the grp id for later uninstall\n COM_errorLog('About to save group_id to vars table for use during uninstall',1);\n DB_query(\"INSERT INTO {$_TABLES['vars']} VALUES ('{$pi_name}_admin', $group_id)\",1);\n if (DB_error()) {\n $uninstall_plugin ();\n return false;\n exit;\n }\n COM_errorLog('...success',1);\n \n // Add plugin Features\n foreach ($NEWFEATURE as $feature => $desc) {\n COM_errorLog(\"Adding $feature feature\",1);\n DB_query(\"INSERT INTO {$_TABLES['features']} (ft_name, ft_descr) \"\n . \"VALUES ('$feature','$desc')\",1);\n if (DB_error()) {\n COM_errorLog(\"Failure adding $feature feature\",1);\n $uninstall_plugin ();\n return false;\n exit;\n }\n $query = DB_query(\"SELECT max(ft_id) FROM {$_TABLES['features']} \");\n list ($feat_id) = DB_fetchArray($query);\n\n COM_errorLog(\"Success\",1);\n COM_errorLog(\"Adding $feature feature to admin group\",1);\n DB_query(\"INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES ($feat_id, $group_id)\");\n if (DB_error()) {\n COM_errorLog(\"Failure adding $feature feature to admin group\",1);\n $uninstall_plugin ();\n return false;\n exit;\n }\n COM_errorLog(\"Success\",1);\n } \n \n // OK, now give Root users access to this plugin now! NOTE: Root group should always be 1\n COM_errorLog(\"Attempting to give all users in Root group access to $pi_name admin group\",1);\n DB_query(\"INSERT INTO {$_TABLES['group_assignments']} VALUES ($group_id, NULL, 1)\");\n if (DB_error()) {\n $uninstall_plugin ();\n return false;\n exit;\n }\n\n // Register the plugin with Geeklog\n COM_errorLog(\"Registering $pi_name plugin with Geeklog\", 1);\n DB_delete($_TABLES['plugins'],'pi_name',$pi_name);\n DB_query(\"INSERT INTO {$_TABLES['plugins']} (pi_name, pi_version, pi_gl_version, pi_homepage, pi_enabled) \"\n . \"VALUES ('$pi_name', '$pi_version', '$gl_version', '$pi_url', 1)\");\n\n if (DB_error()) {\n $uninstall_plugin ();\n return false;\n exit;\n }\n\n COM_errorLog(\"Succesfully installed the $pi_name Plugin!\",1);\n return true;\n}", "title": "" }, { "docid": "8e2c42053e6dd14766ba7f45fd37881b", "score": "0.5119096", "text": "function tb_addTagBeepToWpAdmin() { \r\n //add in /settings manu\r\n add_options_page(\"tagBeep uptime\", \"tagBeep uptime\", 8, \"tagBeepUptimeMonitor\", \"tb_load_tagBeepAdmin\"); \r\n //add in the /plugins menu\r\n add_plugins_page(\"tagBeep uptime\", \"tagBeep uptime\", 8, \"tagBeepUptimeMonitorPlugin\", \"tb_load_tagBeepAdmin\"); \r\n}", "title": "" }, { "docid": "aca69330b9d30e22a69c439a3b943093", "score": "0.51162136", "text": "function setDefaultPrefs($module,$prefs)\n {\n if(is_array($prefs) && count($prefs))\n {\n while(list($var,$value) = each($prefs))\n {\n JxPref::setModulePref($module,$var,$value);\n }\n }\n }", "title": "" }, { "docid": "fdedafce57caf3f7819fc5ff7cbf8048", "score": "0.511146", "text": "function create_tbl_woo2app_setting(){\r global $wpdb;\r $charset_collate = $wpdb->get_charset_collate();\r $table_name = $wpdb->prefix . 'woo2app_setting';\r $sql = \"CREATE TABLE $table_name (\r\t\tst_id bigint(20) NOT NULL AUTO_INCREMENT,\r\t\tPRIMARY KEY (st_id),\r\t\tst_name varchar(100) NOT NULL,\r\t\tst_value varchar(200) NOT NULL,\r\t\tst_desc\tvarchar(200) NOT NULL\r\t) $charset_collate;\";\r require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\r dbDelta( $sql );\r add_option( 'woo2app_version', '1.3' );\r }", "title": "" }, { "docid": "4efe59d23bdf690827c17bb5b359eeb4", "score": "0.5101727", "text": "function dbInstall($data='') {\n/*\nmixcloud_favorites - \n*/\n $data = <<<EOD\n mixcloud_favorites: ID int(10) unsigned NOT NULL auto_increment\n mixcloud_favorites: TITLE varchar(100) NOT NULL DEFAULT ''\n mixcloud_favorites: STREAM varchar(255) NOT NULL DEFAULT ''\n mixcloud_favorites: ITEM_ID varchar(255) NOT NULL DEFAULT '' \nEOD;\n parent::dbInstall($data);\n }", "title": "" }, { "docid": "0c3bfb338647a0ea4b00650ad44543b0", "score": "0.51014555", "text": "public function save_settings() {\n\n if (!isset($_REQUEST['action']) || !isset($_GET['page']))\n return;\n\n if ('swpm-settings' !== $_GET['page'])\n return;\n\n if ('swpm_settings' !== $_REQUEST['action'])\n return;\n\n check_admin_referer('swpm-update-settings');\n\n $data = array();\n\n foreach ($_POST['swpm-settings'] as $key => $val) {\n $data[$key] = esc_html($val);\n }\n\n update_option('swpm-settings', $data);\n }", "title": "" }, { "docid": "f82cfc3d5ae60ee76532b91065506bdc", "score": "0.50962824", "text": "public static function register()\n\t\t\t{\n\t\t\t\t\n\t\t\t\t//IMPORTANT\n\t\t\t\t//Register all of the options that will be used\n\t\t\t\n//\t\t\t\tregister_setting(HE_PLUGINOPTIONS_ID.'_options', 'he_po_quote');\n\n\t\t\t\tregister_setting(HE_PLUGINOPTIONS_ID.'_options', 'he_userid');\n\t\t\t\tregister_setting(HE_PLUGINOPTIONS_ID.'_options', 'he_popup_option');\n\t\t\t\tregister_setting(HE_PLUGINOPTIONS_ID.'_options', 'he_copypaste_option');\n\t\t\t\tregister_setting(HE_PLUGINOPTIONS_ID.'_options', 'he_freecode');\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "94b6a76d52f8f8b742ebc1a79e9f738a", "score": "0.5077565", "text": "protected function updateSettings()\n {\n $this->settings = array();\n $raw_settings = $this->db->fetchAll('SELECT name, value FROM settings');\n\n foreach ($raw_settings as $raw_setting) {\n $this->settings[$raw_setting['name']] = $raw_setting['value'];\n }\n }", "title": "" }, { "docid": "72998af05fcd41f1b0cb1e686b97791a", "score": "0.50764716", "text": "public function save()\n {\n update_option($this->optionKey, $this->fields);\n }", "title": "" }, { "docid": "189b58f9d7eb66cc1a8380075ad672d5", "score": "0.5075259", "text": "function install(){\r\n $options = $this->get_options();\r\n $isnew = false;\r\n if(!$installed_version = get_option('twitlink_version')){\r\n // no cl_version saved yet, set it to start of version 3\r\n $installed_version = '2.30';\r\n $isnew = true;\r\n }\r\n if(!$isnew){\r\n // new recode version from 1.27 to 1.30\r\n if(version_compare($this->php_version($installed_version),'1.2.7','>') && version_compare($this->php_version($installed_version),'1.3.0','<')){\r\n // use new default values\r\n $options = $this->get_options(true);\r\n }\r\n\r\n // update options (do this at the end so all the updates can happen first)\r\n update_option($this->db_option,$options); \r\n }\r\n // update twitlink_version in db\r\n if($this->version != $installed_version){\r\n update_option('twitlink_version',$this->version);\r\n }\r\n // add db table if it doesn't exist (backwards compatible with wp-twitip-id plugin)\r\n global $wpdb;\r\n $table_name = $wpdb->prefix . \"wptwitipid\";\r\n if($wpdb->get_var(\"show tables like '$table_name'\") != $table_name) {\r\n $sql = \"CREATE TABLE \" . $table_name . \" (\r\n id mediumint(9) NOT NULL AUTO_INCREMENT,\r\n email varchar(120) NOT NULL,\r\n twitid varchar(120) NOT NULL,\r\n PRIMARY KEY (id),\r\n UNIQUE KEY (email)\r\n );\";\r\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\r\n dbDelta($sql); \r\n }\r\n }", "title": "" }, { "docid": "aeb68cc98072be5993974280eeaa5fc2", "score": "0.5075237", "text": "public function updateUserPreferences()\n {\n $userList = $this->_userDao->getUserList();\n\n // loop through every user and fix it\n foreach ($userList as $user) {\n /*\n * Because we do not get all users' properties from\n * getUserList, retrieve the users' settings from scratch\n */\n $user = $this->_userDao->getUser($user['userid']);\n\n // set the users' preferences\n $this->setSettingIfNot($user['prefs'], 'perpage', 25);\n $this->setSettingIfNot($user['prefs'], 'date_formatting', 'human');\n $this->setSettingIfNot($user['prefs'], 'normal_template', 'we1rdo');\n $this->setSettingIfNot($user['prefs'], 'mobile_template', 'mobile');\n $this->setSettingIfNot($user['prefs'], 'tablet_template', 'we1rdo');\n $this->setSettingIfNot($user['prefs'], 'count_newspots', true);\n $this->setSettingIfNot($user['prefs'], 'mouseover_subcats', true);\n $this->setSettingIfNot($user['prefs'], 'keep_seenlist', true);\n $this->setSettingIfNot($user['prefs'], 'auto_markasread', true);\n $this->setSettingIfNot($user['prefs'], 'keep_downloadlist', true);\n $this->setSettingIfNot($user['prefs'], 'keep_watchlist', true);\n $this->setSettingIfNot($user['prefs'], 'nzb_search_engine', 'nzbindex');\n $this->setSettingIfNot($user['prefs'], 'show_filesize', true);\n $this->setSettingIfNot($user['prefs'], 'show_reportcount', true);\n $this->setSettingIfNot($user['prefs'], 'minimum_reportcount', 1);\n $this->setSettingIfNot($user['prefs'], 'show_nzbbutton', true);\n $this->setSettingIfNot($user['prefs'], 'show_multinzb', true);\n $this->setSettingIfNot($user['prefs'], 'customcss', '');\n $this->setSettingIfNot($user['prefs'], 'newspotdefault_tag', $user['username']);\n $this->setSettingIfNot($user['prefs'], 'newspotdefault_body', '');\n $this->setSettingIfNot($user['prefs'], 'user_language', 'en_US');\n $this->setSettingIfNot($user['prefs'], 'show_avatars', true);\n $this->setSettingIfNot($user['prefs'], 'usemailaddress_for_gravatar', true);\n\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'action', 'disable');\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'local_dir', '/tmp');\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'prepare_action', 'merge');\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'command', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'url', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'apikey', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'username', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'password', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'host', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'port', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'ssl', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'username', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'password', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'timeout', 15);\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbvortex'], 'host', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbvortex'], 'port', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbvortex'], 'apikey', '');\n\n $this->setSettingIfNot($user['prefs']['notifications']['growl'], 'host', '');\n $this->setSettingIfNot($user['prefs']['notifications']['growl'], 'password', '');\n /* Notifo and NMA are discontinued. */\n $this->unsetSetting($user['prefs']['notifications'], 'nma');\n $this->unsetSetting($user['prefs']['notifications'], 'notifo');\n $this->setSettingIfNot($user['prefs']['notifications']['prowl'], 'apikey', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'screen_name', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'request_token', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'request_token_secret', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'access_token', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'access_token_secret', '');\n $notifProviders = Notifications_Factory::getActiveServices();\n foreach ($notifProviders as $notifProvider) {\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider], 'enabled', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'watchlist_handled', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'nzb_handled', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'retriever_finished', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'report_posted', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'spot_posted', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'user_added', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'newspots_for_filter', false);\n } // foreach\n\n // make sure a sort preference is defined. An empty field means relevancy\n $this->setSettingIfNot($user['prefs'], 'defaultsortfield', '');\n\n // Remove deprecated preferences\n $this->unsetSetting($user['prefs'], 'search_url');\n $this->unsetSetting($user['prefs'], 'template');\n $this->unsetSetting($user['prefs']['notifications'], 'libnotify');\n\n // Make sure the user has a valid RSA key\n if ($user['userid'] > 2) {\n $rsaKey = $this->_userDao->getUserPrivateRsaKey($user['userid']);\n if (empty($rsaKey)) {\n // Creer een private en public key paar voor deze user\n $spotSigning = Services_Signing_Base::factory();\n $userKey = $spotSigning->createPrivateKey($this->_settings->get('openssl_cnf_path'));\n\n $this->_userDao->setUserRsaKeys($user['userid'], $userKey['public'], $userKey['private']);\n } // if\n } // if\n\n /*\n * In earlier versions, we always appended \"sabnzbd/\" to the URL, so we do this once\n * manually\n */\n if ($this->_settings->get('securityversion') < 0.31) {\n if (!empty($user['prefs']['nzbhandling']['sabnzbd']['url'])) {\n $user['prefs']['nzbhandling']['sabnzbd']['url'] = $user['prefs']['nzbhandling']['sabnzbd']['url'].'sabnzbd/';\n } // if\n } // if\n\n // update the user record in the database\n $this->_userDao->setUser($user);\n } // foreach\n }", "title": "" }, { "docid": "35abc3abc347139cb99e70941c672b7c", "score": "0.5073767", "text": "protected function storeExtension()\n\t{\n\t\t// Discover installs are stored a little differently\n\t\tif ($this->route === 'discover_install')\n\t\t{\n\t\t\t$manifest_details = Installer::parseXMLInstallFile($this->parent->getPath('manifest'));\n\n\t\t\t$this->extension->manifest_cache = json_encode($manifest_details);\n\t\t\t$this->extension->state = 0;\n\t\t\t$this->extension->name = $manifest_details['name'];\n\t\t\t$this->extension->enabled = 'editors' === $this->extension->folder ? 1 : 0;\n\t\t\t$this->extension->params = $this->parent->getParams();\n\n\t\t\tif (!$this->extension->store())\n\t\t\t{\n\t\t\t\t// Install failed, roll back changes\n\t\t\t\tthrow new \\RuntimeException(\\JText::_('JLIB_INSTALLER_ERROR_PLG_DISCOVER_STORE_DETAILS'));\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Was there a plugin with the same name already installed?\n\t\tif ($this->currentExtensionId)\n\t\t{\n\t\t\tif (!$this->parent->isOverwrite())\n\t\t\t{\n\t\t\t\t// Install failed, roll back changes\n\t\t\t\tthrow new \\RuntimeException(\n\t\t\t\t\t\\JText::sprintf(\n\t\t\t\t\t\t'JLIB_INSTALLER_ABORT_PLG_INSTALL_ALLREADY_EXISTS',\n\t\t\t\t\t\t\\JText::_('JLIB_INSTALLER_' . $this->route),\n\t\t\t\t\t\t$this->name\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$this->extension->load($this->currentExtensionId);\n\t\t\t$this->extension->name = $this->name;\n\t\t\t$this->extension->manifest_cache = $this->parent->generateManifestCache();\n\n\t\t\t// Update the manifest cache and name\n\t\t\t$this->extension->store();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Store in the extensions table (1.6)\n\t\t\t$this->extension->name = $this->name;\n\t\t\t$this->extension->type = 'plugin';\n\t\t\t$this->extension->ordering = 0;\n\t\t\t$this->extension->element = $this->element;\n\t\t\t$this->extension->folder = $this->group;\n\t\t\t$this->extension->enabled = 0;\n\t\t\t$this->extension->protected = 0;\n\t\t\t$this->extension->access = 1;\n\t\t\t$this->extension->client_id = 0;\n\t\t\t$this->extension->params = $this->parent->getParams();\n\n\t\t\t// Custom data\n\t\t\t$this->extension->custom_data = '';\n\n\t\t\t// System data\n\t\t\t$this->extension->system_data = '';\n\t\t\t$this->extension->manifest_cache = $this->parent->generateManifestCache();\n\n\t\t\t// Editor plugins are published by default\n\t\t\tif ($this->group === 'editors')\n\t\t\t{\n\t\t\t\t$this->extension->enabled = 1;\n\t\t\t}\n\n\t\t\tif (!$this->extension->store())\n\t\t\t{\n\t\t\t\t// Install failed, roll back changes\n\t\t\t\tthrow new \\RuntimeException(\n\t\t\t\t\t\\JText::sprintf(\n\t\t\t\t\t\t'JLIB_INSTALLER_ABORT_PLG_INSTALL_ROLLBACK',\n\t\t\t\t\t\t\\JText::_('JLIB_INSTALLER_' . $this->route),\n\t\t\t\t\t\t$this->extension->getError()\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Since we have created a plugin item, we add it to the installation step stack\n\t\t\t// so that if we have to rollback the changes we can undo it.\n\t\t\t$this->parent->pushStep(array('type' => 'extension', 'id' => $this->extension->extension_id));\n\t\t}\n\t}", "title": "" }, { "docid": "7f4c49304e6945abb9dba8fc061c8193", "score": "0.507321", "text": "public function system_save_preference()\n {\n System_helper::save_preference();\n }", "title": "" }, { "docid": "be464991760161dbaa23dd52680669e0", "score": "0.5073046", "text": "function seed_csp4_activation(){\r\n // Store the plugin version when initial install occurred.\r\n $has_seed_csp4_settings_content = get_option('seed_csp4_settings_content');\r\n if(!empty($has_seed_csp4_settings_content)){\r\n add_option( 'seed_csp4_initial_version', 0, '', false );\r\n }else{\r\n add_option( 'seed_csp4_initial_version', SEED_CSP4_VERSION, '', false );\r\n }\r\n \r\n\r\n // Store the plugin version activated to reference with upgrades.\r\n update_option( 'seed_csp4_version', SEED_CSP4_VERSION, false );\r\n\trequire_once( 'inc/default-settings.php' );\r\n\tadd_option('seed_csp4_settings_content',unserialize($seed_csp4_settings_deafults['seed_csp4_settings_content']));\r\n\tadd_option('seed_csp4_settings_design',unserialize($seed_csp4_settings_deafults['seed_csp4_settings_design']));\r\n\tadd_option('seed_csp4_settings_advanced',unserialize($seed_csp4_settings_deafults['seed_csp4_settings_advanced']));\r\n}", "title": "" }, { "docid": "b5227475e8d00d1ad82b64a6ba3bad64", "score": "0.50704765", "text": "function webplayer_db_install_data() {\r\n\tglobal $wpdb;\r\n\tglobal $installed_webplayer_version;\r\n\tglobal $webplayer_version;\r\n\r\n\tif ($installed_webplayer_version != $webplayer_version) {\r\n\t\t$table_name = $wpdb->prefix . \"webplayer\";\t\r\n\t\t$wpdb->insert($table_name, array( \r\n\t\t'id' => 1,\r\n\t\t'videoid' => 1,\r\n\t\t'playlistid' => 0,\r\n\t\t'width' => 640, \r\n\t\t'height' => 360, \r\n\t\t'skinmode' => 'static',\r\n \t\t'stretchtype' => 'fill',\r\n \t\t'buffertime' => 3,\r\n \t\t'volumelevel' => 50,\r\n \t\t'autoplay' => 0,\r\n\t\t'playlistautoplay' => 0,\r\n \t\t'playlistopen' => 0,\r\n \t\t'playlistrandom' => 0,\r\n\t\t'controlbar' => 1,\r\n \t\t'playpause' => 1,\r\n \t\t'progressbar' => 1,\r\n \t\t'timer' => 1,\r\n \t\t'share' => 1,\r\n \t\t'volume' => 1,\r\n \t\t'fullscreen' => 1,\r\n \t\t'playdock' => 1,\r\n\t\t'playlist' => 1\r\n\t\t));\r\n\t\t\r\n\t\t$table_name = $wpdb->prefix . \"webplayer_license\";\t\r\n\t\t$wpdb->insert( $table_name, array( \r\n\t\t'id' => 1,\r\n\t\t'licensekey' => 'HD_Webplayer_Commercial_Key', \r\n\t\t'logo' => 'logo.jpg', \r\n\t\t'logoposition' => 'topleft',\r\n\t\t'logoalpha' => 50,\r\n\t\t'logotarget' => 'http://hdwebplayer.com'\r\n\t\t));\r\n\t\t\r\n\t\t$table_name = $wpdb->prefix . \"webplayer_videos\";\t\r\n\t\t$wpdb->insert( $table_name, array( \r\n\t\t'id' => 1,\r\n\t\t'title' => 'Sample Video',\r\n\t\t'type' => 'video',\r\n\t\t'streamer' => '',\r\n\t\t'dvr' => 0,\r\n\t\t'video' => 'http://hdwebplayer.com/player/videos/300.mp4',\r\n\t\t'hdvideo' => '',\r\n\t\t'preview' => '',\r\n\t\t'thumb' => '',\r\n\t\t'token' => '',\r\n\t\t'playlistid' => 0\r\n\t\t));\r\n\t}\r\n}", "title": "" }, { "docid": "3b1ad95f76405b3b777b3f679cc4e44b", "score": "0.5066348", "text": "function bfa_import_settings_now() {\r\n\tcheck_ajax_referer( \"import_bfa_settings\" );\r\n\t$new_options = maybe_unserialize(bfa_file_get_contents($_FILES['userfile']['tmp_name']));\r\n\tupdate_option('bfa_new_test', $new_options);\r\n\tdie();\r\n}", "title": "" }, { "docid": "080e8e0b11790a531b44263d3d49286e", "score": "0.5058785", "text": "function install_plugins_favorites_form()\n {\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "099509dc2bdd4344dab4cc8db4bba0a6", "score": "0.0", "text": "public function destroy(Reply $reply)\n {\n $reply->delete();\n }", "title": "" } ]
[ { "docid": "440048b39bf8ab60c81c3f27962faaf1", "score": "0.69409096", "text": "public function deleteResource(PersistentResource $resource);", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "67073eb28b6fb2932d1e4a3ff481c114", "score": "0.6605598", "text": "public function delete(){\n $this->getResource()->delete();\n }", "title": "" }, { "docid": "845b5beec29f48d7ee3f0219ecebfba1", "score": "0.65896255", "text": "public function deleteResource($resource) {\n $this->elasticSearch->deleteFromResourceIndices($resource);\n $this->neo4J->deleteResource($resource);\n $this->cStore->deleteResource($resource, $this->user);\n }", "title": "" }, { "docid": "3198b8a0f2716ad40da9a8a62bebf688", "score": "0.65715295", "text": "protected function remove_storage()\n {\n }", "title": "" }, { "docid": "6898a7b9ab4b74e4d06289f6390e1106", "score": "0.65318215", "text": "public function delete(StorageInterface $storage);", "title": "" }, { "docid": "071dbac02a520ad863c7be29f0165ebb", "score": "0.6207335", "text": "public function remove(array $storageOptions): void;", "title": "" }, { "docid": "1a8d90c6745827f2dc8e62f5e38af97d", "score": "0.61857986", "text": "public function delete(){\n Storage::delete($this->url);\n parent::delete();\n }", "title": "" }, { "docid": "06641d3c5ef56f0cfccc1a0c7c03e6c0", "score": "0.61854947", "text": "public function dropResource($sResource)\n {\n $this->_oDatabase->query(\"DELETE FROM `acl_resources` WHERE `resource` = \". $sResource);\n }", "title": "" }, { "docid": "e0c513c82c944008d275fc6f457afb42", "score": "0.6123187", "text": "public function forceDeleted(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "aa0ee3d5768ef76734de9404aeeed4de", "score": "0.6099325", "text": "public function destroy($id)\n {\n $image = Image::findOrFail($id);\n if ($image != null) {\n \n //Delete from localStorage\n if($image->productImage != 'noImage.jpg'){\n echo $image->productImage;\n Storage::delete('public/productImages'.$image->productImage);\n }\n\n //Delete from db\n $isDeleted = $image->delete();\n if ($isDeleted) {\n return new ImageResource($image);\n }\n }\n }", "title": "" }, { "docid": "337a108f893dd3105089822c4c95d7f1", "score": "0.5992111", "text": "public function destroy()\n\t{\n\t\tif ($this->get('type') == 'file')\n\t\t{\n\t\t\t$path = $this->filespace() . '/' . $this->get('path');\n\n\t\t\t// Remove the file\n\t\t\tif (\\Filesystem::exists($path))\n\t\t\t{\n\t\t\t\tif (!\\Filesystem::delete($path))\n\t\t\t\t{\n\t\t\t\t\t$this->addError(Lang::txt('Failed to remove file from filesystem.'));\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Attempt to delete the record\n\t\treturn parent::destroy();\n\t}", "title": "" }, { "docid": "94b0ec35305eb8fad8a373d42939f500", "score": "0.5987054", "text": "public function delete($asset) {\n // Load asset from file\n $assetObj = $this->getAssetObject($asset);\n $basepath = $assetObj->getBasePath();\n \n $date = date('Y/m/d');\n $trashDir = 'Trash/' . $date . '/' . $basepath;\n $this->storage->rename($basepath, $trashDir);\n }", "title": "" }, { "docid": "4659089669faba669cd71dc10ffa47b6", "score": "0.5968648", "text": "public function delete() {\n File::delete([\n $this->thumb_url,\n $this->url\n ]);\n\n parent::delete();\n }", "title": "" }, { "docid": "8a7e8903d92be4e894322a5817dbad9f", "score": "0.5957195", "text": "public function destroy($id)\n {\n $get=Frequently::where('id',$id)->first();\n if($get->photo!=null&&file_exists(\"/storage/$get->photo\")){\n unlink('storage/'.$get->photo);\n }\n $get->delete();\n return redirect()->route('listFrequently');\n }", "title": "" }, { "docid": "6089ad4900b0dc7f7bdde4a847a6d314", "score": "0.59349823", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n\n return redirect(route('resources.index'))->withSuccess('Resource deleted!');\n }", "title": "" }, { "docid": "88627a294f0a77deac705692a92dc57d", "score": "0.5933836", "text": "function removeAsset($asset);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "7c8dd317ed16ed33561bf244b7a39a81", "score": "0.59182364", "text": "public static function remove($storageId) {\n\t\t$storageId = self::adjustStorageId($storageId);\n\t\t$numericId = self::getNumericStorageId($storageId);\n\n\t\t$query = \\OC::$server->getDatabaseConnection()->getQueryBuilder();\n\t\t$query->delete('storages')\n\t\t\t->where($query->expr()->eq('id', $query->createNamedParameter($storageId)));\n\t\t$query->execute();\n\n\t\tif (!is_null($numericId)) {\n\t\t\t$query = \\OC::$server->getDatabaseConnection()->getQueryBuilder();\n\t\t\t$query->delete('filecache')\n\t\t\t\t->where($query->expr()->eq('storage', $query->createNamedParameter($numericId)));\n\t\t\t$query->execute();\n\t\t}\n\t}", "title": "" }, { "docid": "21f318a197bf93b145035fb8caedb3ab", "score": "0.59098935", "text": "public function removeFromFileSystem()\n {\n if(file_exists($this->getPath()))\n {\n unlink($this->getPath());\n }\n }", "title": "" }, { "docid": "b4727d3d1c5501b65f420aa3f48791ff", "score": "0.58977133", "text": "protected function remove()\n {\n $firstPartOfToPath = $this->getFirstPartOfToPath();\n $this->filesystem->remove($firstPartOfToPath);\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "e06a00343d3476ccc18ba87927451f89", "score": "0.5876221", "text": "public function delete(ApiStorageEntityInterface $entity);", "title": "" }, { "docid": "316ebf04cbd413c84ac91b72d0c2280c", "score": "0.5865566", "text": "public function deleting(ResourceType $resourceType)\n {\n $resourceType->resource()->delete();\n }", "title": "" }, { "docid": "4b22b7ee3a57517ec9e3b86bea1578c9", "score": "0.5856808", "text": "public function clearStorage();", "title": "" }, { "docid": "8a2e3c68dac3607599797c5afb0c4524", "score": "0.5854834", "text": "abstract public function cleanUpStorage();", "title": "" }, { "docid": "5620baf89e1396aceeb7cce13057e8b9", "score": "0.58456767", "text": "public function destroy($id_resource)\n {\n try{\n \n $resource =Resource::find($id_resource);\n if (!$resource) {\n return response()->json(['No existe el recurso'],404);\n }\n \n $resource->delete();\n return response()->json(['Eliminado' => $resource],200);\n\n }catch(\\Exception $e){\n \n Log::critical(\"ERROR: {$e->getCode()} , {$e->getLine()} , {$e->getMessage()}\");\n return response('Algo esta mal',500);\n }\n }", "title": "" }, { "docid": "8a4336994597b3922649b91455f16a8d", "score": "0.5844985", "text": "public function destroy() {\n\t\treturn unlink($this->get_full_path());\n\t}", "title": "" }, { "docid": "8e57a7fc437eb62f67f1d9cd7ae885ee", "score": "0.5843844", "text": "public function unpublishResource(Resource $resource) {\n\t\t$resources = $this->resourceRepository->findSimilarResources($resource);\n\t\tif (count($resources) > 1) {\n\t\t\treturn;\n\t\t}\n\t\t$this->unpublishFile($this->getRelativePublicationPathAndFilename($resource));\n\t}", "title": "" }, { "docid": "4bf50ed1e92ba2fad6f5cb3560a301f7", "score": "0.5826607", "text": "public function remove(Claim $claim);", "title": "" }, { "docid": "046d776961d2a15e2495584855d48a8c", "score": "0.58256453", "text": "public function deleteFoto()\n {\n Storage::delete($this->foto);\n }", "title": "" }, { "docid": "a193f7ebf258b5fb63b8919a07678081", "score": "0.5821789", "text": "public function removeAll ($storage) {}", "title": "" }, { "docid": "f1670d793aee4ebdf19789ddbb1730d1", "score": "0.57853824", "text": "public function destroy($id)\n {\n // dd($id);\n $removebook = Book::find($id);\n\n if(!is_null($removebook))\n {\n @unlink(storage_path('app/public/images/companylogo/'.$removebook->image));\n $removebook->delete();\n } \n return redirect()->route('books.list')->with('success','Book is removed successfully'); \n }", "title": "" }, { "docid": "462f1b88278534828f7e1002b13388bf", "score": "0.57749605", "text": "public function destroy($id)\n {\n $get=Service::where('id',$id)->first();\n if($get->thumbnail!=null&&file_exists('/storage/'.$get->thumbnail)){\n unlink('storage/'.$get->thumbnail);\n }\n if($get->attachment!=null&&file_exists('/storage/'.$get->thumbnail)){\n unlink('storage/'.$get->attachment);\n }\n \n Service::where('id',$id)->delete();\n return redirect()->route('listService');\n }", "title": "" }, { "docid": "f187335ddc0f49e204616fbcfc6e8139", "score": "0.5760281", "text": "public function deleted(Resource $resource)\n {\n $this->deleteCacheDepartments();\n }", "title": "" }, { "docid": "b997ffc3924d4e81aa05e087ce2f37dc", "score": "0.5745426", "text": "public function destroy($id)\n {\n $myfile=File::findOrFail($id);\n if(Storage::delete('public/'.$myfile->photo)){\n File::destroy($id);\n }\n return redirect('/myfiles');\n }", "title": "" }, { "docid": "5a5ce61559fc6f08d9047302980dd0f9", "score": "0.57400835", "text": "public function delete(Resource\\ResourceId $resourceId)\n {\n $this->crudRepositoryAdapter->deleteResource($this->resourceType, $resourceId);\n }", "title": "" }, { "docid": "403fd7ff4e999d70f9d955047841a088", "score": "0.5724649", "text": "public function destroy($id)\n {\n $suplier = Suplier::find($id);\n $image = $suplier->photo;\n if(file_exists($image)){\n unlink($image);\n }\n $suplier->delete($id);\n }", "title": "" }, { "docid": "19a699963d1483df50147a87c9beba20", "score": "0.57240057", "text": "public function destroy($id)\n {\n $photo = Photo::findOrFail($id);\n $filePath = 'public/images/album'.$photo->album_id.'/'.$photo->photo;\n Storage::delete($filePath);\n\n\n if($photo->delete()) {\n return new PhotosResource($photo);\n }\n }", "title": "" }, { "docid": "4ac32e6ca1ac9c257606a18e27a296d7", "score": "0.57237166", "text": "public function destroy($id,Request $request)\n {\n\n $attraction_id=$request->input('delete_button');\n $del=File::find($id);\n\n// dd($id,$request->input('delete_button'),$del);\n Storage::delete($del->path);\n $del->delete();\n return redirect('/attractions/'.$attraction_id);\n }", "title": "" }, { "docid": "80279a1597fc869ef294d03bcd1a6632", "score": "0.5721846", "text": "public function rm($id)\n {\n }", "title": "" }, { "docid": "ab665119b206a77e6ca441b43a4d5f65", "score": "0.5718658", "text": "public static function delete($filePath, $storage = 'public')\n {\n if (Storage::disk($storage)->exists($filePath)) {\n Storage::disk($storage)->delete($filePath);\n }\n }", "title": "" }, { "docid": "93ed57872f689659ea980a4db098fcd7", "score": "0.5713562", "text": "public static function DeleteResource($resource_id)\n {\n \n $resource = DbInfo::ResourceExists($resource_id);\n \n if($resource)\n {\n $uploader = new EsomoUploader();\n $del_resource = self::DeleteBasedOnSingleProperty(\"resources\",\"resource_id\",$resource_id,\"i\");\n \n $del_resource_file = $uploader->DeleteResourceFile($resource[\"resource_name\"]);\n \n return ($del_resource && $del_resource_file);#return the status based on whether or not it could delete the resource or not.\n }\n else #failed to find the resource\n {\n return $resource;\n }\n\n }", "title": "" }, { "docid": "56e248ab5e3166b787050c7100090355", "score": "0.57053274", "text": "public function delete() {\n //dump(I('ResID'));\n $delFilepath = M('Resource')->where(array(\"ResID\" => I('ResID')))->find();\n unlink($delFilepath['ResPath'].$delFilepath['ResActualName']);\n \n M('Resource')->where(array(\"ResID\" => I('ResID')))->delete();\n M('Hwres')->where(array(\"ResID\" => I('ResID')))->delete();\n \n $this->redirect('Student/submithomework', array('HwID' => session('selectedHwID')), 1, '页面跳转中...');\n }", "title": "" }, { "docid": "fe48b572e448767f33e957b5bc9aa7a8", "score": "0.57004154", "text": "public function destroy($file)\n {\n $file = FileEmpresa::where('id', $file)->first();\n\n $url = str_replace('storage', 'public', $file->url);\n\n Storage::delete($url);\n\n $file->delete();\n\n return redirect()->route('filesempresa.index');\n }", "title": "" }, { "docid": "2c12fcf66c4a064f20f7ea55e9643b07", "score": "0.5697347", "text": "public function destroy($id)\n {\n $store = Store::where('id',$id)->first();\n $store->delete();\n unlink(public_path('back/images/store/'.$store->image));\n return redirect()->back()->with('success','Store has been deleted successfully!');\n \n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "af60d7deb2c6aa38423ea7d93737129d", "score": "0.56616336", "text": "public function removeReference();", "title": "" }, { "docid": "cc98c81f9b175f0038da1199cdb1cc32", "score": "0.56524765", "text": "public function delete()\n {\n unlink(\"./public/images/property/$this->image\");\n\n return parent::delete();\n }", "title": "" }, { "docid": "4771a6376fe8124ff88d040ab740bc21", "score": "0.5647745", "text": "function deleteResource($path)\n\t{\n\t\tif(substr($path,-1) == '/')\n\t\t{\n\t\t\t$path = substr($path,0,-1);\n\t\t}\n\t\tif(!is_readable($path))\n\t\t{\n\t\t\t// return false and exit the function echo \"not readable\";\n\t\t\treturn false;\n\t\t\n\t\t\t// ... else if the path is readable\n\t\t} else {\n\t\t\tif(is_file($path))\n\t\t\t{\n\t\t\t\t@unlink($path);\n\t\t\t\t$lastoccurence=strrpos($path,'/');\n\t\t\t\t$path=substr($path,0,$lastoccurence);\n\t\t\t\t$this->deleteResource($path);\n\t\t\t} else {\n\t\t\t\t@rmdir($path);\n\t\t\t\t$lastoccurence=strrpos($path,'/');\n\t\t\t\t$path=substr($path,0,$lastoccurence);\n\t\t\t\t$this->deleteResource($path);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "e24a8da2185cf275580016315ac8c0fe", "score": "0.5646982", "text": "public abstract function remove();", "title": "" }, { "docid": "3766dc8af757b259cffee43a368b17a1", "score": "0.5643784", "text": "public function destroy($id)\n {\n StorageIn::findOrFail($id)->delete();\n\n return back()->with('success', __( 'Storage In Deleted!' ));\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "42ab9aa343108bfe87a5fa6e2debbb1f", "score": "0.5629722", "text": "public function destroy($id)\n {\n $authorizationFile = AuthorizationFile::findOrFail($id);\n if ($authorizationFile->file_path) {\n unlink(storage_path('app/public/' . $authorizationFile->file_path));\n }\n\n if ($authorizationFile->delete()) {\n return new AuthorizationFileResource($authorizationFile);\n }\n }", "title": "" }, { "docid": "e283d0bd2f3e7de97a33220ebb63287a", "score": "0.5625924", "text": "public function delete()\n {\n return $this->getResource()->delete();\n }", "title": "" }, { "docid": "f5acef82b129546dce42b6395ac95346", "score": "0.56205463", "text": "public function delete()\n {\n Storage::disk($this->attributes['disk'])->delete($this->fullPath);\n\n return parent::delete();\n }", "title": "" }, { "docid": "d47412c8a3ab0748545f40369525944c", "score": "0.5617967", "text": "public function deleteAction(Request $request, Humanresource $humanresource)\n {\n $form = $this->createDeleteForm($humanresource);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($humanresource);\n $em->flush();\n }\n\n return $this->redirectToRoute('activity_hr_index');\n }", "title": "" }, { "docid": "aaabbaeb6034a78aa7f1190e4a439da8", "score": "0.56079096", "text": "public function deleteStorage($id)\n {\n $storageMapper = $this->mapperFactory->createStorageMapper();\n $storageRecord = $storageMapper->getById($id);\n $fsService = $this->serviceFactory->createFSService();\n $fsService->deleteFromPath($storageRecord->getPath(), $storageRecord->getName());\n $storageMapper->delete($id);\n }", "title": "" }, { "docid": "8048c92e64b0cd0ae592793014490993", "score": "0.5606129", "text": "public function destroy($id)\n {\n $img = DB::table('students')->where('id',$id)->first();\n $img_path = $img->photo; //get image path\n unlink($img_path); //image deleted from folder\n\n DB::table('students')->where('id',$id)->delete(); //delete data from database\n return response('student deleted with id '.$id);\n }", "title": "" }, { "docid": "510a28fc5994e880fed70c640c944d7a", "score": "0.56050575", "text": "protected function deleteMediaResource($user, $name)\n {\n Storage::deleteDirectory($name . '/' . $user->id);\n }", "title": "" }, { "docid": "c3eb38678844fc2557b71062f1dbcfb9", "score": "0.55994797", "text": "public function destroy($id)\n {\n $product = Product::find($id);\n unlink('storage/'.$product->image);\n \n $delete = $product->delete();\n\n if($delete){\n Session::flash('success', 'Data deleted');\n } else {\n Session::flash('error', 'Deleted failed');\n }\n }", "title": "" }, { "docid": "5535c2bc3c675fe863e2273875b2cf56", "score": "0.5599097", "text": "public function delete() {\n \\File::delete([\n $this->path,\n $this->thumbnail_path\n ]);\n parent::delete();\n }", "title": "" }, { "docid": "6fbcf9a59c7f34ed85fd172cdf3d3c38", "score": "0.5595493", "text": "public function remove(){}", "title": "" }, { "docid": "c407e20259afdab0092bdaa4b6774c3f", "score": "0.5589979", "text": "public function destroy($id)\n {\n $info = Data::findOrFail($id);\n\n $destinationPath = 'public/uploads/'.$info->image;\n\n if(File::exists($destinationPath)){\n File::delete($destinationPath);\n }\n\n $info = Data::destroy($id);\n \n return back();\n }", "title": "" }, { "docid": "7c96a047cc159d1bcf4d96bc5a7d4df9", "score": "0.55851704", "text": "public function destroy($id){\n $delete = Supplier::findorfail($id);\n $photo = $delete->photo;\n unlink($photo);\n $suppliers = Supplier::where('id', $id)->delete();\n return redirect()->back()->with('message', 'Supplier Deleted Succesfully');\n }", "title": "" }, { "docid": "e182fb0676c98a5ce3a016dd37ecff8d", "score": "0.5584347", "text": "public function destroy($id)\n {\n $Document = Documents::findOrFail($id);\n $archivo = Resource::findOrFail($Document->resource_id);\n Storage::delete($archivo->ruta);\n $Document->delete();\n $archivo->delete();\n\n Session::flash('error','El archivo se ha eliminado exitosamente');\n return redirect('/dashboard/archivo/');\n }", "title": "" }, { "docid": "036766aaa5875324d85cb1ada4247f46", "score": "0.5584317", "text": "public function destroy($id){\n $image = Image::find($id);\n $image->delete();\n }", "title": "" }, { "docid": "0744113a1d012fa89c86d790c8e70cf7", "score": "0.55792385", "text": "public function removeImage()\n {\n if ( ! empty($this->image) && ! empty($this->id)) {\n $path = storage_path($this->image);\n if (is_file($path)) {\n unlink($path);\n }\n if (is_file($path.'.thumb.jpg')) {\n unlink($path.'.thumb.jpg');\n }\n }\n }", "title": "" }, { "docid": "6163d6af309a2fc4b5b3e8b9131900d4", "score": "0.55742586", "text": "public function remove($object)\n {\n $this->persistenceManager->remove($object);\n }", "title": "" }, { "docid": "26f833ecd0ab7ae6fe4010036f6b5752", "score": "0.55738527", "text": "public function remove($key)\n {\n $this->storage->remove($key);\n }", "title": "" }, { "docid": "0d6640f36c0ca88fbe56977a74dad5f1", "score": "0.55737436", "text": "public function remove(MediaInterface $media);", "title": "" }, { "docid": "0d6640f36c0ca88fbe56977a74dad5f1", "score": "0.55737436", "text": "public function remove(MediaInterface $media);", "title": "" }, { "docid": "97914eb78d7cf648246f9bcd6ac69124", "score": "0.5573565", "text": "public function destroy($id)\n {\n /*\n\n = R::load( '', $id );\n R::trash( );*/\n }", "title": "" }, { "docid": "97914eb78d7cf648246f9bcd6ac69124", "score": "0.5573565", "text": "public function destroy($id)\n {\n /*\n\n = R::load( '', $id );\n R::trash( );*/\n }", "title": "" }, { "docid": "ece2674f4c8b5aae472a2bcf16b2b5e0", "score": "0.5570756", "text": "public function destroy( $id)\n {\n $inventario=Inventarios::findOrFail($id); \n if(Storage::delete('public/'.$inventario->foto)){\n Inventarios::destroy($id); \n }; \n \n //return redirect('inventarios');\n return redirect('inventarios')->with('Mensaje','Dispositivo Eliminado');\n }", "title": "" }, { "docid": "b9d1b308ec63ebe2ce546d28269bb256", "score": "0.55603665", "text": "public function destroy($id)\n {\n //\n $st = StorageType::findOrFail($id);\n $st->delete();\n\n return 1;\n }", "title": "" }, { "docid": "b82d479e67b7810f548131a749efe6bd", "score": "0.55463326", "text": "public function destroy($id)\n\t{\n\t\t$entity = $this->newEntity()->newQuery()->find($id);\n\t\tif($entity->path){\n\t\t\t$file = base_path($entity->path);\n\t\t\tif(is_file($file)){\n\t\t\t\tunlink($file);\n\t\t\t}\n\t\t}\n\t\t$entity->delete();\n\t\t$entity=[];\n\t\treturn $this->success($entity);\n\t}", "title": "" }, { "docid": "288e3719860641605b0374dedc6b63aa", "score": "0.5545195", "text": "public function destroy($id)\n {\n $product = Product::where('product_id', $id)->first();\n $imagename = $product->image;\n if(!empty($imagename)){\n if(Storage::disk('s3')->exists($imagename)) {\n Storage::disk('s3')->delete($imagename);\n } \n /*$filename = public_path().'/images/product/'.$file;\n \\File::delete($filename);*/\n }\n Product::where('product_id',$id)->delete();\n return redirect()->route('product.index')\n ->with('success','Product deleted successfully.');\n }", "title": "" }, { "docid": "1113bcc364d7ca0dc41ea624c2d8d5e8", "score": "0.55436987", "text": "function rm($s3path)\n {\n // printf(\"%s::%s(%s)\\n\",__CLASS__,__FUNCTION__,$s3path);\n\t\t$this->_s3_stats['rm']++;\n $s3r = $this->_request('DELETE',$s3path);\n return $s3r;\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "53f78692bfaa975d100ec605f2d12fcf", "score": "0.55394316", "text": "public function destroy($id)\n {\n $user = Sentinel::findById($id);\n unlink(public_path('/assets/img/').$user->img);\n $user->delete();\n return redirect('/akun');\n }", "title": "" }, { "docid": "1562343bd038500151851c08438fb6b4", "score": "0.5533306", "text": "public function destroy($id)\n {\n $product=Product::withTrashed()->where('id',$id)->firstOrfail();\n\n if($product->trashed()){\n Storage::delete($product->image);\n $product->forceDelete();\n }else{\n $product->delete();\n }\n\n\n session()->flash('success','Product deleted successfully');\n\n return redirect (route('products.index'));\n }", "title": "" }, { "docid": "e165b8739c7a101d2f903d8ab276d448", "score": "0.55331177", "text": "public function destroy($id)\n {\n $image = Image::find($id);\n $destinationPath = public_path('/images/');\n $image_path = $destinationPath.$image->image; // Value is not URL but directory file path\n if(File::exists($image_path)) {\n File::delete($image_path);\n }\n $image->delete();\n }", "title": "" }, { "docid": "42cde9a36e359e31a33593ed1e3b8323", "score": "0.55320555", "text": "public function remove(Generic $object);", "title": "" }, { "docid": "9331ceceb5f08fd5019c2c9d314200fd", "score": "0.55302644", "text": "public function remove_resource() {\n // Check Connection\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n $id = $_POST[\"remove_link\"];\n if ($id) {\n // Validate\n if (!is_numeric($id)) {\n return false;\n } else {\n // Delete File if not default\n $get_img = \"SELECT IMG_URL FROM LINKS WHERE ID ='$id';\";\n $img_url = parent::select($get_img);\n $img_url = $img_url[\"IMG_URL\"];\n if ($img_url != \"/images/uploads/default.png\") {\n // Delete file\n unlink($_SERVER['DOCUMENT_ROOT'] . $img_url);\n }\n // Get USER ID\n $post_id = \"SELECT USER_ID FROM LINKS WHERE ID = '$id';\";\n $post_id = parent::select($post_id);\n $post_id = $post_id[\"USER_ID\"];\n // Remove Resource\n $query = \"DELETE FROM LINKS WHERE ID = '$id';\";\n $query2 = \"UPDATE RESOURCES SET NUM_OF_LINKS = NUM_OF_LINKS - 1 WHERE ID = '$this->id';\";\n $query3 = \"UPDATE USER SET IQ = IQ - 3 WHERE ID = '$post_id';\";\n if (parent::query($query) && parent::query($query2) && parent::query($query3)) {\n $this->error = \"Success\";\n } else {\n echo \"Resource failed to delete.\";\n return false;\n }\n }\n } else {\n return false;\n }\n }\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" } ]
eff021bae953c825201f5192b3b1fa26
Adds "filters" configuration subtree.
[ { "docid": "68e338b038b8d0a240393b62008001b5", "score": "0.66274875", "text": "private function addFiltersSection(ArrayNodeDefinition $rootNode)\n {\n $rootNode\n ->children()\n ->arrayNode('filters')\n ->children()\n ->append($this->buildFilterNode('match'))\n ->append($this->buildFilterNode('range'))\n ->append($this->buildFilterNode('choice'))\n ->append($this->buildFilterNode('sort'))\n ->append($this->buildFilterNode('pager'))\n ->end()\n ->end()\n ->end();\n }", "title": "" } ]
[ { "docid": "e08ed7566d3908474cb36334f47fff80", "score": "0.7093347", "text": "public function addFilters()\n {\n }", "title": "" }, { "docid": "514c8ed224a1c7e7be22a2163bea22a2", "score": "0.7057623", "text": "function add_filters()\n {\n }", "title": "" }, { "docid": "cc52877588b90c98f104efedb7b7be0d", "score": "0.66119915", "text": "public function register_filters() {\n\n\t\t}", "title": "" }, { "docid": "45c713eda6d3fb35000dbc2ef041d2f4", "score": "0.6544135", "text": "public function add_filters($filters)\n\t{\n\t\tif (empty($this->filters))\n\t\t{\n\t\t\t$this->filters = $filters;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->filters = array_merge($this->filters, $filters);\n\t\t}\n\t}", "title": "" }, { "docid": "cb501a08aecf92a06df4226065a2eced", "score": "0.6402987", "text": "public function addFilters() {\n\t\t\tadd_filter( 'muut_validate_setting', array( $this, 'validateSettings' ), 10, 2 );\n\t\t}", "title": "" }, { "docid": "c86220674edec1a58afd3cf3bd435dfd", "score": "0.6339484", "text": "public function buildFilters()\n {\n $this->addFilter('name', new ORM\\StringFilterType('name'), 'media.adminlist.configurator.filter.name');\n $this->addFilter('contentType', new ORM\\StringFilterType('contentType'), 'media.adminlist.configurator.filter.type');\n $this->addFilter('updatedAt', new ORM\\NumberFilterType('updatedAt'), 'media.adminlist.configurator.filter.updated_at');\n $this->addFilter('filesize', new ORM\\NumberFilterType('filesize'), 'media.adminlist.configurator.filter.filesize');\n }", "title": "" }, { "docid": "c35a1205c7deb33fcaea9179f160cc9e", "score": "0.6191931", "text": "static function add_filters(): void {\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_group']);\r\n\r\n\t\tself::add_tab('Divisions');\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_divisions']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_name']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_notes']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_d_priority']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_roles']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_title']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_r_priority']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_voting']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_email']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_archival']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_aliases']);\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_alias']);\r\n\r\n\t\tself::add_tab('Layout');\r\n\t\tadd_action('acf/init', [__CLASS__, 'add_show_emails']);\r\n\t}", "title": "" }, { "docid": "f8387de72182f22218da6b94e36e6036", "score": "0.6167404", "text": "private function setup_filters() {\n\n\t\tadd_filter( 'pre_option_posts_per_page', array( $this, 'filter_posts_per_page' ) );\n\n\t\tadd_filter( 'plugins_url', array( $this, 'filter_plugins_url' ) );\n\n\t}", "title": "" }, { "docid": "e78c2b85e47d810623124c4b686d4fa8", "score": "0.6137437", "text": "public function register_filters() {\n\t\tadd_filter( 'json_endpoints', array( $this, 'register_routes' ) );\n\t\tadd_filter( 'json_post_type_data', array( $this, 'type_archive_link' ), 10, 2 );\n\t}", "title": "" }, { "docid": "9e244d0cbc84d85d3bdbb4e33cd76043", "score": "0.6070131", "text": "public function enableRecursiveFilters()\n {\n $this->enableRecursiveFilters = true;\n }", "title": "" }, { "docid": "5af9daf16230ff7dc5c3414c84247279", "score": "0.60510814", "text": "protected function registerFilterChain()\n\t{\n\t\t//filters\n\t\t$this->filters['deserial'] = 'deserializationFilter';\n\t\t$this->filters['batch'] = 'batchProcessFilter';\n\t\t$this->filters['serialize'] = 'serializationFilter';\n\t}", "title": "" }, { "docid": "35281cb8d6be18bc4867371ed8b99033", "score": "0.6046223", "text": "public function addFilters() {\n\t\t// $this->subscriber->addFilter( 'mdm_syndication_post_fields', [$this, 'addCustomFields'] );\n\t}", "title": "" }, { "docid": "8a6a206f2513dedb12a19ab0b6c8cc9b", "score": "0.6038681", "text": "public function buildFilters()\n {\n $this->addFilter('name', new ORM\\StringFilterType('name'), 'kuma_menu.menu.adminlist.filter.name');\n }", "title": "" }, { "docid": "64a0f2ead3b05044d6ba522381ffcaf1", "score": "0.60107327", "text": "function alm_filters_settings(){\n \tregister_setting(\n \t\t'alm_filters_license',\n \t\t'alm_filters_license_key',\n \t\t'alm_filters_sanitize_license'\n \t);\n \tadd_settings_section(\n\t \t\t'alm_filters_settings',\n\t \t\t'Filter Settings',\n\t \t\t'alm_filters_settings_callback',\n\t \t\t'ajax-load-more'\n\t \t);\n\t \tadd_settings_field( // Disbale CSS\n\t\t\t\t'_alm_filters_disable_css',\n\t\t\t\t__('Disable Filter CSS', 'ajax-load-more-filters' ),\n\t\t\t\t'alm_filters_disable_css_callback',\n\t\t\t\t'ajax-load-more',\n\t\t\t\t'alm_filters_settings'\n\t\t\t);\n\t \tadd_settings_field(\n\t \t\t'_alm_filters_color',\n\t \t\t__('Color', 'ajax-load-more-filters' ),\n\t \t\t'alm_filters_color_callback',\n\t \t\t'ajax-load-more',\n\t \t\t'alm_filters_settings'\n\t \t);\n\t \tadd_settings_field(\n\t \t\t'_alm_filters_flatpickr_theme',\n\t \t\t__('Datepicker Theme', 'ajax-load-more-filters' ),\n\t \t\t'alm_filters_flatpickr_theme_callback',\n\t \t\t'ajax-load-more',\n\t \t\t'alm_filters_settings'\n\t \t);\n \t}", "title": "" }, { "docid": "ee6c8f6989f98494b947aec1352cc5fc", "score": "0.59681356", "text": "private function loadFilters()\n {\n require __DIR__.'/filters.php';\n }", "title": "" }, { "docid": "09de88b17342d8d9e038fd349eb0e1aa", "score": "0.58891845", "text": "private function _add_filters() {\n\t\t\tadd_filter('wp_setup_nav_menu_item', array($this, 'add_custom_options'));\n\n\t\t\t# Update custom menu options\n\t\t\tadd_action('wp_update_nav_menu_item', array($this, 'update_custom_options'), 10, 3);\n\n\t\t\t# Set edit menu walker\n\t\t\tadd_filter('wp_edit_nav_menu_walker', array($this, 'apply_edit_walker_class'), 10, 2);\n\t\t\t\n\t\t\t# Addition style\n\t\t\tadd_action('admin_enqueue_scripts', array( $this, 'add_menu_css' ));\n\t\t\t\n\t\t\t# Addition js\n\t\t\tadd_action('admin_head-nav-menus.php', array( $this, 'add_icon_js' ));\n\n\t\t\t# Mega menu javascript\n\t\t\tadd_action('admin_enqueue_scripts', array( $this, 'wtbx_mega_menu_admin_scripts' ), 80);\n\t\t}", "title": "" }, { "docid": "536ef5a498642f0fd0c16d5d3a722673", "score": "0.5873272", "text": "public function setupFilterRules()\n { }", "title": "" }, { "docid": "2d8c1ef81b676d23b31708d74b702ee8", "score": "0.5863316", "text": "public function registerFilters() {\n//\t $this->addFilter('get_avatar', ['Chayka\\\\LinkedIn\\\\LinkedInHelper', 'filterGetLinkedInAvatar'], 10, 3);\n\t $this->addFilter('CommentModel.created', ['Chayka\\\\LinkedIn\\\\LinkedInHelper', 'filterMarkCommentWithLinkedInUserId']);\n\t $this->addFilter('pre_comment_approved', ['Chayka\\\\LinkedIn\\\\LinkedInHelper', 'filterApproveLinkedInUserComment'], 10, 2);\n\t\t/* chayka: registerFilters */\n }", "title": "" }, { "docid": "b7a7878433ab0d63fe8128decf00b245", "score": "0.584518", "text": "private function setup_filters() {\n add_filter( 'timber/twig', function( $twig ) {\n\n // ped_icon()\n $twig->addFunction( new \\Twig_SimpleFunction( PEDESTAL_PREFIX . 'icon',\n [ __CLASS__, 'get_icon' ]\n ) );\n\n // ped_logo()\n $twig->addFunction( new \\Twig_SimpleFunction( PEDESTAL_PREFIX . 'logo',\n [ __CLASS__, 'get_logo' ]\n ) );\n\n return $twig;\n }, 99 );\n }", "title": "" }, { "docid": "8c7be518bdc7dbd0518ae3c40a01308c", "score": "0.57674325", "text": "public function addFilter(FilterConfig $filter)\n {\n $this->getFilters()->push($filter);\n $filter->attach($this);\n return $this;\n }", "title": "" }, { "docid": "144d9ab7daed9e8b40b93d824d6f254b", "score": "0.5746229", "text": "private function filters() {\n\n\n\t}", "title": "" }, { "docid": "b3fded95322db24a65676a580705c6e5", "score": "0.57458615", "text": "function allow_configured_filters() {\n return TRUE;\n }", "title": "" }, { "docid": "7c25095360cb4f084a66d74d265df3bf", "score": "0.5740489", "text": "public function attachDefaultFilters() {\n\n /**\n * It's possible to extend what filters the content is subjected to.\n * By default, this is a URL filter, and a PATH filter. Other filters\n * can be implemented and attached if other conversions are also required.\n */\n $this->attachFilter('URL', 'TigerfishDTLReplaceHrefAndSrc');\n $this->filters['URL']->from($this->fromValue);\n $this->filters['URL']->to($this->toValue);\n $this->filters['URL']->relative($this->relative);\n $this->filters['URL']->https($this->https);\n $this->filters['URL']->debugMode($this->debug);\n\n $this->attachFilter('PATH', 'TigerfishDTLReplacePaths');\n $this->filters['PATH']->from($this->fromValue);\n $this->filters['PATH']->to($this->toValue);\n $this->filters['PATH']->relative($this->relative);\n $this->filters['PATH']->https($this->https);\n $this->filters['PATH']->debugMode($this->debug);\n\n }", "title": "" }, { "docid": "f6884dc9bb24685fd2bbfa3b04eadf59", "score": "0.5715745", "text": "public function withFilters(array $filters = array());", "title": "" }, { "docid": "cb602958551a407727a591697880aa4d", "score": "0.5664574", "text": "static function prepare_filters(&$config)\n {\n $filters = array();\n $type_filter = $config->get('type_filter_upcoming');\n \n if ( $type_filter !== false\n && $type_filter !== null)\n {\n // Type filter from configuration\n $filters['type_filter'] = $config->get('type_filter_upcoming');\n }\n \n if ($config->get('category_filter'))\n {\n // Category filter from configuration\n $filters['category_filter'] = $config->get('category_filter');\n }\n \n // PONDER: Should this be inside the if ($config->get('enable_filters')) -block below\n if (isset($_REQUEST['fi_kilonkipinat_events_category']))\n {\n // Category filter from GET or POST\n $filters['category_filter'] = trim(strip_tags($_REQUEST['fi_kilonkipinat_events_category']));\n }\n \n if ($config->get('enable_filters'))\n {\n // Other, direct property mappign filters from GET or POST\n if ( array_key_exists('fi_kilonkipinat_events_filter', $_REQUEST)\n && is_array($_REQUEST['fi_kilonkipinat_events_filter']))\n {\n $filters['other'] = $_REQUEST['fi_kilonkipinat_events_filter'];\n }\n }\n \n return $filters;\n }", "title": "" }, { "docid": "506c67856ae29d67dcb041cbdfa23ed7", "score": "0.56522113", "text": "protected function setup_filters() {\n\t\tadd_filter( 'cron_schedules', array( $this, 'cron_schedules' ) );\n\t\tadd_filter('blmd_social_classes_button', function($classes, $network=null) {\n\t\t\tif ($network == 'twitter') { $classes .= ' native'; }\n\t\t\treturn $classes;\n\t\t}, 10, 2);\n\t}", "title": "" }, { "docid": "36390d9b159039904ff42f902aa0a564", "score": "0.5650108", "text": "private function addInputFilter() \n {\n \n $inputFilter = new InputFilter(); \n $this->setInputFilter($inputFilter);\n \n $inputFilter->add([\n 'name' => 'nom_parent',\n 'required' => true,\n 'filters' => [\n ['name' => 'StringTrim'],\n ['name' => 'StripTags'],\n ['name' => 'StripNewlines'],\n ], \n 'validators' => [\n [\n 'name' => 'StringLength',\n 'options' => [\n 'min' => 2,\n 'max' => 100\n ],\n ],\n ],\n ]);\n \n $inputFilter->add([\n 'name' => 'prenom_parent',\n 'required' => true,\n 'filters' => [\n ['name' => 'StringTrim'],\n ['name' => 'StripTags'],\n ['name' => 'StripNewlines'],\n ], \n 'validators' => [\n [\n 'name' => 'StringLength',\n 'options' => [\n 'min' => 2,\n 'max' => 100\n ],\n ],\n ],\n ]);\n \n $inputFilter->add([\n 'name' => 'email_parent',\n 'required' => true,\n 'filters' => [\n ['name' => 'StringTrim'], \n ], \n 'validators' => [\n [\n 'name' => 'EmailAddress',\n 'options' => [\n 'allow' => \\Zend\\Validator\\Hostname::ALLOW_DNS,\n 'useMxCheck' => false, \n ],\n ],\n ],\n ]);\n \n }", "title": "" }, { "docid": "035a6cee46ec65f33dd0181cc1945d4e", "score": "0.56498754", "text": "public function default_filters() {\n\t\tadd_filter( 'upload_mimes', array( $this, 'more_mimes' ) );\n\n\t\t// Live update when add new layouts (also their sidebars)\n\t\t// or add new positions into existed layouts\n\t\tadd_filter( 'kopa_get_option_layout_manager', array( $this, 'live_update_layout_manager' ), 10, 2 );\n\n\t\t/**\n\t\t * Disable help tab by default, determine its content later\n\t\t *\n\t\t * @see admin/class-kopa-admin.php\n\t\t * @since 1.0.0\n\t\t */\n\t\tadd_filter( 'kopa_enable_admin_help_tab', '__return_false' );\n\t}", "title": "" }, { "docid": "96921e91c682b10f74fd5a544f270ec9", "score": "0.5647381", "text": "public function configureReplicationFilter() {\n $filter['field_channel'] = [\n // Food.\n 'e4da9222-c270-43b7-abb9-2f83b1ad8716',\n ];\n $filter['field_tags'] = [\n // Quantum.\n '92af4c88-0b17-41be-b6d8-306766ae3377',\n // Cuba.\n '02c8cbd9-15b7-4231-b9ef-46c1ef37b233',\n ];\n\n Drupal::configFactory()\n ->getEditable('replication.replication_settings.contentpool')\n ->set('parameters.filter', $filter)\n ->save();\n }", "title": "" }, { "docid": "3eb437fcf5a142a0df20c88d09b9e826", "score": "0.5645229", "text": "public function setFilters($filters)\n {\n $this->filters = $filters;\n }", "title": "" }, { "docid": "b3fb78cb1f93e74d26b4d4c23ca0b26d", "score": "0.563094", "text": "abstract public function prepareFilters();", "title": "" }, { "docid": "016bda7043e484d3d9efea24a094490f", "score": "0.5606721", "text": "public function setFilters($filters)\n {\n $this->filters = Collection::make($filters);\n foreach ($this->filters as $filterConfig) {\n $filterConfig->attach($this);\n }\n\n return $this;\n }", "title": "" }, { "docid": "a7c4fbd112051e8456ce03307de64aa1", "score": "0.55996895", "text": "static function add_filters(): void {\r\n\r\n // Group\r\n add_action('acf/init', [__CLASS__, 'add_group']);\r\n\r\n // Board of Directors\r\n\t self::add_tab('Board of Directors Elections');\r\n\t add_action('acf/init', [__CLASS__, 'add_bods']);\r\n\t add_action('acf/init', [__CLASS__, 'add_bod_date']);\r\n\t add_action('acf/init', [__CLASS__, 'add_bod_finished']);\r\n\t add_action('acf/init', [__CLASS__, 'add_bod_ws']);\r\n\t add_action('acf/init', [__CLASS__, 'add_bod_w_name']);\r\n\t add_action('acf/init', [__CLASS__, 'add_bod_vacant']);\r\n\t add_action('acf/init', [__CLASS__, 'add_bod_form']);\r\n\t add_action('acf/init', [__CLASS__, 'add_bod_nom_start']);\r\n\t add_action('acf/init', [__CLASS__, 'add_bod_nom_end']);\r\n\t add_action('acf/init', [__CLASS__, 'add_bod_statements_day']);\r\n\t add_action('acf/init', [__CLASS__, 'add_bod_voting_start']);\r\n\t add_action('acf/init', [__CLASS__, 'add_bod_voting_end']);\r\n\t add_action('acf/init', [__CLASS__, 'add_bod_results_day']);\r\n\r\n\t // Editorial Board\r\n\t self::add_tab('Editorial Board Elections');\r\n\t add_action('acf/init', [__CLASS__, 'add_ebs']);\r\n\t add_action('acf/init', [__CLASS__, 'add_eb_date']);\r\n\t add_action('acf/init', [__CLASS__, 'add_eb_finished']);\r\n\t add_action('acf/init', [__CLASS__, 'add_eb_ws']);\r\n\t add_action('acf/init', [__CLASS__, 'add_eb_w_name']);\r\n\t add_action('acf/init', [__CLASS__, 'add_eb_w_role']);\r\n\t add_action('acf/init', [__CLASS__, 'add_eb_form']);\r\n\t add_action('acf/init', [__CLASS__, 'add_eb_nom_start']);\r\n\t add_action('acf/init', [__CLASS__, 'add_eb_nom_end']);\r\n\t add_action('acf/init', [__CLASS__, 'add_eb_forum_day']);\r\n\t add_action('acf/init', [__CLASS__, 'add_eb_voting_day']);\r\n\t add_action('acf/init', [__CLASS__, 'add_eb_results_day']);\r\n }", "title": "" }, { "docid": "0651b94f6dd5a0f266d7412a701756ee", "score": "0.55945575", "text": "public function setFilters()\n {\n if (class_exists('Twig_SimpleFilter')) {\n $class = 'Twig_SimpleFilter';\n } else {\n $class = 'Twig\\TwigFilter';\n }\n\n $filter_merge_str = new $class('merge_str', function ($attrs, array $options = array()) {\n $key = $options[0];\n $value = $options[1];\n\n if (array_key_exists($key, $attrs)) {\n $attrs[$key] = implode(' ', [$value, $attrs[$key]]);\n } else {\n $attrs[$key] = $value;\n }\n\n return $attrs;\n }, array('is_variadic' => true));\n\n $this->twig->addFilter($filter_merge_str);\n }", "title": "" }, { "docid": "66951d4363fa862d9941917fa01e5bc3", "score": "0.559", "text": "protected function addFilter ()\n {\n global $database;\n\n if (defined('LEPTON_VERSION')) {\n // register the filter at LEPTON outputInterface\n if (! file_exists(WB_PATH . '/modules/output_interface/output_interface.php')) {\n throw new \\Exception('Missing LEPTON outputInterface, can\\'t register the kitFramework filter - installation is not complete!');\n } else {\n if (! function_exists('register_output_filter'))\n include_once (WB_PATH . '/modules/output_interface/output_interface.php');\n register_output_filter('kit_framework', 'kitFramework');\n }\n }\n elseif (defined('CAT_VERSION')) {\n // register the filter at the blackcatFilter\n require_once CAT_PATH.'/modules/blackcatFilter/filter.php';\n // first unregister to prevent trouble at re-install\n unregister_filter('kitCommands', 'kit_framework');\n // register the filter\n register_filter('kitCommands', 'kit_framework', 'Enable the usage of kitCommands within BlackCat');\n }\n else {\n if (version_compare(WB_VERSION, '2.8.3', '>=')) {\n // WebsiteBaker 2.8.3\n $filter_path = WB_PATH . '/modules/output_filter/index.php';\n } else {\n // all other WebsiteBaker versions\n $filter_path = WB_PATH . '/modules/output_filter/filter-routines.php';\n }\n if (file_exists($filter_path)) {\n if (! $this->websiteBakerIsPatched($filter_path)) {\n if (! $this->websiteBakerDoPatch($filter_path)) {\n throw new \\Exception('Failed to patch the WebsiteBaker output filter, please contact the support!');\n }\n }\n } else {\n throw new \\Exception('Can\\'t detect the correct method to patch the output filter, please contact the support!');\n }\n }\n return true;\n }", "title": "" }, { "docid": "1bce605a546c1c3f7d96f20379134daf", "score": "0.55898345", "text": "public function setFilters($filters)\n\t{\n\t\t$this->filters = $filters;\n\t}", "title": "" }, { "docid": "da906f29cfde03c104da8999f02ece07", "score": "0.5585542", "text": "public function addFilter(callable $filter);", "title": "" }, { "docid": "716c792e9d422a376946d24f8c400cb8", "score": "0.5561088", "text": "function addFilters($filters, $includeFromOwnLibrary = TRUE, $params = NULL) {\n include_once(PAPAYA_INCLUDE_PATH.'system/papaya_strings.php');\n\n if (!is_array($filters)) {\n $filters = array($filters);\n }\n\n foreach ($filters as $filter) {\n // TODO sicher genug?\n $filter = papaya_strings::normalizeString($filter);\n $className = 'HTMLPurifier_Filter_'.$filter;\n if (!class_exists($className, FALSE)) {\n if ($includeFromOwnLibrary) {\n @include_once(\n sprintf(HTMLPURIFIER_INCLUDE_PATH.'HTMLPurifier/Filter/%s.php', $filter)\n );\n } else {\n @include_once(\n sprintf(HTMLPURIFIER_INCLUDE_PATH.'../papaya/Filter/%s.php', $filter)\n );\n }\n }\n if (class_exists($className, FALSE)) {\n if ($params == NULL) {\n $this->htmlPurifier()->addFilter(new $className());\n } else {\n $this->htmlPurifier()->addFilter(new $className($params));\n }\n }\n }\n }", "title": "" }, { "docid": "4031e866884729d6a0d9f49bec7841b0", "score": "0.5550838", "text": "public function addFilters()\n {\n foreach (func_get_args() as $filter) {\n if (is_a($filter, 'Rhubarb\\Stem\\Filters\\Filter')) {\n $this->filters[] = $filter;\n } else {\n throw new \\Exception('Non filter object added to Group filter');\n }\n }\n }", "title": "" }, { "docid": "12bdb9f1d2d4336d011dd020297e1c73", "score": "0.55476296", "text": "protected function add_hooks_and_filters() {\n add_filter( 'slp_widget_settings' , array( $this , 'get_settings' ), 200, 0 );\n add_filter( 'slp_search_default_address', array( $this , 'set_SearchAddressFromRequest' ) );\n add_filter( 'slp_map_center' , array( $this , 'set_SearchCenter' ) );\n add_action( 'wp_enqueue_scripts' , array( $this , 'enqueue_javascript' ) );\n }", "title": "" }, { "docid": "879918ecdd1f92bc6dbe3a36ff93a803", "score": "0.5547349", "text": "public function SetFilters (array $filters = []);", "title": "" }, { "docid": "93214a33f6d3ac91535b9128654c113f", "score": "0.55452186", "text": "public function setFilters($filters)\r\n\t{\r\n\t\t$this->_filters=$filters;\r\n\t}", "title": "" }, { "docid": "42c8a6e266a9910319e6980761fec11b", "score": "0.5538236", "text": "function acf_set_filters($filters = array())\n{\n}", "title": "" }, { "docid": "320bf25e4628ff7f4ccee57af8367849", "score": "0.55354553", "text": "private function setFilters($filters)\n {\n $this->filters = $filters;\n }", "title": "" }, { "docid": "e3f09d5aab49e48cc7c2c1b29ff7b3f7", "score": "0.55244166", "text": "protected function initializePHPUnitFilter() {\n\t\t\\PHPUnit_Util_Filter::addDirectoryToFilter(FLOW3_PATH_ROOT);\n\t\tforeach(explode(':', ini_get('include_path')) as $include_path) {\n\t\t\tif(is_dir($include_path)) {\n\t\t\t\t\\PHPUnit_Util_Filter::addDirectoryToFilter($include_path);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e785f8a984472bcd4ad0644bf8311a13", "score": "0.5518012", "text": "private function getDefaultNodeFilters() {\r\n if(!empty($this->defaultNodeFilters)){\r\n return $this->defaultNodeFilters;\r\n }\r\n // Regular filters\r\n $this->defaultNodeFilters = array();\r\n $this->defaultNodeFilters['status'] = array(\r\n 'title' => t('status'),\r\n 'options' => array(\r\n '[any]' => t('any'),\r\n 'status-1' => t('published'),\r\n 'status-0' => t('not published'),\r\n 'promote-1' => t('promoted'),\r\n 'promote-0' => t('not promoted'),\r\n 'sticky-1' => t('sticky'),\r\n 'sticky-0' => t('not sticky'),\r\n ),\r\n );\r\n \r\n // Include translation states if we have this module enabled\r\n if (module_exists('translation')) {\r\n $this->defaultNodeFilters['status']['options'] += array(\r\n 'translate-0' => t('Up to date translation'),\r\n 'translate-1' => t('Outdated translation'),\r\n );\r\n }\r\n \r\n //Set type filter field\r\n $this->defaultNodeFilters['type'] = array('title' => t('type'),'options' => array('[any]' => t('any')));\r\n $this->defaultNodeFilters['type']['options'] += node_type_get_names();\r\n \r\n // Language filter if there is a list of languages\r\n if ($languages = module_invoke('locale', 'language_list')) {\r\n $languages = array(LANGUAGE_NONE => t('Language neutral')) + $languages;\r\n $this->defaultNodeFilters['language'] = array(\r\n 'title' => t('language'),\r\n 'options' => array('[any]' => t('any'))\r\n );\r\n $this->defaultNodeFilters['language']['options'] += $languages;\r\n }\r\n\r\n return $this->defaultNodeFilters;\r\n }", "title": "" }, { "docid": "684e45be7cb20cd59ed82a321612885e", "score": "0.55129623", "text": "public function createFilters() {\n $module_handler = \\Drupal::moduleHandler();\n if (!$module_handler->moduleExists('dfs_obio')) {\n return;\n }\n\n \\Drupal::configFactory()\n ->getEditable('acquia_contenthub_subscriber.contenthub_filter.location_filter')\n ->setData([\n 'uuid' => 'e152efcf-ad24-44a8-91da-f4e1630178c2',\n 'langcode' => 'en',\n 'dependencies' => [],\n 'author' => 1,\n 'tags' => '',\n 'source' => '',\n 'to_date' => '',\n 'from_date' => '',\n 'search_term' => 'location',\n 'publish_setting' => 'publish',\n 'name' => 'Location Filter',\n 'id' => 'location_filter',\n 'status' => TRUE,\n ])\n ->save();\n\n \\Drupal::logger('as_lift')->debug(dt('created default Content Hub filters'));\n return TRUE;\n }", "title": "" }, { "docid": "0785964a57036f0e92044824cfd3e4b6", "score": "0.55048823", "text": "function kses_init_filters()\n {\n }", "title": "" }, { "docid": "dd40399316e46cc2849a0f8f77326736", "score": "0.5491938", "text": "public function testAddFilters()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "34ef591bc76a610e2c4dec66bbbcedfe", "score": "0.5486843", "text": "public function add()\n {\n foreach ($this->filters as $filter) {\n call_user_func_array($this->addCallback, $filter);\n }\n }", "title": "" }, { "docid": "7f6e47520409c5b6390bcd289820b9c1", "score": "0.5484093", "text": "protected static function PROCESS_FILTERS(string $uri = null)\n\t{\n\t\tif (! isset(self::$config::$filters) || ! self::$config::$filters)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$uri = strtolower(trim($uri, '/ '));\n\n\t\t// Add any filters that apply to this URI\n\t\tforeach (self::$config::$filters as $alias => $settings)\n\t\t{\n\t\t\t// Look for inclusion rules\n\t\t\tif (isset($settings['before']))\n\t\t\t{\n\t\t\t\t$path = $settings['before'];\n\t\t\t\tif (self::PATH_APPLIES($uri, $path))\n\t\t\t\t{\n\t\t\t\t\tself::$filters['before'][] = $alias;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($settings['after']))\n\t\t\t{\n\t\t\t\t$path = $settings['after'];\n\t\t\t\tif (self::PATH_APPLIES($uri, $path))\n\t\t\t\t{\n\t\t\t\t\tself::$filters['after'][] = $alias;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5e98b390b785f58453eb0d36578b6aa5", "score": "0.5472793", "text": "public static function initialize() {\r\n\t\t/*\r\n\t\t * The filters are only useful in the admin section; exit if in the \"front-end\" posts/pages. \r\n\t\t */\r\n\t\tif ( ! is_admin() )\r\n\t\t\treturn;\r\n\r\n\t\tadd_filter( 'mla_mapping_settings', 'MLAHierarchicalMappingExample::mla_mapping_settings', 10, 4 );\r\n\t\tadd_filter( 'mla_mapping_exif_value', 'MLAHierarchicalMappingExample::mla_mapping_exif_value', 10, 5 );\r\n\t\tadd_filter( 'mla_mapping_updates', 'MLAHierarchicalMappingExample::mla_mapping_updates', 10, 5 );\r\n\t}", "title": "" }, { "docid": "060a9670f44c951ba724363fa36eb378", "score": "0.5468729", "text": "public function addLogMessageFiltersFromConfig()\n {\n if (!$this->agentConfig) {\n return;\n }\n\n $configLogMessageFilters = $this->agentConfig->getLogMessageFilters();\n if ($configLogMessageFilters && count($configLogMessageFilters)) {\n foreach ($configLogMessageFilters as $filterClass) {\n $this->addLogMessageFilter($filterClass);\n }\n }\n\n if ($this->agentConfig->isMaskErrorStackTraceArguments()) {\n $this->addLogMessageFilter(ErrorStackTraceMaskFilter::class);\n }\n }", "title": "" }, { "docid": "5a980361fbb1760f760b571cafa7083f", "score": "0.5458683", "text": "public static function initialize() {\r\n\t\t// The filters are only useful for front-end posts/pages; exit if in the admin section\r\n\t\tif ( is_admin() )\r\n\t\t\treturn;\r\n\r\n\t\tadd_filter( 'mla_gallery_attributes', 'MLAMultiSearchExample::mla_gallery_attributes', 10, 1 );\r\n\t\tadd_filter( 'mla_gallery_query_arguments', 'MLAMultiSearchExample::mla_gallery_query_arguments', 10, 1 );\r\n\t}", "title": "" }, { "docid": "3e69cdd082cfb6510ad2a943b083ff1f", "score": "0.5431304", "text": "function _setAllFilters( $objKey )\n {\n $this->_activateFilterLevel($objKey);\n\n // add all pre and post filters, dont use references here, so the filters are each an instance of its own\n // this is necessary since the options might be changed by any xml-config!\n if( sizeof($this->_preFilters) )\n foreach( $this->_preFilters as $aFilter )\n $this->_objectPool[$objKey]->registerPrefilter($aFilter[0],$aFilter[1]);\n if( sizeof($this->_postFilters) )\n foreach( $this->_postFilters as $aFilter )\n $this->_objectPool[$objKey]->registerPostfilter($aFilter[0],$aFilter[1]);\n }", "title": "" }, { "docid": "119e4f8d3c71114b9afdd6a7a000ae57", "score": "0.5429389", "text": "function ndf_category_5_filter_section_register_settings() {\n\tadd_settings_section(\n\t\t'ndf_category_5_filter_settings_section',\n\t\t'Category 5',\n\t\t'ndf_category_5_filter_settings_callback',\n\t\t'ndf_category_5_filter_settings_option'\n\t);\n\n\t/* Initialize Filters Section Category 5 Settings Section Fields */\n\tadd_settings_field( \n\t\t'ndf_category_5_filter_show',\n\t\t'Show Category 5 Filters',\n\t\t'ndf_category_5_filter_show_callback',\n\t\t'ndf_category_5_filter_settings_option',\n\t\t'ndf_category_5_filter_settings_section'\n\t);\n\n\tadd_settings_field( \n\t\t'ndf_category_5_filter_icon',\n\t\t'Icon',\n\t\t'ndf_category_5_filter_icon_callback',\n\t\t'ndf_category_5_filter_settings_option',\n\t\t'ndf_category_5_filter_settings_section',\n\t\tarray(\n\t\t\t'<em>Icon before the Category Title. Ideal Image size 90x90.</em>'\n\t\t)\n\t);\n\t\n\tadd_settings_field( \n\t\t'ndf_category_5_filter_label',\n\t\t'Filter Category Name',\n\t\t'ndf_category_5_filter_label_callback',\n\t\t'ndf_category_5_filter_settings_option',\n\t\t'ndf_category_5_filter_settings_section'\n\t);\n\t\n\tadd_settings_field( \n\t\t'ndf_category_5_results_label',\n\t\t'Results Category Name',\n\t\t'ndf_category_5_results_label_callback',\n\t\t'ndf_category_5_filter_settings_option',\n\t\t'ndf_category_5_filter_settings_section'\n\t);\n\n\tadd_settings_field(\n\t\t'ndf_category_5_filter_accent_color',\n\t\t'Accent Color',\n\t\t'ndf_category_5_filter_accent_color_callback',\n\t\t'ndf_category_5_filter_settings_option',\n\t\t'ndf_category_5_filter_settings_section'\n\t);\n\n\tadd_settings_field( \n\t\t'ndf_category_5_filter_override',\n\t\t'Override Table UI Settings?',\n\t\t'ndf_category_5_filter_override_callback',\n\t\t'ndf_category_5_filter_settings_option',\n\t\t'ndf_category_5_filter_settings_section',\n\t\tarray(\n\t\t\t'<em>Use the UI setting below for the filter block?</em>'\n\t\t)\n\t);\n\n\tadd_settings_field(\n\t\t'ndf_category_5_filter_label_font_size',\n\t\t'Category Title Font Size',\n\t\t'ndf_category_5_filter_label_font_size_callback',\n\t\t'ndf_category_5_filter_settings_option',\n\t\t'ndf_category_5_filter_settings_section',\n\t\tarray(\n\t\t\t'8px' => '8px',\n\t\t\t'10px' => '10px',\n\t\t\t'12px' => '12px',\n\t\t\t'14px' => '14px',\n\t\t\t'16px' => '16px',\n\t\t\t'18px' => '18px',\n\t\t\t'20px' => '20px',\n\t\t\t'22px' => '22px',\n\t\t\t'24px' => '24px',\n\t\t\t'26px' => '26px',\n\t\t\t'28px' => '28px',\n\t\t\t'30px' => '30px',\n\t\t)\n\t);\n\t\n\tadd_settings_field( \n\t\t'ndf_category_5_filter_label_fontcolor',\n\t\t'Title Font Color',\n\t\t'ndf_category_5_filter_label_fontcolor_callback',\n\t\t'ndf_category_5_filter_settings_option',\n\t\t'ndf_category_5_filter_settings_section'\n\t);\n\n\tadd_settings_field(\n\t\t'ndf_category_5_filter_font_size',\n\t\t'Font Size',\n\t\t'ndf_category_5_filter_font_size_callback',\n\t\t'ndf_category_5_filter_settings_option',\n\t\t'ndf_category_5_filter_settings_section',\n\t\tarray(\n\t\t\t'8px' => '8px',\n\t\t\t'10px' => '10px',\n\t\t\t'12px' => '12px',\n\t\t\t'14px' => '14px',\n\t\t\t'16px' => '16px',\n\t\t\t'18px' => '18px',\n\t\t\t'20px' => '20px',\n\t\t\t'22px' => '22px',\n\t\t\t'24px' => '24px',\n\t\t\t'26px' => '26px',\n\t\t\t'28px' => '28px',\n\t\t\t'30px' => '30px',\n\t\t)\n\t);\n\n\tadd_settings_field( \n\t\t'ndf_category_5_filter_font_color',\n\t\t'Font Color',\n\t\t'ndf_category_5_filter_font_color_callback',\n\t\t'ndf_category_5_filter_settings_option',\n\t\t'ndf_category_5_filter_settings_section'\n\t);\n\n\tadd_settings_field( \n\t\t'ndf_category_5_filter_background_color',\n\t\t'Background Color',\n\t\t'ndf_category_5_filter_background_color_callback',\n\t\t'ndf_category_5_filter_settings_option',\n\t\t'ndf_category_5_filter_settings_section'\n\t);\n\n\tadd_settings_field( \n\t\t'ndf_category_5_filter_options_display',\n\t\t'Options Display',\n\t\t'ndf_category_5_filter_options_display_callback',\n\t\t'ndf_category_5_filter_settings_option',\n\t\t'ndf_category_5_filter_settings_section'\n\t);\n\n\t/* Register Filters Section Category 5 Settings Section Fields */\n\tregister_setting( 'ndf_category_5_filter_settings_option', 'ndf_category_5_filter_show' );\n\tregister_setting( 'ndf_category_5_filter_settings_option', 'ndf_category_5_filter_icon' );\n\tregister_setting( 'ndf_category_5_filter_settings_option', 'ndf_category_5_filter_accent_color' );\n\tregister_setting( 'ndf_category_5_filter_settings_option', 'ndf_category_5_filter_label' );\n\tregister_setting( 'ndf_category_5_filter_settings_option', 'ndf_category_5_results_label' );\n\tregister_setting( 'ndf_category_5_filter_settings_option', 'ndf_category_5_filter_override' );\n\tregister_setting( 'ndf_category_5_filter_settings_option', 'ndf_category_5_filter_label_font_size' );\n\tregister_setting( 'ndf_category_5_filter_settings_option', 'ndf_category_5_filter_label_fontcolor' );\n\tregister_setting( 'ndf_category_5_filter_settings_option', 'ndf_category_5_filter_font_size' );\n\tregister_setting( 'ndf_category_5_filter_settings_option', 'ndf_category_5_filter_font_color' );\n\tregister_setting( 'ndf_category_5_filter_settings_option', 'ndf_category_5_filter_background_color' );\n\tregister_setting( 'ndf_category_5_filter_settings_option', 'ndf_category_5_filter_options_display' );\n\n}", "title": "" }, { "docid": "c7aecd2f3a050438306481efa7f7df4e", "score": "0.5409164", "text": "function _custom_teasers_views_add_filter(&$handler, $teaser_view) {\n $filters = array(\n 'status' => array(\n 'operator' => '=',\n 'value' => '1',\n 'group' => '0',\n 'exposed' => FALSE,\n 'expose' => array(\n 'operator' => FALSE,\n 'label' => '',\n ),\n 'id' => 'status',\n 'table' => 'node',\n 'field' => 'status',\n 'relationship' => 'none',\n ),\n 'type' => array(\n 'operator' => 'in',\n 'value' => array(\n 'teaser' => 'teaser',\n ),\n 'group' => '0',\n 'exposed' => FALSE,\n 'expose' => array(\n 'operator' => FALSE,\n 'label' => '',\n ),\n 'id' => 'type',\n 'table' => 'node',\n 'field' => 'type',\n 'relationship' => 'none',\n ),\n 'view_name' => array(\n 'operator' => 'in',\n 'value' => array(\n $teaser_view['name'] => $teaser_view['name'],\n ),\n 'group' => '0',\n 'exposed' => FALSE,\n 'expose' => array(\n 'operator' => FALSE,\n 'label' => '',\n ),\n 'id' => 'view_name',\n 'table' => 'custom_teasers',\n 'field' => 'view_name',\n 'relationship' => 'none',\n ),\n );\n\n // Currently, the only supported filters are per-node-type.\n // 'all' is actually just a passthrough option that doesn't apply\n // filtering beyond the standard 'published' check.\n $filter = $teaser_view['filter'];\n if (strstr($filter, 'node') !== FALSE && $type = end(explode(':', $filter))) {\n $filters['type'] = array(\n 'operator' => 'in',\n 'value' => array($type => $type),\n 'group' => '0',\n 'exposed' => FALSE,\n 'expose' => array('operator' => FALSE, 'label' => ''),\n 'id' => 'type',\n 'table' => 'node',\n 'field' => 'type',\n 'relationship' => 'none',\n );\n }\n \n $handler->override_option('filters', $filters);\n}", "title": "" }, { "docid": "ebde212ff7320bfdb7fda8eaa91806b2", "score": "0.5393947", "text": "function acf_enable_filters($filters = array())\n{\n}", "title": "" }, { "docid": "2a9d09481c6171bbba8febb109509928", "score": "0.53792536", "text": "function commercebox_core_filters_settings_form($form, &$form_state) {\n module_load_include('inc', 'facetapi', 'facetapi.admin');\n\n $searcher = 'search_api@product_display';\n $adapter = facetapi_adapter_load($searcher);\n $facet_info = facetapi_get_facet_info($searcher);\n $realm_name = 'block';\n $realm = facetapi_realm_load($realm_name);\n\n $cb_filters_settings = variable_get('commercebox_core_filters_settings', array());\n\n $form['filters'] = array(\n '#tree' => TRUE,\n );\n\n // Initialize some filters to display rows depending to filters weight.\n foreach ($cb_filters_settings as $key => $value) {\n $form['filters'][$key] = array();\n }\n\n foreach ($facet_info as $facet_name => $facet) {\n $settings = $adapter->getFacetSettings($facet, $realm);\n\n if ($settings->enabled) {\n $form['filters'][$facet_name]['drag'] = array();\n $form['filters'][$facet_name]['enabled'] = array(\n '#type' => 'checkbox',\n '#default_value' => empty($cb_filters_settings[$facet_name]) ? FALSE : $cb_filters_settings[$facet_name]['enabled'],\n );\n $form['filters'][$facet_name]['filter'] = array('#markup' => $facet['label']);\n $form['filters'][$facet_name]['title'] = array(\n '#type' => 'container',\n '#attributes' => array(\n 'class' => array('container-inline'),\n ),\n 'rewrite' => array(\n '#type' => 'checkbox',\n '#default_value' => isset($cb_filters_settings[$facet_name]) ? $cb_filters_settings[$facet_name]['title']['rewrite'] : 0,\n ),\n 'value' => array(\n '#type' => 'textfield',\n '#default_value' => isset($cb_filters_settings[$facet_name]) ? $cb_filters_settings[$facet_name]['title']['value'] : NULL,\n '#size' => 30,\n ),\n );\n\n // Builds array of operations to use in the dropbutton.\n $destination = drupal_get_destination();\n $operations = array();\n $operations[] = array(\n 'title' => t('Display'),\n 'href' => facetapi_get_settings_path($searcher, $realm['name'], $facet_name, 'edit'),\n 'query' => $destination,\n );\n if ($facet['dependency plugins']) {\n $operations[] = array(\n 'title' => t('Dependencies'),\n 'href' => facetapi_get_settings_path($searcher, $realm['name'], $facet_name, 'dependencies'),\n 'query' => $destination,\n );\n }\n if (facetapi_filters_load($facet_name, $searcher, $realm['name'])) {\n $operations[] = array(\n 'title' => t('Filters'),\n 'href' => facetapi_get_settings_path($searcher, $realm['name'], $facet_name, 'filters'),\n 'query' => $destination,\n );\n }\n $form['filters'][$facet_name]['operations'] = array(\n '#theme' => 'links__ctools_dropbutton',\n '#links' => $operations,\n '#attributes' => array(\n 'class' => array('inline', 'links', 'actions', 'horizontal', 'right')\n ),\n );\n\n // Position (weight, drag&drop)\n $form['filters'][$facet_name]['weight'] = array(\n '#type' => 'textfield',\n '#default_value' => isset($cb_filters_settings[$facet_name]) ? $cb_filters_settings[$facet_name]['weight'] : 0,\n '#size' => 3,\n '#attributes' => array('class' => array('filter-weight')), // needed for table dragging\n );\n }\n }\n\n $form['additional'] = array(\n '#type' => 'container',\n '#attributes' => array('class' => array('additional-filter-settings')),\n 'value' => array(\n '#theme' => 'link',\n '#path' => 'admin/config/search/search_api/index/product_display',\n '#text' => t('Advanced filters settings'),\n '#options' => array(\n 'attributes' => array('class' => array('advanced-filter-settings')),\n 'html' => FALSE,\n ),\n ),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n // Attach the same css styles as used on the default facets form.\n $form['#attached']['css'] = array(\n drupal_get_path('module', 'facetapi') . '/facetapi.admin.css' => array(\n 'weight' => 1,\n ),\n drupal_get_path('module', 'commercebox') . '/commercebox.css',\n );\n\n return $form;\n}", "title": "" }, { "docid": "f470a02b670d68f4196f705e68a2b308", "score": "0.5363255", "text": "public function __construct($_filters)\r\n\t{\r\n\t\tparent::__construct(array('Filters'=>$_filters));\r\n\t}", "title": "" }, { "docid": "ce8a7e843d90cc78977baa37aa19e411", "score": "0.5356577", "text": "public function addTestCaseFilter(TestCaseFilter $filter): void\n {\n $this->testCaseFilters[] = $filter;\n }", "title": "" }, { "docid": "543a9e4e5739d8db5c8111f16ea045c8", "score": "0.53514755", "text": "public function registerFilters(array $filters)\n {\n $this->register($filters, 'filters');\n }", "title": "" }, { "docid": "ec0a537ca28356df5180ce4a06fcef71", "score": "0.53511983", "text": "function xh_listFilters()\r\n\t{\r\n\t}", "title": "" }, { "docid": "de980bdb1af3da53839bbbe032b32a09", "score": "0.5336684", "text": "protected function setFilter($name, $value)\n {\n if (isset($this->filterTypes[$name])) {\n $this->filters[$name] = $value;\n $this->_nested = null;\n return;\n }\n $key = $name;\n $elements = explode(\":\", $name, 2);\n $operator = null;\n if (count($elements) > 1) {\n list($name, $operator) = $elements;\n } else {\n $name = $elements[0];\n }\n if ($name == 'visible' || $name == 'visibility') {\n $this->useVisibility = false;\n if ($name == 'visible') {\n $this->objectFilters[] = array('visibility', $value);\n } else {\n $this->objectFilters[] = array($key, $value);\n }\n } elseif ($name == 'path' || $name == 'section' || $name == 'state' || $name == 'depth' || $name == 'class_identifier' || $name == 'class_name' || $name == 'priority' || $name == 'name') {\n $this->objectFilters[] = array($key, $value);\n } elseif ($name == 'published' || $name == 'modified' || $name == 'modified_subnode') {\n if ($value instanceof \\DateTime) {\n $value = $value->getTimestamp();\n }\n $this->objectFilters[] = array($key, $value);\n } elseif ($name == 'node_id') {\n if (is_object($value)) {\n if ($value instanceof \\eZContentObjectTreeNode) {\n $value = $value->attribute('node_id');\n } elseif ($value instanceof \\eZContentObject) {\n $value = $value->attribute('main_node_id');\n }\n }\n $this->objectFilters[] = array($key, $value);\n } elseif ($name == 'contentobject_id') {\n if (is_object($value)) {\n if ($value instanceof \\eZContentObjectTreeNode) {\n $value = $value->attribute('contentobject_id');\n } elseif ($value instanceof \\eZContentObject) {\n $value = $value->attribute('id');\n }\n }\n $this->objectFilters[] = array($key, $value);\n } elseif ($name == 'path_element') {\n if (is_object($value)) {\n if ($value instanceof \\eZContentObjectTreeNode) {\n $value = $value->attribute('contentobject_id');\n } elseif ($value instanceof \\eZContentObject) {\n $value = $value->attribute('id');\n }\n }\n $this->objectFilters[] = array($key, $value);\n } elseif ($name == 'class_identifier') {\n if (is_object($value)) {\n if ($value instanceof \\eZContentClass) {\n $value = $value->attribute('identifier');\n } elseif ($value instanceof \\eZContentObjectTreeNode || $value instanceof \\eZContentObject) {\n $value = $value->attribute('class_identifier');\n }\n }\n $this->objectFilters[] = array($key, $value);\n } elseif ($name == 'class_name') {\n if (is_object($value)) {\n if ($value instanceof \\eZContentClass) {\n $value = $value->attribute('name');\n } elseif ($value instanceof \\eZContentObjectTreeNode || $value instanceof \\eZContentObject) {\n $value = $value->attribute('class_name');\n }\n }\n $this->objectFilters[] = array($key, $value);\n } else {\n // Detect class/attribute strings and use them as filters\n // If not they are placed as object filters\n if (strpos($name, \"/\") !== false) {\n $this->objectFilters[] = array($key, $value);\n } else {\n $this->filters[$name] = $value;\n }\n }\n $this->_nested = null;\n }", "title": "" }, { "docid": "df471196ac6e73b4ad7932d730dae9c8", "score": "0.53349435", "text": "abstract protected function getFilters();", "title": "" }, { "docid": "dd9336ea0f7553c096029362a4f18fff", "score": "0.53275657", "text": "abstract public function addStoreFilter($store, $withAdmin = true);", "title": "" }, { "docid": "e6600e958d86bf1719dbf22017463338", "score": "0.5323981", "text": "public function registerFilters()\n {\n foreach ($this->getFilters() as $filter) {\n try {\n $this->smarty->registerFilter($filter->getType(), $filter->getCallback());\n } catch (SmartyException $e) {\n if (null !== $this->logger) {\n $this->logger->warn(sprintf(\"SmartyException caught: %s.\", $e->getMessage()));\n }\n }\n }\n }", "title": "" }, { "docid": "8ca30a71c459e116384fbb65c388dabf", "score": "0.5292574", "text": "protected function processFilters()\n {\n $this->filters = [];\n foreach ($this->params as $key => $value) {\n $this->parser->setAlias('_' . $this->contentType);\n $filter = $this->parser->getFilter($key, $value);\n if ($filter) {\n $this->addFilter($filter);\n }\n }\n }", "title": "" }, { "docid": "18e4ccb2a189dc4d43db2503f25f87ea", "score": "0.5291611", "text": "static function add_filters(): void {\r\n\r\n // Group\r\n add_action('acf/init', [__CLASS__, 'add_group']);\r\n\r\n // Spotlight\r\n\t self::add_tab('Spotlight');\r\n\r\n\t // Spotlight randomization\r\n\t add_action('acf/init', [__CLASS__, 'add_shuffle_spotlights']);\r\n\r\n\t // Spotlight posts\r\n add_action('acf/init', [__CLASS__, 'add_spotlight']);\r\n add_action('acf/init', [__CLASS__, 'add_spotlight_type']);\r\n add_action('acf/init', [__CLASS__, 'add_spotlight_post']);\r\n add_action('acf/init', [__CLASS__, 'add_spotlight_post_older']);\r\n add_action('acf/init', [__CLASS__, 'add_spotlight_notice_header']);\r\n add_action('acf/init', [__CLASS__, 'add_spotlight_notice_body']);\r\n add_action('acf/init', [__CLASS__, 'add_spotlight_notice_link']);\r\n\r\n // Slides\r\n\t self::add_tab('Slides');\r\n\r\n\t // Slide randomization\r\n\t add_action('acf/init', [__CLASS__, 'add_shuffle_all_posts']);\r\n\t add_action('acf/init', [__CLASS__, 'add_shuffle_slides']);\r\n\t add_action('acf/init', [__CLASS__, 'add_shuffle_posts']);\r\n\t add_action('acf/init', [__CLASS__, 'add_shuffle_big_post']);\r\n\r\n\t // Slide panels\r\n add_action('acf/init', [__CLASS__, 'add_slides']);\r\n add_action('acf/init', [__CLASS__, 'add_slides_big_post']);\r\n add_action('acf/init', [__CLASS__, 'add_slides_big_post_older']);\r\n add_action('acf/init', [__CLASS__, 'add_slides_small']);\r\n add_action('acf/init', [__CLASS__, 'add_slides_small_post']);\r\n add_action('acf/init', [__CLASS__, 'add_slides_small_post_older']);\r\n\r\n\t // Allow older\r\n\t self::add_tab('Recency');\r\n\t add_action('acf/init', [__CLASS__, 'add_recent_only']);\r\n\r\n\r\n\t // Fill posts for spotlight and slider\r\n\t $filled = [\r\n\t \tself::spotlight_post,\r\n\t\t self::slides_big_post,\r\n\t\t self::slides_small_post];\r\n\r\n foreach ($filled as $rpf) {\r\n add_filter(sprintf('acf/fields/post_object/query/key=%s',\r\n\t self::qualify_field($rpf)),\r\n\t [__CLASS__, 'filter_recent_posts'], 10, 3);\r\n }\r\n }", "title": "" }, { "docid": "8e79421e8b2ef50ee9d5e54116f4ee56", "score": "0.52847534", "text": "public function filters(array $filters) {\n\t\t// Save current subobject\n\t\t$this->_current = 'filters' ;\n\t\t$this->_fluid = true ;\n\n\t\tforeach($filters as $in => $match) {\n\t\t\t$this->_filters->add(array('query' => $match, 'in' => $in)) ;\n\t\t}\n\t\treturn $this ;\n\t}", "title": "" }, { "docid": "d82bf60c3f779ed4714413ba3ae1d1e7", "score": "0.5279814", "text": "public static function initialize() {\r\n\t\t/*\r\n\t\t * The filters are only useful for front-end posts/pages; exit if in the admin section\r\n\t\t */\r\n\t\tif ( is_admin() )\r\n\t\t\treturn;\r\n\r\n\t\t/*\r\n\t\t * add_filter parameters:\r\n\t\t * $tag - name of the hook you're filtering; defined by [mla_gallery]\r\n\t\t * $function_to_add - function to be called when [mla_gallery] applies the filter\r\n\t\t * $priority - default 10; lower runs earlier, higher runs later\r\n\t\t * $accepted_args - number of arguments your function accepts\r\n\t\t */\r\n\t\tadd_filter( 'mla_gallery_attributes', 'MLAProjectSlugExample::mla_gallery_attributes_filter', 10, 1 );\r\n\t}", "title": "" }, { "docid": "bd6200acc6f9772ae527c75ec5ac1662", "score": "0.5259594", "text": "public function testAddFilter()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "70a0f69b3f909fa13726f70b9b2dc595", "score": "0.52585375", "text": "public function createLiftFilters() {\n $filters = $this->getSettings()->get('filters');\n $filters = $filters ?: [];\n // @todo Use a Filter Entity and FilterManager in the future.\n $client = _as_lift_get_client()->getSlotManager()->getClient();\n foreach ($filters as $uuid => $filter_config) {\n $filter_config['uuid'] = $uuid;\n $filter_config['filter_params']['origins'] = [$this->origin];\n $request = new Request('POST', '/filters', [], json_encode($filter_config));\n $response = $client->send($request);\n $body = (string) $response->getBody();\n $body = json_decode($body, TRUE);\n if ($body) {\n \\Drupal::logger('as_lift')->debug('created Lift Filter \"@name\".', ['@name' => $filter_config['name']]);\n }\n else {\n return FALSE;\n }\n }\n return TRUE;\n }", "title": "" }, { "docid": "c821c308069a9f2a44f9477ea82c9520", "score": "0.52547973", "text": "private function buildFilterNode($filter)\n {\n $node = new ArrayNodeDefinition($filter);\n\n $children = $node\n ->useAttributeAsKey('name')\n ->beforeNormalization()\n ->always(function ($a) {\n foreach ($a as $name => $v) {\n if ($name == 'pager') {\n if (!isset($v['request_parameter'])) {\n $a[$name]['request_parameter'] = 'page';\n }\n continue;\n }\n if (!is_array($v)) {\n $a[$name] = [\n 'field' => $v,\n 'request_parameter' => $name,\n ];\n } elseif (!isset($v['request_parameter'])) {\n $a[$name]['request_parameter'] = $name;\n }\n }\n return $a;\n })\n ->end()\n ->prototype('array')\n ->children()\n ->scalarNode('name')->end()\n ->scalarNode('request_parameter')\n ->info('Request parameter name.')\n ->end()\n ->end();\n\n if ($filter != 'sort' && $filter != 'pager') {\n $children\n ->children()\n ->scalarNode('field')\n ->info('Entity field name.')\n ->isRequired()\n ->end()\n ->end();\n }\n\n switch ($filter) {\n case 'choice':\n $children\n ->children()\n ->arrayNode('choices')\n ->useAttributeAsKey('value')\n ->prototype('array')\n ->beforeNormalization()\n ->ifString()->then(function ($v) { return ['name' => $v]; })\n ->end()\n ->children()\n ->scalarNode('value')->end()\n ->scalarNode('name')->end()\n ->end()\n ->end()\n ->end()\n ->end();\n break;\n case 'sort':\n $children\n ->children()\n ->arrayNode('choices')\n ->useAttributeAsKey('value')\n ->beforeNormalization()\n ->always(function ($a) {\n foreach ($a as $name => $v) {\n if (is_string($v)) {\n $a[$name] = [\n 'field' => $v,\n 'name' => $name,\n ];\n } elseif (!isset($v['name'])) {\n $a[$name]['name'] = $name;\n }\n }\n return $a;\n })\n ->end()\n ->prototype('array')\n ->children()\n ->scalarNode('value')->end()\n ->scalarNode('field')->isRequired()->end()\n ->enumNode('order')->values(['asc', 'desc'])->defaultValue('asc')->end()\n ->scalarNode('name')->end()\n ->end()\n ->end()\n ->end()\n ->end();\n break;\n case 'pager':\n $children\n ->children()\n ->integerNode('items_per_page')\n ->defaultValue(10)\n ->end()\n ->end();\n break;\n }\n\n return $node;\n }", "title": "" }, { "docid": "70f3792c4c89fd7ffec6b4ebdb564395", "score": "0.52539647", "text": "public function add_filters() {\n\n\t\tadd_filter( 'bbp_user_can_view_forum', array( $this, 'bbp_user_can_view_forum__associated_users_view_only' ), 99, 3 );\n\n\t\tadd_filter( 'bbp_get_template_part', array( $this, 'bbp_get_template_part__forum_archive_associated_users_view_only' ), 99, 3 );\n\n\t\tadd_filter( 'body_class', array( $this, 'body_class__add_body_class_for_those_who_can_see_forums' ), 10, 2 );\n\n\t\treturn null;\n\n\t}", "title": "" }, { "docid": "ee8e16ab9f6051643c8fe372c96c5dbf", "score": "0.5248102", "text": "public function addFilter($type, $value);", "title": "" }, { "docid": "57fbead301efebd40b3f9893be50166d", "score": "0.5247902", "text": "private function setFilter()\n\t{\n\t\t// get filter values\n\t\t$this->filter['language'] = ($this->getParameter('language', 'array') != '') ? $this->getParameter('language', 'array') : BL::getWorkingLanguage();\n\t\t$this->filter['application'] = $this->getParameter('application');\n\t\t$this->filter['module'] = $this->getParameter('module');\n\t\t$this->filter['type'] = $this->getParameter('type', 'array');\n\t\t$this->filter['name'] = $this->getParameter('name');\n\t\t$this->filter['value'] = $this->getParameter('value');\n\n\t\t// build query for filter\n\t\t$this->filterQuery = BackendLocaleModel::buildURLQueryByFilter($this->filter);\n\t}", "title": "" }, { "docid": "003a71d45706ccc3fa42c6c1adcd3cd0", "score": "0.52471113", "text": "public function __construct()\n {\n $this->setupFilters();\n }", "title": "" }, { "docid": "493b1842eaeac6c4cc5044507e807f10", "score": "0.5235958", "text": "protected static function loadFiltersData()\n {\n self::$filtersData = (array) $GLOBALS['TSFE']->fe_user->getKey('ses', 'filters');\n }", "title": "" }, { "docid": "596e4e83cf9060a322710d1526865deb", "score": "0.52337646", "text": "public function filters()\n {\n return [\n \n ];\n }", "title": "" }, { "docid": "2a07d5b5cd05b54033225fa6310cf6ca", "score": "0.5231526", "text": "protected function addFilter(array $filter) {\n $this->filter = array_merge($this->filter, array_flip($filter));\n }", "title": "" }, { "docid": "7cb6e0eebb9f02057210ed5312dbd16a", "score": "0.52193934", "text": "public function addFilter(DFilter $filter) {\n\t\t$this->filters[] = $filter;\n\t}", "title": "" }, { "docid": "02646c8e953a3ad7be2e54533519879d", "score": "0.5215516", "text": "public function filters()\n\t{\n\t\t// return the filter configuration for this controller, e.g.:\n\t\treturn array(\n\t\t\t// 'inlineFilterName',\n\t\t\t// array(\n\t\t\t// \t'class'=>'path.to.FilterClass',\n\t\t\t// \t'propertyName'=>'propertyValue',\n\t\t\t// ),\n // 'accessControl', // perform access control for CRUD operations\n // 'postOnly + delete', // we only allow deletion via POST request\n\t\t);\n\t}", "title": "" }, { "docid": "ab8963fcbbe626b177c9433600cde982", "score": "0.52135146", "text": "public function setFilters( array $filters )\n {\n $this->filters = $filters;\n }", "title": "" }, { "docid": "b19068e28497f5c6e52fa0c91137b3fe", "score": "0.5208675", "text": "public function getFilters(): FilterCollection;", "title": "" }, { "docid": "e4d0dc0774d4c1cfd8f79a2cf05a2f17", "score": "0.5203012", "text": "private function defineFilters() {\n\n // init local filters variable as empty array\n $filters = [];\n\n // parse each filter to apply\n // and add the valid once to filters\n\n // filters by name\n if (isset($_GET['s'])) {\n\n $filters['name'] = $_GET['s'];\n\n }\n\n // filter by categories\n if (isset($_GET['c'])) {\n\n $categories = explode(\"_\", $_GET['c']);\n foreach ($categories as $key => $value) {\n if (is_numeric($value)) {\n $filters['categories'][] = $value;\n }\n }\n\n }\n\n // filter by areas\n if (isset($_GET['a'])) {\n\n $areas = explode(\"_\", $_GET['a']);\n foreach ($areas as $key => $value) {\n if (is_numeric($value)) {\n $filters['areas'][] = $value;\n }\n }\n\n }\n\n // Check if any filter has been set\n\n if (count($filters)>0) {\n\n $this->filters = $filters;\n return true;\n\n }\n\n\n return false;\n\n }", "title": "" }, { "docid": "de5c9925176bd8d754cdd2da151e9fed", "score": "0.51848423", "text": "public function register()\n {\n Filter::register();\n }", "title": "" }, { "docid": "ee2ad69e80d4393414e7bfdd771787b1", "score": "0.51754624", "text": "private function makeFilters()\n {\n $this->app->bind('NoAnswer', \\App\\Services\\Filter\\Post\\NoAnswer::class);\n\n $this->app->bind('My', \\App\\Services\\Filter\\Post\\My::class);\n\n $this->app->bind('Popular', \\App\\Services\\Filter\\Post\\Popular::class);\n\n $this->app->bind('Tag', \\App\\Services\\Filter\\Post\\Tag::class);\n }", "title": "" }, { "docid": "495dd996b7cdf344da8d3862b2677fe2", "score": "0.5174439", "text": "public function filters($filters)\n\t{\n\t\tif ($filters)\n\t\t{\n\t\t\tif (is_string($filters)) $filters = array($filters);\n\t\t\tif (is_array($filters)) $this->filters = array_merge($this->filters, $filters);\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "b2b59240adfab67f5ce20bba443dfb11", "score": "0.516468", "text": "protected function addTaxonomyConfigs()\n {\n // TODO: add taxonomy configs\n }", "title": "" }, { "docid": "14f409c4263dcec72de1d8066c050427", "score": "0.51640624", "text": "function get_filters($init_data = true) {\n //no filters by default\n return array();\n }", "title": "" }, { "docid": "614718251e80511d7cc7701e388abe31", "score": "0.5157645", "text": "public function add($name, $filter, array $options = []);", "title": "" }, { "docid": "e724e4dda59a520c5b1c9cd307fd4864", "score": "0.5155837", "text": "public function applyFilters()\n {\n $filters = sfConfig::get('app_sft_papi_plugin_filters_sequence');\n \n if (!(is_array($filters) && count($filters) > 0))\n {\n return $this;\n }\n\n foreach($filters as $filter)\n { \n $className = $filter['class_name'];\n if(!class_exists($className))\n {\n throw new Exception('The filter \"'.$className. '\" does not exists');\n }\n\n $configuration = $filter['configuration'];\n $this -> attributes = call_user_func(array($className ,'execute'), \n $this -> attributes, $configuration);\n } \n return $this;\n }", "title": "" }, { "docid": "3e4f3aff494464fa0fc436a17394c573", "score": "0.5150045", "text": "public function addFilter($filter) {\n $this->filters[] = $filter;\n $this->rewind();\n }", "title": "" }, { "docid": "18d24562e1fa0f02615b28a0332fa99e", "score": "0.51446754", "text": "public function has_filters()\n {\n }", "title": "" }, { "docid": "0beda62eea240c7d185b62f56e8fb9bc", "score": "0.5142948", "text": "private function addInputFilter() \n {\n // Create main input filter\n \n //$inputFilter = new InputFilter(); \n \n $inputFilter = $this->getInputFilter(); \n $this->setInputFilter($inputFilter);\n \n // Add input for \"usuario\" field\n $inputFilter->add([\n 'name' => 'nombre',\n 'required' => true,\n 'filters' => [ \n ['name' => 'StringTrim'],\n ], \n 'validators' => [\n [\n 'name' => 'StringLength',\n 'options' => [\n 'min' => 1,\n 'max' => 512\n ],\n ],\n ],\n ]);\n \n // Add input for \"telefono\" field\n $inputFilter->add([\n 'name' => 'telefono',\n 'required' => false,\n 'filters' => [ \n ['name' => 'StringTrim'],\n ], \n 'validators' => [\n [\n 'name' => 'StringLength',\n 'options' => [\n 'min' => 1,\n 'max' => 512\n ],\n ],\n ],\n ]);\n \n // Add input for \"email\" field\n $inputFilter->add([\n 'name' => 'email',\n 'required' => false,\n 'filters' => [ \n ['name' => 'StringTrim'],\n ], \n 'validators' => [\n [\n 'name' => 'StringLength',\n 'options' => [\n 'min' => 1,\n 'max' => 512\n ],\n ],\n ],\n ]);\n \n // Add input for \"email\" field\n $inputFilter->add([\n 'name' => 'skype',\n 'required' => false,\n 'filters' => [ \n ['name' => 'StringTrim'],\n ], \n 'validators' => [\n [\n 'name' => 'StringLength',\n 'options' => [\n 'min' => 1,\n 'max' => 512\n ],\n ],\n ],\n ]);\n \n }", "title": "" }, { "docid": "7b5e01470b114c176f4546eb319394fa", "score": "0.513159", "text": "public function getFilters()\n {\n return [\n 'setting' => new TwigFilter(\n 'setting',\n [$this, 'settingFilter'],\n []\n ),\n ];\n }", "title": "" }, { "docid": "f7abf081d3947240bb22986adf930276", "score": "0.5131036", "text": "public function setFilters($filters = false)\n {\n ($filters && ($this->filters = $filters));\n }", "title": "" }, { "docid": "18d4fb4ee31d80113843f8908678658a", "score": "0.51200664", "text": "protected function build()\n {\n $factory = $this->getFactory();\n\n foreach ($this->filterConfig as $field => $config) {\n $this->add(\n $factory->createInput(\n $config\n )\n );\n }\n }", "title": "" }, { "docid": "0031a1c04de775b417fc81dbc8082768", "score": "0.51159215", "text": "public function GetFilters ();", "title": "" } ]
e15e5f9cb232958a274da87fec2119ff
Gets the month's week of the given date.
[ { "docid": "06843ac4a80ecdede1217b31c7beaf0d", "score": "0.6612202", "text": "public static function getMonthWeek(string $date, string $firstweekday = 'monday'): int\n {\n $cut = substr($date, 0, 8);\n $daylen = 86400;\n $timestamp = strtotime($date);\n $first = strtotime($cut . \"00\");\n $elapsed = ($timestamp - $first) / $daylen;\n $weeks = 1;\n for ( $i = 1; $i <= $elapsed; $i++ ){\n $dayfind = $cut . (strlen($i) < 2 ? '0' . $i : $i);\n $daytimestamp = strtotime($dayfind);\n $day = strtolower(date(\"l\", $daytimestamp));\n if ( $day === strtolower($firstweekday) ){\n $weeks++;\n }\n }\n return $weeks;\n }", "title": "" } ]
[ { "docid": "c82295156894625e58e713708e31868a", "score": "0.7228024", "text": "function weekOfMonth($date) {\n $firstOfMonth = strtotime(date(\"Y-m-01\", $date));\n //Apply above formula.\n return intval(date(\"W\", $date)) - intval(date(\"W\", $firstOfMonth)) + 1;\n}", "title": "" }, { "docid": "e40c3ce0c66bd561c8973cab350db13d", "score": "0.7223934", "text": "function weekOfMonth($date) {\n $firstOfMonth = strtotime(date(\"Y-m-d\", $date));\n //Apply above formula.\n return intval(date(\"W\", $date)) - intval(date(\"W\", $firstOfMonth)) + 1;\n}", "title": "" }, { "docid": "d68ba5c283edbbeac94341a5a92d4af4", "score": "0.7198044", "text": "public function getWeekNumber($date)\n\t{\n\t $firstOfMonth = strtotime(date(\"Y-m-01\", strtotime($date)));\n\t //Apply above formula.\n\t return $this->ordinal(intval(date(\"W\", strtotime($date))) - intval(date(\"W\", $firstOfMonth)));\n\t}", "title": "" }, { "docid": "418bb4b2680eb991cef595dcb2b5f167", "score": "0.71824294", "text": "public static function toWeek($date){\n $time = mktime(0,0,0,substr($date,5,2),substr($date,8,2),substr($date,0,4));\n $Arry = getdate($time);\n $week = $Arry['weekday'];\n if($week==\"Saturday\"||$week==\"Sunday\"){\n return $week;\n }else{\n return \"normal\";\n }\n }", "title": "" }, { "docid": "22796f9565325495a16416f6a43671da", "score": "0.7091439", "text": "public function getWeekOfMonth(): string\n {\n return $this->toLocalizedString('W');\n }", "title": "" }, { "docid": "b4e62cd0cc6f4c981d2198f74dafb777", "score": "0.70099586", "text": "public function getMondayOfTheWeek($date) {\n $weekno = self::getISOWeekNo($date);\n return date('Y-m-d', strtotime(\"$date - $weekno days\"));\n }", "title": "" }, { "docid": "c40502d8949fddbf7d9aeb25d97341b9", "score": "0.69793844", "text": "function week($date)\n{\n $week =array(\"周日\",\"周一\",\"周二\",\"周三\",\"周四\",\"周五\",\"周六\");\n return $week[date(\"w\",strtotime($date))];\n}", "title": "" }, { "docid": "e9d93712c5b60286674c660484213f4e", "score": "0.6968325", "text": "static public function getWeek($date)\n {\n\t \t$start_date = $date->startOfWeek();\n\t\t$end_date = $date->copy()->endOfWeek()->subDay(2); ;\n\n\t\t$weeks = array(\n\t\t\t\"start_end\" => array(\"start\" => $start_date,\"end\" => $end_date,\"week\" => $start_date->copy()->weekOfYear),\n\t\t\t\"days\" => array(\"monday\" => $start_date,\"tuesday\" => $start_date->copy()->addDay(),\"wednesday\" => $start_date->copy()->addDay(2),\"thursday\" => $start_date->copy()->addDay(3),\"friday\" => $start_date->copy()->addDay(4))\n\t\t\t);\n\n\t\treturn $weeks;\n }", "title": "" }, { "docid": "9e2f05490ea54a90fee3b9a37c44e9b0", "score": "0.6871521", "text": "public static function getWeek($date, $format = 'Y-m-d') {\r\n \r\n }", "title": "" }, { "docid": "6d0c99f389886ee9d5267dc85bd6876e", "score": "0.67736065", "text": "function week_number($date)\n\t\t\t\t\t\t\t\t\t\t{\t \n\t\t\t\t\t\t\t\t\t\t\treturn date(\"W\", strtotime(\"$date + 1 day\"));\n\t\t\t\t\t\t\t\t\t\t}", "title": "" }, { "docid": "7c420df790644c7d85f09ca36a834bd5", "score": "0.67718905", "text": "function getWeeksInMonth()\r\n {\r\n return Data_Calc::weeksInMonth($this->mes, $this->ano);\r\n }", "title": "" }, { "docid": "b67221300c62a0343ac3ab6c6c1d9c9d", "score": "0.6743292", "text": "function week_number($date)\n\t\t\t\t\t\t\t{\t \n\t\t\t\t\t\t\t\treturn date(\"W\", strtotime(\"$date + 1 day\"));\n\t\t\t\t\t\t\t}", "title": "" }, { "docid": "3e0d2ad3603953b64e4e11f473a3f8ce", "score": "0.6656237", "text": "public function GetFirstWeekOfMonth() {\n return (int)date('W', strtotime($this->format('Y-m-01')));\n }", "title": "" }, { "docid": "ad7dbfa71f7d4ca308e05d1b365c3680", "score": "0.65686893", "text": "public function getDateStartWeek($date=null){\n\t\t$dateNew = date(\"Y-m-d H:i:s\",strtotime('monday this week', strtotime($date)));\n\t\treturn $dateNew;\n\t}", "title": "" }, { "docid": "014941d2431a4da354016be447d55c50", "score": "0.64628667", "text": "public function getSundayOfTheWeek($date) {\n $weekno = self::getISOWeekNo($date);\n return date('Y-m-d', strtotime(\"$date + \".(6 - $weekno).\" days\"));\n }", "title": "" }, { "docid": "ffa90c552cfebe31ab5edb6c53f58599", "score": "0.6411666", "text": "private function _weeksInMonth ()\n {\n // find number of days in this month\n $daysInMonths = $this->_daysInMonth();\n\n $numOfweeks = ($daysInMonths % 7 == 0 ? 0 : 1) +\n intval($daysInMonths / 7);\n\n $monthEndingDay = date('N', strtotime($this->currentYear.'-'.$this->currentMonth.'-'.$daysInMonths));\n $monthStartDay = date('N', strtotime($this->currentYear.'-'.$this->currentMonth.'-01'));\n\n if ($monthEndingDay < $monthStartDay) $numOfweeks ++;\n\n return $numOfweeks;\n }", "title": "" }, { "docid": "e6f183b5f3268f8444245f2c1be68c8d", "score": "0.6342338", "text": "public static function getWeekdaysInMonth($month, $year) {}", "title": "" }, { "docid": "91239eb6222b6a414ca3778e9826392c", "score": "0.6341313", "text": "public function getWeek($date){\n // OUTPUT : JSON format of all the week according the the DB\n $week = $this->_makeWeek($date);\n for($i = 0; $i < count($week); $i += 1){\n $_day = $week[$i];\n // Get from the data base if a date exists (this means that there is somekind of agenda stored in the DB w.r.t. this day)\n $day = \\App\\Day::where('date', $_day['full_date'])->first();\n if ($day != null){\n foreach($day->Agenda as $agenda){\n $week[$i]['items'][] = $this->_makeAgenda($agenda);\n }\n }\n }\n return $week;\n }", "title": "" }, { "docid": "6efc606cc376c482e2922f567e114bf3", "score": "0.6339672", "text": "public static function week(){\n\t\t$w = date(\"w\", time());\n\t\treturn date('Y-m-d', time() - $w*24*60*60 );\n\t}", "title": "" }, { "docid": "5ce58f05bcdbcf2e9441986df770ba1b", "score": "0.6316138", "text": "public function weeks_in_month($spec_date = '')\n\t {\n\t \t$spec_date = $spec_date ? $spec_date : date('Y-m-d');\n\t \t\t\n\t \t$spec_year = date('Y', strtotime($spec_date));\n \t\t$spec_month = date('m', strtotime($spec_date));\n\t\t$start_date = $spec_year.'-'.$spec_month.'-01';\n\t\t$arr_week = [date('W', strtotime($start_date))];\n\t\t$k = 0;\n\t\t\n\t\twhile ($k == 0) {\n\t\t\t$start_date = date('Y-m-d', strtotime(\"+1 week\", strtotime($start_date)));\n\n\t\t\tif(date('m',strtotime($start_date)) == $spec_month){\n\t\t\t\tarray_push($arr_week, date('W', strtotime($start_date)));\n\t\t\t}else{\n\t\t\t\t$k ++;\n\t\t\t}\n\t\t}\n\t\treturn $arr_week;\n\t }", "title": "" }, { "docid": "bd4b222acac00075c9bb434644cf9b02", "score": "0.6315664", "text": "function _makeWeek($date){\n // by keeping it the central date of the week,\n // i.e. the 4th day, makes a week and returns\n // an array of the form\n // [ { day : 'Monday, etc.', date : '2019-2-24' ... etc} ]\n // ------------------------------------------------\n // This function gets date in form of 'YYYY-MM-DD'\n\n $carbon = new Carbon($date);\n $carbon->add(-3, 'day');\n $week = [];\n for($i = 0; $i < 7; $i += 1){\n $week[] = $this->_makeDay($carbon);\n $carbon->add(1,'day');\n }\n return $week;\n }", "title": "" }, { "docid": "e21c943ae543b73f652576b0bb8add1e", "score": "0.625149", "text": "public function GetLastWeekOfMonth() {\n return (int)date('W', strtotime($this->format('Y-m-t')));\n }", "title": "" }, { "docid": "b3b69145ff41c59ed71fe9cd45a6ae3e", "score": "0.6234275", "text": "private function _weeksInMonth($month=null,$year=null){\n \n if( null==($year) ) {\n $year = date(\"Y\",time()); \n }\n \n if(null==($month)) {\n $month = date(\"m\",time());\n }\n \n // find number of days in this month\n $daysInMonths = $this->_daysInMonth($month,$year);\n \n $numOfweeks = ($daysInMonths%7==0?0:1) + intval($daysInMonths/7);\n \n $monthEndingDay= date('N',strtotime($year.'-'.$month.'-'.$daysInMonths));\n \n $monthStartDay = date('N',strtotime($year.'-'.$month.'-01'));\n \n if($monthEndingDay<$monthStartDay){\n \n $numOfweeks++;\n \n }\n \n return $numOfweeks;\n }", "title": "" }, { "docid": "cbbeb6e512d4645cf4782757bb2e96dc", "score": "0.6207868", "text": "public static function getWeek(){\n\t\t// this represents the number of seconds ni a month\n\t\t// editing this will lead to false values\n\t\treturn 604800;\n\t}", "title": "" }, { "docid": "a4cab2551b53ae04ba2e89c9d002f4ef", "score": "0.61045814", "text": "public static function getNumWk($date)\n {\n $num = ceil($date->format('j') / 7);\n \n if ($num > 2) {\n $tester = clone $date;\n $tester->modify(\"last {$date->format('l')} of this month\");\n \n $num = -1 * (1 + (($tester->format('j') - $date->format('j')) / 7));\n }\n \n return $num;\n }", "title": "" }, { "docid": "fc6197484c1772cbd1b55c0435107d7d", "score": "0.6099095", "text": "function get_week_no($cur_date){\n $date_split=split(\"-\",$cur_date);\n return date(\"W\",mktime (0,0,0,$date_split[1],2,$date_split[2]));\n }", "title": "" }, { "docid": "40769cc34598b063e68bfb7079fc695a", "score": "0.5997951", "text": "public final static function weeksOfMonth ($prDate)\n {\n\n $begin = new \\DateTime('first day of ' . date('Y-m-d',strtotime($prDate)));\n $end = new \\DateTime('last day of ' . date('Y-m-d',strtotime($prDate)));\n $interval = new \\DateInterval('P1D');\n $daterange = new \\DatePeriod($begin, $interval, $end);\n\n $aWeeks = [];\n $week = 1;\n\n foreach($daterange as $key => $date)\n {\n\n $dayOfWeek = $date->format('w');\n\n if (in_array($dayOfWeek,[0,6]) || $key == 0)\n {\n\n $aWeeks[$week][] = $date->format('j');\n\n if ($dayOfWeek == 6)\n {\n\n $week ++;\n\n }\n\n }\n\n }\n\n $aWeeks[$week][] = $end->format('j');\n\n return $aWeeks;\n\n }", "title": "" }, { "docid": "5770105c2c767e4514ba2ef463c7e00f", "score": "0.59866804", "text": "public function getWeek()\n {\n return $this->week;\n }", "title": "" }, { "docid": "e53ed3ece1a4456b72dd292ecbd0dfc8", "score": "0.5982298", "text": "public function GetNrOffWeeksInMonth() {\n $firstWeek = $this->GetFirstWeekOfMonth();\n $lastWeek = $this->GetLastWeekOfMonth();\n if ($firstWeek > $lastWeek) {\n // if january\n\t\t\tif ($this->GetMonth(true) == \"01\") {\n\t\t\t\treturn $lastWeek + 1;\n\t\t\t}\n // if december\n\t\t\telse {\n\t\t\t\treturn (((int)date(\"W\", strtotime($this->GetYear() . \"-\" . $this->GetMonth() . ($this->GetLastDayOfMonth() - 7))) + 1) - $firstWeek + 1);\n\t\t\t}\n\t\t}\n\t\treturn ($lastWeek - $firstWeek + 1);\n }", "title": "" }, { "docid": "dab35d1eeeda2e598a840ec232fce9ea", "score": "0.59771633", "text": "public function getISOWeekNo($date) {\n return ((((date('w', strtotime($date)) - 1)%7)+7)%7);\n }", "title": "" }, { "docid": "c4bc96c9b9f17bcf96b8f3f57897e54b", "score": "0.5966815", "text": "function getWeekNInMonth($y, $m, $d, $firstDay=1)\n {\n $weekEnd = ($firstDay == 0) ? $this->getDaysInWeek()-1 : $firstDay-1;\n $end_of_week = (int)Date_Calc::nextDayOfWeek($weekEnd, 1, $m, $y, '%e', true);\n $w = 1;\n while ($d > $end_of_week) {\n ++$w;\n $end_of_week += $this->getDaysInWeek();\n }\n return $w;\n }", "title": "" }, { "docid": "7d432592875dac0b26247f3f9b49c88f", "score": "0.59639776", "text": "public function getNextWeek($date=null){\n\t\t$dateNew = date(\"Y-m-d H:i:s\",strtotime(\"+1 week\", strtotime($date)));\n\t\treturn $dateNew;\n\t}", "title": "" }, { "docid": "5d24bc4805a4013461a059b2af07bf74", "score": "0.59556705", "text": "public static function getWeeksInMonth($current_month)\n {\n $month = intval(date('m',strtotime($current_month))); //force month to single integer if '0x'\n $year = intval(date('Y',strtotime($current_month)));\n $suff = array('st','nd','rd','th','th','th'); //week suffixes\n $end = date('t',mktime(0,0,0,$month,1,$year)); //last date day of month: 28 - 31\n $start = date('w',mktime(0,0,0,$month,1,$year)); //1st day of month: 0 - 6 (Sun - Sat)\n $last = 7 - $start; //get last day date (Sat) of first week\n $noweeks = ceil((($end - ($last + 1))/7) + 1); //total no. weeks in month\n $output = \"\"; //initialize string\n $weeks = array();\n $monthlabel = str_pad($month, 2, '0', STR_PAD_LEFT);\n for ($x=1;$x<$noweeks+1;$x++) {\n if ($x == 1) {\n $startdate = \"$year-$monthlabel-01\";\n $day = $last - 6;\n } else {\n $day = $last + 1 + (($x-2)*7);\n $day = str_pad($day, 2, '0', STR_PAD_LEFT);\n $startdate = \"$year-$monthlabel-$day\";\n }\n if ($x == $noweeks) {\n $enddate = \"$year-$monthlabel-$end\";\n } else {\n $dayend = $day + 6;\n $dayend = str_pad($dayend, 2, '0', STR_PAD_LEFT);\n $enddate = \"$year-$monthlabel-$dayend\";\n }\n $output .= \"{$x}{$suff[$x-1]} week -> Start date=$startdate End date=$enddate <br />\";\n $weeks[] = array ( 'start_date'=>$startdate,'end_date'=>$enddate );\n }\n\n return $weeks;\n }", "title": "" }, { "docid": "e7fac38eccdabe553ae2b7ba03dfe82a", "score": "0.5940998", "text": "function day_of_week($month, $day, $year)\n\t{\n\t\tif ( ! function_exists('gregoriantojd'))\n\t\t{\n\t\t\treturn date('w', mktime(0, 1, 1, $month, $day, $year));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn jddayofweek(gregoriantojd($month, $day, $year));\n\t\t}\n\t}", "title": "" }, { "docid": "592e81dd0bcd73b155414570dab53e9e", "score": "0.5933814", "text": "function getWeekNum($var){\nreturn date(\"W\", $this->mkActiveTime(0,0,1,$this->actmonth,$var,$this->actyear))+0;\n}", "title": "" }, { "docid": "89255de1f94afa3d09dff818281c00ad", "score": "0.58448124", "text": "function dateToWeek($qDate){\n $dt = strtotime($qDate);\n $day = date('j',$dt);\n $month = date('m',$dt);\n $year = date('Y',$dt);\n $totalDays = date('t',$dt);\n $weekCnt = 1;\n $retWeek = 0;\n for($i=1;$i<=$totalDays;$i++) {\n $curDay = date(\"N\", mktime(0,0,0,$month,$i,$year));\n if($curDay==7) {\n if($i==$day) {\n $retWeek = $weekCnt+1;\n }\n $weekCnt++;\n } else {\n if($i==$day) {\n $retWeek = $weekCnt;\n }\n }\n }\n return $retWeek;\n}", "title": "" }, { "docid": "672a5798fd7c9740d90c43b0a9879202", "score": "0.57501996", "text": "function getWeekNInYear($y, $m, $d)\n {\n return Date_Calc::weekOfYear($d, $m, $y); //beware, Date_Calc doesn't follow ISO-8601 standard!\n }", "title": "" }, { "docid": "7dd0b0a26c912c20bf7c2c6f6338bdfd", "score": "0.57076716", "text": "public function getWeekOfYear(): string\n {\n return $this->toLocalizedString('w');\n }", "title": "" }, { "docid": "9404f31a0a59dffa324f33c54f4a3c17", "score": "0.5675499", "text": "function getWeeks($date) {\n\t\n\t\t$start = strtotime($date);\n\t\t$end = strtotime(date(\"Y-m-t\", strtotime($date)));\n\t\t$arr = array();\n\t\twhile ($start <= $end) {\n\t\t\t$d = getdate($start);\n\t\t\t$dayOfWeek = $d['wday'];\n\t\t\t$endDate = date('Y-m-d', strtotime(date(\"Y-m-d\",$start) . \" + \" . (6 - $dayOfWeek) . \" days\"));\n\t\t\tif(date(\"m\", strtotime($endDate)) != date(\"m\", strtotime($date))) {\n\t\t\t\t$endDate = date(\"Y-m-t\", strtotime($date));\n\t\t\t}\n\t\t\t$arr[] = array(date(\"Y-m-d\",$start), $endDate);\n\t\t\t$start = strtotime($endDate) + (60*60*24);\n\t\t\t\n\t\t\n\t\t}\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "1b408fc326c04d7f299d5c3dd4ba67b2", "score": "0.5667825", "text": "function getYearWeekShiftedSunday($date) {\n\n $date_year = $date->format('Y');\n $date_week = $date->format('W');\n\n //if sunday push week forward by one since default is M->Su and we want Su->Sa\n if ($date->format('w') == 0) {\n\n if (date('W', strtotime($date->format('Y') . \"-12-31\")) == 52 and $date->format('W') == 52) {\n $date_week = 1;\n $date_year++;\n } elseif (date('W', strtotime($date->format('Y') . \"-12-31\")) == 53 and $date->format('W') == 53) {\n $date_week = 1;\n $date_year++;\n } else {\n $date_week++;\n }\n }\n\n //pad the week with 0\n $date_week_padded = str_pad($date_week, 2, '0', STR_PAD_LEFT);\n return $date_year.$date_week_padded;\n\n }", "title": "" }, { "docid": "7e87314e4346c169e9a66f4bc12ef1ec", "score": "0.5658331", "text": "public function GetWeek($leadingZero = true) {\n return $leadingZero ? $this->format('W') : (int)$this->format('W');\n }", "title": "" }, { "docid": "0dbbae7c132319cd062d969f5120f3a2", "score": "0.56554294", "text": "public function getDayOfTheWeek();", "title": "" }, { "docid": "322f2aa34fecc54f002df454d831c610", "score": "0.5635952", "text": "function getWeeksInMonth($y, $m, $firstDay=1)\n {\n $FDOM = Date_Calc::firstOfMonthWeekday($m, $y);\n if ($FDOM == 0) {\n $FDOM = $this->getDaysInWeek();\n }\n if ($FDOM > $firstDay) {\n $daysInTheFirstWeek = $this->getDaysInWeek() - $FDOM + $firstDay;\n $weeks = 1;\n } else {\n $daysInTheFirstWeek = $firstDay - $FDOM;\n $weeks = 0;\n }\n $daysInTheFirstWeek %= $this->getDaysInWeek();\n return (int)(ceil(($this->getDaysInMonth($y, $m) - $daysInTheFirstWeek) /\n $this->getDaysInWeek()) + $weeks);\n }", "title": "" }, { "docid": "e8892e8f925a4a2b9ea7c2a5a5f9b4bd", "score": "0.5628398", "text": "public function getDateEndWeek($date=null){\n\t\t$dateNew = date(\"Y-m-d H:i:s\",strtotime('sunday this week', strtotime($date)));\n\t\treturn $dateNew;\n\t}", "title": "" }, { "docid": "16214ec2617cf0f254e77b084a1e2360", "score": "0.56267387", "text": "function getWeekday($var){\nreturn $this->mkActiveDate(\"w\", $this->mkActiveTime(0,0,1,$this->actmonth,$var,$this->actyear));\n}", "title": "" }, { "docid": "351cf8b18c564bf2ff9d366fd51d9978", "score": "0.5608083", "text": "public function getWeekDay($day)\n {\n return dt('%A', strtotime('next Monday +'.($day - 1).' days'));\n }", "title": "" }, { "docid": "01d5fd628f604154b8d0611a963c7cc4", "score": "0.5579477", "text": "public function getDayNumberOfWeek(){\n\t\tif($this->_year>1970&&$this->_year<2038){\n\t\t\treturn date('w', $this->_timestamp);\n\t\t} else {\n\t\t\t$dateParts = self::_getDateParts($this->_timestamp, false);\n\t\t\treturn $dateParts['wday'];\n\t\t}\n\t}", "title": "" }, { "docid": "e978da8b26484f6e8bee8fa344e5f0f9", "score": "0.5572593", "text": "function getDayOfWeek($y, $m, $d)\n {\n return Date_Calc::dayOfWeek($d, $m, $y);\n }", "title": "" }, { "docid": "65d1d0ac223a6a128db35dff2aeb6dd7", "score": "0.55433816", "text": "public static function returnDayOfWeek($year, $month, $day) {\r\n\t\t\t$dayOfWeek = date(\"w\", mktime(0, 0, 0, $month, $day, $year));\r\n\t\t\tif($dayOfWeek == 0)\r\n\t\t\t\t$dayOfWeek = 7;\r\n\r\n\t\t\treturn $dayOfWeek;\r\n\t\t}", "title": "" }, { "docid": "71c201d0b5935a1beb8e0ce70c90e2b9", "score": "0.55387485", "text": "function getWeeks($date, $rollover)\n {\n $cut = substr($date, 0, 8);\n $daylen = 86400;\n\n $timestamp = strtotime($date);\n $first = strtotime($cut . \"00\");\n $elapsed = ($timestamp - $first) / $daylen;\n\n $weeks = 1;\n\n for ($i = 1; $i <= $elapsed; $i++)\n {\n $dayfind = $cut . (strlen($i) < 2 ? '0' . $i : $i);\n $daytimestamp = strtotime($dayfind);\n\n $day = strtolower(date(\"l\", $daytimestamp));\n\n if($day == strtolower($rollover)) $weeks ++;\n }\n\n return $weeks;\n }", "title": "" }, { "docid": "facc0e0bc1d4b8b2164ed48809cac7e7", "score": "0.55253327", "text": "function getDaysInWeek($y=NULL, $m=NULL, $d=NULL)\n {\n return 7;\n }", "title": "" }, { "docid": "edb27496ad44a15d6c4442ce38344667", "score": "0.5507005", "text": "function get_day_of_week($day)\n{\n return jddayofweek($day, 1);\n}", "title": "" }, { "docid": "dfedd81cc1d339b3bed7337eab4c8651", "score": "0.5492324", "text": "public function _getWeekBeginningDate($date) {\n\t\t$dateTime = strtotime(\"2:00 \" . $date);\n\t\tif(date('w',$dateTime) == '1') {\n\t\t\t// It's Monday, so return the same date\n\t\t\treturn $dateTime;\n\t\t} else {\n\t\t\t// return last Monday's date\n\t\t\treturn strtotime('this week last monday', $dateTime);\n\t\t}\n\t}", "title": "" }, { "docid": "7fe5fe4de7c75a81a99ab5e4711dcc70", "score": "0.5460219", "text": "public function compareWeek(Date $date)\n {\n $currentWeek = date('W', $this->getTimestamp());\n $toCompareWeek = date('W', $date->getTimestamp());\n if ($currentWeek == $toCompareWeek) {\n return 0;\n }\n if ($currentWeek < $toCompareWeek) {\n return -1;\n }\n return 1;\n }", "title": "" }, { "docid": "6cb46e96a0ac1f360cde7c478fcacd4d", "score": "0.54563606", "text": "public function determineMidMonthMeetingDate($date)\r\n {\r\n // Construct a new DateTime object\r\n try {\r\n $date = new DateTime($date);\r\n // Check if the supplied date falls on a weekend\r\n if (self::isWeekend($date->format('Y-m-d'))) {\r\n // If it is Sunday, Get the monday of the same week as the week begins on Sunday by default in PHP's date functions, else, get the Monday of next week\r\n $monday = clone $date->modify(('Sunday' == $date->format('l')) ? 'Monday this week' : 'Monday next week');\r\n // Return the monday after the weekend\r\n return $monday;\r\n } else {\r\n // Return the original date as it does not fall on a weekend\r\n return $date;\r\n }\r\n } catch (Exception $e) {\r\n echo 'Exception: ', $e->getMessage(), \"\\n\";\r\n }\r\n \r\n }", "title": "" }, { "docid": "76e043d43fb44a9453f5640f5201d711", "score": "0.5412107", "text": "function weekday($date_arr) {\n // using Zeller's rule to determine weekdays, reference: http://mathforum.org/dr.math/faq/faq.calendar.html\n $day_of_month = (float)$date_arr[0];\n // month -2 to make formula more simple\n $month = (float)$date_arr[1] - 2;\n if ($month < 0) {\n // Jan => 11, Feb => 12\n $month = $month + 12;\n }\n $year_last_2_digit = (float)$date_arr[2] % 100;\n if ($month >= 11) {\n // Jan and Feb are put into last year since month -2 above\n $year_last_2_digit = $year_last_2_digit - 1;\n }\n $century = (float)$date_arr[2] / 100;\n $f = $day_of_month + ((13 * $month - 1) / 5) + $year_last_2_digit + ($year_last_2_digit / 4) + ($century / 4) - 2 * $century;\n while ($f < 0) {\n $f += 7;\n }\n $day_in_week = $f % 7;\n // 0 is sunday, 6 is saturday\n return $day_in_week;\n }", "title": "" }, { "docid": "0ee95b3587f022e49c80f31cf4c4ca1c", "score": "0.54030806", "text": "public function get_salesbuzz_week_number(){\n /**\n * dayOfWeek+1 1 (for Sunday) through 7 (for Saturday)\n * dayOfYear 0 through 365 (for normal years)\n */\n\n $today = Carbon::today();\n\n $f1 = today()->firstOfYear();\n\n $diffDays = 7 - ($f1->dayOfWeek+1);\n\n $numDays = ($today->dayOfYear+1) - $diffDays;\n\n $numWeeks = ceil($numDays/7+1);\n\n $weekNum = $numWeeks % 4 ;\n\n return $weekNum==0 ? 4 : $weekNum;\n }", "title": "" }, { "docid": "dfcdb8de0b80a337615ba416207c2ae1", "score": "0.53986853", "text": "public function getDayOfWeek()\r\n {\r\n return date('N', $this->getTimestampUnix());\r\n }", "title": "" }, { "docid": "b54ea21ce6fcd7645142536f70d5e098", "score": "0.53819937", "text": "function get_weekname()\n {\n $newdate=$this->aclone();\n $newdate->find_start_of_week();\n $return_string=$newdate->get_year();\n $return_string=$return_string.\"_\";\n $return_string=$return_string.$newdate->get_month();\n $return_string=$return_string.\"_\";\n $return_string=$return_string.$newdate->get_day();\n return $return_string;\n }", "title": "" }, { "docid": "044f83de2f00b171b7441984acb89c65", "score": "0.53529316", "text": "protected function getNumberOfWeeks()\n {\n $first = date(\"w\", strtotime($this->date));\n $last = date(\"t\", strtotime($this->date));\n return (1 + ceil(($last - 7 + $first) / 7));\n }", "title": "" }, { "docid": "a2299048bdca46c93263b5b1f67ffafe", "score": "0.5349138", "text": "public function getWeeksToNow()\n {\n // Difference in seconds\n $difference = $this->getFromDate() - time();\n return floor($difference / $this->_secondsInAWeek);\n }", "title": "" }, { "docid": "be13425829ffea87648c00c814db4c6e", "score": "0.534412", "text": "function dayOfWeek($timestamp) { \n\t\treturn intval(strftime(\"%w\",$timestamp))+1; \n\t}", "title": "" }, { "docid": "7c54be235d876db639db57f94fa481bd", "score": "0.5343563", "text": "private function get_week_date( $weekday_number ) {\n\t\tglobal $year, $monthnum;\n\n\t\t$time_stamp = current_time( 'timestamp' );\n\t\t$this_month = empty( $monthnum ) ? gmdate( 'm', $time_stamp ) : $monthnum;\n\t\t$this_year = empty( $year ) ? gmdate( 'Y', $time_stamp ) : $year;\n\n\t\t/* Month Last Day */\n\t\t$days_in_month = (int) date( 't', mktime( 0, 0 , 0, $this_month, 1, $this_year ) );\n\n\t\t$weekday = array();\n\t\tfor ( $day = 1; $day <= $days_in_month; $day++ ) {\n\t\t\t$w = (int) date( 'w', mktime( 0, 0 , 0, $this_month, $day, $this_year ) );\n\t\t\tif ( $weekday_number == $w ) {\n\t\t\t\t$weekday[] = $day;\n\t\t\t}\n\t\t}\n\t\treturn json_encode( $weekday, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT );\n\t}", "title": "" }, { "docid": "23156e5d521c101f9f882c54a26211a7", "score": "0.5341617", "text": "public function getWeek()\n {\n return $this->hasOne(WeekDay::className(), ['id' => 'week_id']);\n }", "title": "" }, { "docid": "2e81bc28df858d8d7df705e276163b26", "score": "0.5340763", "text": "function getWeekStart($date = null, $firstDayOfTheWeek = 'Monday') {\n\t\tif (!is_numeric($date)) {\n\t\t\t$date = strtotime($date);\n\t\t}\n\n\t\t$date = mktime(0, 0, 0, date('m', $date), date('d', $date), date('Y', $date));\n\t\t$daysMap = array(\n\t\t\t'Sunday'\n\t\t\t, 'Monday'\n\t\t\t, 'Tuesday'\n\t\t\t, 'Wednesday'\n\t\t\t, 'Thursday'\n\t\t\t, 'Friday'\n\t\t\t, 'Saturday'\n\t\t);\n\n\t\t$firstDayOfTheWeek = array_search($firstDayOfTheWeek, $daysMap);\n\t\t$offset = (date('w', $date) + 7 - $firstDayOfTheWeek) % 7;\n\t\treturn strtotime('-'.$offset.' days', $date);\n\t}", "title": "" }, { "docid": "2af604d150f107d1336f8d1c7a582f35", "score": "0.53384787", "text": "function weekNumber($wday,$wmonth,$wyear) {\r\nglobal $weekstartday ;\r\n\tif (substr($wmonth,0,1) == \"0\"){ $wmonth = str_replace(\"0\",\"\",$wmonth);}\r\n\tif (substr($wday,0,1) == \"0\"){ $wday = str_replace(\"0\",\"\",$wday);}\r\n\t$WeekNumber = 1;\r\n\t$firstdayofyear = date(\"w\", mktime(0,0,0,1,1,$wyear)) ;\r\n\t$dayoffset = $firstdayofyear + 6; \r\n $WeekNumber = floor(((date(\"z\", mktime(0,0,0,$wmonth,$wday,$wyear)))+$dayoffset) / 7) ;\r\n\tsettype($WeekNumber,\"integer\");\r\n\tif ($firstdayofyear>5) $WeekNumber = $WeekNumber - 1;\r\n\tif (($firstdayofyear<5)&&($WeekNumber==53)) {\r\n\t\tif (date(\"w\", mktime(0,0,0,12,31,$wyear))>4) $WeekNumber=53;\r\n\t\telse $WeekNumber = 1;\r\n\t}\r\n\treturn $WeekNumber;\r\n}", "title": "" }, { "docid": "4a30c350c968c0954649805ae8e8254c", "score": "0.5332812", "text": "public static function getShortDayOfWeekMonthDay($theDate) {\n\t\t$monthNumber = intval(substr($theDate, 5,2));\n\t\t$monthName = substr(qdat::getMonthNameFromMonthNumber($monthNumber, 'en'), 0, 3);\n\t\t$day = substr($theDate, 8, 2);\n\t\t$dayOfWeekAbbreviation = qdat::getDayOfWeekAbbreviation($theDate);\n\n\t\treturn $dayOfWeekAbbreviation . '&nbsp;' . $monthName . '&nbsp;' . $day;\n\t}", "title": "" }, { "docid": "e23f3262ab18c73f1ce82cde5fe16b03", "score": "0.5330781", "text": "public static function isThisWeek($date)\n {\n return date('W Y', $date) == date('W Y', time());\n }", "title": "" }, { "docid": "4d3f33f6772f25542be2164e6ededa74", "score": "0.53276384", "text": "function get_monday($startdate = null, $week_offset = 0) {\n if ($startdate) {\n $startdate = strtotime($startdate);\n } else {\n $startdate = time();\n }\n\n $dow = date(\"w\", $startdate);\n //print \"Today is dow $dow (Monday is 1)\\n\";\n \n // How many days ago was monday?\n $offset = ($dow -1);\n if ($offset <0) {\n $offset = 6;\n }\n //print \"Offset = $offset\\n\";\n \n if ($week_offset > 0) {\n $offset = $offset - ($week_offset * 7);\n }\n\n $monday = date(\"Y-m-d\", mktime(0,0,0,date('m', $startdate), date('d', $startdate)-$offset, date('Y', $startdate) ));\n \n //print \"Previous monday is $monday\";\n \n return $monday;\n}", "title": "" }, { "docid": "ac90708f956042f9910ffea438993861", "score": "0.5291013", "text": "function CaculateWeekDay($y, $m, $d)\n\t{\n\t\tif($m == 1 || $m == 2)\n\t\t{\n\t\t\t$m += 12;\n\t\t\t$y--;\n\t\t}\n\t\t\n\t\t$week = ($d + 2 * $m + 3 * ($m + 1) / 5 + $y + $y / 4 - $y / 100 + $y / 400) % 7;\n\n\t\treturn $week + 1;\n\t}", "title": "" }, { "docid": "c153fc862cd84253eb3327e55d873c0b", "score": "0.5287321", "text": "public static function lastDayOfWeek(?DateTimeInterface $date = null): static\n\t{\n\t\t$date = self::checkDate($date);\n\t\t$dayOfWeek = (int) $date->format('N');\n\n\t\tif ($dayOfWeek === 7) {\n\t\t\treturn static::from($date->format('Y-m-d'));\n\t\t}\n\n\t\treturn static::from($date->format('Y-m-d') . ' +' . (7 - $dayOfWeek) . ' day');\n\t}", "title": "" }, { "docid": "ae9831e7797aa6cb24c4965031651c9c", "score": "0.5270814", "text": "public function getMonth($date=null){\n\t\treturn date_format($this->createDate($date),\"m\");\n\t}", "title": "" }, { "docid": "6ba86859b73124fa8224496fe86d06b1", "score": "0.5260338", "text": "public function getIncWeek($date=null,$inc){\n\t\t$dateNew = date(\"Y-m-d H:i:s\",strtotime(\"+\".$inc.\" week\", strtotime($date)));\n\t\treturn $dateNew;\n\t}", "title": "" }, { "docid": "c91085738a61213dd3ca52bac7146e47", "score": "0.52329874", "text": "public static function getWeekStartAndEnd($date): array\n {\n $datetime = new DateTime($date);\n $datetime->setISODate($datetime->format('Y'), $datetime->format('W'), 1);\n $result['week_start'] = $datetime->format('Y-m-d');\n $datetime->modify('+6days');\n $result['week_end'] = $datetime->format('Y-m-d');\n\n return $result;\n }", "title": "" }, { "docid": "7a50a693294e336735f8827bfbab0ab4", "score": "0.5230382", "text": "public function GetWeekStartDate( $start_day = 1 ){\r\n\t\t\t$date_timestamp = $this->GetAsTimestamp();\r\n\t\t\t$week_start = date('U', mktime(1, 0, 0, date('m', $date_timestamp), date('d', $date_timestamp)-(date('w', $date_timestamp)-$start_day), date('Y', $date_timestamp)) - 3600 );\r\n\r\n\t\t\treturn $week_start;\r\n\t\t}", "title": "" }, { "docid": "8110dcfad75d5b85219766578fe9de8a", "score": "0.5226368", "text": "public function getPrevWeek($date=null){\n\t\t$dateNew = date(\"Y-m-d H:i:s\",strtotime(\"-1 week\", strtotime($date)));\n\t\treturn $dateNew;\n\t}", "title": "" }, { "docid": "e8741a4c3f7a4fb22cc63c478e882ea9", "score": "0.5225831", "text": "function getFirstDay($year, $month, $day_of_week) {\n $num = date(\"w\",mktime(0,0,0,$month,1,$year));\n if($num==$day_of_week) {\n return date(\"j\",mktime(0,0,0,$month,1,$year));\n }\n elseif($num>$day_of_week) {\n return date(\"j\",mktime(0,0,0,$month,1,$year)+(86400*((7+$day_of_week)-$num)));\n }\n else {\n return date(\"j\",mktime(0,0,0,$month,1,$year)+(86400*($day_of_week-$num)));\n }\n}", "title": "" }, { "docid": "a767df56774bbbd624008cd42ae26e0c", "score": "0.5209889", "text": "function _wp_mysql_week($column)\n {\n }", "title": "" }, { "docid": "d3e48ead59c2c51fd8807d0163762331", "score": "0.52077955", "text": "public function subWeek($n)\n {\n return $this->subDay(7 * $n);\n }", "title": "" }, { "docid": "eced71597fe84eeec1c26b3d34db62b4", "score": "0.51983607", "text": "public function getNumberOfWeek($month, $year) {\n $days = cal_days_in_month(CAL_GREGORIAN, $month, $year);\n $week_day = date(\"w\", mktime(0, 0, 0, $month, 1, $year));\n $weeks = ceil(($days + $week_day) / 7);\n\n return $weeks;\n }", "title": "" }, { "docid": "0d529152ed9ef2b5c6af18d5dd53fa1c", "score": "0.51899815", "text": "public function showday($day,$month){\n$date = \"2021-$day-$month\";\n//Get the day of the week using PHP's date function.\n$dayOfWeek = date(\"l\", strtotime($date));\n//Print out the day that our date fell on.\necho $date . ' เป็นวัน ' . $dayOfWeek;\nreturn $dayOfWeek;\n }", "title": "" }, { "docid": "0fdf35bb77f7e582a7c095ef93bcfd7a", "score": "0.5182684", "text": "public function getDayOfWeek()\n {\n return $this->day_of_week;\n }", "title": "" }, { "docid": "7dd089305ba86c41e5ddb1ff59952c84", "score": "0.51745266", "text": "public static function firstDayOfWeek(?DateTimeInterface $date = null): static\n\t{\n\t\t$date = self::checkDate($date);\n\t\t$dayOfWeek = (int) $date->format('N');\n\n\t\tif ($dayOfWeek === 1) {\n\t\t\treturn static::from($date->format('Y-m-d'));\n\t\t}\n\n\t\treturn static::from($date->format('Y-m-d') . ' -' . ($dayOfWeek - 1) . ' day');\n\t}", "title": "" }, { "docid": "d89af10d8a96b4bfeccaa2207dd834a9", "score": "0.5165575", "text": "function get_day_of_week()\n {\n if (date(\"D\", $this->timestamp)==\"Sun\")\n {\n return 0;\n } else if (date(\"D\", $this->timestamp)==\"Mon\")\n {\n return 1;\n } else if (date(\"D\", $this->timestamp)==\"Tue\")\n {\n return 2;\n } else if (date(\"D\", $this->timestamp)==\"Wed\")\n {\n return 3;\n } else if (date(\"D\", $this->timestamp)==\"Thu\")\n {\n return 4;\n } else if (date(\"D\", $this->timestamp)==\"Fri\")\n {\n return 5;\n } else if (date(\"D\", $this->timestamp)==\"Sat\")\n {\n return 6;\n } else\n {\n return \"error\";\n }\n }", "title": "" }, { "docid": "b995a41e04fdebb314145b449f5dc707", "score": "0.515455", "text": "public function nextMonth(): Week{\n $week = $this->week;\n $year = $this->year;\n\n\n $begin = new DateTime(\"{$this->year}-01-01\");\n \n if ($begin->format('w')!=1) $begin->modify(\"next monday\");\n \n $dateact = $begin->modify(\"+\".($this->week-1).\" weeks\");\n\n $moisfin = $dateact->modify(\"next month\");\n\n $moisfin = intval($moisfin->format('m'));\n\n //tant que le mois 'm' ne change pas on ajoute des semaines\n do{\n $begin = new DateTime(\"{$this->year}-01-01\");\n if ($begin->format('w')!=1) $begin->modify(\"next monday\");\n $dateact = $begin->modify(\"+\".($week-1).\" weeks\");\n $moisdebut = intval($dateact->format('m'));\n $week += 1;\n if($week==53){\n \n \n $firstweek = New DateTime(\"{$year}-01-01\");\n if($firstweek->format('w')!=1) $firstweek->modify(\"next monday\");\n $lastweek = $firstweek->modify('+52 weeks'); \n $test = intval($lastweek->format('Y'));\n \n \n if($year != $test){ \n $week = 1;\n $year +=1;\n }; \n \n }elseif($week>53){\n $week = 1;\n $year +=1;\n }\n\n }while ($moisdebut != $moisfin);\n\n //si le mois d'arrivé est janvier c'est qu'on a changé d'année\n\n \n $week-=1;\n\n return new Week($week, $year);\n\n }", "title": "" }, { "docid": "e3d80de0bd99c159d423cdc0a287153e", "score": "0.51463574", "text": "function getFirstDayOfWeek($y=NULL, $m=NULL, $d=NULL)\n {\n return 1;\n }", "title": "" }, { "docid": "a23f8cdd57bf1602fbdce2c08369f5e9", "score": "0.5130152", "text": "public function dayOfTheWeek($fecha){\n $i = strtotime($fecha);\n $day= jddayofweek(cal_to_jd(CAL_GREGORIAN, date(\"m\",$i),date(\"d\",$i), date(\"Y\",$i)) , 0 );\n return $day;\n }", "title": "" }, { "docid": "8d1f2ea3ada78ed275ec5ad2371296e8", "score": "0.51234335", "text": "protected function required_date($month, $week_num, $day, $year)\r\n {\r\n /**\r\n * @var \\DateTime[] $weeks\r\n */\r\n $weeks = array();\r\n $firstDayOfMonth = new \\DateTime(\"1st $month $year\");\r\n $lastDayOfMonth = new \\DateTime($firstDayOfMonth->format(\"t M Y\"));\r\n $oneDay = new \\DateInterval('P1D');\r\n $period = new \\DatePeriod($firstDayOfMonth, $oneDay, $lastDayOfMonth->add($oneDay));\r\n\r\n foreach($period as $date)\r\n {\r\n /** @var \\DateTime $date */\r\n $weekNumber = ceil((int)$date->format('d')/7);\r\n $weeks[$weekNumber][$date->format('l')] = $date;\r\n }\r\n return $weeks[$week_num][$day];\r\n }", "title": "" }, { "docid": "f1bc9a9a8b745649eaf974f3ee91b924", "score": "0.51225686", "text": "function calendar_week_mod($num)\n {\n }", "title": "" }, { "docid": "c45e72d7ea1c4d7e3cff4edcaeafce61", "score": "0.5121626", "text": "function calendarWeekMod($num) {\n\t\t$base = 7;\n\t\treturn ($num - $base * floor($num/$base));\n\t}", "title": "" }, { "docid": "7346d2142c7519031253671da9be5928", "score": "0.5118682", "text": "function week_start_end_by_date($date, $format = 'Y-m-d') { if (is_numeric($date) AND strlen($date) == 10) {\n $time = $date;\n } else {\n $time = strtotime($date);\n }\n\n $week['week'] = date('W', $time);\n $week['year'] = date('o', $time);\n $week['year_week'] = date('oW', $time);\n $first_day_of_week_timestamp = strtotime($week['year'] . \"W\" . str_pad($week['week'], 2, \"0\", STR_PAD_LEFT));\n $week['first_day_of_week'] = date($format, $first_day_of_week_timestamp);\n $week['first_day_of_week_timestamp'] = $first_day_of_week_timestamp;\n $last_day_of_week_timestamp = strtotime($week['first_day_of_week'] . \" +6 days\");\n $week['last_day_of_week'] = date($format, $last_day_of_week_timestamp);\n $week['last_day_of_week_timestamp'] = $last_day_of_week_timestamp;\n\n return $week;\n }", "title": "" }, { "docid": "bf2da5fa01ce0301ca3a62844b4f60e2", "score": "0.5116466", "text": "function getMonthFromDate ($theDate)\n\t{\n\t\tif (gettype($theDate) == 'string')\n\t\t{\n\t\t\t$theDate = strtotime ($theDate);\n\t\t}\n\t\t$dateArray = getdate ($theDate);\n\t\treturn $dateArray ['mon'];\n\t}", "title": "" }, { "docid": "15ef0ae9693f60c504774109641d6d74", "score": "0.51159066", "text": "public function getWeeks() : int {\n $start = $this->getStartingDay();\n $end = $start->modify('+1 month -1 day');\n $startWeek = intval($start->format('W'));\n $endWeek =intval($end->format('W'));\n if ($endWeek ===1){\n $endWeek =intval($end ->modify('- 7 days')->format('W')) + 1;\n }\n $weeks = $endWeek - $startWeek + 1;\n if ($weeks < 0){\n $weeks = intval($end->format('W'));\n }\n return $weeks;\n }", "title": "" }, { "docid": "d3ad378d9f598364ebe757f0bb32d313", "score": "0.51124316", "text": "function nextWeek(){ return $this->_getDate(7);\t}", "title": "" }, { "docid": "8ddeeb57b1457aed1cbce7a0f01b4ef9", "score": "0.51110375", "text": "private function week_start_end_by_date($date, $format = 'Y-m-d') { if (is_numeric($date) AND strlen($date) == 10) {\n $time = $date;\n } else {\n $time = strtotime($date);\n }\n\n $week['week'] = date('W', $time);\n $week['year'] = date('o', $time);\n $week['year_week'] = date('oW', $time);\n $first_day_of_week_timestamp = strtotime($week['year'] . \"W\" . str_pad($week['week'], 2, \"0\", STR_PAD_LEFT));\n $week['first_day_of_week'] = date($format, $first_day_of_week_timestamp);\n $week['first_day_of_week_timestamp'] = $first_day_of_week_timestamp;\n $last_day_of_week_timestamp = strtotime($week['first_day_of_week'] . \" +6 days\");\n $week['last_day_of_week'] = date($format, $last_day_of_week_timestamp);\n $week['last_day_of_week_timestamp'] = $last_day_of_week_timestamp;\n\n return $week;\n }", "title": "" }, { "docid": "9a50b410d56e7ee5fe239248fc763256", "score": "0.5110658", "text": "public function monthPadDates()\n {\n return date('w', strtotime(date('Y-m-01', strtotime($this->strStart))));\n }", "title": "" }, { "docid": "0149deeb3b0284164fbd3ab6a0a64c13", "score": "0.50929075", "text": "public static function getSchedPageForWeek($date, $userId) {\n $user = UserDao::getUser($userId, false);\n $profile = SchedDao::getSchedProfile($userId);\n $schedPage = new SchedPage($profile);\n $ts = SchedDao::getWeekStart($date, $profile);\n for ($i = 0; $i < $profile->weekLength; $i++) {\n $schedPage->days[] = SchedDao::getSchedDay(date(\"Y-m-d\", $ts), $user);\n $ts = strtotime(\"1 day\", $ts);\n }\n return $schedPage;\n }", "title": "" }, { "docid": "c3e3ee914a5836a12d888c5071cbfb8e", "score": "0.50652856", "text": "public static function dayOfWeek($day, $month, $year)\n {\n $year1 = floor($year - (14 - $month) / 12) + 1;\n $leap = floor($year1 + floor($year1/4) - floor($year1/100) + floor($year1/400));\n $month1 = ($month +12 * floor(((14 - $month) / 12)) - 2 );\n $day1 = floor(($day + $leap +floor(( 31 * $month1) / 12)) % 7 );\n return $day1;\n }", "title": "" }, { "docid": "5eea9c01423f9be2b4d91298f2cc2fe5", "score": "0.50637376", "text": "public function get_current_week_value()\n {\n // Today is first day of week\n if ((int) RightPress_Helper::get_adjusted_datetime(null, 'w') === RightPress_Helper::get_start_of_week()) {\n return 'midnight';\n }\n else {\n return 'midnight last ' . RightPress_Helper::get_literal_start_of_week();\n }\n }", "title": "" }, { "docid": "97b446f825990f3676c5af6103762c67", "score": "0.50582623", "text": "public function week($callback = null)\n {\n return $this->weeks($callback);\n }", "title": "" } ]
98f11cd0dbaaee962aa0f1c586a902d0
Returns customer with provided ID.
[ { "docid": "a132fae9497d5697885b2f4230a88387", "score": "0.0", "text": "public static function withId(int $id): self\n {\n $customer = new self();\n $customer->id = $id;\n\n return $customer;\n }", "title": "" } ]
[ { "docid": "5ed8d3cdbf83a3aae70cb550e4da77b4", "score": "0.8600511", "text": "public function findCustomer($id)\n {\n $customer = $this->HHCustomerRepository->find($id);\n return $customer;\n }", "title": "" }, { "docid": "3ec17aa73d1032e29e4f47cf0b216e8f", "score": "0.8526973", "text": "public function getCustomerById($id)\n {\n return $this->model->find($id);\n }", "title": "" }, { "docid": "f796d4eb9c9f17886e37fc5adf8a172e", "score": "0.8331516", "text": "public function getCustomerByID($id){\r\n\t\t$sql = \"SELECT `customer_name`,`customer_email`,`customer_address`,`customer_phone` FROM `customer_table` WHERE `customer_id`= $id\";\r\n\t\treturn $this->getSingleRow($sql);\r\n\t}", "title": "" }, { "docid": "8e2d330b6649339d6707b48a04762060", "score": "0.8308028", "text": "public function get_customer_by_id( $id ) {\n echo $id;\n foreach ( self::$instance->customers as $customer ) {\n if ( $customer->wp_user_id === $id ) {\n return $customer;\n }\n }\n\n // Customer not found, create an instance.\n $wp_user = get_user_by( \"ID\", $id );\n if( $wp_user !== false ) {\n $customer = new ESP_Customer( $wp_user->ID );\n array_push( self::$instance->customers, $customer );\n return $customer;\n }\n }", "title": "" }, { "docid": "71e7873f1ae62a2781800dd2ddf9e60c", "score": "0.82764465", "text": "public static function findById($id)\n {\n return self::getCustomerById($id);\n }", "title": "" }, { "docid": "f7769e668104dafca13e11d0e6108a36", "score": "0.8205398", "text": "public function get_customer_by_id($id)\n {\n return $this->db->get_where('cliente', array('id' => $id))->row();\n }", "title": "" }, { "docid": "8508254488e4ecb57462bf48da4d7108", "score": "0.8175344", "text": "function getByID($id) {\n\t\t$this -> db -> where('cs_id', $id);\n\t\treturn $this -> db -> get($this -> table_customers);\n\t}", "title": "" }, { "docid": "2012091e248d73f7695ff98a787a8654", "score": "0.8155801", "text": "public function getLoggedIdCustomer(string $id);", "title": "" }, { "docid": "5c18f803cd740a7e62ea21bd9b6054c9", "score": "0.8153309", "text": "private function getCustomerFromId(string $customer_id, array $params = []): \\Mollie\\Api\\Resources\\Customer\n {\n return $this->mollie->customers->get($customer_id, $params);\n }", "title": "" }, { "docid": "38fa59bd74647f53f0bc64bc5428e7fa", "score": "0.802473", "text": "public function getCustomerByID($id) {\n $customer = Cache::remember($this->cacheKey, env(\"CACHE_TIME\", 5), function () use ($id) {\n return Customer::find($id);\n });\n\n return CustomerResource::collection([$customer]);\n }", "title": "" }, { "docid": "599b0019a0708b15fc7d2a49cc049200", "score": "0.7941357", "text": "public function getById($id_customer)\n {\n $conn = Application::app()->db->conn;\n $sql = \"SELECT * FROM customer where id_customer = ?\";\n $stmt = $conn->prepare($sql);\n $stmt->execute([\n // TO AVOID XSS ATTACKS, APPLY FILTERS\n filter_var($id_customer, FILTER_SANITIZE_NUMBER_INT)\n ]);\n $row = $stmt->fetch(\\PDO::FETCH_ASSOC);\n if (null != $row) {\n $customer = new Customer();\n $customer->loadData($row);\n return $customer;\n }\n return null;\n }", "title": "" }, { "docid": "4fe58cbc577fe753129c7cb10173de74", "score": "0.79032946", "text": "private function getCustomer(int $id) : ?Customer\n {\n return $this->entityManager\n ->getRepository(Customer::class)\n ->find($id);\n }", "title": "" }, { "docid": "b5ddb6ad108748cb0161d986801b0c0a", "score": "0.7826736", "text": "function get_customer($id) {\n return $this->db->get_where('customer', array('id' => $id))->row_array();\n }", "title": "" }, { "docid": "72981f7f152c7f1665458049172022f5", "score": "0.78103215", "text": "public static function getUserCustomer($id)\n\t{\n\t\t$get_user_customer = DB::table('user')->join('customer', 'user.customer_id', '=', 'customer.id')->where('user.id', '=', $id)\n\t\t->get(array('customer.company_name'));\n\t\n\t\treturn $get_user_customer;\n\t}", "title": "" }, { "docid": "93981c1ab32951f3e2f24ea211fb4426", "score": "0.7798755", "text": "static function getCustomer(int $id){\n $sql = \"SELECT * FROM customers WHERE CustomerID = :id;\";\n //Prepare the query\n self::$db->query($sql);\n //Set the bind parameters\n self::$db->bind(\":id\",$id);\n //Execute the query\n self::$db->execute();\n //Get the row\n return self::$db->singleResult();\n \n }", "title": "" }, { "docid": "aae6d9bdb2a6fae428e103987142320c", "score": "0.7770977", "text": "public function getCustomer($id) {\n return response()->json(Customer::find($id));\n }", "title": "" }, { "docid": "b57e9bbe3f25c20f61ffc871c858e10b", "score": "0.7716831", "text": "public function getCustomer($id)\n {\n if ($id === null || !is_integer($id) || $id < 1) {\n throw new InvalidIdException();\n }\n return $this->client->get(\n 'customers/' . $id,\n [],\n Response\\GetCustomerResponse::class\n );\n }", "title": "" }, { "docid": "8920048d349220ce687e3a3a1d53d87f", "score": "0.7646874", "text": "public function getCustomer($id)\n {\n $sql = \"select customer_id,first_name,last_name,address_line_1,address_line_2,address_line_3,nic,contact_no from customer where customer_id=?;\";\n\n $stmt = $this->con->prepare($sql);\n $stmt->bind_param(\"s\",$id);\n if($stmt->execute())\n {\n $stmt->store_result();\n if($stmt->num_rows>0)\n {\n return $stmt;\n }\n else\n {\n return null;\n }\n\n }\n else\n {\n return null;\n }\n }", "title": "" }, { "docid": "7dbf8eaa6b5b3d5e63eab16b1c18c37a", "score": "0.76308155", "text": "public function getCustomer($id)\n\t{\n\t\t$ct = \\App\\Customer::find($id);\n\t\treturn response()->json($ct);\n\t}", "title": "" }, { "docid": "d0bf10e0c5c7e76a938bdd1a0d0d86b0", "score": "0.7605372", "text": "public function get($customer_id){\n return $this->customer_model->get($customer_id, 'id');\n }", "title": "" }, { "docid": "aa91fe593a55f7d71b2041dad0758575", "score": "0.75827134", "text": "public function getCustomerById($id)\n {\n $customer = Customer::find($id);\n return response()->json($customer);\n }", "title": "" }, { "docid": "dfc1c6f2b21dea43dc02667132a5d7a0", "score": "0.75683486", "text": "public function loadByCustomerId($id)\n {\n return $this->load($id, 'customer_id');\n }", "title": "" }, { "docid": "a38466774c8ff21b865818e25afbf2e8", "score": "0.75646424", "text": "public function get_customer_by_id($customerid)\n {\n $this->db->select(\"*\");\n $this->db->from('tbl_customer');\n $this->db->where(\"custid\", $customerid);\n\n $query = $this->db->get();\n return $query->row();\n }", "title": "" }, { "docid": "a20256b5b8bba54d8adc2e9010d6bb12", "score": "0.75542355", "text": "private function getCustomerById($customerId)\n {\n return $this->customerRepository->getById($customerId);\n }", "title": "" }, { "docid": "211e6c48620a08d865fb0e994baf56f2", "score": "0.7454375", "text": "function pipit_stripe_get_customer($customerID) {\n if(!defined('PIPIT_STRIPE_SECRET_KEY')) {\n PerchUtil::debug('Stripe secret key not set', 'error');\n return false;\n }\n\n \\Stripe\\Stripe::setApiKey(PIPIT_STRIPE_SECRET_KEY);\n $customer = \\Stripe\\Customer::retrieve($customerID);\n\n return $customer;\n }", "title": "" }, { "docid": "6eb511bbb2a34784fd37ff5de22a814c", "score": "0.7419194", "text": "private function getCustomer($id)\n {\n $result = $this->find($id);\n if (! $result) {\n return $this->notFoundResponse();\n }\n $response['status_code_header'] = 'HTTP/1.1 200 OK';\n $response['body'] = json_encode($result);\n return $response;\n }", "title": "" }, { "docid": "ee1fcba2b7145dfa8ed1598d96a4fd51", "score": "0.7376373", "text": "public static function find($id) {\n if ($customers = self::load()) {\n foreach ($customers as $customer) {\n if ($customer->id == $id) {\n return $customer;\n }\n }\n return FALSE;\n }\n }", "title": "" }, { "docid": "8c4440cc8a041adedf862eebab8dc3a4", "score": "0.73629916", "text": "public function getCustomerId();", "title": "" }, { "docid": "6c0624fe276a5604c0fdc4f25f2e6cc4", "score": "0.7360468", "text": "public function edit($id)\n {\n return Customer::find($id);\n }", "title": "" }, { "docid": "2ed3675a2df9eeb87ad8c258d10ef02e", "score": "0.72963166", "text": "public function show($id)\n {\n //show particular customer\n }", "title": "" }, { "docid": "79da1e18e249c5701fa6baacdeb4b381", "score": "0.7259681", "text": "public function getCustomer(string $id)\n {\n if (is_null($id)) {\n throw new Exception(\"Transaction ID is required\", 1);\n }\n\n $res = $this->call('/customers/' . $id, 'GET');\n return Utils::jsonDecode($res->getBody());\n }", "title": "" }, { "docid": "58c69b9b07fd03fd0a25b65bbd39d8b7", "score": "0.72504044", "text": "function getCustomer($customer_id)\r\n {\r\n //define query\r\n $query = \"SELECT * FROM customer\r\n WHERE customer_id = :customer_id\";\r\n\r\n //prepare statement\r\n $statement = $this->_db->prepare($query);\r\n\r\n //bind parameters\r\n $statement->bindParam(':customer_id', $customer_id);\r\n\r\n //execute\r\n $statement->execute();\r\n\r\n //get result\r\n $result = $statement->fetch(PDO::FETCH_ASSOC);\r\n return $result;\r\n }", "title": "" }, { "docid": "8c4693bbf02d15f4f029c55cd061c659", "score": "0.72268915", "text": "public function view($id){\n \n return Customer::find($id);\n }", "title": "" }, { "docid": "b4af183ab3a9521ef73b31cdb7f20b23", "score": "0.71999544", "text": "protected function getCustomerFromService()\n {\n return $this->customerRepository->getById($this->customerSession->getId());\n }", "title": "" }, { "docid": "a33d1ee3157b84e420f71b295c2b3349", "score": "0.71950614", "text": "public function getCustomerById($customer_id) {\n $sql = \"SElECT * FROM Customer WHERE CustomerNumber = :customer_id\";\n $stmt = $this->db->prepare($sql);\n $result = $stmt->execute([\"customer_id\" => $customer_id]);\n if($result) {\n return new CustomerEntity($stmt->fetch());\n }\n }", "title": "" }, { "docid": "444d5b5d9e1c5a6206e29439387b52be", "score": "0.7178892", "text": "public function getByCustomerId($customerId);", "title": "" }, { "docid": "c759373104ae7a2c5e8171118e10b17e", "score": "0.7163224", "text": "public function getCustomerId() {\n return $this->customerId;\n }", "title": "" }, { "docid": "2a9ceab51a6cdb4068fede1f60981cb2", "score": "0.7157521", "text": "public function find(int $id)\n {\n $customer = $this->service->find($id);\n\n return response()->send($customer);\n }", "title": "" }, { "docid": "7f5addc537ea8195a14ad1f8521f75da", "score": "0.7142853", "text": "public function show($id)\n { $this->grantIfRole('admin');\n $customer = Customer::find($id);\n if (empty($customer)){\n return response()->json([\n 'message' => 'Record not found',\n ], 404);\n }\n return $customer;\n }", "title": "" }, { "docid": "a31427f5bf1445f4a7cf2f8e79f25b93", "score": "0.713663", "text": "public function getCustomerId()\n {\n return $this->customerId;\n }", "title": "" }, { "docid": "a31427f5bf1445f4a7cf2f8e79f25b93", "score": "0.713663", "text": "public function getCustomerId()\n {\n return $this->customerId;\n }", "title": "" }, { "docid": "db06f36f82cf6a9c3a431a89c39e5099", "score": "0.71311355", "text": "public function getCustomerID()\n {\n return $this->customerID;\n }", "title": "" }, { "docid": "949bd1dd3956265330ca722837a2dc64", "score": "0.7111319", "text": "public function show($id)\n {\n $customer = $this->service->find($id);\n return response()->json($customer);\n }", "title": "" }, { "docid": "a53e9dd2ac9f062dae89b627aaa26089", "score": "0.70881355", "text": "public function getCustomerId()\n {\n return $this->customer_id;\n }", "title": "" }, { "docid": "a53e9dd2ac9f062dae89b627aaa26089", "score": "0.70881355", "text": "public function getCustomerId()\n {\n return $this->customer_id;\n }", "title": "" }, { "docid": "a53e9dd2ac9f062dae89b627aaa26089", "score": "0.70881355", "text": "public function getCustomerId()\n {\n return $this->customer_id;\n }", "title": "" }, { "docid": "a53e9dd2ac9f062dae89b627aaa26089", "score": "0.70881355", "text": "public function getCustomerId()\n {\n return $this->customer_id;\n }", "title": "" }, { "docid": "a53e9dd2ac9f062dae89b627aaa26089", "score": "0.70881355", "text": "public function getCustomerId()\n {\n return $this->customer_id;\n }", "title": "" }, { "docid": "e38a69fdc3d82c6b578ec83d5230254c", "score": "0.70817125", "text": "public function getDetails($id) {\n $sql = \"SELECT * FROM customers WHERE id = '$id'\";\n \n $result = $this->con->query ($sql);\n \n $row = $result->fetch_assoc();\n \n return $row;\n }", "title": "" }, { "docid": "10bf45f5b957a7d312b2db1c9669bfd4", "score": "0.7079067", "text": "public function getCustomer()\n {\n if($id = $this->_customerSession->getId()){\n return $this->customerRepository->getById($id);\n }\n return null;\n }", "title": "" }, { "docid": "c8859c3ce52388074df491dd1d237d91", "score": "0.7073847", "text": "public function get_customer($id = null){\n\t\t$data = $this->CustomerModel->get_all($id);\n\t\tif (empty($data)){\n\t\t\t$data = [];\n\t\t}\n\t\tif ($return_var == true) {\n\t\t\treturn $data;\n\t\t}else{\n\t\t\techo json_encode($data);\n\t\t}\n\t}", "title": "" }, { "docid": "1a67c15b0c477d01bd0cd463fac2d4ed", "score": "0.7048752", "text": "public function getCustomer();", "title": "" }, { "docid": "1a67c15b0c477d01bd0cd463fac2d4ed", "score": "0.7048752", "text": "public function getCustomer();", "title": "" }, { "docid": "1a67c15b0c477d01bd0cd463fac2d4ed", "score": "0.7048752", "text": "public function getCustomer();", "title": "" }, { "docid": "1a67c15b0c477d01bd0cd463fac2d4ed", "score": "0.7048752", "text": "public function getCustomer();", "title": "" }, { "docid": "1a67c15b0c477d01bd0cd463fac2d4ed", "score": "0.7048752", "text": "public function getCustomer();", "title": "" }, { "docid": "84fa6bad5adbc2ed6e0df7caec249cc8", "score": "0.70455396", "text": "function getCustomerInformation($cust_id)\n\n\t{\t\t\t\n\n\t\t$this->db->where(\"cust_id\", $cust_id);\n\n\t\t$result = $this->db->getOne(\"customer\");\n\n\t\treturn $result; \n\n\t}", "title": "" }, { "docid": "e4583dce99582b4cd078d8063142ffa0", "score": "0.7015508", "text": "function get_customers($id)\n {\n $result = $this->db->get_where('customers', array(\n 'id' => $id\n ))->row_array();\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 $result;\n }", "title": "" }, { "docid": "a17b93498ab9d81d224d928383932001", "score": "0.69692475", "text": "public function getCustomer(int $customerId)\n {\n $statement = $this->dbo->prepare('SELECT name, email FROM customer WHERE id = ?');\n $statement->execute([$customerId]);\n return $statement->fetch(\\PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "06c29b17ccf13d33da3a9f378e3110bb", "score": "0.6958145", "text": "public function getCustomerId(): string {\n return $this->customer_id;\n }", "title": "" }, { "docid": "58e8a6109ee4974a508576631bd5f0ad", "score": "0.6953751", "text": "public function getCustomer_id()\n {\n return $this->customer_id;\n }", "title": "" }, { "docid": "d8efc0a11cd48ad06e587db47dbbeeca", "score": "0.69487566", "text": "public function find($id)\n {\n $query = \"\n SELECT\n *\n FROM\n `customer`\n WHERE id = :id;\n \";\n\n try {\n $conn= $this->DB->getConnection(); \n $statement = $conn->prepare($query);\n $statement->execute(array('id' => $id));\n $result = $statement->fetch(\\PDO::FETCH_ASSOC);\n return $result;\n } catch (\\PDOException $e) {\n exit($e->getMessage());\n }\n }", "title": "" }, { "docid": "2eac5988549ffb70df80ca4a99d63084", "score": "0.6940155", "text": "public function getCustomerId() {\n\t\t\n\t\treturn $this->customerId;\n\t}", "title": "" }, { "docid": "40bbabe0c6a2519587e5ad5fbffaf038", "score": "0.6939515", "text": "public function show($id)\n {\n //Get a customer\n $customer=Customer::findOrFail($id);\n\n //Return a customer as a single Resource\n return new CustomerResource($customer);\n \n }", "title": "" }, { "docid": "36274037bc734119bb94e9aa86997180", "score": "0.6937735", "text": "public function getId(){\n return $this->getCustomerId();\n }", "title": "" }, { "docid": "bd9d7f012e4e87f3ba8235c8537e3c10", "score": "0.6930748", "text": "public function getCustomerById($customer_id) {\n $sql = \"SELECT *\n from customers c\n where c.id = :customer_id\";\n $stmt = $this->db->prepare($sql);\n $result = $stmt->execute([\"customer_id\" => $customer_id]);\n $data = $stmt->fetch();\n if($result && is_array($data)) {\n return new CustomerEntity($data);\n }\n return null;\n }", "title": "" }, { "docid": "cf439cc26631dfbea7af50df09ba3b92", "score": "0.69236135", "text": "protected function _lookupCustomerId()\n {\n return Mage::getModel('customer/customer')\n ->setWebsiteId(Mage::app()->getWebsite()->getId())\n ->loadByEmail($this->_quote->getCustomerEmail())\n ->getId();\n }", "title": "" }, { "docid": "579bcb4adb644c9470d16ee0b3ec7cda", "score": "0.69233954", "text": "public function show($id)\n {\n $customer = Customer::findOrFail($id);\n return response()->json($customer, 200);\n }", "title": "" }, { "docid": "bfe093c05e31c39cd34a695b98765747", "score": "0.69221044", "text": "public function getCustomer()\n {\n return $this->customer instanceof CustomerResourceIdentifierBuilder ? $this->customer->build() : $this->customer;\n }", "title": "" }, { "docid": "bfe093c05e31c39cd34a695b98765747", "score": "0.69221044", "text": "public function getCustomer()\n {\n return $this->customer instanceof CustomerResourceIdentifierBuilder ? $this->customer->build() : $this->customer;\n }", "title": "" }, { "docid": "cf581e6d94796e62660e56d3794a4254", "score": "0.68838584", "text": "public function getCustomerDetails($customer_id) {\n return $this->api->customer->fetch($customer_id);\n }", "title": "" }, { "docid": "b481d94dcd5bb75429be189a9e82765f", "score": "0.68802464", "text": "public function ViewCustomer($id)\n {\n $single=Db::table('customers')\n ->where('id', $id)\n ->first();\n return view('view_customer')->with('single',$single);\n }", "title": "" }, { "docid": "04480a5b50ad08168d7e529ef79194be", "score": "0.6870338", "text": "public function findCustomer()\n {\n return $this->gateway->findCustomer($this->user->paymentProfile)->send()->getData();\n }", "title": "" }, { "docid": "cc7b0c93beec7127f596f0aad62e1c86", "score": "0.68248785", "text": "public function show($id)\n {\n $data = DB::table('customers')->where('customer_id',$id)->first();\n return view('website.backend.customer.show',compact('data'));\n }", "title": "" }, { "docid": "8b59fff98388fe539491526e3e6406fd", "score": "0.6815442", "text": "public function getCustomerTokenId($id);", "title": "" }, { "docid": "9f787371de0fbc112f5b5980381e5c17", "score": "0.6807457", "text": "public function getCustomer()\n {\n /** @var Mage_Customer_Model_Customer $customer */\n $customer = Mage::getModel('customer/customer');\n $customer->load($this->_getRandCustomerId());\n\n if(!$customer->getPrimaryBillingAddress()->getId()){\n return $this->getCustomer();\n }\n\n if(!$customer->getPrimaryShippingAddress()->getId()){\n return $this->getCustomer();\n }\n\n return $customer;\n }", "title": "" }, { "docid": "bf9e2428cbeb4edd1c0ed2df45eac82f", "score": "0.68062246", "text": "public function getSingleCustomer($customer_id)\n {\n\n $url = $this->clover_url.'/customers/'.$customer_id;\n return json_decode($this->curlPost($url), TRUE);\n }", "title": "" }, { "docid": "7f269c5e602e9225ae0430ba521be452", "score": "0.6802075", "text": "protected function getCustomer($stripe_id)\n {\n return \\LinkThrow\\Billing\\EloquentBillableRepository::findCustomer($stripe_id);\n }", "title": "" }, { "docid": "4759559592732a622c506494501a3044", "score": "0.68010163", "text": "public function load($id){\n\t\t$sql = 'SELECT * FROM customer WHERE customer_id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->set($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "title": "" }, { "docid": "c9d20f6a8b1f95ea7cc24140bef889da", "score": "0.67852587", "text": "public function getCustomer()\n {\n // TODO: Implement getCustomer() method.\n }", "title": "" }, { "docid": "a879bf5b1f4dab4247502c490e9afcb4", "score": "0.67783546", "text": "function stripe_get_customer_id($uid = 0) {\n\tif( ! $uid ) $uid = $GLOBALS['user']->uid;\n\n\treturn db_fetch_object(db_query(\"SELECT * FROM {stripe_customers} WHERE uid = %d LIMIT 1\", $uid));\n}", "title": "" }, { "docid": "7b04f701b2512c59d2ce5b61a090b3ef", "score": "0.67482364", "text": "public function show(Customer $customer,$id)\n {\n //\n }", "title": "" }, { "docid": "38f976eaca5d53b474a2dcbd02cf6373", "score": "0.67450875", "text": "public function getCustomer($conektaId = null)\n {\n \n try {\n $customer = Customer::find($conektaId);\n } catch(ParameterValidationError $e) {\n // No customer;\n $customer = null;\n }\n return $customer;\n }", "title": "" }, { "docid": "fe3404ea453e5611b7cf3a873e6b089c", "score": "0.67435706", "text": "public function get_customer($customer_id = null) {\n $this->db->join('customer_group', 'customer_group.customer_group_id = customer.customer_group_id');\n $this->db->where('customer.status_id', 1);\n $this->db->where('customer_group.shop_id_pri', $this->session->userdata('shop_id_pri'));\n if($customer_id != null){\n $this->db->where('customer.customer_id', $customer_id); \n }\n return $this->db->get('customer');\n }", "title": "" }, { "docid": "6ec7bb0254db549d98655b95cfac14e9", "score": "0.6742913", "text": "public function getCustomerObject($c_id){\n $this->load->database();\n if($c_id==-1){\n $result=$this->db->select('*')->from('customer_details')->get()->result();\n return($result);\n }\n else{\n $result=$this->db->select('*')->from('customer_details')->where('c_id',$c_id)->get()->result();\n return($result);\n }\n }", "title": "" }, { "docid": "8b91708824efef7db3389c43c5acd3f9", "score": "0.6730993", "text": "public function getCustomerDataById($customerId)\n {\n return $this->_customerFactory->create()->load($customerId);\n }", "title": "" }, { "docid": "9209f4e782a6b25f4d25abda0e95a1b2", "score": "0.67293334", "text": "public function getId()\n {\n return $this->customer->getId();\n }", "title": "" }, { "docid": "af1bdcaba2c7c830fe9ec09fa6291723", "score": "0.6728466", "text": "public function loadCustomersById($id)\n {\n return $this->addFieldToFilter('customer_id', $id);\n }", "title": "" }, { "docid": "0327fbbbdb04b0d5b7b1fb5ee41b0fa3", "score": "0.6727913", "text": "public function getCustomer()\n {\n return $this->_customerSession->getCustomer();\n }", "title": "" }, { "docid": "3c2165082e632d62e4c73f16a5fab731", "score": "0.6724758", "text": "public function id()\n {\n return $this->customer->id ?? null;\n }", "title": "" }, { "docid": "0a246b97d29054a4a48b565a2fdf5401", "score": "0.6723375", "text": "public function getCustomerId()\n {\n return $this->getParameter('customerId');\n }", "title": "" }, { "docid": "7bbe0c29c02083ff9490f13163231c76", "score": "0.6719859", "text": "public function get($customer_id)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$ch = Stripe_Customer::retrieve($customer_id);\n\t\t\t\treturn $ch;\n\t\t\t} catch (Exception $e)\n\t\t\t{\n\t\t\t\t$this->error = TRUE;\n\t\t\t\t$this->message = $e->getMessage();\n\t\t\t\t$this->code = $e->getCode();\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b029c6fbf01032a2eb2aa859c31c56f3", "score": "0.6711309", "text": "public function customersGet($id, $by = 'externalId', $site = null)\n {\n $this->checkIdParameter($by);\n\n return $this->client->makeRequest(\n \"/customers/$id\",\n RetailcrmHttpClient::METHOD_GET,\n $this->fillSite($site, array('by' => $by))\n );\n }", "title": "" }, { "docid": "52dc85af0eac8708f9019b112909d16c", "score": "0.67101216", "text": "public function requestCustomerId();", "title": "" }, { "docid": "448828a0ebd866ba49f1300bec171360", "score": "0.6701405", "text": "public function getInfoById($id){\n\t\t$sql = \"SELECT * FROM customers AS customer\n\t\t\t\t\tLEFT JOIN users as creator ON customer.creator = creator.id\n\t\t\t\t\t\tWHERE customer.id='\" . (int)$id . \"' LIMIT 1\";\n\t\t$result = parent::get('db')->mysqli()->query($sql);\n\t\tif($result) {\n\t\t\treturn parent::get('db')->fetchArray($result);\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9f9210d4295b54c373706256b3572a92", "score": "0.66643554", "text": "public function edit($id)\n {\n $customers = Customer::find($id);\n return $customers;\n }", "title": "" }, { "docid": "cc3cd62e030cb0d8a791081a3ca6f9ad", "score": "0.66617084", "text": "public static function findByCustomerID($id) {\n return Doctrine::getTable ( 'Invoices' )->findBy ( 'customer_id', $id);\n }", "title": "" }, { "docid": "77c1ffd99fd2dc7247f9fc7f16e5a904", "score": "0.66582656", "text": "public function show($id)\n {\n //\n $customer = Customer::with('membership')->find($id);\n return \\Response::json($customer);\n }", "title": "" }, { "docid": "5b6909e29f824935e59e4b35347eb20c", "score": "0.6654012", "text": "public function show($id)\n {\n $customer = Customer::findOrFail($id);\n\n $response = [\n 'message' => 'Detail of customer',\n 'data' => $customer\n ];\n\n return response()->json($response, Response::HTTP_OK);\n }", "title": "" }, { "docid": "ef44e93675ebf818d064a5324e6dc83c", "score": "0.6651481", "text": "public function getCustomerId(): ?string\n {\n return $this->customerId;\n }", "title": "" }, { "docid": "eb42fe12276ba9416443a2656738a4cf", "score": "0.6649766", "text": "public function getCustomer()\n {\n return $this->customer;\n }", "title": "" } ]
61aa9dc649d07157826dabdb47748128
///////////////////////////////////////////////////////////////////// Function: build_bind_server_domain_list (string $options='') Input Options: $options = key=value pairs of options for this function. multiple sets of key=value pairs should be separated by an "&" symbol. Output: Returns a two part list: 1. The exit status of the function (0 on success, nonzero on error) 2. A textual message for display on the console or web interface. Example: list($status, $result) = build_bind_server_domain_list('server=test'); Exit codes: 0 :: No error 1 :: Help text printed Insufficient or invalid input received /////////////////////////////////////////////////////////////////////
[ { "docid": "e17da77a8892b17be59bfa17f7e9dceb", "score": "0.89146966", "text": "function build_bind_server_domain_list($options=\"\") {\n\n // The important globals\n global $conf, $self, $onadb;\n\n // Version - UPDATE on every edit!\n $version = '1.50';\n\n printmsg(\"DEBUG => build_bind_server_domain_list({$options}) called\", 3);\n\n // Parse incoming options string to an array\n $options = parse_options($options);\n\n // Return the usage summary if we need to\n if ($options['help'] or !$options['server']) {\n // NOTE: Help message lines should not exceed 80 characters for proper display on a console\n $self['error'] = 'ERROR => Insufficient parameters';\n return(array(1,\n<<<EOF\n\nbuild_bind_server_domain_list-v{$version}\nReturns a list of domains associated with the specified server.\n\n Synopsis: build_bind_server_domain_list [KEY=VALUE] ...\n\n Required:\n server=NAME[.DOMAIN] or ID return list for server name or ID\n\n Notes:\n * Specified host must be a valid DNS server\n\\n\nEOF\n\n ));\n }\n\n // Determine the hostname and domain to be used --\n // i.e. add the default domain, or find the part of the host provided\n // that will be used as the \"zone\" or \"domain\". This means testing many\n // zone name's against the DB to see what's valid.\n list($status, $rows, $shost) = ona_find_host($options['server']);\n printmsg(\"DEBUG => build_bind_server_domain_list() server record: {$domain['server']}\", 3);\n if (!$shost['id']) {\n printmsg(\"DEBUG => Unknown server record: {$options['server']}\",3);\n $self['error'] = \"ERROR => Unknown server record: {$options['server']}\";\n return(array(3, $self['error'] . \"\\n\"));\n }\n\n // For the given server id. find all domains for that server\n list($status, $rows, $records) = db_get_records($onadb, 'dns_server_domains', array('host_id' => $shost['id']), '');\n\n //MP: TODO - for now this just returns a list of all the domains. In the future this could/should just return\n // a list of domains that need refreshed. This would imply a version to do ALL and one for just UPDATED domains.\n foreach ($records as $sdomain) {\n list($status, $rows, $domain) = ona_get_domain_record(array('id' => $sdomain['domain_id']));\n $text .= $domain['fqdn'] . \"\\n\";\n }\n\n // Return the list\n return(array(0, $text));\n}", "title": "" } ]
[ { "docid": "6007648d4df5ce287ebccbd02f980f79", "score": "0.7226301", "text": "function build_bind_domain($options=\"\") {\n\n // The important globals\n global $conf, $self, $onadb;\n\n // Version - UPDATE on every edit!\n $version = '1.51';\n\n printmsg(\"DEBUG => build_bind_domain({$options}) called\", 3);\n\n // Parse incoming options string to an array\n $options = parse_options($options);\n\n // Return the usage summary if we need to\n if ($options['help'] or !$options['domain']) {\n // NOTE: Help message lines should not exceed 80 characters for proper display on a console\n $self['error'] = 'ERROR => Insufficient parameters';\n return(array(1,\n<<<EOF\n\nbuild_bind_domain-v{$version}\nBuilds a zone file for a dns server from the database\n\n Synopsis: build_bind_domain [KEY=VALUE] ...\n\n Required:\n domain=DOMAIN or ID build zone file for specified domain\n\n\\n\nEOF\n ));\n }\n\n\n // Get the domain information\n list($status, $rows, $domain) = ona_find_domain($options['domain']);\n printmsg(\"DEBUG => build_bind_domain() Domain record: {$domain['domain']}\", 3);\n if (!$domain['id']) {\n printmsg(\"DEBUG => Unknown domain record: {$options['domain']}\",3);\n $self['error'] = \"ERROR => Unknown domain record: {$options['domain']}\";\n return(array(2, $self['error'] . \"\\n\"));\n }\n\n // if for some reason the domains default_ttl is not set, use the one from the $conf['dns']['default_ttl']\n if ($domain['default_ttl'] == 0) $domain['default_ttl'] = $conf['dns']['default_ttl'];\n\n if ($domain['primary_master'] == '') $domain['primary_master'] = 'localhost';\n\n\n // loop through records and display them\n $q=\"\n SELECT *\n FROM dns\n WHERE domain_id = {$domain['id']}\n ORDER BY type\";\n\n\n // exectue the query\n $rs = $onadb->Execute($q);\n if ($rs === false or (!$rs->RecordCount())) {\n $self['error'] = 'ERROR => build_zone(): SQL query failed: ' . $onadb->ErrorMsg();\n printmsg($self['error'], 0);\n $exit += 1;\n }\n $rows = $rs->RecordCount();\n\n // check if this is a ptr domain that has delegation\n $ptrdelegation=false;\n if (strpos(preg_replace(\"/[ip6nadr-]+.arpa/\", '', $domain['fqdn']),'-') !== FALSE) {\n $ptrdelegation=true;\n }\n\n // Start building the named.conf - save it in $text\n $text = \"; DNS zone file for {$domain['fqdn']} built on \" . date($conf['date_format']) . \"\\n\";\n\n // print the opening host comment with row count\n $text .= \"; TOTAL RECORDS (count={$rows})\\n\\n\";\n // FIXME: MP do more to ensure that dots are at the end as appropriate\n $text .= \"\\$ORIGIN {$domain['fqdn']}.\\n\";\n $text .= \"\\$TTL {$domain['default_ttl']}\\n\";\n $text .= \";Serial number is current unix timestamp (seconds since UTC)\\n\\n\";\n\n // NOTE: There are various ways that one could generate the serial. The bind book suggests YYYYMMDDXX where XX is 1/100th of the day or some counter in the day.\n // I feel this is too limiting. I prefer the Unix timestamp (seconds since UTC) method. TinyDNS uses this method as well and it allows for much more granularity.\n // Referr to the following for some discussion on the topic: http://www.lifewithdjbdns.com/#Migration\n // NOTE: for now I am generating the serial each time the zone is built. I'm ignoring, and may remove, the one stored in the database.\n $serial_number = time();\n\n // Build the SOA record\n // FIXME: MP do a bit more to ensure that dots are where they should be\n $text .= \"@ IN SOA {$domain['primary_master']}. {$domain['admin_email']} ({$serial_number} {$domain['refresh']} {$domain['retry']} {$domain['expiry']} {$domain['minimum']})\\n\\n\";\n\n\n // Loop through the record set\n while ($dnsrecord = $rs->FetchRow()) {\n // Dont build records that begin in the future\n if (strtotime($dnsrecord['ebegin']) > time()) continue;\n if (strtotime($dnsrecord['ebegin']) < 0) continue;\n\n // If there are notes, put the comment character in front of it\n if ($dnsrecord['notes']) $dnsrecord['notes'] = '; '.str_replace(\"\\n\", \"; \", $dnsrecord['notes']);\n\n // If the ttl is empty then make it truely empty\n if ($dnsrecord['ttl'] == 0) $dnsrecord['ttl'] = '';\n\n // Also, if the records ttl is the same as the domains ttl then dont display it, just to keep it \"cleaner\"\n if (!strcmp($dnsrecord['ttl'],$domain['default_ttl'])) $dnsrecord['ttl'] = '';\n\n // Dont print a dot unless hostname has a value\n if ($dnsrecord['name']) $dnsrecord['name'] = $dnsrecord['name'].'.';\n\n if ($dnsrecord['type'] == 'A') {\n // Find the interface record\n list($status, $rows, $interface) = ona_get_interface_record(array('id' => $dnsrecord['interface_id']));\n if ($status or !$rows) {\n printmsg(\"ERROR => Unable to find interface record!\",3);\n $self['error'] = \"ERROR => Unable to find interface record!\";\n return(array(5, $self['error'] . \"\\n\"));\n }\n\n // Determine A record type if it is IPv6\n $dnsrecord['type'] = (strpos($interface['ip_addr_text'],':') ? 'AAAA' : 'A');\n\n $fqdn = $dnsrecord['name'].$domain['fqdn'];\n $text .= sprintf(\"%-50s %-8s IN %-8s %-30s %s\\n\" ,$fqdn.'.',$dnsrecord['ttl'],$dnsrecord['type'],$interface['ip_addr_text'],$dnsrecord['notes']);\n }\n\n if ($dnsrecord['type'] == 'PTR') {\n // Find the interface record\n list($status, $rows, $interface) = ona_get_interface_record(array('id' => $dnsrecord['interface_id']));\n if ($status or !$rows) {\n printmsg(\"ERROR => Unable to find interface record!\",3);\n $self['error'] = \"ERROR => Unable to find interface record!\";\n return(array(5, $self['error'] . \"\\n\"));\n }\n\n // Get the name info that the cname points to\n list($status, $rows, $ptr) = ona_get_dns_record(array('id' => $dnsrecord['dns_id']), '');\n\n // set the ptr zone type for IPv6 records\n $arpatype = (strpos($interface['ip_addr_text'],':') ? 'ip6' : 'in-addr');\n\n // If this is a delegation domain, find the subnet cidr\n if ($ptrdelegation) {\n list($status, $rows, $subnet) = ona_get_subnet_record(array('id' => $interface['subnet_id']));\n\n $ip_last = ip_mangle($interface['ip_addr'],'flip');\n $ip_last_digit = substr($ip_last, 0, strpos($ip_last,'.'));\n $ip_remainder = substr($ip_last, strpos($ip_last,'.')).\".${arpatype}.arpa.\";\n $text .= sprintf(\"%-50s %-8s IN %-8s %s.%-30s %s\\n\" ,$ip_last_digit.'-'.ip_mangle($subnet['ip_mask'],'cidr').$ip_remainder,$dnsrecord['ttl'],$dnsrecord['type'],$ptr['name'],$ptr['domain_fqdn'].'.',$dnsrecord['notes']);\n } else {\n $text .= sprintf(\"%-50s %-8s IN %-8s %s.%-30s %s\\n\" ,ip_mangle($interface['ip_addr'],'flip').\".${arpatype}.arpa.\",$dnsrecord['ttl'],$dnsrecord['type'],$ptr['name'],$ptr['domain_fqdn'].'.',$dnsrecord['notes']);\n }\n }\n\n if ($dnsrecord['type'] == 'CNAME') {\n // Find the interface record\n list($status, $rows, $interface) = ona_get_interface_record(array('id' => $dnsrecord['interface_id']));\n if ($status or !$rows) {\n printmsg(\"ERROR => Unable to find interface record!\",3);\n $self['error'] = \"ERROR => Unable to find interface record!\";\n return(array(5, $self['error'] . \"\\n\"));\n }\n\n // Get the name info that the cname points to\n list($status, $rows, $cname) = ona_get_dns_record(array('id' => $dnsrecord['dns_id']), '');\n\n $fqdn = $dnsrecord['name'].$domain['fqdn'];\n $text .= sprintf(\"%-50s %-8s IN %-8s %s.%-30s %s\\n\" ,$fqdn.'.',$dnsrecord['ttl'],$dnsrecord['type'],$cname['name'],$cname['domain_fqdn'].'.',$dnsrecord['notes']);\n }\n\n if ($dnsrecord['type'] == 'NS') {\n // Find the interface record\n list($status, $rows, $interface) = ona_get_interface_record(array('id' => $dnsrecord['interface_id']));\n if ($status or !$rows) {\n printmsg(\"ERROR => Unable to find interface record!\",3);\n $self['error'] = \"ERROR => Unable to find interface record!\";\n return(array(5, $self['error'] . \"\\n\"));\n }\n\n // Get the name info that the cname points to\n list($status, $rows, $ns) = ona_get_dns_record(array('id' => $dnsrecord['dns_id']), '');\n\n $text .= sprintf(\"%-50s %-8s IN %-8s %s.%-30s %s\\n\" ,$domain['fqdn'].'.',$dnsrecord['ttl'],$dnsrecord['type'],$ns['name'],$ns['domain_fqdn'].'.',$dnsrecord['notes']);\n }\n\n if ($dnsrecord['type'] == 'MX') {\n // Find the interface record\n list($status, $rows, $interface) = ona_get_interface_record(array('id' => $dnsrecord['interface_id']));\n if ($status or !$rows) {\n printmsg(\"ERROR => Unable to find interface record!\",3);\n $self['error'] = \"ERROR => Unable to find interface record!\";\n return(array(5, $self['error'] . \"\\n\"));\n }\n\n // Get the name info that the cname points to\n list($status, $rows, $mx) = ona_get_dns_record(array('id' => $dnsrecord['dns_id']), '');\n\n if ($dnsrecord['name']) {\n $name = $dnsrecord['name'].$domain['fqdn'];\n }\n else {\n $name = $domain['name'];\n }\n $text .= sprintf(\"%-50s %-8s IN %s %-5s %s.%-30s %s\\n\" ,$name.'.',$dnsrecord['ttl'],$dnsrecord['type'],$dnsrecord['mx_preference'],$mx['name'],$mx['domain_fqdn'].'.',$dnsrecord['notes']);\n }\n\n if ($dnsrecord['type'] == 'SRV') {\n // Find the interface record\n list($status, $rows, $interface) = ona_get_interface_record(array('id' => $dnsrecord['interface_id']));\n if ($status or !$rows) {\n printmsg(\"ERROR => Unable to find interface record!\",3);\n $self['error'] = \"ERROR => Unable to find interface record!\";\n return(array(5, $self['error'] . \"\\n\"));\n }\n\n // Get the name info that the cname points to\n list($status, $rows, $srv) = ona_get_dns_record(array('id' => $dnsrecord['dns_id']), '');\n\n if ($dnsrecord['name']) {\n $name = $dnsrecord['name'].$domain['fqdn'];\n }\n else {\n $name = $domain['name'];\n }\n $text .= sprintf(\"%-50s %-8s IN %s %s %s %-8s %-30s %s\\n\" ,$name.'.',$dnsrecord['ttl'],$dnsrecord['type'],$dnsrecord['srv_pri'],$dnsrecord['srv_weight'],$dnsrecord['srv_port'],$srv['fqdn'].'.',$dnsrecord['notes']);\n }\n\n if ($dnsrecord['type'] == 'TXT') {\n $fqdn = $dnsrecord['name'].$domain['fqdn'];\n $text .= sprintf(\"%-50s %-8s IN %-8s %-30s %s\\n\" ,$fqdn.'.',$dnsrecord['ttl'],$dnsrecord['type'],'\"'.$dnsrecord['txt'].'\"',$dnsrecord['notes']);\n }\n }\n\n\n\n\n\n\n\n////////////// Footer stuff //////////////////\n\n // MP: FIXME: For now I\"m not using this.. bind errors out if the file doesnt exist. need a deterministic way to do this. \n // Allow for a local footer include.. I expect this to rarely be used\n// $text .= \"\\n; Allow for a local footer include.. I expect this to rarely be used.\\n\";\n// $text .= \"\\$INCLUDE named-{$domain['fqdn']}-footer\\n\";\n\n\n\n\n // Return the zone file\n return(array(0, $text));\n\n\n}", "title": "" }, { "docid": "12900bc89d23aec7d950c48371307cd9", "score": "0.6239397", "text": "function build_bind_conf($options=\"\") {\n\n // The important globals\n global $conf, $self, $onadb;\n\n // Version - UPDATE on every edit!\n $version = '1.51';\n\n printmsg(\"DEBUG => build_bind_conf({$options}) called\", 3);\n\n // Parse incoming options string to an array\n $options = parse_options($options);\n\n // Return the usage summary if we need to\n if ($options['help'] or !($options['server'] and $options['path'])) {\n // NOTE: Help message lines should not exceed 80 characters for proper display on a console\n $self['error'] = 'ERROR => Insufficient parameters';\n return(array(1,\n<<<EOF\n\nbuild_bind_conf-v{$version}\nBuilds a named.conf for a dns server from the database (bind 8+)\n\n Synopsis: build_bind_conf [KEY=VALUE] ...\n\n Required:\n server=NAME[.DOMAIN] or ID Build conf by server name or ID\n path=STRING Absolute prefix path for local zone files\n\n Notes:\n * Specified host must be a valid DNS server\n * Paths are absolute but MUST NOT contain a leading /, this will be added.\n\\n\nEOF\n\n ));\n }\n\n\n // NOTE: the whole path absolute thing with no leading slash is confusing I know\n // the problem here is that DCM.pl tries to load the contents of the path you pass in\n // as a file and will always return blank for path. this is a work around for now\n // until dcm gets fixed. Maybe fix it by checking if it is a DIR or a FILE.\n\n\n\n\n // Determine the hostname and domain to be used --\n // i.e. add the default domain, or find the part of the host provided\n // that will be used as the \"zone\" or \"domain\". This means testing many\n // zone name's against the DB to see what's valid.\n list($status, $rows, $shost) = ona_find_host($options['server']);\n printmsg(\"DEBUG => build_bind_conf() server record: {$domain['server']}\", 3);\n if (!$shost['id']) {\n printmsg(\"DEBUG => Unknown server record: {$options['server']}\",3);\n $self['error'] = \"ERROR => Unknown server record: {$options['server']}\";\n return(array(3, $self['error'] . \"\\n\"));\n }\n\n // For the given server id. find all domains for that server\n list($status, $rows, $records) = db_get_records($onadb, 'dns_server_domains', array('host_id' => $shost['id']), '');\n\n\n // Start building the named.conf - save it in $text\n $text = \"# Named.conf file for {$shost['fqdn']} built on \" . date($conf['date_format']) . \"\\n\";\n $text .= \"# TOTAL DOMAINS (count={$rows})\\n\\n\";\n\n////////////// Header stuff //////////////////\n\n // Allow for a local header include.. I expect this to rarely be used\n // MP: it is probably best to let the user set up all their own stuff and just include the resulting config\n // file in whatever their own config is. SOOO no need for this\n// $text .= \"; Allow for a local header include.. I expect this to rarely be used.\\n\";\n// $text .= \"include \\\"/etc/named.conf-header\\\";\\n\\n\";\n\n\n////////////// End Header stuff //////////////////\n\n foreach ($records as $sdomain) {\n list($status, $rows, $domain) = ona_get_domain_record(array('id' => $sdomain['domain_id']));\n // what is the role for this server.\n switch (strtolower($sdomain['role'])) {\n case \"forward\":\n //TODO: fixme.. this needs IPs like slaves do.. no file\n $text .= \"zone \\\"{$domain['fqdn']}\\\" in {\\n type forward;\\n file \\\"/{$options['path']}/named-{$domain['fqdn']}\\\";}\\n\";\n break;\n case \"master\":\n $text .= \"zone \\\"{$domain['fqdn']}\\\" in {\\n type master;\\n file \\\"/{$options['path']}/named-{$domain['fqdn']}\\\";\\n};\\n\\n\";\n break;\n\n case \"slave\":\n\n // get the IP addresses for the master domain servers for this domain\n list($status, $rows, $records) = db_get_records($onadb, 'dns_server_domains', array('domain_id' => $domain['id'], 'role' => 'master'), '');\n\n // TODO: if there are no rows then bail\n // TODO: look for static master list stored in DB and append it to the list.\n\n $text .= \"zone \\\"{$domain['fqdn']}\\\" in {\\n type slave;\\n file \\\"/{$options['path']}/named-{$domain['fqdn']}\\\";\\n masterfile-format text;\\n\";\n // Print the master statement\n $text .= \" masters { \";\n foreach ($records as $master ) {\n // Lookup a bunch of crap.. this should be done better.\n list($status, $rows, $rec) = ona_get_host_record(array('id' => $master['host_id']));\n list($status, $rows, $rec) = ona_get_dns_record(array('id' => $rec['primary_dns_id']));\n list($status, $rows, $rec) = ona_get_interface_record(array('id' => $rec['interface_id']));\n $text .= $rec['ip_addr_text'].\"; \";\n }\n $text .= \"};\\n\";\n $text .= \"};\\n\\n\";\n break;\n\n default:\n $text .= \"# {$domain['name']} has an invalid value for the column ROLE.\\n\";\n break;\n\n }\n }\n\n\n // Return the config file\n return(array(0, $text));\n\n}", "title": "" }, { "docid": "d074197e94b844500bea3a133d5a50fa", "score": "0.57195234", "text": "function onlineserver_GetNameservers($params)\n{\n // user defined configuration values\n $url = $params['Url'];\n $username = $params['Username'];\n $password = $params['Password'];\n\n // domain parameters\n $sld = $params['sld'];\n $tld = $params['tld'];\n $registrationPeriod = $params['regperiod'];\n\n // Build post data\n $postfields=[\n 'username'=>$username,\n 'password'=>$password,\n 'data'=>[\n 'domain'=> [\n 'name' => $sld,\n 'extension' => $tld\n ]\n ]\n ];\n\n try {\n $api = new ApiClient();\n $api->call('GetNameservers', $postfields);\n\n //var_dump($api->results);\n return array(\n 'success' => true,\n 'ns1' => $api->results[0]['name'],\n 'ns2' => $api->results[1]['name'],\n 'ns3' => $api->results[2]['name'],\n 'ns4' => $api->results[3]['name'],\n 'ns5' => $api->results[4]['name'],\n );\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n}", "title": "" }, { "docid": "a9ac43e24f7f759f46b7157c2ff57dc0", "score": "0.5676879", "text": "public static function getServerList($counter = 0)\n\t{\n\t\t// do the call\n\t\t$responseString = self::doCall('getServerList', array(), self::$serverHost, $counter);\n\n\t\t// validate\n\t\tif(!isset($responseString->params->param->value->array->data->value)) throw new Exception('Invalid response in getServerList.');\n\n\t\t// loop servers and add them\n\t\tforeach ($responseString->params->param->value->array->data->value as $server) self::$serverList[] = (string) $server->string;\n\n\t\tif(count(self::$serverList) == 0) self::$serverList = array('http://xmlrpc3.mollom.com', 'http://xmlrpc2.mollom.com', 'http://xmlrpc1.mollom.com');\n\n\t\t// return\n\t\treturn self::$serverList;\n\t}", "title": "" }, { "docid": "68104ca2290c1ee0e260d86baaff5775", "score": "0.56470704", "text": "function isFormOk() {\n\tglobal $_GET, $NSpaces;\n\tif ((!isset($_GET['ldaphost']))||($_GET['ldaphost']==\"\"))\n\t\terrorAndOut(\"Please type in a ldap-host.\");\n\n\t$i=1;\n\t$servers[$i]['name'] = $_GET['ldaphost'];\n\t$servers[$i]['host'] = $_GET['ldaphost'];\n\t$servers[$i]['base'] = $_GET['ldapbase'];\n\t$servers[$i]['port'] = 389;\n\t$servers[$i]['auth_type'] = 'config';\n\n\tif ((isset($_GET['ldapuser']))&&($_GET['ldapuser']!=\"\")) {\n\t\t$servers[$i]['login_dn'] = $_GET['ldapuser'];\n\t\tif (!isset($_GET['ldappassword']))\n\t\t\terrorAndOut(\"Cant use a user without pass. please type in pass too.\");\n\t\telse\n\t\t\t$servers[$i]['login_pass'] = $_GET['ldappassword'];\n\t}\n\telse {\n\t\t$servers[$i]['login_dn'] = null;\n\t\t$servers[$i]['login_pass'] = null;\n\t}\n\n\t$servers[$i]['tls'] = false;\n\t$servers[$i]['low_bandwidth'] = false;\n\t$servers[$i]['default_hash'] = 'crypt';\n\t$servers[$i]['login_attr'] = 'dn';\n\t$servers[$i]['login_class'] = '';\n\t$servers[$i]['read_only'] = true;\n\t$servers[$i]['show_create'] = true;\n\t$servers[$i]['enable_auto_uid_numbers'] = false;\n\t$servers[$i]['auto_uid_number_mechanism'] = 'search';\n\t$servers[$i]['auto_uid_number_search_base'] = 'ou=People,dc=example,dc=com';\n\t$servers[$i]['auto_uid_number_min'] = 1000;\n\t$servers[$i]['auto_uid_number_uid_pool_dn'] = 'cn=uidPool,dc=example,dc=com';\n\t$servers[$i]['unique_attrs_dn'] = '';\n\t$servers[$i]['unique_attrs_dn_pass'] = '';\n\n\treturn $servers;\n}", "title": "" }, { "docid": "9b451a294eb1eed649fff679fd101d16", "score": "0.561864", "text": "function stregistry_GetNameservers($params) \n{\n\t// init connection\n\tif (($status = __initConnectionAndAuthorize($params)) !== true) {\n\t\treturn __errorArray($status);\n\t}\n\n\t// fetch domain\n\t$json = STRegistry::Domains()->query($params['domainname']);\n\tif (!ResponseHelper::isSuccess($json)) {\n\t\treturn __errorArray(ResponseHelper::fromJSON($json)->message);\n\t}\n\t$domain = Domain::fromJSON($json);\n\t\n\t$nameservers = array();\n\t$nsCounter = 1;\n\tforeach ($domain->getNameServers() as $hostname => $ips) {\n\t\tif ($nsCounter > 5) {\n\t\t\tbreak;\n\t\t}\n\t\t$nameservers[sprintf(\"ns%d\", $nsCounter++)] = $hostname;\n\t}\n\n\treturn $nameservers;\n}", "title": "" }, { "docid": "15a4cef7b449dae0fc7dc1ee15db4443", "score": "0.5484559", "text": "function hostcontrol_GetNameservers($params)\n{\n $api_client = new HostControlAPIClient(HostControlHelper::getApiUrl($params), $params['ApiKey']);\n $domainname = strtolower($params[\"sld\"] . \".\" . $params[\"tld\"]);\n\n try\n {\n $nameservers = $api_client->domain->getNameservers($domainname);\n }\n catch(HostControlAPIClientError $e)\n {\n HostControlHelper::debugLog($params, 'domain-getnameservers', array($domainname), $e);\n return array('error' => \"Could not get nameservers for \" . $domainname);\n }\n\n $ns = 1;\n $domain_data = array();\n foreach($nameservers as $nameserver)\n {\n if(! empty($nameserver->hostname))\n {\n $domain_data[\"ns\" . $ns] = $nameserver->hostname;\n $ns++;\n }\n }\n\n return $domain_data;\n}", "title": "" }, { "docid": "9b342793e6de0e8f6aa4dfdb248d5282", "score": "0.5415414", "text": "function _mollom_retrieve_server_list() {\r\n\t// hard coded list cfr API documentation, section 9\r\n\t$servers = array(\r\n\t\t\t\t'http://xmlrpc1.mollom.com/',\r\n\t\t\t\t'http://xmlrpc2.mollom.com/',\r\n\t\t\t\t'http://xmlrpc3.mollom.com/'\r\n\t\t\t);\r\n\t\r\n\t$user_agent = MOLLOM_USER_AGENT;\r\n\t\r\n\tforeach($servers as $server) {\r\n\t\t$mollom_client = new IXR_Client($server . MOLLOM_API_VERSION);\r\n\t\t$mollom_client->useragent = $user_agent;\r\n\t\t\r\n\t\tif(!$mollom_client->query('mollom.getServerList', _mollom_authenticate())) {\r\n\t\t\t// Something went wrong! Let's try the next one in the list\r\n\t\t} else {\r\n\t\t\t$servers = $mollom_client->getResponse();\r\n\t\t\tupdate_option('mollom_servers', implode('#', $servers));\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$mollom_error = new WP_Error();\r\n\t$mollom_error->add($mollom_client->getErrorCode(), $mollom_client->getErrorMessage());\r\n\treturn $mollom_error;\r\n}", "title": "" }, { "docid": "4818af2182cea4e3773b61b0d035669b", "score": "0.53522503", "text": "function __construct($ldap_server_type,$base_dn,$ldap_server_host_or_url,$ldap_server_port = null)\n\t{\n\t\tglobal $ldap_server_list;\n\n\t\t$ldap_server_list[] = &$this;\n\t\t$this->server_id = count($ldap_server_list)-1;\n\n\t\t// function may be missing if PHP's LDAP module not available - this will be\n\t\t// reported to the user via a subsequent call to prereq_components_ok()\n\t\tif(function_exists(\"ldap_connect\"))\n\t\t\tif(is_null($ldap_server_port))\n\t\t\t\t$this->connection = ldap_connect($ldap_server_host_or_url);\n\t\t\telse\n\t\t\t\t$this->connection = ldap_connect($ldap_server_host_or_url,\n\t\t\t\t\t$ldap_server_port);\n\n\t\t$this->server_type = $ldap_server_type;\n\t\t$this->base_dn = $base_dn;\n\t\t$this->host_or_url = $ldap_server_host_or_url;\n\t\t$this->add_allowed_dn($base_dn);\n\n\t\t$schema_list = \"\";\n\t\tforeach($this->server_types as $server_type)\n\t\t{\n\t\t\tif($server_type[\"name\"] == $this->server_type)\n\t\t\t{\n\t\t\t\t$this->default_create_class = $server_type[\"default_create_class\"];\n\t\t\t\t$schema_list = $server_type[\"schema_list\"];\n\t\t\t\tif(isset($server_type[\"dn_search_filter\"]))\n\t\t\t\t\t$this->dn_search_filter = $server_type[\"dn_search_filter\"];\n\t\t\t\tif(isset($server_type[\"compare_dn_supported\"]))\n\t\t\t\t\t$this->compare_dn_supported = $server_type[\"compare_dn_supported\"];\n\t\t\t}\n\t\t}\n\t\t$schema_list = explode(\",\",$schema_list);\n\n\t\tforeach($schema_list as $schema)\n\t\t\t$this->add_schema($schema);\n\t}", "title": "" }, { "docid": "7a31c0dbf6f2799cc8a1b4849d3b4097", "score": "0.5344757", "text": "function onlineserver_RegisterDomain($params)\n{\n // user defined configuration values\n $url = $params['Url'];\n $username = $params['Username'];\n $password = $params['Password'];\n\n\n // registration parameters\n $sld = $params['sld'];\n $tld = $params['tld'];\n $registrationPeriod = $params['regperiod'];\n\n /**\n * Nameservers.\n *\n * If purchased with web hosting, values will be taken from the\n * assigned web hosting server. Otherwise uses the values specified\n * during the order process.\n */\n $nameserver1 = $params['ns1'];\n $nameserver2 = $params['ns2'];\n $nameserver3 = $params['ns3'];\n $nameserver4 = $params['ns4'];\n $nameserver5 = $params['ns5'];\n\n $params[\"address1\"]=validate($params[\"address1\"]);\n $params[\"address2\"]=validate($params[\"address2\"]);\n $params[\"city\"]=validate($params[\"city\"]);\n $params[\"state\"]=validate($params[\"state\"]);\n\n\n $firstName = translate($params[\"firstname\"]) ;\n $lastName = translate($params[\"lastname\"]);\n $fullName = translate($params[\"fullname\"]); // First name and last name combined\n $companyName = translate($params[\"companyname\"]);\n $email = $params[\"email\"];\n $address1 = translate($params[\"address1\"]);\n $address2 = translate($params[\"address2\"]);\n $city = translate($params[\"city\"]);\n $state = translate($params[\"state\"]); // eg. TX\n $stateFullName =translate($params[\"fullstate\"]);// eg. Texas\n $postcode = $params[\"postcode\"]; // Postcode/Zip code\n $countryCode = $params[\"countrycode\"]; // eg. GB\n $countryName = translate($params[\"countryname\"]); // eg. United Kingdom\n $phoneNumber = $params[\"phonenumber\"]; // Phone number as the user provided it\n $phoneCountryCode = $params[\"phonecc\"]; // Country code determined based on country\n $phoneNumberFormatted = $params[\"fullphonenumber\"]; // Format: +CC.xxxxxxxxxxxx\n\n\n // domain addon purchase status\n $enableDnsManagement = (bool) $params['dnsmanagement'];\n $enableEmailForwarding = (bool) $params['emailforwarding'];\n $enableIdProtection = (bool) $params['idprotection'];\n\n /**\n * Premium domain parameters.\n *\n * Premium domains enabled informs you if the admin user has enabled\n * the selling of premium domain names. If this domain is a premium name,\n * `premiumCost` will contain the cost price retrieved at the time of\n * the order being placed. The premium order should only be processed\n * if the cost price now matches the previously fetched amount.\n */\n $premiumDomainsEnabled = (bool) $params['premiumEnabled'];\n $premiumDomainsCost = $params['premiumCost'];\n\n // Build Phone Number\n $pos = strpos($phoneNumberFormatted, '.');\n $countryCode2 = substr($phoneNumberFormatted, 0, $pos);\n $areaCode = substr($phoneNumberFormatted, $pos + 1, 3);\n $phoneNumber = substr($phoneNumberFormatted, $pos + 1 + 3);\n\n\n\n // Build post data\n $initials = substr($firstName, 0, 1) . '.' . substr($lastName, 0, 1);\n $postfields=[\n 'username'=>$username,\n 'password'=>$password,\n 'data'=>[\n 'owner'=>[\n 'companyName'=>$companyName,\n 'name'=>[\n 'initials' => $initials,\n 'firstName' => $firstName,\n 'lastName' => $lastName\n ],\n 'gender'=>'m',\n \"phone\"=>[\n 'countryCode' => $countryCode2,\n 'areaCode' => $areaCode,\n 'subscriberNumber'=> $phoneNumber\n ],\n 'address' => [\n 'street' => $address1,\n 'number' => \"1\",\n 'zipcode' => $postcode,\n 'city' => $city,\n 'country' => $countryCode\n ],\n \"email\" => $email,\n ],\n 'domain'=> [\n 'name' => $sld,\n 'extension' => $tld\n ],\n 'nameserver'=>[\n [\n 'name'=>$nameserver1\n ],\n [\n 'name'=>$nameserver2\n ],\n [\n 'name'=>$nameserver3\n ],\n [\n 'name'=>$nameserver4\n ],\n [\n 'name'=>$nameserver5\n ]\n ],\n 'additionalData'=>$params['additionalfields'],\n 'idprotection'=>$enableIdProtection,\n ]\n ];\n\n\n if ($premiumDomainsEnabled && $premiumDomainsCost) {\n $postfields['accepted_premium_cost'] = $premiumDomainsCost;\n }\n\n try {\n $api = new ApiClient();\n $api->call('registerDomain', $postfields);\n modifyDomain($params);\n return array(\n 'success' => true,\n );\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n}", "title": "" }, { "docid": "b7f903befa2bc4345388886889e8cf49", "score": "0.5341706", "text": "function CLCFG_resolvConf($DNSServers)\n{\n\t$nameserver=\"\";\n\n\n\tfor ($i=0; $i < count($DNSServers); $i++)\n\t\t{\n\t\t\tif (strlen($DNSServers[$i]) > 0)\n\t\t\t\t$nameserver.=\"nameserver \".$DNSServers[$i].\"\\n\";\n\t\t};\n\n\t//Don't write an empty resolv.conf\n\tif (strlen($nameserver) == 0)\n\t\treturn(false);\n\n\techo(\"\nrm /etc/resolv.conf 2> /dev/null\n\ncat >> /etc/resolv.conf << \\\"EOF\\\"\n$nameserver\nEOF\n\nif test -f /etc/resolv.conf\nthen\n\t\".sendClientLogStatus(\"/etc/resolv.conf was written\",true).\"\nelse\n\t\".sendClientLogStatus(\"/etc/resolv.conf was written\",false,true).\"\nfi\\n\n\n\");\n}", "title": "" }, { "docid": "605aefb4c7ec7b3e27d9dfa786c7f036", "score": "0.5339887", "text": "function nordname_GetNameservers($params) {\n // user defined configuration values\n $apiKey = $params['api_key'];\n $sandbox = ($params['sandbox'] == \"on\") ? true : false;\n\n // registration parameters\n $sld = idn_to_ascii($params[\"original\"][\"sld\"]);\n $tld = $params['tld'];\n // Build post data\n $getfields = array(\n 'api_key' => $apiKey\n );\n\n try {\n $api = new ApiClient();\n $reply = $api->call(\"GET\", \"domain/\" . $sld . '.' . $tld, $getfields,\"\", $sandbox);\n return array(\n 'ns1' => $reply[\"nameservers\"][0],\n 'ns2' => $reply[\"nameservers\"][1],\n 'ns3' => $reply[\"nameservers\"][2],\n 'ns4' => $reply[\"nameservers\"][3],\n 'ns5' => $reply[\"nameservers\"][4],\n );\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n}", "title": "" }, { "docid": "8ace379fabb9eff0b5ef303857ad722f", "score": "0.53053385", "text": "public function getList(array $options = null)\n {\n $gandi = $this->gandi->getProxy('domain');\n \n $result = $gandi->list($this->api_key, $options);\n \n $data = array();\n \n foreach($result as $current) {\n \n $domain = new Domain($current['fqdn']);\n $domain->setId($current['id']);\n \n $data[] = $domain;\n }\n \n return $data;\n }", "title": "" }, { "docid": "29f7e1630fd6e20cd2109f0df843d7ee", "score": "0.53028595", "text": "function _inject_bind_options( $options ) {\n\t\tforeach( $options as $option ) {\n\t\t\tldap_set_option( $this->_connectionID, $option[\"OPTION_NAME\"], $option[\"OPTION_VALUE\"] )\n\t\t\t\tor die( \"Unable to set server option: \" . $option[\"OPTION_NAME\"] );\n\t\t}\n\t}", "title": "" }, { "docid": "47ad43e960746c41db5baccf08d81942", "score": "0.5295797", "text": "function serverList() {\n\t\t$list = array();\n\t\n\t\t$link = Db::link();\n\t\t$sql = 'SELECT server.server_id, server_name, server_address,\n\t\t server_description, v.nb, server_key, server_port\n\t\t FROM server\n\t\t LEFT JOIN (SELECT server_id, count(server_id) as nb\n\t\t FROM vps GROUP BY server_id) v\n\t\t ON v.server_id=server.server_id';\n\t\t$res = $link->query($sql);\n\t\twhile($do = $res->fetch(PDO::FETCH_OBJ)) {\n\t\t\tif(empty($do->nb)) {\n\t\t\t\t$do->nb = 0;\n\t\t\t}\n\t\t\t$list[$do->server_id] = array(\n\t\t\t\t\t'id' => $do->server_id,\n\t\t\t\t\t'name' => $do->server_name,\n\t\t\t\t\t'address' => $do->server_address,\n\t\t\t\t\t'port' => $do->server_port,\n\t\t\t\t\t'description' => $do->server_description,\n\t\t\t\t\t'nbvps' => $do->nb,\n\t\t\t\t\t'key' => $do->server_key\n\t\t\t);\n\t\t}\n\t\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "23b910616edffeed1249af495b280a36", "score": "0.5272095", "text": "function drush_search_api_server_list() {\n /** @var \\Drupal\\search_api\\ServerInterface[] $servers */\n $servers = Server::loadMultiple();\n if (empty($servers)) {\n drush_print(dt('There are no servers present.'));\n return;\n }\n $rows[] = [\n dt('ID'),\n dt('Name'),\n dt('Status'),\n ];\n\n foreach ($servers as $server) {\n $rows[] = [\n $server->id(),\n $server->label(),\n $server->status() ? dt('enabled') : dt('disabled'),\n ];\n }\n\n drush_print_table($rows);\n}", "title": "" }, { "docid": "230f8fb3a2de1c070982559c6c76b265", "score": "0.526421", "text": "function onlineserver_GetDNS($params)\n{\n\n // user defined configuration values\n $url = $params['Url'];\n $username = $params['Username'];\n $password = $params['Password'];\n\n // domain parameters\n $sld = $params['sld'];\n $tld = $params['tld'];\n\n // Build post data\n $postfields=[\n 'username'=>$username,\n 'password'=>$password,\n 'data'=>[\n 'domain'=>[\n 'name'=>$sld,\n 'extension'=>$tld\n ],\n ]\n ];\n\n try {\n $api = new ApiClient();\n $api->call('retrieveZoneDnsRequest', $postfields);\n\n // var_dump($api->results);\n $hostRecords = array();\n foreach ($api->results as $record) {\n $hostRecords[] = [\n \"hostname\" => $record['hostname'], // eg. www\n \"type\" => $record['type'], // eg. A\n \"address\" => $record['address'], // eg. 10.0.0.1\n \"priority\" => $record['priority'], // eg. 10 (N/A for non-MX records)\n ];\n }\n //var_dump($hostRecords);\n return $hostRecords;\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n}", "title": "" }, { "docid": "024fea130774754d3a809d6c00d3a8f5", "score": "0.5247009", "text": "public function describe_domains($opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t\t\t\n\t\t// Optional list (non-map)\n\t\tif (isset($opt['DomainNames']))\n\t\t{\n\t\t\t$opt = array_merge($opt, CFComplexType::map(array(\n\t\t\t\t'DomainNames' => (is_array($opt['DomainNames']) ? $opt['DomainNames'] : array($opt['DomainNames']))\n\t\t\t), 'member'));\n\t\t\tunset($opt['DomainNames']);\n\t\t}\n\n\t\treturn $this->authenticate('DescribeDomains', $opt);\n\t}", "title": "" }, { "docid": "0d46989f6a4d31423ebd815b84bd0db1", "score": "0.51986575", "text": "function GetServerListing () {\n $statement = \"\n SELECT DISTINCT(Server) FROM $this->TableName;\n \";\n $this->Query ($statement);\n \n while ($this->FetchArray()) {\n \t$return[$this->Server] = $this->Server;\n } // while\n \n // If update.appleseedproject.org isn't listed, add it to the list.\n if (!in_array('update.appleseedproject.org', $return)) $return['update.appleseedproject.org'] = 'update.appleseedproject.org';\n \n ksort ($return);\n \n return ($return);\n \t}", "title": "" }, { "docid": "2408d98ad80697dc7e337103e7db1d7a", "score": "0.51964283", "text": "private function getDomainData() {\n\t\t$api = pm_ApiRpc::getService();\n\t\t$request = <<<DATA\n<webspace>\n\t<get>\n\t\t<filter/>\n\t\t<dataset>\n\t\t\t<gen_info/>\n\t\t\t<hosting-basic/>\n\t\t</dataset>\n\t</get>\n</webspace>\nDATA;\n\n\t\t$resp = $api->call($request);\n\n\t\t$data = array();\n\t\tforeach ($resp->webspace->get->result as $host) {\n\t\t\t$dom = rtrim((string) $host->data->gen_info->name,\"/\");\n\t\t\tforeach ($host->data->hosting->vrt_hst->property as $prop) {\n\t\t\t\tif ($prop->name == 'www_root') {\n\t\t\t\t\t$dir = (string) $prop->value;\n\t\t\t\t\tarray_push($data, [$dom => $dir]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$string = file_get_contents(pm_Context::getVarDir() . '/agent.conf');\n\t\t$config = json_decode($string, true);\n\n\n\n\t\tif (isset($_POST['submitted'])) {\n\n\t\t\t//todo: check domain\n\t\t\t//if returns true add to config\n\t\t\t$domainsAdd = array();\n\t\t\t$domains = $this->buildDomainArray($_POST['active']);\n\t\t\trequire_once pm_Context::getPlibDir() . '/library/lib/Nimbusec.php';\n\t\t\t$nimbusec = new Modules_NimbusecAgentIntegration_Lib_Nimbusec();\n\t\t\t$err = false;\n\t\t\tforeach ($domains as $do => $di) {\n\t\t\t\ttry {\n\t\t\t\t\tif ($nimbusec->checkDomain($do, $_POST['bundle'])) {\n\t\t\t\t\t\t$domainsAdd[$do] = $di;\n\t\t\t\t\t}\n\t\t\t\t} catch (NimbusecException $e) {\n\t\t\t\t\tif (!strpos($e->getMessage(), '409')) {\n\t\t\t\t\t\t$err = true;\n\t\t\t\t\t\t$this->_status->addError($e->getMessage());\n\t\t\t\t\t}\n\t\t\t\t} catch (CUrlException $e) {\n\t\t\t\t\t\n\t\t\t\t\tif (strpos($e->getMessage(), '401') || strpos($e->getMessage(), '403')) {\n\t\t\t\t\t\t$err = true;\n\t\t\t\t\t\t$this->_status->addError(pm_Locale::lmsg('invalidAPICredentials'));\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif (strpos($e->getMessage(), '404')) {\n\t\t\t\t\t\t$err = true;\n\t\t\t\t\t\t$this->_status->addError(pm_Locale::lmsg('invalidAgentVersion'));\n\t\t\t\t\t}\n\t\t\t\t\tif (strpos($e->getMessage(), '409')) {\n\t\t\t\t\t\t//$err = true;\n\t\t\t\t\t\t$this->_status->addError('Domain '.$do.' is known on your account but seems to be disabled. Please add it to a bundle in order to allow enabling it for the agent');\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t$this->_status->addError($e->getMessage());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (!$err) {\n\t\t\t\t$config['domains'] = $domainsAdd;\n\n\t\t\t\tfile_put_contents(pm_Context::getVarDir() . '/agent.conf', json_encode($config, JSON_UNESCAPED_SLASHES));\n\t\t\t\t//$this->_status->addMessage('info', pm_Locale::lmsg('savedMessage'));\n\t\t\t\t$this->view->submitted=true;\n\t\t\t\t$this->view->infomsg=pm_Locale::lmsg('savedMessage');\n\t\t\t}\n\t\t\t\n\t\t\t//$this->_helper->json(array('redirect' => pm_Context::getActionUrl('index', 'domains')));\n\t\t}\n\t\t$d = $this->getListData($data, $config);\n\n\n\t\t$list = new pm_View_List_Simple($this->view, $this->_request);\n\t\t$list->setData($d);\n\t\t$list->setColumns(array(\n\t\t\t'column1' => array(\n\t\t\t\t'title' => '<input type=\"checkbox\" name=\"act\" onclick=\"updateState()\" id=\"act\"> Add/Remove Domain',\n\t\t\t\t'noEscape' => true,\n\t\t\t\t'sortable' => false,\n\t\t\t),\n\t\t\t'column2' => array(\n\t\t\t\t'title' => 'Domain',\n\t\t\t\t'noEscape' => true,\n\t\t\t\t'searchable' => true,\n\t\t\t),\n\t\t\t'column3' => array(\n\t\t\t\t'title' => pm_Locale::lmsg('directory'),\n\t\t\t\t'noEscape' => true,\n\t\t\t),\n\t\t));\n\n\t\t$list->setDataUrl(array('action' => 'list-data'));\n\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "5077c549768c3ff48d6d5378370f432d", "score": "0.51775163", "text": "function wfs_domain_list(){\n\tglobal $wfs_userid;\n\tglobal $wfs_public_key;\n\tglobal $wfs_private_key;\n\tglobal $wfs_usertype;\n\tglobal $wp_wfs_configure_table;\n\tglobal $wpdb;\n\t$output = \"\";\n\t$pid = $_POST['pid'];\n\t$data = $wpdb->get_row( $wpdb->prepare(\"SELECT * FROM \".$wp_wfs_configure_table.\" WHERE wfs_configure_id = %d \",$pid));\n\t$pageStart = 0;\n\n\t//fetchin xml data from fonts\n\t$apiurl = \"xml/Domains/?wfspstart=\".$pageStart.\"&wfsplimit=\".DOMAIN_LIMIT.\"&wfspid=\".$data->project_key;\n\t$wfs_api = new Services_WFS($wfs_public_key,$wfs_private_key,$apiurl);\n\t$xmlUrl = $wfs_api->addDomain($_POST['domainname']);\n\t//creating a DOM object\n\t$doc = new DOMDocument();\n\t$doc->loadXML($xmlUrl);\n\t//fetching XML data\n\t$count = 1;\n\t$messages = $doc->getElementsByTagName( \"Message\" );\n\t$message = $messages->item(0)->nodeValue;\n\tif(strtolower($message)==\"success\"){\n\t\t//fetching XML data\n\t\t$domains = $doc->getElementsByTagName( \"Domain\" );\n\t\t$output.= '<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"widefat\" style=\"margin-top:20px;\" ><tbody>';\n\t\tforeach( $domains as $domain )\n\t\t{\n\t\t\t$domainNames = $domain->getElementsByTagName(\"DomainName\");\t\n\t\t\t$domainName = $domainNames->item(0)->nodeValue;\n\t\t\t\n\t\t\t$domainIDs = $domain->getElementsByTagName(\"DomainID\");\t\n\t\t\t$domainID = $domainIDs->item(0)->nodeValue;\n\t\t\t\n\t\t\t$output.='<tr style=\"height:40px;\">\n\t\t\t\t<td><a href=\"http://'.$domainName.'\" target=\"_blank\">'.$domainName.'</a></td>\n\t\t\t\t<td><a href=\"admin.php?page=wfs_options&func=domain_act&pid='.$pid.'&did='.$domainID.'&dname='.$domainName.'&mode=edit\" >Edit</a>&nbsp;|&nbsp;<a href=\"admin.php?page=wfs_options&func=domain_act&pid='.$pid.'&did='.$domainID.'\" onclick=\"return confirm(\\'Are you sure want to delete selector '.$domainName.'?\\');\" >Remove</a></td>\t\t\t\t\n\t\t\t</tr>';\n\t\t\t$count++;\n\t\t}\n\tif($count == 1){\n\t $output.='<tr style=\"height:40px;\">\n <td colspan=\"4\" align=\"center\">No domain available.</td>\n </tr>';\n\t} \n\t$output.='</tbody></table><div class=\"clear\"></div>';/*<input type=\"submit\" value=\"'._e('Save').'\" name=\"submit\" class=\"button-primary\" />';*/\n\t$status = true;\n\t \n\t$totalrecords = $doc->getElementsByTagName( \"TotalRecords\" );\n\t$totalRecord =$totalrecords->item(0)->nodeValue;\n\t\n\t$pagestarts = $doc->getElementsByTagName( \"PageStart\" );\n\t$pageStart =$pagestarts->item(0)->nodeValue;\n\t\n\t$pagelimits = $doc->getElementsByTagName( \"PageLimit\" );\n\t$pageLimit =$pagelimits->item(0)->nodeValue;\n\t \n\t$contentDiv = $_POST['contentDiv'];\n\t$paginationDiv = $_POST['paginationDiv'];\n\tif($totalRecord!=\"\" && $pageLimit!=\"\" && $count != 1){\n\t\t$wfs_pg = new wfs_pagination($totalRecord,$pageStart,$pageLimit,$contentDiv,$paginationDiv,\"wfs_domain_action_pagination\");\n\t\t$pagination = $wfs_pg->getPagination();\t\n\t\t}\n\t}else{\n\t\t$status = false;\n\t}\n \necho json_encode(array('data'=>$output,'status'=>$status,'errMsg'=>$message,'pagination'=>$pagination));\nexit;\n}", "title": "" }, { "docid": "be6887dd9b50fba8f08bdb2adb5f8ec0", "score": "0.51679915", "text": "private function _getListDomainsResult() {\n $domainList = $this->body->DomainName();\n $domains = array();\n \n foreach( $domainList as $domain ) {\n $domains[] = (string)$domain;\n }\n \n $this->_items = $domains;\n }", "title": "" }, { "docid": "5f4aacc1e54f2c2ba5b72c7f889557a6", "score": "0.5157429", "text": "public function getMailDomains()\n {\n $domains = array();\n $ldap = $this->config->get_ldap_link();\n $ldap->cd($this->config->current['BASE']);\n $ldap->search(\"(&(objectClass=kolab)(k=kolab)(postfix-mydestination=*))\",array(\"postfix-mydestination\"));\n\n if($ldap->count() == 1){\n $attrs = $ldap->fetch();\n for($i=0; $i <$attrs['postfix-mydestination']['count']; $i ++ ){\n $domains[] = $attrs['postfix-mydestination'][$i];\n }\n @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__, \"<b>Found: \".trim(implode($domains,\", \"),\", \").\"</b>\",\n \"Revceiving 'Mail domains for kolab22'.\");\n }elseif($ldap->count() == 0){\n @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__, \"<b>No domains found. Check k=kolab and postfix-mydestination</b>\",\n \"Revceiving 'Mail domains for kolab22'.\");\n }else{\n @DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__, \"<b>Found more than one kolab configuration object. Giving up.</b>\",\n \"Revceiving 'Mail domains for kolab22'.\");\n }\n\n return($domains);\n }", "title": "" }, { "docid": "d6cc0325d21a530fa7dfb7d847cc05fa", "score": "0.5130707", "text": "function sysadmin_get_hostname() {\n\t\tglobal $db;\n\t\t$ret = '';\n\t\t$sql = 'SELECT * FROM sysadmin_options WHERE `key` IN (\"hostname\")';\n\t\t$res = $db->getAll($sql, DB_FETCHMODE_ASSOC);\n\t\tif($db->IsError($res)){\n\t\t\t\tdie_freepbx($res->getDebugInfo());\n\t\t}\n\t\tforeach($res as $r) {\n\t\t\t\t$ret[$r['key']] = $r['value'];\n\t\t}\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "818e17101b84646e36d9824876e18634", "score": "0.5124384", "text": "function drush_apps_server_list() {\n module_load_include('inc', 'apps', 'apps.manifest');\n $servers = apps_servers();\n $rows = array(array(dt('Key'), dt('Name'), dt('desc'), dt('URL')));\n foreach ($servers as $k => $server) {\n $rows[] = array(\n $k,\n $server['title'],\n $server['description'],\n $server['manifest'],\n );\n }\n drush_print_table($rows, TRUE);\n}", "title": "" }, { "docid": "68c2f445aa73546a2fd9c70364d99d44", "score": "0.51184225", "text": "function onlineserver_SaveNameservers($params)\n{\n\n\n // user defined configuration values\n $url = $params['Url'];\n $username = $params['Username'];\n $password = $params['Password'];\n\n // domain parameters\n $sld = $params['sld'];\n $tld = $params['tld'];\n\n // submitted nameserver values\n $nameserver1 = $params['ns1'];\n $nameserver2 = $params['ns2'];\n $nameserver3 = $params['ns3'];\n $nameserver4 = $params['ns4'];\n $nameserver5 = $params['ns5'];\n\n // Build post data\n $postfields=[\n 'username'=>$username,\n 'password'=>$password,\n 'data'=>[\n 'domain'=> [\n 'name' => $sld,\n 'extension' => $tld\n ],\n 'nameServers'=>[\n [ \"name\"=> $nameserver1 ],\n [ \"name\"=> $nameserver2 ],\n [ \"name\"=> $nameserver3 ],\n [ \"name\"=> $nameserver4 ],\n [ \"name\"=> $nameserver5 ],\n ],\n ]\n\n ];\n\n try {\n /*$api = new ApiClient();\n $api->call('SetNameservers', $postfields);*/\n modifyDomain($params);\n return array(\n 'success' => true,\n );\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n}", "title": "" }, { "docid": "d2b4eac1a60ddd1e1cec8a5d6a5c3581", "score": "0.51115227", "text": "function onlineserver_GetDomainSuggestions($params)\n{\n $results = new ResultsList();\n\n return $results;\n}", "title": "" }, { "docid": "439da28a62017a67fd8d3ad2e85ab63d", "score": "0.51058495", "text": "public function getDomainNameServers($domain, $module_row_id = null)\n {\n $row = $this->getModuleRow($module_row_id);\n $api = $this->getApi($row->meta->api_key, $row->meta->password, $row->meta->sandbox);\n\n // Load API command\n $command = new InternetbsDomain($api);\n\n // Search for domain\n $response = $command->list([\n 'searchTermFilter' => $domain,\n 'CompactList' => 'no',\n 'ReturnFields' => 'NSList'\n ]);\n $this->processResponse($api, $response);\n\n $domain_info = $response->response();\n\n // Get current domain\n $current_domain = null;\n if (($domain_info->domaincount ?? 0) == 1) {\n $current_domain = $domain_info->domain[0] ?? (object) [];\n } else {\n foreach ($domain_info->domain as $domain_match) {\n if ($domain_match->name == $domain) {\n $current_domain = $domain_match;\n break;\n }\n }\n }\n\n // Get NS list\n $ns_list = [];\n if (isset($current_domain->nslist)) {\n $ns = explode(',', $current_domain->nslist);\n\n foreach ($ns as $url) {\n $ns_list[] = [\n 'url' => trim($url),\n 'ips' => [gethostbyname(trim($url))]\n ];\n }\n }\n\n return $ns_list;\n }", "title": "" }, { "docid": "eeff1978408280574d874b4fd619d2fa", "score": "0.510141", "text": "function fetch_domains()\n\t{\n\t\tlog_write(\"debug\", \"api_namedmanager\", \"Executing fetch_domains()\");\n\n\n\t\tif ($this->auth_online)\n\t\t{\n\t\t\t$obj_domain = New domain;\n\t\t\t$obj_domain->load_data_all();\n\n\t\t\tif ($obj_domain->data)\n\t\t\t{\n\t\t\t\tforeach ($obj_domain->data as $data)\n\t\t\t\t{\n\t\t\t\t\t// If the domain does not belong to the same group as the name server, skip it.\n\t\t\t\t\tif ($this->auth_group)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!in_array($this->auth_group, $data[\"groups\"]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// add domain to values to be returned\n\t\t\t\t\t$return_tmp\t\t\t\t= array();\n\n\t\t\t\t\t$return_tmp[\"id\"]\t\t\t= $data[\"id\"];\n\t\t\t\t\t$return_tmp[\"domain_name\"]\t\t= $data[\"domain_name\"];\n\t\t\t\t\t$return_tmp[\"domain_description\"]\t= $data[\"domain_description\"];\n\t\t\t\t\t$return_tmp[\"soa_hostmaster\"]\t\t= $data[\"soa_hostmaster\"];\n\t\t\t\t\t$return_tmp[\"soa_serial\"]\t\t= $data[\"soa_serial\"];\n\t\t\t\t\t$return_tmp[\"soa_refresh\"]\t\t= $data[\"soa_refresh\"];\n\t\t\t\t\t$return_tmp[\"soa_retry\"]\t\t= $data[\"soa_retry\"];\n\t\t\t\t\t$return_tmp[\"soa_expire\"]\t\t= $data[\"soa_expire\"];\n\t\t\t\t\t$return_tmp[\"soa_default_ttl\"]\t\t= $data[\"soa_default_ttl\"];\n\n\t\t\t\t\t$return_tmp[\"soa_ns_primary\"]\t\t= sql_get_singlevalue(\"SELECT server_name as value FROM name_servers WHERE server_primary='1' LIMIT 1\");\n\n\t\t\t\t\t$return[]\t= $return_tmp;\n\t\t\t\t}\n\n\t\t\t\treturn $return;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new SoapFault(\"Sender\", \"ACCESS_DENIED\");\n\t\t}\n\n\t}", "title": "" }, { "docid": "40ea0dc31fa8cc463e6841edf03a65e1", "score": "0.50568354", "text": "function checkDomain($params)\n {\n // Calculate the host\n $host = ($params['Use testing server'])? $this->testHost:$this->liveHost;\n\n CE_Lib::log(4, \"Using $host\");\n\n // Start the connection\n $opensrs = new OpenSRS($host, $this->connPort, $params['Username'], $params['Private Key'], $this->logger, $this->user);\n\n // Check if we were passed any additional TLD's\n if(!@$params['namesuggest']) {\n $params['namesuggest'] = array();\n $namesuggest = false;\n }\n\n // Perform the lookup\n $return = $opensrs->lookup_domain(strtolower($params['sld']), strtolower($params['tld']), $params['namesuggest']);\n\n // Check the reply\n if ($return == null) {\n CE_Lib::log(1, \"OpenSRS Error: Ensure port 55443 is open and PHP is compiled with OpenSSL.\");\n throw new Exception(\"OpenSRS Error: Ensure port 55443 is open and PHP is compiled with OpenSSL.\");\n }\n\n // Check we had a succcess code\n if ($return['status']['response_code'] != 200) {\n CE_Lib::log(1, \"OpenSRS Lookup Failed: \".$return['status']['response_text']);\n throw new Exception(\"OpenSRS Lookup Failed: \".$return['status']['response_text']);\n }\n unset($return['status']);\n //TODO we need to ensure that this is the array returned by checkDomain\n //since we can pass namesuggest we might get back a list of domains\n //for each domain let's add to domains array\n //$aDomain = DomainNameGateway::splitDomain($domainName);\n //$domains[] = array(\"tld\"=>$aDomain[1],\"domain\"=>$aDomain[0],\"status\"=>$status);\n //return array(\"results\"=>$domains);\n\n return $return;\n }", "title": "" }, { "docid": "f42a54da7e8a0477c7abf29d130e8004", "score": "0.5053058", "text": "function registrar_api_domains_getlist() {\n return _registrar_api_method('domains_getlist');\n}", "title": "" }, { "docid": "ab09824c84c8d9ed72fd4ae467be1697", "score": "0.504184", "text": "function portal_generate_db_form_list($field_name, $field_values, $table_name, $table_value_field, $table_label_field, $type = 'list', $multiple = '', $alternative_query = '', $alternative_params = array(), $pre_options = array(), $max_width = 0) {\n\t// parameters:\n\t//\t$field_name - The name of the field in the HTML form\n\t//\t$field_values - An array of values (or a single value) that should be auto-filled in the form\n\t//\t$table_name - The name of the database table\n\t//\t$table_value_field - The field in the database table that will be used for the value part of the list, usually the PK\n\t//\t$table_label_field - The field (can be a CONCAT statement) that will be used in the displayed part of the list\n\t//\t$type - list | box - Whether to use select lists or radio/checkboxes\n\t//\t$multiple - '' | multiple - whether to allow multiple selections (automatically set if $field_values is an array\n\t//\t$alternative_query - If a simple table/value_field/label_field isn't good enough, use this to define an alternate parameterized query with joins, etc. Just make sure to alias the value ' AS value' and the label ' AS label'\n\t//\t$alternative_params - An array of parameters to use for the query\n\t//\t$pre_options - An array of items to place before the list, typically things like '<option value=\"\">Select an option...</option>' or '<option value=\"\">---------</option>'\n\t// $max_width - The maximum number of characters to be displayed in the form. Default (0) is all characters\n\n\tglobal $_MYSTERY, $_PORTAL;\n\n\t// conifguration\n\t$select_box_limit = 6; // max display length of a select box\n\n\t// function body\n\t$list = '';\n\n\tif ($alternative_query == '') {\n\t\t$query = 'SELECT DISTINCT ' . $table_value_field . ' AS value, ' . $table_label_field . ' AS label FROM ' . $table_name . ' ORDER BY label ASC';\n\t\t$params = array();\n\t} else {\n\t\t$query = $alternative_query;\n\t\t$params = $alternative_params;\n\t}\n\n\t$results = mystery_select_query($query, $params, 'portal_dbh');\n\n\t// we'll override the multiple argument if multiple values are specified\n\n\tif (is_array($field_values) && count($field_values) > 1) {\n\t\t$multiple = 'multiple';\n\t}\n\n\tif ($multiple == 'multiple') {\n\t\t// we'll make the sent variable into an array\n\t\tif (!preg_match('~\\[\\]$~', $field_name)) {\n\t\t\t$field_name = $field_name . '[]';\n\t\t}\n\t}\n\n\t// now we'll convert $field_values to an array if not already done so\n\n\tif (!is_array($field_values)) {\n\t\t$field_values = array($field_values);\n\t}\n\n\tif ($type == 'list') {\n\n\t\tif ($multiple == 'multiple') {\n\n\t\t\tif (count($results) > $select_box_limit) {\n\t\t\t\t$size = ' size=\"' . $select_box_limit . '\"';\n\t\t\t} else {\n\t\t\t\t$size = '';\n\t\t\t}\n\n\t\t\t$list .= '\n\t\t\t<select name=\"' . $field_name . '\" id=\"' . str_replace('_','-',$field_name) . '\"' . $size . ' multiple=\"multiple\">\n\t\t\t';\n\n\t\t} else {\n\n\t\t\t$list .= '\n\t\t\t<select name=\"' . $field_name . '\" id=\"' . str_replace('_','-',$field_name) . '\">\n\t\t\t';\n\n\t\t}\n\n\t\tif (count($pre_options) > 0) {\n\n\t\t\tfor ($i = 0; $i < count($pre_options); $i++) {\n\n\t\t\t\t$list .= $pre_options[$i];\n\n\t\t\t}\n\n\t\t}\n\n\t\tfor ($i = 0; $i < count($results); $i++) {\n\n\t\t\t$selected = '';\n\n\t\t\tif (in_array($results[$i]['value'], $field_values)) {\n\t\t\t\t$selected = ' selected';\n\n\t\t\t}\n\n\t\t\t$label = $results[$i]['label'];\n\t\t\t\n\t\t\tif ($max_width > 0 && strlen($label) > $max_width) {\n\t\t\t\t$label = substr($label, 0, ($max_width - 3)) . '…';\n\t\t\t}\n\t\t\n\t\t\t$list .= '\n\t\t\t<option value=\"' . $results[$i]['value'] . '\"' . $selected . '>' . $label . '</option>\n\t\t\t';\n\n\t\t}\n\n\t\t$list .= '</select>';\n\n\t} else {\n\n\t\t// $type == 'box'\n\n\t\tif ($multiple == 'multiple') {\n\t\t\t$box_type = 'checkbox';\n\t\t} else {\n\t\t\t$box_type = 'radio';\n\t\t}\n\n\t\tfor ($i = 0; $i < count($results); $i++) {\n\n\t\t\t$checked = '';\n\n\t\t\tif (in_array($results[$i]['value'], $field_values)) {\n\t\t\t\t$checked = ' checked';\n\n\t\t\t}\n\n\t\t\t$label = $results[$i]['label'];\n\t\t\t\n\t\t\tif ($max_width > 0 && strlen($label) > $max_width) {\n\t\t\t\t$label = substr($label, 0, ($max_width - 3)) . '…';\n\t\t\t}\n\t\t\n\t\t\t$list .= '\n\t\t\t<label><input name=\"' . $field_name . '\" type=\"' . $box_type . '\" value=\"' . $results[$i]['value'] . '\"' . $checked . '> ' . $label . '</label><br>\n\t\t\t';\n\n\t\t}\n\t}\n\n\treturn $list;\n\n}", "title": "" }, { "docid": "a7568c43fd206c7235294f5d4be22d85", "score": "0.5031762", "text": "public function ListDomain(ListDomain $parameters)\n {\n return $this->__soapCall('ListDomain', array($parameters));\n }", "title": "" }, { "docid": "73e18979d1cb4c5a4a7de0e25776e825", "score": "0.50312936", "text": "private function generate_server_drop($servers)\n\t{\n\t\t$select = \"<select id='server_list' name='server_list'>\";\n\t\t$select.= \"<option value='0'>Select a server</option>\";\n\t\tif(count($servers) > 0)\n\t\t{\n\t\t\tforeach($servers as $list)\n\t\t\t{\n\t\t\t\t $select.=\"<option value='\".$list->s_system.\"'>\".$list->s_system.\"</option>\"; \n\t\t\t}\n\t\t}\n\t\telse\n\t\t $select.=\"<option value='0'>Error in loading</option>\";\n\t\t$select.=\"</select>\";\n\t\treturn $select;\n\t}", "title": "" }, { "docid": "8def858c68caab3b3e59bd3da72cd9ca", "score": "0.5025841", "text": "public function listDomains(){\n return libvirt_list_domains($this->connection);\n }", "title": "" }, { "docid": "4f90074579ad93f7503cf0f76aabb289", "score": "0.5007899", "text": "function stregistry_SaveNameservers($params) \n{\n\t// init connection\n\tif (($status = __initConnectionAndAuthorize($params)) !== true) {\n\t\treturn __errorArray($status);\n\t}\n\n\t// fetch domain\n\t$json = STRegistry::Domains()->query($params['domainname']);\n\tif (!ResponseHelper::isSuccess($json)) {\n\t\treturn __errorArray(ResponseHelper::fromJSON($json)->message);\n\t}\n\t$domain = Domain::fromJSON($json);\n\n\tforeach ($domain->getNameServers() as $nameserver => $addrs) {\n\t\t$domain->removeNameServer($nameserver);\n\t}\n\t//udpate nameservers\n\tforeach (array('ns1', 'ns2', 'ns3', 'ns4', 'ns5') as $nsKey) {\n\t\tif (!empty($params[$nsKey])) {\n\t\t\t$domain->addNameServer($params[$nsKey]);\n\t\t}\n\t}\n\t$json = STRegistry::Domains()->update($domain);\n\tif (!ResponseHelper::isSuccess($json)) {\n\t\treturn __errorArray(ResponseHelper::fromJSON($json)->message);\n\t}\n\n\treturn 'sucessfull';\n}", "title": "" }, { "docid": "14f691f53490ae8f9eb0abd2203444d5", "score": "0.49857545", "text": "function printAddAliasForm($domainList) {\r\n\t\tprint '<form method=\"POST\" action=\"#\">';\r\n\t\tprint 'Alias:';\r\n\t\tprint '&nbsp;';\r\n\t\tprint '<input type=\"text\" size=\"15\" name=\"alias\">';\r\n\t\tprint '&nbsp;';\r\n\t\tprint '<select name=\"domain\">';\r\n\t\tprint ' <option value=\"\">Please select</option>';\r\n\t\tforeach ($domainList as $domain) {\r\n\t\t\tprintf(' <option value=\"%s\">%s</option>', $domain['id'], $domain['name']);\r\n\t\t}\r\n\t\tprint '</select>';\r\n\t\tprint '&nbsp;';\r\n\t\tprint 'deliver to:';\r\n\t\tprint '&nbsp;';\r\n\t\tprint '<input type=\"text\" size=\"20\" name=\"email\">';\r\n\t\tprint '&nbsp;';\r\n\t\tprint '<input type=\"submit\" value=\"Add\">';\r\n\t\tprint '</form>';\r\n\t}", "title": "" }, { "docid": "55935e9b2ce6a64780cf7d8e716cc512", "score": "0.49837324", "text": "function getServer()\n {\n $ret= array(\"all\"=>_(\"All\"));\n\n /* First of all, detect all servers that supports the mailqueue extension \n -If this fails, the mailqueue(s) can't be queried.\n */\n $hosts = $this->si_queue->get_hosts_with_module(\"mailqueue_com\");\n $this->si_error = $this->si_queue->is_error();\n if(!count($hosts)){\n return(array());\n } \n\n /* Create search filter and try to resolv mac to hostname \n */\n $filter = \"\";\n foreach($hosts as $mac){\n $filter .= \"(macAddress=\".$mac.\")\";\n }\n $filter = \"(&(objectClass=GOhard)(|\".$filter.\"))\";\n $res = get_list($filter,\"no_acls\",$this->config->current['BASE'],\n array(\"cn\",\"macAddress\"),GL_SUBSEARCH | GL_NO_ACL_CHECK); \n\n /* Create result array \n */\n foreach($hosts as $mac){\n $found = FALSE;\n foreach($res as $entry){\n if(preg_match(\"/^\".preg_quote($mac, '/').\"$/i\",$entry['macAddress'][0])){\n $ret[$mac] = $entry['cn'][0];\n $found = TRUE;\n break;\n }\n }\n if(!$found){\n $ret[$mac] = $mac;\n }\n }\n $this->ServerList = $ret;\n }", "title": "" }, { "docid": "1cee57a628c29383290754ca8be17269", "score": "0.49560377", "text": "public function hostnames($args, $assoc_args) {\n $action = array_shift($args);\n $site = SiteFactory::instance(@$assoc_args['site']);\n $env = $this->getValidEnv($site->getName(), @$assoc_args['env']);\n switch ($action) {\n case 'list':\n $hostnames = $data = (array) $site->environment($env)->hostnames();\n if (!Terminus::get_config('json')) {\n // if were not just dumping the json then we should reformat the data\n $data = array();\n foreach ($hostnames as $hostname => $details ) {\n $data[] = array_merge( array('domain' => $hostname), (array) $details);\n }\n }\n $this->handleDisplay($data);\n break;\n case 'add':\n if (!isset($assoc_args['hostname'])) {\n Terminus::error(\"Must specify hostname with --hostname\");\n }\n $data = $site->environment($env)->hostnameadd($assoc_args['hostname']);\n if (Terminus::get_config('verbose')) {\n \\Terminus\\Utils\\json_dump($data);\n }\n Terminus::success(\"Added %s to %s-%s\", array( $assoc_args['hostname'], $site->getName(), $env));\n break;\n case 'remove':\n if (!isset($assoc_args['hostname'])) {\n Terminus::error(\"Must specify hostname with --hostname\");\n }\n $data = $site->environment($env)->hostnamedelete($assoc_args['hostname']);\n Terminus::success(\"Deleted %s from %s-%s\", array( $assoc_args['hostname'], $site->getName(), $env));\n break;\n }\n return $data;\n }", "title": "" }, { "docid": "42d209a8d056a58ee3e1ac43fc4cbc2d", "score": "0.4947306", "text": "function hostcontrol_SaveNameservers($params)\n{\n $api_client = new HostControlAPIClient(HostControlHelper::getApiUrl($params), $params['ApiKey']);\n $domainname = strtolower($params[\"sld\"] . \".\" . $params[\"tld\"]);\n\n $nameservers = array();\n for($nsi = 1; $nsi < 6; $nsi++)\n {\n if(! empty($params[\"ns\" . $nsi]))\n {\n $nameservers[] = array('hostname' => $params[\"ns\" . $nsi]);\n }\n }\n\n try\n {\n $result = $api_client->domain->setNameservers($domainname, $nameservers);\n }\n catch(HostControlAPIClientError $e)\n {\n HostControlHelper::debugLog($params, 'domain-setnameservers', array($domainname, $nameservers), $e);\n\n $error_message = $e->getMessage();\n if($error_message == \"custom_nameservers_disabled\")\n {\n $error_message = \"Changing nameservers is disabled for this customer\";\n }\n\n return array('error' => $error_message);\n }\n\n if($result->status == \"delivered\")\n {\n return true;\n }\n\n return array('error' => 'Updating nameservers failed');\n}", "title": "" }, { "docid": "d36a8755a0ae36fa6736016039f1300b", "score": "0.49370497", "text": "public function getDomainMailboxes($domain) {\n /* $compile = \" domain=\\\"\".$domain.\"\\\"\"; */\n /* END */\n \n /* Added by DD - 27/05/2015 : Array object to Get Mailbox (For new api) */\n\n\n\t\t/*\n\t\t$domain_info = $this->getDomain($main_domain);\t\t\t\n\t\t$domain_list[] = $main_domain;\n\n\t\tforeach ($domain_info['attributes']['aliases'] as $domain_alias) {\n\t\t\t$domain_list[] = $domain_alias;\n\t\t}\n\t\t*/\n\t\t\n\n\t\n\t\t$compile = array(\"credentials\"=>array(\"user\"=>$this->username,\"password\"=>$this->password),\"criteria\"=>array(\"domain\"=>$domain));\n \n $response = $this->_processRequest (\"search_users\", $compile);\n $result[\"is_success\"] = $response[\"is_success\"];\n $result[\"response_code\"] = $response[\"response_code\"];\n $result[\"response_text\"] = $response[\"response_text\"];\n \n $users = json_decode(json_encode($response['response']['users']), true);\n \n \n for($j=0;$j<count($users);$j++)\n { \n\n \t\t// totals\n if($users[$j]['type'] == 'mailbox')\n {\n\n $result[\"attributes\"][\"mailbox\"] += 1;\n }\n elseif($users[$j]['type'] == 'forward')\n {\n\n $result[\"attributes\"][\"forward\"] += 1;\n }\n elseif($users[$j]['type'] == 'filter')\n {\n $result[\"attributes\"][\"filter\"] += 1;\n }\n\n\n\n\n $user = array(\"mailbox\"=>$users[$j]['user'],\"type\"=>$users[$j]['type'],\"workgroup\"=>$users[$j]['workgroup']);\n\n\t\t\tif ($users[$j]['type'] != 'mailbox' && $users[$j]['type'] != 'forward')\n\t\t\t{\t\t\t\t\n\t\t\t\tcontinue;\n\t\t\t}\n\n $result[\"attributes\"][\"list\"][$users[$j]['user']] = $user;\n\n\n\n }\n\n\t\t// alias\n for($j=0;$j<count($users);$j++)\n { \n if ($users[$j]['type'] == 'alias' && !empty($users[$j]['alias_target']))\n {\n \t$result[\"attributes\"][\"list\"][$users[$j]['alias_target']]['aliases'][] = $users[$j]['user'];\n }\n else if ($users[$j]['type'] == 'forward')\n {\n \t$FWInfo = $this->getMailboxForwardOnly('', $users[$j]['user']);\n\t\t\t\t$result[\"attributes\"][\"list\"][$users[$j]['user']]['forward_email'] = explode(\"\\n\", $FWInfo['attributes']['forward_email']);\n }\n } \t\t\t\n\t\n\t\t \n\n\t\tksort($result[\"attributes\"][\"list\"]);\n\n return $result;\n /* END */\n\t\t//return $this->_processRequest (\"get_domain_mailboxes\", $compile);\n\t}", "title": "" }, { "docid": "9bd01c520d96c3625cf64471514bfe4f", "score": "0.4928194", "text": "function drush_apps_list() {\n $servers = func_get_args();\n module_load_include('inc', 'apps', 'apps.manifest');\n $servers = !empty($servers)? $servers : array_keys(apps_servers());\n $rows = array(array(dt('Key'), dt('Name'), dt('version'), dt('server'), dt('status')));\n foreach ($servers as $server) {\n $apps = apps_apps($server);\n foreach ($apps as $k => $app) {\n $status = '';\n switch ($app['status']) {\n CASE APPS_INCOMPATIBLE : $status = 'Incompatible'; break;\n CASE APPS_DISABLED : $status = 'Disabled'; break;\n CASE APPS_ENABLED : $status = 'Enabled'; break;\n CASE APPS_INSTALLABLE : $status = 'Installable'; break;\n }\n $rows[] = array(\n $k,\n $app['name'],\n $app['version'],\n $server,\n $status,\n );\n }\n unset($apps);\n }\n drush_print_table($rows, TRUE);\n}", "title": "" }, { "docid": "74fdaec3cfb46b5c7fc62999089f1f74", "score": "0.49047157", "text": "function configureMailGunDns()\n {\n $domainMg = new \\spamtonprof\\stp_api\\StpDomainManager();\n $domains = $domainMg->getAll(array(\n 'mx_ok' => 'false'\n ));\n\n $mg = Mailgun::create('039ff1551369afa5ba9e4d4750591df1-8889127d-2bb4f343');\n\n foreach ($domains as $domain) {\n\n $domainName = $domain->getName();\n\n echo ('----------' . $domainName . '----------' . '<br>');\n $root = $domain->getRoot();\n $subdomain = $domain->getSubdomain();\n\n $dns = $mg->domains()\n ->show($domain->getName())\n ->getOutboundDNSRecords();\n\n foreach ($dns as $dn) {\n\n $dns_subdomain = str_replace('.' . $root, '', $dn->getName());\n $target = $dn->getValue();\n $type = $dn->getType();\n\n if ($type == 'CNAME') {\n $target = $target . '.';\n }\n\n echo ('root : ' . $root . '<br>');\n echo ('type : ' . $type . '<br>');\n echo ('name : ' . $dns_subdomain . '<br>');\n echo ('target : ' . $target . '<br>');\n\n $this->addDnsOvh($root, $dns_subdomain, $target, $type);\n }\n\n $dns = $mg->domains()\n ->show($domain->getName())\n ->getInboundDNSRecords();\n\n foreach ($dns as $dn) {\n\n $target = $dn->getValue() . '.';\n $type = $dn->getType();\n $prio = $dn->getPriority();\n $dns_subdomain = $subdomain;\n\n $target = $prio . ' ' . $target;\n\n echo ('root : ' . $root . '<br>');\n echo ('type : ' . $type . '<br>');\n echo ('name : ' . $dns_subdomain . '<br>');\n echo ('target : ' . $target . '<br>' . '<br>');\n\n $this->addDnsOvh($root, $dns_subdomain, $target, $type);\n }\n\n $domain->setMx_ok(true);\n $domainMg->updateMxOk($domain);\n }\n }", "title": "" }, { "docid": "a127d9ed71600336769be53e46f1286e", "score": "0.49014387", "text": "function onlineserver_TransferDomain($params)\n{\n // user defined configuration values\n $url = $params['Url'];\n $username = $params['Username'];\n $password = $params['Password'];\n\n // registration parameters\n $sld = $params['sld'];\n $tld = $params['tld'];\n $registrationPeriod = $params['regperiod'];\n $eppCode = base64_encode($params['eppcode']);\n //$eppCode = $params['eppcode'];\n\n /**\n * Nameservers.\n *\n * If purchased with web hosting, values will be taken from the\n * assigned web hosting server. Otherwise uses the values specified\n * during the order process.\n */\n $nameserver1 = $params['ns1'];\n $nameserver2 = $params['ns2'];\n $nameserver3 = $params['ns3'];\n $nameserver4 = $params['ns4'];\n $nameserver5 = $params['ns5'];\n\n $params[\"address1\"]=validate($params[\"address1\"]);\n $params[\"address2\"]=validate($params[\"address2\"]);\n $params[\"city\"]=validate($params[\"city\"]);\n $params[\"state\"]=validate($params[\"state\"]);\n\n\n $firstName = translate($params[\"firstname\"]) ;\n $lastName = translate($params[\"lastname\"]);\n $fullName = translate($params[\"fullname\"]); // First name and last name combined\n $companyName = translate($params[\"companyname\"]);\n $email = $params[\"email\"];\n $address1 = translate($params[\"address1\"]);\n $address2 = translate($params[\"address2\"]);\n $city = translate($params[\"city\"]);\n $state = translate($params[\"state\"]); // eg. TX\n $stateFullName =translate($params[\"fullstate\"]);// eg. Texas\n $postcode = $params[\"postcode\"]; // Postcode/Zip code\n $countryCode = $params[\"countrycode\"]; // eg. GB\n $countryName = translate($params[\"countryname\"]); // eg. United Kingdom\n $phoneNumber = $params[\"phonenumber\"]; // Phone number as the user provided it\n $phoneCountryCode = $params[\"phonecc\"]; // Country code determined based on country\n $phoneNumberFormatted = $params[\"fullphonenumber\"]; // Format: +CC.xxxxxxxxxxxx\n\n\n\n /**\n * Premium domain parameters.\n *\n * Premium domains enabled informs you if the admin user has enabled\n * the selling of premium domain names. If this domain is a premium name,\n * `premiumCost` will contain the cost price retrieved at the time of\n * the order being placed. The premium order should only be processed\n * if the cost price now matches that previously fetched amount.\n */\n $premiumDomainsEnabled = (bool) $params['premiumEnabled'];\n $premiumDomainsCost = $params['premiumCost'];\n\n // Build Phone Number\n $pos = strpos($phoneNumberFormatted, '.');\n $countryCode2 = substr($phoneNumberFormatted, 0, $pos);\n $areaCode = substr($phoneNumberFormatted, $pos + 1, 3);\n $phoneNumber = substr($phoneNumberFormatted, $pos + 1 + 3);\n\n\n\n\n $initials = substr($firstName, 0, 1) . '.' . substr($lastName, 0, 1);\n // Build post data\n $postfields=[\n 'username'=>$username,\n 'password'=>$password,\n 'data'=>[\n 'owner'=>[\n 'name'=>[\n 'initials' => $initials,\n 'firstName' => $firstName,\n 'lastName' => $lastName\n ],\n 'gender'=>'m',\n \"phone\"=>[\n 'countryCode' => $countryCode2,\n 'areaCode' => $areaCode,\n 'subscriberNumber'=> $phoneNumber\n ],\n 'address' => [\n 'street' => $address1,\n 'number' => \"1\",\n 'zipcode' => $postcode,\n 'city' => $city,\n 'country' => $countryCode\n ],\n \"email\" => $email,\n ],\n 'domain'=> [\n 'name' => $sld,\n 'extension' => $tld\n ],\n 'nameserver'=>[\n [\n 'name'=>$nameserver1\n ],\n [\n 'name'=>$nameserver2\n ],\n [\n 'name'=>$nameserver3\n ],\n [\n 'name'=>$nameserver4\n ],\n [\n 'name'=>$nameserver5\n ]\n ],\n \"authCode\" => $eppCode\n ]\n ];\n\n try {\n $api = new ApiClient();\n $api->call('transferDomain', $postfields);\n\n return array(\n 'success' => true,\n );\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n}", "title": "" }, { "docid": "96aa65c77944dd13d3feb7b4814ca83e", "score": "0.48983902", "text": "public function get_net_dns_server($p_id)\n {\n $l_return = [];\n $l_dao = new isys_cmdb_dao($this->m_database);\n\n $l_reference_info = $this->m_data_info[C__PROPERTY__DATA__REFERENCES];\n\n if (count($l_reference_info) > 0)\n {\n\n $l_table = $l_reference_info[0];\n $l_column = $l_reference_info[1];\n\n if ($l_table == 'isys_catg_ip_list_2_isys_catg_ip_list')\n {\n $l_referenced_field = 'isys_catg_ip_list__id__dns';\n }\n else\n {\n $l_referenced_field = 'isys_catg_ip_list__id';\n }\n\n $l_sql = 'SELECT ip.*, isys_obj.*, isys_cats_net_ip_addresses_list.*, isys_obj_type.* FROM ' . $l_table . ' AS main ' . 'INNER JOIN isys_catg_ip_list AS ip ON ip.isys_catg_ip_list__id = main.' . $l_referenced_field . ' ' . 'INNER JOIN isys_cats_net_ip_addresses_list ON ip.isys_catg_ip_list__isys_cats_net_ip_addresses_list__id = isys_cats_net_ip_addresses_list__id ' . 'INNER JOIN isys_obj ON ip.isys_catg_ip_list__isys_obj__id = isys_obj__id ' . 'INNER JOIN isys_obj_type ON isys_obj_type__id = isys_obj__isys_obj_type__id ' . 'WHERE main.' . $l_column . ' = ' . $l_dao->convert_sql_id(\n $p_id\n );\n\n $l_res = $l_dao->retrieve($l_sql);\n\n if ($l_res && $l_res->num_rows() > 0)\n {\n while ($l_row = $l_res->get_row())\n {\n\n $l_return[] = [\n 'id' => $l_row['isys_obj__id'],\n 'sysid' => $l_row['isys_obj__sysid'],\n 'type' => $l_row['isys_obj_type__const'],\n 'title' => $l_row['isys_obj__title'],\n 'ref_id' => $l_row['isys_catg_ip_list__id'],\n 'ref_title' => $l_row['isys_cats_net_ip_addresses_list__title'],\n 'ref_type' => 'C__CATG__IP'\n ];\n\n }\n\n }\n }\n else\n {\n throw new isys_exception_general('No reference info for DNS server assigned. Modify the properties of the category.');\n }\n\n return new isys_export_data($l_return);\n }", "title": "" }, { "docid": "4d88222d5d80e3fd7d28bb83a269a3ce", "score": "0.48922807", "text": "public function listDbs()\n {\n $command = ['listDatabases' => 1];\n\n try {\n $cursor = $this->manager->executeCommand('admin', new Command($command));\n $cursor->setTypeMap(self::$typeMap);\n $result = current($cursor->toArray());\n } catch (Exception $e) {\n $this->saveError($e);\n return false;\n }\n\n if (!isset($result['databases']) || !is_array($result['databases'])) {\n $this->saveError(\"Mongodb's command [listDatabases] did not return a 'databases' array\");\n return false;\n }\n\n return $result['databases'];\n }", "title": "" }, { "docid": "39d0eba7b0ad548eee5142d1c6f027d5", "score": "0.488847", "text": "private function buildDomainModuleFields($vars, $client = false)\n {\n if (isset($vars->Domain)) {\n $tld = $this->getTld($vars->Domain);\n\n $extension_fields = Configure::get('Internetbs.domain_fields' . $tld);\n if ($extension_fields) {\n // Set the fields\n if ($client) {\n $fields = array_merge(\n Configure::get('Internetbs.nameserver_fields'),\n Configure::get('Internetbs.domain_fields'),\n $extension_fields\n );\n } else {\n $fields = array_merge(\n Configure::get('Internetbs.domain_fields'),\n Configure::get('Internetbs.nameserver_fields'),\n $extension_fields\n );\n }\n\n if ($client) {\n // We should already have the domain name don't make editable\n $fields['Domain']['type'] = 'hidden';\n $fields['Domain']['label'] = null;\n }\n\n // Build the module fields\n $module_fields = new ModuleFields();\n\n // Allow AJAX requests\n $ajax = $module_fields->fieldHidden('allow_ajax', 'true', ['id'=>'internetbs_allow_ajax']);\n $module_fields->setField($ajax);\n $please_select = ['' => Language::_('AppController.select.please', true)];\n\n foreach ($fields as $key => $field) {\n // Build the field\n $label = $module_fields->label(($field['label'] ?? ''), $key);\n\n $type = null;\n if ($field['type'] == 'text') {\n $type = $module_fields->fieldText(\n $key,\n ($vars->{$key} ?? ''),\n ['id' => $key]\n );\n } elseif ($field['type'] == 'select') {\n $type = $module_fields->fieldSelect(\n $key,\n (isset($field['options']) ? $please_select + $field['options'] : $please_select),\n ($vars->{$key} ?? ''),\n ['id' => $key]\n );\n } elseif ($field['type'] == 'hidden') {\n $type = $module_fields->fieldHidden(\n $key,\n ($vars->{$key} ?? ''),\n ['id' => $key]\n );\n }\n\n // Include a tooltip if set\n if (!empty($field['tooltip'])) {\n $label->attach($module_fields->tooltip($field['tooltip']));\n }\n\n if ($type) {\n $label->attach($type);\n $module_fields->setField($label);\n }\n }\n }\n }\n\n return ($module_fields ?? false);\n }", "title": "" }, { "docid": "2e5494c512732fb55f9de4d605de9f24", "score": "0.488212", "text": "private function generateOptions($options = array())\r\n {\r\n $short_options = \"f:h:u:p:d:t:i::\";\r\n $long_options = array(\"csvfile:\", \"dbhost:\", \"dbusername:\", \"dbpassword:\", \"dbname:\", \"mysqltablename:\", \"help\");\r\n $cli_options = getopt($short_options, $long_options);\r\n\r\n return array(\r\n \"csvfile\" => !empty($cli_options['csvfile']) ? $cli_options['csvfile'] : (!empty($cli_options['f']) ? $cli_options['f'] : (!empty($options['csvfile']) ? $options['csvfile'] : false)),\r\n \"dbhost\" => !empty($cli_options['dbhost']) ? $cli_options['dbhost'] : (!empty($cli_options['h']) ? $cli_options['h'] : (!empty($options['dbhost']) ? $options['dbhost'] : false)),\r\n \"dbusername\" => !empty($cli_options['dbusername']) ? $cli_options['dbusername'] : (!empty($cli_options['u']) ? $cli_options['u'] : (!empty($options['dbusername']) ? $options['dbusername'] : false)),\r\n \"dbpassword\" => !empty($cli_options['dbpassword']) ? $cli_options['dbpassword'] : (!empty($cli_options['p']) ? $cli_options['p'] : (!empty($options['dbpassword']) ? $options['dbpassword'] : false)),\r\n \"dbname\" => !empty($cli_options['dbname']) ? $cli_options['dbname'] : (!empty($cli_options['d']) ? $cli_options['d'] : (!empty($options['dbname']) ? $options['dbname'] : false)),\r\n \"mysqltablename\" => !empty($cli_options['mysqltablename']) ? $cli_options['mysqltablename'] : (!empty($cli_options['t']) ? $cli_options['t'] : (!empty($options['mysqltablename']) ? $options['mysqltablename'] : false)),\r\n \"help\" => isset($cli_options['help']) ? \"1\" : (isset($cli_options['i']) ? \"1\" : \"0\")\r\n );\r\n }", "title": "" }, { "docid": "f831cd56f6e44a42f8e53fb496cb951d", "score": "0.4880416", "text": "public static function fmxListDatabases()\n\t{\n\t\tglobal $fmx_host;\n\t\t\n\t\t// assemble the URL\n\t\t$udat['protocal'] = FMX_PROTOCAL;\n\t\t$udat['space'] = '';\n\t\t$udat['host'] = $fmx_host;\n\t\t$udat['fmi'] = 'fmi';\n\t\t$udat['data'] = 'data';\n\t\t$udat['apiVersion'] = FMX_APIVERSION;\n\t\t$udat['databases'] = 'databases';\n\t\t$url = implode($udat,'/');\n\t\t\n\t\t// send request to FileMaker Server\n\t\t$result = SELF::curlSession($url,'GET');\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "09873e885eef3529a234e73448f497d4", "score": "0.4871685", "text": "public function resolveServersForTld(string $domain): array\n {\n $servers = [];\n\n $ianaResponse = $this->networkClient->requestWhois($this->IANA_SERVER, $domain);\n $ianaWhois = $this->parser->parse($ianaResponse);\n if ($ianaWhois->whoisServer) {\n $servers[] = $ianaWhois->whoisServer;\n }\n\n $servers[] = 'whois.nic.' . $domain;\n $servers[] = 'whois.' . $domain;\n $servers[] = $domain . '.whois-servers.net';\n\n return $servers;\n }", "title": "" }, { "docid": "446a41219b25f01c72476c94de432412", "score": "0.48600948", "text": "function onlineserver_CheckAvailability($params)\n{\n // user defined configuration values\n $url = $params['Url'];\n $username = $params['Username'];\n $password = $params['Password'];\n\n //return false;\n // availability check parameters\n $searchTerm = $params['searchTerm'];\n $punyCodeSearchTerm = $params['punyCodeSearchTerm'];\n $tldsToInclude = $params['tldsToInclude'];\n $isIdnDomain = (bool) $params['isIdnDomain'];\n $premiumEnabled = (bool) $params['premiumEnabled'];\n\n $sld=$params['sld'];\n $tld=$params['tldsToInclude'][0];\n if ($tld){\n //var_dump($params);\n $postfields=[\n 'username'=>$username,\n 'password'=>$password,\n 'data'=>[\n 'domain' => array(\n 'name' => $sld,\n 'extension' => ltrim($tld,'.')\n )\n ]\n ];\n\n try {\n $api = new ApiClient();\n $api->call('checkDomainRequest', $postfields);\n\n\n $results = new ResultsList();\n foreach ($api->results as $domain) {\n\n\n $domain_sld = explode('.', $domain['domain'])[0];\n $domain_tld = substr(str_replace($domain_sld, '', $domain['domain']), 1);\n\n // Instantiate a new domain search result object\n $searchResult = new SearchResult($domain_sld, $domain_tld);\n\n // Determine the appropriate status to return\n if($domain['status'] == 'free')\n $status = SearchResult::STATUS_NOT_REGISTERED;\n else\n $status = SearchResult::STATUS_REGISTERED;\n\n $searchResult->setStatus($status);\n\n // Return premium information if applicable\n /*if ($domain['isPremiumName']) {\n $searchResult->setPremiumDomain(true);\n $searchResult->setPremiumCostPricing(\n array(\n 'register' => $domain['premiumRegistrationPrice'],\n 'renew' => $domain['premiumRenewPrice'],\n 'CurrencyCode' => 'USD',\n )\n );\n }*/\n\n // Append to the search results list\n $results->append($searchResult);\n }\n\n return $results;\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n }\n}", "title": "" }, { "docid": "7da5312a80df59220f77823d4247565e", "score": "0.48577055", "text": "public function run()\n {\n if ($this->_filter === self::$flags[\"ALL\"]) {\n return libvirt_list_domains($this->connection);\n\n } else if ($this->_filter === self::$flags[\"ACTIVE\"]) {\n return libvirt_list_active_domains($this->connection);\n \n } else if ($this->_filter === self::$flags[\"INACTIVE\"]) {\n return libvirt_list_inactive_domains($this->connection);\n }\n\n }", "title": "" }, { "docid": "bbc308979e05884e08b42dd6e3dd8745", "score": "0.4846656", "text": "function registerDomain($params)\n {\n require_once dirname(__FILE__).'/lib/DomContact.class.php';\n require_once dirname(__FILE__).'/lib/DomOrder.class.php';\n require_once dirname(__FILE__).'/lib/Customer.class.php';\n require_once dirname(__FILE__).'/lib/DomContactExt.class.php';\n require_once dirname(__FILE__).'/lib/DotCoopContact.class.php';\n\n // variable setup and validation\n $params['sld'] = strtolower($params['sld']);\n $params['tld'] = strtolower($params['tld']);\n\t$mysld = strtolower($params['sld']);\n\t$mytld = strtolower($params['tld']);\n\n $domain = $params['sld'].\".\".$params['tld'];\n if ($params['Use testing server']) {\n $demo = \"demo\";\n } else {\n $demo = \"\";\n }\n $countrycode = $this->getCountryCode($params['RegistrantCountry']);\n $telno = $this->_validatePhone($params['RegistrantPhone'],$countrycode);\n if ($params['RegistrantOrganizationName'] == \"\") $params['RegistrantOrganizationName'] = \"N/A\";\n if ($params['Use testing server']) {\n // Required nameservers for test server\n $nameservers = array(\n \"0\" => \"dns1.parking-page.net\",\n \"1\" => \"dns2.parking-page.net\"\n );\n } else {\n // maximum 12 name servers are allowed by Directi\n\t if (isset($params['NS1']) && isset($params['NS2'])) {\n for ($i = 1; $i <= 12; $i++) {\n if (isset($params[\"NS$i\"])) {\n $nameservers[\"$i\"] = $params[\"NS$i\"]['hostname'];\n } else {\n break;\n }\n }\n } else {\n\t\t$nameservers = array(\n \"0\" => \"dns1.parking-page.net\",\n \"1\" => \"dns2.parking-page.net\"\n );\n\t }\n\n }\n // Create a new customer object\n $customer = new Customer(dirname(__FILE__).'/lib/wsdl/'.$demo.'Customer.wsdl');\n\n /* Changed the Deprecated method addCustomer(..) to new signUp method -- Dixon Davis */\n\n $return = $customer->signUp(\n $params['Login'],\n $params['Password'],\n $params['Role'],\n $params['Language'],\n $params['Parent ID'],\n $params['RegistrantEmailAddress'],\n 'clientexec123',//$params['DomainPassword'],\n $params['RegistrantFirstName'].\" \".$params['RegistrantLastName'],\n $params['RegistrantOrganizationName'],\n $params['RegistrantAddress1'],\n null,\n null,\n $params['RegistrantCity'],\n $params['RegistrantStateProvince'],\n $params['RegistrantCountry'],\n $params['RegistrantPostalCode'],\n $countrycode,\n $telno,\n null,\n null,\n null,\n null,\n 'en',\n null,\n null\n );\n CE_Lib::log(4, 'signUp('.print_r($return,true).')');\n if (isset($return['faultstring'])) {\n if (strpos($return['faultstring'],\"is already a customer\")) {\n $return = $customer->getCustomerId($params['Login'],$params['Password'],$params['Role'],$params['Language'],$params['Parent ID'],$params['RegistrantEmailAddress']);\n CE_Lib::log(4, 'getCustomerId('.print_r($return,true).')');\n } elseif (strpos($return['faultstring'],\"Zip is Invalid\")) {\n throw new Exception('Client Profile Error: Zip is Invalid');\n } elseif (strpos($return['faultstring'],\"Telephone Country Code/Telephone No. is invalid\")) {\n throw new Exception('Telephone Country Code/Telephone No. is invalid');\n } elseif (strpos($return['faultstring'],\"password\")) {\n throw new Exception('Password cannot be blank and must be at least 6 characters');\n } else {\n\n \t// As the create customer has errored, try and lookup the customer\n \t$extCustomer = $customer->getDetailsByCustomerEmail(\n $params['Login'],\n $params['Password'],\n $params['Role'],\n $params['Language'],\n $params['Parent ID'],\n $params['RegistrantEmailAddress'],\n null);\n\n // Check if we returned an array\n if(@$extCustomer['customerid']) {\n \t$custID = $extCustomer['customerid'];\n } else {\n throw new Exception('Couldn\\'t create client, please validate the client information.');\n }\n }\n }\n\n if(!$custID) {\n \t$custID = print_r($return,true);\n }\n\n $DomContact = new DomContact(dirname(__FILE__).'/lib/wsdl/'.$demo.'DomContact.wsdl');\n\n $return = $DomContact->listNames(\n $params['Login'],\n $params['Password'],\n $params['Role'],\n $params['Language'],\n $params['Parent ID'],\n $custID\n );\n CE_Lib::log(4, '$domContact->listNames('.print_r($return,true).')');\n $contactID = null;\n $totalContacts = $return['recsindb'];\n\n if (($totalContacts != null) && ($totalContacts > 0)) {\n for ($i = 1; $i <= $return['recsindb']; $i++) {\n if ($return[$i]['emailaddr'] == $params['RegistrantEmailAddress']) {\n $contactID = $return[$i]['contactid'];\n }\n }\n }\n\n if ($contactID == null) {\n\n /* Give Some Hash default value to avoid the warning error by apiutil.php */\n\n $extraHash = array('action'=>'addContact');\n\n /* Changed the deprecated add method by addContact method - Dixon Davis */\n\n $contactType = \"Contact\";\n if ($mytld == 'uk') {\n $contactType = \"UkContact\";\n }\n if ($mytld == 'co') {\n $contactType = \"CoContact\";\n }\n\n $return = $DomContact->addContact(\n $params['Login'],\n $params['Password'],\n $params['Role'],\n $params['Language'],\n $params['Parent ID'],\n $params['RegistrantFirstName'].\" \".$params['RegistrantLastName'],\n $params['RegistrantOrganizationName'],\n $params['RegistrantEmailAddress'],\n $params['RegistrantAddress1'],\n null,\n null,\n $params['RegistrantCity'],\n $params['RegistrantStateProvince'],\n $params['RegistrantCountry'],\n $params['RegistrantPostalCode'],\n $countrycode,\n $telno,\n null,\n null,\n $custID,\n $contactType,\n $extraHash\n );\n CE_Lib::log(4, '$domContact->addContact('.print_r($return,true).')');\n\n /* Give default Vector value to avoid the Internal Server Error by apiutil.php */\n\n $defaultType = array('Contact');\n\t if ($mytld == 'uk') {\n\t\t$defaultType = array('UkContact');\n\t }\n\n /* Changed the deprecated addDefaultContact method by addDefaultContacts method - Dixon Davis */\n\n $return = $DomContact->addDefaultContacts(\n $params['Login'],\n $params['Password'],\n $params['Role'],\n $params['Language'],\n $params['Parent ID'],\n $custID,\n $defaultType\n );\n\n CE_Lib::log(4, 'addDefaultContacts('.print_r($return,true).')');\n /* Returns a Hash table. Take the Contact details only by default */\n $contactID = print_r($return['Contact'],true);\n }\n\n\n if ($mytld == 'uk') {\n\n $defaultType = array('UkContact');\n // get the contactId corresponding to the type of contact added by Dixon\n\n $return = $DomContact->getDefaultContacts(\n $params['Login'],\n $params['Password'],\n $params['Role'],\n $params['Language'],\n $params['Parent ID'],\n $custID,\n $defaultType\n );\n\n\n $contactID = print_r($return['UkContact']['registrant'],true);\n }\n\n // Extra information required to register a .us and .coop domain through Directi\n if ($params['tld'] == 'us' || $params['tld'] == 'coop')\n {\n if ($params['tld'] == 'us') {\n $productKey = 'domus';\n $contactDetailsHash = array(\n 'category' => $params['ExtendedAttributes']['us_nexus'],\n 'purpose' => $params['ExtendedAttributes']['us_purpose']\n );\n }\n\n $DomContactExt = new DomContactExt(dirname(__FILE__).'/lib/wsdl/'.$demo.'DomContactExt.wsdl');\n $return = $DomContactExt->setContactDetails(\n $params['Login'],\n $params['Password'],\n $params['Role'],\n $params['Language'],\n $params['Parent ID'],\n $contactID,\n $contactDetailsHash,\n $productKey\n );\n CE_Lib::log(4, 'setContactDetails('.print_r($return,true).')');\n }\n\n // Create a new domain order object\n $DomOrder = new DomOrder(dirname(__FILE__).'/lib/wsdl/'.$demo.'DomOrder.wsdl');\n\n\tif (trim($mytld) == 'uk') {\n\n\t\t$domainhash=array($domain => intval($params['NumYears']));\n $contacthash=array('registrantcontactid' => intval($contactID));\n\n $temp['domainhash']=$domainhash;\n $temp['contacthash']=$contacthash;\n $addParamList[] = $temp;\n $invoiceOption = 'OnlyAdd'; //or it can be PayInvoice, KeepInvoice, OnlyAdd\n $enablePrivacyProtection = false; // or true\n $validate = true; // or false;\n $extraInfo = array(); //send extra info if required\n\n\n\t$return = $DomOrder->registerDomain($params['Login'],\n $params['Password'],\n $params['Role'],\n $params['Language'],\n $params['Parent ID'],\n $addParamList,\n $nameservers,\n $custID,\n $invoiceOption,\n $enablePrivacyProtection,\n $validate,\n $extraInfo);\n } else {\n CE_Lib::log(4, \"addWithoutValidation(Login=\".$params['Login'].\n \",\\nRole=\".$params['Role'].\n \",\\nLang=\".$params['Language'].\n \",\\nParentId=\".$params['Parent ID'].\n \",\\nNumYears=\".print_r(array($domain => $params['NumYears']),true).\n \",\\nnameservers=\".print_r($nameservers,true).\n \",\\ncontactID=\".$contactID.\n \",\\ncontactID=\".$contactID.\n \",\\ncontactID=\".$contactID.\n \",\\ncontactID=\".$contactID.\n \",\\ncustID=\".$custID.\",\".\n \"NoInvoice)\"\n );\n $return = $DomOrder->addWithoutValidation(\n $params['Login'],\n $params['Password'],\n $params['Role'],\n $params['Language'],\n $params['Parent ID'],\n array($domain => $params['NumYears']),\n $nameservers,\n $contactID,\n $contactID,\n $contactID,\n $contactID,\n $custID,\n \"NoInvoice\"\n );\n\t}\n CE_Lib::log(4, 'addWithoutValidation('.print_r($return,true).')');\n\n // Let's do some error checking to see what happened\n if (isset($return['faultcode'])) {\n CE_Lib::log(4, 'Directi Fault Code: '.$return['faultstring']);\n throw new Exception($return['faultstring']);\n } elseif (@$return[$domain]['actionstatus'] === 'Success') {\n return array(1,array($return[$domain]['entityid']));\n } elseif (@$return[$domain]['status'] === 'Success') {\n return array(1,array($return[$domain]['entityid']));\n } else {\n CE_Lib::log(4, 'Directi Result: [error]=>'.$return[$domain]['error'].' [faultstring]=>'.$return['faultstring']);\n throw new Exception($return[$domain]['error']);\n }\n }", "title": "" }, { "docid": "0606a7a9c46a3a9ef796ead3f2bb2a35", "score": "0.4813457", "text": "function PMA_select_server($form, $left) {\n global $server, $cfg, $lang, $convcharset;\n\n // Show as list?\n $list = $cfg['DisplayServersList'];\n if (!$form) {\n $list = FALSE;\n }\n\n if ($form) {\n if ($left) {\n echo '<div class=\"heada\">' . $GLOBALS['strServer']. ':</div>';\n } else {\n ?>\n <fieldset>\n <legend><?php echo $GLOBALS['strServerChoice']; ?></legend>\n <?php\n }\n if (!$list) {\n ?>\n <form method=\"post\" action=\"index.php\" target=\"_parent\">\n <select name=\"server\" onchange=\"this.form.submit();\">\n <?php\n }\n }\n foreach ($cfg['Servers'] AS $key => $val) {\n if (!empty($val['host'])) {\n $selected = 0;\n if (!empty($server) && ($server == $key)) {\n $selected = 1;\n }\n if (!empty($val['verbose'])) {\n $label = $val['verbose'];\n } else {\n $label = $val['host'];\n if (!empty($val['port'])) {\n $label .= ':' . $val['port'];\n }\n }\n // loic1: if 'only_db' is an array and there is more than one\n // value, displaying such informations may not be a so good\n // idea\n if (!empty($val['only_db'])) {\n $label .= ' - ' . (is_array($val['only_db']) ? implode(', ', $val['only_db']) : $val['only_db']);\n }\n if (!empty($val['user']) && ($val['auth_type'] == 'config')) {\n $label .= ' (' . $val['user'] . ')';\n }\n\n if ($list){\n if ($selected && !$left) {\n echo '&raquo; <b>' . htmlspecialchars($label) . '</b><br />';\n } else {\n echo '&raquo; <a class=\"item\" href=\"index.php?server=' . $key . '&amp;lang=' . $lang . '&amp;convcharset=' . $convcharset . '\" target=\"_top\">' . htmlspecialchars($label) . '</a><br />';\n }\n } else {\n echo ' <option value=\"' . $key . '\" ' . ($selected ? ' selected=\"selected\"' : '') . '>' . htmlspecialchars($label) . '</option>' . \"\\n\";\n }\n\n } // end if (!empty($val['host']))\n } // end while\n\n if ($form) {\n if ( ! $list ) {\n ?>\n </select>\n <input type=\"hidden\" name=\"lang\" value=\"<?php echo $lang; ?>\" />\n <input type=\"hidden\" name=\"convcharset\" value=\"<?php echo $convcharset; ?>\" />\n\t<?php\n\t// Show submit button if we have just one server (this happens with no default)\n\tif (count($cfg['Servers']) > 1) {\n\t\techo '<noscript>';\n\t}\n\t?>\n <input type=\"submit\" value=\"<?php echo $GLOBALS['strGo']; ?>\" />\n\t<?php\n\tif (count($cfg['Servers']) > 1) {\n\t\techo '</noscript>';\n\t}\n\t?>\n </form>\n <?php\n }\n if (!$left) {\n ?>\n</fieldset>\n <?php\n } else {\n echo '<hr />';\n }\n }\n}", "title": "" }, { "docid": "5ed5dc2bb747eb9decf8dd8996c47fd7", "score": "0.48134497", "text": "public function getDomainWorkgroups($domain) { \n\t\t/*$compile = \" domain=\\\"\".$domain.\"\\\"\"; */\n\t\t /* END */\n \n /* Added by DD - 26/05/2015 - Get Workgroups by Domain name */\n $compile = array(\"credentials\"=>array(\"user\"=>$this->username,\"password\"=>$this->password),\"criteria\"=>array(\"domain\"=>$domain)); \n \n \n\t\t$response = $this->_processRequest (\"search_workgroups\", $compile);\n $result[\"is_success\"] = $response[\"is_success\"];\n $result[\"response_code\"] = $response[\"response_code\"];\n $result[\"response_text\"] = $response[\"response_text\"];\n $result[\"attributes\"][\"list\"] = array();\n \n $workgroups = json_decode(json_encode($response['response']['workgroups']), true);\n\n for($j=0;$j<$response['response']['total_count'];$j++)\n { \n $counts = array(\"workgroup\"=>$workgroups[$j]['workgroup'],\"mailbox_count\"=>$workgroups[$j]['counts']['mailbox'],\"forward_count\"=>$workgroups[$j]['counts']['forward'],\"alias_count\"=>$workgroups[$j]['counts']['filter']);\n $result[\"attributes\"][\"list\"][] = $counts;\n }\n return $result;\n /* END */\n\t}", "title": "" }, { "docid": "ab3cddf59186b6191dddac5abeee91d4", "score": "0.48040444", "text": "function ServerValidate($vItems, $output_type) {\r\n\t$outputString = \"\";\r\n\t$printString = \"<fieldset><legend>Validation Errors</legend>\";\r\n\t$outputArray = array();\r\n\tforeach ($_REQUEST as $itemname=>$itemvalue) {\r\n\t\tif (array_key_exists($itemname, $vItems)) {\r\n\t\t\t$vstring = $vItems[$itemname];\r\n\t\t\t$outputArray[$itemname] = ProcessVstring($itemname,$itemvalue,$vstring,$output_type);\r\n\t\t\tif ($outputArray[$itemname]) {\r\n\t\t\t\t$outputString .= \"<b>\".$itemname.\":</b> \" . $outputArray[$itemname].\"<br/>\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif ($output_type == \"array\") {\r\n\t\treturn $outputArray;\r\n\t} else if ($output_type == \"print\") {\r\n\t\tif ($outputString) { $printString .= $outputString . \"</fieldset>\"; }\r\n\t\tprint $printString;\r\n\t}\r\n\treturn $outputString;\r\n}", "title": "" }, { "docid": "1097e3fe52868dbf74f1a9d995ce5fe9", "score": "0.47926244", "text": "public function getServerName();", "title": "" }, { "docid": "c457d21244bb7f4e4579e75b4b961b33", "score": "0.47906166", "text": "public function resolveServersForSld(string $domain): array\n {\n return [\n 'whois.' . $domain,\n 'whois.nic.' . $domain\n ];\n }", "title": "" }, { "docid": "7b6af61baa105abb45871b9b09f009ac", "score": "0.47809216", "text": "function ipAndPortValidator($serverIPAddress, $serverPort)\r\n{\r\n\t//So, now that we have the IP address and port from our source of choice, MAKE SURE to validate them before we go ANY further!\r\n\tif($serverPort != \"\") $serverPort = numericValidator($serverPort, 1, 65535, 29070);\r\n\tif($serverIPAddress != \"\") $serverIPAddress = ipAddressValidator($serverIPAddress);\r\n\r\n\t//Check for path exploits\r\n\tif(strpos($serverPort, \"..\") !== false || strpos($serverIPAddress, \"..\") !== false)\r\n\t{\r\n\t\tdisplayError(\"Server address exploit detected! This event has been logged.\", \"\", \"\");\r\n\t\treturn array(\"\", \"\");\r\n\t}\r\n\r\n\treturn array($serverIPAddress, $serverPort);\r\n}", "title": "" }, { "docid": "89d3304a148d721ba5855d7f9da0e28f", "score": "0.47795752", "text": "public function list_ldap_access_options() {\n\t\tif(is_null($this->id)) throw new BadMethodCallException('Server must be in directory before LDAP access options can be listed');\n\t\t$stmt = $this->database->prepare(\"\n\t\t\tSELECT *\n\t\t\tFROM server_ldap_access_option\n\t\t\tWHERE server_id = ?\n\t\t\tORDER BY `option`\n\t\t\");\n\t\t$stmt->bind_param('d', $this->id);\n\t\t$stmt->execute();\n\t\t$result = $stmt->get_result();\n\t\t$options = array();\n\t\twhile($row = $result->fetch_assoc()) {\n\t\t\t$options[$row['option']] = new ServerLDAPAccessOption($row['option'], $row);\n\t\t}\n\t\t$stmt->close();\n\t\treturn $options;\n\t}", "title": "" }, { "docid": "ba8a3c1c190f75689c08d40a353a1c3c", "score": "0.47666574", "text": "public function buildDsn(Server $server, array $options = []) : string;", "title": "" }, { "docid": "4dd13285a403acebeecb4035c85c3c20", "score": "0.47654653", "text": "function stregistry_RegisterDomain($params)\n{\n\t// init connection\n\tif (($status = __initConnectionAndAuthorize($params)) !== true) {\n\t\treturn __errorArray($status);\n\t}\n\n\t$domain = new Domain($params['domainname']);\n\n\t// create domain contacts\n\t$contactIds = array();\n\tforeach (array('registrant', 'admin', 'tech', 'billing') as $contactType) {\n\t\t$contact = new Contact();\n\t\t$contact->setEmail($params['email'])\n\t\t\t\t->setPhoneNumber($params['phonenumberformatted'] ?: '')\n\t\t\t\t->setName($params['fullname'])\n\t\t\t\t->setOrganization($params['companyname'])\n\t\t\t\t->setAddress($params['address1'], $params['address1'] ?: '')\n\t\t\t\t->setCity($params['city'])\n\t\t\t\t->setState($params['fullstate'])\n\t\t\t\t->setPostalCode($params['postcode'])\n\t\t\t\t->setCountryCode($params['countrycode']);\n\t\t\n\t\t$json = STRegistry::Contacts()->create($contact);\n\t\tif (!ResponseHelper::isSuccess($json)) {\n\t\t\treturn __errorArray(ResponseHelper::fromJSON($json)->message);\n\t\t}\n\t\t$contactIds[$contactType] = ResponseHelper::fromJSON($json, 'creData')->result['id'];\n\t}\n\t$domain->setContacts($contactIds['registrant'], $contactIds['admin'], $contactIds['tech'], $contactIds['billing']);\n\n\tif ($params['idprotection']) {\n\t\t$domain->setPrivacyContacts(STRegistryPrivacyContact::getRegistrantId(), STRegistryPrivacyContact::getAdminId(), STRegistryPrivacyContact::getTechId(), STRegistryPrivacyContact::getBillingId());\n\t}\n\t// add nameservers\n\tforeach (array('ns1', 'ns2', 'ns3', 'ns4', 'ns5') as $nsKey) {\n\t\tif (!empty($params[$nsKey])) {\n\t\t\t$domain->addNameServer($params[$nsKey]);\n\t\t}\n\t}\n\n\t// creating domain\n\t$json = STRegistry::Domains()->create($domain, $params['regperiod']);\n\tif (!ResponseHelper::isSuccess($json)) {\n\t\treturn __errorArray(ResponseHelper::fromJSON($json)->message);\n\t}\n\n\treturn 'success';\n}", "title": "" }, { "docid": "ee7b152a6f541403c784b18bbae52725", "score": "0.47612804", "text": "public function getServerList(){\r\n\t\t\treturn $this->tera_servers;\r\n\t\t}", "title": "" }, { "docid": "f80500ae0e8568e4b3050e60f1f87c4f", "score": "0.47477704", "text": "public static function getServerName()\n {\n }", "title": "" }, { "docid": "0c931a29bc1aa6764e21a016de938073", "score": "0.47320828", "text": "function onlineserver_personalDNS($params)\n{\n // user defined configuration values\n $url = $params['Url'];\n $username = $params['Username'];\n $password = $params['Password'];\n\n // domain parameters\n $sld = $params['sld'];\n $tld = $params['tld'];\n\n $postfields=[\n 'username'=>$username,\n 'password'=>$password,\n 'data'=>[\n 'pattern'=>'*.'.$sld.'.'.$tld,\n ]\n ];\n\n try {\n $api = new ApiClient();\n $api->call('searchNsRequest', $postfields);\n\n $html='<br><br><h1>لیست DNS های اختصاصی</h1><table style=\"background: #fff;\" class=\"table table-bordered\"><tr><th>ادرس</th><th>ادرس IP</th></tr>';\n $result=$api->results;\n //var_dump($result);\n foreach ($result['results'] as $value){\n $html.=<<<HTML\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{$value['name']}</td>\n\t\t\t\t\t<td>{$value['ip']}</td>\n\t\t\t\t</tr>\nHTML;\n\n }\n $html.='</table>';\n\n return ['success' => $html];\n\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n}", "title": "" }, { "docid": "dfee25c5784af681602152ab545705f4", "score": "0.47186232", "text": "public function listDomains()\n {\n $url = $this->generateUrl('DomainInfo', 'list_domains');\n\n return $this->execute($url);\n }", "title": "" }, { "docid": "8fe49b34abb26bc43c33b31e44352f89", "score": "0.4715902", "text": "public static function getservers() {\n $product_id = OnAppCDN::get_value(\"id\");\n \n $sql = \"SELECT\n tblservers.*, \n tblservergroupsrel.groupid,\n tblproducts.servergroup\nFROM \n tblservers \n LEFT JOIN tblservergroupsrel ON \n tblservers.id = tblservergroupsrel.serverid\n LEFT JOIN tblproducts ON\n tblproducts.id = $product_id \nWHERE\n tblservers.disabled = 0\n AND tblservers.type = 'onappcdn'\";\n\n $sql_servers_result = full_query($sql); \n\n $servers = array();\n while ( $server = mysql_fetch_assoc($sql_servers_result)) {\n if ( is_null($server['groupid']) ) \n $server['groupid'] = 0;\n $server['password'] = decrypt($server['password']);\n\n $servers[$server['id']] = $server;\n }\n\n return $servers;\n }", "title": "" }, { "docid": "cf4d65a46b71a789c483ffdde5f9332a", "score": "0.47119495", "text": "function CLCFG_enableLDAPDebian($clientOptions)\n{\n\t//exit the function if LDAP shouldn't used\n\tif ($clientOptions['ldaptype']==\"none\")\n\t\treturn;\n\n\t$server=LDAP_loadServer($clientOptions['ldapserver']);\n\n\t$LDAPhost=$server[host];\n\t$baseDN=$server[base];\n\n\t//exit the function if LDAP host or base DN is empty\n\tif (empty($LDAPhost) || empty($baseDN))\n\t\treturn;\n\n\techo(\"\n\t\trm /tmp/debconfLDAP 2> /dev/null\n\n\t\t#write debconf data\ncat >> /tmp/debconfLDAP << \\\"EOF\\\"\nlibnss-ldap libnss-ldap/binddn string cn=proxyuser,$baseDN\nlibnss-ldap libnss-ldap/bindpw password\nlibnss-ldap libnss-ldap/confperm boolean false\nlibnss-ldap libnss-ldap/dblogin boolean false\nlibnss-ldap libnss-ldap/dbrootlogin boolean false\nlibnss-ldap libnss-ldap/nsswitch note\nlibnss-ldap libnss-ldap/override boolean true\nlibnss-ldap libnss-ldap/rootbinddn string cn=manager,$baseDN\nlibnss-ldap libnss-ldap/rootbindpw password\nlibnss-ldap shared/ldapns/base-dn string $baseDN\nlibnss-ldap shared/ldapns/ldap-server string ldapi://$LDAPhost\nlibnss-ldap shared/ldapns/ldap_version select 3\nlibpam-ldap libpam-ldap/binddn string cn=proxyuser,$baseDN\nlibpam-ldap libpam-ldap/bindpw password\nlibpam-ldap libpam-ldap/dblogin boolean false\nlibpam-ldap libpam-ldap/dbrootlogin boolean false\nlibpam-ldap libpam-ldap/override boolean true\nlibpam-ldap libpam-ldap/pam_password select md5\nlibpam-ldap libpam-ldap/rootbinddn string cn=manager,$baseDN\nlibpam-ldap libpam-ldap/rootbindpw password\nlibpam-ldap shared/ldapns/base-dn string $baseDN\nlibpam-ldap shared/ldapns/ldap-server string ldapi://$LDAPhost\nldap-auth-config ldap-auth-config/ldapns/ldap-server string ldapi://$LDAPhost\nlibpam-ldap shared/ldapns/ldap_version select 3\nportmap portmap/loopback boolean false\nEOF\n\ndebconf-set-selections /tmp/debconfLDAP\n\n\t#Thanks to the howto from: http://www.debuntu.org/ldap-server-and-linux-ldap-clients-p2\n\n\texport DEBIAN_FRONTEND=noninteractive\n\n\tapt-get -m --force-yes -qq -y install libnss-ldap libpam-ldap nscd\t\n\n\techo \\\"host $LDAPhost\nbase $baseDN\nrootbinddn cn=admin,$baseDN\\\" > /etc/libnss-ldap.conf\n\n\tcat /etc/libnss-ldap.conf > /etc/pam_ldap.conf\n\npam configuration files need to be modfied a bit like:\n\n\techo \\\"account sufficient pam_ldap.so\naccount required pam_unix.so\nsession required pam_mkhomedir.so umask=0022 skel=/etc/skel/ silent\\\" > /etc/pam.d/common-account\n\n\techo \\\"auth sufficient pam_ldap.so\nauth required pam_unix.so nullok_secure use_first_pass\\\" > /etc/pam.d/common-auth\n\n\techo \\\"password sufficient pam_ldap.so\npassword required pam_unix.so nullok obscure min=4 md5\\\" > /etc/pam.d/common-password\n\n\techo \\\"session sufficient pam_ldap.so\nsession required pam_unix.so\nsession optional pam_foreground.so\\\" > /etc/pam.d/common-session\n\n\n\techo \\\"BASE dc=$baseDN\nURI ldap://$LDAPhost\\\" > /etc/ldap/ldap.conf\n\n\");\n\n\tCLCFG_patchNsswitchForLDAP();\n}", "title": "" }, { "docid": "eecd534c1273eaa01fd7f57a419543a7", "score": "0.4710153", "text": "public function listDomainResources(){\n return libvirt_list_domain_resources($this->connection);\n }", "title": "" }, { "docid": "0a61373670c59591bfe44bf143fe9ba2", "score": "0.47074208", "text": "protected function addServers()\n\t{\n\t\t$serversmList = $this->getServers();\n\t\t$retVal = !empty($serversmList);\n\n\t\tforeach ($this->_options['servers'] as $server)\n\t\t{\n\t\t\t$server = explode(':', trim($server));\n\t\t\t$server[0] = !empty($server[0]) ? $server[0] : 'localhost';\n\t\t\t$server[1] = !empty($server[1]) ? $server[1] : 11211;\n\n\t\t\tif (!in_array(implode(':', $server), $serversmList, true))\n\t\t\t{\n\t\t\t\t$retVal |= $this->obj->addServer($server[0], $server[1], $this->_is_persist());\n\t\t\t\t$this->setOptions($server[0], $server[1]);\n\t\t\t}\n\t\t}\n\n\t\treturn $retVal;\n\t}", "title": "" }, { "docid": "653386431c284627f64ed64b422d78ea", "score": "0.4706424", "text": "public function DomainList($filter = array())\n {\n $url = $this->Url(Domain::ResourceName(), $filter);\n return $this->Collection('\\OpenCloud\\DNS\\Domain', $url);\n }", "title": "" }, { "docid": "401719045eac659eb29766822d2ff604", "score": "0.47014448", "text": "protected function getDomains() {\n $domains = [];\n while ($new_domain = $this->askQuestion('New Domain? Leave empty to create cert')) {\n if (strpos($new_domain, '.stanford.edu') === FALSE) {\n $this->say('Invalid domain. Must be a stanford domain.');\n continue;\n }\n if (strpos($new_domain, 'http') !== FALSE) {\n $this->say('Invalid domain. Do not include the domain protocol.');\n continue;\n }\n $domains[] = trim($new_domain, ' /\\\\');\n }\n return $domains;\n }", "title": "" }, { "docid": "6077d18c7040a5ccf428b782aa815b70", "score": "0.46970513", "text": "public function humsciLetsEncryptAdd($environment = 'dev', $options = ['domains' => []]) {\n if (!in_array($environment, ['dev', 'test', 'prod'])) {\n $this->say('invalid environment');\n return;\n }\n\n $domains = $this->humsciLetsEncryptList($environment);\n\n $this->say('Existing domains on the cert:' . PHP_EOL . implode(PHP_EOL, $domains));\n\n $domains = array_merge($domains, $options['domains']);\n $domains = array_merge($domains, $this->getDomains());\n $domains = array_unique($domains);\n $this->removeDomains($domains);\n\n $primary_domain = array_shift($domains);\n asort($domains);\n $domains = \"-d $primary_domain -d \" . implode(' -d ', $domains);\n\n $directory = \"/mnt/gfs/swshumsci.$environment/files/\";\n $shell_command = \"cd ~ && .acme.sh/acme.sh --issue $domains -w $directory\";\n $php_command = \"return shell_exec('$shell_command');\";\n $this->taskDrush()\n ->alias($this->getConfigValue('drush.aliases.remote'))\n ->drush('eval')\n ->arg($php_command)\n ->run();\n }", "title": "" }, { "docid": "9fc443baf5117d7246dae78a0ad02d19", "score": "0.46826592", "text": "public function getDomains()\n {\n // options array\n $options = array(0 => $GLOBALS['TL_LANG']['tl_short_urls']['noDomain'] );\n\n // get the root pages and their dns settings\n if( version_compare( VERSION, '3.5', '>=' ) )\n {\n if( ( $objPages = \\PageModel::findPublishedRootPages() ) !== null )\n while( $objPages->next() )\n if( $objPages->dns )\n $options[$objPages->id] = $objPages->dns; \n }\n else\n {\n $t = \\PageModel::getTable();\n $arrColumns = array(\"$t.type=?\");\n\n if (!BE_USER_LOGGED_IN)\n {\n $time = time();\n $arrColumns[] = \"($t.start='' OR $t.start<='$time') AND ($t.stop='' OR $t.stop>'\" . ($time + 60) . \"') AND $t.published='1'\";\n }\n\n $objPages = \\PageModel::findBy($arrColumns, 'root');\n\n if( $objPages !== null )\n while( $objPages->next() )\n if( $objPages->dns )\n $options[$objPages->id] = $objPages->dns;\n }\n\n // return the options\n return $options;\n }", "title": "" }, { "docid": "6945fae10d9eb3717b0f2eab2a9f7e59", "score": "0.46765354", "text": "protected function _buildListSelect($options)\n\t{\n\t\t$select = array();\n\n\t\t// get the layout option from params\n\t\t$layout = $this->_getOption('layout', $options);\n\t\tswitch ($layout)\n\t\t{\n\t\t\tdefault:\n\t\t\t\t$select[] = ' select u1.*, pg.pageid as pageid, count(a.`alias`) as aliases';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// add from clause\n\t\t$select[] = 'from ' . $this->_getTableName() . ' as u1';\n\n\t\t// aggregate clauses\n\t\t$select = (count($select) ? implode(' ', $select) : '');\n\n\t\treturn $select;\n\t}", "title": "" }, { "docid": "85580b9011d7159ad3c165b4c9fb1f5b", "score": "0.4676098", "text": "function processOpts( $options ) {\n\t// Check if help is called for\n\tif( isset( $options['h'] ) || isset( $options['help'] ) ) {\n\t\tdisplayHelp();\n\t}\t\n\n\t// check if we got proper source email\n\tif( !isset( $options['s'] ) || isset( $options['source'] ) ) {\n\t\tfatal( \"Source account is a mandatory argument\" );\n\t}\n if( isset( $options['source'] ) ) {\n\t $options['s'] = $options['source'];\n }\n\n\tif( FALSE === filter_var( $options['s'], FILTER_VALIDATE_EMAIL ) ) {\n\t\tfatal( \"Source account string is not a valid email address\" );\n\t} \n\t\t\n\t// check if we got proper destination email\n\tif( !isset( $options['d'] ) || isset( $options['destination'] ) ) {\n\t\tfatal( \"Source account is a mandatory argument\" );\n\t}\n if( isset( $options['destination'] ) ) {\n $options['s'] = $options['destination'];\n }\n\n\tif( FALSE === filter_var( $options['d'], FILTER_VALIDATE_EMAIL ) ) {\n\t\tfatal( \"Source account string is not a valid email address\" );\n\t} \n\t\n\n\treturn $options;\n}", "title": "" }, { "docid": "68ad30968cd7f29b28560fbbbf9aca21", "score": "0.46706635", "text": "public static function getall_server() { return is_array(self::$server) ? self::$server : array(); }", "title": "" }, { "docid": "56ab72ce9c01b902e469cf5ad61120ec", "score": "0.46697143", "text": "function onlineserver_RegisterNameserver($params)\n{\n // user defined configuration values\n $url = $params['Url'];\n $username = $params['Username'];\n $password = $params['Password'];\n\n // domain parameters\n $sld = $params['sld'];\n $tld = $params['tld'];\n\n // nameserver parameters\n $nameserver = $params['nameserver'];\n $ipAddress = $params['ipaddress'];\n\n $postfields=[\n 'username'=>$username,\n 'password'=>$password,\n 'data'=>[\n 'name' => $nameserver,\n 'ip' => $ipAddress,\n 'domain'=> [\n 'name' => $sld,\n 'extension' => $tld\n ],\n ]\n ];\n try {\n $api = new ApiClient();\n $api->call('createNsRequest', $postfields);\n\n return array(\n 'success' => 'success',\n );\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n}", "title": "" }, { "docid": "762ee1c7b6dbfe7c39a6262d31ad895f", "score": "0.46581972", "text": "public function handle()\n {\n\tLog::info(\"*** Checking zones\");\n\t$domains = DNSZone::all();\n\tforeach ($domains as $dom) {\n\t\t$d = $dom->name;\n\t\t$s = $dom->server->ip;\n\t\tLog::info(\"Checking $d on $s\");\n\t\t$all_ns = array();\n\t\t$required_ns = array();\n\t\t$r = new Net_DNS2_Resolver(array('nameservers' => array($s)));\n\t\ttry {\n\t\t\t$result = $r->query($d, 'NS');\n\t\t} catch(Net_DNS2_Exception $e) {\n\t\t\tLog::error(\"::query() NS $d failed: \".$e->getMessage());\n\t\t\tcontinue;\n\t\t}\n\t\t//\n\t\tforeach($result->answer as $nsrr)\n\t\t{\n\t\t\t$ns_name = (string)$nsrr->nsdname;\n\t\t\t$dat = array();\n\t\t\t$dat['name'] = $ns_name;\n\t\t\t$dat['ip'] = array();\n\t\t\t$dat['ip6'] = array();\n\t\t\t$glues = array();\n\t\t\t// If nameserver is GLUE, then lookup all A and AAAA records\n\t\t\tif ($ns_name == $d || $this->endsWith($ns_name, \".$d\")) {\n\t\t\t\tLog::info(\"Getting GLUE A/AAAA records for $ns_name\");\n\t\t\t\ttry {\n\t\t\t\t\t$result = $r->query($ns_name, 'A');\n\t\t\t\t\tforeach($result->answer as $arr) {\n\t\t\t\t\t\t$adr = inet_ntop(inet_pton($arr->address));\n\t\t\t\t\t\tarray_push($dat['ip'], $adr);\n\t\t\t\t\t\tarray_push($glues, $adr);\n\t\t\t\t\t}\n\t\t\t\t} catch(Net_DNS2_Exception $e) {\n\t\t\t\t\tLog::error(\"::query() A $ns_name failed: \".$e->getMessage());\n\t\t\t\t\tcontinue 2;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\t$result = $r->query($ns_name, 'AAAA');\n\t\t\t\t\tforeach($result->answer as $arr) {\n\t\t\t\t\t\t$adr = inet_ntop(inet_pton($arr->address));\n\t\t\t\t\t\tarray_push($dat['ip6'], $adr);\n\t\t\t\t\t\tarray_push($glues, $adr);\n\t\t\t\t\t}\n\t\t\t\t} catch(Net_DNS2_Exception $e) {\n\t\t\t\t\tLog::error(\"::query() AAAA $ns_name failed: \".$e->getMessage());\n\t\t\t\t\tcontinue 2;\n\t\t\t\t}\n\t\t\t}\n\t\t\tarray_push($all_ns, $dat);\n\t\t\t$ip_addon = '';\n\t\t\tif (sizeof($glues) > 0) {\n\t\t\t\tsort($glues);\n\t\t\t\t$ip_addon = ' '.implode(' ', $glues);\n\t\t\t}\n\t\t\tarray_push($required_ns, $ns_name.$ip_addon);\n\t\t}\n\n\t\tsort($required_ns);\n\n\t\t$all_cdnskey_rr = array();\n\t\t$required_cdnskey = array();\n\t\ttry {\n\t\t\t$result = $r->query($d, 'CDNSKEY');\n\t\t} catch(Net_DNS2_Exception $e) {\n\t\t\tLog::error(\"::query() CDNSKEY failed: \".$e->getMessage());\n\t\t\tcontinue;\n\t\t}\n\t\tforeach($result->answer as $cdnskeyrr) {\n\t\t\tarray_push($all_cdnskey_rr, $cdnskeyrr);\n\t\t\tarray_push($required_cdnskey, $cdnskeyrr->flags.' '.$cdnskeyrr->algorithm.' '.$cdnskeyrr->key);\n\t\t}\n\n\t\t$processedString = view('autodns_0105', ['name' => $d])->render();\n\n\t\tLog::info(\"Sending 0105 for $d\");\n\n\t\t$aResponse = $this->requestCurl($processedString);\n\n\t\tif ($aResponse == false || $aResponse == '') {\n\t\t\tLog::info(\"Inquire for $d failed\");\n\t\t\tcontinue;\n\t\t}\n\n\t\t$xml = new \\SimpleXMLElement($aResponse);\n\n\t\t$status = (string)$xml->result->status->type;\n\t\tif ($status != 'success') {\n\t\t\tLog::info(\"Inquire $d $status\");\n\t\t\tcontinue;\n\t\t}\n\t\t$autodns_ns = array();\n\t\tforeach ($xml->result->data->domain->nserver as $ns) {\n\t\t\t$glues = array();\n\t\t\tforeach ($ns->ip as $i) {\n\t\t\t\tarray_push($glues, inet_ntop(inet_pton($i)));\n\t\t\t}\n\t\t\tforeach ($ns->ip6 as $i) {\n\t\t\t\tarray_push($glues, inet_ntop(inet_pton($i)));\n\t\t\t}\n\t\t\t$ip_addon = '';\n\t\t\tif (sizeof($glues) > 0) {\n\t\t\t\tsort($glues);\n\t\t\t\t$ip_addon = ' '.implode(' ', $glues);\n\t\t\t}\n\t\t\tarray_push($autodns_ns, ((string)$ns->name).$ip_addon);\n\t\t}\n\t\tsort($autodns_ns);\n\n\t\t$ns_update = false;\n\t\tif (sizeof(array_diff($required_ns, $autodns_ns)) == 0 && sizeof(array_diff($autodns_ns, $required_ns)) == 0) {\n\t\t\tLog::info(\"Namserver for $d equal AutoDNS\");\n\t\t} else {\n\t\t\tLog::info(\"Namserver for $d differ\");\n\t\t\t$ns_update = true;\n\t\t}\n\n\t\t$autodns_dnskey = array();\n\t\tforeach ($xml->result->data->domain->dnssec as $ds) {\n\t\t\tarray_push($autodns_dnskey, $ds->flags.' '.$ds->algorithm.' '.$ds->publickey);\n\t\t}\n\n\t\t$ds_update = false;\n\t\tif (sizeof($required_cdnskey) == 0) {\n\t\t\tLog::info(\"No CDNSKEY present for $d, will not update DNSKEY\");\n\t\t} else if (sizeof(array_diff($required_cdnskey, $autodns_dnskey)) == 0 && sizeof(array_diff($autodns_dnskey, $required_cdnskey)) == 0) {\n\t\t\tLog::info(\"DNSKEY for $d present in AutoDNS\");\n\t\t} else {\n\t\t\t$ds_update = true;\n\t\t\tLog::info(\"DNSKEY update required for $d\");\n\t\t}\n\t\tif ($ns_update || $ds_update) {\n\t\t\t$function_code = '0102';\n\t\t\tif ($ns_update && $ds_update) {\n\t\t\t} else if ($ns_update) {\n\t\t\t\t$function_code = '0102008';\n\t\t\t} else {\n\t\t\t\t$function_code = '0102007';\n\t\t\t}\n\t\t\t$processedString = view('autodns_0102', [\n\t\t\t\t'function_code' => $function_code,\n\t\t\t\t'name' => $d,\n\t\t\t\t'ns' => $ns_update ? $all_ns : array(),\n\t\t\t\t'dnskey' => $all_cdnskey_rr,\n\t\t\t])->render();\n\t\t\tLog::info(\"Sending $function_code $d\");\n\t\t\t$aResponse = $this->requestCurl($processedString);\n\t\t\tif ($aResponse == false || $aResponse == '') {\n\t\t\t\tLog::info(\"Update for $d failed\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$xml = new \\SimpleXMLElement($aResponse);\n\n\t\t\t$status = (string)$xml->result->status->type;\n\t\t\tLog::info(\"Update $d $status\");\n\t\t}\n\t}\n }", "title": "" }, { "docid": "79ce596ff6ec0dc63f58ca4f3b7e2dc7", "score": "0.4649909", "text": "function connect($arguments)\n\t{\t\t\t\t\n \t$this->server_name = $arguments['server_name'];\n \t$this->base_dn = $arguments['base_dn'];\n \t$this->min_uid_number = 1000;\n \t$this->min_gid_number = 1000;\n \t\n \t$this->user_filter = (isset($arguments['user_filter'])) ?\n \t\t$arguments['user_filter'] : '(uid=%USERNAME%)';\n\t\t$this->bind_username = (isset($arguments['bind_username'])) ?\n\t\t\t$arguments['bind_username'] : null;\n\t\t$this->bind_password = (isset($arguments['bind_password'])) ?\n\t\t\t$arguments['bind_password'] : null;\n\n\t\t$admin_username = (isset($arguments['admin_username'])) ?\n\t\t\t$arguments['admin_username'] : $this->bind_username;\n\t\t$admin_password = (isset($arguments['admin_password'])) ?\n\t\t\t$arguments['admin_password'] : $this->bind_password;\n\n\t\tif ($this->server_name == null || $this->base_dn == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->conn = ldap_connect($this->server_name);\n\t\tif (ldap_errno($this->conn) !== 0 | $this->conn === FALSE) {\n\t\t\ttrigger_error(ldap_error($this->conn), E_USER_ERROR);\n\t\t}\n\t\t\n\t\t$result = ldap_set_option($this->conn, LDAP_OPT_PROTOCOL_VERSION, 3);\n\t\tif ($result === FALSE) {\n\t\t\ttrigger_error(ldap_error($this->conn), E_USER_ERROR);\n\t\t}\n \t$result = ldap_set_option($this->conn, LDAP_OPT_DEREF, LDAP_DEREF_ALWAYS);\n \tif ($result === FALSE) {\n\t\t\ttrigger_error(ldap_error($this->conn), E_USER_ERROR);\n\t\t}\n \t\n \t// @ldap_start_tls($this->conn);\n \t$result = ldap_bind($this->conn, $this->bind_username, $this->bind_password);\n \tif ($result == FALSE) {\n \t\treturn false;\n \t}\n \t\n\t\tif ($this->bind_username == $admin_username) {\n\t\t\t$this->priv_conn =& $this->conn;\n\t\t} else {\n\t\t\t$this->priv_conn = ldap_connect('ldap://' .$this->server_name, 389);\n\t\t\tldap_set_option($this->priv_conn, LDAP_OPT_PROTOCOL_VERSION, 3);\n\t \tldap_set_option($this->priv_conn, LDAP_OPT_DEREF, LDAP_DEREF_ALWAYS);\n\t \t// @ldap_start_tls($this->priv_conn);\n\t \t$result = ldap_bind($this->priv_conn, $admin_username, $admin_password);\n\t \tif ($result == FALSE) {\n\t \t\treturn false;\n\t \t}\n\t\t}\n\t\t\n \treturn true;\n }", "title": "" }, { "docid": "a10a3772f9bb36f3fa66671580f04040", "score": "0.46451056", "text": "private function buildOptions($options)\n {\n if ($options[0] == null)\n {\n $fOptions = '';\n }\n else\n {\n $fOptions = \"field_list=$options[0]&\";\n }\n if ($options[1] == null)\n {\n $rOptions = '';\n }\n else\n {\n $rOptions = \"resources=$options[1]&\";\n }\n $oReturn = $rOptions . $fOptions;\n\n return $oReturn;\n }", "title": "" }, { "docid": "1f257bff0e3c0e65e8099c2bbf5c400e", "score": "0.46409842", "text": "public function getServers() {\n $result = $this->con->exec('list servers');\n\n // check if we got what we want\n if($result[0] == 'Servers.') {\n $data = array();\n // start at line 4, because everything before is just table-header and stuff and stop a little bit earlier\n for($i = 4; $i <= (sizeof($result)-3); $i++) {\n $parse_line = preg_split('/\\W+\\|\\W+/', $result[$i]);\n $data[] = array('name' => $parse_line[0], 'address' => $parse_line[1], 'port' => $parse_line[2],\n 'connections' => $parse_line[3], 'status' => $parse_line[4]);\n }\n\n return $data;\n } else {\n die('unable to get server-data. Result was: '.var_dump($result));\n }\n }", "title": "" }, { "docid": "137a6a6832c6222f80562eb95f7f8d53", "score": "0.46400025", "text": "function whois_query($domain) {\n\t\t$domain = strtolower(trim($domain));\n\t\t$domain = preg_replace('/^http:\\/\\//i', '', $domain);\n\t\t$domain = preg_replace('/^www\\./i', '', $domain);\n\t\t$domain = explode('/', $domain);\n\t\t$domain = trim($domain[0]);\n\n\t\t// split the TLD from domain name\n\t\t$_domain = explode('.', $domain);\n\t\t$lst = count($_domain)-1;\n\t\t$ext = $_domain[$lst];\n\n\t\t// You find resources and lists\n\t\t// like these on wikipedia:\n\t\t//\n\t\t// http://de.wikipedia.org/wiki/Whois\n\t\t//\n\t\t$servers = array(\n\t\t\t\"biz\" => \"whois.neulevel.biz\",\n\t\t\t\"com\" => \"whois.internic.net\",\n\t\t\t\"us\" => \"whois.nic.us\",\n\t\t\t\"coop\" => \"whois.nic.coop\",\n\t\t\t\"info\" => \"whois.nic.info\",\n\t\t\t\"name\" => \"whois.nic.name\",\n\t\t\t\"net\" => \"whois.internic.net\",\n\t\t\t\"gov\" => \"whois.nic.gov\",\n\t\t\t\"edu\" => \"whois.internic.net\",\n\t\t\t\"mil\" => \"rs.internic.net\",\n\t\t\t\"int\" => \"whois.iana.org\",\n\t\t\t\"ac\" => \"whois.nic.ac\",\n\t\t\t\"ae\" => \"whois.uaenic.ae\",\n\t\t\t\"at\" => \"whois.ripe.net\",\n\t\t\t\"au\" => \"whois.aunic.net\",\n\t\t\t\"be\" => \"whois.dns.be\",\n\t\t\t\"bg\" => \"whois.ripe.net\",\n\t\t\t\"br\" => \"whois.registro.br\",\n\t\t\t\"bz\" => \"whois.belizenic.bz\",\n\t\t\t\"ca\" => \"whois.cira.ca\",\n\t\t\t\"cc\" => \"whois.nic.cc\",\n\t\t\t\"ch\" => \"whois.nic.ch\",\n\t\t\t\"cl\" => \"whois.nic.cl\",\n\t\t\t\"cn\" => \"whois.cnnic.net.cn\",\n\t\t\t\"cz\" => \"whois.nic.cz\",\n\t\t\t\"de\" => \"whois.nic.de\",\n\t\t\t\"fr\" => \"whois.nic.fr\",\n\t\t\t\"hu\" => \"whois.nic.hu\",\n\t\t\t\"ie\" => \"whois.domainregistry.ie\",\n\t\t\t\"il\" => \"whois.isoc.org.il\",\n\t\t\t\"in\" => \"whois.ncst.ernet.in\",\n\t\t\t\"ir\" => \"whois.nic.ir\",\n\t\t\t\"mc\" => \"whois.ripe.net\",\n\t\t\t\"to\" => \"whois.tonic.to\",\n\t\t\t\"tv\" => \"whois.tv\",\n\t\t\t\"ru\" => \"whois.ripn.net\",\n\t\t\t\"org\" => \"whois.pir.org\",\n\t\t\t\"aero\" => \"whois.information.aero\",\n\t\t\t\"nl\" => \"whois.domain-registry.nl\"\n\t\t\t);\n\n\t\tif (!isset($servers[$ext])){\n\t\t\tdie('Error: No matching nic server found!');\n\t\t}\n\n\t\t$nic_server = $servers[$ext];\n\n\t\t$output = '';\n\n\t\t// connect to whois server:\n\t\tif ($conn = fsockopen ($nic_server, 43)) {\n\t\t\tfputs($conn, $domain.\"\\r\\n\");\n\t\t\twhile(!feof($conn)) {\n\t\t\t\t$output .= fgets($conn,128);\n\t\t\t}\n\t\t\tfclose($conn);\n\t\t}\n\t\telse { die('Error: Could not connect to ' . $nic_server . '!'); }\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "2b26232041c676b951bd39dbc9435a1a", "score": "0.4628437", "text": "function hostcontrol_GetDNS($params)\n{\n $api_client = new HostControlAPIClient(HostControlHelper::getApiUrl($params), $params['ApiKey']);\n $domainname = strtolower($params[\"sld\"] . \".\" . $params[\"tld\"]);\n\n try\n {\n $dns = $api_client->domain->getDNSRecords($domainname);\n }\n catch(HostControlAPIClientError $e)\n {\n HostControlHelper::debugLog($params, 'domain-get-dns-records', array($domainname), $e);\n return array('error' => $e->getMessage());\n }\n\n $dns_records = array();\n foreach($dns->records as $record)\n {\n /* Filter some DNS types */\n if(in_array($record->type, HostControlHelper::get_ignored_dns_types()))\n {\n continue;\n }\n\n $dns_records[] = array(\n \"hostname\" => $record->name,\n \"type\" => $record->type,\n \"address\" => $record->content,\n \"ttl\" => $record->ttl,\n \"priority\" => $record->prio,\n );\n }\n\n return $dns_records;\n}", "title": "" }, { "docid": "8bfc326ca311063be522f48cc05aa6db", "score": "0.46237838", "text": "function onlineserver_SaveContactDetails($params)\n{\n // user defined configuration values\n $url = $params['Url'];\n $username = $params['Username'];\n $password = $params['Password'];\n\n // domain parameters\n $sld = $params['sld'];\n $tld = $params['tld'];\n\n // whois information\n $contactDetails = $params['contactdetails'];\n\n\n // Build post data\n $toTranslate=['First Name','Last Name','Company Name','Address 1','City'];\n $types=['Registrant','Technical','Billing','Admin'];\n foreach ($types as $type){\n foreach ($contactDetails[$type] as $key=>$detail){\n if(in_array($detail,$toTranslate)){\n $contactDetails[$type][$key]=translate($detail);\n }\n }\n $contactDetails[$type]['phoneNumber']=phoneNumber($contactDetails[$type]['Phone Number']);\n $contactDetails[$type]['initials']= substr($contactDetails[$type]['First Name'], 0, 1) . '.' . substr($contactDetails[$type]['Last Name'], 0, 1);\n }\n $contact=[];\n foreach ($types as $type){\n $contact[$type]=[\n 'companyName'=>$contactDetails[$type]['Company Name'],\n 'name'=>[\n 'initials' => $contactDetails[$type]['initials'],\n 'firstName' => $contactDetails[$type]['First Name'],\n 'lastName' => $contactDetails[$type]['Last Name']\n ],\n 'gender'=>'m',\n \"phone\"=>[\n 'countryCode' => $contactDetails[$type]['phoneNumber']['countryCode2'],\n 'areaCode' => $contactDetails[$type]['phoneNumber']['areaCode'],\n 'subscriberNumber'=> $contactDetails[$type]['phoneNumber']['phoneNumber']\n ],\n 'address' => [\n 'street' => $contactDetails[$type]['Address 1'],\n 'number' => \"1\",\n 'zipcode' => $contactDetails[$type]['Postcode'],\n 'state' => $contactDetails[$type]['State'],\n 'city' => $contactDetails[$type]['City'],\n 'country' => $contactDetails[$type]['Country']\n ],\n \"email\" => $contactDetails[$type]['Email Address'],\n ];\n }\n //$companyName=\n $postfields=[\n 'username'=>$username,\n 'password'=>$password,\n 'data'=>[\n 'contact'=>$contact,\n 'domain'=> [\n 'name' => $sld,\n 'extension' => $tld\n ],\n ]\n ];\n\n try {\n $api = new ApiClient();\n $api->call('UpdateWhoisInformation', $postfields);\n\n return array(\n 'success' => true,\n );\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n}", "title": "" }, { "docid": "27582d4062c6405717ef00960f9e3494", "score": "0.4622613", "text": "function onlineserver_SaveDNS($params)\n{\n // user defined configuration values\n $url = $params['Url'];\n $username = $params['Username'];\n $password = $params['Password'];\n\n // domain parameters\n $sld = $params['sld'];\n $tld = $params['tld'];\n\n // dns record parameters\n $dnsrecords = $params['dnsrecords'];\n $newRecords=[];\n foreach ($dnsrecords as $dnsrecord){\n if (empty($dnsrecord['address'])){\n continue;\n }\n $newRecords[]=[\n 'type' => $dnsrecord['type'],\n 'name' => $dnsrecord['hostname'],\n 'value' => $dnsrecord['address'],\n 'prio' => $dnsrecord['priority'],\n 'ttl' => 86400\n ];\n }\n\n $postfields=[\n 'username'=>$username,\n 'password'=>$password,\n 'data'=>[\n 'domain'=> [\n 'name' => $sld,\n 'extension' => $tld\n ],\n 'records' => $newRecords,\n ]\n ];\n //var_dump(json_encode($postfields));\n try {\n $api = new ApiClient();\n $api->call('modifyZoneDnsRequest', $postfields);\n\n return array(\n 'success' => 'success',\n );\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n}", "title": "" }, { "docid": "40228730d3ed9bce0eeb5f4b3a57d602", "score": "0.46176767", "text": "function isServerOk() {\n\tglobal $servers;\n\t$server_id = 1;\n\t$ldapserver = new LDAPServer($server_id);\n\t#$dn = $ldapserver->getSchemaDN();\n\t#if ($dn == \"\")\n\t#\terrorAndOut(\"Cant see the Schema DN (maybe wrong server credentials?).\");\n\n\treturn $ldapserver;\n}", "title": "" }, { "docid": "482f320bd94976072a6b405973b510b6", "score": "0.4605487", "text": "public function get_net_dns_server_import($p_value)\n {\n if (is_array($p_value[C__DATA__VALUE]))\n {\n $l_data = $p_value[C__DATA__VALUE];\n $l_dao_ip = isys_cmdb_dao_category_g_ip::instance($this->m_database);\n $l_return = [];\n foreach ($l_data as $l_value)\n {\n if (array_key_exists($l_value['id'], $this->m_object_ids))\n {\n $l_sql = 'SELECT isys_catg_ip_list__id FROM isys_catg_ip_list ' . 'INNER JOIN isys_cats_net_ip_addresses_list ON isys_cats_net_ip_addresses_list__id = isys_catg_ip_list__isys_cats_net_ip_addresses_list__id ' . 'WHERE isys_catg_ip_list__isys_obj__id = ' . $l_dao_ip->convert_sql_id(\n $this->m_object_ids[$l_value['id']]\n ) . ' ' . 'AND isys_cats_net_ip_addresses_list__title = ' . $l_dao_ip->convert_sql_text($l_value['ref_title']);\n\n $l_res = $l_dao_ip->retrieve($l_sql);\n if ($l_res && $l_res->num_rows() > 0)\n {\n $l_row = $l_res->get_row();\n $l_return[] = $l_row['isys_catg_ip_list__id'];\n }\n else\n {\n $l_return[] = $l_dao_ip->create(\n $this->m_object_ids[$l_value['id']],\n '',\n null,\n $l_value['ref_title'],\n '',\n null,\n '',\n '',\n null,\n null,\n null,\n '',\n C__RECORD_STATUS__NORMAL\n );\n } // if\n } // if\n } // foreach\n\n return $l_return;\n } // if\n return null;\n }", "title": "" }, { "docid": "f6297a1a472f0f8a57f29bea110eeb17", "score": "0.46006075", "text": "protected function configureNetworkDNS()\n {\n $this->cli->powershell(implode(';', [\n '(Get-NetIPAddress -AddressFamily IPv4).InterfaceIndex | ForEach-Object {Set-DnsClientServerAddress -InterfaceIndex $_ -ServerAddresses (\\\"127.0.0.1\\\", \\\"8.8.8.8\\\")}',\n '(Get-NetIPAddress -AddressFamily IPv6).InterfaceIndex | ForEach-Object {Set-DnsClientServerAddress -InterfaceIndex $_ -ServerAddresses (\\\"::1\\\", \\\"2001:4860:4860::8888\\\")}',\n ]));\n }", "title": "" }, { "docid": "019620a1bdf4487ce7ec75099d3837be", "score": "0.4600367", "text": "public function getSubdomains()\n {\n\n //Editable Subdomains\n $subdomains = [];\n\n //Get All Agent Subdomains\n if ($this->getAuthorization('subdomain', 'manage_all')) {\n $queryCMSAgents = $this->db->prepare('SELECT `id`, `cms_link` FROM `' . LM_TABLE_AGENTS . '` WHERE `cms` = \"true\" ORDER BY `cms_link`');\n $queryCMSAgents->execute();\n $cms_agents = $queryCMSAgents->fetchAll();\n foreach ($cms_agents as $cms_agent) {\n $subdomains[] = ['name' => $cms_agent['cms_link'], 'id' => $cms_agent['id'], 'type' => 'agent'];\n }\n\n //Get This Agents Subdomain\n } else if ($this->getAuthorization('subdomain', 'manage')) {\n $subdomains[] = ['name' => $this->auth->info('cms_link'), 'id' => $this->auth->info('id'), 'type' => 'agent'];\n }\n\n //Get All Team Subdomains\n if ($this->getAuthorization('teams', 'manage')) {\n $queryCMSTeams = $this->db->prepare('SELECT `id`, `subdomain_link` FROM `' . TABLE_TEAMS . '` WHERE `subdomain` = \"true\" ORDER BY `subdomain_link`');\n $queryCMSTeams->execute();\n $cms_teams = $queryCMSTeams->fetchAll();\n foreach ($cms_teams as $cms_team) {\n $subdomains[] = ['name' => $cms_team['subdomain_link'], 'id' => $cms_team['id'], 'type' => 'team'];\n }\n\n //Get This Agents Subdomain\n } else if ($this->getAuthorization('subdomain', 'manage')) {\n $team_subdomains = [];\n $teams = Backend_Team::getTeams($this->auth->info('id'), [Backend_Team::PERM_EDIT_SUBDOMAIN], null, true);\n foreach ($teams as $team) {\n $subdomains[] = ['name' => $team['subdomain_link'], 'id' => $team['id'], 'type' => 'team'];\n }\n usort(\n $team_subdomains,\n function ($a, $b) {\n if ($a['name'] == $b['name']) {\n return 0;\n }\n return ($a['name'] < $b['name']) ? -1 : 1;\n }\n );\n array_merge($subdomains, $team_subdomains);\n }\n\n // Append Domain if Allowed\n if ($this->getAuthorization('cms', 'homepage')) {\n array_unshift($subdomains, ['name' => Settings::getInstance()->SETTINGS['URL'], 'id' => '1', 'type' => 'domain']);\n }\n return $subdomains;\n }", "title": "" }, { "docid": "94fd0d1d2a8c11cf029c9ac8eb8ade46", "score": "0.45878527", "text": "function hostcontrol_RegisterDomain($params = array())\n{\n\n $api_client = new HostControlAPIClient(HostControlHelper::getApiUrl($params), $params['ApiKey']);\n $domainname = strtolower($params[\"sld\"] . \".\" . $params[\"tld\"]);\n\n /* Get or create BackOffice customer ID */\n try\n {\n $hostcontrol_customer_id = HostControlHelper::get_or_create_hostcontrol_customer_id($params, $api_client);\n }\n catch(HostControlHelperError $e)\n {\n return array('error' => 'Could not create account for your domain: ' . $e->getMessage());\n }\n //interval changed to 12 month to bypass domain register for more than 1 years error\n $interval = 12;\n $privacy_protect = (empty($params[\"idprotection\"])?false:true);\n\n try\n {\n \n $api_client->domain->register(\n $hostcontrol_customer_id,\n $domainname,\n $interval,\n $privacy_protect\n );\n }\n catch(HostControlAPIClientError $e)\n {\n $request = array($hostcontrol_customer_id, $domainname, $interval, $privacy_protect);\n HostControlHelper::debugLog($params, 'register-domain', $request, $e);\n\n return array('error' => $e->getMessage());\n }\n\n //do renew for n-1 registeration period \n $regp=$params[\"regperiod\"];\n if ($regp>1) {\n \n for ($i=0 ;$i<$regp-1 ; $i++) { \n \n $interval = 12;\n\n try\n {\n \n $api_client->domain->renew($domainname, $interval);\n }\n catch(HostControlAPIClientError $e)\n {\n HostControlHelper::debugLog($params, 'renew-domain', array($domainname, $interval), $e);\n return array('error' => $e->getMessage());\n }\n\n\n\n }\n }\n\n /* It seems that domain registration succeeded, now update nameservers */\n sleep(1.5);\n $change_ns = hostcontrol_SaveNameservers($params);\n if($change_ns !== true)\n {\n $error_msg = 'Nameserver not set because of 500 error';\n if(is_array($change_ns) && array_key_exists('error', $change_ns))\n {\n $error_msg = $change_ns['error'];\n }\n\n HostControlHelper::debugLog(\n $params,\n 'register-domain-set-nameserver',\n 'Set nameserver for just registered domain ' . $domainname,\n $error_msg\n );\n }\n\n return true;\n}", "title": "" }, { "docid": "360f2dee4f23a32809eff965f4808c13", "score": "0.45779076", "text": "function portal_generate_member_option_list() {\n\n\tglobal $portal_config;\n\n\t$list = '';\n\t\n\t$members = portal_get_members();\n\t\n\tif (count($members) > 0) {\n\t\n\t\tfor ($i = 0; $i < count($members); $i++) {\n\t\t\n\t\t\t$role = '';\n\t\t\n\t\t\t//if (preg_match('~^no-email~', $members[$i]['member_email'])) {\n\t\t\tif ($members[$i]['member_type'] == 'student') {\n\t\t\t\t$role = ' - student';\n\t\t\t} else {\n\t\t\t\t$role = ' (' . $members[$i]['member_email'] . ') - ' . $members[$i]['member_type'];\n\t\t\t}\n\t\t\n\t\t\t$list .= '\n\t\t\t<option value=\"' . $members[$i]['member_id'] . '\">' . $members[$i]['member_last_name'] . ', ' . $members[$i]['member_first_name'] . $role . '</option>\n\t\t\t';\n\t\t\n\t\t}\n\t\t\n\t}\n\t\n\treturn $list;\n\n}", "title": "" }, { "docid": "db63c3435db48bba49efd146596fa53f", "score": "0.4572577", "text": "public function humsciAddDomain() {\n\n $username = $this->askQuestion('Acquia Username. Usually an email', '', TRUE);\n $password = $this->askHidden('Acquia Password');\n\n $new_domains = [];\n while ($domain = $this->askQuestion('Domain to add. Leave empty when done')) {\n while (empty($environment = $this->askChoice('Which environment', [\n 'dev',\n 'test',\n 'prod',\n ], ''))) {\n continue;\n }\n $url = \"{$this->apiEndpoint}/sites/devcloud:swshumsci/envs/$environment/domains/$domain.json\";\n\n $this->say($url);\n\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($curl, CURLOPT_USERPWD, \"$username:$password\");\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($curl, CURLOPT_POST, 1);\n $output = curl_exec($curl);\n curl_getinfo($curl);\n curl_close($curl);\n $this->say($output);\n\n $new_domains[$environment][] = $domain;\n }\n\n foreach ($new_domains as $environment => $domains) {\n $this->humsciLetsEncryptAdd($environment, ['domains' => $domains]);\n }\n }", "title": "" }, { "docid": "18305f173c866dc0911d969401598626", "score": "0.45678875", "text": "public function getServerNames() {\n\t\treturn $this->__getServerNames($this->servers);\n\t}", "title": "" }, { "docid": "54c6c8beae5bcb4a4a3194f318063709", "score": "0.45647714", "text": "function fetchDomains($params)\n {\n\n // Calculate the host\n $host = ($params['Use testing server'])? $this->testHost:$this->liveHost;\n\n // Start the connection\n $opensrs = new OpenSRS($host, $this->connPort, $params['Username'], $params['Private Key'], $this->user);\n\n $return = $opensrs->get_domains_list($params['next']);\n\n return $return;\n }", "title": "" }, { "docid": "c20b5ff353773d53b60dc1beabb5723d", "score": "0.4563806", "text": "function __construct($argv)\n {\n $this->apiKey = (string) $argv[2]; // CF Global API Key\n $hostnames = (string) $argv[3]; // example: example.com.uk---sundomain.example1.com---example2.com\n\n $this->ipv6 = $this->getIpAddressIpify();\n\n if($this->ipv6)\n $this->validateIp((string) $this->ipv6); // Validates IPV6\n\n // Since DSM is only providing an IP(v4) address (DSM 6/7 doesn't deliver IPV6)\n // I override above IPV4 detection & rely on DSM instead for now\n $this->validateIp((string) $argv[4]);\n \n // Before runs DNS update checks API token is valid or not\n if(!$this->isCFTokenValid()) {\n $this->badParam();\n }\n\n // safer than explode: in case of wrong formatting with --- separations (empty elements removed automatically)\n $arHost = preg_split('/(---)/', $hostnames, -1, PREG_SPLIT_NO_EMPTY);\n\n // parse each array element to check if every dns hostname is properly formatted, unset any garbage element\n foreach ($arHost as $value) {\n if(!preg_match(\"/^(?!-)(?:(?:[a-zA-Z\\d][a-zA-Z\\d\\-]{0,61})?[a-zA-Z\\d]\\.){1,126}(?!\\d+)[a-zA-Z\\d]{1,63}$/\", $value)) {\n echo Output::HOSTNAME_FORMAT_INCORRECT;\n exit();\n }\n\n $this->hostList[$value] = [\n 'hostname' => '',\n 'fullname' => $value,\n 'zoneId' => '',\n ];\n }\n\n $this->setZones();\n\n foreach ($this->hostList as $arHost) {\n $this->setRecord($arHost, $this->ipv4, 'A');\n if($this->ipv6) {\n $this->setRecord($arHost, $this->ipv6, 'AAAA');\n }\n }\n }", "title": "" }, { "docid": "3a6c0cb62b947d1a8f665725c1314a35", "score": "0.45627144", "text": "public function parseNameServers($whois=null)\n {\n $whois = strtolower( is_null($whois) ? $this->_rawData : strval($whois) );\n $nameServers = array();\n if ( strpos($whois,'irnic') !== false ) {\n /*\n * IRNIC returns name servers like:\n * nserver:\tns.somehost.com\n */\n $pattern = '/nserver:\\s*(\\S+)/im';\n } else {\n /*\n * who is server version 2 returns detailed name servers at the end\n * of the reponse with IP addresses after the string \"Domain servers in listed order:\".\n * i'm using a second plan to extract just the name from the string\n * like \"Name Server: ns.shomehost.com\" from the first paragraph of the\n * response, if the detailed section could not be found.\n */\n $splittedWhois = explode('domain servers in listed order:', $whois, 2);\n if ( $splittedWhois && is_array($splittedWhois) && (count($splittedWhois) > 1) ) {\n $pattern = '/([A-Za-z0-9\\.]+\\.[A-Za-z0-9\\.]+\\.[A-Za-z0-9]+)(?:\\s+(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})?)/im';\n $whois = $splittedWhois[1];\n } else {\n //$pattern = '/name\\s+server\\s*:?\\s*(\\S+)/im';\n $pattern = '/name +server *: *(\\S+)/im';\n }\n }\n $matches = array();\n $regexResult = preg_match_all($pattern, $whois, $matches, PREG_PATTERN_ORDER);\n if ($regexResult === false) {\n /**\n * @uses Parsonline_Exception_ParseException\n */\n require_once('Parsonline/Exception/ParseException.php');\n throw new Parsonline_Exception_ParseException(\n \"regex engine failed while extracting name servers from whois data.\",\n preg_last_error(), null, $whois, $pattern\n );\n }\n if ($regexResult) {\n /*\n * first matches are names, seconds matches are IP addresses which could be empty.\n * so walk on names, if a matching IP address exists, then collect the IP address\n * and add both to the server array.\n */\n $counter = 0;\n foreach($matches[1] as $m) {\n $m = trim($m);\n if (!$m) continue;\n $server = array('name'=> $m);\n $server['address'] = ( isset($matches[2]) && isset($matches[2][$counter]) && $matches[2][$counter] ) ? $matches[2][$counter] : null;\n array_push($nameServers, $server);\n $counter++;\n }\n }\n return $nameServers;\n }", "title": "" }, { "docid": "1826d82fa5a6b713b95c9f9dbc35f679", "score": "0.45616853", "text": "public function listPoolServersRequest($options)\n {\n // unbox the parameters from the associative array\n $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null;\n $pool_id = array_key_exists('pool_id', $options) ? $options['pool_id'] : null;\n\n // verify the required parameter 'service_id' is set\n if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $service_id when calling listPoolServers'\n );\n }\n // verify the required parameter 'pool_id' is set\n if ($pool_id === null || (is_array($pool_id) && count($pool_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $pool_id when calling listPoolServers'\n );\n }\n\n $resourcePath = '/service/{service_id}/pool/{pool_id}/servers';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($service_id !== null) {\n $resourcePath = str_replace(\n '{' . 'service_id' . '}',\n ObjectSerializer::toPathValue($service_id),\n $resourcePath\n );\n }\n // path params\n if ($pool_id !== null) {\n $resourcePath = str_replace(\n '{' . 'pool_id' . '}',\n ObjectSerializer::toPathValue($pool_id),\n $resourcePath\n );\n }\n\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 (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\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\\Query::build($formParams);\n }\n }\n\n // this endpoint requires API token authentication\n $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key');\n if ($apiToken !== null) {\n $headers['Fastly-Key'] = $apiToken;\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 $operationHosts = [\"https://api.fastly.com\"];\n if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) {\n throw new \\InvalidArgumentException(\"Invalid index {$this->hostIndex} when selecting the host. Must be less than \".sizeof($operationHosts));\n }\n $operationHost = $operationHosts[$this->hostIndex];\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'GET',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "64ca98c7fc57c9d29f45d8bc775f24d9", "score": "0.45581034", "text": "function filter_add($val){\n $domain = $val;\n exec(`sudo sh -c \"echo 'address=/$domain/10.0.0.1' >> /etc/dnsmasq.conf\"`);\n exec('sudo /etc/init.d/dnsmasq restart');\n }", "title": "" }, { "docid": "5dfcf1d9f94db2a3eb70da7480f86ace", "score": "0.4557031", "text": "function nordname_GetDomainInformation($params) {\n // user defined configuration values\n $apiKey = $params['api_key'];\n $sandbox = ($params['sandbox'] == \"on\") ? true : false;\n\n // registration parameters\n $sld = idn_to_ascii($params[\"original\"][\"sld\"]);\n $tld = $params['tld'];\n // Build post data\n $getfields = array(\n 'api_key' => $apiKey\n );\n\n try {\n $api = new ApiClient();\n $reply = $api->call(\"GET\", \"domain/\" . $sld . '.' . $tld, $getfields,\"\", $sandbox);\n \n $nameServers = array();\n $x = 1;\n foreach ($reply[\"nameservers\"] as $ns) {\n $nameServers[\"ns\". $x] = $ns;\n $x++;\n }\n \n return (new Domain)\n ->setDomain($params[\"domainname\"])\n ->setNameservers($nameServers)\n ->setIdProtectionStatus($reply[\"privacy\"])\n ->setRegistrationStatus(normalise_domain_status($reply[\"status\"]))\n ->setTransferLock($reply[\"transferlock\"])\n ->setExpiryDate(Carbon::createFromFormat('Y-m-d H:i:s', $reply[\"expires_at\"]));\n\n } catch (\\Exception $e) {\n return array(\n 'error' => $e->getMessage(),\n );\n }\n}", "title": "" } ]
034eba8c30ff8625767ed751b516aefc
Exclude object from result
[ { "docid": "b5451e00328e02b1351a3ac784e5ac03", "score": "0.0", "text": "public function prune($oStatus_Site = null)\n\t{\n\t\tif ($oStatus_Site) {\n\t\t\t$this->addUsingAlias(OStatus_SitePeer::ID, $oStatus_Site->getId(), Criteria::NOT_EQUAL);\n\t }\n\t \n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "87481cc16a95120f07bbe464371fb110", "score": "0.7681368", "text": "public function _exclude()\n {\n /*if($this->_object->id ) {\n return array(\"id\" => $this->_object->getId());\n } else {\n return array();\n }*/\n }", "title": "" }, { "docid": "d5f81226d122903c47d04895127f786e", "score": "0.7178882", "text": "public function getExcludeObjects()\n {\n return $this->exclude_objects;\n }", "title": "" }, { "docid": "7869c975bed4fe508df1984ac08564d4", "score": "0.66654503", "text": "protected function getExcludeFields() {}", "title": "" }, { "docid": "4c4f7b319507cf25cd00a1f8f9695630", "score": "0.6495181", "text": "public function exclude() {\n\t\t$this->_exclude = TRUE;\n\t}", "title": "" }, { "docid": "695a9ad8105106538a3347e1e93f5f07", "score": "0.63708496", "text": "public function shouldIgnore();", "title": "" }, { "docid": "d41e5045eac1bfb67a385b653cce1450", "score": "0.6298873", "text": "public function excludeReification()\n {\n $this->params[\"include_reification\"] = \"False\";\n \n return($this);\n }", "title": "" }, { "docid": "b70a58564014a853542e67d5babdb839", "score": "0.6273307", "text": "protected function getDoktypeExcludeWhere() {}", "title": "" }, { "docid": "d97d651cd6e5dcd7f79bad7d409f5142", "score": "0.62107784", "text": "public function not() {\n $collection = clone $this;\n foreach(func_get_args() as $uri) {\n if(is_array($uri) or $uri instanceof Traversable) {\n foreach($uri as $u) {\n $collection = $collection->not($u);\n }\n } else if(is_a($uri, 'Page')) {\n // unset by Page object\n unset($collection->data[$uri->id()]);\n } else if(isset($collection->data[$uri])) {\n // unset by URI\n unset($collection->data[$uri]);\n } else if($page = $collection->findBy('uid', $uri)) {\n // unset by UID\n unset($collection->data[$page->id()]);\n }\n }\n return $collection;\n }", "title": "" }, { "docid": "449c68b2d6f16e957fb43fa25746a255", "score": "0.61143297", "text": "protected function getExcluded()\n\t{\n\t\treturn null;\n\t}", "title": "" }, { "docid": "449c68b2d6f16e957fb43fa25746a255", "score": "0.61143297", "text": "protected function getExcluded()\n\t{\n\t\treturn null;\n\t}", "title": "" }, { "docid": "7a470e2ea1a0a34f6e83857384ff5ad7", "score": "0.60281223", "text": "public function getAllowedExcludeFields() {}", "title": "" }, { "docid": "499cb303460f7cdabba818334fff7c51", "score": "0.60165423", "text": "public function skipProperties() {}", "title": "" }, { "docid": "2f101340dbcb8e68b889cf7d8e07a23e", "score": "0.60150445", "text": "public function exceptAll(): static\n\t{\n\t\treturn $this->setOperation('EXCEPT ALL');\n\t}", "title": "" }, { "docid": "abd433346f263b32ab869f26841206fb", "score": "0.59965694", "text": "public function exclude()\n {\n return $this->exclude;\n }", "title": "" }, { "docid": "a150054ba3faf9ad69636a67235ab162", "score": "0.5974872", "text": "public function noDetail(){\n $with = Tender::with('detail')->has('detail')->pluck('id')->toArray();\n $tender = Tender::all()->except($with);\n return $tender;\n }", "title": "" }, { "docid": "80ddfca867236d08c93dad7d2b8dc10b", "score": "0.59540653", "text": "public function not($selector) {\n\t\t// Same as filterData, but for public interface with the $not option specifically set to \"true\".\n\t\treturn $this->filterData($selector, true); \n\t}", "title": "" }, { "docid": "bd3f467f8b3f81f31baa98389cc900ca", "score": "0.590615", "text": "public static function ignoreMorphables();", "title": "" }, { "docid": "0db68913a7e5e331817dd34c1a7bfca0", "score": "0.5863785", "text": "public static function exclude(): array\n {\n return ['survey', 'respondentid'];\n }", "title": "" }, { "docid": "039cf8504436170e42f68813ca4f0726", "score": "0.5859976", "text": "private function getExcludeFields() {\n\t\tif (!empty($this->form)) $this->form->excludeFields = $this->excludeFields;\n\t}", "title": "" }, { "docid": "17b85edf69edfb6f7a862bc89c639443", "score": "0.5808859", "text": "public function findNotArchived(){\n $qb = $this->createQueryBuilder('t');\n $qb->select('t, ma')\n ->join('t.mainAddress', 'ma')\n ->where('t.archived = :f')\n ->setParameter('f', false)\n ;\n\n return $qb->getQuery()->getResult();\n }", "title": "" }, { "docid": "62c90e775c4a43793d748e335bf6284e", "score": "0.57714534", "text": "public function getExcludes() {\n return $this->excludes;\n }", "title": "" }, { "docid": "4d344e0360b954ca183efe67934ca962", "score": "0.57562023", "text": "public function getIgnoreEnableFields();", "title": "" }, { "docid": "2b5c18f3bd7068cf5e503a8928d9d98c", "score": "0.5747345", "text": "public function invisible() {\n $collection = clone $this;\n return $collection->filterBy('isInvisible', true);\n }", "title": "" }, { "docid": "d5bdcb05c2b47781a440d59650ba0cbb", "score": "0.57173324", "text": "public function withoutDataById() : StaticDataApiQuery;", "title": "" }, { "docid": "7fa783e99a5cfbfc9397b172fce15969", "score": "0.5700954", "text": "public function removeExclude($exclude);", "title": "" }, { "docid": "c232bb08ef1cffcf09722b53a7c8842c", "score": "0.5678297", "text": "public function allowAllPropertiesExcept() {}", "title": "" }, { "docid": "ea971c1a4665fbafe2d2312d588a21bb", "score": "0.5677802", "text": "public function getIgnoreEnableFields() {}", "title": "" }, { "docid": "52cce267019a23e5f07f7f626ca2fbd6", "score": "0.56308824", "text": "public function getOracleExcludedObjects()\n {\n return $this->readOneof(1);\n }", "title": "" }, { "docid": "90cc845190cd5a59c66759d3c916804c", "score": "0.56222844", "text": "public function except(): static\n\t{\n\t\treturn $this->setOperation('EXCEPT');\n\t}", "title": "" }, { "docid": "96d8cb12c44dc0283e982dc4a63f3843", "score": "0.5621201", "text": "function getIgnored();", "title": "" }, { "docid": "77389c2baca912c4cea644aa20eb13a7", "score": "0.5617392", "text": "function discard( $victims )\n {\n if( !is_array($victims) )\n {\n $victims = func_get_args();\n }\n\n return $this->project(array_diff(array_keys($this->fields), $victims));\n }", "title": "" }, { "docid": "6b4762320ed640029c55499abfb9e7c7", "score": "0.5613124", "text": "public function skipUnknownProperties() {}", "title": "" }, { "docid": "cc69cd91c77adefe991ff365ab64908e", "score": "0.55995405", "text": "public function notOperator() \r\n {\r\n \r\n $b = $this->cloneObject();\r\n \r\n for($index = 0; $index < $b->count(); $index++) \r\n {\r\n $b->set($index, !$b->get($index));\r\n }\r\n \r\n return $b;\r\n }", "title": "" }, { "docid": "5717741cbf5217cb2928cd69931307bb", "score": "0.5597664", "text": "public function getUnrelated(ResultsetInterface $resultset, FilterInterface $filter) : ResultsetInterface;", "title": "" }, { "docid": "b0c5cc42051dd3d712d9f4b725b04cca", "score": "0.5586565", "text": "function getIgnoreEnableFields() ;", "title": "" }, { "docid": "12709b0e16288cdd10129ef4f8a97e9c", "score": "0.5584204", "text": "public function fetchingHiddenPostsWithIgnoreEnableField() {}", "title": "" }, { "docid": "8b6584344e417cb2a147fb009965ad61", "score": "0.5537515", "text": "public function ignore()\n {\n $this->options['ignore'] = 1;\n return $this;\n }", "title": "" }, { "docid": "570dbc3b1242ae738f58c8b1ba69d960", "score": "0.55227065", "text": "public function getPostgresqlExcludedObjects()\n {\n return $this->readOneof(3);\n }", "title": "" }, { "docid": "0998085196e73edb212e1087c5ebe000", "score": "0.55202717", "text": "public function ignore(): self\n {\n $this->ignore = true;\n\n return $this;\n }", "title": "" }, { "docid": "d14e971139a8eacdc65be3286628dcf4", "score": "0.5516135", "text": "public function allNoFilters() {\n\t\treturn $this->clearFilters()\n\t\t\t\t\t->all();\n\t}", "title": "" }, { "docid": "7d0dfc0867efd2ef88fb3067ac3ddc1b", "score": "0.542664", "text": "public function excludeExpired() {\n $today = new \\DateTime();\n return $this->filter(function(Item $item) use ($today) {\n return $item->getUseByDate() > $today;\n });\n }", "title": "" }, { "docid": "56df34f66e363b8a07fc85242e426c62", "score": "0.5420513", "text": "public function getUnfilteredValues();", "title": "" }, { "docid": "13bdad129cc49fbe690b9d7253478720", "score": "0.54133767", "text": "public function testGetExcludedAttributes()\n {\n $a = new \\Author();\n $a->setFirstName('Douglas');\n $a->SetLastName('Adams');\n $a->setEmail('[email protected]');\n $a->setAge(42);\n $a->setAddress('123 Fake St');\n\n $expected = [\n 'firstName' => 'Douglas',\n 'lastName' => 'Adams',\n 'email' => '[email protected]'\n ];\n\n $actual = $a->toJsonApiAttributes();\n\n $this->assertEqualsCanonicalizing($expected, $actual);\n }", "title": "" }, { "docid": "d4505f9a9479a993a0045b60ce6531f0", "score": "0.54004925", "text": "function my_relationship_query( $args, $field, $post_id ) {\n $args['exclude'] = $post_id;\n\t\n\t\n\t// return\n return $args;\n \n}", "title": "" }, { "docid": "0827f23c7a7f9e23a71dfd6310e5a375", "score": "0.5395572", "text": "public function not($filter) {\n\t\treturn new Grubby_Query_Modifier($this, array('filters'=>new Grubby_NotFilter($filter)));\n\t}", "title": "" }, { "docid": "55cb9970180b8e3d5090f237cc99cd5a", "score": "0.538746", "text": "public function notDeleted()\n {\n return $this->addFilterCondition($this->getNotDeletedCondition());\n }", "title": "" }, { "docid": "61a47e5568c397d55abd16940140de71", "score": "0.53782", "text": "public function notUsed()\n {\n return $this->andWhere([Invitation::tableName() . '.use_date' => null]);\n }", "title": "" }, { "docid": "5bae638e66ecb5794fe532176e396f86", "score": "0.5364092", "text": "public function getVariantExclusion();", "title": "" }, { "docid": "427d08ddafad2414d94e7deb3ecb32d3", "score": "0.53638244", "text": "public function nonHydratedNotWorkingAction()\n {\n $streetRepo = $this->getDoctrine()->getRepository('ptlisDoctrineTestcaseBundle:Street');\n\n $street = $streetRepo->findOneById(1);\n $houseList = $street->getHouses();\n\n $criteria = Criteria::create()\n ->orderBy(['houseName' => Criteria::ASC]);\n\n $sortedHouseList = $houseList->matching($criteria);\n\n $responseData = '';\n foreach ($sortedHouseList as $house) {\n $responseData .= $house->getHouseName() . '<br>';\n }\n\n return new Response($responseData);\n }", "title": "" }, { "docid": "a4f7db4c00cf29bdd43fc01e81b33924", "score": "0.53598946", "text": "public function allNotRelated()\n {\n $listEmploye = DB::select(\"SELECT employes.id,employes.firstname,employes.lastname,employes.identity FROM employes LEFT JOIN user_members t1 ON t1.employe_id = employes.id WHERE t1.employe_id IS NULL\");\n return $listEmploye;\n }", "title": "" }, { "docid": "d41c4f1802b9dbc0d97a9e00ec739acb", "score": "0.5357318", "text": "public function notAll($selector) {\n\t\treturn $this->filterData($selector, 1); \n\t}", "title": "" }, { "docid": "ef4cea35e84a61579a6048e2bb099a4f", "score": "0.5353258", "text": "public function filter_unproductive( $include_neutral = false ) {\n\t\t$productivity = array( -2, -1 );\n\t\tif ( $include_neutral )\n\t\t\t$productivity[] = 0;\n\t\treturn $this->filter( $this->get_rows_with_productivity( $productivity ) );\n\t}", "title": "" }, { "docid": "e341a912abf36a931392861143003d60", "score": "0.5347266", "text": "function filterObj($attr,$flag) {\n\n if ($flag == true) $flag = 'without';\n else $flag = 'with';\n $attrIndex = $attr[0];\n foreach ($GLOBALS['objMap'] as $tag => $currentObj) {\n if ( in_array($attrIndex,$currentObj[$flag]) ) unset($GLOBALS['objMap'][$tag]);\n }\n updateAttr();\n }", "title": "" }, { "docid": "9755c522df9689eb764bc3d43f05a12b", "score": "0.53362745", "text": "public function getIgnore()\n {\n return $this->ignore;\n }", "title": "" }, { "docid": "de765169aa7fcea16a4a426f6a9e24dd", "score": "0.5332458", "text": "public function not();", "title": "" }, { "docid": "7bb879579d5ac6ebcaf004e9364e6ccb", "score": "0.5330317", "text": "public function ignoreExtraKeys()\n {\n $this->ignoreExtraKeys = true;\n\n return $this;\n }", "title": "" }, { "docid": "81a2d9bb99c9641e8b2d291ee535c368", "score": "0.53197634", "text": "public function getObjectsFoundOnlyFromSink()\n {\n return $this->objects_found_only_from_sink;\n }", "title": "" }, { "docid": "38708ded91c18635392b646b2c952418", "score": "0.5307359", "text": "public function getRemovedObjects() {}", "title": "" }, { "docid": "48f01bde153447fc931b5649ea4b4755", "score": "0.53021944", "text": "public function negate();", "title": "" }, { "docid": "b0d203a4963744546a1d2a5d0bcde6ad", "score": "0.529914", "text": "public function except($keys, $returnArray = false)\n {\n $result = parent::except($keys);\n return $returnArray ? $result->toArray() : $result;\n }", "title": "" }, { "docid": "f1a52e6ab7ad0653b52ed975df85046f", "score": "0.5298061", "text": "function matchIgnore($httpContext);", "title": "" }, { "docid": "7953b08b52119850a43f7f9e2aa0035b", "score": "0.52899945", "text": "public function getEnableFieldsToBeIgnored();", "title": "" }, { "docid": "6ec84b5c8e1b86347a189dd1c25af56a", "score": "0.52884203", "text": "public function shouldSkipUnknownProperties();", "title": "" }, { "docid": "5f859378096f7056fcfe67e5df98879d", "score": "0.5285819", "text": "public function filter();", "title": "" }, { "docid": "5f859378096f7056fcfe67e5df98879d", "score": "0.5285819", "text": "public function filter();", "title": "" }, { "docid": "9831bd19034c2581996aa53ec056b1da", "score": "0.5285584", "text": "function shouldSkipUnknownProperties() ;", "title": "" }, { "docid": "ef353e0f5cef5789dbc0633c1f76a7fe", "score": "0.527298", "text": "public function getExcludedAttributes()\n {\n return [\n 'disable_auto_group_change',\n 'is_vendor',\n 'website_id'\n ];\n }", "title": "" }, { "docid": "3e5f2a4ad1c9bbf8d785e72d1661b4e6", "score": "0.5267865", "text": "public function getEnableFieldsToBeIgnored() {}", "title": "" }, { "docid": "6a411a243f1bf53ba3bd4c4702d6bdad", "score": "0.5264787", "text": "public function getMysqlExcludedObjects()\n {\n return $this->readOneof(2);\n }", "title": "" }, { "docid": "56dd8e0a9578d447e8610d0e53fbea8c", "score": "0.5252626", "text": "function exclude($user_exclude = array()) {\n \n if (is_array($user_exclude)) {\n\n foreach ($user_exclude as $user_exclusion) {\n $this->exclude($user_exclusion);\n }\n\n } else {\n\n $type = gettype($user_exclude);\n\n if (in_array($type,array('boolean','integer','double','string')) && !in_array($user_exclude,$this->exclude_list)) {\n $this->exclude_list[] = strval($user_exclude);\n }\n }\n\n }", "title": "" }, { "docid": "b1c409b7b496c4c1c5f203e5a7ec76d4", "score": "0.5252506", "text": "public function getAllUsersExceptUserAuth()\n {\n $user = $this->getUserAuth();\n return $this->repository->findWhereNotIn('id', [$user->id]);\n }", "title": "" }, { "docid": "425c8ea4456c567ad6f37235666aa70d", "score": "0.52513564", "text": "public function nothing_filter()\n {\n return null;\n }", "title": "" }, { "docid": "541e2298e0fd1ce0244123447fddff50", "score": "0.5245716", "text": "final public function getFilterExcepts(): array\n {\n return $this->__filter_excepts ?? [];\n }", "title": "" }, { "docid": "07b3cf10d10835427ee7e9add9b6fe40", "score": "0.5224874", "text": "public function addHasObjectsFilter()\n {\n return $this->addFieldToFilter('count', ['gt' => 0]);\n }", "title": "" }, { "docid": "fe98c678a3639aeefcb3fa9053852a04", "score": "0.5222855", "text": "protected function getDifferencesObject() {}", "title": "" }, { "docid": "48bf3ffc06a1faac924d4821e9899a15", "score": "0.5222273", "text": "public function getExcludeListArray() {}", "title": "" }, { "docid": "cacb1d33bc2538d6f33e25c7fc319a4d", "score": "0.521622", "text": "public function testGetExcludeFolders()\n {\n $this->assertEquals([], $this->object->getExcludeFolders());\n }", "title": "" }, { "docid": "f4d4c7d9ee40743904562376e0470838", "score": "0.5214667", "text": "public function setExcludes($excludes);", "title": "" }, { "docid": "876840e6511a5b9426ce85c0df7d14a8", "score": "0.5208986", "text": "public function getNonContainered()\n\t\t{\n\t\t\t$_result = [];\n\t\t\tforeach( $this->objects as $key => $section ){\n\n\t\t\t\tif( is_null( $section->container_id ) )\n\t\t\t\t\t$_result[ $key ] = $section;\n\n\t\t\t}\n\n\n\t\t\treturn $_result;\n\t\t}", "title": "" }, { "docid": "cc7aff4f062bf1d37849c78488dac289", "score": "0.52064586", "text": "public function toArray2()\n {\n $ignore = $this->getPayloadExclusions();\n\n return array_where(get_object_vars($this), function ($value, $key) use ($ignore) {\n if (! in_array($key, $ignore)) {\n return ! empty($value);\n }\n });\n }", "title": "" }, { "docid": "e00047f8cadffba36bd56979ad9fb147", "score": "0.5203679", "text": "public function newQueryWithoutRelationships();", "title": "" }, { "docid": "c32dfcf33485bd95aae009867ee049a8", "score": "0.519223", "text": "public function testNonModelsExcluded()\n {\n // as PHP gets rather annoyed when you try to do so\n $foo = m::mock(MetadataProviderDummy::class)->makePartial();\n\n $result = $foo->getCandidateModels();\n $traitClass = TestModelTrait::class;\n $this->assertFalse(in_array($traitClass, $result));\n }", "title": "" }, { "docid": "14cb24f737071a67fddf0b927fd3f992", "score": "0.5186359", "text": "public function withoutAttribute(string $attribute): ResponseInterface;", "title": "" }, { "docid": "29f900a8002dc9bc39babfa10f05e6d0", "score": "0.51823384", "text": "public function removeNotTransferDescriptionKind()\n {\n if (empty($this->sales_details)) {\n return $this;\n }\n // Using array_values to reset keys after filter\n $this->sales_details = array_values(array_filter($this->sales_details, function($item) {\n /** @var \\App\\Model\\Entity\\SalesDetail $item */\n return !$item->not_show_cashier;\n }));\n }", "title": "" }, { "docid": "51f5e2154f8c668d9bf61d265461bd4a", "score": "0.5176123", "text": "public function notObject()\n {\n TestCase::assertIsNotObject($this->actual, $this->message);\n }", "title": "" }, { "docid": "10a40e3400e0b2028067c752d7bb5357", "score": "0.51711005", "text": "public function getNotAvailableItems()\n {\n $qb = $this->createQueryBuilder('i');\n \n $query = $qb->where('i.amount = 0')->getQuery();\n \n return $query->getResult();\n }", "title": "" }, { "docid": "571db9e678231eaaae0289da05ef4c31", "score": "0.5167384", "text": "function my_relationship_query( $args, $field, $post_id ) {\n\t\n // exclude current post from being selected\n $args['exclude'] = $post_id;\n\t\n\t\n\t// return\n return $args;\n \n}", "title": "" }, { "docid": "f2059f9f7b1d0a9194e384111b925e60", "score": "0.51649517", "text": "public function addExclude($tag);", "title": "" }, { "docid": "09480b4d81141d1414160bd16e6f152f", "score": "0.5159049", "text": "public function disableSet();", "title": "" }, { "docid": "16be9fe0408c8f6c7a1a0e0b0cd73d2d", "score": "0.5158871", "text": "public function withoutObjectCaching()\n {\n $this->withObjectCaching = false;\n\n return $this;\n }", "title": "" }, { "docid": "1bd3ea5d1cd7201b409a4e8167d5ba51", "score": "0.5155142", "text": "function getEnableFieldsToBeIgnored() ;", "title": "" }, { "docid": "e79593256224cb704291a7695fb2fab1", "score": "0.5152574", "text": "public function ignore()\n {\n $this->_ignoreCurrent = true;\n\n return $this;\n }", "title": "" }, { "docid": "87747757eb942b8eff87944ddfffd7b9", "score": "0.5139868", "text": "public function dontReport(): array;", "title": "" }, { "docid": "7e5aef07fddb363b3e7fe76513cc1d61", "score": "0.5137459", "text": "public static function get_excluded_items() {\n\t\t\treturn get_option( 'astra_portfolio_excludes', array() );\n\t\t}", "title": "" }, { "docid": "2e083619d85e8375f40fa23d51a96a01", "score": "0.5134028", "text": "public function filterOutFields(array $fields)\n {\n $vars = get_object_vars($this);\n\n foreach ($vars as $key => $value) {\n\n if (!in_array($key, $fields)) {\n unset($this->{$key});\n }\n }\n }", "title": "" }, { "docid": "9cb23135b90b573a5cf7d1ebe65c814a", "score": "0.51135993", "text": "function omit(string ...$fields): FieldsOption\n{\n return new FieldsOption($fields, true /* negate */);\n}", "title": "" }, { "docid": "c52ff134a7c2e7198e59284a76cbd661", "score": "0.5113308", "text": "public function negated(): self\n\t{\n\t\treturn self::of($this->getBigNumber()->negated());\n\t}", "title": "" }, { "docid": "77a4bfccf8b9c237ff2349d4f37993ce", "score": "0.51118284", "text": "public function not() {\n return new Predicate('not', array($this));\n }", "title": "" }, { "docid": "701425f394cca0ad8d20335614dfac81", "score": "0.51115084", "text": "public function testNoneIncluded(): void\n {\n $posts = Post::factory()->count(2)->create();\n\n $response = $this\n ->withoutExceptionHandling()\n ->jsonApi('posts')\n ->get('/api/v1/posts?include=');\n\n $response->assertFetchedMany($posts);\n // @TODO assertNoneIncluded should be available on the response.\n $response->getDocument()->assertNoneIncluded();\n }", "title": "" }, { "docid": "efbf4c189d559601dd5f333f616ea2e9", "score": "0.5093927", "text": "public function not()\n {\n return new Not($this);\n }", "title": "" }, { "docid": "cbdae21c48f3053ee138ba5faa562da3", "score": "0.5092616", "text": "public function getExcepts()\n {\n return $this->excepts;\n }", "title": "" } ]
6b1c00f9b7b2263fa3dc2534aa03fec3
funcao para atualizar campos
[ { "docid": "a6a0b0d1318e8d8d4542dceb273e41ff", "score": "0.0", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->rh30_codreg = ($this->rh30_codreg == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh30_codreg\"]:$this->rh30_codreg);\n $this->rh30_vinculomanad = ($this->rh30_vinculomanad == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh30_vinculomanad\"]:$this->rh30_vinculomanad);\n $this->rh30_descr = ($this->rh30_descr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh30_descr\"]:$this->rh30_descr);\n $this->rh30_regime = ($this->rh30_regime == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh30_regime\"]:$this->rh30_regime);\n $this->rh30_vinculo = ($this->rh30_vinculo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh30_vinculo\"]:$this->rh30_vinculo);\n $this->rh30_instit = ($this->rh30_instit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh30_instit\"]:$this->rh30_instit);\n $this->rh30_naturezaregime = ($this->rh30_naturezaregime == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh30_naturezaregime\"]:$this->rh30_naturezaregime);\n $this->rh30_utilizacao = ($this->rh30_utilizacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh30_utilizacao\"]:$this->rh30_utilizacao);\n $this->rh30_periodoaquisitivo = ($this->rh30_periodoaquisitivo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh30_periodoaquisitivo\"]:$this->rh30_periodoaquisitivo);\n $this->rh30_periodogozoferias = ($this->rh30_periodogozoferias == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh30_periodogozoferias\"]:$this->rh30_periodogozoferias);\n }else{\n $this->rh30_codreg = ($this->rh30_codreg == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh30_codreg\"]:$this->rh30_codreg);\n }\n }", "title": "" } ]
[ { "docid": "c3795fdb0503faec7e9f1f552c1ee4a7", "score": "0.68545175", "text": "private function _setear_campos()\n\t{\n\t\t$this->datos_formulario->cuil = '';\n\t\t$this->datos_formulario->nombre = '';\n\t\t$this->datos_formulario->apellido = '';\n\t\t$this->datos_formulario->mail = '';\n\t}", "title": "" }, { "docid": "4cf72cccfcc33917188f541f51fe61e3", "score": "0.6432265", "text": "function _set_fields()\n\t{\n\t\t$this->form_data->user_id = '';\n\t\t$this->form_data->name = '';\n\t\t$this->form_data->address = '';\n\t\t$this->form_data->phone_number = '';\n\t}", "title": "" }, { "docid": "8dc1ce1e68498b5af55f51488e57a0c3", "score": "0.6320369", "text": "private function _set_fields()\n\t{\n\t\t$this->form_data = new StdClass;\n $this->form_data->user_login = '';\n $this->form_data->date_from = '';\n $this->form_data->date_to = '';\n\t}", "title": "" }, { "docid": "2d89fbfb715cec2839197579e98df0dc", "score": "0.6254998", "text": "function atualizar() {\n\t\t\n // query update\n $query = \"UPDATE\n \" . $this->table_name . \"\n SET\n pessoa_nome = :nome\n WHERE\n pessoa_id = :id\";\n \n // prepared statement\n $stmt = $this->conn->prepare($query);\n \n // higienização de caracteres especiais\n $this->nome = htmlspecialchars(strip_tags($this->nome));\n $this->id = htmlspecialchars(strip_tags($this->id));\n \n // bind de parâmetros\n $stmt->bindParam(':nome', $this->nome);\n $stmt->bindParam(':id', $this->id);\n \n // execute query\n if ($stmt->execute()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "332e7347826027d9b0db0ac03036cf21", "score": "0.623986", "text": "private function camposObligatorios()\n {\n $this->setRequiredField(\"apellidos\");\n\n return;\n }", "title": "" }, { "docid": "a8380d42f21bac7d8d2673af7a74ca1d", "score": "0.623709", "text": "public function updateFields(){\r\n\t\t}", "title": "" }, { "docid": "c1b087218b0c5ba142b9d6b84a726800", "score": "0.6079353", "text": "public function beforeSave()\n {\n $this->phone_number = StringFormatter::sanitizePhoneNumber($this->phone_number);\n $this->cell_phone_number = StringFormatter::sanitizePhoneNumber($this->cell_phone_number);\n $this->firstname = !empty($this->firstname) ? trim($this->firstname) : null;\n $this->lastname = !empty($this->lastname) ? trim($this->lastname) : null;\n $this->displayname = trim($this->displayname);\n $this->description = !empty($this->description) ? trim($this->description) : null;\n }", "title": "" }, { "docid": "a1973fa8dfa1b4b5193569856b16f524", "score": "0.6069125", "text": "private function resetInputFields(){\n $this->waktu_mulai = '';\n $this->waktu_selesai = '';\n $this->jadwal_id = '';\n }", "title": "" }, { "docid": "ede0d3f83d1d9c5970f5d1ea8d7fa49c", "score": "0.60566956", "text": "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->observacion=$_POST['contenido'];\n\t\t$this->estado=$_POST['estado'];\n\t\t$this->fecha=$_POST['fecha'];\n\t}", "title": "" }, { "docid": "863454e6b92e0ebfb0c3de5685742b95", "score": "0.6055214", "text": "private function resetInputFields() {\n $this->record_id = '';\n $this->first_name = '' ;\n $this->middle_name = '';\n $this->last_name = '';\n $this->maternal_name = '';\n $this->birthday = '';\n $this->email = '';\n $this->address ='' ;\n $this->zipcode ='' ;\n $this->phone = '';\n $this->photo = '' ;\n $this->black_list = false ;\n $this->marked = false ;\n $this->active = false;\n $this->country_id = '';\n $this->occupation_id = '';\n $this->vip_id = '';\n $this->identification_id = '';\n $this->customer_id = '';\n $this->expire_at = '';\n $this->image = '';\n $this->custom = '';\n $this->folio = '';\n }", "title": "" }, { "docid": "9dd7ec5ab00b0a35647cd04d35d8cd3f", "score": "0.6034047", "text": "function Atualizar()\n\t\t{\n\t\t\t$sql = \"update estoque set\n\t\t\t\t\tnomeproduto = ?,quant_compra = ?,quant_uso = ?,quant_estoque = ?\n\t\t\t\t\twhere codestoque = ?\";\n\n\t\t\t//executando o comando sql e passando os valores\n\t\t\t$this->con->prepare($sql)->execute(array(\n\t\t\t$this->nomeproduto,$this->quant_compra,$this->quant_uso,$this->quant_estoque,\n\t\t\t$this->codestoque));\n\t\t}", "title": "" }, { "docid": "af212883f03ab70babde7e6e240ff67c", "score": "0.60052663", "text": "public function before_save() {\n $this->codigo = strtoupper($this->codigo);\n $this->titulo = filter_var(strtoupper($this->titulo), FILTER_SANITIZE_STRING);\n $this->detalle = filter_var(strtoupper($this->detalle), FILTER_SANITIZE_STRING);\n }", "title": "" }, { "docid": "2be8d6ad6e38aa40b284378d1361187b", "score": "0.5961462", "text": "private function _set_fields()\n {\n @$this->form_data->cat_id = 0;\n $this->form_data->cat_parent = 0;\n\t$this->form_data->cat_name = '';\n\n\t$this->form_data->filter_cat_name = '';\n }", "title": "" }, { "docid": "e02b8d85fc0492d82fa181e20eb95218", "score": "0.59557945", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_tipo('');\n $this->setTipo_asignatura('');\n $this->setTipo_breve('');\n if (array_key_exists('año', $aDades)) $this->setAño($aDades['año']);\n $this->setTipo_latin('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "6ec188a5b37e2092bd24a161168086bd", "score": "0.5909429", "text": "public function atualizar() {\n\t\t$conexao = Conexao::pegarConexao();\n\t\t$query = \"UPDATE chamados SET \n\t\t\tproblema=:problema,\n\t\t\tidLocal = :idLocal,\n\t\t\tidEquipamento = :idEquipamento,\n\t\t\tidUsuario = :idUsuario,\n\t\t\tsolucao = :solucao,\n\t\t\tavaliacao = :avaliacao,\n\t\t\tdataAbertura = :dataAbertura,\n\t\t\tdataFechamento = :dataFechamento,\n\t\t\tprioridade = :prioridade\n\t\t\t WHERE id=:id\";\n\t\t$stmt = $conexao->prepare($query);\n\t\t$stmt->bindValue(\":id\", $this->id);\n\t\t$stmt->bindValue(\":problema\", $this->problema);\n\t\t$stmt->bindValue(\":idLocal\", $this->idLocal);\n\t\t$stmt->bindValue(\":idEquipamento\", $this->idEquipamento);\n\t\t$stmt->bindValue(\":idUsuario\", $this->idUsuario);\n\t\t$stmt->bindValue(\":solucao\", $this->solucao);\n\t\t$stmt->bindValue(\":avaliacao\", $this->avaliacao);\n\t\t$stmt->bindValue(\":dataAbertura\", $this->dataAbertura);\n\t\t$stmt->bindValue(\":dataFechamento\", $this->dataFechamento);\n\t\t$stmt->bindValue(\":prioridade\", $this->prioridade);\n\t\t$stmt->execute();\n\t}", "title": "" }, { "docid": "56c1eded8679321582701771c20cc519", "score": "0.5901486", "text": "private function resetInputFields(){\n $this->city_from_id = '';\n $this->city_to_id = '';\n $this->airline_id = '';\n $this->flight_date = '';\n $this->flight_time = '';\n $this->departure_hour = '';\n }", "title": "" }, { "docid": "32decae09a553e065e4ccd29f4f9e81b", "score": "0.58990717", "text": "public function beforeValidationOnUpdate()\n {\n $this->modifyAt = time();\n }", "title": "" }, { "docid": "65bb568e34c93a75995bdf9a8066d6b8", "score": "0.5881613", "text": "private function resetInputFields(){\n $this->name = '';\n $this->cimg = '';\n $this->country_id = '';\n }", "title": "" }, { "docid": "bec93d4514eab27e65c43a548151a203", "score": "0.588091", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_cargo('');\n $this->setCargo('');\n $this->setOrden_cargo('');\n $this->setSf('');\n $this->setSv('');\n $this->setTipo_cargo('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "d2af2bb114235bd26c67c74a6b5cd37b", "score": "0.58759147", "text": "public function atualizar() {\n $query = '\n UPDATE tb_usuario \n SET \n nome = :nome,\n usuario = :usuario,\n email = :email,\n estado = :estado,\n cidade = :cidade,\n cep = :cep\n WHERE id = :id\n ';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id', 14);\n $stmt->bindValue(':nome', $this->usuario->__get('nome'));\n $stmt->bindValue(':usuario', $this->usuario->__get('usuario'));\n $stmt->bindValue(':email', $this->usuario->__get('email'));\n $stmt->bindValue(':estado', $this->usuario->__get('estado'));\n $stmt->bindValue(':cidade', $this->usuario->__get('cidade'));\n $stmt->bindValue(':cep', $this->usuario->__get('cep'));\n\n return $stmt->execute();\n }", "title": "" }, { "docid": "22037406f0987caf633c049bc653b357", "score": "0.58483094", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_activ('');\n $this->setId_ubi('');\n $this->setNum_orden('');\n $this->setEncargo('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "ce7bbb0e58458d0e15cafdda3f69d5c6", "score": "0.5847699", "text": "function asignar_valores(){\n\t\t$this->codigo=$_POST['codigo'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t\n\n\t\t/*\n\t\t\t$this->categoria=$_POST['categoria'];\n\t\t\t$this->cantidad=$_POST['cantidad'];\n\t\t\t$this->detal=$_POST['detal'];\n\t\t\t$this->mayor=$_POST['mayor'];\n\t\t\t$this->limite=$_POST['limite'];\n\t\t\t$this->claves=$_POST['claves'];\n\t\t*/\n\t}", "title": "" }, { "docid": "9922d64074273e7b16e876b4be67d806", "score": "0.58471274", "text": "protected function fillInFieldValues() {\n if ($this->getFillInRequestValues()) {\n $this->fillInRequestValues();\n }\n }", "title": "" }, { "docid": "b090b4831db9afb8549350262275abb6", "score": "0.58406794", "text": "function asignar_valores2(){\n\t\t$this->orden=$_POST['orden'];\n\t\t$this->contenido=$_POST['contenido'];\n\t}", "title": "" }, { "docid": "22dac06298e22219e57cf244f9c953cf", "score": "0.58393216", "text": "public function atualizar(){\n return (new Database('cadastroproduto'))->update('idProduto = '.$this->idProduto,[\n 'nomeProduto' => $this-> nomeProduto,\n 'quantidadeProduto' => $this-> quantidadeProduto,\n 'precoCustoProduto' => $this-> precoCustoProduto,\n 'precoVendaProduto' => $this-> precoVendaProduto,\n ]);\n }", "title": "" }, { "docid": "dc2ba40ced5b8c2d33856a1de1a59b94", "score": "0.583586", "text": "public function setearCampos($data)\n {\n foreach ($data as $key => $value) {\n //valido si existe la clave en el arreglo de los campos y lo asigno al campo\n if (array_key_exists($key, $this->fields)) {\n $this->fields[$key] = $value;\n $this->{$key} = $value;\n }\n //valido si existe la clave primaria en el arreglo si no existe la seteo en vacio.\n if (!array_key_exists($this->keyField, $data)) {\n $this->fields[$this->keyField] = '';\n }\n }\n //cambio el estado de la bandera seteados\n $this->seteados = 1;\n }", "title": "" }, { "docid": "486c3a891c42493f5d405baa2079468f", "score": "0.5832815", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_activ('');\n $this->setId_tipo_activ('');\n $this->setDl_org('');\n $this->setNom_activ('');\n $this->setId_ubi('');\n $this->setDesc_activ('');\n $this->setF_ini('');\n $this->setH_ini('');\n $this->setF_fin('');\n $this->setH_fin('');\n $this->setTipo_horario('');\n $this->setPrecio('');\n $this->setNum_asistentes('');\n $this->setStatus('');\n $this->setObserv('');\n $this->setNivel_stgr('');\n $this->setObserv_material('');\n $this->setLugar_esp('');\n $this->setTarifa('');\n $this->setId_repeticion('');\n $this->setPublicado('');\n $this->setId_tabla('');\n $this->setPlazas('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "de188a013412c4100c884871f1834549", "score": "0.58218455", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->tr04_id = ($this->tr04_id == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr04_id\"]:$this->tr04_id);\n $this->tr04_sigla = ($this->tr04_sigla == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr04_sigla\"]:$this->tr04_sigla);\n $this->tr04_descr = ($this->tr04_descr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr04_descr\"]:$this->tr04_descr);\n }else{\n $this->tr04_id = ($this->tr04_id == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr04_id\"]:$this->tr04_id);\n }\n }", "title": "" }, { "docid": "a0203b4b653b093dc49cc2a0683ff49c", "score": "0.58191407", "text": "abstract function requiredFieldsSet();", "title": "" }, { "docid": "e0dbe5069cbdc7f513616fbfa116a243", "score": "0.5801285", "text": "public function atualizar(){\n $dal = new \\App\\Models\\DAL\\Cadastrocurso; \n $dal->atualizar($this->getCod_curso(), $this->getCurso()); \n }", "title": "" }, { "docid": "4c478fe50fb32fbad762e7ed320ac75a", "score": "0.5786255", "text": "private function save_edit()\r\n {\r\n }", "title": "" }, { "docid": "081cc9003ab916883ee37991ea62d5af", "score": "0.5776606", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->y33_codnoti = ($this->y33_codnoti == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y33_codnoti\"]:$this->y33_codnoti);\n $this->y33_codigo = ($this->y33_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y33_codigo\"]:$this->y33_codigo);\n $this->y33_numero = ($this->y33_numero == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y33_numero\"]:$this->y33_numero);\n $this->y33_compl = ($this->y33_compl == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y33_compl\"]:$this->y33_compl);\n }else{\n $this->y33_codnoti = ($this->y33_codnoti == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y33_codnoti\"]:$this->y33_codnoti);\n }\n }", "title": "" }, { "docid": "05424a1b4de0e9150ee1cbf127c1f278", "score": "0.57605535", "text": "function actCampos($valor=\"\"){\r\n\t\t\t$this->campos=$valor;\r\n\t\t}", "title": "" }, { "docid": "15679073049037824812254b80f9e03f", "score": "0.57532334", "text": "public function FrontEndMakeReadOnlyFields();", "title": "" }, { "docid": "0f533ad024461c5e84156c220e8cf4e7", "score": "0.57389146", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_ubi('');\n $this->setId_direccion('');\n $this->setPropietario('');\n $this->setPrincipal('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "5b99bc6bee360dc5754a2883688667d1", "score": "0.57339346", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_direccion('');\n $this->setDireccion('');\n $this->setC_p('');\n $this->setPoblacion('');\n $this->setProvincia('');\n $this->setA_p('');\n $this->setPais('');\n $this->setF_direccion('');\n $this->setObserv('');\n $this->setCp_dcha('');\n $this->setLatitud('');\n $this->setLongitud('');\n $this->setPlano_doc('');\n $this->setPlano_extension('');\n $this->setPlano_nom('');\n $this->setNom_sede('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "fb790830d88b4a95451db3cec9d0fdc7", "score": "0.5725626", "text": "public function actualizar() {\n if (!is_null($this->nombre)) {\n $campos[] = 'nombre=?'; $valores[] = $this->nombre;\n }\n if (!is_null($this->precio)) {\n $campos[] = 'precio=?'; $valores[] = $this->precio;\n }\n if (!is_null($this->detalle)) {\n $campos[] = 'detalle=?'; $valores[] = $this->detalle;\n }\n if (!is_null($this->atc)) {\n $campos[] = 'atc=?'; $valores[] = $this->atc;\n }\n if (!is_null($this->registroSanitario)) {\n $campos[] = 'registro_sanitario=?'; $valores[] = $this->registroSanitario;\n }\n if ($campos) {\n $campos = implode(',', $campos);\n $valores[] = $this->id;\n $sentencia = $this->bd->prepare(\"UPDATE medicamento SET $campos WHERE id_medicamento = ?\");\n $sentencia->execute($valores);\n return TRUE;\n }\n return FALSE;\n }", "title": "" }, { "docid": "d9f4df4cbcb5e7f97703cb8dd8ebcff4", "score": "0.57247025", "text": "public function atualizarDadosCampanha($dados){\r\n\t\t\r\n\t\tif(!is_object($dados)){\r\n\t\t\tthrow new Exception('Dados inválidos para atualizar os dados da campanha gerada.');\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(empty($dados->abooid)){\r\n\t\t\tthrow new Exception('O ID da campanha deve ser informado.');\r\n\t\t}\r\n\r\n\t\t$sql = \" UPDATE arquivo_boletagem\r\n\t\t\t\t\tSET abnm_politica = '$dados->abnm_politica '\r\n\t ,aboprc_desconto = $dados->aboprc_desconto \";\r\n\t\t\t$sql .= \"WHERE abooid = $dados->abooid \";\r\n\t\t\t\t\t\r\n\t\t\r\n\t\tif(!pg_query($this->conn, $sql)){\r\n\t\t\tthrow new Exception('Falha ao atualizar dados da campanha informada.');\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "f2265f56080b3e4671fab782004126be", "score": "0.57214427", "text": "public function __set($atributo,$valor) {\n\t\t#$this->protegendoAtributos($atributo);\n\t\t#ContaCorrente::protegendoAtributos($atributo);\n\t\tValidacao::protegendoAtributos($atributo);\n\t\t$this->$atributo=$valor;\n\t}", "title": "" }, { "docid": "5658507a53698623cc5c24e3b655f330", "score": "0.5721385", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->e66_autori = ($this->e66_autori == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e66_autori\"]:$this->e66_autori);\n $this->e66_seqretencao = ($this->e66_seqretencao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e66_seqretencao\"]:$this->e66_seqretencao);\n }else{\n $this->e66_autori = ($this->e66_autori == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e66_autori\"]:$this->e66_autori);\n $this->e66_seqretencao = ($this->e66_seqretencao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e66_seqretencao\"]:$this->e66_seqretencao);\n }\n }", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.57137454", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.57137454", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.57137454", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.57137454", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.57137454", "text": "public static function setters();", "title": "" }, { "docid": "c41f30c7eb3792906322e00c8aee4dab", "score": "0.5697693", "text": "public function beforeValidationOnUpdate()\n {\n $this->updated_at = DateUtils::getCurrentDateTime();\n }", "title": "" }, { "docid": "8c95cd4121edff050fef9202038578fc", "score": "0.56974757", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_item('');\n $this->setId_nom('');\n $this->setTitulo('');\n $this->setCentro_dnt('');\n $this->setEclesiastico('');\n $this->setYear('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "4b79d3a743540b5204f4f915d21a72d9", "score": "0.5681014", "text": "function consulta_save_user_details($user_id) {\n\n update_user_meta($user_id, 'estado', $_POST['estado']);\n update_user_meta($user_id, 'municipio', $_POST['municipio']);\n}", "title": "" }, { "docid": "b256afb4c51b11b0d9ac8f8561e1b935", "score": "0.5675021", "text": "public function beforeValidationOnCreate()\n {\n $this->create_by = $this->_user['uid'];\n if (empty($this->create_time) || !strtotime($this->create_time)) {\n $this->create_time = date('Y-m-d H:i:s');\n }\n $this->modify_by = $this->_user['uid'];\n $this->modify_time = date('Y-m-d H:i:s');\n }", "title": "" }, { "docid": "933ab206e6889805525bf4520f94930a", "score": "0.56705993", "text": "public function atualizar($objeto){\n\t\t\t// UPDATE tabela SET campo1 = valor1, campo2 = valor2 WHERE campoChave = valorChave\n\t\t\t$sql = \"UPDATE \".$objeto->tabela.\" SET \";\n\t\t\t\tfor($i = 0; $i < count($objeto->campos_valores); $i++):\n\t\t\t\t\t$sql .= key($objeto->campos_valores).\"=\";\n\t\t\t\t\t$sql .= is_numeric($objeto->campos_valores[key($objeto->campos_valores)]) ? \n\t\t\t\t\t\t$objeto->campos_valores[key($objeto->campos_valores)] : \n\t\t\t\t\t\t\"'\".$objeto->campos_valores[key($objeto->campos_valores)].\"'\";\n\t\t\t\t\tif($i < (count($objeto->campos_valores)-1)):\n\t\t\t\t\t\t$sql .=\", \";\n\t\t\t\t\telse:\n\t\t\t\t\t\t$sql .=\" \";\n\t\t\t\t\tendif;\n\t\t\t\t\tnext($objeto->campos_valores);\n\t\t\t\tendfor;\n\t\t\t\t$sql .=\"WHERE \".$objeto->campopk.\"=\";\n\t\t\t\t$sql .= is_numeric($objeto->valorpk) ? $objeto->valorpk : \"'\".$objeto->valorpk.\"'\";\n\t\t\treturn $this->executaSQL($sql);\t\t\n\t\t}", "title": "" }, { "docid": "8c42e4732910e1e34afbd128ff448985", "score": "0.5663778", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_mod('');\n $this->setStatus('');\n $this->setParam('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "43f9ae04a33e116a5ab7d76860f8ed53", "score": "0.5662808", "text": "public function editAgendamento(){\n }", "title": "" }, { "docid": "ab8aef5513c680b2d9cf73dee3fa6156", "score": "0.5662476", "text": "abstract protected function _getFormFields();", "title": "" }, { "docid": "f02ba8dd3c6c327d6983f65e57e8729f", "score": "0.565814", "text": "function limpa_campos()\r\n {\r\n $this->TomadorCnpj->Text = '';\r\n $this->TomadorRazaoSocial->Text = '';\r\n $this->Endereco->Text = '';\r\n $this->Numero->Text = '';\r\n $this->Complemento->Text = '';\r\n $this->Bairro->Text = '';\r\n $this->Cidade->Text = '';\r\n $this->Uf->Text = '';\r\n $this->Cep->Text = '';\r\n $this->Telefone->Text = '';\r\n $this->Email->Text = '';\r\n $this->NumeroLote->Text = '';\r\n $this->DataEmissao->Text = '';\r\n $this->Serie->Text = '1';\r\n $this->Tipo->ItemIndex = 1;\r\n $this->NaturezaOperacao->ItemIndex = 1;\r\n $this->OptanteSimplesNacional->ItemIndex = 1;\r\n $this->IncentivadorCultural->ItemIndex = 2;\r\n $this->Status->ItemIndex = 1;\r\n $this->ItemListaServico->Text = '';\r\n $this->CodigoCnae->Text = '';\r\n $this->CodigoTributacaoMunicipio->Text = '';\r\n $this->Discriminacao->Clear();\r\n $this->IssRetido->ItemIndex = 2;\r\n $this->ValorServicos->Text = '';\r\n $this->BaseCalculo->Text = '';\r\n $this->Aliquota->Text = '';\r\n $this->ValorIss->Text = '';\r\n\r\n $this->QtdePecas->Text = '';\r\n $this->NroPedido->Text = '';\r\n $this->DTVencimento->Text = '';\r\n\r\n $this->MSG_Erro->Caption = '';\r\n\r\n $this->mgt_nota_fiscal_tipo_faturamento->Value = '';\r\n $this->hd_numero_faturamento->Value = '';\r\n\r\n $this->hd_formulario_carregado->Value = '';\r\n }", "title": "" }, { "docid": "4d49fa46c3d6899d833b4de910ee12f1", "score": "0.56565815", "text": "function actualizar(){\n\n }", "title": "" }, { "docid": "a3d8d54b1253bc930ddc2862854c3de4", "score": "0.5655559", "text": "abstract function actualizar($atributo, $valor);", "title": "" }, { "docid": "6dd3a0db41b88b926a05567b309d22a1", "score": "0.565458", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->y67_codlev = ($this->y67_codlev == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y67_codlev\"]:$this->y67_codlev);\n $this->y67_codandam = ($this->y67_codandam == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y67_codandam\"]:$this->y67_codandam);\n }else{\n $this->y67_codlev = ($this->y67_codlev == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y67_codlev\"]:$this->y67_codlev);\n $this->y67_codandam = ($this->y67_codandam == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y67_codandam\"]:$this->y67_codandam);\n }\n }", "title": "" }, { "docid": "38f1b26ad5c5799174f626530c797a44", "score": "0.5653003", "text": "public function populateAttributes()\r\n {\r\n $this->t->setAttributes($this->owner->attributes, false);\r\n $this->t->lang_id = $this->l;\r\n\r\n foreach ($this->t->attributes as $attr => $val) {\r\n if ($this->owner->hasProperty($attr) || $this->owner->hasAttribute($attr)) {\r\n $this->t->{$attr} = $this->owner->{$attr};\r\n }\r\n }\r\n\r\n if (!$this->t->validate()) {\r\n foreach ($this->t->errors as $k => $v) {\r\n $this->owner->addError($k, $v[0]);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "2aba8aefc51975eb230c194041149ddd", "score": "0.5652754", "text": "function atualiza_nome_completo($conexao , $atualiza_dados)\r\n\t\t{\r\n\t\t\t$sqlUpdate = \"UPDATE usuarios SET nome_completo ='{$atualiza_dados['nome_completo']}' WHERE id = {$atualiza_dados['id']}\";\r\n\r\n\t\t\tmysqli_query($conexao , $sqlUpdate);\r\n\t\t}", "title": "" }, { "docid": "aa1f853e3c2a59daedf71645d7bb160b", "score": "0.56443024", "text": "protected function validateOnUpdate(){}", "title": "" }, { "docid": "69f3c6469f3abd9efa97e8337c59ac3c", "score": "0.5636984", "text": "public function applyDefaultValues()\n {\n $this->email = '';\n $this->password = '';\n $this->change_count = 0;\n $this->status = 'ENABLED';\n }", "title": "" }, { "docid": "2d963b0497e37f417e45846aab13445b", "score": "0.56314206", "text": "function save_object()\n {\n parent::save_object();\n foreach ($this->attributes as $attr) {\n if (isset($_POST[$attr])) {\n $this->$attr = $_POST[$attr];\n }\n }\n }", "title": "" }, { "docid": "6903db45a3caf7cc90e2245d58e0c2a1", "score": "0.5624294", "text": "function after_validation_on_update() {}", "title": "" }, { "docid": "dadb3ef6a17341c58774dd8ed352e4ee", "score": "0.5615339", "text": "function save()\n\t{\n\n\t\tif (empty($this->_data['auth_user_id'])) {\n\t\t\t$this->_data['auth_user_id'] = $_SESSION['uid'];\n\t\t}\n\n\t\tif (strtotime($this->_data['date']) == false) {\n\t\t\t$this->_data['date'] = null;\n\t\t}\n\t\tforeach (array('e_quantity','e_rate','e_tax_rate', 'a_quantity', 'a_rate', 'a_tax_rate') as $x) {\n\t\t\tif (empty($this->_data[$x])) $this->_data[$x] = 0;\n\t\t}\n\n\t\t$this->a_tax_rate = tax_rate_fix($this->a_tax_rate);\n\t\t$this->e_tax_rate = tax_rate_fix($this->e_tax_rate);\n\n\t\tparent::save();\n\t}", "title": "" }, { "docid": "1af0101089daf9706d035ff0ed5d2de8", "score": "0.5610092", "text": "public function applyDefaultValues()\n {\n $this->detalle = '';\n $this->observaciones = '';\n $this->estado = 'ENABLED';\n $this->change_count = 0;\n }", "title": "" }, { "docid": "b6691fc173b8a91bf00605fe38fb319a", "score": "0.56082535", "text": "function beforeSave(){\n $modelo='TipoCredito';\n $campo='id';\n if ($this->data[$modelo][$campo]==NULL || $this->data[$modelo][$campo]==\"\")\n $this->data[$modelo]['fecha_registro']=date('Y-m-d h:i:s');\n return true;\n }", "title": "" }, { "docid": "358454d4cdac894d084e908f6814f61a", "score": "0.56042296", "text": "protected function adjustFieldset()\n {\n $fields = $this->fieldset->fields();\n\n array_set($fields, 'email.validate', 'required|email');\n\n array_set($fields, 'username.validate', 'required');\n\n array_set($fields, 'password', [\n 'display' => trans_choice('cp.passwords', 1),\n 'validate' => 'required|confirmed'\n ]);\n\n $this->fieldset->fields($fields);\n }", "title": "" }, { "docid": "3e112142bd8aec02ab84864b55b66cfc", "score": "0.5602611", "text": "public function save() {\n $this->recalcula();\n parent::save();\n }", "title": "" }, { "docid": "3e112142bd8aec02ab84864b55b66cfc", "score": "0.5602611", "text": "public function save() {\n $this->recalcula();\n parent::save();\n }", "title": "" }, { "docid": "9d4068fdc304cacfd70dd15ab10b14ea", "score": "0.55999446", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ve62_codigo = ($this->ve62_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_codigo\"]:$this->ve62_codigo);\n $this->ve62_veiculos = ($this->ve62_veiculos == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_veiculos\"]:$this->ve62_veiculos);\n if($this->ve62_dtmanut == \"\"){\n $this->ve62_dtmanut_dia = ($this->ve62_dtmanut_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_dtmanut_dia\"]:$this->ve62_dtmanut_dia);\n $this->ve62_dtmanut_mes = ($this->ve62_dtmanut_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_dtmanut_mes\"]:$this->ve62_dtmanut_mes);\n $this->ve62_dtmanut_ano = ($this->ve62_dtmanut_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_dtmanut_ano\"]:$this->ve62_dtmanut_ano);\n if($this->ve62_dtmanut_dia != \"\"){\n $this->ve62_dtmanut = $this->ve62_dtmanut_ano.\"-\".$this->ve62_dtmanut_mes.\"-\".$this->ve62_dtmanut_dia;\n }\n }\n $this->ve62_vlrmobra = ($this->ve62_vlrmobra == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_vlrmobra\"]:$this->ve62_vlrmobra);\n $this->ve62_vlrpecas = ($this->ve62_vlrpecas == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_vlrpecas\"]:$this->ve62_vlrpecas);\n $this->ve62_descr = ($this->ve62_descr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_descr\"]:$this->ve62_descr);\n $this->ve62_notafisc = ($this->ve62_notafisc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_notafisc\"]:$this->ve62_notafisc);\n $this->ve62_veiccadtiposervico = ($this->ve62_veiccadtiposervico == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_veiccadtiposervico\"]:$this->ve62_veiccadtiposervico);\n $this->ve62_usuario = ($this->ve62_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_usuario\"]:$this->ve62_usuario);\n if($this->ve62_data == \"\"){\n $this->ve62_data_dia = ($this->ve62_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_data_dia\"]:$this->ve62_data_dia);\n $this->ve62_data_mes = ($this->ve62_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_data_mes\"]:$this->ve62_data_mes);\n $this->ve62_data_ano = ($this->ve62_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_data_ano\"]:$this->ve62_data_ano);\n if($this->ve62_data_dia != \"\"){\n $this->ve62_data = $this->ve62_data_ano.\"-\".$this->ve62_data_mes.\"-\".$this->ve62_data_dia;\n }\n }\n $this->ve62_hora = ($this->ve62_hora == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_hora\"]:$this->ve62_hora);\n $this->ve62_medida = ($this->ve62_medida == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_medida\"]:$this->ve62_medida);\n $this->ve62_observacao = ($this->ve62_observacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_observacao\"]:$this->ve62_observacao);\n }else{\n $this->ve62_codigo = ($this->ve62_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ve62_codigo\"]:$this->ve62_codigo);\n }\n }", "title": "" }, { "docid": "9d12cf6dbc75bd6585a212f82d15380f", "score": "0.5586818", "text": "function actualizarAlumno($param = null){\n\t\tsession_start();\n\t\t$matricula =$_SESSION['idMatricula'];\n\n\t\t$nombre = $_POST['nombre'];\n\t\t$apellidos = $_POST['apellidos'];\n\t\t$direccion = $_POST['direccion'];\n\t\t$telefono = $_POST['telefono'];\n\t\t$nacimiento = $_POST['nacimiento'];\n\t\t$sexo = $_POST['sexo'];\n\t\t$grupo = $_POST['grupo'];\n\t\t$generacion = $_POST['generacion'];\n\n\n\t\t//destruir la sesion\n\t\tunset($_SESSION['idMatricula']);\n\n\t\tif($this->model->update(['matricula' => $matricula,\n\t\t\t\t\t\t\t\t 'nombre' => $nombre,\n\t\t\t\t\t\t\t\t 'apellidos' => $apellidos,\n\t\t\t\t\t\t\t\t 'direccion' => $direccion,\n\t\t\t\t\t\t\t\t 'telefono' => $telefono,\n\t\t\t\t\t\t\t\t 'nacimiento' => $nacimiento,\n\t\t\t\t\t\t\t\t 'sexo' => $sexo,\n\t\t\t\t\t\t\t\t 'grupo' => $grupo,\n\t\t\t\t\t\t\t\t 'generacion' => $generacion])){\n\n\n\n\t\t\t$alumno = new Alumno();\n\n\t\t\t$alumno->matricula = $matricula;\n\t\t\t$alumno->nombre = $nombre;\n\t\t\t$alumno->apellidos = $apellidos;\n\t\t\t$alumno->direccion = $direccion;\n\t\t\t$alumno->telefono = $telefono;\n\t\t\t$alumno->nacimiento = $nacimiento;\n\t\t\t$alumno->sexo = $sexo;\n\t\t\t$alumno->grupo = $grupo;\n\t\t\t$alumno->generacion = $generacion;\n\n\t\t\t$this->view->alumno = $alumno;\n\t\t\t$mensajeExito = \"Alumno Actualizado con exito\";\n\n\t\t}else{\n\t\t\t$mensajeError = \"No se pudo actualizar el alumno\";\n\t\t}\n\n\t\tif(!empty($mensajeError)){\n\t\t\t$this->view->mensajeError = $mensajeError;\n\t\t}else{\n\t\t\t$this->view->mensajeExito = $mensajeExito;\n\t\t}\n\t\t\n\n\t\t$this->view->render('consulta/detalle');\n\n\n\t}", "title": "" }, { "docid": "4a612354a2a7207d4d5ad55065bf7dfa", "score": "0.558537", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->y87_baixaproc = ($this->y87_baixaproc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y87_baixaproc\"]:$this->y87_baixaproc);\n if($this->y87_dtbaixa == \"\"){\n $this->y87_dtbaixa_dia = ($this->y87_dtbaixa_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y87_dtbaixa_dia\"]:$this->y87_dtbaixa_dia);\n $this->y87_dtbaixa_mes = ($this->y87_dtbaixa_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y87_dtbaixa_mes\"]:$this->y87_dtbaixa_mes);\n $this->y87_dtbaixa_ano = ($this->y87_dtbaixa_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y87_dtbaixa_ano\"]:$this->y87_dtbaixa_ano);\n if($this->y87_dtbaixa_dia != \"\"){\n $this->y87_dtbaixa = $this->y87_dtbaixa_ano.\"-\".$this->y87_dtbaixa_mes.\"-\".$this->y87_dtbaixa_dia;\n }\n }\n $this->y87_usuario = ($this->y87_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y87_usuario\"]:$this->y87_usuario);\n if($this->y87_data == \"\"){\n $this->y87_data_dia = ($this->y87_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y87_data_dia\"]:$this->y87_data_dia);\n $this->y87_data_mes = ($this->y87_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y87_data_mes\"]:$this->y87_data_mes);\n $this->y87_data_ano = ($this->y87_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y87_data_ano\"]:$this->y87_data_ano);\n if($this->y87_data_dia != \"\"){\n $this->y87_data = $this->y87_data_ano.\"-\".$this->y87_data_mes.\"-\".$this->y87_data_dia;\n }\n }\n $this->y87_hora = ($this->y87_hora == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y87_hora\"]:$this->y87_hora);\n }else{\n $this->y87_baixaproc = ($this->y87_baixaproc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y87_baixaproc\"]:$this->y87_baixaproc);\n }\n }", "title": "" }, { "docid": "2c6a10b9e0c0cc819adb77bb5de8b783", "score": "0.55811685", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->cc05_sequencial = ($this->cc05_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cc05_sequencial\"]:$this->cc05_sequencial);\n $this->cc05_bens = ($this->cc05_bens == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cc05_bens\"]:$this->cc05_bens);\n $this->cc05_custoplanoanalitica = ($this->cc05_custoplanoanalitica == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cc05_custoplanoanalitica\"]:$this->cc05_custoplanoanalitica);\n }else{\n $this->cc05_sequencial = ($this->cc05_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cc05_sequencial\"]:$this->cc05_sequencial);\n }\n }", "title": "" }, { "docid": "4eb00284d409d7dd34a65b826de3c34c", "score": "0.5577525", "text": "public function beforeSave()\n\t{\n\t// $this->field = date(Yii::app()->params['datetodb'], strtotime($this->$field));\n\t\treturn parent::beforeSave();\n\t}", "title": "" }, { "docid": "0268d5c00c518d19f4b8e24be7ea7962", "score": "0.55755544", "text": "private function _set_rules()\n\t{\n\t\t$this->form_validation->set_rules('oldPassword', 'clave actual', 'required');\n\t\t$this->form_validation->set_rules('newPassword', 'nueva clave', 'required');\n\t\t$this->form_validation->set_rules('confPassword', 'confirmacion de clave', 'matches[newPassword]');\n\t}", "title": "" }, { "docid": "31ad3a9357bd9a79ecaf67ce0419d749", "score": "0.5573324", "text": "function before_validation_on_update() {}", "title": "" }, { "docid": "38bb37bd65349f39c8a7c3e42d990a3b", "score": "0.5572444", "text": "public function onBeforeWrite()\n {\n foreach (self::$defaults as $field => $value) {\n if (empty($this->$field)) {\n $this->$field = $value;\n }\n }\n //TODO: prevent non-heirarichal entries, eg country = '*', then state = 'blah'\n parent::onBeforeWrite();\n }", "title": "" }, { "docid": "272db2a593c99db942f94e986ad9d21b", "score": "0.5568994", "text": "function save_skills_fields($user_id){\n if(!current_user_can('edit_user',user_id)){ /*Utilizamos current para preguntar si un usuario concreto puede realizar una acción concreta*/\n return;\n } //Llegado a este punto es que el usuario puede editar sus datos\n \n update_user_meta($user_id, 'skill1',$_POST['skill1']);\n update_user_meta($user_id, 'skill1v',$_POST['skill1v']);\n \n update_user_meta($user_id, 'skill2',$_POST['skill2']);\n update_user_meta($user_id, 'skill2v',$_POST['skill2v']);\n \n update_user_meta($user_id, 'skill3',$_POST['skill3']);\n update_user_meta($user_id, 'skill3v',$_POST['skill3v']);\n \n update_user_meta($user_id, 'skill4',$_POST['skill4']);\n update_user_meta($user_id, 'skill4v',$_POST['skill4v']);\n}", "title": "" }, { "docid": "0ef19dc60f13c1a6eda8a3c258939d9d", "score": "0.55661684", "text": "function SetValues()\n {\n if (isset($_REQUEST['contact_name'])) {\n $this->contact_name = $_REQUEST['contact_name'];\n }\n if (isset($_REQUEST['office_number'])) {\n $this->office_number = $_REQUEST['office_number'];\n }\n if (isset($_REQUEST['mobile_number'])) {\n $this->mobile_number = $_REQUEST['mobile_number'];\n }\n if (isset($_REQUEST['address'])) {\n $this->address = $_REQUEST['address'];\n }\n if (isset($_REQUEST['job_position'])) {\n $this->job_position = $_REQUEST['job_position'];\n }\n if (isset($_REQUEST['status'])) {\n $this->status = $_REQUEST['status'];\n }\n if (isset($_REQUEST['email'])) {\n $this->email = $_REQUEST['email'];\n }\n if (isset($_REQUEST['note'])) {\n $this->note = $_REQUEST['note'];\n }\n }", "title": "" }, { "docid": "fcc6ede575b0cf773b738ca6ea7a2600", "score": "0.5565861", "text": "public function beforeValidationOnUpdate(): void\n {\n $this->updated_at = time();\n }", "title": "" }, { "docid": "84809fb285d3c4f462bd22119bff914a", "score": "0.55577224", "text": "public function prepareFields() {\n $this->dbFields['companyid'] = \"\";\n $this->dbFields['username'] = \"\";\n $this->dbFields['password'] = \"\";\n $this->dbFields['account_status'] = \"\";\n $this->dbFields['emailaddress'] = \"\";\n $this->dbFields['firstname'] = \"\";\n $this->dbFields['surname'] = \"\";\n $this->dbFields['invoice_terms_days'] = \"\";\n $this->dbFields['quote_terms_days'] = \"\";\n $this->dbFields['account_enddate'] = \"\";\n $this->dbFields['createddate'] = \"\";\n $this->dbFields['company_name'] = \"\";\n $this->dbFields['company_abn'] = \"\";\n $this->dbFields['company_acn'] = \"\";\n $this->dbFields['company_suburb'] = \"\";\n $this->dbFields['company_postcode'] = \"\";\n $this->dbFields['company_state'] = \"\";\n $this->dbFields['company_acn'] = \"\";\n $this->dbFields['company_BSB'] = \"\";\n $this->dbFields['company_acctnumber'] = \"\";\n $this->dbFields['company_mobilephone'] = \"\";\n $this->dbFields['company_acctname'] = \"\";\n }", "title": "" }, { "docid": "e9b8fc92b912e07d54a65ecdcdc47f55", "score": "0.55522245", "text": "public function beforeSave() {\n\t\tif ($this->isNewRecord) {\t// $this->creadoel=Yii::app()->user->name;\n if($this->escertificado()){\n $this->fechain=date('Y-m-d',strtotime($this->fecha)+24*60*60);\n }\n\t\t$this->correlativo=Numeromaximo::numero($this->model(),'correlativo','maximovalor',8);\n\t\t$this->cod_estado='10';\n //$this->espeabierto='0';\n\t\t$this->codocu=self::COD_DOCUMENTO_REGISTRO;\n //$this->codtenencia=$this->getparametro(self::PARAM_TENENCIA_POR_DEFECTO);\n // VAR_DUMP( $this->codtenencia);DIE();\n // if(is_null($this->codteniente))\n $this->codteniente= Yii::app()->user->getField('codtra');\n if(is_null($this->codtenencia))\n $this->codtenencia=Configuracion::valor($this->codocu,\n $this->codlocal, \n self::PARAM_TENENCIA_POR_DEFECTO);\n $this->codlocal=Tenencias::model()->findByPk($this->codtenencia)->codcen;\n // MiFactoria::Mensaje('error', 'DOCINGFRESADO-BEFORESAVE , COLOCANDO VALORES POR DEFAULT');\n \n if(!($this->moneda==yii::app()->settings->get('general','general_monedadef'))){\n $this->montomoneda=yii::app()->tipocambio->getCambio(\n $this->moneda,\n yii::app()->settings->get('general','general_monedadef')\n )*$this->monto; \n }else{\n $this->montomoneda=$this->monto;\n }\n \n } \n else{\n IF($this->cambiocampo(\"monto\") or $this->cambiocampo(\"moneda\"))\n if(!($this->moneda==yii::app()->settings->get('general','general_monedadef'))){\n $this->montomoneda=yii::app()->tipocambio->getCambio(\n $this->moneda,\n yii::app()->settings->get('general','general_monedadef')\n )*$this->monto; \n }else{\n $this->montomoneda=$this->monto;\n }\n \n \n \n }\n \n \n \n \n \n\treturn parent::beforeSave();\n\t\t\t\t}", "title": "" }, { "docid": "fc9ffb1f5e5048ff9ee4a926c18a96ff", "score": "0.5546832", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->pc91_sequencial = ($this->pc91_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc91_sequencial\"]:$this->pc91_sequencial);\n $this->pc91_solicita = ($this->pc91_solicita == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc91_solicita\"]:$this->pc91_solicita);\n $this->pc91_usuario = ($this->pc91_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc91_usuario\"]:$this->pc91_usuario);\n $this->pc91_pendencia = ($this->pc91_pendencia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc91_pendencia\"]:$this->pc91_pendencia);\n if($this->pc91_datainclusao == \"\"){\n $this->pc91_datainclusao_dia = ($this->pc91_datainclusao_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc91_datainclusao_dia\"]:$this->pc91_datainclusao_dia);\n $this->pc91_datainclusao_mes = ($this->pc91_datainclusao_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc91_datainclusao_mes\"]:$this->pc91_datainclusao_mes);\n $this->pc91_datainclusao_ano = ($this->pc91_datainclusao_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc91_datainclusao_ano\"]:$this->pc91_datainclusao_ano);\n if($this->pc91_datainclusao_dia != \"\"){\n $this->pc91_datainclusao = $this->pc91_datainclusao_ano.\"-\".$this->pc91_datainclusao_mes.\"-\".$this->pc91_datainclusao_dia;\n }\n }\n }else{\n $this->pc91_sequencial = ($this->pc91_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc91_sequencial\"]:$this->pc91_sequencial);\n }\n }", "title": "" }, { "docid": "2d2768a85d4190f78f648f3115c4327f", "score": "0.5535956", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->y76_codvist = ($this->y76_codvist == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y76_codvist\"]:$this->y76_codvist);\n $this->y76_receita = ($this->y76_receita == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y76_receita\"]:$this->y76_receita);\n $this->y76_valor = ($this->y76_valor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y76_valor\"]:$this->y76_valor);\n $this->y76_descr = ($this->y76_descr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y76_descr\"]:$this->y76_descr);\n }else{\n $this->y76_codvist = ($this->y76_codvist == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y76_codvist\"]:$this->y76_codvist);\n $this->y76_receita = ($this->y76_receita == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y76_receita\"]:$this->y76_receita);\n }\n }", "title": "" }, { "docid": "226c31f51cf9bfe8071bbddafe2c081a", "score": "0.55342275", "text": "public function beforeValidationOnCreate(): void\n {\n $this->created_at = $this->updated_at = time();\n }", "title": "" }, { "docid": "59124357706354e4fe931f39bf27b32d", "score": "0.55319345", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->sd78_codigo = ($this->sd78_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd78_codigo\"]:$this->sd78_codigo);\n $this->sd78_descricao = ($this->sd78_descricao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd78_descricao\"]:$this->sd78_descricao);\n $this->sd78_peso = ($this->sd78_peso == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd78_peso\"]:$this->sd78_peso);\n $this->sd78_labelcor = ($this->sd78_labelcor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd78_labelcor\"]:$this->sd78_labelcor);\n $this->sd78_cor = ($this->sd78_cor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd78_cor\"]:$this->sd78_cor);\n }else{\n $this->sd78_codigo = ($this->sd78_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd78_codigo\"]:$this->sd78_codigo);\n }\n }", "title": "" }, { "docid": "05375f39fba7aeae6209447bd91cd07e", "score": "0.5531498", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed343_sequencia = ($this->ed343_sequencia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed343_sequencia\"]:$this->ed343_sequencia);\n $this->ed343_turmacenso = ($this->ed343_turmacenso == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed343_turmacenso\"]:$this->ed343_turmacenso);\n $this->ed343_turma = ($this->ed343_turma == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed343_turma\"]:$this->ed343_turma);\n $this->ed343_principal = ($this->ed343_principal == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed343_principal\"]:$this->ed343_principal);\n }else{\n $this->ed343_sequencia = ($this->ed343_sequencia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed343_sequencia\"]:$this->ed343_sequencia);\n }\n }", "title": "" }, { "docid": "47d034dc9f28aa85d496a12e27330f50", "score": "0.5527545", "text": "private function resetInputFields(){\n $this->amount_reqd = '';\n $this->terms = '';\n $this->status = '';\n }", "title": "" }, { "docid": "fdcfbe20a6eefa5ff7688a799e71baaa", "score": "0.55269116", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->codandam = ($this->codandam == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"codandam\"]:$this->codandam);\n $this->codordem = ($this->codordem == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"codordem\"]:$this->codordem);\n if($this->dtini == \"\"){\n $this->dtini_dia = ($this->dtini_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"dtini_dia\"]:$this->dtini_dia);\n $this->dtini_mes = ($this->dtini_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"dtini_mes\"]:$this->dtini_mes);\n $this->dtini_ano = ($this->dtini_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"dtini_ano\"]:$this->dtini_ano);\n if($this->dtini_dia != \"\"){\n $this->dtini = $this->dtini_ano.\"-\".$this->dtini_mes.\"-\".$this->dtini_dia;\n }\n }\n if($this->dtfim == \"\"){\n $this->dtfim_dia = ($this->dtfim_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"dtfim_dia\"]:$this->dtfim_dia);\n $this->dtfim_mes = ($this->dtfim_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"dtfim_mes\"]:$this->dtfim_mes);\n $this->dtfim_ano = ($this->dtfim_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"dtfim_ano\"]:$this->dtfim_ano);\n if($this->dtfim_dia != \"\"){\n $this->dtfim = $this->dtfim_ano.\"-\".$this->dtfim_mes.\"-\".$this->dtfim_dia;\n }\n }\n $this->hrini = ($this->hrini == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"hrini\"]:$this->hrini);\n $this->hrfim = ($this->hrfim == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"hrfim\"]:$this->hrfim);\n $this->descricao = ($this->descricao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"descricao\"]:$this->descricao);\n $this->id_usuario = ($this->id_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"id_usuario\"]:$this->id_usuario);\n }else{\n $this->codandam = ($this->codandam == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"codandam\"]:$this->codandam);\n }\n }", "title": "" }, { "docid": "97c997164a1fb8d1614cdc077ef1db19", "score": "0.55232376", "text": "public function beforeValidationOnUpdate()\n {\n\t // Timestamp the confirmaton\n\t $this->password_reset_modified = time();\n }", "title": "" }, { "docid": "a44f59c57b2cebd23defdf338a50761d", "score": "0.55180883", "text": "public function save()\n {\n $attributes = $this->getAttributesDetails();\n foreach ($attributes as $attribute) {\n $field = $this->getMultilingualFieldName($attribute->field);\n Yii::$app->settings->set([$attribute->group, $attribute->key, $attribute->language], $this->{$field});\n }\n }", "title": "" }, { "docid": "2bda933e837acd1a557b8829a25017cf", "score": "0.5516047", "text": "protected function editData(){\t\t\n\t\t\n\t\t//preparing fields for update sql\n\t\tlist($columnsWithOrdered, $allLibExtraInfo, $columns)=$this->getColumnOrdered();\n\t\t\n\t\t//for use in case of additional validation, for example see devClassExtInstructors.php\n\t\t$this->libObject->infoForAdditionalValidate = [$columnsWithOrdered, $allLibExtraInfo, $columns,'addEditMainEntity'=>true];\n\t\t\n\t\t$index = 0;\n\t\t$editSql=\"update {$this->CI->db->dbprefix}{$this->libName} set \";\n\t\t$idToEdit=\"\";\n\t\tforeach($columnsWithOrdered as $fieldName=>$colInfos)\t{\n\t\t\t\n\t\t\t// if field is auto increment thn by pass\n\t\t\tif($colInfos['is_identity']==1){ \t\t\t\t\n\t\t\t\t$idToEdit =\"\".$this->escapeSQL($this->CI->input->post(''.$index,true)).\"\";\n\t\t\t\t$index++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//if the field is specied as hidden, then verify that it have been specified default value.\n\t\t\tif((isset($allLibExtraInfo[$this->libName]['addEditModal']['hidden']))) \n\t\t\t{\n\t\t\t\tif(in_array($fieldName, $allLibExtraInfo[$this->libName]['addEditModal']['hidden'])){\n\t\t\t\t\tif(isset($allLibExtraInfo[$this->libName]['addEditModal']['default'][$fieldName])){\n\t\t\t\t\t\t$index++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$method = __METHOD__;\n\t\t\t\t\t\t$this->notify('danger','Fatal Error _002: The hidden keys in entityRecipes is defined, but not yet declared default. =&gt; '.$method);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$thisFieldVal = $this->escapeSQL($this->CI->input->post(''.$index, true));\n\n\t\t\tif(in_array($colInfos['Datatype'], ['date','datetime'])){\n\t\t\t\tlist($year,$month,$day) = $this->splitAndConvertDate($thisFieldVal);\n\t\t\t\t$thisFieldVal = \"{$year}/{$month}/{$day}\"==\"//\"?\"\":\"{$year}/{$month}/{$day}\";\n\t\t\t}\n\n\t\t\t$thisFieldVal = $thisFieldVal===\"\"?\"NULL\":\"'\".$this->escapeSQL($thisFieldVal).\"'\";\n\t\t\t$editSql.=\"{{{$fieldName}={$thisFieldVal}}}\";\n\t\t\t$index++;\n\t\t}\n\n\t\t//create sql for update\n\t\t$editSql .= \" where id = '{$idToEdit}' \";\n\t\t$finalSqlToEdit = str_replace(\"}}\",\"\",str_replace (\"{{\",\"\",str_replace(\"}}{{\",\",\",$editSql)));\n\n\t\tif(CODING_ENVIROMENT=='develop') $this->response['converted']['editSql'] = $editSql;\n\n\t\t//perform updating by using doDbTransaction method\n\t\t$editResult = $this->libObject->doDbTransactions($finalSqlToEdit);\n\t\tif($editResult[0]=='ok'){\n\t\t\t$this->notify('success',\"Updating of {$allLibExtraInfo[$this->libName]['descriptions']} is saved\");\n\t\t}else{\n\t\t\t$editResult[1] = $this->convertDBErrorMessageToUser($editResult['errorCode'],$editResult['errorMessage'],$allLibExtraInfo);\n\t\t\t$this->notify('danger',\"Unable to update {$allLibExtraInfo[$this->libName]['descriptions']}, because {$editResult[1]} \");\n\t\t}\n\t}", "title": "" }, { "docid": "9e835c77046788b0666bcde57959f110", "score": "0.55156875", "text": "public function atualizarAction()\n {\n $this->modelTurma->update($this->_getAllParams());\n\n $this->_redirect('turma/index');\n }", "title": "" }, { "docid": "08a94997a95266d800cfb6812282edbb", "score": "0.5513298", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->m103_codigo = ($this->m103_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m103_codigo\"]:$this->m103_codigo);\n $this->m103_id_usuario = ($this->m103_id_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m103_id_usuario\"]:$this->m103_id_usuario);\n if($this->m103_data == \"\"){\n $this->m103_data_dia = ($this->m103_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m103_data_dia\"]:$this->m103_data_dia);\n $this->m103_data_mes = ($this->m103_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m103_data_mes\"]:$this->m103_data_mes);\n $this->m103_data_ano = ($this->m103_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m103_data_ano\"]:$this->m103_data_ano);\n if($this->m103_data_dia != \"\"){\n $this->m103_data = $this->m103_data_ano.\"-\".$this->m103_data_mes.\"-\".$this->m103_data_dia;\n }\n }\n $this->m103_hora = ($this->m103_hora == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m103_hora\"]:$this->m103_hora);\n $this->m103_motivo = ($this->m103_motivo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m103_motivo\"]:$this->m103_motivo);\n $this->m103_quantanulada = ($this->m103_quantanulada == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m103_quantanulada\"]:$this->m103_quantanulada);\n $this->m103_tipoanu = ($this->m103_tipoanu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m103_tipoanu\"]:$this->m103_tipoanu);\n }else{\n $this->m103_codigo = ($this->m103_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m103_codigo\"]:$this->m103_codigo);\n }\n }", "title": "" }, { "docid": "8bcaab7564ca40296e11f471640c798b", "score": "0.55101156", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->bi30_sequencial = ($this->bi30_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi30_sequencial\"]:$this->bi30_sequencial);\n $this->bi30_descricao = ($this->bi30_descricao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi30_descricao\"]:$this->bi30_descricao);\n }else{\n $this->bi30_sequencial = ($this->bi30_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bi30_sequencial\"]:$this->bi30_sequencial);\n }\n }", "title": "" }, { "docid": "a2f09da506126b9fedcee15e149d25d4", "score": "0.5500559", "text": "public function save() {\n\n // Because stuff from Vue / Front end JS comes as string, we must filter the boolean strings back to proper booleans before saving to the database\n $this -> filter_front_boolean_fields();\n\n foreach ( $this -> fillable as $key => $property) {\n if ( isset( $this -> $property ) ) {\n\n $custom_field_name = static::$post_type . '_' . $property;\n\n update_post_meta( $this -> id, $custom_field_name, $this -> $property );\n\n }\n }\n\n\n // Do the same for the non-mass updatable\n foreach ( $this -> manual as $key => $property) {\n if ( isset( $this -> $property ) ) {\n\n $custom_field_name = static::$post_type . '_' . $property;\n\n update_post_meta( $this -> id, $custom_field_name, $this -> $property );\n\n }\n }\n\n }", "title": "" }, { "docid": "b97954438ead3cc1fbfe38bb696f2f24", "score": "0.55003256", "text": "public function editCustomField() {\n $acc = (!empty($_POST['acc']) ? mswSQL(implode(',', $_POST['acc'])) : 'all');\n $_POST['fieldType'] = (isset($_POST['fieldType']) && in_array($_POST['fieldType'], array(\n 'textarea',\n 'input',\n 'select',\n 'checkbox',\n 'calendar'\n )) ? $_POST['fieldType'] : 'input');\n $_POST['fieldReq'] = (isset($_POST['fieldReq']) ? 'yes' : 'no');\n $_POST['repeatPref'] = (isset($_POST['repeatPref']) ? 'yes' : 'no');\n $_POST['enField'] = (isset($_POST['enField']) ? 'yes' : 'no');\n $dept = (empty($_POST['dept']) ? implode(',', $_POST['deptall']) : implode(',', $_POST['dept']));\n if (empty($_POST['fieldLoc'])) {\n $_POST['fieldLoc'][] = 'ticket';\n }\n if ((int) $_POST['update'] > 0) {\n $_POST['update'] = (int) $_POST['update'];\n mswSQL_query(\"UPDATE `\" . DB_PREFIX . \"cusfields` SET\n `fieldInstructions` = '\" . mswSQL($_POST['fieldInstructions']) . \"',\n `fieldType` = '{$_POST['fieldType']}',\n `fieldReq` = '{$_POST['fieldReq']}',\n `fieldOptions` = '\" . mswSQL($_POST['fieldOptions']) . \"',\n `fieldLoc` = '\" . mswSQL(implode(',', $_POST['fieldLoc'])) . \"',\n `repeatPref` = '{$_POST['repeatPref']}',\n `enField` = '{$_POST['enField']}',\n `departments` = '{$dept}',\n `accounts` = '{$acc}'\n WHERE `id` = '{$_POST['update']}'\n \", __file__, __line__);\n }\n }", "title": "" }, { "docid": "ecc01dbe9e533a99ddb76460334d170b", "score": "0.54955536", "text": "protected function setRecordValuesFromForm() {\n\t\t$this->form->setRecordValuesFromFields($this->record);\n\t}", "title": "" }, { "docid": "d35a693b05a2416ff715e6cd05e40eb1", "score": "0.5490159", "text": "function dob_fields_save( $user_id ) {\r\n if ( !current_user_can( 'edit_user', $user_id ) )\r\n return false;\r\n update_user_meta( $user_id, 'dob', $_POST['dob'] );\r\n}", "title": "" }, { "docid": "9d909e75750b2f703ba25cfd67ef1c69", "score": "0.54891455", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->cm24_i_codigo = ($this->cm24_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm24_i_codigo\"]:$this->cm24_i_codigo);\n $this->cm24_i_sepultura = ($this->cm24_i_sepultura == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm24_i_sepultura\"]:$this->cm24_i_sepultura);\n $this->cm24_i_sepultamento = ($this->cm24_i_sepultamento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm24_i_sepultamento\"]:$this->cm24_i_sepultamento);\n if($this->cm24_d_entrada == \"\"){\n $this->cm24_d_entrada_dia = ($this->cm24_d_entrada_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm24_d_entrada_dia\"]:$this->cm24_d_entrada_dia);\n $this->cm24_d_entrada_mes = ($this->cm24_d_entrada_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm24_d_entrada_mes\"]:$this->cm24_d_entrada_mes);\n $this->cm24_d_entrada_ano = ($this->cm24_d_entrada_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm24_d_entrada_ano\"]:$this->cm24_d_entrada_ano);\n if($this->cm24_d_entrada_dia != \"\"){\n $this->cm24_d_entrada = $this->cm24_d_entrada_ano.\"-\".$this->cm24_d_entrada_mes.\"-\".$this->cm24_d_entrada_dia;\n }\n }\n }else{\n $this->cm24_i_codigo = ($this->cm24_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm24_i_codigo\"]:$this->cm24_i_codigo);\n }\n }", "title": "" }, { "docid": "f03150059d0029f44de93c45bd38e7bb", "score": "0.5487981", "text": "public function actualizar(){\n }", "title": "" } ]
4b2c7527901e4e0deff90250a7e48480
Get the value of idState
[ { "docid": "dfa4ea4f3ed0309fc9c5e643dc0aed88", "score": "0.80245554", "text": "public function getIdState()\n {\n return $this->idState;\n }", "title": "" } ]
[ { "docid": "9b7c4f53db14900cb406a182c032d70e", "score": "0.8065667", "text": "public function getStateId() {\n return $this->state_id;\n }", "title": "" }, { "docid": "5155b18b903288a3c31d58f0fbb2837d", "score": "0.7939203", "text": "public function getStateId() {\n return $this->_stateId;\n }", "title": "" }, { "docid": "b48d5c93fbaf62abd5a77b0323357ee7", "score": "0.7883512", "text": "public function getStateID()\n {\n return $this->StateID;\n }", "title": "" }, { "docid": "4a024ac4cb752fdff2f352d1f7b90b53", "score": "0.78631294", "text": "public function getId(): StateId;", "title": "" }, { "docid": "c2158ce6318e8ac78b1aee8624eebac9", "score": "0.7468449", "text": "public function getState($id);", "title": "" }, { "docid": "2ee8c026a5224a7be7ec6e98375ee4d1", "score": "0.6959237", "text": "public function getState(): int;", "title": "" }, { "docid": "ece66c2161f2319dc15bc4b0577a96f5", "score": "0.69271463", "text": "public function getStorageStateId();", "title": "" }, { "docid": "1812d6aaee4af3040e9467d521774fff", "score": "0.69217247", "text": "public function getState($id) {\n if (isset($this->state[$id])) {\n return $this->state[$id];\n }\n\n return NULL;\n }", "title": "" }, { "docid": "8bd3b33a7cd7ae952c8c73290d810b35", "score": "0.6826206", "text": "public function getState()\n\t{\n\t\treturn $this->_value;\n\t}", "title": "" }, { "docid": "1ab01359ff8012c09a93cc248cd858bb", "score": "0.67714757", "text": "function get_state_name($id)\n {\n $ci = & get_instance();\n return $ci->db->get_where('ci_states', array('id' => $id))->row_array()['name'];\n }", "title": "" }, { "docid": "537f99ca8bc4e04566e439be05099b9d", "score": "0.6747748", "text": "function GetStateById($stateId)\n\t{\n\t\t$stateInfo = GetStateInfoById($stateId);\n\t\tif(isset($stateInfo['statename'])) {\n\t\t\treturn $stateInfo['statename'];\n\t\t}\n\t\telse {\n\t\t\treturn '';\n\t\t}\n\t}", "title": "" }, { "docid": "6f91f9803a296fa446fcd662a5d0fbae", "score": "0.6703094", "text": "public function getState(){\n return $this-> state;\n }", "title": "" }, { "docid": "0633e765a11fcea6ae7ab7a92fea0fe2", "score": "0.6694066", "text": "public function getState(){\n\t\treturn $this->state;\n\t}", "title": "" }, { "docid": "a9bf718372567cf5144345ffe34998b1", "score": "0.669221", "text": "public function getState(){\n\t\t\treturn $this->state;\n\t\t}", "title": "" }, { "docid": "ef95c68b97d54f394637990d74dea313", "score": "0.6684145", "text": "protected function getState()\n {\n return uniqid();\n }", "title": "" }, { "docid": "9991329d5b83a65c0ec407c707f39a05", "score": "0.6683148", "text": "public function getState()\n {\n if (empty($this->state)) {\n $this->setState(\n rtrim(\n base64_encode(uniqid('', true)),\n '='\n )\n );\n }\n return $this->state;\n }", "title": "" }, { "docid": "9bd94c0d03bc19814df65509c5a03105", "score": "0.66702485", "text": "function get_state_name($id)\n{\n $ci = &get_instance();\n return $ci->db->get_where('ci_states', array('id' => $id))->row_array()['name'];\n}", "title": "" }, { "docid": "8f6b0d2255296a8da980f2562ca25de2", "score": "0.6659631", "text": "public function getState()\n {\n return $this->data['state'];\n }", "title": "" }, { "docid": "38a681d08f8fb3b36f1fa746c1a2312c", "score": "0.66569227", "text": "public function getState();", "title": "" }, { "docid": "38a681d08f8fb3b36f1fa746c1a2312c", "score": "0.66569227", "text": "public function getState();", "title": "" }, { "docid": "38a681d08f8fb3b36f1fa746c1a2312c", "score": "0.66569227", "text": "public function getState();", "title": "" }, { "docid": "38a681d08f8fb3b36f1fa746c1a2312c", "score": "0.66569227", "text": "public function getState();", "title": "" }, { "docid": "38a681d08f8fb3b36f1fa746c1a2312c", "score": "0.66569227", "text": "public function getState();", "title": "" }, { "docid": "f326449756870dbe1b915e7f468e96aa", "score": "0.6655", "text": "public function getState() \n {\n return $this->_fields['State']['FieldValue'];\n }", "title": "" }, { "docid": "ab448ab76f148b3ddbc5d2725bddbcf5", "score": "0.6576719", "text": "public function getState()\n {\n return $this->_getField(self::$STATE);\n }", "title": "" }, { "docid": "c82061b64f9ef1ec8e0bfe81eca14614", "score": "0.65512145", "text": "function getState() {\n\t\treturn $this->state;\n\t}", "title": "" }, { "docid": "9e316db4378e1e7825f5147d28745a96", "score": "0.65472406", "text": "public function getStateCode()\n {\n return $this->state_code;\n }", "title": "" }, { "docid": "5e867c1632ab70f9b549fc0adb4eb415", "score": "0.6526736", "text": "public function getState() \r\n\t\t{\r\n\t\t\treturn $this->state;\r\n\t\t}", "title": "" }, { "docid": "e1eee16cc255d9b81cfba34ab480b3a7", "score": "0.65027046", "text": "function getState () {\n return $this->state;\n }", "title": "" }, { "docid": "2365ad581244476fb0496da2d419f8cc", "score": "0.64867985", "text": "function getState();", "title": "" }, { "docid": "98ad06ef9e3e41ac194393d2c9740346", "score": "0.64815706", "text": "public function getState()\r\n {\r\n return $this->state;\r\n }", "title": "" }, { "docid": "b633e161eafbedef273700728dafa67b", "score": "0.6465026", "text": "public function getState() {\n\t\treturn $this->state;\n\t}", "title": "" }, { "docid": "2a750a1635bcfcac396fe57e535d2add", "score": "0.64594483", "text": "public function getState(): string\n {\n return $this->state;\n }", "title": "" }, { "docid": "2a750a1635bcfcac396fe57e535d2add", "score": "0.64594483", "text": "public function getState(): string\n {\n return $this->state;\n }", "title": "" }, { "docid": "1f0d12b146c2ea634af27d9729551ecd", "score": "0.64297384", "text": "public function getState()\n {\n return ($this->state);\n\n }", "title": "" }, { "docid": "8feb35c8a874669c94d65a7a7ae48db4", "score": "0.6410215", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "b7797e1e7221b0e3496084d77e45535d", "score": "0.64028883", "text": "public function getState($id){\n\t\t$data = $this->biller_model->getState($id);\n\t\techo json_encode($data);\n\t}", "title": "" }, { "docid": "be3d4ab0e50df3f9a63225b0c0be53ea", "score": "0.6388999", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "d0537a6fde4ca027fda427b865c2e62e", "score": "0.6385085", "text": "public function getState() {\n return $this->state;\n }", "title": "" }, { "docid": "358eb4bae50f20219395f53cbc63a48c", "score": "0.6370229", "text": "public function getState()\n\t{\n\t\treturn $this->state;\n\t}", "title": "" }, { "docid": "358eb4bae50f20219395f53cbc63a48c", "score": "0.6370229", "text": "public function getState()\n\t{\n\t\treturn $this->state;\n\t}", "title": "" }, { "docid": "27daf47e6246fca7aecdbb28afb21896", "score": "0.6366714", "text": "public function getState() : String {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "488f50fbbe40ae8e6c9ce31d3f98919b", "score": "0.6359963", "text": "public function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "c242ab8338eafcbd39df0e1ab0e0309b", "score": "0.63483906", "text": "protected function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "c242ab8338eafcbd39df0e1ab0e0309b", "score": "0.63483906", "text": "protected function getState()\n {\n return $this->state;\n }", "title": "" }, { "docid": "e5a39f6636d455296924abbaa7d7a392", "score": "0.63480216", "text": "public function getState()\r\n {\r\n return $this->_state;\r\n }", "title": "" }, { "docid": "3fc4dfe5f76ce110bddbace228b06a03", "score": "0.6339976", "text": "public function getState() : string\n {\n return $this->state;\n }", "title": "" }, { "docid": "3fc4dfe5f76ce110bddbace228b06a03", "score": "0.6339976", "text": "public function getState() : string\n {\n return $this->state;\n }", "title": "" }, { "docid": "43674f88a18d73730e0c396b69daaf19", "score": "0.63191086", "text": "public function getStatusID()\r\n {\r\n return $this->fields['StatusID']['value'];\r\n }", "title": "" }, { "docid": "6496b585baf0d12362173d687c6c6956", "score": "0.6297843", "text": "public function getState_name()\n\t {\n\t return $this->state_name;\n\t }", "title": "" }, { "docid": "798d389804cf5fb2429f1501ccd8a019", "score": "0.6296206", "text": "public function getState() : String\r\n {\r\n return $this->_state;\r\n }", "title": "" }, { "docid": "ebf97b829d170084d84e1893ff51d584", "score": "0.6293011", "text": "function id()\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n return $this->ID;\n }", "title": "" }, { "docid": "ebf97b829d170084d84e1893ff51d584", "score": "0.6293011", "text": "function id()\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n return $this->ID;\n }", "title": "" }, { "docid": "a6fc69fb07a6786822a4dce822e3952e", "score": "0.6283906", "text": "public function getState() {\n $result = $this->getProp('state');\n if (empty($result)) {\n $result = self::State_Start;\n }\n return $result;\n }", "title": "" }, { "docid": "7900411945e4f9185ecc674ab30e91ec", "score": "0.62678283", "text": "public function getState()\n {\n return $this->_state;\n }", "title": "" }, { "docid": "367fdc7dd14b1300636c6d8ba5d4d33b", "score": "0.62433076", "text": "public function getIdStatus()\n {\n return $this->idStatus;\n }", "title": "" }, { "docid": "73549dba31859ae8ab13dd8a73a31e5f", "score": "0.62339777", "text": "function get_atal_statebystateid($stateid){\n\tglobal $DB;\n\t$resultset = $DB->get_record('state',array('id' =>$stateid),'name');\n\treturn $resultset;\n}", "title": "" }, { "docid": "988c805765dd00f5cc2fd41e914f9f85", "score": "0.6226631", "text": "function getIsoByState($state){\r\n\t\t$tbl=_DB_PREFIX_.\"state\";\r\n\t\t $q=\"SELECT * from $tbl WHERE iso_code ='$state'\";\r\n\t\t$q = Db::getInstance()->ExecuteS($q);\r\n\t\tif(!empty($q)) {\r\n\t\t$id=$q[0]['id_state'];\r\n\t\treturn($id);\r\n\t\t}\r\n}", "title": "" }, { "docid": "9319906a1609220b335b8832d516d7d7", "score": "0.62190574", "text": "public function getState()\n {\n return $this->_state;\n }", "title": "" }, { "docid": "9319906a1609220b335b8832d516d7d7", "score": "0.62190574", "text": "public function getState()\n {\n return $this->_state;\n }", "title": "" }, { "docid": "e748dab6fce14414cfc3cfbfb8e81106", "score": "0.62152976", "text": "public function getId_status()\n {\n return $this->id_status;\n }", "title": "" }, { "docid": "955521e361951ebb5fe9bab40e0607fb", "score": "0.6204111", "text": "public function getState(): string\n {\n return $this->state->getState();\n }", "title": "" }, { "docid": "7e4c50d68051f121544f410174d622c0", "score": "0.6195069", "text": "public function getGameState($id)\n {\n $sql = \"SELECT * FROM game_state WHERE id = $id\";\n\n $result = $this->db->query($sql);\n foreach ($result as $value) {\n $this->gameState = $value;\n }\n return $this->gameState;\n }", "title": "" }, { "docid": "987f487de5a2f394ff14aa1221f581fe", "score": "0.6189816", "text": "public function getState()\n {\n return $this->data['ik_inv_st'];\n }", "title": "" }, { "docid": "e88114d0a744ec6c1a288adab64f2d2c", "score": "0.6179511", "text": "public function getStateDetailByName()\n {\n $sql = \"SELECT id, state_name, capital, date_add, date_upd FROM ag_states WHERE state_name = :state_name\";\n $stmt = Db::getDbObject()->prepare($sql);\n $stmt->bindValue(':state_name', $this->getStateName(), PDO::PARAM_STR);\n $stmt->execute();\n $state = $stmt->fetch(PDO::FETCH_ASSOC);\n\n if($state)\n return $state;\n else\n return false;\n }", "title": "" }, { "docid": "44cc0d7219bc6ceea449f8bb233336a2", "score": "0.61730367", "text": "public function get_state()\n\t\t\t{ \n\t\t\t\t$this->db->select ('state_code,state_name');\n\t\t\t\t$this->db->from('state');\n\t\t\t\t$query = $this->db->get();\n\t\t\t\treturn $query->result();\n\t\t\t}", "title": "" }, { "docid": "c97ac756b023441e2d41b65b3e466855", "score": "0.60665286", "text": "public function getStateName()\n {\n return $this->stateName;\n }", "title": "" }, { "docid": "80b20d54b3c9db66c7d64b37b21f393b", "score": "0.6060346", "text": "public function getState()\n {\n return $this->per_state;\n }", "title": "" }, { "docid": "0fa8b566c370117044b2a955d1812bf8", "score": "0.60304034", "text": "abstract protected function getState();", "title": "" }, { "docid": "ba879958076cf3ee396b1b2645653f96", "score": "0.60284346", "text": "public function getState() {\n if (!$this->sessionState) {\n $sessionStates = CachedConferenceApi::getSessionStates();\n\n foreach ($sessionStates as $sessionState) {\n if ($sessionState->getId() == $this->state_id) {\n $this->sessionState = $sessionState;\n break;\n }\n }\n }\n\n return $this->sessionState;\n }", "title": "" }, { "docid": "67c69ababd93988920b6bbad4a04f793", "score": "0.59941727", "text": "public function getCurrentState();", "title": "" }, { "docid": "67c69ababd93988920b6bbad4a04f793", "score": "0.59941727", "text": "public function getCurrentState();", "title": "" }, { "docid": "d6da4af5bc82cc07073731fa66273c4e", "score": "0.59698415", "text": "public function getState()\n {\n }", "title": "" }, { "docid": "d6da4af5bc82cc07073731fa66273c4e", "score": "0.59698415", "text": "public function getState()\n {\n }", "title": "" }, { "docid": "061f48f6ab2edf300832ef10e7c841ba", "score": "0.5961457", "text": "public function getState()\n {\n return parent::getState();\n }", "title": "" }, { "docid": "523a1d096f3f92c27b631792818b625c", "score": "0.5960454", "text": "public function state($id)\n {\n return $this->post('state',array(\n 'provider_token' => $this->credentials->provider_token,\n 'order_ref' => $id,\n ));\n }", "title": "" }, { "docid": "ca74cc6f7da2cd16540c665cf6e0314b", "score": "0.59491986", "text": "public function getStatus_id()\n {\n return $this->status_id;\n }", "title": "" }, { "docid": "332baea615c7a845221cc07d875c30b3", "score": "0.59367687", "text": "function getID() {\r\n return $this->getValue('id');\r\n }", "title": "" } ]
8c2171dc9b8477218ec15092453a5847
Kses global for allowable protocols.
[ { "docid": "e5ee04d1d7fc4fdada59ee7a8832a75a", "score": "0.6016493", "text": "function yourls_kses_allowed_protocols() {\n\t// More or less common stuff in links. From http://en.wikipedia.org/wiki/URI_scheme\n\treturn array(\n\t\t// Common\n\t\t'http://', 'https://', 'ftp://',\n\t\t'file://', 'smb://',\n\t\t'sftp://',\n\t\t'feed:', 'feed://',\n\t\t'mailto:',\n\t\t'news:', 'nntp://',\n\n\t\t// Old school bearded geek\n\t\t'gopher://', 'telnet://', 'finger://',\n\t\t'nntp://', 'worldwind://',\n\n\t\t// Dev\n\t\t'ssh://', 'svn://', 'svn+ssh://', 'git://', 'cvs://',\n\t\t'apt:',\n\t\t'market://', // Google Play\n\t\t'view-source:',\n\n\t\t// P2P\n\t\t'ed2k://', 'magnet:', 'udp://',\n\n\t\t// Streaming stuff\n\t\t'mms://', 'lastfm://', 'spotify:', 'rtsp://',\n\n\t\t// Text & voice\n\t\t'aim:', 'facetime://', 'gtalk:', 'xmpp:',\n\t\t'irc://', 'ircs://', 'mumble://',\n\t\t'callto:', 'skype:', 'sip:',\n\t\t'teamspeak://', 'tel:', 'ventrilo://', 'xfire:',\n\t\t'ymsgr:', 'tg://', 'whatsapp://',\n\n\t\t// Misc\n\t\t'steam:', 'steam://',\n\t\t'bitcoin:',\n\t\t'ldap://', 'ldaps://',\n\n\t\t// Purposedly removed for security\n\t\t/*\n\t\t'about:', 'chrome://', 'chrome-extension://',\n\t\t'javascript:',\n\t\t'data:',\n\t\t*/\n\t);\n}", "title": "" } ]
[ { "docid": "d6c0026e52bec94409eddb21281e64c0", "score": "0.59731734", "text": "function rc_allowed_protocols()\n {\n static $protocols;\n \n if (empty($protocols)) {\n $protocols = array(\n 'http',\n 'https',\n 'ftp',\n 'ftps',\n 'mailto',\n 'news',\n 'irc',\n 'gopher',\n 'nntp',\n 'feed',\n 'telnet',\n 'mms',\n 'rtsp',\n 'svn',\n 'tel',\n 'fax',\n 'xmpp'\n );\n \n /**\n * Filter the list of protocols allowed in HTML attributes.\n *\n * @since 3.0.0\n *\n * @param array $protocols\n * Array of allowed protocols e.g. 'http', 'ftp', 'tel', and more.\n */\n $protocols = RC_Hook::apply_filters('kses_allowed_protocols', $protocols);\n }\n \n return $protocols;\n }", "title": "" }, { "docid": "9fad043ff47165cdbb2437e1c371493d", "score": "0.5886015", "text": "function yourls_kses_init() {\n\tglobal $yourls_allowedentitynames, $yourls_allowedprotocols;\n\n\tif( ! $yourls_allowedentitynames ) {\n\t\t$yourls_allowedentitynames = yourls_apply_filter( 'kses_allowed_entities', yourls_kses_allowed_entities() );\n\t}\n\n\tif( ! $yourls_allowedprotocols ) {\n\t\t$yourls_allowedprotocols = yourls_apply_filter( 'kses_allowed_protocols', yourls_kses_allowed_protocols() );\n\t}\n\n\t/** See NOTE ABOUT GLOBALS **\n\n\tif( ! $yourls_allowedtags_all ) {\n\t\t$yourls_allowedtags_all = yourls_kses_allowed_tags_all();\n\t\t$yourls_allowedtags_all = array_map( '_yourls_add_global_attributes', $yourls_allowedtags_all );\n\t\t$yourls_allowedtags_all = yourls_apply_filter( 'kses_allowed_tags_all', $yourls_allowedtags_all );\n\t} else {\n\t\t// User defined: let's sanitize\n\t\t$yourls_allowedtags_all = yourls_kses_array_lc( $yourls_allowedtags_all );\n\t}\n\n\tif( ! $yourls_allowedtags ) {\n\t\t$yourls_allowedtags = yourls_kses_allowed_tags();\n\t\t$yourls_allowedtags = array_map( '_yourls_add_global_attributes', $yourls_allowedtags );\n\t\t$yourls_allowedtags = yourls_apply_filter( 'kses_allowed_tags', $yourls_allowedtags );\n\t} else {\n\t\t// User defined: let's sanitize\n\t\t$yourls_allowedtags = yourls_kses_array_lc( $yourls_allowedtags );\n\t}\n\n\t/**/\n}", "title": "" }, { "docid": "d69f14092df44c04938af7fe9472c8dd", "score": "0.536383", "text": "function getSubProtocols();", "title": "" }, { "docid": "3961a69cf228e70adea77006fa075efd", "score": "0.52051795", "text": "public function getprotocol() {}", "title": "" }, { "docid": "ec60cea6dcbe516f5604209712381ef2", "score": "0.5071092", "text": "function is_configurable($iface)\n{\n if (\n preg_match('/^eth/', $iface)\n || preg_match('/^wlan/', $iface)\n || preg_match('/^ath/', $iface)\n || preg_match('/^em/', $iface)\n || preg_match('/^en/', $iface)\n || preg_match('/^p\\d+p/', $iface)\n || preg_match('/^br/', $iface)\n || preg_match('/^bond/', $iface)\n || preg_match('/^ppp/', $iface)\n ) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "title": "" }, { "docid": "35642b36ab2c5fabb7fec843800cfb66", "score": "0.49970028", "text": "public function getProtocolAllowableValues()\r\n {\r\n return [\r\n self::PROTOCOL_UDP,\r\n self::PROTOCOL_TCP,\r\n self::PROTOCOL_HTTP,\r\n ];\r\n }", "title": "" }, { "docid": "c149f5ccfa23165ea97936b02059d427", "score": "0.498133", "text": "protected function electorPermits()\n {\n }", "title": "" }, { "docid": "0114e89172e156a0e52396664caaed4e", "score": "0.49452013", "text": "private function addAllows ()\r\n\t{\r\n\t\t// all authenticated users can use the backend\n\t\t$this->acl->allow(\r\n\t\tarray(\r\n\t\t\t'publisher',\r\n\t\t\t'it',\r\n\t\t\t'admin'), 'index');\r\n\t\t// publisher can view, add, edit and delete; hence no privileges enumerated\n\t\t$this->acl->allow('publisher',\r\n\t\tarray(\r\n\t\t\t'headlines',\r\n\t\t\t'calendar',\r\n\t\t\t'multimedia'));\r\n\t\t// give view-only privilege for clients resource and weather\n\t\t$this->acl->allow('publisher',\r\n\t\tarray(\r\n\t\t\t'weather',\r\n\t\t\t'clients'), array(\r\n\t\t\t'view',\r\n\t\t\t'index',\r\n\t\t\t'list'));\r\n\t\t// IT can view, add, edit, delete options, users and clients\n\t\t// IT can also view, make and restore backups\n\t\t$this->acl->allow('it',\r\n\t\tarray(\r\n\t\t\t'weather',\r\n\t\t\t'options',\r\n\t\t\t'users',\r\n\t\t\t'clients',\r\n\t\t\t'backuprestore'));\r\n\t\t// give view-only privilege for headlines and multimedia\n\t\t$this->acl->allow('it',\r\n\t\tarray(\r\n\t\t\t'headlines',\r\n\t\t\t'calendar',\r\n\t\t\t'multimedia'), array(\r\n\t\t\t'index',\r\n\t\t\t'view',\r\n\t\t\t'list'));\r\n\t\t// admin can do everything\n\t\t$this->acl->allow('admin');\r\n\t}", "title": "" }, { "docid": "e406efb0d758b37d43962c313070863b", "score": "0.49109516", "text": "public function provider_set_protocol()\n\t{\n\t\treturn [\n\t\t\t[\n\t\t\t\t'http/1.1',\n\t\t\t\t'HTTP/1.1',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'ftp',\n\t\t\t\t'FTP',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'hTTp/1.0',\n\t\t\t\t'HTTP/1.0',\n\t\t\t],\n\t\t];\n\t}", "title": "" }, { "docid": "691ab33d8250101d0a1023b153e7cdb2", "score": "0.49014238", "text": "function instance_allow_config() {\n return true;\n }", "title": "" }, { "docid": "3036d28656452cd68745bcaa34a3a56e", "score": "0.48816612", "text": "function market_valid_keys()\n{\n\treturn array(\n\t\t'disabled' => 'Fully disable (ignore) the market',\n\t);\n}", "title": "" }, { "docid": "7a729d6caef697b498303416f7cc3024", "score": "0.487653", "text": "function can_expose() { return FALSE; }", "title": "" }, { "docid": "4e33471bf86139b13a7c3a5f46ba4167", "score": "0.48348796", "text": "public function setProtocol(): bool\n {\n return $this->socket->setProtocol(Message::protocolOptions());\n }", "title": "" }, { "docid": "376802aefe98066628f9e5dc63c575ff", "score": "0.48297092", "text": "function keyTypes()\n {\n return array('to_profile' => 'K', 'group_message_id' => 'K');\n }", "title": "" }, { "docid": "113f9001a5a907e42541109470343fca", "score": "0.48057434", "text": "public function allow()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6d0d1f8691beefb8a4cb7cf7273fb41d", "score": "0.47978768", "text": "function allowed() {\n return TRUE;\n }", "title": "" }, { "docid": "18136b3c43a72797cd3a5bf29d3522c1", "score": "0.47729272", "text": "function yourls_has_interface() {\n\t\tif( self::yourls_is_API() or self::yourls_is_GO() or self::yourls_is_Ajax() )\n\t\t\treturn false;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d866ed807ec3e071fbd1bb5ef448a0c0", "score": "0.47611782", "text": "function scr_af_setting()\n{\n\tglobal $gw_scr;\n\tglobal $g_mode;\n\n\treturn;\n}", "title": "" }, { "docid": "a42034cc6dca1b6f4f3cfbbdf8cc6a24", "score": "0.4741591", "text": "public function get_default_protocols() {\n\n\t\treturn array(\n\t\t\t'sshd' => array(\n\t\t\t\t'ban_time' => 600,\n\t\t\t\t'find_time' => 600,\n\t\t\t\t'max_retry' => 3,\n\t\t\t),\n\t\t\t'nginx-http-auth' => array(\n\t\t\t\t'ban_time' => 600,\n\t\t\t\t'find_time' => 600,\n\t\t\t\t'max_retry' => 3,\n\t\t\t),\n\t\t\t'nginx-limit-req' => array(\n\t\t\t\t'ban_time' => 600,\n\t\t\t\t'find_time' => 600,\n\t\t\t\t'max_retry' => 3,\n\t\t\t),\n\t\t\t'nginx-botsearch' => array(\n\t\t\t\t'ban_time' => 600,\n\t\t\t\t'find_time' => 600,\n\t\t\t\t'max_retry' => 3,\n\t\t\t),\n\t\t);\n\n\t}", "title": "" }, { "docid": "4b6b4279ad27bb6506e2a9d56df52892", "score": "0.4730919", "text": "public function onEnable() { }", "title": "" }, { "docid": "c9b674bd6b7f339140e7a2e95ef7febf", "score": "0.4724998", "text": "public function allow() : bool;", "title": "" }, { "docid": "ee3baa33a60a9258dcf61a15fdbbac49", "score": "0.47113898", "text": "public function setAsGlobal()\n {\n }", "title": "" }, { "docid": "6b9e828bf7572f9764a52fc7c9786371", "score": "0.46972382", "text": "public function getProtocol();", "title": "" }, { "docid": "6b9e828bf7572f9764a52fc7c9786371", "score": "0.46972382", "text": "public function getProtocol();", "title": "" }, { "docid": "a538833f94a185324a2421a9ac3b87a3", "score": "0.46871892", "text": "public function enable($realm_key = NULL);", "title": "" }, { "docid": "5ad40972a708048ca352398d59f5a8fc", "score": "0.46803316", "text": "public function enable();", "title": "" }, { "docid": "331160341ecfa1583a75f7e066a0b72c", "score": "0.4669035", "text": "public function setExternalSessionAllowed(bool $isAllowed): self { }", "title": "" }, { "docid": "629d95eb1a67890ec14f7c00cd6c1845", "score": "0.46496353", "text": "function protocolType() {\n return array(\n 'DICOM' => 'DICOM',\n 'FTP' => 'FTP',\n 'HTTP' => 'HTTP',\n 'IMAP' => 'IMAP',\n 'DNS' => 'DNS',\n 'RDP' => 'RDP',\n 'RPC' => 'RPC',\n 'RPC/ADS' => 'RPC/ADS',\n 'RPC/CA/PF' => 'RPC/CA/PF',\n 'SMTP' => 'SMTP',\n 'Layer 4' => 'Layer 4 TCP',\n 'TCP/UD' => 'Layer4 TCP/UD',\n 'UDP' => 'Layer 4 UDP',\n );\n}", "title": "" }, { "docid": "06e489484b3f9febbe8f5831d7540113", "score": "0.46414873", "text": "public function can_request() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fda34f624d6fc11ecc8d60b728a846a8", "score": "0.4630115", "text": "function yourls_kses_allowed_tags_all() {\n\treturn array(\n\t\t'address' => array(),\n\t\t'a' => array(\n\t\t\t'href' => true,\n\t\t\t'rel' => true,\n\t\t\t'rev' => true,\n\t\t\t'name' => true,\n\t\t\t'target' => true,\n\t\t),\n\t\t'abbr' => array(),\n\t\t'acronym' => array(),\n\t\t'area' => array(\n\t\t\t'alt' => true,\n\t\t\t'coords' => true,\n\t\t\t'href' => true,\n\t\t\t'nohref' => true,\n\t\t\t'shape' => true,\n\t\t\t'target' => true,\n\t\t),\n\t\t'article' => array(\n\t\t\t'align' => true,\n\t\t\t'dir' => true,\n\t\t\t'lang' => true,\n\t\t\t'xml:lang' => true,\n\t\t),\n\t\t'aside' => array(\n\t\t\t'align' => true,\n\t\t\t'dir' => true,\n\t\t\t'lang' => true,\n\t\t\t'xml:lang' => true,\n\t\t),\n\t\t'b' => array(),\n\t\t'big' => array(),\n\t\t'blockquote' => array(\n\t\t\t'cite' => true,\n\t\t\t'lang' => true,\n\t\t\t'xml:lang' => true,\n\t\t),\n\t\t'br' => array(),\n\t\t'button' => array(\n\t\t\t'disabled' => true,\n\t\t\t'name' => true,\n\t\t\t'type' => true,\n\t\t\t'value' => true,\n\t\t),\n\t\t'caption' => array(\n\t\t\t'align' => true,\n\t\t),\n\t\t'cite' => array(\n\t\t\t'dir' => true,\n\t\t\t'lang' => true,\n\t\t),\n\t\t'code' => array(),\n\t\t'col' => array(\n\t\t\t'align' => true,\n\t\t\t'char' => true,\n\t\t\t'charoff' => true,\n\t\t\t'span' => true,\n\t\t\t'dir' => true,\n\t\t\t'valign' => true,\n\t\t\t'width' => true,\n\t\t),\n\t\t'del' => array(\n\t\t\t'datetime' => true,\n\t\t),\n\t\t'dd' => array(),\n\t\t'details' => array(\n\t\t\t'align' => true,\n\t\t\t'dir' => true,\n\t\t\t'lang' => true,\n\t\t\t'open' => true,\n\t\t\t'xml:lang' => true,\n\t\t),\n\t\t'div' => array(\n\t\t\t'align' => true,\n\t\t\t'dir' => true,\n\t\t\t'lang' => true,\n\t\t\t'xml:lang' => true,\n\t\t),\n\t\t'dl' => array(),\n\t\t'dt' => array(),\n\t\t'em' => array(),\n\t\t'fieldset' => array(),\n\t\t'figure' => array(\n\t\t\t'align' => true,\n\t\t\t'dir' => true,\n\t\t\t'lang' => true,\n\t\t\t'xml:lang' => true,\n\t\t),\n\t\t'figcaption' => array(\n\t\t\t'align' => true,\n\t\t\t'dir' => true,\n\t\t\t'lang' => true,\n\t\t\t'xml:lang' => true,\n\t\t),\n\t\t'font' => array(\n\t\t\t'color' => true,\n\t\t\t'face' => true,\n\t\t\t'size' => true,\n\t\t),\n\t\t'footer' => array(\n\t\t\t'align' => true,\n\t\t\t'dir' => true,\n\t\t\t'lang' => true,\n\t\t\t'xml:lang' => true,\n\t\t),\n\t\t'form' => array(\n\t\t\t'action' => true,\n\t\t\t'accept' => true,\n\t\t\t'accept-charset' => true,\n\t\t\t'enctype' => true,\n\t\t\t'method' => true,\n\t\t\t'name' => true,\n\t\t\t'target' => true,\n\t\t),\n\t\t'h1' => array(\n\t\t\t'align' => true,\n\t\t),\n\t\t'h2' => array(\n\t\t\t'align' => true,\n\t\t),\n\t\t'h3' => array(\n\t\t\t'align' => true,\n\t\t),\n\t\t'h4' => array(\n\t\t\t'align' => true,\n\t\t),\n\t\t'h5' => array(\n\t\t\t'align' => true,\n\t\t),\n\t\t'h6' => array(\n\t\t\t'align' => true,\n\t\t),\n\t\t'header' => array(\n\t\t\t'align' => true,\n\t\t\t'dir' => true,\n\t\t\t'lang' => true,\n\t\t\t'xml:lang' => true,\n\t\t),\n\t\t'hgroup' => array(\n\t\t\t'align' => true,\n\t\t\t'dir' => true,\n\t\t\t'lang' => true,\n\t\t\t'xml:lang' => true,\n\t\t),\n\t\t'hr' => array(\n\t\t\t'align' => true,\n\t\t\t'noshade' => true,\n\t\t\t'size' => true,\n\t\t\t'width' => true,\n\t\t),\n\t\t'i' => array(),\n\t\t'img' => array(\n\t\t\t'alt' => true,\n\t\t\t'align' => true,\n\t\t\t'border' => true,\n\t\t\t'height' => true,\n\t\t\t'hspace' => true,\n\t\t\t'longdesc' => true,\n\t\t\t'vspace' => true,\n\t\t\t'src' => true,\n\t\t\t'usemap' => true,\n\t\t\t'width' => true,\n\t\t),\n\t\t'ins' => array(\n\t\t\t'datetime' => true,\n\t\t\t'cite' => true,\n\t\t),\n\t\t'kbd' => array(),\n\t\t'label' => array(\n\t\t\t'for' => true,\n\t\t),\n\t\t'legend' => array(\n\t\t\t'align' => true,\n\t\t),\n\t\t'li' => array(\n\t\t\t'align' => true,\n\t\t),\n\t\t'map' => array(\n\t\t\t'name' => true,\n\t\t),\n\t\t'menu' => array(\n\t\t\t'type' => true,\n\t\t),\n\t\t'nav' => array(\n\t\t\t'align' => true,\n\t\t\t'dir' => true,\n\t\t\t'lang' => true,\n\t\t\t'xml:lang' => true,\n\t\t),\n\t\t'p' => array(\n\t\t\t'align' => true,\n\t\t\t'dir' => true,\n\t\t\t'lang' => true,\n\t\t\t'xml:lang' => true,\n\t\t),\n\t\t'pre' => array(\n\t\t\t'width' => true,\n\t\t),\n\t\t'q' => array(\n\t\t\t'cite' => true,\n\t\t),\n\t\t's' => array(),\n\t\t'span' => array(\n\t\t\t'dir' => true,\n\t\t\t'align' => true,\n\t\t\t'lang' => true,\n\t\t\t'xml:lang' => true,\n\t\t),\n\t\t'section' => array(\n\t\t\t'align' => true,\n\t\t\t'dir' => true,\n\t\t\t'lang' => true,\n\t\t\t'xml:lang' => true,\n\t\t),\n\t\t'small' => array(),\n\t\t'strike' => array(),\n\t\t'strong' => array(),\n\t\t'sub' => array(),\n\t\t'summary' => array(\n\t\t\t'align' => true,\n\t\t\t'dir' => true,\n\t\t\t'lang' => true,\n\t\t\t'xml:lang' => true,\n\t\t),\n\t\t'sup' => array(),\n\t\t'table' => array(\n\t\t\t'align' => true,\n\t\t\t'bgcolor' => true,\n\t\t\t'border' => true,\n\t\t\t'cellpadding' => true,\n\t\t\t'cellspacing' => true,\n\t\t\t'dir' => true,\n\t\t\t'rules' => true,\n\t\t\t'summary' => true,\n\t\t\t'width' => true,\n\t\t),\n\t\t'tbody' => array(\n\t\t\t'align' => true,\n\t\t\t'char' => true,\n\t\t\t'charoff' => true,\n\t\t\t'valign' => true,\n\t\t),\n\t\t'td' => array(\n\t\t\t'abbr' => true,\n\t\t\t'align' => true,\n\t\t\t'axis' => true,\n\t\t\t'bgcolor' => true,\n\t\t\t'char' => true,\n\t\t\t'charoff' => true,\n\t\t\t'colspan' => true,\n\t\t\t'dir' => true,\n\t\t\t'headers' => true,\n\t\t\t'height' => true,\n\t\t\t'nowrap' => true,\n\t\t\t'rowspan' => true,\n\t\t\t'scope' => true,\n\t\t\t'valign' => true,\n\t\t\t'width' => true,\n\t\t),\n\t\t'textarea' => array(\n\t\t\t'cols' => true,\n\t\t\t'rows' => true,\n\t\t\t'disabled' => true,\n\t\t\t'name' => true,\n\t\t\t'readonly' => true,\n\t\t),\n\t\t'tfoot' => array(\n\t\t\t'align' => true,\n\t\t\t'char' => true,\n\t\t\t'charoff' => true,\n\t\t\t'valign' => true,\n\t\t),\n\t\t'th' => array(\n\t\t\t'abbr' => true,\n\t\t\t'align' => true,\n\t\t\t'axis' => true,\n\t\t\t'bgcolor' => true,\n\t\t\t'char' => true,\n\t\t\t'charoff' => true,\n\t\t\t'colspan' => true,\n\t\t\t'headers' => true,\n\t\t\t'height' => true,\n\t\t\t'nowrap' => true,\n\t\t\t'rowspan' => true,\n\t\t\t'scope' => true,\n\t\t\t'valign' => true,\n\t\t\t'width' => true,\n\t\t),\n\t\t'thead' => array(\n\t\t\t'align' => true,\n\t\t\t'char' => true,\n\t\t\t'charoff' => true,\n\t\t\t'valign' => true,\n\t\t),\n\t\t'title' => array(),\n\t\t'tr' => array(\n\t\t\t'align' => true,\n\t\t\t'bgcolor' => true,\n\t\t\t'char' => true,\n\t\t\t'charoff' => true,\n\t\t\t'valign' => true,\n\t\t),\n\t\t'tt' => array(),\n\t\t'u' => array(),\n\t\t'ul' => array(\n\t\t\t'type' => true,\n\t\t),\n\t\t'ol' => array(\n\t\t\t'start' => true,\n\t\t\t'type' => true,\n\t\t),\n\t\t'var' => array(),\n\t);\n}", "title": "" }, { "docid": "459d4d14095822a99ad10bb02a347be1", "score": "0.46300066", "text": "protected function setAllowedContext()\n {\n $this->allowedContext = [\n ConfigurationFile::SERVER_CONFIG,\n VirtualHost::getFullName(),\n ];\n }", "title": "" }, { "docid": "acd6dc8664de225db229d4980e1712fa", "score": "0.46122104", "text": "public function instance_allow_config() {\n return true;\n }", "title": "" }, { "docid": "eb28340d21ff40c4857142fb66a4f45d", "score": "0.4597695", "text": "private function setProtocol() {\n\t\t\t\tif($this->params->get('force_ssl')) {\n\t\t\t\t\t\t$this->http_protocol = 'https://';\n\t\t\t\t} else {\n\t\t\t\t\t\t$this->http_protocol = 'http://';\n\t\t\t\t}\n\t\t}", "title": "" }, { "docid": "bd44e661833aa98f30d39a9a667635aa", "score": "0.45933375", "text": "function kses($string, $allowed_html, $allowed_protocols =\n array('http', 'https', 'ftp', 'news', 'nntp', 'telnet',\n 'gopher', 'mailto'))\n###############################################################################\n# This function makes sure that only the allowed HTML element names, attribute\n# names and attribute values plus only sane HTML entities will occur in\n# $string. You have to remove any slashes from PHP's magic quotes before you\n# call this function.\n###############################################################################\n{\n $string = kses_no_null($string);\n $string = kses_js_entities($string);\n $string = kses_normalize_entities($string);\n $string = kses_hook($string);\n $allowed_html_fixed = kses_array_lc($allowed_html);\n return kses_split($string, $allowed_html_fixed, $allowed_protocols);\n}", "title": "" }, { "docid": "a52e753e7f150381e57fa1405b2781f4", "score": "0.45884266", "text": "public function badProtocolProvider() {\n\n $protocols = explode(' ', \"dict file ftp ftps gopher imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smtp smtps\");\n foreach($protocols as $protocol) {\n $protocolarray[] = array($protocol);\n }\n return $protocolarray;\n }", "title": "" }, { "docid": "12dbe9e1e67be62fbb3d79916dc2fd44", "score": "0.45828438", "text": "public function supportedServices()\n {\n return Authenticator::LOGIN | Authenticator::CMS_LOGIN;\n }", "title": "" }, { "docid": "0ab2b8a988d8c28efa08a6de706f74dd", "score": "0.45818147", "text": "public function onEnable();", "title": "" }, { "docid": "3d88afe3cb66a1ac749d2588c52f7516", "score": "0.45803878", "text": "public function admin_can_see_all_requests() {\n\n\t}", "title": "" }, { "docid": "348e4b506f2d46f5754965d2854fcc28", "score": "0.4578576", "text": "private function checkProtocolOpt($protocol) {\n // determin role of protocol\n $role = $this->checkRole($protocol);\n\n $this->retProtocol->setRole($role);\n\n if($this->retProtocol->getType() == SNMP_STR) {\n $snmpAttrAuth = $protocol->snmpAttr->auth;\n\n $privProto = strtolower(array_key_exists(\"privProto\", $snmpAttrAuth) ? $snmpAttrAuth->privProto : \"\");\n $this->retProtocol->setPrivProto($this->checkProto($privProto\n , DEFAULT_PRIVPROTO, \"des\", \"aes\"));\n\n $authProto = strtolower(array_key_exists(\"authProto\", $snmpAttrAuth) ? $snmpAttrAuth->authProto : \"\");\n $this->retProtocol->setAuthProto($this->checkProto(\n $authProto, DEFAULT_AUTHPROTO, \"md5\", \"sha\"));\n\n $port = array_key_exists(\"port\", $protocol->snmpAttr) ? $protocol->snmpAttr->port : \"\";\n $this->retProtocol->setPort($this->checkPort($port, DEFAULT_SNMP_PORT, \"snmpAttr->port\"));\n\n }\n if($this->retProtocol->getType() == SSH_STR) {\n $port = array_key_exists(\"port\", $protocol->sshAttr) ? $protocol->sshAttr->port : \"\";\n $this->retProtocol->setPort($this->checkPort($port, DEFAULT_SSH_PORT, \"sshAttr->port\"));\n\n $sshArgs = array_key_exists(\"sshArgs\", $protocol->sshAttr) ? $protocol->sshAttr->sshArgs : \"\";\n $this->checkArgs($sshArgs, \"sshAttr->sshArgs\");\n $this->retProtocol->setSshArgs($this->getArgsFromArray($sshArgs));\n }\n\n if(array_key_exists(\"description\", $protocol)){\n $this->retProtocol->setDesc($protocol->description);\n }\n }", "title": "" }, { "docid": "76c2a0596c65b2cffa9e3eab8fa29d1f", "score": "0.45705327", "text": "function accessGlobal()\n {\n }", "title": "" }, { "docid": "2f515dbe9b040a465579b664a90de3f7", "score": "0.45701763", "text": "private function connect()\n {\n\n }", "title": "" }, { "docid": "a7692b7cbbae02b353784cd701b90174", "score": "0.45675588", "text": "function playerConnect(){\n\t\tglobal $jbArr;\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "b2ccb6f7957e64f8468469bbc25bacc5", "score": "0.45552325", "text": "function wowarmory_config()\n{\n\t$commands = array();\n\t$commands[] = array(\"type\" => TYPE_PRIVMSG, \"trig\" => \"!wow\", \"handler\" => \"wowarmory_request\");\n\treturn $commands;\n}", "title": "" }, { "docid": "e7cad0d659601b2bdbef40a847fdc097", "score": "0.45502928", "text": "public function ssl_set(){}", "title": "" }, { "docid": "77ab2239f86e8c898db8368f77ba1d90", "score": "0.45443305", "text": "function accept_mode() {\n\n\n // the user needs refresh urls in their session to access this mode\n if (empty($_SESSION['openid_post_accept_url']) || empty($_SESSION['openid_cancel_accept_url']) || empty($_SESSION['openid_unaccepted_url']))\n $this->error500($this->r->gtext['error_directly']);\n\n // has the user accepted the trust_root?\n $accepted = (!empty($_REQUEST['accepted'])) ? $_REQUEST['accepted'] : null;\n\n // Unset just in case\n unset($_SESSION['openid_always_trust']);\n\n if ($accepted === 'always') {\n // refresh back to post_accept_url\n $_SESSION['openid_accepted_url'] = $_SESSION['openid_unaccepted_url'];\n $_SESSION['openid_always_trust'] = 'yes';\n $this->wrapRefresh($_SESSION['openid_post_accept_url']);\n }\n if ($accepted === 'yes') {\n // refresh back to post_accept_url\n $_SESSION['openid_accepted_url'] = $_SESSION['openid_unaccepted_url'];\n $this->wrapRefresh($_SESSION['openid_post_accept_url']);\n }\n elseif ($accepted === 'no') {\n // They rejected it, return to the client\n $q = mb_strpos($_SESSION['openid_cancel_accept_url'], '?') ? '&' : '?';\n $this->wrapRefresh($_SESSION['openid_cancel_accept_url'] . $q . 'openid.mode=cancel');\n }\n\n // if neither, offer the trust request\n $q = mb_strpos($this->profile['req_url'], '?') ? '&' : '?';\n $always = $this->profile['req_url'] . $q . 'accepted=always';\n $yes = $this->profile['req_url'] . $q . 'accepted=yes';\n $no = $this->profile['req_url'] . $q . 'accepted=no';\n\n $this->r->text['unaccepted_url'] = $_SESSION['openid_unaccepted_url'];\n $this->r->text['always_url'] = $always;\n $this->r->text['yes_url'] = $yes;\n $this->r->text['no_url'] = $no;\n\n $this->tpl->display('accept.tpl');\n\n }", "title": "" }, { "docid": "607fc96d1f9ca2ede90a38c88027de55", "score": "0.45371038", "text": "abstract protected function onConnect();", "title": "" }, { "docid": "fa866fede430af91b209cbccfb15b8e1", "score": "0.4528732", "text": "private function registerDefenderSession()\r\n {\r\n $this->app->bind(\r\n 'Kim\\Defender\\Contracts\\DefenderSession',\r\n 'Kim\\Defender\\Laravel\\DefenderSession'\r\n );\r\n }", "title": "" }, { "docid": "5b6c3e28cee8e30e11145aa1c41c810b", "score": "0.4513453", "text": "public function enable(): void;", "title": "" }, { "docid": "5b6c3e28cee8e30e11145aa1c41c810b", "score": "0.4513453", "text": "public function enable(): void;", "title": "" }, { "docid": "ae31a8b680636c7213c55f66b36fc2b1", "score": "0.45117316", "text": "function enableServerValidation(){\n\n$this->checkserv=true;\n\n}", "title": "" }, { "docid": "e46ef922981d2ada8a34cad8ede9a69e", "score": "0.45110273", "text": "public function keys()\n {\n }", "title": "" }, { "docid": "bce3761bbbc20f44b397bcab1324d1ff", "score": "0.45089692", "text": "function enable_highlighting ()\n\t{\n\t\tforeach ( $this->language_data['KEYWORDS'] as $key => $words )\n\t\t{\n\t\t\t$this->lexic_permissions['KEYWORDS'][$key] = true;\n\t\t}\n\t\tforeach ( $this->language_data['COMMENT_SINGLE'] as $key => $comment )\n\t\t{\n\t\t\t$this->lexic_permissions['COMMENTS'][$key] = true;\n\t\t}\n\t\t// Multiline comments\n\t\t$this->lexic_permissions['COMMENTS']['MULTI'] = true;\n\t\t// Escape characters\n\t\t$this->lexic_permissions['ESCAPE_CHAR'] = true;\n\t\t// Brackets\n\t\t$this->lexic_permissions['BRACKETS'] = true;\n\t\t// Strings\n\t\t$this->lexic_permissions['STRINGS'] = true;\n\t\t// Numbers\n\t\t$this->lexic_permissions['NUMBERS'] = true;\n\t\t// Methods\n\t\t$this->lexic_permissions['METHODS'] = true;\n\t\t// Symbols\n\t\t$this->lexic_permissions['SYMBOLS'] = true;\n\t\t// Script\n\t\t$this->lexic_permissions['SCRIPT'] = true;\n\t\t// Regexps\n\t\tforeach ( $this->language_data['REGEXPS'] as $key => $regexp )\n\t\t{\n\t\t\t$this->lexic_permissions['REGEXPS'][$key] = true;\n\t\t}\n\t\t// Context blocks\n\t\t$this->enable_important_blocks = true;\n\t}", "title": "" }, { "docid": "3b5cd260fc0e088ff3c03b4ecd2b408b", "score": "0.4498373", "text": "public function numberOfProgrammableKeys()\n {\n return 8;\n }", "title": "" }, { "docid": "dd37b8179853e5d4a783cc80a9d5ce72", "score": "0.44862637", "text": "public function connect() {\n\n\t}", "title": "" }, { "docid": "7202f8f578436ed640d888d2026575ec", "score": "0.44844356", "text": "protected function registerOpisSecurityKey()\n {\n if (\\PHP_VERSION_ID < 80100) {\n $config = $this->app->make('config')->get('app');\n\n if (! class_exists(OpisSerializableClosure::class) || empty($config['key'])) {\n return;\n }\n\n OpisSerializableClosure::setSecretKey($this->parseKey($config));\n }\n }", "title": "" }, { "docid": "0206ade56b6fd95492dcdc229bf2eb08", "score": "0.4472357", "text": "public function baseProtocolParameters();", "title": "" }, { "docid": "51063ee445c2028f85fbe2e66bc8f644", "score": "0.44651493", "text": "public function getProtocols(): array\n {\n return $this->protocols;\n }", "title": "" }, { "docid": "32b312e134016d2ac352e2e7fb923627", "score": "0.4462959", "text": "private function setMode()\n {\n if ($this->config->get('secure-headers.safeMode', false)) {\n $this->headers->safeMode();\n }\n\n if ($this->config->get('secure-headers.strictMode', false)) {\n $this->headers->strictMode();\n }\n }", "title": "" }, { "docid": "b196a1b28e7f2cfee30e618064f5e5be", "score": "0.44387665", "text": "public function canUseForMultishipping() \n {\n return\tfalse;\n }", "title": "" }, { "docid": "58b7471efdba916a54d166836ef8b71d", "score": "0.44384137", "text": "public function connect ()\n {\n\n }", "title": "" }, { "docid": "ed25a3d295385c7f574a0a89bec337f7", "score": "0.44298717", "text": "public function passesSecurity();", "title": "" }, { "docid": "038279e2f45327e65d1ff8f2b0bbd40a", "score": "0.4423329", "text": "public function isProtectionEnabled()\n {\n }", "title": "" }, { "docid": "7ecb3e52de5ed61d9fa23943e9085616", "score": "0.44199708", "text": "function scr_bf_setting()\n{\n\tglobal $gw_scr;\n\tglobal $g_mode;\n\n\treturn;\n}", "title": "" }, { "docid": "fe630c0bbb89318ed16de27d67109977", "score": "0.44097015", "text": "public function init(){\n $this->_helper->acl->allow('public', null);\n }", "title": "" }, { "docid": "b07583d351012a52f77d18d30c95c82c", "score": "0.44048223", "text": "function exchange_valid_keys()\n{\n\treturn array(\n\t\t'disabled' => 'Fully disable the exchange',\n\n\t\t'trade_min_btc'\t\t\t=> 'Minimum order on the exchange',\n\t\t'trade_sell_ask_pct'\t=> 'Initial order ask price related to the lowest ask (in %)',\n\t\t'trade_cancel_ask_pct'\t=> 'Cancel orders if the lowest ask reach this % of your order',\n\n\t//\t'withdraw_btc_address'\t=> 'Custom withdraw BTC address for the exchange',\n\t\t'withdraw_min_btc'\t\t=> 'Auto withdraw when your BTC balance reach this amount (0=disabled)',\n\t\t'withdraw_fee_btc'\t\t=> 'Fees in BTC required to withdraw BTCs on the exchange',\n\t);\n}", "title": "" }, { "docid": "47946cd39c907d0922ecdda9be2c875e", "score": "0.44014788", "text": "public function connect()\n {\n }", "title": "" }, { "docid": "47946cd39c907d0922ecdda9be2c875e", "score": "0.44014788", "text": "public function connect()\n {\n }", "title": "" }, { "docid": "257f7a3beb5c6783b1a919773a0714be", "score": "0.4396912", "text": "public function enable() {\n }", "title": "" }, { "docid": "30c236ddd4d3a19701ebec976397c217", "score": "0.43953806", "text": "public function setPrivilages() {\n $this->acl->allow(array('guest', 'front'), null, 'module,default');\n $this->acl->deny(\"guest\", null, \"module,admin\");\n $this->acl->allow(array('staff'), null, array('action,add', 'action,edit', 'action,list', 'all,admin,candidate,processing', 'all,admin,candidate,interview','all,admin,medical,medical-test'));\n $this->acl->allow('front', null, 'all,admin,candidate,add');\n $this->acl->allow('foreign', null, array('action,list','all,admin,stamping,stamping-test'));\n $this->acl->allow('account', null, array('all,admin,candidate,add', 'all,admin,candidate,list', 'all,admin,candidate,edit', 'all,admin,agent,add', 'all,admin,agent,list', 'all,admin,agent,account', 'all,admin,candidate,edit-account'));\n $this->acl->allow('admin');\n $this->acl->allow(array(\"front\", \"staff\", \"account\", \"foreign\"), null, array(\"all,admin,login,logout\", \"all,admin,index,index\"));\n $this->acl->allow(array(\"guest\"), null, \"all,admin,login,index\");\n }", "title": "" }, { "docid": "6bb2a06558b048deeb0f03d8a4028568", "score": "0.43941858", "text": "function SetGlobals () {\n \n // Make sure we're not initializing twice.\n global $gGLOBALIZED;\n if ($gGLOBALIZED) {\n return (TRUE);\n } else {\n $gGLOBALIZED = TRUE;\n } // if\n \n global $gERRORMSG, $gERRORTITLE;\n \n global $gUSERJOURNALTAB, $gUSERPHOTOSTAB;\n global $gUSERENEMIESTAB, $gUSERFRIENDSTAB;\n global $gUSERMESSAGESTAB, $gUSERINFOTAB;\n global $gUSEROPTIONSTAB;\n\n global $gCONTENTARTICLESVIEWTAB;\n global $gCONTENTARTICLESSUBMITTAB;\n global $gCONTENTARTICLESQUEUETAB;\n \n global $gFRAMELOCATION, $gTHEMELOCATION;\n global $gUSERTHEME, $gFRAMEWORK;\n global $gFRAMELOCATION, $gTHEMELOCATION;\n \n global $gSTRINGS;\n \n global $gSITETITLE, $gSITEURL;\n global $gREFRESHWAIT;\n global $gPAGETITLE, $gPAGESUBTITLE;\n \n global $gSCROLLSTART, $gSCROLLMAX, $gSCROLLSTEP;\n global $gMAXPAGES, $gCURRENTPAGE;\n \n global $gBROADCASTUNIQUE;\n \n global $gLOGINSESSION;\n \n global $gPOSTDATA, $gEXTRAPOSTDATA;\n \n global $gSETTINGS;\n \n global $gDBERROR;\n \n global $gALTERNATE;\n \n global $gSELECTBUTTON;\n \n global $gDBLINK;\n \n global $gADMINEMAIL;\n \n global $gACTION, $gSORT, $gMASSLIST;\n \n // Define constants. Do not modify.\n define (\"UP\", \"UP\");\n define (\"DOWN\", \"DOWN\");\n define (\"ON\", \"ON\");\n define (\"OFF\", \"OFF\");\n \n define (\"YES\", \"YES\");\n define (\"NO\", \"NO\");\n \n define (\"OLDER\", \"OLDER\");\n define (\"NEWER\", \"NEWER\");\n \n define (\"DYNAMIC\", \"DYNAMIC\");\n define (\"STATIC\", \"STATIC\");\n \n define (\"DISABLED\", \"disabled\");\n define (\"ENABLED\", \"enabled\");\n\n define (\"INCLUDE_SECURITY_NONE\", \"0\");\n define (\"INCLUDE_SECURITY_BASIC\", \"1\");\n define (\"INCLUDE_SECURITY_FULL\", \"2\");\n \n define (\"FORMAT_NONE\", \"0\"); // No Formatting\n define (\"FORMAT_ASD\", \"1\"); // ASD Tags Only\n define (\"FORMAT_BASIC\", \"2\"); // Basic HTML\n define (\"FORMAT_EXT\", \"3\"); // Extended HTML\n define (\"FORMAT_SECURE\", \"4\"); // Secure HTML\n define (\"FORMAT_UN\", \"5\"); // Unprocessed\n define (\"FORMAT_VIEW\", \"6\"); // Viewable\n \n define (\"OUTPUT_SCREEN\", \"0\");\n define (\"OUTPUT_BUFFER\", \"1\");\n \n define (\"SCROLL_PAGES\", \"SCROLL_PAGES\");\n define (\"SCROLL_NOFIRST\", \"SCROLL_NOFIRST\");\n define (\"SCROLL_SPECIAL\", \"SCROLL_SPECIAL\");\n \n define (\"SKIP_UNIQUE\", FALSE);\n define (\"CHECK_UNIQUE\", TRUE);\n \n define (\"SQL_SKIP\", '*!');\n define (\"SQL_NOW\", '@!');\n define (\"SQL_NOT\", '^!');\n \n define (\"OUTPUT_NBSP\", \"&nbsp;\");\n\n define (\"DELETED_COMMENT\", \"__deleted_comment__\");\n\n define (\"ANONYMOUS\", \"__anonymous__\");\n \n // Site specific settings. Modify according to your site. \n $gADMINEMAIL = 'admin@domain';\n $gSITEDOMAIN = \"localhost\";\n \n $gSETTINGS['UserTheme'] = '';\n $gSETTINGS['Framework'] = '';\n $gSETTINGS['Language'] = 'en';\n $gSETTINGS['CascadeStrings'] = ON;\n $gSETTINGS['UseInvites'] = ON;\n $gSETTINGS['InviteAmount'] = 2;\n \n $gUSERTHEME = $gSETTINGS['UserTheme'];\n $gFRAMEWORK = $gSETTINGS['Framework'];\n \n $gFRAMELOCATION = \".\";\n $gTHEMELOCATION = \".\";\n\n // Set the basic string values.\n $gSTRINGS['en'] = array (\n 'ERROR.PAGE - ' => array (\n 'Formatting' => 0,\n 'Output' => \"An error occurred on this page.\"),\n 'ERROR.NOTNULL - ' => array (\n 'Formatting' => 0,\n 'Output' => \"Do not leave this field blank.\"),\n 'ERROR.INTEGER - ' => array (\n 'Formatting' => 0,\n 'Output' => \"This field must be a number value.\"),\n );\n \n // Appleseed BASE specific. Do not modify.\n\n $gERRORMSG = ''; $gERRORTITLE = 'ERROR';\n \n $gALTERNATE = 0;\n \n $gSELECTBUTTON = '';\n \n $gREFRESHWAIT = 0;\n \n if (!isset ($gSCROLLSTART)) $gSCROLLSTART = Array ();\n if (!isset ($gSCROLLSTEP)) $gSCROLLSTEP = Array ();\n if (!isset ($gSCROLLMAX)) $gSCROLLMAX = Array ();\n \n $gBROADCASTUNIQUE = '';\n \n // Unset sensitive variables.\n unset ($gSCROLLLINK);\n \n unset ($gDBERROR);\n unset ($gPAGESUBTITLE);\n unset ($gPAGETITLE); unset ($gPAGESUBTITLE);\n unset ($gDBLINK);\n \n unset ($gPOSTDATA); unset ($gEXTRAPOSTDATA);\n \n // Set the error reporting to 'all';\n // error_reporting(E_ALL);\n \n // Set the error reporting to 'none';\n // error_reporting(E_NONE);\n \n // Set the error reporting to fatal errors;\n error_reporting(E_ERROR);\n \n }", "title": "" }, { "docid": "6eac76706251d508cc61b71bdc4951f3", "score": "0.43929625", "text": "protected static function beforeConnect(): void\n {\n }", "title": "" }, { "docid": "ae45f91dbdd04d31a8c4a1f30b6e087e", "score": "0.4388516", "text": "public function init() {\n $this->_helper->acl->allow('public',null);\n \n }", "title": "" }, { "docid": "ee751dbb67859489d7895a85fda7844c", "score": "0.43885028", "text": "public function keys()\n {\n // TODO: Implement keys() method.\n }", "title": "" }, { "docid": "1d31633f255f87bd01b637455668cc56", "score": "0.43879363", "text": "public function checkConnect(){ \n if($this->bind) {\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "e3fc41f937efcf650e940eea9f3d7296", "score": "0.43875313", "text": "function fix_session_register() {\n\n function session_register() {\n $args = func_get_args();\n foreach ($args as $key) {\n $_SESSION[$key] = $GLOBALS[$key];\n }\n }\n\n function session_is_registered($key) {\n return isset($_SESSION[$key]);\n }\n\n function session_unregister($key) {\n unset($_SESSION[$key]);\n }\n\n}", "title": "" }, { "docid": "e7e804da9828ba1c0e4d281cdd2311fa", "score": "0.43857825", "text": "public function isHotlinkAllowed(): bool;", "title": "" }, { "docid": "c4a4dcf4a4a4bd12236cc511faf851a8", "score": "0.43841532", "text": "public function maybe_wp_kses( $html, $allowed_html = 'post', $allowed_protocols = array() ) {\n\t\treturn GFCommon::maybe_wp_kses( $html, $allowed_html, $allowed_protocols );\n\t}", "title": "" }, { "docid": "e03a9f2de4a078ea252845b8f107ab01", "score": "0.4382898", "text": "public function register()\n {\n return array(T_GLOBAL);\n }", "title": "" }, { "docid": "603025fc56120f410a410823f74db317", "score": "0.43804777", "text": "public function global_restrictions_supported() {\n return true;\n }", "title": "" }, { "docid": "9df1e2882a2bc0231fc2b487b4388685", "score": "0.43737298", "text": "public function reg_set(){\r\n\t\tregister_setting(\"arevico-security-grp\", 'arevico-security', array($this, 'dummysanitize') ); \r\n\t}", "title": "" }, { "docid": "2a1c52dbc736a9d84e97271db833ff73", "score": "0.43730578", "text": "public function setProtocol(string $protocol): void;", "title": "" }, { "docid": "78f3ec6677755a9d9cf25e356c4921cb", "score": "0.43681177", "text": "protected function setPublications()\n\t{\n\t\t$this->pubKeyList = array(\"appion\");\n\t}", "title": "" }, { "docid": "fcd4772745f976b5ebbc11d68dda21d7", "score": "0.43665865", "text": "public function __construct()\n {\n $authSettings = conf('auth');\n foreach ($this->mechanisms as $mech => $class_name) {\n if (isset($authSettings[\"auth_$mech\"]) && is_array($authSettings[\"auth_$mech\"])) {\n $this->auth_mechanisms[$mech] = $authSettings[\"auth_$mech\"];\n }\n }\n }", "title": "" }, { "docid": "e1e4e440ad318926b1981063e144f77a", "score": "0.43635145", "text": "private function registerContracts()\n {\n $this->app->bind('poppy.system.api_sign', function ($app) {\n /** @var ApiSignContract $signProvider */\n $signProvider = config('poppy.system.api_sign_provider') ?: DefaultApiSignProvider::class;\n return new $signProvider();\n });\n $this->app->alias('poppy.system.api_sign', ApiSignContract::class);\n\n\n $this->app->bind('poppy.system.password', function ($app) {\n $pwdClass = config('poppy.system.password_provider') ?: DefaultPasswordProvider::class;\n return new $pwdClass();\n });\n $this->app->alias('poppy.system.password', PasswordContract::class);\n\n\n /* 文件上传提供者\n * ---------------------------------------- */\n $this->app->bind('poppy.system.uploader', function ($app) {\n $uploadType = sys_setting('py-system::picture.save_type');\n $hooks = sys_hook('poppy.system.upload_type');\n if (!$uploadType) {\n $uploadType = 'default';\n }\n $uploader = $hooks[$uploadType];\n $uploaderClass = $uploader['provider'] ?? DefaultUploadProvider::class;\n return new $uploaderClass();\n });\n $this->app->alias('poppy.system.uploader', UploadContract::class);\n\n }", "title": "" }, { "docid": "3e22007b63fd876147aafc417c751734", "score": "0.43624008", "text": "public function globals(){\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "b5a119303a6f113b3778657b7475ca01", "score": "0.43584713", "text": "public function __construct() {\n\t\t$this->ctrlr['login'] \t\t\t\t\t\t= true; // No Login = false / With Login = true\n\t\t\n\t\t// Set Main-Controller\n\t\t$this->ctrlr['intern_main_controller'] \t\t= \"home\";\n\t\t$this->ctrlr['extern_main_controller'] \t\t= \"login\";\n\t\t\n\t\t// Allow Extern Controller\n\t\t$this->ctrlr['extern'] \t\t\t\t\t\t= array(\n\t\t\t\t\t\t\t\t\t\t\t \t\t \"loginController\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t// Allow Intern Controller\n\t\t$this->ctrlr['intern'] \t\t\t\t\t = array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t \"homeController\",\n \"loginController\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t// Allow Intern and Extern Controller\n\t\t$this->ctrlr['both'] \t\t\t\t\t\t= array(\n \"apiController\"\n );\t\n\t}", "title": "" }, { "docid": "2bbf43993ededac644b32382c855f0dd", "score": "0.43583083", "text": "function declareMySelf() {\n if($this->verbosity > 4 && $this->loaded ){\n print(\"Default Grammar Plugin loaded.\\n\");\n }\n return array('success' => true);\n }", "title": "" }, { "docid": "567431b46bc163f4b4b76547a15b5b55", "score": "0.43569165", "text": "public function getSecutiyListeners();", "title": "" }, { "docid": "ff79f9e0744e68b0b9b994997c2bca82", "score": "0.43568763", "text": "public function activate(){\n\t\treturn $this->_sendPacketToRobot(self::PACKET_TYPE_ENGINE, pack('C', self::MESSAGE_TYPE_ACTIVATE));\n\t\t// TODO savoir ce que retourne cette demande\n\t}", "title": "" }, { "docid": "515b49472977e71de7423e06697325cb", "score": "0.43548176", "text": "function &connect()\n {\n return;\n }", "title": "" }, { "docid": "9c29a7ce6e689ed39631f52f6d99a7d5", "score": "0.43546057", "text": "public function connect();", "title": "" }, { "docid": "9c29a7ce6e689ed39631f52f6d99a7d5", "score": "0.43546057", "text": "public function connect();", "title": "" }, { "docid": "9c29a7ce6e689ed39631f52f6d99a7d5", "score": "0.43546057", "text": "public function connect();", "title": "" }, { "docid": "9c29a7ce6e689ed39631f52f6d99a7d5", "score": "0.43546057", "text": "public function connect();", "title": "" }, { "docid": "9c29a7ce6e689ed39631f52f6d99a7d5", "score": "0.43546057", "text": "public function connect();", "title": "" }, { "docid": "9c29a7ce6e689ed39631f52f6d99a7d5", "score": "0.43546057", "text": "public function connect();", "title": "" }, { "docid": "9c29a7ce6e689ed39631f52f6d99a7d5", "score": "0.43546057", "text": "public function connect();", "title": "" }, { "docid": "9c29a7ce6e689ed39631f52f6d99a7d5", "score": "0.43546057", "text": "public function connect();", "title": "" }, { "docid": "9c29a7ce6e689ed39631f52f6d99a7d5", "score": "0.43546057", "text": "public function connect();", "title": "" }, { "docid": "9c29a7ce6e689ed39631f52f6d99a7d5", "score": "0.43546057", "text": "public function connect();", "title": "" } ]
6a6c72b3ed417227a839707f8c9c9954
CONTROLADORES DE COSTOS SISTEMA
[ { "docid": "29761e5be7b6dc82f7cf793c16e61851", "score": "0.0", "text": "function get_costos($tipo_costo){\n\t$costos = null;\n\t$sql = \"select * from ayahuaska.costos where tipo_costo_id = \".$tipo_costo.\" \n\t\t\torder by fecha_ingreso desc\";\n\t$res = mysql_query($sql);\n\t$tot = mysql_num_rows($res);\n\tif($tot > 0){\n\t\twhile($dat = mysql_fetch_array($res)){\n\t\t\t$costos[] = array('id' =>$dat['id'], 'nombre' =>$dat['nombre'],'mes' => $dat['mes'],\n\t\t\t\t\t\t'anio' => $dat['anio'],'fecha_ingreso' => $dat['fecha_ingreso'],\n\t\t\t\t\t\t'total' => $dat['total'],'usuario_id' => $dat['usuario_id']\n\t\t\t\t\t\t,'tipo_costo_id' => $dat['tipo_costo_id']);\n\t\t}\n\t}\n\treturn $costos;\n}", "title": "" } ]
[ { "docid": "8ad61e57970852b5f4b278838295d2c3", "score": "0.63006175", "text": "function caracteristicasProd()\n\t{\n\t\trequire('views/configuracion/caracteristicas_prod.php');\n\t}", "title": "" }, { "docid": "fb2e241c7d87e286960dacb6702c7cef", "score": "0.62656075", "text": "public function comprobarEstablecimientoPrueba(){\n $establecimiento = $this->comprobarEstablecimiento('Secretaría de Estado SS Ministerio de Salud');\n print_r($establecimiento);\n }", "title": "" }, { "docid": "5834972026804335c468fe4d23b8bc53", "score": "0.6204632", "text": "public function ActaConcertacion ()\n\t{\n\t\t$numeroActaConcertacion = 0;\n\t\t$año = \"\";\n\t\t$idGrupo = 0;\n\t\t$idGrupo = 0;\n\t}", "title": "" }, { "docid": "9c6bc42af75965ede7135b0011201f56", "score": "0.60421693", "text": "function RecursoProgramado() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_readonly = '';\r\n $w_erro = '';\r\n if (!(strpos('A',$O)===false) || $w_copia>'') {\r\n // Recupera os dados da ação\r\n $sql = new db_getSolicData_IS; $RS = $sql->getInstanceOf($dbms,$w_chave,$SG);\r\n foreach($RS as $row){$RS=$row; break;}\r\n if (count($RS)>0) {\r\n $w_proponente =f($RS,'proponente');\r\n $w_sq_unidade_resp =f($RS,'sq_unidade_resp');\r\n $w_titulo =f($RS,'titulo');\r\n $w_prioridade =f($RS,'prioridade');\r\n $w_aviso =f($RS,'aviso_prox_conc');\r\n $w_dias =f($RS,'dias_aviso');\r\n $w_inicio_real =f($RS,'inicio_real');\r\n $w_fim_real =f($RS,'fim_real');\r\n $w_concluida =f($RS,'concluida');\r\n $w_data_conclusao =f($RS,'data_conclusao');\r\n $w_nota_conclusao =f($RS,'nota_conclusao');\r\n $w_custo_real =f($RS,'custo_real');\r\n $w_chave_pai =f($RS,'sq_solic_pai');\r\n $w_chave_aux =null;\r\n $w_sq_menu =f($RS,'sq_menu');\r\n $w_sq_unidade =f($RS,'sq_unidade');\r\n $w_sq_tramite =f($RS,'sq_siw_tramite');\r\n $w_solicitante =f($RS,'solicitante');\r\n $w_cadastrador =f($RS,'cadastrador');\r\n $w_executor =f($RS,'executor');\r\n $w_inicio =FormataDataEdicao(f($RS,'inicio'));\r\n $w_fim =FormataDataEdicao(f($RS,'fim'));\r\n $w_inclusao =f($RS,'inclusao');\r\n $w_ultima_alteracao =f($RS,'ultima_alteracao');\r\n $w_conclusao =f($RS,'conclusao');\r\n $w_valor =number_format(Nvl(f($RS,'valor'),0),2,',','.');\r\n $w_opiniao =f($RS,'opiniao');\r\n $w_data_hora =f($RS,'data_hora');\r\n $w_cd_programa =f($RS,'cd_programa');\r\n $w_selecao_mp =f($RS,'mpog_ppa');\r\n $w_selecao_se =f($RS,'relev_ppa');\r\n $w_sq_natureza =f($RS,'sq_natureza');\r\n $w_sq_horizonte =f($RS,'sq_horizonte');\r\n $w_palavra_chave =f($RS,'palavra_chave');\r\n $w_descricao =f($RS,'descricao');\r\n $w_justificativa =f($RS,'justificativa');\r\n $w_sq_unidade_adm =f($RS,'sq_unidade_adm');\r\n $w_ln_programa =f($RS,'ln_programa');\r\n }\r\n } \r\n Cabecalho();\r\n head();\r\n // Monta o código JavaScript necessário para validação de campos e preenchimento automático de máscara,\r\n // tratando as particularidades de cada serviço\r\n ScriptOpen('JavaScript');\r\n CheckBranco();\r\n FormataData();\r\n SaltaCampo();\r\n FormataDataHora();\r\n FormataValor();\r\n ValidateOpen('Validacao');\r\n if ($O=='A') {\r\n Validate('w_valor','Recurso programado','VALOR','1',4,18,'','0123456789.,');\r\n CompValor('w_valor','Recurso programado','>','0,00','zero');\r\n Validate('w_assinatura',$_SESSION['LABEL_ALERTA'],'1','1','3','30','1','1');\r\n } elseif ($O=='P') {\r\n Validate('w_chave','Programa','SELECT','1',1,18,'','0123456789');\r\n } \r\n ValidateClose();\r\n ScriptClose();\r\n ShowHTML('</HEAD>');\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n if (!(strpos('A',$O)===false)) {\r\n BodyOpen('onLoad=\\'document.Form.w_valor.focus()\\';');\r\n } else {\r\n BodyOpen('onLoad=\\'document.Form.w_chave.focus()\\';');\r\n }\r\n ShowHTML('<B><FONT COLOR=\"#000000\">'.$w_TP.'</FONT></B>');\r\n ShowHTML('<HR>');\r\n ShowHTML('<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n if (!(strpos('A',$O)===false)) {\r\n AbreForm('Form',$w_dir.$w_pagina.'Grava','POST','return(Validacao(this));',null,$P1,$P2,$P3,$P4,$TP,$SG,$w_pagina.$par,$O);\r\n ShowHTML(MontaFiltro('POST'));\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_copia\" value=\"'.$w_copia.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_menu\" value=\"'.f($RS_Menu,'sq_menu').'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_descricao\" value=\"'.$w_descricao.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_justificativa\" value=\"'.$w_justificativa.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_proponente\" value=\"'.$w_proponente.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_unidade_resp\" value=\"'.$w_sq_unidade_resp.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_titulo\" value=\"'.$w_titulo.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_prioridade\" value=\"'.$w_prioridade.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_aviso\" value=\"'.$w_aviso.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_dias\" value=\"'.$w_dias.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_inicio_real\" value=\"'.$w_inicio_real.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_fim_real\" value=\"'.$w_fim_real.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_concluida\" value=\"'.$w_concluida.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_data_conclusao\" value=\"'.$w_data_conclusao.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_nota_conclusao\" value=\"'.$w_nota_conclusao.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_custo_real\" value=\"'.$w_custo_real.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave_pai\" value=\"'.$w_chave_pai.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_menu\" value=\"'.$w_sq_menu.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_unidade\" value=\"'.$w_sq_unidade.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_tramite\" value=\"'.$w_sq_tramite.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_solicitante\" value=\"'.$w_solicitante.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_cadastrador\" value=\"'.$w_cadastrador.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_executor\" value=\"'.$w_executor.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_inicio\" value=\"'.$w_inicio.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_fim\" value=\"'.$w_fim.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_inclusao\" value=\"'.$w_inclusao.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_ultima_alteracao\" value=\"'.$w_ultima_alteracao.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_conclusao\" value=\"'.$w_conclusao.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_opiniao\" value=\"'.$w_opiniao.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_data_hora\" value=\"'.$w_data_hora.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_cd_programa\" value=\"'.$w_cd_programa.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_selecao_mp\" value=\"'.$w_selecao_mp.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_selecao_se\" value=\"'.$w_selecao_se.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_natureza\" value=\"'.$w_sq_natureza.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_horizonte\" value=\"'.$w_sq_horizonte.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_palavra_chave\" value=\"'.$w_palavra_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_unidade_adm\" value=\"'.$w_sq_unidade_adm.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_ln_programa\" value=\"'.$w_ln_programa.'\">');\r\n //Passagem da cidade padrão como brasília, pelo retidara do impacto geográfico da tela\r\n $sql = new db_getCustomerData; $RS1 = $sql->getInstanceOf($dbms,$w_cliente);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_cidade\" value=\"'.f($RS1,'sq_cidade_padrao').'\">');\r\n ShowHTML('<tr><td align=\"center\">');\r\n ShowHTML(' <table width=\"97%\" border=\"0\">');\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n ShowHTML('<tr><td align=\"center\">');\r\n ShowHTML(' <table width=\"99%\" border=\"0\">');\r\n ShowHTML(' <tr><td><font size=2>Programa: <b>'.f($RS,'titulo').'</b></font></td></tr>');\r\n // Identificação da ação\r\n ShowHTML(' <tr><td colspan=\"2\"><br><font size=\"2\"><b>IDENTIFICAÇÃO<hr NOSHADE color=#000000 SIZE=1></b></font></td></tr>');\r\n ShowHTML(' <tr><td valign=\"top\"><b>Programa PPA:</b></td>');\r\n ShowHTML(' <td>'.f($RS,'ds_programa').' ('.f($RS,'cd_programa').')'.' </td></tr>');\r\n ShowHTML(' <tr><td valign=\"top\"><table border=0 width=\"100%\" cellspacing=0>');\r\n ShowHTML(' <tr><td><b>Unidade Administrativa:</b></td>');\r\n ShowHTML(' <td>'.ExibeUnidade('../',$w_cliente,f($RS,'nm_unidade_adm'),f($RS,'sq_unidade_adm'),$TP).'</td></tr>');\r\n ShowHTML(' <tr><td><b>Unidade Orçamentária:</b></td>');\r\n ShowHTML(' <td>'.f($RS,'nm_orgao').' </td></tr>');\r\n if (f($RS,'mpog_ppa')=='S') {\r\n ShowHTML(' <tr><td><b>Selecionada SPI/MP:</b></td>');\r\n ShowHTML(' <td>Sim</td></tr>');\r\n } else { \r\n ShowHTML(' <tr><td><b>Selecionada SPI/MP:</b></td>');\r\n ShowHTML(' <td>Não</td></tr>');\r\n }\r\n if (f($RS,'relev_ppa')=='S') {\r\n ShowHTML(' <tr><td><b>Selecionada SE/SEPPIR:</b></td>');\r\n ShowHTML(' <td>Sim</td></tr>');\r\n } else { \r\n ShowHTML(' <tr><td><b>Selecionada SE/SEPPIR:</b></td>');\r\n ShowHTML(' <td>Não</td></tr>');\r\n }\r\n ShowHTML(' <tr><td><b>Responsável monitoramento:</b></td>');\r\n ShowHTML(' <td>'.ExibePessoa('../',$w_cliente,f($RS,'solicitante'),$TP,f($RS,'nm_sol')).'</td></tr>');\r\n ShowHTML(' <tr><td><b>Área planejamento:</b></td>');\r\n ShowHTML(' <td>'.ExibeUnidade('../',$w_cliente,f($RS,'nm_unidade_resp'),f($RS,'sq_unidade'),$TP).'</td></tr>');\r\n ShowHTML(' <tr><td><b>Natureza:</b></td>');\r\n ShowHTML(' <td>'.f($RS,'nm_natureza').' </td></tr>');\r\n ShowHTML(' <tr><td><b>Horizonte:</b></td>');\r\n ShowHTML(' <td>'.f($RS,'nm_horizonte').' </td></tr>');\r\n ShowHTML(' <tr><td><b>Tipo do programa:</b></td>');\r\n ShowHTML(' <td>'.f($RS,'nm_tipo_programa').' </td></tr>');\r\n if (Nvl(f($RS,'ln_programa'),'---')=='---'){\r\n ShowHTML(' <tr><td>Endereço na internet:</b></td>');\r\n ShowHTML(' <td>'.Nvl(f($RS,'ln_programa'),'---').'</td></tr>');\r\n } else { \r\n ShowHTML(' <tr><td>Endereço na internet:</b></td>');\r\n ShowHTML(' <td><a href=\"'.Nvl(f($RS,'ln_programa'),'---').'\" target=\"_blank\"><b>'.Nvl(f($RS,'ln_programa'),'---').'</a></td></tr>');\r\n }\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td valign=\"top\" colspan=\"2\">');\r\n ShowHTML(' <tr><td>Recurso programado:</b></td>');\r\n ShowHTML(' <td>'.number_format(f($RS,'valor'),2,',','.').' </td></tr>');\r\n ShowHTML(' <tr><td>Início previsto:</b></td>');\r\n ShowHTML(' <td>'.FormataDataEdicao(f($RS,'inicio')).' </td></tr>');\r\n ShowHTML(' <tr><td>Fim previsto:</b></td>');\r\n ShowHTML(' <td>'.FormataDataEdicao(f($RS,'fim')).' </td></tr>');\r\n ShowHTML(' <tr valign=\"top\"><td>Parcerias externas:</b></td>');\r\n ShowHTML(' <td>'.CRLF2BR(Nvl(f($RS,'proponente'),'---')).' </td></tr>');\r\n ShowHTML(' <tr valign=\"top\"><td>Parcerias internas:</b></td>');\r\n ShowHTML(' <td>'.CRLF2BR(Nvl(f($RS,'palavra_chave'),'---')).' </td></tr>');\r\n // Responsaveis\r\n if (f($RS,'nm_gerente_programa')>'' || f($RS,'nm_gerente_executivo')>'' || f($RS,'nm_gerente_adjunto')>'') {\r\n ShowHTML(' <tr><td valign=\"top\" colspan=\"2\" align=\"center\" bgcolor=\"#D0D0D0\" style=\"border: 2px solid rgb(0,0,0);\"><b>Responsáveis</td>');\r\n ShowHTML(' <tr><td valign=\"top\" colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0>');\r\n if (Nvl(f($RS,'nm_gerente_programa'),'')>'') {\r\n ShowHTML(' <tr><td valign=\"top\">Gerente do programa:<br><b>'.f($RS,'nm_gerente_programa').' </b></td>');\r\n if (Nvl(f($RS,'fn_gerente_programa'),'')>'') ShowHTML(' <td>Telefone:<br><b>'.f($RS,'fn_gerente_programa').' </b></td>');\r\n if (Nvl(f($RS,'em_gerente_programa'),'')>'') ShowHTML(' <td>Email:<br><b>'.f($RS,'em_gerente_programa').' </b></td>');\r\n } \r\n if (Nvl(f($RS,'nm_gerente_executivo'),'')>'') {\r\n ShowHTML(' <tr><td valign=\"top\">Gerente executivo do programa:<br><b>'.f($RS,'nm_gerente_executivo').' </b></td>');\r\n if (Nvl(f($RS,'fn_gerente_executivo'),'')>'') ShowHTML(' <td>Telefone:<br><b>'.f($RS,'fn_gerente_executivo').' </b></td>');\r\n if (Nvl(f($RS,'em_gerente_executivo'),'')>'') ShowHTML(' <td>Email:<br><b>'.f($RS,'em_gerente_executivo').' </b></td>');\r\n } \r\n if (Nvl(f($RS,'nm_gerente_adjunto'),'')>'') {\r\n ShowHTML(' <tr><td valign=\"top\">Gerente executivo adjunto:<br><b>'.f($RS,'nm_gerente_adjunto').' </b></td>');\r\n if (Nvl(f($RS,'fn_gerente_adjunto'),'')>'') ShowHTML(' <td>Telefone:<br><b>'.f($RS,'fn_gerente_adjunto').' </b></td>');\r\n if (Nvl(f($RS,'em_gerente_adjunto'),'')>'') ShowHTML(' <td>Email:<br><b>'.f($RS,'em_gerente_adjunto').' </b></td>');\r\n } \r\n ShowHTML(' </table>');\r\n } \r\n ShowHTML('<tr><td colspan=\"2\"><br><font size=\"2\"><b>PROGRAMAÇÃO FINANCEIRA<hr NOSHADE color=#000000 SIZE=1></b></font></td></tr>');\r\n $sql = new db_getPPADadoFinanc_IS; $RS1 = $sql->getInstanceOf($dbms,$w_cd_programa, null,$w_ano,$w_cliente,'VALORFONTE');\r\n if (count($RS1)<=0) {\r\n ShowHTML('<tr><td valign=\"top\"><DD><b>Não existe nenhum valor para este programa.</b></DD></td>');\r\n } else {\r\n $w_cor='';\r\n ShowHTML(' <tr><td valign=\"top\" colspan=\"2\">Fonte: SIGPLAN/MP - PPA 2004-2007</td>');\r\n $i=0;\r\n foreach($RS1 as $row) {\r\n if ($i==0) {\r\n ShowHTML('<tr><td valign=\"top\">Tipo de orçamento:<br><b>'.f($row,'nm_orcamento').'</b></td>');\r\n ShowHTML('<tr><td valign=\"top\">Valor por fonte:</td>');\r\n ShowHTML('<tr><td align=\"center\" colspan=\"2\">');\r\n// ShowHTML('<TABLE class=\"tudo\" WIDTH=\"100%\" bgcolor=\"'.$conTableBgColor.'\" BORDER=\"'.$conTableBorder.'\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <table width=100% border=\"1\" bordercolor=\"#00000\">');\r\n ShowHTML('<tr align=\"center\">');\r\n ShowHTML('<td bgColor=\"#f0f0f0\"><div><b>Fonte</b></div></td>');\r\n ShowHTML('<td bgColor=\"#f0f0f0\"><div><b>2004*</b></div></td>');\r\n ShowHTML('<td bgColor=\"#f0f0f0\"><div><b>2005**</b></div></td>');\r\n ShowHTML('<td bgColor=\"#f0f0f0\"><div><b>2006</b></div></td>');\r\n ShowHTML('<td bgColor=\"#f0f0f0\"><div><b>2007</b></div></td>');\r\n ShowHTML('<td bgColor=\"#f0f0f0\"><div><b>2008</b></div></td>');\r\n ShowHTML('<td bgColor=\"#f0f0f0\"><div><b>>Total</b></div></td>');\r\n ShowHTML('</tr>');\r\n }\r\n ShowHTML('<tr \"valign=\"top\">');\r\n ShowHTML('<td>'.f($row,'nm_fonte').'</td>');\r\n ShowHTML('<td align=\" center\">'.number_format(Nvl(f($row,'valor_ano_1'),0.00),2,',','.').'</td>');\r\n ShowHTML('<td align=\" center\">'.number_format(Nvl(f($row,'valor_ano_2'),0.00),2,',','.').'</td>');\r\n ShowHTML('<td align=\" center\">'.number_format(Nvl(f($row,'valor_ano_3'),0.00),2,',','.').'</td>');\r\n ShowHTML('<td align=\" center\">'.number_format(Nvl(f($row,'valor_ano_4'),0.00),2,',','.').'</td>');\r\n ShowHTML('<td align=\" center\">'.number_format(Nvl(f($row,'valor_ano_5'),0.00),2,',','.').'</td>');\r\n ShowHTML('<td align=\" center\">'.number_format(Nvl(f($row,'valor_total'),0.00),2,',','.').'</td>');\r\n ShowHTML('</tr>');\r\n }\r\n $sql = new db_getPPADadoFinanc_IS; $RS1 = $sql->getInstanceOf($dbms,$w_cd_programa,null,$w_ano,$w_cliente,'VALORTOTAL');\r\n foreach($RS1 as $row){$RS1=$row; break;}\r\n ShowHTML('<tr><td valign=\"top\" align=\"right\"><b>Totais</td>');\r\n if (count($RS1)<=0) {\r\n ShowHTML('<td valign=\"top\" colspan=6><DD><b>Nao existe nenhum valor para este programa</b></DD></td>');\r\n } else {\r\n ShowHTML('<td align=\" center\"><b>'.number_format(Nvl(f($RS1,'valor_ano_1'),0.00),2,',','.').'</td>');\r\n ShowHTML('<td align=\" center\"><b>'.number_format(Nvl(f($RS1,'valor_ano_2'),0.00),2,',','.').'</td>');\r\n ShowHTML('<td align=\" center\"><b>'.number_format(Nvl(f($RS1,'valor_ano_3'),0.00),2,',','.').'</td>');\r\n ShowHTML('<td align=\" center\"><b>'.number_format(Nvl(f($RS1,'valor_ano_4'),0.00),2,',','.').'</td>');\r\n ShowHTML('<td align=\" center\"><b>'.number_format(Nvl(f($RS1,'valor_ano_5'),0.00),2,',','.').'</td>');\r\n ShowHTML('<td align=\" center\"><b>'.number_format(Nvl(f($RS1,'valor_total'),0.00),2,',','.').'</td>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</table>');\r\n }\r\n }\r\n ShowHTML('<tr><td valign=\"top\" colspan=\"2\">*Valor Lei Orçamentária Anual - LOA2004 + Créditos</td>');\r\n ShowHTML('<tr><td valign=\"top\" colspan=\"2\">**Valor do Projeto de Lei Orçamentária Anual - PLOA 2005</td>');\r\n ShowHTML('<tr><td valign=\"top\"><b><u>R</u>ecurso programado</b><br><input '.$w_Disabled.'accesskey=\"O\" type=\"text\" name=\"w_valor\" class=\"STI\" SIZE=\"18\" MAXLENGTH=\"18\" VALUE=\"'.$w_valor.'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event)\"></td>');\r\n ShowHTML('<tr><td><b>'.$_SESSION['LABEL_CAMPO'].'</b><br><INPUT ACCESSKEY=\"A\" class=\"sti\" type=\"PASSWORD\" name=\"w_assinatura\" size=\"30\" maxlength=\"30\" value=\"\"></td></tr>');\r\n ShowHTML('<tr><td align=\"center\"><hr>');\r\n ShowHTML('<tr><td align=\"center\">');\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Gravar\">');\r\n ShowHTML(' <input class=\"STB\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$w_pagina.$par.'&O=P&SG='.$SG.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.MontaFiltro('GET')).'\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } elseif ($O=='P') {\r\n AbreForm('Form',$w_dir.$w_pagina.$par,'POST','return(Validacao(this));',null,$P1,$P2,$P3,$P4,$TP,$SG,$R,'A');\r\n ShowHTML(montaFiltro('POST',true));\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_cliente\" value=\"'.$w_cliente.'\">');\r\n ShowHTML('<tr><td align=\"center\">');\r\n ShowHTML(' <table width=\"97%\" border=\"0\">');\r\n SelecaoProgramaIS('<u>P</u>rograma:','P',null,$w_cliente,$w_ano,$w_chave,'w_chave','CADASTRADOS',null);\r\n ShowHTML(' <tr><td align=\"center\">');\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Aplicar filtro\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n ShowHTML(' history.back(1);');\r\n ScriptClose();\r\n } \r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Rodape();\r\n}", "title": "" }, { "docid": "a47fe4df63a7b307dfc7dce7b9e4c775", "score": "0.60175616", "text": "function AdicionaCaixa() {\n $this->cont += 12;\n }", "title": "" }, { "docid": "17e140aeebdf61338227aa9bb100c6c1", "score": "0.5902882", "text": "function Cuerpo($acceso,$desde,$hasta,$id_persona_cob,$com)\n\t{\n\t\n\t\t\n\t\t$acceso->objeto->ejecutarSql(\"select *from vista_vendedor where id_persona='$id_persona_cob' order By nombre\");\n\t\tif($row=row($acceso))\n\t\t{\n\t\t\t$nombre=utf8_decode(trim($row[\"nombre\"]).\" \".trim($row[\"apellido\"]));\n\t\t\t$ncedula=trim($row[\"cedula\"]);\n\t\t}\n\t\n\t\t$this->SetFont('Arial','B',10);\n\t\t$this->SetX(20);\n\t\t$this->Cell(40,5,strtoupper(_(\"vendedor \")).\": \".$nombre.\" \".strtoupper(_(\"cedula \")).\": \".$ncedula,0,0,'L');\n\t\t$this->Ln();\n\t\t$this->SetFont('Arial','B',10);\n\t\t$this->SetX(20);\n\t\t$this->Cell(40,5,strtoupper(_(\"fecha Desde \")).\": \".formatofecha($desde).strtoupper(_(\" hasta \")).\": \".formatofecha($hasta),0,0,'L');\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->Ln();\n\t\t\n\t\t\n\t\t//$tipo_caja=verCajaPrincipal($acceso);\n\t\t$w=$this->TituloCampos();\n\t\t\n\t\t$acceso->objeto->ejecutarSql(\"SELECT *FROM parametros where id_param='2'\");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$por_iva=trim($row['valor_param']);\n\t\t}\n\t\t\n\t\t//echo \"SELECT id_contrato,nro_contrato,cedula,(nombre || ' ' || apellido) as nombre,fecha_contrato, status_contrato, costo_contrato,nombre_sector,nombre_zona FROM vista_contrato where fecha_contrato between '$desde' and '$hasta' and id_persona='$id_persona_cob' order by fecha_contrato,nro_contrato\";\n\t\t$acceso->objeto->ejecutarSql(\"SELECT id_contrato,nro_contrato,cedula,(nombre || ' ' || apellido) as nombre,fecha_contrato, status_contrato, costo_contrato,nombre_sector,nombre_zona FROM vista_contrato where fecha_contrato between '$desde' and '$hasta' and id_persona='$id_persona_cob' order by fecha_contrato,nro_contrato\");\n\t\t\n\t\t$this->SetFont('Arial','',9);\n\t\t$cont=1;\n\t\t$this->SetFillColor(249,249,249);\n\t\t$this->SetTextColor(0);\n\t\t$ca[0]='';\n\t\t$tipo_pago[0]='';\n\t\t$y=0;\n\t\t$sumatoria=0.00;\n\t\twhile ($row=row($acceso))\n\t\t{\n\t\t\t\n\t\t\t\t$this->SetX(15);\n\t\t\t\t$this->Cell($w[0],6,$cont,\"LR\",0,\"C\",$fill);\n\t\t\t\t$this->Cell($w[1],6,utf8_decode(trim($row[\"nro_contrato\"])),\"LR\",0,\"J\",$fill);\n\t\t\t\t$this->Cell($w[2],6,utf8_decode(trim($row[\"cedula\"])),\"LR\",0,\"J\",$fill);\n\t\t\t\t$this->Cell($w[3],6,substr(utf8_decode(trim($row[\"nombre\"])), 0,28),\"LR\",0,\"J\",$fill);\n\t\t\t\t$this->Cell($w[4],6,number_format(trim($row[\"costo_contrato\"])+0, 2, ',', '.'),\"LR\",0,\"R\",$fill);\n\t\t\t\t$this->Cell($w[5],6,formatofecha(trim($row[\"fecha_contrato\"])),\"LR\",0,\"C\",$fill);\n\t\t\t\t$this->Cell($w[6],6,trim($row[\"status_contrato\"]),\"LR\",0,\"C\",$fill);\n\n\t\t\t\t$this->Ln();\n\t\t\t\t$fill=!$fill;\n\t\t\t\t$cont++;\n\t\t\t\n\t\t}\n\t\t$this->SetX(15);\n\t\t$this->Cell(array_sum($w),5,'','T');\n\t\t\n\t\t\n\t\t$acceso->objeto->ejecutarSql(\"select sum(costo_contrato) as total_p from contrato where fecha_contrato between '$desde' and '$hasta' and id_persona='$id_persona_cob'\");\n\t\t$row=row($acceso);\n\t\t$total_p=trim($row[\"total_p\"]);\n\t\t\n\t\t$comision=($total_p*$com)/100;\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetX(75);\n\t\t$this->SetFont('Arial','BI',9);\n\t\t$this->Cell(55,6,strtoupper(_('resumen general')),\"0\",0,\"C\",$fill);\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetX(75);\n\t\t$this->Cell(30,6,strtoupper(_('comision ')).\"($com%): \",\"1\",0,\"L\",$fill);\n\t\t\n\t\t$this->Cell(25,6,number_format($comision+0, 2, ',', '.'),\"1\",0,\"R\",$fill);\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetX(75);\n\t\t$this->Cell(30,6,strtoupper(_('total general')).\": \",\"1\",0,\"L\",$fill);\n\t\t\n\t\t$this->Cell(25,6,number_format($total_p+0, 2, ',', '.'),\"1\",0,\"R\",$fill);\n\t}", "title": "" }, { "docid": "f391f0eab3eb5a9e3b8452f9ac7b42dd", "score": "0.58290964", "text": "function Coche(){\n //this es para hacer referencia la porpia clase\n $this->ruedas=4;\n $this->color=\"red\";\n $this->motor=1600;\n \n }", "title": "" }, { "docid": "30d3ad9d7432fff1aeb2a053c1310b82", "score": "0.5828277", "text": "function grabaEspacio()\n {\n }", "title": "" }, { "docid": "74e5849e21e8cef5c183825315c79726", "score": "0.5815013", "text": "function getCreditosComprometidos(){ return $this->getOEstats()->getTotalCreditosSaldo(); }", "title": "" }, { "docid": "a301ccc1edeea160648d609d89fc6370", "score": "0.581109", "text": "function opcion__crear_proyecto()\n\t{\n\t\t//------ESTO ES UN ALIAS DE PROYECTO::CREAR\n\t\trequire_once('comando_proyecto.php');\n\t\t$comando = new comando_proyecto($this->consola);\n\t\t$comando->set_id_instancia_actual($this->get_id_instancia_actual());\n\t\t$comando->opcion__crear();\n\t}", "title": "" }, { "docid": "2ac4979bfdf0549ccf4c61d3adc23fd7", "score": "0.5800366", "text": "public function semCorpo()\n {\n echo 'Implementei aqui<br>';\n echo $this->souProtegido();\n //echo $this->souProtegidoPraImplementar();\n }", "title": "" }, { "docid": "1338819ba2759afbad83159805eb6ece", "score": "0.57949835", "text": "function DatosCC()\r\n{\r\n\t$this->SetFont('Arial','B',9);\r\n\t$this->text(20,65, 'CODIGO DEL VEHICULO: ');\r\n\t$this->text(20, 70, 'DEPENDENCIA ASIGNADA: ');\r\n\t$this->text(20, 75, 'FECHA DEL MANTENIMIENTO: ');\r\n\t\r\n\t//CUADRO N 1 \r\n\t$this->text(27, 89, 'MARCA ');\r\n\t$this->text(60, 89, 'PLACA');\r\n\t$this->text(93, 89, 'SERIAL MOTOR');\r\n\t$this->text(135, 89, 'SERIAL CARROCERIA');\r\n\t$this->text(176, 89, 'MODELO/ANO');\r\n\t\r\n\t//CUADRO N 2 LADO 1\r\n\t$this->text(23,122, 'CAMBIO DE BUJIAS: ');\r\n\t$this->text(23, 130, 'LAVADO GAMUZADO: ');\r\n\t$this->text(23, 138, 'CAMBIO DE ACEITE: ');\r\n\t$this->text(23, 148, 'CAMBIO DEL SISTEMA DE FRENOS: ');\r\n\t$this->text(20, 183, 'OTROS ESPECIFIQUE: ');\r\n\t$this->text(20, 189, 'OBSERVACIONES: ');\r\n\t$this->text(20, 177, 'PROVEEDOR: ');\r\n\t\r\n\t//CUADRO N 2 LADO 2\r\n\t$this->text(115,122, 'PRESION DE NEUMATICOS: ');\r\n\t$this->text(115, 130, 'GRAFITO: ');\r\n\t$this->text(115, 138, 'ALINEACION Y BALANCEO: ');\r\n\t$this->text(115, 157, 'CAMBIO DE FILTRO: ');\r\n\t\r\n\t//CUADRO N 2 LADO 3\r\n\t$this->text(155,147, 'ACEITE: ');\r\n\t$this->text(155, 157, 'AIRE: ');\r\n\t$this->text(155, 167, 'GASOLINA: ');\r\n\r\n\r\n\t\r\n\t\r\n\r\n\t\r\n}", "title": "" }, { "docid": "c61bdcf1c9ddb93d1d9a5ec3e734c4e5", "score": "0.57869524", "text": "abstract public function estimulo_comer();", "title": "" }, { "docid": "90714cfc5834fed1487ccc6fc96a3cd2", "score": "0.57807606", "text": "public function actionConfiguraop()\n\t{\n\t\t$docu='001'; //guia de remision\n\t\t$docuhijo='023'; //detalle guia de remisio\n\n\t\t$command = Yii::app()->db->createCommand(\"select fn_opciones_documento(\".Yii::app()->user->id.\" ,'\".$docu.\"') \");\n\t\t$command->execute();\n\t\t$command = Yii::app()->db->createCommand(\"select fn_opciones_documento(\".Yii::app()->user->id.\" ,'\".$docuhijo.\"') \");\n\t\t$command->execute();\n\n\t\t$proveedor=VwOpcionesdocumentos::model()->search_us($docu,Yii::app()->user->id);\n\t\t$proveedor1=VwOpcionesdocumentos::model()->search_us($docuhijo,Yii::app()->user->id);\n\t\t$this->render('vw_admin_opciones',array(\n\t\t\t'proveedor'=>$proveedor,\n\t\t\t'proveedor1'=>$proveedor1,\n\t\t));\n\n\n\t}", "title": "" }, { "docid": "88bc3c15f0740416214aac06ef3cb954", "score": "0.57778114", "text": "function climatizador()\n {\n $this->precio_base += 2000;\n }", "title": "" }, { "docid": "16575cc0687b229beea173ae01be3c9b", "score": "0.5774267", "text": "function CentroCusto() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n\r\n $w_ImagemPadrao = 'images/Folder/SheetLittle.gif';\r\n $w_troca = $_REQUEST['w_troca'];\r\n $w_heranca = $_REQUEST['w_heranca'];\r\n $w_sq_cc = $_REQUEST['w_sq_cc'];\r\n\r\n Cabecalho();\r\n head();\r\n Estrutura_CSS($w_cliente);\r\n if ($w_troca>'' && strpos('EDT',$O)===false) {\r\n // Se for recarga da página\r\n $w_sq_cc_pai = $_REQUEST['w_sq_cc_pai'];\r\n $w_nome = $_REQUEST['w_nome'];\r\n $w_descricao = $_REQUEST['w_descricao'];\r\n $w_receita = $_REQUEST['w_receita'];\r\n $w_cliente = $_REQUEST['w_cliente'];\r\n $w_sigla = $_REQUEST['w_sigla'];\r\n $w_ativo = $_REQUEST['w_ativo'];\r\n $w_regular = $_REQUEST['w_regular'];\r\n } elseif ($O!='L') {\r\n if ($O!='P' && $O!='H') {\r\n if ($w_heranca>'' || $O!='I') {\r\n // Se for herança, atribui a chave da opção selecionada para w_sq_cc\r\n if ($w_heranca>'') $w_sq_cc = $w_heranca;\r\n $SQL = new db_getCcData; $RS = $SQL->getInstanceOf($dbms,$w_sq_cc);\r\n $w_sq_cc_pai = f($RS,'sq_cc_pai');\r\n $w_nome = f($RS,'nome');\r\n $w_sigla = f($RS,'sigla');\r\n $w_descricao = f($RS,'descricao');\r\n $w_ativo = f($RS,'ativo');\r\n $w_receita = f($RS,'receita');\r\n $w_regular = f($RS,'regular');\r\n } elseif ($w_troca>'') {\r\n $w_sq_cc_pai = $_REQUEST['w_sq_cc_pai'];\r\n $w_nome = $_REQUEST['w_nome'];\r\n $w_descricao = $_REQUEST['w_descricao'];\r\n $w_regular = $_REQUEST['w_regular'];\r\n $w_cliente = $_REQUEST['w_cliente'];\r\n $w_sigla = $_REQUEST['w_sigla'];\r\n $w_ativo = $_REQUEST['w_ativo'];\r\n $w_regular = $_REQUEST['w_regular'];\r\n } \r\n }\r\n }\r\n if ($O!='L') {\r\n ScriptOpen('JavaScript');\r\n ValidateOpen('Validacao');\r\n if ($O!='P' && $O!='H') {\r\n if ($O=='I' || $O=='A') {\r\n Validate('w_nome','Nome','1','1','3','60','1','1');\r\n Validate('w_descricao','Descrição','1','1','5','500','1','1');\r\n Validate('w_sigla','Sigla','1','1','2','20','1','1');\r\n } \r\n Validate('w_assinatura',$_SESSION['LABEL_ALERTA'],'1','1','3','30','1','1');\r\n } elseif ($O=='H') {\r\n Validate('w_heranca','Origem dos dados','SELECT','1','1','10','','1');\r\n ShowHTML(' if (confirm(\"Confirma herança dos dados da opção selecionada?\")) {');\r\n ShowHTML(' window.close(); ');\r\n ShowHTML(' opener.focus(); ');\r\n ShowHTML(' return true; ');\r\n ShowHTML(' } ');\r\n ShowHTML(' else { return false; } ');\r\n } \r\n ShowHTML(' theForm.Botao[0].disabled=true;');\r\n ShowHTML(' theForm.Botao[1].disabled=true;');\r\n ValidateClose();\r\n ScriptClose();\r\n } \r\n ShowHTML('<style> ');\r\n ShowHTML(' .lh{text-decoration:none;font=Arial;color=\"#FF0000\"} ');\r\n ShowHTML(' .lh:HOVER{text-decoration: underline;} ');\r\n ShowHTML('</style> ');\r\n ShowHTML('</HEAD>');\r\n if ($w_troca>'') {\r\n BodyOpen('onLoad=\"document.Form.'.$w_troca.'.focus();\"');\r\n } elseif ($O=='I' || $O=='A') {\r\n BodyOpen('onLoad=\"document.Form.w_nome.focus();\"');\r\n } elseif ($O=='H') {\r\n BodyOpen('onLoad=\"document.Form.w_heranca.focus();\"');\r\n } elseif ($O=='L') {\r\n BodyOpen('onLoad=\"this.focus();\"');\r\n } else {\r\n BodyOpen('onLoad=\"document.Form.w_assinatura.focus()\";');\r\n } \r\n if ($O!='H') {\r\n Estrutura_Topo_Limpo();\r\n Estrutura_Menu();\r\n Estrutura_Corpo_Abre();\r\n } \r\n Estrutura_Texto_Abre();\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td>');\r\n ShowHTML(' <table width=\"99%\" border=\"0\">');\r\n if ($O=='L') {\r\n if (f($RS_Menu,'libera_edicao')=='S') ShowHTML(' <tr><td><a accesskey=\"I\" class=\"ss\" href=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=I&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\"><u>I</u>ncluir</a>&nbsp;');\r\n ShowHTML(' <tr><td height=\"1\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td><b>');\r\n $SQL = new db_getCcTree; $RS = $SQL->getInstanceOf($dbms,$w_cliente,'IS NULL');\r\n $w_contOut = 0;\r\n foreach($RS as $row) {\r\n $w_titulo = f($row,'sigla');\r\n $w_contOut = $w_contOut+1;\r\n if (f($row,'Filho')>0) {\r\n ShowHTML('<A HREF=#\"'.f($row,'sq_cc').'\"></A>');\r\n ShowHTML('<span><div align=\"left\"><img src=\"images/Folder/FolderClose.gif\" border=0 align=\"center\"> '.f($row,'sigla').'');\r\n if (f($row,'ativo')=='S') $w_classe='hl'; else $w_classe='lh';\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=A&w_sq_cc='.f($row,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Altera as informações deste centro de custos\">AL</A>&nbsp');\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=E&w_sq_cc='.f($row,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Exclui o centro de custos\">EX</A>&nbsp');\r\n if (f($row,'ativo')=='S') {\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=D&w_sq_cc='.f($row,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Impede que este centro de custos seja associado a novos registros\">Desativar</A>&nbsp');\r\n } else {\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=T&w_sq_cc='.f($row,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Permite que este centro de custos seja associado a novos registros\">Ativar</A>&nbsp');\r\n } \r\n ShowHTML(' </div></span>');\r\n ShowHTML(' <div style=\"position:relative; left:12;\">');\r\n $SQL = new db_getCcTree; $RS1 = $SQL->getInstanceOf($dbms,$w_cliente,f($row,'sq_cc'));\r\n foreach($RS1 as $row1) {\r\n $w_titulo = $w_titulo.' - '.f($row1,'sigla');\r\n if (f($row1,'Filho')>0) {\r\n $w_contOut=$w_contOut+1;\r\n ShowHTML('<A HREF=#\"'.f($row1,'sq_cc').'\"></A>');\r\n ShowHTML('<span><div align=\"left\"><img src=\"images/Folder/FolderClose.gif\" border=0 align=\"center\"> '.f($row1,'sigla').'');\r\n if (f($row1,'ativo')=='S') $w_classe='hl'; else $w_classe='lh';\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=A&w_sq_cc='.f($row1,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Altera as informações deste centro de custos\">AL</A>&nbsp');\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=E&w_sq_cc='.f($row1,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Exclui o centro de custos\">EX</A>&nbsp');\r\n if (f($row1,'ativo')=='S') {\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=D&w_sq_cc='.f($row1,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Impede que este centro de custos seja associado a novos registros\">Desativar</A>&nbsp');\r\n } else {\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=T&w_sq_cc='.f($row1,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Permite que este centro de custos seja associado a novos registros\">Ativar</A>&nbsp');\r\n }\r\n ShowHTML(' </div></span>');\r\n ShowHTML(' <div style=\"position:relative; left:12;\">');\r\n $SQL = new db_getCcTree; $RS2 = $SQL->getInstanceOf($dbms,$w_cliente,f($row1,'sq_cc'));\r\n foreach($RS2 as $row2) {\r\n $w_titulo = $w_titulo.' - '.f($row2,'sigla');\r\n if (f($row2,'Filho')>0) {\r\n $w_contOut = $w_contOut+1;\r\n ShowHTML('<A HREF=#\"'.f($row2,'sq_cc').'\"></A>');\r\n ShowHTML('<span><div align=\"left\"><img src=\"images/Folder/FolderClose.gif\" border=0 align=\"center\"> '.f($row2,'sigla').'');\r\n if (f($row2,'ativo')=='S') $w_classe='hl'; else $w_classe='lh';\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=A&w_sq_cc='.f($row2,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Altera as informações deste centro de custos\">AL</A>&nbsp');\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=E&w_sq_cc='.f($row2,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Exclui o centro de custos\">EX</A>&nbsp');\r\n if (f($row2,'ativo')=='S') {\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=D&w_sq_cc='.f($row2,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Impede que este centro de custos seja associado a novos registros\">Desativar</A>&nbsp');\r\n } else {\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=T&w_sq_cc='.f($row2,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Permite que este centro de custos seja associado a novos registros\">Ativar</A>&nbsp');\r\n } \r\n\r\n ShowHTML(' </div></span>');\r\n ShowHTML(' <div style=\"position:relative; left:12;\">');\r\n $SQL = new db_getCcTree; $RS3 = $SQL->getInstanceOf($dbms,$w_cliente,f($row2,'sq_cc'));\r\n foreach($RS3 as $row3) {\r\n $w_titulo = $w_titulo.' - '.f($row3,'sigla');\r\n ShowHTML('<A HREF=#\"'.f($row3,'sq_cc').'\"></A>');\r\n ShowHTML(' <img src=\"'.$w_Imagem.'\" border=0 align=\"center\"> '.f($row3,'sigla'));\r\n if (f($row3,'ativo')=='S') $w_classe='hl'; else $w_classe='lh';\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=A&w_sq_cc='.f($row3,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Altera as informações deste centro de custos\">AL</A>&nbsp');\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=E&w_sq_cc='.f($row3,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Exclui o centro de custos\">EX</A>&nbsp');\r\n if (f($row3,'ativo')=='S') {\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=D&w_sq_cc='.f($row3,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Impede que este centro de custos seja associado a novos registros\">Desativar</A>&nbsp');\r\n } else {\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=T&w_sq_cc='.f($row3,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Permite que este centro de custos seja associado a novos registros\">Desativar</A>&nbsp');\r\n } \r\n ShowHTML(' <BR>');\r\n $w_titulo = str_replace(' - '.f($row3,'sigla'),'',$w_titulo);\r\n } \r\n ShowHTML(' </div>');\r\n } else {\r\n ShowHTML(' <img src=\"'.$w_Imagem.'\" border=0 align=\"center\"> '.f($row2,'sigla'));\r\n if (f($row2,'ativo')=='S') $w_classe='hl'; else $w_classe='lh';\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=A&w_sq_cc='.f($row2,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Altera as informações deste centro de custos\">AL</A>&nbsp');\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=E&w_sq_cc='.f($row2,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Exclui o centro de custos\">EX</A>&nbsp');\r\n if (f($row2,'ativo')=='S') {\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=D&w_sq_cc='.f($row2,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Impede que este centro de custos seja associado a novos registros\">Desativar</A>&nbsp');\r\n } else {\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=T&w_sq_cc='.f($row2,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Permite que este centro de custos seja associado a novos registros\">Ativar</A>&nbsp');\r\n } \r\n ShowHTML(' <BR>');\r\n } \r\n $w_titulo=str_replace(' - '.f($row2,'sigla'),'',$w_titulo);\r\n } \r\n ShowHTML(' </div>');\r\n } else {\r\n $w_Imagem=$w_ImagemPadrao;\r\n ShowHTML(' <img src=\"'.$w_Imagem.'\" border=0 align=\"center\"> '.f($row1,'sigla'));\r\n if (f($row1,'ativo')=='S') $w_classe='hl'; else $w_classe='lh';\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=A&w_sq_cc='.f($row1,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Altera as informações deste centro de custos\">AL</A>&nbsp');\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=E&w_sq_cc='.f($row1,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Exclui o centro de custos\">EX</A>&nbsp');\r\n if (f($row1,'ativo')=='S') {\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=D&w_sq_cc='.f($row1,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Impede que este centro de custos seja associado a novos registros\">Desativar</A>&nbsp');\r\n } else {\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=T&w_sq_cc='.f($row1,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Permite que este centro de custos seja associado a novos registros\">Ativar</A>&nbsp');\r\n } \r\n ShowHTML(' <BR>');\r\n } \r\n $w_titulo=str_replace(' - '.f($row1,'sigla'),'',$w_titulo);\r\n } \r\n ShowHTML(' </div>');\r\n } else {\r\n $w_Imagem=$w_ImagemPadrao;\r\n ShowHTML(' <img src=\"'.$w_Imagem.'\" border=0 align=\"center\"> '.f($row,'sigla').'');\r\n if (f($row,'ativo')=='S') $w_classe='hl'; else $w_classe='lh';\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=A&w_sq_cc='.f($row,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Altera as informações deste centro de custos\">AL</A>&nbsp');\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=E&w_sq_cc='.f($row,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Exclui o centro de custos\">EX</A>&nbsp');\r\n if (f($row,'ativo')=='S') {\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=D&w_sq_cc='.f($row,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Impede que este centro de custos seja associado a novos registros\">Desativar</A>&nbsp');\r\n } else {\r\n ShowHTML(' <A class=\"'.$w_classe.'\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=T&w_sq_cc='.f($row,'sq_cc').'&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG=CT_CC\" title=\"Permite que este centro de custos seja associado a novos registros\">Ativar</A>&nbsp');\r\n } \r\n ShowHTML(' <BR>');\r\n } \r\n } \r\n if ($w_contOut==0) {\r\n // Se não achou registros\r\n ShowHTML('Não foram encontrados registros.');\r\n } \r\n } elseif ($O!='H') {\r\n if ($O!='I' && $O!='A') $w_Disabled='disabled';\r\n // Se for inclusão de nova opção, permite a herança dos dados de outra, já existente.\r\n if ($O=='I') {\r\n ShowHTML(' <tr><td><a accesskey=\"H\" class=\"ss\" HREF=\"javascript:this.status.value;\" onClick=\"window.open(\\''.$w_pagina.$par.'&R='.$w_pagina.'CENTROCUSTO&O=H&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'&w_sq_cc='.$w_sq_cc.'\\',\\'heranca\\',\\'top=70,left=10,width=780,height=200,toolbar=no,status=no,scrollbars=no\\');\"><u>H</u>erdar dados</a>&nbsp;');\r\n ShowHTML(' <tr><td height=\"1\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td><b>'); \r\n } \r\n AbreForm('Form',$w_pagina.'Grava','POST','return(Validacao(this));',null,$P1,$P2,$P3,$P4,$TP,$SG,$w_pagina.$par,$O);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_cliente\" value=\"'.$w_cliente.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_cc\" value=\"'.$w_sq_cc.'\">');\r\n ShowHTML(' <tr><td valign=\"top\"><table width=\"100%\" border=0><tr valign=\"top\">');\r\n ShowHTML(' <td><b><u>N</u>ome:<br><INPUT ACCESSKEY=\"D\" TYPE=\"TEXT\" CLASS=\"sti\" NAME=\"w_nome\" SIZE=40 MAXLENGTH=60 VALUE=\"'.$w_nome.'\" '.$w_Disabled.' title=\"Nome do centro de custo.\"></td>');\r\n // Recupera a lista de opções\r\n if ($O!='I' && $O!='H') {\r\n // Se for alteração, não deixa vincular a opção a ela mesma, nem a seus filhos\r\n selecaoCCSubordination('<u>S</u>ubordinação:','S','Se esta opção estiver subordinada a outra já existente, informe qual.',$w_sq_cc,$w_sq_cc_pai,'w_sq_cc_pai','PARTE',null);\r\n } else {\r\n selecaoCCSubordination('<u>S</u>ubordinação:','S','Se esta opção estiver subordinada a outra já existente, informe qual.',$w_sq_cc,$w_sq_cc_pai,'w_sq_cc_pai','TODOS',null);\r\n } \r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td valign=\"top\" colspan=3><b><U>D</U>escricao:<br><TEXTAREA ACCESSKEY=\"C\" class=\"sti\" name=\"w_descricao\" rows=5 cols=80 title=\"Descreva sucintamente o centro de custo.\" '.$w_Disabled.'>'.$w_descricao.'</textarea></td>');\r\n ShowHTML(' <tr><td valign=\"top\"><table width=\"100%\" border=0><tr valign=\"top\">');\r\n ShowHTML(' <td valign=\"top\"><b>S<u>i</u>gla:<br><INPUT ACCESSKEY=\"S\" TYPE=\"TEXT\" CLASS=\"sti\" NAME=\"w_sigla\" SIZE=20 MAXLENGTH=20 VALUE=\"'.$w_sigla.'\" '.$w_Disabled.' title=\"Informe a sigla desejada para o centro de custo.\"></td>');\r\n MontaRadioSN('<b>Regular?</b>',$w_regular,'w_regular','Informe \"Sim\" se este centro de custo for regular, e \"Não\" se ele for extra-orçamentário.');\r\n MontaRadioSN('<b>Recebimento?</b>',$w_receita,'w_receita','Informe \"Sim\" se este centro de custo for relativo a recebimentos, e \"Não\" se ele for relativo a pagamentos.');\r\n ShowHTML(' </table>');\r\n if ($O=='I') {\r\n ShowHTML(' <tr align=\"left\">');\r\n MontaRadioSN('Ativo?',$w_ativo,'w_ativo');\r\n ShowHTML(' </tr>');\r\n } \r\n ShowHTML(' </td></tr>');\r\n ShowHTML(' <tr><td valign=\"top\"><b>'.$_SESSION['LABEL_CAMPO'].':<br><INPUT ACCESSKEY=\"A\" class=\"sti\" type=\"PASSWORD\" name=\"w_assinatura\" size=\"30\" maxlength=\"30\" value=\"\"></td>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\" height=\"1\" bgcolor=\"#000000\">');\r\n if ($O=='E') {\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\"><input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Excluir\">');\r\n } elseif ($O=='I') {\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\"><input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Incluir\">');\r\n } elseif ($O=='A') {\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\"><input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Atualizar\">');\r\n } elseif ($O=='T') {\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\"><input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Ativar\">');\r\n } elseif ($O=='D') {\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\"><input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Desativar\">');\r\n }\r\n ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$R.'&O=L&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG).'\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n ShowHTML('</FORM>');\r\n } elseif ($O=='H') {\r\n AbreForm('Form',$R,'POST','return(Validacao(this));','content',$P1,$P2,$P3,$P4,$TP,$SG,$R,'I');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_cliente\" value=\"'.$w_cliente.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_cc\" value=\"'.$w_sq_cc.'\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td><div align=\"justify\">Selecione, na relação, a opção a ser utilizada como origem de dados.</div><hr>');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td width=\"100%\">');\r\n ShowHTML(' <table align=\"center\" border=\"0\">');\r\n ShowHTML(' <tr><td valign=\"top\"><table border=0 cellspacing=0 cellpadding=0>');\r\n ShowHTML(' <tr>');\r\n selecaoCC('<u>O</u>rigem:','O','Selecione na lista o centro de custo a ser usado como origem de dados.',$w_heranca,null,'w_heranca',null);\r\n ShowHTML(' </tr>');\r\n ShowHTML(' <tr><td align=\"center\">&nbsp;');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td align=\"center\">');\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Herdar\">');\r\n ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$R.'&O=L&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG).'\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n ShowHTML(' history.back(1);');\r\n ScriptClose();\r\n } \r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</table>');\r\n Estrutura_Texto_Fecha();\r\n if ($O!='H') {\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Rodape();\r\n } \r\n}", "title": "" }, { "docid": "cc4743f41af54194c8d7ecbd83efb822", "score": "0.5728179", "text": "public function getCosto()\n {\n return $this->costo;\n }", "title": "" }, { "docid": "b5fff4a2ccaa04131e61f9bd4bb2e8a0", "score": "0.5716322", "text": "function procesoArticulo(){\n\n }", "title": "" }, { "docid": "06c0ce705718338ed7d8c0643238a204", "score": "0.5713222", "text": "function Cuerpo($acceso,$desde,$hasta,$consult)\n\t{\n\t\t\n\t\t\n\t\t$desde_t=formatofecha($desde);\n\t\t$hasta_t=formatofecha($hasta);\n\t\t$this->SetFont('Arial','B',10);\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->MultiCell(190,7,\"$desde_t Hasta $hasta_t\",'0','C');\n\t\t\n\t\t\t$this->Ln(7);\n\t\t\n\t\n\t\t/////////////////////////////////////////////////////////////////////////////////////////////\n\t\t$right=160;\n\t\t$top=35;\n\t\t\t$this->SetXY($right,$top);\n\t\t\t$this->SetFont('Arial','BIU',9);\n\t\t\t$this->Cell($right,6,strtoupper(_('resumen de facturacion')),\"0\",0,\"L\");\n\t\t\t\n\t\t\t$this->SetX($right)\t;\n\t\t\t\n\t\t\t\t$this->Ln();\n\t\t\t\t$this->SetX($right);\n\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t$this->Cell(60,6,strtoupper(_(\"DESCRIPCION\")),\"0\",0,\"L\");\n\t\t\t\t$this->Cell(10,6,strtoupper(_(\"CANT\")),\"0\",0,\"C\");\n\t\t\t\t\n\t\t\t\t$this->Cell(30,6,strtoupper(_(\"total\")).\" \",\"0\",0,\"R\");\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\n\t\t\t\n\t\t\t$this->SetX($right)\t;\n\t\t\t\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->Cell(45,1,\"--------------------------------------------------------------------------------------------------------\",\"0\",0,\"L\");\n\t\t\t$this->Ln();\n\t\t\t$acceso->objeto->ejecutarSql(\"SELECT count(*) cant, sum(base_imp + desc_pago ) as excento FROM pagos,caja_cobrador where pagos.id_caja_cob=caja_cobrador.id_caja_cob and monto_iva=0 and fecha_pago between '$desde' and '$hasta' \");\n\t\t\t\tif($row=row($acceso)){\n\t\t\t\t\t$cant=trim($row[\"cant\"]);\n\t\t\t\t\t$excento=trim($row[\"excento\"]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(60,5,\"FACTURAS (EXENTAS)\",\"0\",0,\"L\");\n\t\t\t\t\t$this->Cell(20,5,$cant,\"0\",0,\"C\");\n\t\t\t\t\t\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(30,5,number_format($excento+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\n\t\t\t$this->Ln();\n\t\t\t $acceso->objeto->ejecutarSql(\"SELECT count(*) cant, sum(base_imp + desc_pago ) as base_imp, sum(monto_iva) as monto_iva FROM pagos,caja_cobrador where pagos.id_caja_cob=caja_cobrador.id_caja_cob and monto_iva>0 and fecha_pago between '$desde' and '$hasta' \");\n\t\t\t \n\t\t\t\tif($row=row($acceso)){\n\t\t\t\t\t$cant=trim($row[\"cant\"]);\n\t\t\t\t\t$base_imp=trim($row[\"base_imp\"]);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(60,5,\"FACTURAS (BASE IMPONIBLE)\",\"0\",0,\"L\");\n\t\t\t\t\t$this->Cell(20,5,$cant,\"0\",0,\"C\");\n\t\t\t\t\t\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(30,5,number_format($base_imp+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\n\t\t\t$this->Ln();\t\n\t\t\t$acceso->objeto->ejecutarSql(\"SELECT count(*) cant, sum(monto_iva) as monto_iva FROM pagos,caja_cobrador where pagos.id_caja_cob=caja_cobrador.id_caja_cob and monto_iva>0 and fecha_pago between '$desde' and '$hasta' \");\n\t\t\t \n\t\t\t\tif($row=row($acceso)){\n\t\t\t\t\t$cant=trim($row[\"cant\"]);\n\t\t\t\t\t$monto_iva=trim($row[\"monto_iva\"]);\n\t\t\t\t}\n\t\t\t \n\t\t\t\t\n\t\t\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(60,5,\"IVA (12%)\",\"0\",0,\"L\");\n\t\t\t\t\t$this->Cell(20,5,$cant,\"0\",0,\"C\");\n\t\t\t\t\t\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(30,5,number_format($monto_iva+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t$this->Ln();\t\n\t\t\t$acceso->objeto->ejecutarSql(\"SELECT count(*) cant, sum(base_imp + monto_iva ) as total_nc FROM pagos,caja_cobrador where pagos.id_caja_cob=caja_cobrador.id_caja_cob and fecha_pago between '$desde' and '$hasta' and status_pago='ANULADO'\");\n\t\t\t\tif($row=row($acceso)){\n\t\t\t\t\t$cant=trim($row[\"cant\"]);\n\t\t\t\t\t$total_nc=trim($row[\"total_nc\"]);\n\t\t\t\t}\n\t\t\t \n\t\t\t\t\n\t\t\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(60,5,\"NOTAS DE CREDITOS\",\"0\",0,\"L\");\n\t\t\t\t\t$this->Cell(20,5,$cant,\"0\",0,\"C\");\n\t\t\t\t\t\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(30,5,number_format($total_nc+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t$this->Ln();\t\n\t\t\t $acceso->objeto->ejecutarSql(\"SELECT count(*) cant, sum(desc_pago) as desc_pago FROM pagos,caja_cobrador where pagos.id_caja_cob=caja_cobrador.id_caja_cob and desc_pago>0 and fecha_pago between '$desde' and '$hasta'\");\n\t\t\t\tif($row=row($acceso)){\n\t\t\t\t\t$cant=trim($row[\"cant\"]);\n\t\t\t\t\t$desc_pago=trim($row[\"desc_pago\"]);\n\t\t\t\t}\n\t\t\t \n\t\t\t\t\n\t\t\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(60,5,\"DESCUENTOS\",\"0\",0,\"L\");\n\t\t\t\t\t$this->Cell(20,5,$cant,\"0\",0,\"C\");\n\t\t\t\t\t\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(30,5,number_format($desc_pago+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\n\t\t\t\t\n\t\t$this->Ln();\n\t\t\n\t\t\t$total_facturado=$excento+$base_imp+$monto_iva-$desc_pago-$total_nc;\n\t\t\t$this->SetX($right)\t;\n\t\t\t$this->Cell(45,1,\"--------------------------------------------------------------------------------------------------------\",\"0\",0,\"L\");\n\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t\t$this->Cell(60,5,\"TOTAL FACTURADO\",\"0\",0,\"L\");\n\t\t\t\t\t$this->Cell(20,5,'',\"0\",0,\"C\");\n\t\t\t\t\t$this->Cell(30,5,number_format($total_facturado+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t\n\t\t/////////////////////////////////////////////////////////////////////////////////////////////\n\t\t$right=160;\n\t\t$this->Ln(7);\n\t\t\t$this->SetX($right)\t;\n\t\t\t$this->SetFont('Arial','BIU',9);\n\t\t\t$this->Cell($right,6,strtoupper(_('resumen por forma de pago')),\"0\",0,\"L\");\n\t\t\t\n\t\t\t$this->SetX($right)\t;\n\t\t\t\n\t\t\t\t$this->Ln();\n\t\t\t\t$this->SetX($right);\n\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t$this->Cell(60,6,strtoupper(_(\"forma de pago\")),\"0\",0,\"L\");\n\t\t\t\t$this->Cell(10,6,strtoupper(_(\"CANT\")),\"0\",0,\"C\");\n\t\t\t\t$this->Cell(30,6,strtoupper(_(\"total\")).\" \",\"0\",0,\"R\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\n\t\t\t\n\t\t\t$this->SetX($right)\t;\n\t\t\t\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->Cell(45,1,\"--------------------------------------------------------------------------------------------------------\",\"0\",0,\"L\");\n\t\t\t\n\t\t $dato=lectura($acceso,\"SELECT *FROM tipo_pago where status_pago='ACTIVO'\");\n\t\t\t$suma_c=0;\n\t\t\t$suma_can=0;\n\t\t\t \n\t\t\tfor($k=0;$k<count($dato);$k++){\n\t\t\t\t$id_tipo_pago=trim($dato[$k][\"id_tipo_pago\"]);\n\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(monto_tp) as monto_tp, count(*) as cant FROM vista_tipopago where fecha_pago between '$desde' and '$hasta' and id_tipo_pago='$id_tipo_pago' and status_pago='PAGADO'\");\n\t\t\t\t$suma=0;\n\t\t\t\tif($row=row($acceso))\n\t\t\t\t{\n\t\t\t\t\t$monto_tp=trim($row[\"monto_tp\"])+0;\n\t\t\t\t\t$cant=trim($row[\"cant\"])+0;\n\t\t\t\t\t$suma_c+=$monto_tp;\n\t\t\t\t\t$suma_can+=$cant;\n\t\t\t\t\t\n\t\t\t\t\t$this->Ln();\n\t\t\t\t\t\n\t\t\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(60,5,trim($dato[$k][\"tipo_pago\"]),\"0\",0,\"L\");\n\t\t\t\t\t$this->Cell(20,5,$cant,\"0\",0,\"C\");\n\t\t\t\t\t\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(30,5,number_format($monto_tp+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t$this->Ln();\n\t\t\t\n\t\t\t$this->SetX($right)\t;\n\t\t\t$this->Cell(45,1,\"--------------------------------------------------------------------------------------------------------\",\"0\",0,\"L\");\n\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t\t$this->Cell(60,5,\"TOTAL FORMA DE PAGO\",\"0\",0,\"L\");\n\t\t\t\t\t$this->Cell(20,5,$suma_can,\"0\",0,\"C\");\n\t\t\t\t\t$this->Cell(30,5,number_format($suma_c+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\n\t\t\t $acceso->objeto->ejecutarSql(\"SELECT sum(monto_reten) as monto_reten FROM pagos,caja_cobrador where pagos.id_caja_cob=caja_cobrador.id_caja_cob and monto_reten>0 and fecha_pago between '$desde' and '$hasta' and status_pago='PAGADO'\");\n\t\t\t\tif($row=row($acceso)){\n\t\t\t\t\t$monto_reten=trim($row[\"monto_reten\"]);\n\t\t\t\t}\n\t\t\t $acceso->objeto->ejecutarSql(\"SELECT sum(islr) as islr FROM pagos,caja_cobrador where pagos.id_caja_cob=caja_cobrador.id_caja_cob and islr>0 and fecha_pago between '$desde' and '$hasta' and status_pago='PAGADO'\");\n\t\t\t\tif($row=row($acceso)){\n\t\t\t\t\t$islr=trim($row[\"islr\"]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t$this->Ln();\n\t\t\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(110,5,'ret. IVA '.number_format($monto_reten+0, 2, ',', '.').' + ret. ISLR '.number_format($islr+0, 2, ',', '.').' + total '.number_format($islr+0, 2, ',', '.').' = '.number_format($monto_reten+$islr+$suma_c+0, 2, ',', '.'),\"0\",0,\"R\");\t\t\t\n/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n\t\t\n\t\t$this->Ln(7);\n\t\t\t$this->SetX($right)\t;\n\t\t\t$this->SetFont('Arial','BIU',9);\n\t\t\t$this->Cell($right,6,strtoupper(_('resumen de retenciones')),\"0\",0,\"L\");\n\t\t\t\n\t\t\t$this->SetX($right)\t;\n\t\t\t\n\t\t\t\t$this->Ln();\n\t\t\t\t$this->SetX($right);\n\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t$this->Cell(60,6,strtoupper(_(\"DESCRIPCION\")),\"0\",0,\"L\");\n\t\t\t\t$this->Cell(10,6,strtoupper(_(\"CANT\")),\"0\",0,\"C\");\n\t\t\t\t\n\t\t\t\t$this->Cell(30,6,strtoupper(_(\"total\")).\" \",\"0\",0,\"R\");\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\n\t\t\t\n\t\t\t$this->SetX($right)\t;\n\t\t\t\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->Cell(45,1,\"--------------------------------------------------------------------------------------------------------\",\"0\",0,\"L\");\n\t\t\t$this->Ln();\n\t\t\t $acceso->objeto->ejecutarSql(\"SELECT count(*) cant, sum(monto_reten) as monto_reten FROM pagos,caja_cobrador where pagos.id_caja_cob=caja_cobrador.id_caja_cob and monto_reten>0 and fecha_pago between '$desde' and '$hasta' and status_pago='PAGADO'\");\n\t\t\t\tif($row=row($acceso)){\n\t\t\t\t\t$cant=trim($row[\"cant\"]);\n\t\t\t\t\t$monto_reten=trim($row[\"monto_reten\"]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(60,5,\"RETENCION IVA (75%)\",\"0\",0,\"L\");\n\t\t\t\t\t$this->Cell(20,5,$cant,\"0\",0,\"C\");\n\t\t\t\t\t\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(30,5,\"-\".number_format($monto_reten+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\n\t\t\t$this->Ln();\n\t\t\t $acceso->objeto->ejecutarSql(\"SELECT count(*) cant, sum(islr) as islr FROM pagos,caja_cobrador where pagos.id_caja_cob=caja_cobrador.id_caja_cob and islr>0 and fecha_pago between '$desde' and '$hasta' and status_pago='PAGADO'\");\n\t\t\t\tif($row=row($acceso)){\n\t\t\t\t\t$cant=trim($row[\"cant\"]);\n\t\t\t\t\t$islr=trim($row[\"islr\"]);\n\t\t\t\t}\n\t\t\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(60,5,\"RETENCION ISLR (2%)\",\"0\",0,\"L\");\n\t\t\t\t\t$this->Cell(20,5,$cant,\"0\",0,\"C\");\n\t\t\t\t\t\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(30,5,\"-\".number_format($islr+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\n\t\t\t$this->Ln();\t\n\t\t\t$total_general=$total_facturado - $monto_reten - $islr;\n\t\t\t\t\n\t\t\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(60,5,\"TOTAL FACTURADO\",\"0\",0,\"L\");\n\t\t\t\t\t$this->Cell(20,5,\"\",\"0\",0,\"C\");\n\t\t\t\t\t\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(30,5,number_format($total_facturado+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t$this->Ln();\n\t\t\n\t\t\t$total_facturado=$excento+$base_imp+$monto_iva-$desc_pago-$total_nc;\n\t\t\t$this->SetX($right)\t;\n\t\t\t$this->Cell(45,1,\"--------------------------------------------------------------------------------------------------------\",\"0\",0,\"L\");\n\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t\t$this->Cell(60,5,\"TOTAL INGRESO\",\"0\",0,\"L\");\n\t\t\t\t\t$this->Cell(20,5,\"\",\"0\",0,\"C\");\n\t\t\t\t\t\n\t\t\t\t\t$this->Cell(30,5,number_format($total_general+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t$right=160;\n\t\t\n\t\t\t\t\t\n\t\t/////////////////////////////////////////////////////////////////////////////////////////////\n\n\t\t\n\t\t$right=10;\n\t\t$top=35;\n\t\t\t$this->SetXY($right,$top);\n\t\t\t\n\t\t\t\n\t\t\t$this->SetX($right)\t;\n\t\t\t$this->SetFont('Arial','BIU',9);\n\t\t\t$this->Cell($right,6,strtoupper(_('resumen por franquiciaS')),\"0\",0,\"L\");\n\t\t\t\n\t\t\t$this->SetX($right)\t;\n\t\t\t\n\t\t\t\t$this->Ln();\n\t\t\t\t$this->SetX($right);\n\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t$this->Cell(45,6,strtoupper(_(\"FRANQUICIA\")),\"0\",0,\"L\");\n\t\t\t\t$this->Cell(30,6,strtoupper(_(\"AMC\")),\"0\",0,\"R\");\n\t\t\t\t$this->Cell(30,6,strtoupper(_(\"UNICABLE\")).\" \",\"0\",0,\"R\");\n\t\t\t\t$this->Cell(25,6,strtoupper(_(\"total\")).\" \",\"0\",0,\"R\");\n\t\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\n\t\t\t\n\t\t\t$this->SetX($right)\t;\n\t\t\t\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->SetX($right);\n\t\t\t$this->Cell(45,1,\"---------------------------------------------------------------------------------------------------------------------------\",\"0\",0,\"L\");\n\t\t\t\n\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(monto_pago) as monto_pago, count(*) as cant FROM pagos ,caja_cobrador,caja where pagos.id_caja_cob=caja_cobrador.id_caja_cob and caja_cobrador.id_caja=caja.id_caja and fecha_pago between '$desde' and '$hasta' and status_pago='PAGADO' and id_franq='2' \");\n\t\t\t\t$row=row($acceso);\n\t\t\t\t$monto_pago_t=trim($row[\"monto_pago\"])+0;\n\t\t\t\t\n\t\t\t\t\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(monto_pago) as monto_pago FROM pagos,caja_cobrador,caja ,vista_contrato_dir where\n\t\t\t\t\t\t\t\tpagos.id_caja_cob=caja_cobrador.id_caja_cob and \n\t\t\t\t\t\t\t\tcaja_cobrador.id_caja=caja.id_caja and \n\t\t\t\t\t\t\t\tpagos.id_contrato=vista_contrato_dir.id_contrato and \n\t\t\t\t\t\t\t\tcaja.id_franq='2' and \n\t\t\t\t\t\t\t\tfecha_pago between '$desde' and '$hasta' and \n\t\t\t\t\t\t\t\tstatus_pago='PAGADO' and \n\t\t\t\t\t\t\t\tvista_contrato_dir.id_franq='2'\");\n\t\t\t\t\t\t\t\t$row=row($acceso);\n\t\t\t\t\t\t\t\t$monto_pago_AMC=trim($row[\"monto_pago\"])+0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(monto_pago) as monto_pago FROM pagos,caja_cobrador,caja ,vista_contrato_dir where\n\t\t\t\t\t\t\t\tpagos.id_caja_cob=caja_cobrador.id_caja_cob and \n\t\t\t\t\t\t\t\tcaja_cobrador.id_caja=caja.id_caja and \n\t\t\t\t\t\t\t\tpagos.id_contrato=vista_contrato_dir.id_contrato and \n\t\t\t\t\t\t\t\tcaja.id_franq='1' and \n\t\t\t\t\t\t\t\tfecha_pago between '$desde' and '$hasta' and \n\t\t\t\t\t\t\t\tstatus_pago='PAGADO' and \n\t\t\t\t\t\t\t\tvista_contrato_dir.id_franq='2'\");\n\t\t\t\t\t\t\t\t$row=row($acceso);\n\t\t\t\t\t\t\t\t$monto_pago_UNI=trim($row[\"monto_pago\"])+0;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$this->Ln();\n\t\t\t\t\t\n\t\t\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t\t$this->Cell(45,5,\"AMC\",\"0\",0,\"L\");\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(30,5,number_format($monto_pago_AMC+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(30,5,number_format($monto_pago_UNI+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t\t$this->Cell(25,5,number_format($monto_pago_t+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(monto_pago) as monto_pago, count(*) as cant FROM pagos ,caja_cobrador,caja where pagos.id_caja_cob=caja_cobrador.id_caja_cob and caja_cobrador.id_caja=caja.id_caja and fecha_pago between '$desde' and '$hasta' and status_pago='PAGADO' and id_franq='1' \");\n\t\t\t\t$row=row($acceso);\n\t\t\t\t$monto_pago_t=trim($row[\"monto_pago\"])+0;\n\t\t\t\t\n\t\t\t\t\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(monto_pago) as monto_pago FROM pagos,caja_cobrador,caja ,vista_contrato_dir where\n\t\t\t\t\t\t\t\tpagos.id_caja_cob=caja_cobrador.id_caja_cob and \n\t\t\t\t\t\t\t\tcaja_cobrador.id_caja=caja.id_caja and \n\t\t\t\t\t\t\t\tpagos.id_contrato=vista_contrato_dir.id_contrato and \n\t\t\t\t\t\t\t\tcaja.id_franq='2' and \n\t\t\t\t\t\t\t\tfecha_pago between '$desde' and '$hasta' and \n\t\t\t\t\t\t\t\tstatus_pago='PAGADO' and \n\t\t\t\t\t\t\t\tvista_contrato_dir.id_franq='1'\");\n\t\t\t\t\t\t\t\t$row=row($acceso);\n\t\t\t\t\t\t\t\t$monto_pago_AMC=trim($row[\"monto_pago\"])+0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(monto_pago) as monto_pago FROM pagos,caja_cobrador,caja ,vista_contrato_dir where\n\t\t\t\t\t\t\t\tpagos.id_caja_cob=caja_cobrador.id_caja_cob and \n\t\t\t\t\t\t\t\tcaja_cobrador.id_caja=caja.id_caja and \n\t\t\t\t\t\t\t\tpagos.id_contrato=vista_contrato_dir.id_contrato and \n\t\t\t\t\t\t\t\tcaja.id_franq='1' and \n\t\t\t\t\t\t\t\tfecha_pago between '$desde' and '$hasta' and \n\t\t\t\t\t\t\t\tstatus_pago='PAGADO' and \n\t\t\t\t\t\t\t\tvista_contrato_dir.id_franq='1'\");\n\t\t\t\t\t\t\t\t$row=row($acceso);\n\t\t\t\t\t\t\t\t$monto_pago_UNI=trim($row[\"monto_pago\"])+0;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$this->Ln();\n\t\t\t\t\t\n\t\t\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t\t$this->Cell(45,5,\"UNICABLE\",\"0\",0,\"L\");\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(30,5,number_format($monto_pago_AMC+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(30,5,number_format($monto_pago_UNI+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t\t$this->Cell(25,5,number_format($monto_pago_t+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\n\t\t\t\t\n\t\t\n\t\t$this->Ln();\n\t\t\t\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->SetX($right);\n\t\t\t$this->Cell(45,1,\"---------------------------------------------------------------------------------------------------------------------------\",\"0\",0,\"L\");\n\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(monto_pago) as monto_pago FROM pagos,caja_cobrador,caja ,vista_contrato_dir where\n\t\t\t\t\t\t\t\tpagos.id_caja_cob=caja_cobrador.id_caja_cob and \n\t\t\t\t\t\t\t\tcaja_cobrador.id_caja=caja.id_caja and \n\t\t\t\t\t\t\t\tpagos.id_contrato=vista_contrato_dir.id_contrato and \n\t\t\t\t\t\t\t\tfecha_pago between '$desde' and '$hasta' and \n\t\t\t\t\t\t\t\tstatus_pago='PAGADO' and \n\t\t\t\t\t\t\t\tvista_contrato_dir.id_franq='2'\");\n\t\t\t\t\t\t\t\t$row=row($acceso);\n\t\t\t\t\t\t\t\t$monto_pago_AMC=trim($row[\"monto_pago\"])+0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(monto_pago) as monto_pago FROM pagos,caja_cobrador,caja ,vista_contrato_dir where\n\t\t\t\t\t\t\t\tpagos.id_caja_cob=caja_cobrador.id_caja_cob and \n\t\t\t\t\t\t\t\tcaja_cobrador.id_caja=caja.id_caja and \n\t\t\t\t\t\t\t\tpagos.id_contrato=vista_contrato_dir.id_contrato and \n\t\t\t\t\t\t\t\tfecha_pago between '$desde' and '$hasta' and \n\t\t\t\t\t\t\t\tstatus_pago='PAGADO' and \n\t\t\t\t\t\t\t\tvista_contrato_dir.id_franq='1'\");\n\t\t\t\t\t\t\t\t$row=row($acceso);\n\t\t\t\t\t\t\t\t$monto_pago_UNI=trim($row[\"monto_pago\"])+0;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$this->Ln();\n\t\t\t\t\t\n\t\t\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t\t$this->Cell(45,5,\"TOTAL\",\"0\",0,\"L\");\n\t\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t\t$this->Cell(30,5,number_format($monto_pago_AMC+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t\t$this->Cell(30,5,number_format($monto_pago_UNI+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t$this->Ln(7);\t\n\t\t\t\n\t\t\t\n\t\t\t$this->SetFont('Arial','BIU',9);\n\t\t\t$this->Cell($right,6,strtoupper(_('resumen por servicios')),\"0\",0,\"L\");\n\t\t\t\n\t\t\t$this->SetX($right)\t;\n\t\t\t\n\t\t\t\t$this->Ln();\n\t\t\t\t$this->SetX($right);\n\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t$this->Cell(50,6,strtoupper(_(\"servicio\")),\"0\",0,\"L\");\n\t\t\t\t$this->Cell(10,6,strtoupper(_(\"cant\")),\"0\",0,\"C\");\n\t\t\t\t$this->Cell(20,6,strtoupper(_(\"costo\")),\"0\",0,\"R\");\n\t\t\t\t$this->Cell(25,6,strtoupper(_(\"desc\")),\"0\",0,\"R\");\n\t\t\t\t$this->Cell(25,6,strtoupper(_(\"total\")),\"0\",0,\"R\");\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->SetX($right);\n\t\t\t$this->Cell(45,1,\"---------------------------------------------------------------------------------------------------------------------------\",\"0\",0,\"L\");\n\t\t\t\n\t\t $dato=lectura($acceso,\"SELECT *FROM servicios where status_serv='ACTIVO'\");\n\t\t\t $totalG=0;\n\t\t\t\t$suma_c=0;\n\t\t\t\t$suma_d=0;\n\t\t\t\t$suma_can=0;\n\t\t\tfor($k=0;$k<count($dato);$k++){\n\t\t\t\t$id_serv=trim($dato[$k][\"id_serv\"]);\n\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(costo_cobro*cant_serv) as costo_cobro,sum(descu) as descu, count(*) as cant FROM vista_pago_ser where fecha_pago between '$desde' and '$hasta' and id_serv='$id_serv' and status_pago='PAGADO'\");\n\t\t\t\t\n\t\t\t\t$cont=0;\n\t\t\t\tif($row=row($acceso)){\n\t\t\t\t\t$cant=trim($row[\"cant\"]);\n\t\t\t\t\t$costo_cobro=trim($row[\"costo_cobro\"]);\n\t\t\t\t\t$descu=trim($row[\"descu\"]);\n\t\t\t\t\t$total=$costo_cobro-$descu;\n\t\t\t\t\t$suma_c+=$costo_cobro;\n\t\t\t\t\t$suma_d+=$descu;\n\t\t\t\t\t$suma_can+=$cant;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tif($total>0){\n\t\t\t\t\t\t$this->Ln();\n\t\t\t\t\t\t$this->SetX($right);\n\t\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t\t$this->Cell(50,5,strtoupper(utf8_decode(trim($dato[$k][\"nombre_servicio\"]))).\":\",\"0\",0,\"L\");\n\t\t\t\t\t\t$this->Cell(10,5,$cant,\"0\",0,\"C\");\n\t\t\t\t\t\t$this->Cell(20,5,number_format($costo_cobro+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t\t$this->Cell(25,5,number_format($descu+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t\t$this->Cell(25,5,number_format($total+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$total=$suma_c-$suma_d;\n\t\t\t$this->Ln();\n\t\t\t$this->SetX($right)\t;\n\t\t\t$this->Cell(45,1,\"---------------------------------------------------------------------------------------------------------------------------\",\"0\",0,\"L\");\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t\t\t\t$this->SetX($right);\n\t\t\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t\t\t$this->Cell(50,5,strtoupper(\"total SERVICIOS\"),\"0\",0,\"L\");\n\t\t\t\t\t\t$this->Cell(10,5,$suma_can,\"0\",0,\"C\");\n\t\t\t\t\t\t$this->Cell(20,5,number_format($suma_c+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t\t$this->Cell(25,5,number_format($suma_d+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t\t$this->Cell(25,5,number_format($total+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\n\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(monto_iva) as monto_iva FROM pagos,caja_cobrador where pagos.id_caja_cob=caja_cobrador.id_caja_cob and monto_iva>0 and fecha_pago between '$desde' and '$hasta' and status_pago='PAGADO' \");\n\t\t\t\tif($row=row($acceso)){\n\t\t\t\t\t$monto_iva=trim($row[\"monto_iva\"]);\n\t\t\t\t}\n\t\t\t$this->Ln();\n\t\t\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(130,5,'IVA '.number_format($monto_iva+0, 2, ',', '.').' + total '.number_format($total+0, 2, ',', '.').' = '.number_format($monto_iva+$total+0, 2, ',', '.'),\"0\",0,\"R\");\t\n\n\t\t\n\t\t\n/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\n\t\t$right=10;\n\t\t$this->Ln(7);\n\t\t\t$this->SetFont('Arial','BIU',9);\n\t\t\t$this->Cell($right,6,strtoupper(_('resumen DE cargos cobrados por meses')),\"0\",0,\"L\");\n\t\t\t\n\t\t\t$this->SetX($right)\t;\n\t\t\t\n\t\t\t\t$this->Ln();\n\t\t\t\t$this->SetX($right);\n\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t$this->Cell(50,6,strtoupper(_(\"MES\")),\"0\",0,\"L\");\n\t\t\t\t$this->Cell(10,6,strtoupper(_(\"cant\")),\"0\",0,\"C\");\n\t\t\t\t$this->Cell(20,6,strtoupper(_(\"costo\")),\"0\",0,\"R\");\n\t\t\t\t$this->Cell(25,6,strtoupper(_(\"desc\")),\"0\",0,\"R\");\n\t\t\t\t$this->Cell(25,6,strtoupper(_(\"total\")),\"0\",0,\"R\");\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->SetX($right);\n\t\t\t$this->Cell(45,1,\"---------------------------------------------------------------------------------------------------------------------------\",\"0\",0,\"L\");\n\t\t\t\n\t\t $dato=lectura($acceso,\"SELECT distinct fecha_inst FROM vista_pago_ser where fecha_pago between '$desde' and '$hasta' and status_pago='PAGADO' order by fecha_inst\");\n\t\t\t $dato1=array();\n\t\t\t $ind=0;\n\t\t\t for($k=0;$k<count($dato);$k++){\n\t\t\t\t$fecha_inst=trim($dato[$k][\"fecha_inst\"]);\n\t\t\t\tlist($ano,$mes,$dia)=explode(\"-\",$fecha_inst);\n\t\t\t\t$fecha1=\"$ano-$mes\";\n\t\t\t\t\n\t\t\t\tif(!in_array($fecha1,$dato1)){\n\t\t\t\t\t$dato1[$ind]=$fecha1;\n\t\t\t\t\t$ind++;\n\t\t\t\t}\n\t\t\t }\n\t\t\t\t$suma_c=0;\n\t\t\t\t$suma_d=0;\n\t\t\t\t$suma_can=0;\n\t\t\tfor($k=0;$k<count($dato1);$k++){\n\t\t\t\t$fecha_inst=trim($dato1[$k]);\n\t\t\t//\techo $fecha_inst;\n\t\t\t\tlist($ano,$mes)=explode(\"-\",$fecha_inst);\n\t\t\t\t$mes_l = formato_mes_com1($mes).\" $ano\";\n\t\t\t\t\n\t\t\t\t$ult_dia_mes=date(\"t\",mktime( 0, 0, 0, $mes, 1, $ano ));\n\t\t\t\t\n\t\t\t\t$fec_ini=\"$ano-$mes-01\";\n\t\t\t\t$fec_fin=\"$ano-$mes-$ult_dia_mes\";\n\t\t\t\n\t\t\t\t//echo \"'$fec_ini' and '$fec_fin' <br>\";\n\t\t\t\t//echo \"SELECT sum(costo_cobro*cant_serv) as costo_cobro,sum(descu) as descu, count(*) as cant FROM vista_pago_ser where fecha_pago between '$desde' and '$hasta' and status_pago='PAGADO' and fecha_inst between '$fec_ini' and '$fec_fin'<br> \";\n\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(costo_cobro*cant_serv) as costo_cobro,sum(descu) as descu, count(*) as cant FROM vista_pago_ser where fecha_pago between '$desde' and '$hasta' and status_pago='PAGADO' and fecha_inst between '$fec_ini' and '$fec_fin' \");\n\t\t\t\t\n\t\t\t\t$suma=0;\n\t\t\t\t$cont=0;\n\t\t\t\tif($row=row($acceso))\n\t\t\t\t{\n\t\t\t\t\t$cant=trim($row[\"cant\"]);\n\t\t\t\t\t$costo_cobro=trim($row[\"costo_cobro\"]);\n\t\t\t\t\t$descu=trim($row[\"descu\"]);\n\t\t\t\t\t$total=$costo_cobro-$descu;\n\t\t\t\t\t$suma_c+=$costo_cobro;\n\t\t\t\t\t$suma_d+=$descu;\n\t\t\t\t\t$suma_can+=$cant;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tif($total>0){\n\t\t\t\t\t\t$this->Ln();\n\t\t\t\t\t\t$this->SetX($right);\n\t\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t\t$this->Cell(50,5,strtoupper($mes_l),\"0\",0,\"L\");\n\t\t\t\t\t\t$this->Cell(10,5,$cant,\"0\",0,\"C\");\n\t\t\t\t\t\t$this->Cell(20,5,number_format($costo_cobro+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t\t$this->Cell(25,5,number_format($descu+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t\t$this->Cell(25,5,number_format($total+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$total=$suma_c-$suma_d;\n\t\t\t$this->Ln();\n\t\t\t$this->SetX($right)\t;\n\t\t\t$this->Cell(45,1,\"---------------------------------------------------------------------------------------------------------------------------\",\"0\",0,\"L\");\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t\t\t\t$this->SetX($right);\n\t\t\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t\t\t$this->Cell(50,5,strtoupper(\"total\"),\"0\",0,\"L\");\n\t\t\t\t\t\t$this->Cell(10,5,$suma_can,\"0\",0,\"C\");\n\t\t\t\t\t\t$this->Cell(20,5,number_format($suma_c+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t\t$this->Cell(25,5,number_format($suma_d+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\t\t\t\t$this->Cell(25,5,number_format($total+0, 2, ',', '.'),\"0\",0,\"R\");\n\t\t\n\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(monto_iva) as monto_iva FROM pagos,caja_cobrador where pagos.id_caja_cob=caja_cobrador.id_caja_cobmonto_iva>0 and fecha_pago between '$desde' and '$hasta' and status_pago='PAGADO' \");\n\t\t\t\tif($row=row($acceso)){\n\t\t\t\t\t$monto_iva=trim($row[\"monto_iva\"]);\n\t\t\t\t}\n\t\t\t$this->Ln();\n\t\t\t\t\t$this->SetX($right)\t;\n\t\t\t\t\t$this->SetFont('Arial','',9);\n\t\t\t\t\t$this->Cell(130,5,'IVA '.number_format($monto_iva+0, 2, ',', '.').' + total '.number_format($total+0, 2, ',', '.').' = '.number_format($monto_iva+$total+0, 2, ',', '.'),\"0\",0,\"R\");\t\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t$this->AddPage('L','letter');\n\t\t$this->SetFont('Arial','BIU',9);\n\t\t\t\n\t\t\t$this->Ln();\n\t\t$this->SetX(15);\n\t\t$this->Cell(40,6,strtoupper(_('detalles de las estaciones de trabajos')),\"0\",0,\"L\");\n\t\t$this->Ln();\n\t\t$w=$this->TituloCampos();\n\t\t$acceso->objeto->ejecutarSql(\"SELECT id_cierre,nombre_est,reporte_z,fecha_cierre,hora_cierre,monto_total,obser_cierre from estacion_trabajo,cirre_diario_et where estacion_trabajo.id_est=cirre_diario_et.id_est and fecha_cierre between '$desde' and '$hasta' \");\n\n\t\t$this->SetFont('Arial','',9);\n\t\t$cont=1;\n\t\t$this->SetFillColor(249,249,249);\n\t\t$this->SetTextColor(0);\n\t\twhile ($row=row($acceso))\n\t\t{\n\t\t\t$this->SetX(15);\n\t\t\t$this->Cell($w[0],6,$cont,\"LR\",0,\"C\",$fill);\n\t\t\t$this->Cell($w[1],6,utf8_decode(trim($row[\"nombre_est\"])),\"LR\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[2],6,utf8_decode(trim($row[\"reporte_z\"])),\"LR\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[3],6,formatofecha(trim($row[\"fecha_cierre\"])),\"LR\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[4],6,utf8_decode(trim($row[\"hora_cierre\"])),\"LR\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[5],6,number_format(trim($row[\"monto_total\"])+0+0, 2, ',', '.'),\"LR\",0,\"R\",$fill);\n\t\t\t$this->Cell($w[6],6,utf8_decode(trim($row[\"obser_cierre\"])),\"1\",0,\"J\",$fill);\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$fill=!$fill;\n\t\t\t$cont++;\n\t\t}\n\t\t$this->SetX(15);\n\t\t$this->Cell(array_sum($w),5,'','T');\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t$this->Ln(10);\n\t\t\n\t\t\n\t//\t$this->AddPage('L','letter');\n\t\t$this->SetFont('Arial','BIU',9);\n\t\t\t\n\t\t\n\t\t$this->SetX(15);\n\t\t$this->Cell(40,6,strtoupper(_('detalles de los puntos de cobros')),\"0\",0,\"L\");\n\t\t$this->Ln();\n\t\t\n\t\t$this->SetFillColor(244,249,255);\n\t\t$this->SetDrawColor(225,240,255);\n\t\t$this->SetLineWidth(.2);\n\t\t//dimenciones de cada campo\n\t\t$w=array(10,50,50,40,25,25,25,25);\n\t\t$header=array(strtoupper(_('nro')),strtoupper(_('caja')),strtoupper(_('cobrador')),strtoupper(_('estacion de trabajo')),strtoupper(_('fecha')),strtoupper(_('hora a.')),strtoupper(_('hora c.')),strtoupper(_('total')));\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->SetX(15);\n\t\tfor($k=0;$k<count($header);$k++)\n\t\t\t$this->Cell($w[$k],7,$header[$k],1,0,'J',1);\n\t\t$this->Ln();\n\t\t\n\t\t\n\t//\t$w=$this->TituloCampos();\n\t\t\n\t\t$acceso->objeto->ejecutarSql(\"SELECT *FROM vista_caja where fecha_caja between '$desde' and '$hasta' and status_caja_cob='CERRADA'\");\n\n\t\t$this->SetFont('Arial','',9);\n\t\t$cont=1;\n\t\t$this->SetFillColor(249,249,249);\n\t\t$this->SetTextColor(0);\n\t\twhile ($row=row($acceso))\n\t\t{\n\t\t\t$this->SetX(15);\n\t\t\t$this->Cell($w[0],6,$cont,\"LR\",0,\"C\",$fill);\n\t\t\t$this->Cell($w[1],6,substr(utf8_decode(trim($row[_(\"nombre_caja\")])),0,19),\"LR\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[2],6,substr(utf8_decode(trim($row[_(\"nombre\")]).\" \".trim($row[\"apellido\"])),0,25),\"LR\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[3],6,substr(utf8_decode(trim($row[_(\"nombre_est\")])),0,19),\"LR\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[4],6,formatofecha(trim($row[_(\"fecha_caja\")])),\"LR\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[5],6,utf8_decode(trim($row[_(\"apertura_caja\")])),\"LR\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[6],6,utf8_decode(trim($row[_(\"cierre_caja\")])),\"LR\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[7],6,number_format(trim($row[_(\"monto_acum\")])+0+0, 2, ',', '.'),\"LR\",0,\"R\",$fill);\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$fill=!$fill;\n\t\t\t$cont++;\n\t\t}\n\t\t$this->SetX(15);\n\t\t$this->Cell(array_sum($w),5,'','T');\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "3ea0198e44ac4cb94434876cfe2b417d", "score": "0.5704836", "text": "function clasificadoresProd()\n\t{\n\t\trequire('views/configuracion/clasificadores_prod.php');\n\t}", "title": "" }, { "docid": "2df6933b03519c197d703bd1a06ea0de", "score": "0.5702492", "text": "private function invitar_cena() {\n }", "title": "" }, { "docid": "20c38e5933c461fb292147c3a33a00c6", "score": "0.56946015", "text": "function getDatosCentroCostoCompleto() {\n parent::ConnectionOpen(\"pnsSeleccionaDatosCentroCostos\", \"dbweb\");\n parent::SetParameterSP(\"pOpc\", '6');\n parent::SetParameterSP(\"pCod\", '');\n parent::SetParameterSP(\"pId\", '');\n parent::SetSelect(\"*\");\n $resultadoArray = parent::executeSPArrayX();\n parent::ConnectionClose();\n return $resultadoArray;\n }", "title": "" }, { "docid": "392140c27318fc544dd48d1d3300bdfe", "score": "0.56767946", "text": "public function calcula13o()\n {\n }", "title": "" }, { "docid": "392140c27318fc544dd48d1d3300bdfe", "score": "0.56767946", "text": "public function calcula13o()\n {\n }", "title": "" }, { "docid": "4d8969fa629014805e5e848779091f38", "score": "0.56629795", "text": "function cost_calculator_activate() {\n}", "title": "" }, { "docid": "e5564a9a3e68e8f8c329b1da4ddb790a", "score": "0.5651054", "text": "public function Paciente()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "c961c26e6747dada41c1ccc9e5b0a8e9", "score": "0.5641481", "text": "function opcion__info()\n\t{\n\t\t$i = $this->get_instancia();\n\t\t$param = $this->get_parametros();\n\t\t$this->consola->titulo( 'INSTANCIA: ' . $i->get_id() );\n\t\tif ( isset( $param['-u'] ) ) {\n\t\t\t// Lista de USUARIOS\n\t\t\t$this->consola->subtitulo('Listado de USUARIOS');\n\t\t\t$this->consola->tabla( $i->get_lista_usuarios(), array( 'Usuario', 'Nombre') );\n\t\t} else {\n\t\t\t// Informacion BASICA\n\t\t\t$this->consola->subtitulo('Informacion BASICA');\n\t\t\t//VERSION\n\t\t\t$this->consola->lista(array($i->get_version_actual()->__toString()), \"VERSION\");\n\t\t\t$this->consola->lista_asociativa( $i->get_parametros_db() , array('Parametros Conexion', 'Valores') );\n\t\t\t$this->consola->lista( $i->get_lista_proyectos_vinculados(), 'Proyectos Vinculados' );\n\t\t\t$this->consola->enter();\n\t\t\t$this->consola->subtitulo('Reportes');\n\t\t\t$subopciones = array( '-u' => 'Listado de usuarios' ) ;\n\t\t\t$this->consola->coleccion( $subopciones );\n\t\t}\n\t}", "title": "" }, { "docid": "2e846e481b020ffc0daaf91c2fd08179", "score": "0.56399024", "text": "private function writeDescricao() {\r\n\t\t\r\n\t\t$tabRelatorio = new RelatorioFinal();\r\n\t\t$this->relatorio = $tabRelatorio->fetchRow('id='.$this->projeto->idRelatorioFinal);\r\n\t\t$tabParceiro = new Parceiro();\r\n\t\t$parceiros = $tabParceiro->fetchParceirosByProjeto($this->projeto->id);\r\n\r\n\t\t$this->SetFont('vera', 'B', 11);\r\n\t\t$position = $this->increasePosition();\r\n\t\t$this->Cell(self::BLOCK_SIZE, 5, $position . '. DESCRIÇÃO', 'LTR', 1);\r\n\t\t$this->Cell(self::BLOCK_SIZE, 4, '', 'LR', 1);\r\n\t\t$this->SetFont('vera','B', 10);\r\n\t\t$this->Cell(self::BLOCK_SIZE, 5, 'Articulação com o ensino', 'LTR', 1);\r\n\t\t$this->SetFont('vera','',10);\r\n\t\t$this->Cell(self::BLOCK_SIZE, 5, 'Disciplinas: '.$this->relatorio->disciplinas,'LR',1);\r\n\t\t$this->Cell(self::BLOCK_SIZE, 5, 'Estágio: '.$this->relatorio->estagio,'LR',1);\r\n\t\t$this->Cell(self::BLOCK_SIZE,5,'Crédito (flexibilização curricular): '.$this->relatorio->creditos,'LR',1);\r\n\t\t$this->SetFont('vera','B', 10);\r\n\t\t$this->Cell(self::BLOCK_SIZE, 5, 'Articulação com a pesquisa', 'LTR', 1);\r\n\t\t$this->SetFont('vera','',10);\r\n\t\t$this->Cell(self::BLOCK_SIZE,5,'Projeto: '.$this->relatorio->projeto,'LR',1);\r\n\t\t$this->SetFont('vera','B', 10);\r\n\t\t$this->Cell(self::BLOCK_SIZE, 5, 'Total de pessoas da equipe de trabalho envolvidas na execução', 'LTR', 1);\r\n\t\t$this->SetFont('vera','',10);\r\n\t\t$this->Cell(self::BLOCK_SIZE,5,'Docentes: '.$this->relatorio->docentesEnvolvidos,'LR',1);\r\n\t\t$this->SetFont('vera','B', 10);\r\n\t\t$this->Cell(self::BLOCK_SIZE,5,'Alunos da Graduação','LTR',1);\r\n\t\t$this->SetFont('vera','', 10);\r\n\t\t$this->Cell(self::BLOCK_SIZE,5,'Bolsistas: '.$this->relatorio->alunosGraduacaoBolsistasEnvolvidos,'LR',1);\r\n\t\t$this->Cell(self::BLOCK_SIZE,5,'Não - Bolsistas: '.$this->relatorio->alunosGraduacaoNaoBolsistasEnvolvidos,'LBR',1);\r\n\t\t$this->Cell(self::BLOCK_SIZE,5,'Alunos Pós-Graduação: '.$this->relatorio->alunosPosGraduacaoEnvolvidos,'LR',1);\r\n\t\t$this->Cell(self::BLOCK_SIZE,5,'Técnicos Administrativos: '.$this->relatorio->tecnicosAdministrativosEnvolvidos,'LR',1);\r\n\t\t$this->Cell(self::BLOCK_SIZE,5,'De outras IES ou orgãos: '.$this->relatorio->pessoasOutrasIESEnvolvidas,'LR',1);\r\n\t\t$this->Cell(self::BLOCK_SIZE,5,'Da comunidade externa: '.$this->relatorio->pessoasComunidadeEnvolvidas,'LR',1);\r\n\t\t$this->Cell(self::BLOCK_SIZE,5,'Público atingido: '.$this->relatorio->publicoAtingido,'LR',1);\r\n\t\t$this->SetFont('vera','B', 10);\r\n\t\tif(count($parceiros) > 0){\r\n\t\t$this->Cell(self::BLOCK_SIZE,5,'Ariculação Externa (Parceiros Externos)','LTR',1);\r\n\t\t$this->SetFont('vera','', 10);\r\n\t\t\t\r\n\t\t\tforeach ($parceiros as $parceiro) {\r\n\t\t\t\t$this->Cell(self::BLOCK_SIZE,5,$parceiro->nomeInstituicao,'LR',1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->Cell(self::BLOCK_SIZE,5,'Número de atendimentos por semana','LTR',1);\r\n\t\t$this->SetFont('vera','', 10);\r\n\t\t$this->Cell(self::BLOCK_SIZE,5,'Individuais: '.$this->relatorio->atendimentosSemanaisIndividuais,'LR',1);\r\n\t\t$this->Cell(self::BLOCK_SIZE,5,'Grupo: '.$this->relatorio->atendimentosSemanaisGrupo,'LR',1);\r\n\t\t$this->Cell(self::BLOCK_SIZE, 4, '', 'LBR', 1);\r\n\t\t$this->SetY($this->GetY() + 4);\r\n\t\t$this->AddPage();\r\n\t\t$position = $this->increasePosition();\r\n\t\t$this->SetFont('vera', 'B', 11);\r\n\t\t$this->Cell(self::BLOCK_SIZE, 5, $position . '. MONITORAMENTO DA PRODUÇÃO', 'LTR', 1);\r\n\t\t$this->Cell(self::BLOCK_SIZE, 4, '', 'LR', 1);\r\n\t\t$this->SetFont('vera', 11);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Livro: '.$this->relatorio->producaoLivros,'LTRB',0);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Comunicação: '.$this->relatorio->producaoComunicacao,'LTRB',0);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Programa de Rádio: '.$this->relatorio->producaoProgramasRadio,'LTRB',1);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Capítulo de Livro: '.$this->relatorio->producaoCapitulosLivros,'LTRB',0);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Relatório Técnico: '.$this->relatorio->producaoRelatoriosTecnicos,'LTRB',0);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Programas de TV: '.$this->relatorio->producaoProgramasTV,'LTRB',1);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Anais: '.$this->relatorio->producaoAnais,'LTRB',0);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Produto Audiovisual - Filme: '.$this->relatorio->producaoAudiovisualFilme,'LTRB',0);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Aplicativo para computador: '.$this->relatorio->producaoAplicativosComputador,'LTRB',1);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Manual: '.$this->relatorio->producaoManuais,'LTRB',0);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Produto Audiovisual - Vídeo: '.$this->relatorio->producaoAudiovisualVideos,'LTRB',0);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Jogo Educativo: '.$this->relatorio->producaoJogosEducativos,'LTRB',1);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Jornal: '.$this->relatorio->producaoJornais,'LTRB',0);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Produto Audiovisual - CD: '.$this->relatorio->producaoAudiovisualCDs,'LTRB',0);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Produto Artístico: '.$this->relatorio->producaoProdutosArtisticos,'LTRB',1);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Revista: '.$this->relatorio->producaoRevistas,'LTRB',0);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Produto Audiovisual - DVD: '.$this->relatorio->producaoAudiovisualDVDs,'LTRB',0);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Artigo: '.$this->relatorio->producaoArtigos,'LTRB',1);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Produto Audiovisual - Outros: '.$this->relatorio->producaoAudiovisualOutros,'LTRB',0);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,'Outros: '.$this->relatorio->producaoOutros,'LTB',0);\r\n\t\t$this->Cell((self::BLOCK_SIZE/3),5,$this->relatorio->producaoOutrosTexto,'LTRB',1);\r\n\t\t$this->Cell(self::BLOCK_SIZE,5,'Detalhamento da Produção: ','LTR',1);\r\n\t\t$this->SetFont('vera','',11);\r\n\t\t$this->MultiCell(self::BLOCK_SIZE,1,$this->relatorio->producaoDetalhamento,'LRB','L');\r\n\t\t$this->SetFont('vera','B',11);\r\n\t\t$this->Cell(self::BLOCK_SIZE,5,\"Relatório Final: \",'LR',1);\r\n\t\t$this->SetFont('vera','',11);\r\n\t\t$this->MultiCell(self::BLOCK_SIZE,1,$this->relatorio->relatorioFinal,'LRB','L');\r\n\t\t$this->Cell(self::BLOCK_SIZE, 6, '', '', 1);\r\n\t\r\n\t}", "title": "" }, { "docid": "003fa92cbb8a3ff54f620cb2e3b92c0f", "score": "0.5638763", "text": "public function aplicaCupon() {\n $cupon = $_SESSION['cupon'];\n if (($cupon['Id'] > 0) && ($this->getTotalBases() >= $cupon['ImporteMinimo'])) {\n switch ($cupon['AplicaA']) {\n case '0': //Gastos Envio\n if ($cupon['Tipo'] === 0) {\n //Porcentaje\n $valor = $this->getGastosEnvio() * (1 - $cupon['Valor'] / 100);\n } else {\n //Importe Neto\n $valor = $this->getGastosEnvio() - $cupon['Valor'];\n if ($valor < 0) {\n $valor = 0;\n }\n }\n $this->setGastosEnvio($valor);\n break;\n case '1': //Base imponible\n if ($cupon['Tipo'] === 0) {\n //Porcentaje\n $valor = $this->getImporte() * (1 - $cupon['Valor'] / 100);\n } else {\n //Importe Neto\n if ($cupon['Valor'] > $this->getImporte()) {\n $valor = $this->getImporte();\n } else {\n $valor = $cupon['Valor'];\n }\n }\n $this->setDescuento($valor);\n break;\n }\n //echo $cupon['AplicaA'],\"-----\",$this->getDescuento();exit;\n $this->recalcula();\n $this->setIDCupon($_SESSION['cupon']['Id']);\n $this->save();\n }\n }", "title": "" }, { "docid": "3cc29c5caca813530916a20d7bf99d55", "score": "0.5638521", "text": "function Cuerpo($acceso,$desde,$hasta,$tipo,$id_f)\n\t{\n\t\t$tipo=utf8_decode($tipo);\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"Tipo: $tipo Desde \".formatofecha($desde).\" Hasta \".formatofecha($desde),\"LR\",0,\"C\",$fill);\n\t\t$this->Ln();\n\t\t$acceso1=conexion();\n\t\t$tipo_caja=verCajaPrincipal($acceso);\n\t//\t$w=$this->TituloCampos();\n\t\t\n\t\t$acceso->objeto->ejecutarSql(\"SELECT *FROM parametros where id_param='2'\");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$por_iva=trim($row['valor_param']);\n\t\t}\n\t\t\n\t\t$this->SetFillColor(244,249,255);\n\t\t$this->SetDrawColor(225,240,255);\n\t\t$this->SetLineWidth(.2);\n\t\t\n\t\t$w=array(20);\n\t\t$total_f=array();\n\t\t$total_t=array();\n\t\t$header=array('Fecha');\n\t\t$tama=20;\n\t\t$tama_c=8;\n\t\t$i=1;\n\t\t/*\n\t\t$acceso1->objeto->ejecutarSql(\"SELECT nombre_servicio,tipo_costo FROM servicios where status_serv='ACTIVO' ORDER BY tipo_costo\");\n\t\twhile($row=row($acceso1)){\n\t\t\t$nombre_servicio=substr(trim($row['nombre_servicio']),0,10);\n\t\t\t$tipo_costo=trim($row['tipo_costo']);\n\t\t\t$w[$i]=$tama;\n\t\t\t$header[$i]=$nombre_servicio;\n\t\t\t$i++;\n\t\t\t$w[$i]=$tama_c;\n\t\t\t$header[$i]=\"Cant\";\n\t\t\t$i++;\n\t\t\t\n\t\t\t/*\n\t\t\tif($tipo_costo==\"COSTO MENSUAL\"){\n\t\t\t\t$w[$i]=$tama_c;\n\t\t\t\t$header[$i]=\"CANT\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t*/\n\t\t}", "title": "" }, { "docid": "4e28371e5eed0a909fb567a077ff7f0e", "score": "0.56364155", "text": "public function testeCadastroDeProduto()\r\n { \r\n $this->controller->cadastrarProduto(\"TV de Plasma\", \"Eletrônicos\", \"1.100,00\",\r\n \"HHHHSSSS\",\"Televisor semi-novo, 2 meses de uso\", \"1\",\"2\");\r\n }", "title": "" }, { "docid": "0f68c388c6564d941b2ce9e3c33f2613", "score": "0.56222034", "text": "function co_calculator_cm($CRP, $PLA) {\n\t//Plazo en meses\n\t$PLM = $PLA * 12;\n\t//Cotización Inicial en UVR (UVR)\n\t$UVR = variable_get('co_simulator_variable_uvr');//UVR del Banco de la Republica (www.banrep.gov.co)\n\t//Crédito en UVR (CRU)\n\t$CRU = $CRP / $UVR;\n\t//Tasa efectiva anual\n\t$TEA = variable_get('co_simulator_variable_cm_tea');//Parametrizable por el administrador\n\t//Tasa mensual vencida - ((1+[TEA])^(1/12))-1\n\t$TMV = (pow((1+($TEA/100)),(1/12))-1); \n\t//Inflación Esperada Anual (IEA)\n\t$IEA = variable_get('co_simulator_variable_cm_iea');//Parametrizable por administrador\n\t//Inflación Mensual Vencido (IEV) - ((1+D12)^(1/12))-1\n\t$IEV = (pow((1+($IEA) / 100), (1/12))-1)*100;\n\t//Cerrar Crédito si falta # UVR\n\t$CCSFU = variable_get('co_simulator_variable_cm_ccsfp');//Parametrizable por administrador\n\t$proyeccion = array();\n\t$proyeccion_format = array();\n\t//Cuota No 0\n\t$proyeccion[] = array(\n\t\t'uvr_cuota' => 0,\n\t\t'uvr_intereses_corrientes' => 0,\n\t\t'uvr_abono_capital' => 0,\n\t\t'uvr_saldo' => ($CRP/$UVR),\n\t\t'pesos_cuota' => 0,\n\t\t'pesos_interes_corriente' => 0,\n\t\t'pesos_abono_capital' => 0,\n\t\t'pesos_saldo' => $CRP,\n\t\t'pesos_cotizacion' => $UVR,\n\t);\n\t$proyeccion_format = co_calculator_cm_format($proyeccion, $proyeccion_format, 0);\n\t$pesos_saldo = $CRP;\n\t//Condición para cerrar credito\n\twhile ($pesos_saldo >= $CCSFU) {\n\t\t$key = count($proyeccion)-1;\n\t\t//Declaración de variables\n\t\t$uvr_cuota = 0;\n\t\t$uvr_intereses_corrientes = 0;\n\t\t$uvr_abono_capital = 0;\n\t\t$uvr_saldo = 0;\n\t\t$pesos_cuota = 0;\n\t\t$pesos_interes_corriente = 0;\n\t\t$pesos_abono_capital = 0;\n\t\t$pesos_saldo = 0;\n\t\t$pesos_cotizacion = 0;\n\t\t\n\t\tif ($proyeccion[$key]['uvr_saldo'] > $CCSFU) {\n\t\t\t//Cotización - IF(G23>$D$14,$L$23*(1+$D$12)^C24,0)\n\t\t\t$pesos_cotizacion = $proyeccion[0]['pesos_cotizacion']*pow((1+($IEV/100)), ($key+1));\n\t\t\t//Abono a capital - IF(G23>$D$14,$D$8/$D$6,0)\n\t\t\t$uvr_abono_capital = $CRU/$PLM;\n\t\t\t//UVR Saldo - IF(G23>$D$14,G23-F24,0)\n\t\t\t$uvr_saldo = $proyeccion[$key]['uvr_saldo'] - $uvr_abono_capital;\n\t\t}\n\t\t//Solo para la cuota No 1\n\t\tif ($key == 0) {\n\t\t\t//Interes corriente\n\t\t\t$uvr_intereses_corrientes = $CRU * $TMV;\n\t\t\t//UVR Valor cuota\n\t\t\t$uvr_cuota = $uvr_intereses_corrientes + $uvr_abono_capital;\n\t\t\t//Pesos Valor cuota\n\t\t\t$pesos_cuota = $uvr_cuota * $pesos_cotizacion;\n\t\t\t//Pesos Interes corriente\n\t\t\t$pesos_interes_corriente = $uvr_intereses_corrientes * $proyeccion[$key]['pesos_cotizacion'];\n\t\t\t//Pesos Abono a capital\n\t\t\t$pesos_abono_capital = $uvr_abono_capital * $proyeccion[$key]['pesos_cotizacion'];\n\t\t\t//Pesos Saldo\n\t\t\t$pesos_saldo = $uvr_saldo * $proyeccion[$key]['pesos_cotizacion'];\n\t\t} else {\n\t\t\t//Interes corriente\n\t\t\t$uvr_intereses_corrientes = $proyeccion[$key]['uvr_saldo'] * $TMV;\n\t\t\t//UVR Valor cuota\n\t\t\t$uvr_cuota = $uvr_intereses_corrientes + $uvr_abono_capital;\n\t\t\t//Pesos Valor cuota\n\t\t\t$pesos_cuota = $uvr_cuota * $pesos_cotizacion;\n\t\t\t//Pesos Interes corriente\n\t\t\t$pesos_interes_corriente = $uvr_intereses_corrientes * $pesos_cotizacion;\n\t\t\t//Pesos Abono a capital\n\t\t\t$pesos_abono_capital = $uvr_abono_capital * $pesos_cotizacion;\n\t\t\t//Pesos Saldo\n\t\t\t$pesos_saldo = $uvr_saldo * $pesos_cotizacion;\n\t\t}\n\t\t$proyeccion[] = array(\n\t\t\t'uvr_cuota' => $uvr_cuota,\n\t\t\t'uvr_intereses_corrientes' => $uvr_intereses_corrientes,\n\t\t\t'uvr_abono_capital' => $uvr_abono_capital,\n\t\t\t'uvr_saldo' => $uvr_saldo,\n\t\t\t'pesos_cuota' => $pesos_cuota,\n\t\t\t'pesos_interes_corriente' => $pesos_interes_corriente,\n\t\t\t'pesos_abono_capital' => $pesos_abono_capital,\n\t\t\t'pesos_saldo' => $pesos_saldo,\n\t\t\t'pesos_cotizacion' => $pesos_cotizacion,\n\t\t);\n\t\t$proyeccion_format = co_calculator_cm_format($proyeccion, $proyeccion_format, $key+1);\n\t}\n\t//Información para el usuario\n\t$IMLM = (ceil((($proyeccion[1]['pesos_cuota']/0.3)/1000))*1000);\n\t//Conditions\n\t$row_conditions = array();\n\t$row_conditions[] = array(t('Crédito en pesos (CRP)'), '$ '.number_format(round($CRP, 0), 0, '.', ','),);\n\t$row_conditions[] = array(t('Plazo en años (PLA)'), $PLA,);\n\t$row_conditions[] = array(t('Plazo en meses (PLM)'), $PLM,);\n\t$row_conditions[] = array(t('Cotización Inicial en UVR (UVR)'), '$ '.round($UVR, 4),);\n\t$row_conditions[] = array(t('Crédito en UVR (CRU)'), number_format($CRU, 0, '.', ','),);\n\t$row_conditions[] = array(t('Tasa Efectiva Anual (TEA)'), $TEA .'%',);\n\t$row_conditions[] = array(t('Tasa Mensual Vencido (TMV)'), round($TMV, 6),);\n\t$row_conditions[] = array(t('Inflación Esperada Anual (IEA)'), $IEA.'%',);\n\t$row_conditions[] = array(t('Inflación Mensual Vencido (IEV)'), round($IEV, 5).'%',);\n\t$row_conditions[] = array(t('Ingresos Minímos Libres Mes'), '$ '.number_format($IMLM, 0, '.', ','),);\n\t$row_conditions[] = array(t('Cerrar Crédito si falta # UVR'), $CCSFU,);\n\treturn array('data' => $proyeccion_format, 'data_conditions' => $row_conditions, 'IMLM' => $IMLM);\n}", "title": "" }, { "docid": "7f9b7cb68e0157edb6b4730fd53baab9", "score": "0.56080943", "text": "public function run()\n {\n $productos=[\n \"Aceite comestibles\",\n \"Aderezos\",\n \"Consome\",\n \"Crema de cacahuate\",\n \"Crema para café\",\n \"Pure de tomate\",\n \"Alimento para bebe\",\n \"Alimento para mascotas\",\n \"Atole\",\n \"Avena\",\n \"Azúcar\",\n \"Café\",\n \"Cereales\",\n \"Chile piquín\",\n \"Especias\",\n \"Flan en polvo\",\n \"Formulas infantiles\",\n \"Gelatinas en polvo/Grenetina\",\n \"Harina\",\n \"Harina preparada\",\n \"Mole\",\n \"Sal\",\n \"Salsas envasadas\",\n \"Sazonadores\",\n \"Sopas en sobre\",\n \"Cajeta\",\n \"Catsup\",\n \"Mayonesa\",\n \"Mermelada\",\n \"Miel\",\n \"Te\",\n \"Vinagre\",\n \"Huevo\",\n \"Pastas\",\n \"Aceitunas\",\n \"Champiñones enteros/rebanados\",\n \"Chícharo con zanahoria\",\n \"Chícharos enlatados\",\n \"Frijoles enlatados\",\n \"Frutas en almíbar\",\n \"Sardinas\",\n \"Atún en agua/aceite\",\n \"Chiles enlatados\",\n \"Chiles envasados\",\n \"Ensaladas enlatadas\",\n \"Granos de elote enlatados\",\n \"Sopa en lata\",\n \"Vegetales en conserva\",\n \"Leche condesada\",\n \"Leche deslactosada\",\n \"Leche en polvo\",\n \"Leche evaporada\",\n \"Leche light\",\n \"Leche pasteurizada\",\n \"Leche saborizada\",\n \"Leche semidescremada\",\n \"Crema\",\n \"Yoghurt\",\n \"Mantequilla\",\n \"Margarina\",\n \"Media crema\",\n \"Queso\",\n \"Papa\",\n \"Palomitas\",\n \"Frituras de maíz\",\n \"Cacahuates\",\n \"Botanas saladas\",\n \"Barras alimenticias\",\n \"Nueces y semillas\",\n \"Caramelos\",\n \"Dulces enchilados\",\n \"Chocolate de mesa\",\n \"Chocolate en polvo\",\n \"Chocolates\",\n \"Gomas de mascar\",\n \"Mazapán\",\n \"Malvaviscos\",\n \"Pulpa de tamarindo\",\n \"Pastillas de dulce\",\n \"Paletas de dulce\",\n \"Tortillas de harina/maíz\",\n \"Galletas dulces\",\n \"Galletas saladas\",\n \"Pastelillos\",\n \"Pan de caja\",\n \"Pan dulce\",\n \"Pan molido\",\n \"Pan tostado\",\n \"Aguacates\",\n \"Ajos\",\n \"Cebollas\",\n \"Chiles\",\n \"Cilantro/Perejil\",\n \"Jitomate\",\n \"Papas\",\n \"Limones\",\n \"Manzanas\",\n \"Naranjas\",\n \"Plátanos\",\n \"Agua mineral\",\n \"Agua natural\",\n \"Agua saborizada\",\n \"Jarabes\",\n \"Jugos/Néctares\",\n \"Naranjadas\",\n \"Bebidas de soya\",\n \"Bebidas en polvo\",\n \"Bebidas infantiles\",\n \"Bebidas isotónicas\",\n \"Energetizantes\",\n \"Isotónicos\",\n \"Refrescos\",\n \"Bebidas preparadas\",\n \"Cerveza\",\n \"Anís\",\n \"Brandy\",\n \"Ginebra\",\n \"Cordiales\",\n \"Mezcal\",\n \"Jerez\",\n \"Ron\",\n \"Tequila\",\n \"Sidra\",\n \"Whiskey\",\n \"Vodka\",\n \"Pastas listas para comer\",\n \"Sopas en vaso\",\n \"Carnes y Embudos\",\n \"Salchicha\",\n \"Mortadela\",\n \"Tocino\",\n \"Jamón\",\n \"Manteca\",\n \"Chorizo\",\n \"Carne de puerco/res/pollo\",\n \"Suero\",\n \"Agua oxigenada\",\n \"Preservativos\",\n \"Alcohol\",\n \"Gasas\",\n \"Analgésicos\",\n \"Antigripales\",\n \"Antiácidos\",\n \"Toallas húmedas\",\n \"Aceite para bebe\",\n \"Toallas femeninas\",\n \"Algodón\",\n \"Tinte para el cabello\",\n \"Biberones\",\n \"Talco\",\n \"Cepillo de dientes\",\n \"Shampoo/ Acondicionador\",\n \"Cotonetes\",\n \"Rastrillos\",\n \"Crema corporal/facial\",\n \"Papel higiénico\",\n \"Crema para afeitar\",\n \"Pañuelos faciales\",\n \"Dentífricos\",\n \"Pañuelos desechables\",\n \"Desodorantes en barra/aerosol\",\n \"Maquillaje\",\n \"Enjuague bucal\",\n \"Lubricantes para labios\",\n \"Gel/spray\",\n \"Loción hidratante\",\n \"Jabones corporales/tocados\",\n \"Suavizante de telas\",\n \"Ácido muriático\",\n \"Sosa caustica\",\n \"Aluminio\",\n \"Pilas\",\n \"Shampoo para ropa\",\n \"Servilletas\",\n \"Servitoallas\",\n \"Aromatizantes\",\n \"Cera para automóvil\",\n \"Cera para calzados\",\n \"Pastillas sanitarias\",\n \"Limpiadores líquidos\",\n \"Limpiadores para pisos\",\n \"Jabón de barra\",\n \"Cerillos\",\n \"Cloro/Blanqueador\",\n \"Cloro para ropa\",\n \"Jabón en barra\",\n \"Insecticidas\",\n \"Fibras limpiadoras\",\n \"Desinfectantes\",\n \"Detergentes para trastes\",\n \"Detergente para ropa\",\n \"Paletas/ Helados\",\n \"Veladoras/Velas\",\n \"Cepillo de plástico\",\n \"Vasos desechables\",\n \"Cinta adhesiva\",\n \"Cucharas de plástico\",\n \"Escobas/Trapeadores/Mechudos\",\n \"Trampas para ratas\",\n \"Tenedores de plásticoa\",\n \"Extensiones/Multicontacto\",\n \"Recogedor de metal/plástico\",\n \"Popotes\",\n \"Platos desechables\",\n \"Focos\",\n \"Fusibles\",\n \"Jergas/Franelas\",\n \"Matamoscas\",\n \"Pegamento\",\n \"Mecate/cuerda\",\n \"Tarjetas telefónicas\",\n \"Recargas móviles\",\n \"Hielo\",\n \"Cigarros\"\n ];\n $faker = Faker\\Factory::create();\n\n foreach ($productos as $producto){\n $productoModel = new Producto();\n $productoModel->nombre = $producto;\n $productoModel->descripcion = $producto;\n $productoModel->imagen = $faker->imageUrl(640,480,$producto);\n $productoModel->id_producto_estado = 1;\n $productoModel->save();\n }\n }", "title": "" }, { "docid": "f7232afcb62341a02901de00765ead89", "score": "0.5607736", "text": "function Coche(){\n\n $this->ruedas=4; /*this es lo mismo que poner coche, hace referencia a eso*/\n $this->color=\"\";\n $this->motor=1600; \n\n\n }", "title": "" }, { "docid": "4497a623f5b7b75fa380cf35dfc1c92d", "score": "0.5596162", "text": "function TituloCampos()\n\t{\n\t\t$this->Ln();\n\t\t$this->SetFillColor(244,249,255);\n\t\t$this->SetDrawColor(225,240,255);\n\t\t$this->SetLineWidth(.2);\n\t\t//dimensiones de cada campo\n\t\t$w=array(30,70,40,40);\n\t\t$header=array(strtoupper(_('Referencia')),strtoupper(_('Material')),strtoupper(_('Stock Almacén')),strtoupper(_('Stock Real')));\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->SetX(15);\n\t\tfor($k=0;$k<count($header);$k++)\n\t\t\t$this->Cell($w[$k],5,$header[$k],1,0,'C',1);\n\t\t$this->Ln();\n\t\treturn $w;\n\t}", "title": "" }, { "docid": "b71bb561542c9e379c419e1c6a693885", "score": "0.558814", "text": "function ObtenerCompetencia(&$rango, $nombreCompetencia,$texto)\r\n{\r\n\tif($rango->PoseeCompetencia($nombreCompetencia))\r\n\t$resultado='<br><font color=\"lime\">'.GetString('Puedes').'</font>';\r\n\telse\r\n\t$resultado='<br><font color=\"red\">'.GetString('No puedes').'</font>';\r\n\r\n\treturn $resultado.' '.$texto;\r\n}", "title": "" }, { "docid": "d6a863221dd937a6146204b2cb9fe64d", "score": "0.5581652", "text": "function TituloCampos()\n\t{\n\t\t\n\t\t$this->SetFillColor(244,249,255);\n\t\t$this->SetDrawColor(225,240,255);\n\t\t$this->SetLineWidth(.2);\n\t\t//dimenciones de cada campo\n\t\t$w=array(10,20,20,60,20,20,34);\n\t\t$header=array(strtoupper(_('nro')),strtoupper(_('contrato')),strtoupper(_('cedula')),strtoupper(_('cliente')),strtoupper(_('fecha')),strtoupper(_('costo')),strtoupper(_('status')));\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->SetX(15);\n\t\tfor($k=0;$k<count($header);$k++)\n\t\t\t$this->Cell($w[$k],7,$header[$k],1,0,'C',1);\n\t\t$this->Ln();\n\t\treturn $w;\n\t}", "title": "" }, { "docid": "9df2ae89fc9bf9a84a37f1da87bb3932", "score": "0.558001", "text": "function BuscaPrograma() {\r\n extract($GLOBALS);\r\n $w_nome = upper($_REQUEST['w_nome']);\r\n $w_ano = $_REQUEST['w_ano'];\r\n $ChaveAux = $_REQUEST['ChaveAux'];\r\n $restricao = $_REQUEST['restricao'];\r\n $campo = $_REQUEST['campo'];\r\n if($restricao=='RELATORIO') $restricao = '';\r\n $sql = new db_getProgramaPPA_IS; $RS = $sql->getInstanceOf($dbms,$ChaveAux,$w_cliente,$w_ano,$restricao,$w_nome,null,null);\r\n $RS = SortArray($RS,'ds_programa','asc');\r\n Cabecalho();\r\n ShowHTML('<TITLE>Seleção de programas do PPA</TITLE>');\r\n head();\r\n Estrutura_CSS(w_cliente);\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' function volta(l_chave) {');\r\n ShowHTML(' opener.document.Form.'.$campo.'.value=l_chave;');\r\n ShowHTML(' opener.document.Form.'.$campo.'.focus();');\r\n ShowHTML(' window.close();');\r\n ShowHTML(' opener.focus();');\r\n ShowHTML(' }');\r\n ValidateOpen('Validacao');\r\n Validate('w_nome','Nome','1','','4','100','1','1');\r\n Validate('ChaveAux','Código','1','','4','4','1','1');\r\n ShowHTML(' if (theForm.w_nome.value == \\'\\' && theForm.ChaveAux.value == \\'\\') {');\r\n ShowHTML(' alert (\\'Informe um valor para o nome ou para o código!\\');');\r\n ShowHTML(' theForm.w_nome.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n ShowHTML(' theForm.Botao[0].disabled=true;');\r\n ShowHTML(' theForm.Botao[1].disabled=true;');\r\n ValidateClose();\r\n ScriptClose();\r\n ShowHTML('</HEAD>');\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n BodyOpen('onLoad=\\'document.Form.w_nome.focus()\\';');\r\n Estrutura_Texto_Abre();\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td>');\r\n ShowHTML(' <table width=\"100%\" border=\"0\">');\r\n AbreForm('Form',$w_dir.$w_pagina.'BuscaPrograma','POST','return(Validacao(this))',null,$P1,$P2,$P3,$P4,$TP,$SG,null,null);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_cliente\" value=\"'.$w_cliente.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_ano\" value=\"'.$w_ano.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"restricao\" value=\"'.$restricao.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"campo\" value=\"'.$campo.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_menu\" value=\"'.$w_menu.'\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td><div align=\"justify\"><font size=2><b><ul>Instruções</b>:<li>Informe parte do nome do programa ou o código do programa.<li>Quando a relação for exibida, selecione o programa desejado clicando sobre o link <i>Selecionar</i>.<li>Após informar o nome do programa ou o código do programa, clique sobre o botão <i>Aplicar filtro</i>. Clicando sobre o botão <i>Cancelar</i>, a procura é cancelada.</ul></div>');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td>');\r\n ShowHTML(' <table width=\"100%\" border=\"0\">');\r\n ShowHTML(' <tr><td valign=\"top\"><b>Parte do <U>n</U>ome do programa:<br><INPUT ACCESSKEY=\"N\" '.$w_Disabled.' class=\"sti\" type=\"text\" name=\"w_nome\" size=\"50\" maxlength=\"100\" value=\"'.$w_nome.'\">');\r\n ShowHTML(' <tr><td valign=\"top\"><b><U>C</U>ódigo do programa:<br><INPUT ACCESSKEY=\"S\" '.$w_Disabled.' class=\"sti\" type=\"text\" name=\"ChaveAux\" size=\"5\" maxlength=\"4\" value=\"'.$ChaveAux.'\">');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\" height=\"1\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\">');\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Aplicar filtro\">');\r\n ShowHTML(' <input class=\"stb\" type=\"button\" name=\"Botao\" value=\"Cancelar\" onClick=\"window.close(); opener.focus();\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</form>');\r\n if ($w_nome>'' || $ChaveAux>'') {\r\n ShowHTML('<tr><td align=\"right\"><b>Registros: '.count($RS));\r\n ShowHTML('<tr><td>');\r\n ShowHTML(' <TABLE WIDTH=\"100%\" border=0>');\r\n if (count($RS)<=0) {\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=5 align=\"center\"><b>Não foram encontrados registros.</b></td></tr>');\r\n } else {\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td>');\r\n ShowHTML(' <TABLE class=\"tudo\" WIDTH=\"100%\" bgcolor=\"'.$conTableBgColor.'\" BORDER=\"'.$conTableBorder.'\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\">');\r\n ShowHTML(' <td><b>Código</td>');\r\n ShowHTML(' <td><b>Nome</td>');\r\n ShowHTML(' <td><b>Operações</td>');\r\n ShowHTML(' </tr>');\r\n foreach($RS as $row) {\r\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor;\r\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\r\n ShowHTML(' <td align=\"center\">'.f($row,'cd_programa').'</td>');\r\n ShowHTML(' <td>'.f($row,'ds_programa').'</td>');\r\n ShowHTML(' <td><a class=\"ss\" HREF=\"javascript:this.status.value;\" onClick=\"javascript:volta(\\''.f($row,'cd_programa').'\\');\">Selecionar</a>');\r\n } \r\n ShowHTML(' </table></tr>');\r\n ShowHTML(' </center>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </td>');\r\n ShowHTML('</tr>');\r\n } \r\n } \r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Estrutura_Texto_Fecha();\r\n}", "title": "" }, { "docid": "37bf5ba3360925d458042cc6a3f0446b", "score": "0.5579989", "text": "public function getCargos()\n {\n // Permisos según el tipo de actividad\n $oPermDossier = new dossiers\\PermDossier();\n $this->a_ref_perm = $oPermDossier->perm_pers_activ($this->id_tipo_activ);\n\n // primero el cl:\n // primero los cargos\n $gesAsistentes = new asistentes\\GestorAsistente();\n $c = 0;\n $num = 0;\n $a_valores = array();\n $this->aListaCargos = array();\n $GesCargosEnActividad = new actividadcargos\\GestorActividadCargo();\n $cCargosEnActividad = $GesCargosEnActividad->getActividadCargos(array('id_activ' => $this->id_pau));\n $mi_sfsv = ConfigGlobal::mi_sfsv();\n foreach ($cCargosEnActividad as $oActividadCargo) {\n $c++;\n $num++; // número total de asistentes.\n $id_item_cargo = $oActividadCargo->getId_item();\n $id_nom = $oActividadCargo->getId_nom();\n $this->aListaCargos[] = $id_nom;\n $id_cargo = $oActividadCargo->getId_cargo();\n $oCargo = new actividadcargos\\Cargo(array('id_cargo' => $id_cargo));\n $tipo_cargo = $oCargo->getTipo_cargo();\n // para los sacd en sf\n if ($tipo_cargo == 'sacd' && $mi_sfsv == 2) {\n continue;\n }\n\n $oPersona = personas\\Persona::NewPersona($id_nom);\n if (!is_object($oPersona)) {\n $this->msg_err .= \"<br>\";\n $this->msg_err .= sprintf(_(\"%s con id_nom: %s. En %s linea %s\"), $oPersona, $id_nom, __FILE__, __LINE__);\n continue;\n }\n $oCargo = new actividadcargos\\Cargo($id_cargo);\n\n $nom = $oPersona->getPrefApellidosNombre();\n $nombre = $oPersona->getNom();\n $apellidos = $oPersona->getApellidos();\n $sacd = ($oPersona->getSacd()) ? _(\"sí\") : '';\n // Añado los telf:\n $telfs = '';\n $telfs_fijo = $oPersona->telecos_persona($id_nom, \"telf\", \" / \", \"*\", FALSE);\n $telfs_movil = $oPersona->telecos_persona($id_nom, \"móvil\", \" / \", \"*\", FALSE);\n if (!empty($telfs_fijo) && !empty($telfs_movil)) {\n $telfs = $telfs_fijo . \" / \" . $telfs_movil;\n } else {\n $telfs .= $telfs_fijo ?? '';\n $telfs .= $telfs_movil ?? '';\n }\n $mails = '';\n $mails = $oPersona->telecos_persona($id_nom, \"e-mail\", \" / \", \"*\", FALSE);\n\n $cargo = $oCargo->getCargo();\n $puede_agd = $oActividadCargo->getPuede_agd();\n $observ_cargo = $oActividadCargo->getObserv();\n $dl_asistente = $oPersona->getDl();\n $ctr_dl = $oPersona->getCentro_o_dl();\n // permisos (añado caso de cargo sin nombre = todos permiso)\n if ($id_tabla = $oPersona->getId_tabla()) {\n $a_act = $this->a_ref_perm[$id_tabla];\n if ($a_act[\"perm\"]) {\n $this->permiso = 3;\n } else {\n $this->permiso = 1;\n }\n } else {\n $this->permiso = 3;\n }\n\n // ahora miro si también asiste:\n $plaza = asistentes\\Asistente::PLAZA_PEDIDA;\n $aWhere = array('id_activ' => $this->id_pau, 'id_nom' => $id_nom);\n $aOperador = array('id_activ' => '=', 'id_nom' => '=');\n // me aseguro de que no sea un cargo vacio (sin id_nom)\n if (!empty($id_nom) && $cAsistente = $gesAsistentes->getAsistentes($aWhere, $aOperador)) {\n if (is_array($cAsistente) && count($cAsistente) > 1) {\n $tabla = '';\n foreach ($cAsistente as $Asistente) {\n $tabla .= \"<li>\" . $Asistente->getNomTabla() . \"</li>\";\n }\n $msg_err = _(\"ERROR: más de un asistente con el mismo id_nom\") . \"<br>\";\n $msg_err .= \"<br>$nom(\" . $oPersona->getId_tabla() . \")<br><br>\";\n $msg_err .= _(\"En las tablas\") . \":<ul>$tabla</ul>\";\n exit (\"$msg_err\");\n }\n $oAsistente = $cAsistente[0];\n $propio = $oAsistente->getPropio();\n $falta = $oAsistente->getFalta();\n $est_ok = $oAsistente->getEst_ok();\n $observ = $oAsistente->getObserv();\n $plaza = empty($oAsistente->getPlaza()) ? asistentes\\Asistente::PLAZA_PEDIDA : $oAsistente->getPlaza();\n\n // contar plazas\n if (ConfigGlobal::is_app_installed('actividadplazas')) {\n // las cuento todas y a la hora de enseñar miro si soy la dl org o no.\n // propiedad de la plaza:\n $propietario = $oAsistente->getPropietario();\n $padre = strtok($propietario, '>');\n $child = strtok('>');\n $dl = $child;\n //si es de otra dl no distingo cedidas.\n // no muestro ni cuento las que esten en estado distinto al asignado o confirmado (>3)\n if ($padre != $this->mi_dele) {\n if ($plaza > asistentes\\Asistente::PLAZA_DENEGADA) {\n $this->incrementa($this->a_plazas_resumen[$padre][$dl]['ocupadas'][$plaza]);\n if (!empty($child) && $child != $padre) {\n $this->incrementa($this->a_plazas_conseguidas[$child][$padre]['ocupadas'][$dl][$plaza]);\n }\n } else {\n if (!empty($child) && $child == $this->mi_dele) {\n $this->incrementa($this->a_plazas_conseguidas[$child][$padre]['ocupadas'][$dl][$plaza]);\n } elseif (!empty($padre)) {\n continue;\n }\n }\n } else { // En mi dl distingo las cedidas\n // si no es de (la dl o de paso ) y no tiene la plaza asignada o confirmada no lo muestro\n if ($child != $this->mi_dele) {\n if ($plaza < asistentes\\Asistente::PLAZA_ASIGNADA) {\n continue;\n } else {\n $this->incrementa($this->a_plazas_conseguidas[$child][$padre]['ocupadas'][$dl][$plaza]);\n $this->incrementa($this->a_plazas_resumen[$padre][$dl]['ocupadas'][$plaza]);\n }\n } else {\n $this->incrementa($this->a_plazas_resumen[$padre][$dl]['ocupadas'][$plaza]);\n }\n }\n }\n\n if ($propio == 't') {\n $chk_propio = _(\"sí\");\n // Para los de des, elimino el cargo y la asistencia. Para el resto, sólo el cargo (no la asistencia).\n if (($_SESSION['oPerm']->have_perm_oficina('des')) || ($_SESSION['oPerm']->have_perm_oficina('vcsd'))) {\n $eliminar = 2;\n } else {\n $eliminar = 1;\n }\n } else {\n $chk_propio = _(\"no\");\n $eliminar = 2; //si no es propio, al eliminar el cargo, elimino la asistencia\n }\n $falta == 't' ? $chk_falta = _(\"sí\") : $chk_falta = _(\"no\");\n $est_ok == 't' ? $chk_est_ok = _(\"sí\") : $chk_est_ok = _(\"no\");\n $asis = \"t\";\n\n if ($this->permiso == 3) {\n $a_valores[$c]['sel'] = \"$id_nom#$id_item_cargo#$eliminar\";\n } else {\n $a_valores[$c]['sel'] = \"\";\n }\n $a_valores[$c][4] = $chk_propio;\n $a_valores[$c][5] = $chk_est_ok;\n $a_valores[$c][6] = $chk_falta;\n } else {\n $a_valores[$c][4] = array('span' => 3, 'valor' => _(\"no asiste\"));\n $observ = '';\n $num--;\n $asis = \"f\";\n }\n\n if (!empty($plaza)) {\n $a_valores[$c]['clase'] = 'plaza' . $plaza;\n } else {\n $a_valores[$c]['clase'] = 'plaza1';\n }\n\n $a_valores[$c][1] = $cargo;\n $a_valores[$c][2] = \"$nom ($ctr_dl)\";\n $a_valores[$c][3] = $dl_asistente;\n $a_valores[$c][7] = \"$observ_cargo $observ\";\n $a_valores[$c][8] = \"$sacd\";\n $a_valores[$c][9] = \"$telfs\";\n $a_valores[$c][10] = \"$mails\";\n $a_valores[$c][11] = \"$nombre\";\n $a_valores[$c][12] = \"$apellidos\";\n $a_valores[$c][13] = \"$ctr_dl\";\n }\n\n $this->num = $num;\n $this->a_valores = $a_valores;\n }", "title": "" }, { "docid": "524996df0fb28040d0aea55caa090257", "score": "0.5578858", "text": "public function darCostos()\n {\n $costo = parent::darCostos();\n $costo = $costo + ($costo * 45) / 100;\n return $costo;\n }", "title": "" }, { "docid": "695534b6bd801cda2aea662c1d395af1", "score": "0.5546814", "text": "public function getCosto_valor(){\n return $this->costo_valor;\n }", "title": "" }, { "docid": "5fab14b2aaaeb808bae8bafe9196a775", "score": "0.5541379", "text": "function mostrarRegistro() {\r\n \r\n if(isset($_REQUEST['codProyecto']))\r\n {\r\n $codProyecto=$_REQUEST['codProyecto'];\r\n $nombreProyecto=$_REQUEST['nombreProyecto'];\r\n $variable=array($codProyecto,$nombreProyecto);\r\n }else if(isset($_REQUEST['codProyecto']) && isset($_REQUEST['planEstudio']))\r\n {\r\n $codProyecto=$_REQUEST['codProyecto'];\r\n $nombreProyecto=$_REQUEST['nombreProyecto'];\r\n $variable=array($codProyecto,$nombreProyecto);\r\n }else\r\n {\r\n $cadena_sql=$this->sql->cadena_sql(\"datos_coordinador\",$this->usuario);\r\n $resultado_datosCoordinador=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\" );\r\n\r\n $_REQUEST['codProyecto']=$codProyecto=$resultado_datosCoordinador[0][0];\r\n $_REQUEST['nombreProyecto']=$nombreProyecto=$resultado_datosCoordinador[0][1];\r\n \r\n $variable=array($codProyecto,$nombreProyecto);\r\n }\r\n\r\n $this->menuCoordinador($variable);\r\n \r\n }", "title": "" }, { "docid": "e7240eb62c149a8e4fde789b4cd975c9", "score": "0.55319655", "text": "function Identificacion()\r\n{\r\n //PRIMERA LINEA (ARRIBA)\r\n\t$this->text(80, 82, 'DESCRIPCION DEL VEHICULO: ');\r\n\t$this->Line(200,84,19,84);\r\n\t//SEGUNDA LINEA\r\n\t$this->Line(200,100,19,100);\r\n\t// PRIMERA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(19,84,19,100);\r\n\t// SEGUNDA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(50,84,50,100);\r\n\t// TERCERA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(85,84,85,100);\r\n\t// CUARTA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(127,84,127,100);\r\n\t// QUINTA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(175,84,175,100);\r\n\t// SEXTA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(200,84,200,100);\r\n\t//SEGUNDA LINEA HORIZONTAL(ABAJO)\r\n\t$this->Line(200,90,19,90);\r\n\t\r\n\t\r\n\t//TERCER TITULO\r\n\t$this->text(80, 115, 'MANTENIMIENTO PREVENTIVO: ');\r\n\t//PRIMERA LINEA HORIZONTAL DESPUES DEL TERCER TITULO\r\n\t$this->Line(200,117,19,117);\r\n\t//2DA LINEA HORIZONTAL DESPUES DEL TERCER TITULO\r\n\t$this->Line(200,125,19,125);\r\n\t//3RA LINEA HORIZONTAL DESPUES DEL TERCER TITULO\r\n\t$this->Line(200,133,19,133);\r\n\t//4TA LINEA HORIZONTAL DESPUES DEL TERCER TITULO\r\n\t$this->Line(200,141,19,141);\r\n\t//5TA LINEA HORIZONTAL DESPUES DEL TERCER TITULO\r\n\t$this->Line(200,171,19,171);\r\n\t\r\n\t// PRIMERA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(19,171,19,117);\r\n\t// 2DA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(110,171,110,117);\r\n\t// 3RA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(200,171,200,117);\r\n\t// 4TA LINEA IZQUIERDA VERTICAL PEQUEÑA\r\n\t$this->Line(150,171,150,141);\r\n\r\n\t\r\n\r\n\r\n\t\r\n}", "title": "" }, { "docid": "e938d1592e95b010063551bce265a654", "score": "0.5529072", "text": "function simbolounico()\n {\n if (! $this->layer) {\n return \"erro\";\n }\n $numclasses = $this->layer->numclasses;\n if ($numclasses > 0) {\n // elimina a express&atilde;o da primeira classe\n $classe0 = $this->layer->getClass(0);\n // echo \"<pre>\";var_dump($classe0);exit;\n $classe0->setexpression(\"\");\n $classe0->set(\"name\", \" \");\n // apaga todas as classes menos a primeira\n for ($i = 1; $i < $numclasses; ++ $i) {\n $classe = $this->layer->getClass($i);\n $classe->set(\"status\", MS_DELETE);\n }\n } else {\n $classe = ms_newClassObj($this->layer);\n $novoestilo = ms_newStyleObj($classe);\n if ($this->layer->type == 0) {\n $novoestilo->set(\"symbolname\", \"ponto\");\n $novoestilo->set(\"size\", \"6\");\n }\n $cor = $novoestilo->color;\n $cor->setRGB(255, 100, 100);\n }\n $this->layer->setMetaData(\"cache\", \"\");\n return true;\n }", "title": "" }, { "docid": "1fe146e4063cb09d977f85658cfea267", "score": "0.55259115", "text": "public function cobertura() {\n\t\t\t\n\t\t\tSession::accessRole(array('SUPER_U','ADMIN_DB'));\n\t\t\n\t\t\t//Content page-hader\n\t\t\t$this->_view->icon_fa = 'fa-database';\n\t\t\t$this->_view->titleHead = 'Administracion de Base de datos';\n\t\t\n\t\t\t//dataTable\n\t\t\t$this->_view->setJs(array('plugins/datatables/jquery.dataTables.min'));\n\t\t\n\t\t\t//data de la tb tipo de persona\n\t\t\t$this->_view->data = $this->getReference( 'cobertura' );\n\t\t\n\t\t\t//custom config js\n\t\t\t$this->_view->setJs(array('config/cobertura'));\n\t\t\n\t\t\t$this->_view->render('cobertura',$this->_menuSB);\n\t\t\n\t\t}", "title": "" }, { "docid": "d703f0530596fe554db413ba324be9b4", "score": "0.5522218", "text": "function compra($producto, $precio){\n\n echo \"El usuario {$this->nombre} {$this->apellidos} ha comprado el producto <strong>{$producto}</strong> por {$precio}€.\";\n }", "title": "" }, { "docid": "a8ed16b757f5e21ca71a54dee46cf02f", "score": "0.5511455", "text": "private function cadastroCep() {\n $name_tpl ='cadastroCep.tpl';\n\n // Recupera dados da tabela\n $cadCep = $this->recuperaCadastroCep();\n\n // Inclui registros se nao existir\n if (!$cadCep) {\n $this->incluiCadastroCep();\n\n // Recupera dados incluidos na tabelas\n $cadCep = $this->recuperaCadastroCep();\n }\n\n $this->smarty->assign(array(\n 'tab_3' => array(\n 'nameTpl' => $name_tpl,\n 'formAction' => Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']),\n 'cadastro_cep' => $cadCep,\n )\n ));\n\n }", "title": "" }, { "docid": "4be339eb95ae57e0bdcb032616ee604e", "score": "0.5509824", "text": "function Geral() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_readonly = '';\r\n $w_erro = '';\r\n // Verifica se há necessidade de recarregar os dados da tela a partir\r\n // da própria tela (se for recarga da tela) ou do banco de dados (se não for inclusão)\r\n if ($w_troca>'') {\r\n // Se for recarga da página\r\n $w_proponente = $_REQUEST['w_proponente'];\r\n $w_sq_unidade_resp = $_REQUEST['w_sq_unidade_resp'];\r\n $w_titulo = $_REQUEST['w_titulo'];\r\n $w_prioridade = $_REQUEST['w_prioridade'];\r\n $w_aviso = $_REQUEST['w_aviso'];\r\n $w_dias = $_REQUEST['w_dias'];\r\n $w_inicio_real = $_REQUEST['w_inicio_real'];\r\n $w_fim_real = $_REQUEST['w_fim_real'];\r\n $w_concluida = $_REQUEST['w_concluida'];\r\n $w_data_conclusao = $_REQUEST['w_data_conclusao'];\r\n $w_nota_conclusao = $_REQUEST['w_nota_conclusao'];\r\n $w_custo_real = $_REQUEST['w_custo_real'];\r\n $w_chave_pai = $_REQUEST['w_chave_pai'];\r\n $w_chave_aux = $_REQUEST['w_chave_aux'];\r\n $w_sq_menu = $_REQUEST['w_sq_menu'];\r\n $w_sq_unidade = $_REQUEST['w_sq_unidade'];\r\n $w_sq_tramite = $_REQUEST['w_sq_tramite'];\r\n $w_solicitante = $_REQUEST['w_solicitante'];\r\n $w_cadastrador = $_REQUEST['w_cadastrador'];\r\n $w_executor = $_REQUEST['w_executor'];\r\n $w_inicio = $_REQUEST['w_inicio'];\r\n $w_fim = $_REQUEST['w_fim'];\r\n $w_inclusao = $_REQUEST['w_inclusao'];\r\n $w_ultima_alteracao = $_REQUEST['w_ultima_alteracao'];\r\n $w_conclusao = $_REQUEST['w_conclusao'];\r\n $w_valor = $_REQUEST['w_valor'];\r\n $w_opiniao = $_REQUEST['w_opiniao'];\r\n $w_data_hora = $_REQUEST['w_data_hora'];\r\n $w_pais = $_REQUEST['w_pais'];\r\n $w_uf = $_REQUEST['w_uf'];\r\n $w_cidade = $_REQUEST['w_cidade'];\r\n $w_palavra_chave = $_REQUEST['w_palavra_chave'];\r\n $w_cd_programa = $_REQUEST['w_cd_programa'];\r\n $w_descricao = $_REQUEST['w_descricao'];\r\n $w_justificativa = $_REQUEST['w_justificativa'];\r\n $w_selecao_mp = $_REQUEST['w_selecao_mp'];\r\n $w_selecao_se = $_REQUEST['w_selecao_se'];\r\n $w_sq_natureza = $_REQUEST['w_sq_natureza'];\r\n $w_sq_horizonte = $_REQUEST['w_sq_horizonte'];\r\n $w_sq_unidade_adm = $_REQUEST['w_sq_unidade_adm'];\r\n $w_ln_programa = $_REQUEST['w_ln_programa'];\r\n if ($w_cd_programa>'') {\r\n $sql = new db_getProgramaPPA_IS; $RS = $sql->getInstanceOf($dbms,$w_cd_programa,$w_cliente,$w_ano,null,null,null,null);\r\n foreach($RS as $row){$RS=$row; break;}\r\n $w_titulo = f($RS,'cd_programa').' - '.substr(f($RS,'ds_programa'),0,60);\r\n } \r\n } else {\r\n if (!(strpos('AEV',$O)===false) || $w_copia>'') {\r\n // Recupera os dados da ação\r\n if ($w_copia>'') {\r\n $sql = new db_getSolicData_IS; $RS = $sql->getInstanceOf($dbms,$w_copia,$SG);\r\n } else {\r\n $sql = new db_getSolicData_IS; $RS = $sql->getInstanceOf($dbms,$w_chave,$SG);\r\n } \r\n foreach($RS as $row){$RS=$row; break;}\r\n if (count($RS)>0) {\r\n $w_proponente = f($RS,'proponente');\r\n $w_sq_unidade_resp = f($RS,'sq_unidade_resp');\r\n $w_titulo = f($RS,'titulo');\r\n $w_prioridade = f($RS,'prioridade');\r\n $w_aviso = f($RS,'aviso_prox_conc');\r\n $w_dias = f($RS,'dias_aviso');\r\n $w_inicio_real = f($RS,'inicio_real');\r\n $w_fim_real = f($RS,'fim_real');\r\n $w_concluida = f($RS,'concluida');\r\n $w_data_conclusao = f($RS,'data_conclusao');\r\n $w_nota_conclusao = f($RS,'nota_conclusao');\r\n $w_custo_real = f($RS,'custo_real');\r\n $w_chave_pai = f($RS,'sq_solic_pai');\r\n $w_chave_aux = null;\r\n $w_sq_menu = f($RS,'sq_menu');\r\n $w_sq_unidade = f($RS,'sq_unidade');\r\n $w_sq_tramite = f($RS,'sq_siw_tramite');\r\n $w_solicitante = f($RS,'solicitante');\r\n $w_cadastrador = f($RS,'cadastrador');\r\n $w_executor = f($RS,'executor');\r\n $w_inicio = FormataDataEdicao(f($RS,'inicio'));\r\n $w_fim = FormataDataEdicao(f($RS,'fim'));\r\n $w_inclusao = f($RS,'inclusao');\r\n $w_ultima_alteracao = f($RS,'ultima_alteracao');\r\n $w_conclusao = f($RS,'conclusao');\r\n $w_valor = number_format(Nvl(f($RS,'valor'),0),2,',','.');\r\n $w_opiniao = f($RS,'opiniao');\r\n $w_data_hora = f($RS,'data_hora');\r\n $w_cd_programa = f($RS,'cd_programa');\r\n $w_selecao_mp = f($RS,'mpog_ppa');\r\n $w_selecao_se = f($RS,'relev_ppa');\r\n $w_sq_natureza = f($RS,'sq_natureza');\r\n $w_sq_horizonte = f($RS,'sq_horizonte');\r\n $w_palavra_chave = f($RS,'palavra_chave');\r\n $w_descricao = f($RS,'descricao');\r\n $w_justificativa = f($RS,'justificativa');\r\n $w_sq_unidade_adm = f($RS,'sq_unidade_adm');\r\n $w_ln_programa = f($RS,'ln_programa');\r\n } \r\n } \r\n } \r\n Cabecalho();\r\n head();\r\n // Monta o código JavaScript necessário para validação de campos e preenchimento automático de máscara,\r\n // tratando as particularidades de cada serviço\r\n ScriptOpen('JavaScript');\r\n CheckBranco();\r\n FormataData();\r\n SaltaCampo();\r\n FormataDataHora();\r\n FormataValor();\r\n ValidateOpen('Validacao');\r\n if ($O=='I' || $O=='A') {\r\n ShowHTML(' if (theForm.Botao.value == \"Troca\") { return true; }');\r\n Validate('w_titulo','Programa','1',1,5,100,'1','1');\r\n if ($O=='I' && $w_cd_programa=='') Validate('w_cd_programa','Programa PPA','SELECT','1',1,90,'1','1');\r\n Validate('w_sq_unidade_adm','Unidade administrativa','HIDDEN',1,1,18,'','0123456789');\r\n Validate('w_solicitante','Responsável monitoramento','HIDDEN',1,1,18,'','0123456789');\r\n Validate('w_sq_unidade_resp','Área planejamento','SELECT',1,1,18,'','0123456789');\r\n Validate('w_sq_natureza','Natureza','SELECT',1,1,18,'','0123456789');\r\n Validate('w_sq_horizonte','Horizonte','SELECT',1,1,18,'','0123456789');\r\n Validate('w_inicio','Início previsto','DATA',1,10,10,'','0123456789/');\r\n Validate('w_fim','Fim previsto','DATA',1,10,10,'','0123456789/');\r\n CompData('w_inicio','Data de recebimento','<=','w_fim','Limite para conclusão');\r\n Validate('w_proponente','Parcerias externas','','',2,90,'1','1');\r\n Validate('w_palavra_chave','Parcerias internas','','',2,90,'1','1');\r\n Validate('w_ln_programa','Endereço na internet','','',11,120,'1','1');\r\n } \r\n ValidateClose();\r\n ScriptClose();\r\n ShowHTML('</HEAD>');\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n if ($w_troca>'') {\r\n BodyOpen('onLoad=\\'document.Form.'.$w_troca.'.focus()\\';');\r\n } elseif (!(strpos('EV',$O)===false)) {\r\n BodyOpen('onLoad=\\'this.focus()\\';');\r\n } else {\r\n BodyOpen('onLoad=\\'document.Form.w_titulo.focus()\\';');\r\n } \r\n ShowHTML('<B><FONT COLOR=\"#000000\">'.$w_TP.'</FONT></B>');\r\n ShowHTML('<HR>');\r\n ShowHTML('<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n if (!(strpos('IAEV',$O)===false)) {\r\n if ($w_pais=='') {\r\n // Carrega os valores padrão para país, estado e cidade\r\n $sql = new db_getCustomerData; $RS = $sql->getInstanceOf($dbms,$w_cliente);\r\n $w_pais = f($RS,'sq_pais');\r\n $w_uf = f($RS,'co_uf');\r\n $w_cidade = f($RS,'sq_cidade_padrao');\r\n } \r\n if (!(strpos('EV',$O)===false)) {\r\n $w_Disabled=' DISABLED ';\r\n if ($O=='V') $w_Erro= Validacao($w_sq_solicitacao,$SG);\r\n } \r\n AbreForm('Form',$w_dir.$w_pagina.'Grava','POST','return(Validacao(this));',null,$P1,$P2,$P3,$P4,$TP,$SG,$R,$O);\r\n ShowHTML(MontaFiltro('POST'));\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_copia\" value=\"'.$w_copia.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_data_hora\" value=\"'.f($RS_Menu,'data_hora').'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_menu\" value=\"'.f($RS_Menu,'sq_menu').'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_prioridade\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_aviso\" value=\"S\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_descricao\" value=\"'.$w_descricao.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_justificativa\" value=\"'.$w_justificativa.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_valor\" value=\"0,00\">');\r\n //Passagem da cidade padrão como brasília, pelo retidara do impacto geográfico da tela\r\n $sql = new db_getCustomerData; $RS = $sql->getInstanceOf($dbms,$w_cliente);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_cidade\" value=\"'.f($RS,'sq_cidade_padrao').'\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td align=\"center\">');\r\n ShowHTML(' <table width=\"97%\" border=\"0\">');\r\n ShowHTML(' <tr><td align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td valign=\"top\" align=\"center\" bgcolor=\"#D0D0D0\"><font size=\"2\"><b>Identificação</td></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td>Os dados deste bloco serão utilizados para identificação do programa, bem como para o controle de sua execução.</td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n if ($w_cd_programa>'') ShowHTML(' <tr><td valign=\"top\"><b>Programa:</b><br><INPUT READONLY '.$w_Disabled.' class=\"STI\" type=\"text\" name=\"w_titulo\" size=\"90\" maxlength=\"100\" value=\"'.$w_titulo.'\" ></td>');\r\n else ShowHTML(' <tr><td valign=\"top\"><b>Programa:</b><br><INPUT ACCESSKEY=\"A\" '.$w_Disabled.' class=\"STI\" type=\"text\" name=\"w_titulo\" size=\"90\" maxlength=\"100\" value=\"'.$w_titulo.'\" ></td>');\r\n ShowHTML(' <tr>');\r\n if ($O=='I' || $w_cd_programa=='') {\r\n SelecaoProgramaPPA('Programa <u>P</u>PA:','P',null,$w_cliente,$w_ano,$w_cd_programa,'w_cd_programa','IDENTIFICACAO','onchange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.w_troca.value=\\'w_cd_programa\\'; document.Form.submit();\"',$w_menu,null,null);\r\n } else {\r\n SelecaoProgramaPPA('Programa <u>P</u>PA:','P',null,$w_cliente,$w_ano,$w_cd_programa,'w_cd_programa',null,'disabled',$w_menu,null,null);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_cd_programa\" value=\"'.$w_cd_programa.'\">');\r\n } \r\n ShowHTML(' </tr>');\r\n ShowHTML(' <tr><td valign=\"top\" colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0><tr valign=\"top\">');\r\n SelecaoUnidade_IS('<U>U</U>nidade administrativa:','U','Selecione a unidade administratriva responsável pelo programa.',$w_sq_unidade_adm,null,'w_sq_unidade_adm',null,'ADMINISTRATIVA');\r\n ShowHTML(' <tr><td valign=\"top\" colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0><tr valign=\"top\">');\r\n MontaRadioNS('<b>Selecionado pelo SPI/MP?</b>',$w_selecao_mp,'w_selecao_mp');\r\n MontaRadioNS('<b>Selecionado pelo SE/SEPPIR?</b>',$w_selecao_se,'w_selecao_se');\r\n ShowHTML(' </table></td></tr>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n SelecaoPessoa('Respo<u>n</u>sável monitoramento:','N','Selecione o nome da pessoa responsável pelas informações no SISPLAM.',$w_solicitante,null,'w_solicitante','USUARIOS');\r\n ShowHTML(' <tr valign=\"top\">');\r\n SelecaoUnidade_IS('<U>Á</U>rea planejamento:','S','Selecione a área da secretaria ou orgão responsável pelo programa.',$w_sq_unidade_resp,null,'w_sq_unidade_resp',null,'PLANEJAMENTO');\r\n ShowHTML(' <tr><td valign=\"top\" colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0><tr valign=\"top\">');\r\n SelecaoNatureza_IS('Na<u>t</u>ureza:','T','Indique qual a natureza do programa com relação às suas ações.',$w_cliente,$w_sq_natureza,'w_sq_natureza',null,null);\r\n SelecaoHorizonte_IS('<U>H</U>orizonte temporal:','H','Indique se o programa é contínuo ao longo do PPA ou se é apenas temporário.',$w_cliente,$w_sq_horizonte,'w_sq_horizonte',null,null);\r\n ShowHTML(' </table></td></tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td valign=\"top\" colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0>');\r\n ShowHTML(' <tr>');\r\n if ($w_cd_programa>'') {\r\n ShowHTML(' <td valign=\"top\"><b>Iní<u>c</u>io previsto:</b><br><input readonly '.$w_Disabled.' accesskey=\"C\" type=\"text\" name=\"w_inicio\" class=\"STI\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.Nvl($w_inicio,'01/01/'.$w_ano).'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Usar formato dd/mm/aaaa\"></td>');\r\n ShowHTML(' <td valign=\"top\"><b><u>F</u>im previsto:</b><br><input readonly '.$w_Disabled.' accesskey=\"F\" type=\"text\" name=\"w_fim\" class=\"STI\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.Nvl($w_fim,'31/12/'.$w_ano).'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Usar formato dd/mm/aaaa\"></td>');\r\n } else {\r\n ShowHTML(' <td valign=\"top\"><b>Iní<u>c</u>io previsto:</b><br><input '.$w_Disabled.' accesskey=\"C\" type=\"text\" name=\"w_inicio\" class=\"STI\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.Nvl($w_inicio,'01/01/'.$w_ano).'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Usar formato dd/mm/aaaa\"></td>');\r\n ShowHTML(' <td valign=\"top\"><b><u>F</u>im previsto:</b><br><input '.$w_Disabled.' accesskey=\"F\" type=\"text\" name=\"w_fim\" class=\"STI\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.Nvl($w_fim,'31/12/'.$w_ano).'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Usar formato dd/mm/aaaa\"></td>');\r\n } \r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td valign=\"top\"><b>Parc<u>e</u>rias externas:<br><INPUT ACCESSKEY=\"E\" '.$w_Disabled.' class=\"STI\" type=\"text\" name=\"w_proponente\" size=\"90\" maxlength=\"90\" value=\"'.$w_proponente.'\" title=\"Informar quais são os parceiros externos na execução do programa (campo opcional).\"></td>');\r\n ShowHTML(' <tr><td valign=\"top\"><b><u>P</u>arcerias internas:<br><INPUT ACCESSKEY=\"P\" '.$w_Disabled.' class=\"STI\" type=\"text\" name=\"w_palavra_chave\" size=\"90\" maxlength=\"90\" value=\"'.$w_palavra_chave.'\" title=\"Informar quais são os parceiros internos na execução do programa (campo opcional).\"></td>');\r\n ShowHTML(' <tr><td valign=\"top\"><b>En<u>d</u>ereço internet:<br><INPUT ACCESSKEY=\"D\" '.$w_Disabled.' class=\"STI\" type=\"text\" name=\"w_ln_programa\" size=\"90\" maxlength=\"120\" value=\"'.$w_ln_programa.'\" title=\"Se desejar, informe o link do programa na internet.\"></td>');\r\n // Verifica se poderá ser feito o envio da solicitação, a partir do resultado da validação\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\">');\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Gravar\">');\r\n if ($O=='I') {\r\n $sql = new db_getMenuData; $RS = $sql->getInstanceOf($dbms,$w_menu);\r\n ShowHTML(' <input class=\"STB\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$R.'&w_copia='.$w_copia.'&O=L&SG='.f($RS,'sigla').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.MontaFiltro('GET')).'\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n }\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n ShowHTML(' history.back(1);');\r\n ScriptClose();\r\n }\r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Rodape();\r\n}", "title": "" }, { "docid": "19f2786a90e63df0abfef81e89f50171", "score": "0.5508764", "text": "function modificarConsumo(){\n\t\t$this->procedimiento='gecom.ft_consumo_ime';\n\t\t$this->transaccion='GC_CON_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_consumo','id_consumo','int4');\n\t\t$this->setParametro('id_numero_celular','id_numero_celular','int4');\n\t\t$this->setParametro('id_periodo','id_periodo','int4');\n\t\t$this->setParametro('id_gestion','id_gestion','int4');\n\t\t$this->setParametro('id_servicio','id_servicio','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('observaciones','observaciones','text');\n\t\t$this->setParametro('consumo','consumo','numeric');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "c771a184427350f9e93a03ae31731f4f", "score": "0.55048376", "text": "public function getDescipcionMiAgroempresa(){\n return $this->descipcionMiAgroempresa;\n }", "title": "" }, { "docid": "319e8f77fef45c5718f6458a646098bf", "score": "0.5501483", "text": "public function ctrMostrarProductosCompra(){\n\n\t\t$tabla = \"producto\";\n\n\t\t$respuesta = ModeloProductos::mdlMostrarProductosCompra($tabla);\n\n\t\treturn $respuesta;\n\t\t\n\t}", "title": "" }, { "docid": "8c8151677631b8355ce627882fb6109c", "score": "0.5485891", "text": "abstract public function AsignarCaso();", "title": "" }, { "docid": "bf0c68bc3dff7550553c74a617f90a16", "score": "0.54855895", "text": "public function escenarioEnviarClase() {\n\n $this->luz=1;\n $this->activarLuzSuelo[\"l567\"]=1;\n $this->activarLuzSuelo[\"l34\"]=1;\n $this->activarLuzSuelo[\"l12\"]=1;\n $this->thinkClient[\"f567\"]=1;\n $this->thinkClient[\"f34\"]=1;\n $this->thinkClient[\"f12\"]=1;\n $this->setIntensidadPasillo(self::$intensidades[\"minima\"]);\n $this->setIntensidadAlumnos(self::$intensidades[\"media\"]);\n $this->pantalla[\"span\"]=0;\n $this->pantalla[\"bpan\"]=1;\n $this->pantallaElectrica=1;\n $comando=$this->procesarComando(\"\", \"\");\n $this->enviarComando($comando);\n $this->guardarEstado();\n\n }", "title": "" }, { "docid": "7756472d43baf0f4f55b112d967e7ec7", "score": "0.5476875", "text": "static function indexcentrovida()\n\t{\n\t\t$almuerzos \t=\tnew Modelo();\n\t\t$dato = $almuerzos->mostrar(\"centro_vida\", \"1\");\n\t\trequire_once(\"vista/centros_vida/index.php\");\n\t}", "title": "" }, { "docid": "f75d23ba8de351f247dcdb183ba0286d", "score": "0.5475656", "text": "public function getComentario()\n {\n return $this->comentario;\n }", "title": "" }, { "docid": "5e9c461aafeb4d498a58fbf52667d259", "score": "0.5474559", "text": "static public function ctrCrearCompra(){\n\n\t\tif (isset($_POST[\"nuevaCompra\"])) {\n\n\t\t\t//ACTUALIZAMOS LAS COMPRAS DE LOS INSUMOS EL STOCK\n\n\t\t\t$listaInsumos = json_decode($_POST[\"listadoInsumos\"], true);\n\n\t\t\tforeach ($listaInsumos as $key => $value) {\n\n\t\t\t\tif ($value[\"tipo\"] != \"Producto\") {\n\n\t\t\t\t\t//ACTUALIZAMOS STOCK DE INSUMOS\n\n\t\t\t\t\t$tablaInsumos = \"Insumos\";\n\t\t\t\t\t$tabla2 = \"Rubro\";\n\n\t\t\t\t\t$item = \"InsumosID\";\n\t\t\t\t\t$valor = $value[\"idInProd\"];\n\n\t\t\t\t\t$traerInsumos = ModeloInsumos::mdlMostrarInsumos($tablaInsumos, $tabla2, $item, $valor);\n\n\t\t\t\t\t$item1a = \"Stock\";\n\t\t\t\t\t$valor1a = $value[\"cantidad\"] + $traerInsumos[\"Stock\"];\n\n\t\t\t\t\t$nuevoStockInsumo = ModeloInsumos::mdlActualizarInsumo($tablaInsumos, $item1a, $valor1a, $valor);\n\n\t\t\t\t} else {\n\n\t\t\t\t\t//ACTUALIZAMOS STOCK DE PRODUCTOS\n\n\t\t\t\t\t$tablaProductos = \"Producto\";\n\t\t\t\t\t$tabla2p = \"Rubro\";\n\n\t\t\t\t\t$itemp = \"ProductoID\";\n\t\t\t\t\t$valorp = $value[\"idInProd\"];\n\t\t\t\t\t$orden = \"ProductoID\";\n\n\t\t\t\t\t$traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $tabla2p, $itemp, $valorp, $orden);\n\n\t\t\t\t\t$item1b = \"Stock\";\n\t\t\t\t\t$valor1b = $value[\"cantidad\"] + $traerProducto[\"Stock\"];\n\n\t\t\t\t\t$nuevoStockProducto = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valorp);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//GUARDAMOS LA COMPRA\n\n\t\t\t$tabla = \"Compra\";\n\n\t\t\t$numeroOrden = str_replace(\"-\", \"\", $_POST[\"nuevaCompra\"]);\n\n\t\t\t$datos = array(\"UsuarioRegistraID\" => $_POST[\"idUsuarioCompra\"],\n\t\t\t\t\t\t \"ProveedorID\" => $_POST[\"idProveedorCompra\"],\n\t\t\t\t\t\t \"MedioPagoID\" => $_POST[\"fPagoCompra\"],\n\t\t\t\t\t\t \"MontoImpuesto\" => $_POST[\"nuevoPrecioImpuesto\"],\n\t\t\t\t\t\t \"NroCompra\" => $numeroOrden,\n\t\t\t\t\t\t \"Neto\" => $_POST[\"precioNetoCompra\"],\n\t\t\t\t\t\t \"Total\" => $_POST[\"totalCompraFinal\"]);\n\n\t\t\t$idCompra = ModeloCompras::mdlRegistrarCompra($tabla, $datos);\n\n\t\t\tif ($idCompra != \"error\") {\n\n\t\t\t\t$tablaCompraDetalle = \"CompraDetalle\";\n\n\t\t\t\tforeach ($listaInsumos as $key => $value) {\n\n\t\t\t\t\tif ($value[\"tipo\"] != \"Producto\") {\n\n\t\t\t\t\t\t//es insumo\n\t\t\t\t\t\t$idProducto = null;\n\t\t\t\t\t\t$idInsumo = $value[\"idInProd\"];\n\t\t\t\t\t\t$Cantidad = $value[\"cantidad\"];\n\t\t\t\t\t\t$Precio = $value[\"precio\"];\n\n\t\t\t\t\t\t$respuesta = ModeloCompras::mdlRegistrarDetalleCompra($tablaCompraDetalle, $idCompra, $idInsumo, $idProducto, $Cantidad, $Precio);\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t$idProducto = $value[\"idInProd\"];\n\t\t\t\t\t\t$idInsumo = null;\n\t\t\t\t\t\t$Cantidad = $value[\"cantidad\"];\n\t\t\t\t\t\t$Precio = $value[\"precio\"];\n\n\t\t\t\t\t\t$respuesta = ModeloCompras::mdlRegistrarDetalleCompra($tablaCompraDetalle, $idCompra, $idInsumo, $idProducto, $Cantidad, $Precio);\n\n\t\t\t\t\t}\n\n\n\n\t\t\t\t}\n\n\t\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\t\techo'<script>\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\ttitle:\"¡Registro Exitoso!\",\n\t\t\t\t\t\t\t\ttext:\"¡La compra se registró correctamente!\",\n\t\t\t\t\t\t\t\ttype:\"success\",\n\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tfunction(isConfirm){\n\t\t\t\t\t\t\t\t\tif(isConfirm){\n\t\t\t\t\t\t\t\t\t\twindow.location=\"compras\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t</script>';\n\n\t\t\t\t}else{\n\n\t\t\t\t\techo'<script>\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\ttitle:\"¡Registro Fallido!\",\n\t\t\t\t\t\t\t\ttext:\"¡Ocurrio un error, revise los datos!'.$respuesta.'\",\n\t\t\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\t\t\tconfirmButtonText:\"Cerrar\",\n\t\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t</script>';\n\n\t\t\t\t}\n\n\t\t\t}// else if\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "14ef4d58c74f29d1123ad4c602564134", "score": "0.5473842", "text": "function excel_cc_inicio_nivel()\n\t{\n\t}", "title": "" }, { "docid": "7de0e62d82ced2b3e343209636cc0983", "score": "0.54680026", "text": "public function analisedecustosAction()\n {\n $this->_helper->layout->disableLayout(); // desabilita o Zend_Layout\n // recebe os dados via get\n $idpronac = $this->_request->getParam(\"idpronac\");\n $tblPlanilhaProposta = new Proposta_Model_DbTable_TbPlanilhaProposta();\n $tblPlanilhaProjeto = new PlanilhaProjeto();\n $tblPlanilhaAprovacao = new PlanilhaAprovacao();\n $tblProjetos = new Projetos();\n // busca os produtos do projeto\n /*$pt = new Pauta();\n $buscaReadAprovacadoCnic = $pt->buscar(array('IdPRONAC = ?' => $idpronac, 'stAnalise = ?' => \"AS\"));\n $tipoplanilha = $buscaReadAprovacadoCnic->count() > 0 ? 'SE' : 'CO';*/\n\n $rsPlanilhaAtual = $tblPlanilhaAprovacao->buscar(array('IdPRONAC = ?'=>$idpronac), array('dtPlanilha DESC'))->current();\n $tipoplanilha = (!empty($rsPlanilhaAtual) && $rsPlanilhaAtual->tpPlanilha == 'SE') ? 'SE' : 'CO';\n\n if ($this->bln_readequacao == \"false\") {\n $buscarplanilha = $tblPlanilhaAprovacao->buscarAnaliseCustos($idpronac, $tipoplanilha, array('PAP.stAtivo=?'=>'S'));\n\n $planilhaaprovacao = array();\n $count = 0;\n $fonterecurso = null;\n foreach ($buscarplanilha as $resuplanilha) {\n $produto = $resuplanilha->Produto == null ? 'Administra&ccedil;&atilde;o do Projeto' : $resuplanilha->Produto;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['idPlanilhaAprovacao'] = $resuplanilha->idPlanilhaAprovacao;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['idUnidade'] = $resuplanilha->idUnidade;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['nrFonteRecurso'] = $resuplanilha->nrFonteRecurso;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['item'] = $resuplanilha->Item;\n\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['diasprop'] = $resuplanilha->diasprop;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['quantidadeprop'] = $resuplanilha->quantidadeprop;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['ocorrenciaprop'] = $resuplanilha->ocorrenciaprop;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['valorUnitarioprop'] = $resuplanilha->valorUnitarioprop;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['UnidadeProposta'] = $resuplanilha->UnidadeProposta;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['vlproponente'] = $resuplanilha->VlSolicitado;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['justificitivaproponente'] = $resuplanilha->justificitivaproponente;\n\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['UnidadeProjeto'] = $resuplanilha->UnidadeProjeto;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['quantidadeparc'] = $resuplanilha->quantidadeparc;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['ocorrenciaparc'] = $resuplanilha->ocorrenciaparc;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['ocorrenciaparc'] = $resuplanilha->ocorrenciaparc;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['diasparc'] = $resuplanilha->diasparc;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['valorUnitarioparc'] = $resuplanilha->valorUnitarioparc;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['vlparecerista'] = $resuplanilha->VlSugeridoParecerista;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['justificativaparecerista'] = $resuplanilha->dsJustificativaParecerista;\n\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['Unidade'] = $resuplanilha->Unidade;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['qtitemcomp'] = $resuplanilha->qtitemcomp;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['nrocorrenciacomp'] = $resuplanilha->nrocorrenciacomp;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['vlunitariocomp'] = $resuplanilha->vlunitariocomp;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['qtdiascomp'] = $resuplanilha->qtdiascomp;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['Unidadecomp'] = $resuplanilha->Unidade;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['vlconselheiro'] = $resuplanilha->VlSugeridoConselheiro;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['justificativaconselheiro'] = $resuplanilha->dsJustificativaConselheiro;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa . ' - ' . $resuplanilha->Etapa][$resuplanilha->UF . ' - ' . $resuplanilha->Cidade][$count]['reducao'] = $resuplanilha->VlSugeridoConselheiro < $resuplanilha->VlSolicitado ? 1 : 0;\n $count++;\n }\n $buscarprojeto = $tblProjetos->buscar(array('IdPRONAC = ?' => $idpronac))->current();\n //$buscarsomaaprovacao = $pa->somarPlanilhaAprovacao($idpronac, 206, $tipoplanilha);\n $buscarsomaproposta = $tblPlanilhaProposta->somarPlanilhaProposta($buscarprojeto->idProjeto);\n $buscarsomaprojeto = $tblPlanilhaProjeto->somarPlanilhaProjeto($idpronac);\n } else {\n\n /**** CODIGO DE READEQUACAO ****/\n $buscarplanilhaCO = $tblPlanilhaAprovacao->buscarAnaliseCustosPlanilhaAprovacao($idpronac, 'CO', array('PAP.stAtivo=?'=>'S'));\n\n $planilhaaprovacao = array();\n $count = 0;\n $fonterecurso = null;\n foreach ($buscarplanilhaCO as $resuplanilha) {\n $produto = $resuplanilha->Produto == null ? 'Administra&ccedil;&atilde;o do Projeto' : $resuplanilha->Produto;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['idPlanilhaAprovacao'] = $resuplanilha->idPlanilhaAprovacao;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['idUnidade'] = $resuplanilha->idUnidade;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['nrFonteRecurso'] = $resuplanilha->nrFonteRecurso;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['item'] = $resuplanilha->Item;\n\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['Unidade'] = $resuplanilha->Unidade;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['qtitemcomp'] = $resuplanilha->qtItem;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['nrocorrenciacomp'] = $resuplanilha->nrOcorrencia;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['vlunitariocomp'] = $resuplanilha->vlUnitario;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['qtdiascomp'] = $resuplanilha->qtDias;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['Unidadecomp'] = $resuplanilha->Unidade;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['vlconselheiro'] = $resuplanilha->vlTotal;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['justificativaconselheiro'] = $resuplanilha->dsJustificativa;\n //$planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['reducao'] = $resuplanilha->VlSugeridoConselheiro < $resuplanilha->VlSolicitado ? 1 : 0;\n $count++;\n }\n\n /******** Planilha aprovacao SR (Proponente - solicitada) ****************/\n $arrBuscaPlanilha = array();\n $arrBuscaPlanilha[\"pap.stAtivo = ? \"] = 'N';\n $arrBuscaPlanilha[\"pap.idPedidoAlteracao = (SELECT TOP 1 max(idPedidoAlteracao) from SAC.dbo.tbPlanilhaAprovacao where IdPRONAC = '{$idpronac}')\"] = '(?)';\n\n $resuplanilha = null;\n $count = 0;\n $buscarplanilhaSR = $tblPlanilhaAprovacao->buscarAnaliseCustosPlanilhaAprovacao($idpronac, 'SR', $arrBuscaPlanilha);\n foreach ($buscarplanilhaSR as $resuplanilha) {\n $produto = $resuplanilha->Produto == null ? 'Administra&ccedil;&atilde;o do Projeto' : $resuplanilha->Produto;\n\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['diasprop'] = $resuplanilha->qtDias;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['quantidadeprop'] = $resuplanilha->qtItem;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['ocorrenciaprop'] = $resuplanilha->nrOcorrencia;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['valorUnitarioprop'] = $resuplanilha->vlUnitario;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['UnidadeProposta'] = $resuplanilha->Unidade;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['vlproponente'] = $resuplanilha->vlTotal;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['justificitivaproponente'] = $resuplanilha->dsJustificativa;\n\n $valorConselheiro = $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['vlconselheiro'];\n $valorSolicitado = $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['vlproponente'];\n $reducao = $valorConselheiro < $valorSolicitado ? 1 : 0;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['reducao'] = $reducao;\n $count++;\n }\n\n /******** Planilha aprovacao PA (Parecerista) ****************/\n $resuplanilha = null;\n $count = 0;\n $buscarplanilhaPA = $tblPlanilhaAprovacao->buscarAnaliseCustosPlanilhaAprovacao($idpronac, 'PA', $arrBuscaPlanilha);\n foreach ($buscarplanilhaPA as $resuplanilha) {\n $produto = $resuplanilha->Produto == null ? 'Administra&ccedil;&atilde;o do Projeto' : $resuplanilha->Produto;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['UnidadeProjeto'] = $resuplanilha->Unidade;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['quantidadeparc'] = $resuplanilha->qtItem;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['ocorrenciaparc'] = $resuplanilha->nrOcorrencia;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['diasparc'] = $resuplanilha->qtDias;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['valorUnitarioparc'] = $resuplanilha->vlUnitario;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['vlparecerista'] = $resuplanilha->vlTotal;\n $planilhaaprovacao[$resuplanilha->FonteRecurso][$produto][$resuplanilha->idEtapa.' - '.$resuplanilha->Etapa][$resuplanilha->UF.' - '.$resuplanilha->Cidade][$count]['justificativaparecerista'] = $resuplanilha->dsJustificativa;\n $count++;\n }\n\n $buscarprojeto = $tblProjetos->buscar(array('IdPRONAC = ?'=>$idpronac))->current();\n\n $arrWhereSomaPlanilha = array();\n $arrWhereSomaPlanilha['idPronac = ?']=$idpronac;\n $arrWhereSomaPlanilha['idPlanilhaItem <> ? ']='206'; //elaboracao e agenciamento\n $arrWhereSomaPlanilha['NrFonteRecurso = ? ']='109';\n $arrWhereSomaPlanilha['stAtivo = ? ']='N';\n $arrWhereSomaPlanilha[\"idPedidoAlteracao = (?)\"] = new Zend_Db_Expr(\"(SELECT TOP 1 max(idPedidoAlteracao) from SAC.dbo.tbPlanilhaAprovacao where IdPRONAC = '{$idpronac}')\");\n $arrWhereSomaPlanilha[\"tpAcao <> ('E') OR tpAcao IS NULL \"] = '(?)';\n\n $arrWhereSomaPlanilha['tpPlanilha = ? ']='SR';\n $buscarsomaproposta = $tblPlanilhaAprovacao->somarItensPlanilhaAprovacao($arrWhereSomaPlanilha);\n $arrWhereSomaPlanilha['tpPlanilha = ? ']='PA';\n $buscarsomaprojeto = $tblPlanilhaAprovacao->somarItensPlanilhaAprovacao($arrWhereSomaPlanilha);\n }//feacha if bln_readequacao\n /**** FIM - CODIGO DE READEQUACAO ****/\n\n $arrWhereSomaPlanilha = array();\n $arrWhereSomaPlanilha['idPronac = ?']=$idpronac;\n $arrWhereSomaPlanilha['idPlanilhaItem <> ? ']='206'; //elaboracao e agenciamento\n $arrWhereSomaPlanilha['tpPlanilha = ? ']='CO';\n $arrWhereSomaPlanilha['NrFonteRecurso = ? ']='109';\n $arrWhereSomaPlanilha['stAtivo = ? ']='S';\n $buscarsomaaprovacao = $tblPlanilhaAprovacao->somarItensPlanilhaAprovacao($arrWhereSomaPlanilha);\n\n $buscarPlanilhaUnidade = PlanilhaUnidadeDAO::buscar();\n $this->view->planilhaUnidade = $buscarPlanilhaUnidade;\n $this->view->planilha = $planilhaaprovacao;\n $this->view->projeto = $buscarprojeto;\n $this->view->totalcomponente = $buscarsomaaprovacao['soma'];\n $this->view->totalparecerista = $buscarsomaprojeto['soma'];\n $this->view->totalproponente = $buscarsomaproposta['soma'];\n }", "title": "" }, { "docid": "676dd429f6fd5fee321f374bf1315af5", "score": "0.54670274", "text": "function proveedores()\n\t{\n\t\trequire('views/configuracion/proveedores.php');\n\t}", "title": "" }, { "docid": "d284a92e639c85dd9eacf79ee2becd10", "score": "0.54542285", "text": "public function criarCiclos(){\n //calculo tranformar pagina em tempo (quantidade_pagina * velocidade /3600)\n \n }", "title": "" }, { "docid": "a2c20ad76bd3e7f5dde427d3b4749a1c", "score": "0.5436086", "text": "public function buscartituloAction()\n {\n \n return $this->render('uniPeliculasBundle:peliculas:buscartitulo.html.twig') \n \n ;\n }", "title": "" }, { "docid": "c522f6f5a598e45973255a1724190dea", "score": "0.5421122", "text": "public function dar_costos(){\n\t\t/*variables: int $valor, float $costo*/\n\t\t$valor = parent::dar_costos();\n\t\t$costo = $valor + ($valor * 0.45);\n\t\treturn $costo;\n\t}", "title": "" }, { "docid": "db012ca738213d716727ff2f5d345d8b", "score": "0.54188657", "text": "function Cuerpo($acceso,$id_inv)\n\t{\n\t\t$acceso1=conexion();\n\t\t$acceso2=conexion();\n\t\t$this->SetFillColor(244,249,255);\n\t\t$this->SetDrawColor(225,240,255);\n\t\t$this->SetLineWidth(.2);\n\t\t\n\t\t/** CONSULTA PARA TRAER EL INVENTARIO (id_inv) CORRESPONDE A UN REGISTRO **/\n\t\t$acceso->objeto->ejecutarSql(\"SELECT * FROM vista_inventario WHERE id_inv = '$id_inv'\");\n\t\t$row=row($acceso);\n\t\t$ref_inv = trim($row[\"ref_inv\"]);\n\t\t\n\t\t$this->SetX(15);\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->Cell(180,5,strtoupper(_(\"Datos del Inventario\")),1,0,'J',0);\n\t\t$this->Ln();\n\t\t\n\t\t$this->SetX(15);\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->Cell(30,5,strtoupper(_('Referencia')),1,0,'J',FALSE);\n\t\t$this->SetFont('Arial','',9);\n\t\t$this->Cell(60,5,utf8_decode(trim($row[\"ref_inv\"])),1,0,'J',FALSE);\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->Cell(20,5,strtoupper(_('Almacén')),1,0,'J',FALSE);\n\t\t$this->SetFont('Arial','',9);\n\t\t$this->Cell(70,5,utf8_decode(trim($row[\"nombre_alm\"])),1,0,'J',FALSE);\n\t\t$this->Ln();\n\t\t\n\t\t$this->SetX(15);\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->Cell(30,5,strtoupper(_('Motivo')),1,0,'J',FALSE);\n\t\t$this->SetFont('Arial','',9);\n\t\t$this->Cell(60,5,utf8_decode(trim($row[\"nombre_mot_inv\"])),1,0,'J',FALSE);\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->Cell(20,5,strtoupper(_('Fecha')),1,0,'J',FALSE);\n\t\t$this->SetFont('Arial','',9);\n\t\t$this->Cell(25,5,utf8_decode(formatofecha(trim($row[\"fecha_inv\"]))),1,0,'J',FALSE);\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->Cell(20,5,strtoupper(_('Hora')),1,0,'J',FALSE);\n\t\t$this->SetFont('Arial','',9);\n\t\t$this->Cell(25,5,utf8_decode(trim($row[\"hora_inv\"])),1,0,'J',FALSE);\n\t\t$this->Ln();\n\t\t\n\t\t$this->SetX(15);\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->Cell(30,5,strtoupper(_('Estatus')),1,0,'J',FALSE);\n\t\t$this->SetFont('Arial','',9);\n\t\tif(trim($row[\"nombre_est_inv\"])==\"FINALIZADO\")\n\t\t{\n\t\t\t$this->Cell(150,5,\"FINALIZADO\",1,0,'J',FALSE);\n\t\t}else{\n\t\t\t$this->Cell(150,5,\"EN REVISION\",1,0,'J',FALSE);\n\t\t}\n\t\t$this->Ln();\n\t\t\n\t\t$this->SetX(15);\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->Cell(180,5,strtoupper(_('Observación')),1,1,'J',FALSE);\n\t\t$this->SetFont('Arial','',9);\n\t\t$this->SetX(15);\n\t\t$this->MultiCell(180,5,utf8_decode(trim($row[\"obser_inv\"])),1,'B',FALSE);\t\t\t\n\t\t$fill=!$fill;\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\t$this->SetX(15);\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->Cell(180,5,strtoupper(_(\"Datos de Materiales ubicados en \".utf8_decode(trim($row[\"nombre_alm\"])) )),1,0,'J',0);\n\t\t\n\t\t\n\t\t$this->SetFont('Arial','',9);\n\t\t$cont=1;\n\t\t$this->SetFillColor(249,249,249);\n\t\t$this->SetTextColor(0);\n\t\t\n\t\t$w=$this->TituloCampos();\n\t\t\n\t\t$this->SetFont('Arial','',9);\n\t\t\n\t\t/** CONSULTA PARA TRAER MATERIALES REALCIONADOS AL INVENTARIO (id_inv) \n\t\tSEGUN ALMACÉN, CORRESPONDE A UNO O VARIOS REGISTROS ASOCIADOS **/\n\t\t$dato=lectura($acceso1,\"SELECT * FROM vista_inventario_material WHERE id_inv = '$id_inv'\");\n\t\t$cantiReg = count($dato);\n\t\tfor($i=0;$i<$cantiReg;$i++){\n\t\t\t$acceso1->objeto->ejecutarSql(\"SELECT * FROM vista_inventario_material WHERE id_inv = '$id_inv'\");\n\t\t\tif($row2=row($acceso1)){\n\t\t\t\t$this->SetX(15);\n\t\t\t\t$this->Cell($w[0],5,utf8_decode(trim($dato[$i][\"codigo_mat\"])),1,0,\"C\",$fill);\n\t\t\t\t$this->Cell($w[1],5,substr(utf8_decode(trim($dato[$i][\"nombre_mat\"])),0,23),1,0,\"J\",$fill);\n\t\t\t\t$this->Cell($w[2],5,utf8_decode(trim($dato[$i][\"cant_sist\"])).\" \".utf8_decode(trim($dato[$i][\"abrev_uni_sal\"])),1,0,\"C\",$fill);\n\t\t\t\t$this->Cell($w[3],5,\" \",1,0,\"J\",$fill);\n\t\t\t\t$this->Ln();\n\t\t\t\t$fill=!$fill;\n\t\t\t}\n\t\t}\n\t\t$this->SetX(15);\n\t\t$this->Cell(180,5,'','T');\n\t\t\n\t\t$this->SetX(15);\n\t\t$this->Cell(180,4,strtoupper(_(\"Total Registros\")).\": \".$cantiReg,1,0,\"J\",0);\n\t\t\n\t\t\n\t\t$acceso2->objeto->ejecutarSql(\"SELECT encargado FROM vista_inventario WHERE id_inv='$id_inv'\");\n\t\tif($row3=row($acceso2)){\n\t\t\t$respVer=utf8_decode(trim($row3[\"encargado\"]));\n\t\t}\n\t\t$ini_u = $_SESSION[\"ini_u\"];\n\t\t$acceso2->objeto->ejecutarSql(\"SELECT (persona.nombre || ' ' || persona.apellido) AS user, usuario.inicial as inicial FROM persona, usuario WHERE persona.id_persona = usuario.id_persona and usuario.inicial = '$ini_u'\");\n\t\tif($row3=row($acceso2)){\n\t\t\t$respReg=utf8_decode(trim($row3[\"user\"]));\n\t\t\t$inicial=utf8_decode(trim($row3[\"inicial\"]));\n\t\t}\n\t\t\n\t\t/** NOTA: Colocar una nota que diga \"Debe finalizar este inventario luego de realizada la inspección, y en caso de ser necesario aplicar ajustes en el stock\" **/\n\t\t\n\t\t$this->Ln(20);\n\t\t$this->SetY(250);\n\t\t$this->SetX(15);\n\t\t$this->Cell(90,2,'________________________',0,0,'C','');\t\t\n\t\t$this->Cell(90,2,'________________________',0,0,'C','');\t\t\n\t\t$this->Ln(3);\n\t\t$this->SetX(15);\n\t\t$this->Cell(90,4,\"Registrado Por\",0,0,'C','');\n\t\t$this->Cell(90,4,\"Inspeccionado Por\",0,0,'C','');\n\t\t$this->Ln(4);\n\t\t$this->SetX(15);\n\t\t$this->Cell(90,4,$respReg.\" \".$ini_u,0,0,'C','');\n\t\t$this->Cell(90,4,$respVer,0,0,'C','');\n\t}", "title": "" }, { "docid": "7980686fa74e02d9e54d5c8fc6997745", "score": "0.5413214", "text": "protected function listCommandes()\n\t{\n\n\t\t$texte = Colors::make(\"\\n\\t Liste des commandes\", 'brown');\n\t\t$texte .= \"\\n\\t -----------------------\\n\\n\";\n\n\t\t$texte .= \"\\t controller \t: Crée une classe de controlleur\\n\"; \n\t\t$texte .= \"\\t model\t\t: Crée une classe de model\\n\";\n\t\t$texte .= \"\\t test\t\t: Crée une classe de test\\n\";\n\t\t$texte .= $this->getPlusHelp();\n\n\t\treturn $texte;\n\n\t}", "title": "" }, { "docid": "f28df47940e30dfdb97646c5c43540b9", "score": "0.5412645", "text": "function gerarCabecalho() {\r\n\r\n $margemDoCabecalho = 34;\r\n $tamHorizontalDoCabecalho = $this->larguraMaxima - 30;\r\n $tamFonteGrande = 12;\r\n $tamFonteMedia = 9;\r\n $tamFontePequena = 8;\r\n\r\n $this->Image(\"../../imagens/logorj.jpg\", $this->lMargin, $this->tMargin-6 );\r\n\r\n $this->SetX($margemDoCabecalho);\r\n $this->SetFont('Arial','',$tamFonteMedia);\r\n $txt = Config::INSTITUICAO_FILIACAO_1 . \"\\n\" .\r\n Config::INSTITUICAO_FILIACAO_2 . \"\\n\" .\r\n Config::INSTITUICAO_FILIACAO_3 . \"\\n\" .\r\n Config::INSTITUICAO_NOME_COMPLETO; \r\n $this->MultiCell($tamHorizontalDoCabecalho,4.0,$txt, $this->debug,'L');\r\n\r\n $espacamentoHorizontal = 5;\r\n\r\n $this->SetFont('Arial','',$tamFonteMedia);\r\n $txt=\"Curso: $this->siglaCurso - $this->nomeCurso\";\r\n $txt.=\"\\nSituações de Matricula: \";\r\n for($i=0; $i<sizeof($this->situacoesEscolhidas); $i++){\r\n if($i == 0){\r\n //primeira\r\n $txt.=$this->situacoesEscolhidas[$i];\r\n }else{\r\n //seguintes\r\n $txt.=', '.$this->situacoesEscolhidas[$i];\r\n }\r\n }\r\n if($this->periodoInicial != $this->periodoFinal)\r\n $txt.=\"\\nIntervalo do Período de Matrículas: $this->periodoInicial até $this->periodoFinal\";\r\n else\r\n $txt.=\"\\nPeríodo de Matrículas: $this->periodoInicial\";\r\n $txt.=\"\\nTurnos: \";\r\n for($i=0; $i<sizeof($this->turnos); $i++){\r\n if($i == 0){\r\n //primeira\r\n $txt.=$this->turnos[$i];\r\n }else{\r\n //seguintes\r\n $txt.=', '.$this->turnos[$i];\r\n }\r\n }\r\n\r\n $this->SetY(33);\r\n $this->MultiCell($tamHorizontalDoCabecalho,4.5,$txt, $this->debug,'L');\r\n\r\n $this->SetY(48);\r\n\r\n $espacamentoHorizontal = 5;\r\n\r\n }", "title": "" }, { "docid": "04544793bfe6aeba10728d9055433009", "score": "0.5402641", "text": "public function recuperarConteudo(){\r\n\t\t//Redireciona se faltar argumento de parametro\r\n\t parent::verificaArgLicao();\r\n\t\t//Redireciona se faltar argumento de parametro\r\n\t parent::verificaArgConteudo();\r\n\t\t//Adiciona o nome da lição\r\n\t\t$this->view->assign(\"nome_licao\",$_REQUEST['licao']);\r\n\t\t//Atualiza a licao\r\n\t\tif(!empty($_POST))$this->atualizarConteudoLicao();\r\n\t\t//Recupera o conteúdo da licao\r\n\t\t$this->recuperarConteudoLicao();\r\n\t\t//Exibe a view\r\n\t\t$this->view->assign(\"link\",\"conteudo\");\r\n\t\t$this->view->display(\"dashboard-conteudo-cadastro.html\");\t\t\r\n\t}", "title": "" }, { "docid": "63938041fad85f5c6c98de29f840f5b5", "score": "0.5400589", "text": "public function viewcalfrio() {\n\t\t\n\t\t$this->layout->js(array(public_url('script/pt/servcliente/servcliecalfrio.js')));\n\n\t\t$data['content_for_layout'] = 'pt/servcliente/vservcliecalfrio';\n $this->parser->parse('seguridad/vprincipalClie',$data);\n }", "title": "" }, { "docid": "8cfb3d037978f0c822bfebd198d19679", "score": "0.53974825", "text": "function llenarCatalogosModelo()\n\t{\n\t\t$this->modelo->hacerArreglosBase();\n\t}", "title": "" }, { "docid": "ca33631101ef7476ebd3630e3501e5ae", "score": "0.53932106", "text": "function getDatosCentroCosto() {\n parent::ConnectionOpen(\"pnsSeleccionaDatosCentroCostos\", \"dbweb\");\n parent::SetParameterSP(\"pOpc\", '1');\n parent::SetParameterSP(\"pCod\", '');\n parent::SetParameterSP(\"pId\", '');\n parent::SetSelect(\"*\");\n $resultadoArray = parent::executeSPArrayX();\n parent::ConnectionClose();\n return $resultadoArray;\n }", "title": "" }, { "docid": "d177b12dce4f56a503d3a8d7f14643d6", "score": "0.5386833", "text": "function crearObservaciones() {\n ?>\n <tr class=\"cuadro_plano centrar\">\n <th colspan=\"2\">\n <hr>Observaciones\n </th>\n </tr>\n <tr class=\"cuadro_plano\">\n <td colspan=\"2\">\n * Si el fondo del enlace est&aacute; en <font color=\"#F90101\">rojo</font>, significa que el grupo presenta cruce o sobrecupo.\n </td>\n </tr>\n <?\n }", "title": "" }, { "docid": "0c6932a699fc51dabf75ff914854fd16", "score": "0.5384555", "text": "function Cuerpo($acceso,$where,$deuda,$desde,$hasta)\n\t{\n\t\t$acceso->objeto->ejecutarSql(\"select id_persona from vista_orden order By id_orden desc LIMIT 1 offset 0\");\n\t\tif($row=row($acceso))\n\t\t{\n\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t}\n\t\telse{\n\t\t\t$acceso->objeto->ejecutarSql(\"select *from vista_tecnico LIMIT 1 offset 0\");\n\t\t\tif($row=row($acceso))\n\t\t\t{\n\t\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t$acceso->objeto->ejecutarSql(\"SELECT *FROM parametros where id_franq='1' and id_param='2'\");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$por_iva=trim($row['valor_param']);\n\t\t}\n\t\n\t\n\t\t\n\t\t\n\t\t$dato=lectura($acceso,$where);\n\t\n\t\t\n\t\t$cont=1;\n\t\t\n\t\t\n\t\t$salto=0;\n\t\t$f_act=date(\"d/m/Y\");\n\t\t$h_act=date(\"h:i:s A\");\n\t\t$nombre_zona=utf8_decode(trim($dato[0][\"nombre_zona\"]));\n\t\t$nombre_sector=utf8_decode(trim($dato[0][\"nombre_sector\"]));\n\t\t\n\t\t$this->SetFont('Arial','B',8);\n\t\t\t$valor=explode(\"-\",trim($desde));\n\t\t\t$des = formato_mes_com1($valor[1]). \" $valor[0] \";\n\t\t\t\n\t\t\t$valor=explode(\"-\",trim($hasta));\n\t\t\t$has = formato_mes_com1($valor[1]). \" $valor[0] \";\n\t\t\t$fecha_d=\"deuda desde $des hasta $has\";\n\t\t\t$this->cabecera($nombre_zona,$nombre_sector,$fecha_d);\n\t\t\t\n\t\t\t/*\n\t\t\t$this->SetX(10);\n\t\t\t$this->Cell(50,4,\"ZONA: $nombre_zona\",\"0\",0,\"L\");\n\t\t\t$this->Cell(50,4,\"SECTOR:: $nombre_sector\",\"0\",0,\"L\");\n\t\t\t$this->Cell(95,4,\"Deuda desde $des hasta $has\",\"0\",0,\"R\");\n\t\t\t*/\n\t\t\t\n\t\t\t\n\t\t//$this->Ln();\t\t\n\n\t\t\t$w=$this->TituloCampos();\n\t\t\t$cable=conexion();\n\t\t\t\n\t\tfor($i=0;$i<count($dato);$i++){\n\t\t\t\n\t\t\t\n\t\t\t$fill=0;\n\t\t\t$this->SetTextColor(0);\n\t\t\t$this->SetFillColor(249,249,249);\n\t\t\t\n\t\t\t$id_contrato=trim($dato[$i][\"id_contrato\"]);\n\t\t\t\n\t\t\t$nombre_sector1=utf8_decode(trim($dato[$i][\"nombre_sector\"]));\n\t\t\tif($nombre_sector!=$nombre_sector1){\n\t\t\t//\techo \":$nombre_sector!=$nombre_sector1:\";\n\t\t\t\t$this->AddPage();\n\t\t\t\t$this->cabecera($nombre_zona,$nombre_sector1,$fecha_d);\n\t\t\t\t$w=$this->TituloCampos();\n\t\t\t\t$salto=0;\n\t\t\t}\n\t\t\t\t \n\t\t\t$cable->objeto->ejecutarSql(\" SELECT servicios.nombre_servicio,servicios.id_serv,fecha_inst FROM contrato_servicio_deuda,servicios WHERE contrato_servicio_deuda.id_serv=servicios.id_serv and contrato_servicio_deuda.id_contrato = '$id_contrato' AND contrato_servicio_deuda.status_con_ser = 'DEUDA'::bpchar and fecha_inst between '$desde' and '$hasta' order by fecha_inst\");\n\t\t\t//$cable->objeto->ejecutarSql(\" SELECT servicios.nombre_servicio,servicios.id_serv,fecha_inst FROM contrato_servicio,servicios where id_contrato='$id_contrato'\");\n\t\t\t\n\t\t\t\t$nombre_servicio='';\n\t\t\t\twhile($row1=row($cable)){\n\t\t\t\t\t$id_serv=trim($row1[\"id_serv\"]);\n\t\t\t\t\t\n\t\t\t\t\tif($id_serv=='SER00001' || $id_serv=='BM00008' || $id_serv=='BM00009'){\n\t\t\t\t\t\t$fecha_inst=trim($row1[\"fecha_inst\"]);\n\t\t\t\t\t\t$me=substr($fecha_inst , 5,2);\n\t\t\t\t\t\t$mes=formato_m($me);\n\t\t\t\t\t\t$nombre_servicio=$nombre_servicio.$mes.\"; \";\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$nombre_servicio=$nombre_servicio.trim($row1[\"nombre_servicio\"]).\"; \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t//\tordenDeCorte($acceso,$id_contrato,$tecnico);\n\t\t\t\n\t\t\t$this->SetX(10);\n\t\t\t\n\t\t\t$total_p=trim($dato[$i][\"deuda\"]);\n\t\t\t$porc=($por_iva/100)+1;\n\t\t\t$base=$total_p/$porc;\n\t\t\t$iva=($base*$por_iva)/100;\n\t\t\t\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->SetX(10);\n\t\t\t$this->Cell($w[0],4,$cont,\"0\",0,\"C\",$fill);\n\t\t\t\n\t\t\t$this->Cell($w[1],4,utf8_decode(trim($dato[$i][\"nro_contrato\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[2],4,utf8_decode(trim($dato[$i][\"cedula\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[3],4,utf8_decode(trim($dato[$i][\"nombre\"]).\" \".trim($dato[$i][\"apellido\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[4],4,utf8_decode(trim($dato[$i][\"etiqueta\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[5],4,utf8_decode(trim($dato[$i][\"telefono\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[6],4,number_format($iva+0, 2, ',', '.'),\"0\",0,\"R\",$fill);\n\t\t\t$this->Cell($w[7],4,number_format($base+0, 2, ',', '.'),\"0\",0,\"R\",$fill);\n\t\t\t$this->Cell($w[8],4,number_format(trim($dato[$i][\"deuda\"])+0, 2, ',', '.'),\"0\",0,\"R\",$fill);\n\t\t\t$this->Cell($w[9],4,'',\"0\",0,\"R\",$fill);\n\t\t\t$nombre_sector=utf8_decode(trim($dato[$i][\"nombre_sector\"]));\n\t\t\n\t\t\t/*\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(12,4,_(\"zona\").\":\",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(40,4,utf8_decode(trim($dato[$i][\"nombre_zona\"])),\"TBR\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(14,4,_(\"sector\").\":\",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(50,4,utf8_decode(trim($dato[$i][\"nombre_sector\"])),\"TBR\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(12,4,_(\"calle\").\":\",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(65,4,utf8_decode(trim($dato[$i][\"nombre_calle\"])),\"TBR\",0,\"J\",$fill);\n\t\t\t\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(17,4,_(\"nro casa\").\":\",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(15,4,utf8_decode(trim($dato[$i][\"numero_casa\"])),\"TBR\",0,\"J\",$fill);\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(10,4,_(\"edif\").\":\",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(40,4,utf8_decode(trim($dato[$i][\"edificio\"])),\"TBR\",0,\"J\",$fill);\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(10,4,_(\"piso\").\":\",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(7,4,utf8_decode(trim($dato[$i][\"numero_piso\"])),\"TBR\",0,\"J\",$fill);\n\t\t\t\n\t\t\t\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->Cell(41,4,_(\"postel\").\": \".utf8_decode(trim($dato[$i][\"postel\"])),\"TBR\",0,\"J\",$fill);\n\t\t\t\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->Cell(30,4,_(\"taps\").\": \".utf8_decode(trim($dato[$i][\"taps\"])),\"TBR\",0,\"J\",$fill);\n\t\t\t\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->Cell(23,4,_(\"pto\").\": \".utf8_decode(trim($dato[$i][\"pto\"])),\"TBR\",0,\"J\",$fill);\n\t\t\t\n\t\t\t*/\n\t\t\t$this->Ln();\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(8,4,strtoupper(_(\"ref\")).\":\",\"0\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(105,4,utf8_decode(trim($dato[$i][\"direc_adicional\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->Cell(15,4,strtoupper(_(\"pto\")).\": \".utf8_decode(trim($dato[$i][\"pto\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->Cell(65,4,strtoupper(_(\"cargo\")).\": $nombre_servicio\",\"0\",0,\"J\",$fill);\n\t\t\t//$this->MultiCell(81,4,utf8_decode(trim($dato[$i][\"direc_adicional\"])),'TR','J');\n\t\t\t$this->SetFont('Arial','',2);\n\t\t\t$this->Ln();\n\t\t\t$this->SetX(114);\n\t\t//\t$this->Cell(89,3,'',\"LR\",0,\"C\",$fill);\n\t\t\t//$this->Cell(array_sum($w),3,'',\"RL\",0,\"C\",$fill);\n\t\t\t\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t//$this->Ln(1);\n\t\t\t$this->SetX(10);\n\t\t\t$this->Cell(180,2,'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ',\"0\",0,\"J\",$fill);\n\t\t\t//$this->Ln();\n\t\t\t\n\t\t\t/*\n\t\t\t$this->SetLineWidth(.4);\n\t\t\t$this->SetX(10);\n\t\t\t$this->Cell(array_sum($w),1,'','T');\n\t\t\t$this->SetLineWidth(.2);\n\t\t\t*/\n\t\t\t\n\t\t\t$this->Ln(2);\n\t\t\t$fill=!$fill;\n\t\t\t\n\t\t\t$salto++;\n\t\t\tif($salto==25 && $salto!=count($dato)){\n\t\t\t\t$this->AddPage();\n\t\t\t\t$this->cabecera($nombre_zona,$nombre_sector,$fecha_d);\n\t\t\t\t$w=$this->TituloCampos();\n\t\t\t\t$salto=0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t$cont++;\n\t\t}\n\t\t$this->SetX(10);\n\t\t//$this->Cell(array_sum($w),5,'','T');\n\t\t$cad.=\"\\\\pard\\\\par\n}\n\";\n\t\treturn $cad;\n\t}", "title": "" }, { "docid": "a650dc6a4e199632c073cfbf4b2fc18b", "score": "0.538181", "text": "function procesarFacturaElectronicaCompraVenta(){\n\t\t$this->procedimiento='vef.ft_servicio_impuestos_sel';\n\t\t$this->transaccion='VF_SRVIMP_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\n\t\t$this->setParametro('id_venta', 'id_venta', 'int4');\n\t\t$this->setParametro('nro_factura_asignar', 'nro_factura_asignar', 'int4');\n\t\t$this->setParametro('documento_sector', 'documento_sector', 'int4');\n\t\t$this->setParametro('leyenda', 'leyenda', 'text');\n\n\t\t$this->captura('jsonData','text');\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t// echo $this->consulta;exit;\n\t\t$this->ejecutarConsulta();\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n }", "title": "" }, { "docid": "92af70a3fc1976bce720ad95bd2abdd6", "score": "0.53786826", "text": "function toString(){\n parent::toString();\n echo \" su trabajo es \". $this->getCargo();\n }", "title": "" }, { "docid": "eb137ee13bdbcc8266e67a1de0927743", "score": "0.53780675", "text": "public function testeCadastroDeProdutoSemInformação()\r\n {\r\n $this->controller->cadastrarProduto(\"\", \"\", \"\", \"\", \"\", \"1\",\"\");\r\n }", "title": "" }, { "docid": "8aa9b8897d3aafe3e7be5b5dbe401d01", "score": "0.5377046", "text": "public function getCedulaCompleta(){\n return $this->nacionalidad.''.$this->cedula;\n }", "title": "" }, { "docid": "f8b03ec9c64293e509b1222cf40a0f04", "score": "0.5370366", "text": "static public function ctrAnularCompra(){\n\n\t\tif (isset($_POST[\"motivoAnula\"])) {\n\n\t\t\t$tabla = \"Compra\";\n\t\t\t$tablaVentaDetalle = \"CompraDetalle\";\n\t\t\t$item = \"CompraID\";\n\t\t\t$valor = $_POST[\"idCompraA\"];\n\n\t\t\t//FORMATEAR EL STOCK DE LOS INSUMOS\n\n\t\t\t$traigoDetalle = ControladorInsumos::ctrMostrarInsumosCompra($item, $valor);\n\n\t\t\tforeach ($traigoDetalle as $key => $value) {\n\n\t\t\t\tif ($value[\"Tipo\"] !=\"Producto\") {\n\n\t\t\t\t\t//STOCK DE INSUMOS\n\n \t \t\t$tablaInsumos = \"Insumos\";\n\t\t\t\t\t$tabla2 = \"Rubro\";\n\n\t\t\t\t\t$item = \"InsumosID\";\n\t\t\t\t\t$valor = $value[\"Id\"];\n\n\t\t\t\t\t$traerInsumos = ModeloInsumos::mdlMostrarInsumos($tablaInsumos, $tabla2, $item, $valor);\n\n\t\t\t\t\t$item1a = \"Stock\";\n\t\t\t\t\t$valor1a = $traerInsumos[\"Stock\"] - $value[\"Cantidad\"];\n\n\t\t\t\t\t$actualizoInsumo = ModeloInsumos::mdlActualizarInsumo($tablaInsumos, $item1a, $valor1a, $valor);\n\n\t\t\t\t} else {\n\n\t\t\t\t\t//STOCK DE PRODUCTOS\n\n \t \t\t$tablaProductos = \"Producto\";\n \t\t\t$tabla2 = \"Rubro\";\n\n \t\t\t$item = \"ProductoID\";\n \t\t\t$valor = $value[\"Id\"];\n \t\t\t$orden = \"ProductoID\";\n\n \t\t\t$traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $tabla2, $item, $valor, $orden);\n\n \t\t\t$item1b = \"Stock\";\n\t\t\t\t\t$valor1b = $traerProducto[\"Stock\"] - $value[\"Cantidad\"];\n\n\t\t\t\t\t$actualizoProducto = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valor);\n\n\t\t\t\t}\n\n\n\t\t\t}\n\n\t\t\t//ANULAMOS LA COMPRA\n\n\t\t\t$datos = array(\"UsuarioAnulaID\" => $_POST[\"idUsuarioAnula\"],\n\t\t\t\t\t\t \t\t\"compraID\" => $_POST[\"idCompraA\"],\n\t\t\t\t\t\t \t\t\"motivo\" => $_POST[\"motivoAnula\"]);\n\n\t\t\t$respuesta = ModeloCompras::mdlAnularCompra($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\ttitle:\"¡Anulación Exitosa!\",\n\t\t\t\t\t\t\ttext:\"¡La compra se anuló correctamente!\",\n\t\t\t\t\t\t\ttype:\"success\",\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},\n\t\t\t\t\t\t\tfunction(isConfirm){\n\t\t\t\t\t\t\t\tif(isConfirm){\n\t\t\t\t\t\t\t\t\twindow.location=\"compras\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t</script>';\n\n\t\t\t}else{\n\n\t\t\t\techo'<script>\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttitle:\"¡Registro Fallido!\",\n\t\t\t\t\t\t\ttext:\"¡Ocurrio un error, revise los datos!'.$respuesta.'\",\n\t\t\t\t\t\t\ttype:\"error\",\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});\n\t\t\t\t\t</script>';\n\n\t\t\t}\n\n\n\t\t} // FIN IF\n\n\t}", "title": "" }, { "docid": "3e23a6b7bc410f00348b4cad416a91ef", "score": "0.53656423", "text": "public static function basico(){\n $folios = [\n 33 => 9, // factura electrónica\n 61 => 7, // nota de crédito electrónicas\n 56 => 3, // nota de débito electrónica\n ];\n\n // caratula para el envío de los dte\n $caratula = [\n 'RutEnvia' => '13412179-3',\n 'RutReceptor' => '60803000-K',\n 'FchResol' => '2020-11-01',\n 'NroResol' => 0,\n ];\n\n // datos del emisor\n $Emisor = [\n 'RUTEmisor' => '76881221-7',\n 'RznSoc' => 'JOSÉ FRANCISCO TRONCOSO TRONCOSO REPUESTOS AUTOMOTRICES E.I.R.L.',\n 'GiroEmis' => 'COMPRA Y VENTA DE REPUESTOS DE VEHICULOS MOTORIZADOS',\n 'Acteco' => 453000,\n 'DirOrigen' => 'Arica',\n 'CmnaOrigen' => 'Arica',\n ];\n\n $Receptor=[\n 'RUTRecep' => '60803000-K',\n 'RznSocRecep' => 'Servicio Impuestos Internos',\n 'GiroRecep' => 'Estado',\n 'DirRecep' => 'Santiago',\n 'CmnaRecep' => 'Santiago'\n ];\n\n // datos de los DTE (cada elemento del arreglo $set_pruebas es un DTE)\n $set_pruebas = [\n // CASO 1595775-1 FACTURA ELECTRONICA NORMAL\n [\n 'Encabezado' => [\n 'IdDoc' => [\n 'TipoDTE' => 33,\n 'Folio' => $folios[33],\n ],\n 'Emisor' => $Emisor,\n 'Receptor' => $Receptor\n ],\n 'Detalle' => [\n [\n 'NmbItem' => 'Cajón AFECTO',\n 'QtyItem' => 152,\n 'PrcItem' => 2582,\n ],\n [\n 'NmbItem' => 'Relleno AFECTO',\n 'QtyItem' => 65,\n 'PrcItem' => 4278,\n ],\n ],\n 'Referencia' => [\n 'TpoDocRef' => 'SET',\n 'FolioRef' => $folios[33],\n 'RazonRef' => 'CASO 1595775-1',\n ],\n ],\n // CASO 1595775-2 FACTURA ELECTRONICA CON DESCUENTOS POR ITEMS\n [\n 'Encabezado' => [\n 'IdDoc' => [\n 'TipoDTE' => 33,\n 'Folio' => $folios[33]+1,\n ],\n 'Emisor' => $Emisor,\n 'Receptor' => $Receptor\n ],\n 'Detalle' => [\n [\n 'NmbItem' => 'Pañuelo AFECTO',\n 'QtyItem' => 573,\n 'PrcItem' => 4478,\n 'DescuentoPct' => 8,\n ],\n [\n 'NmbItem' => 'ITEM 2 AFECTO',\n 'QtyItem' => 511,\n 'PrcItem' => 3533,\n 'DescuentoPct' => 17,\n ],\n ],\n 'Referencia' => [\n 'TpoDocRef' => 'SET',\n 'FolioRef' => $folios[33]+1,\n 'RazonRef' => 'CASO 1595775-2',\n ],\n ],\n // CASO 1595775-3 FACTURA ELECTRONICA CON ITEM EXENTO\n [\n 'Encabezado' => [\n 'IdDoc' => [\n 'TipoDTE' => 33,\n 'Folio' => $folios[33]+2,\n ],\n 'Emisor' => $Emisor,\n 'Receptor' => $Receptor\n ],\n 'Detalle' => [\n [\n 'NmbItem' => 'Pintura B&W AFECTO',\n 'QtyItem' => 44,\n 'PrcItem' => 5244,\n ],\n [\n 'NmbItem' => 'ITEM 2 AFECTO',\n 'QtyItem' => 205,\n 'PrcItem' => 3574,\n ],\n [\n 'IndExe' => 1,\n 'NmbItem' => 'ITEM 3 SERVICIO EXENTO',\n 'QtyItem' => 1,\n 'PrcItem' => 35084,\n ],\n ],\n 'Referencia' => [\n 'TpoDocRef' => 'SET',\n 'FolioRef' => $folios[33]+2,\n 'RazonRef' => 'CASO 1595775-3',\n ],\n ],\n // CASO 1595775-4 FACTURA ELECTRÓNICA CON DESCUENTO GLOBAL\n [\n 'Encabezado' => [\n 'IdDoc' => [\n 'TipoDTE' => 33,\n 'Folio' => $folios[33]+3,\n ],\n 'Emisor' => $Emisor,\n 'Receptor' => $Receptor\n ],\n 'Detalle' => [\n [\n 'NmbItem' => 'ITEM 1 AFECTO',\n 'QtyItem' => 296,\n 'PrcItem' => 4416,\n ],\n [\n 'NmbItem' => 'ITEM 2 AFECTO',\n 'QtyItem' => 126,\n 'PrcItem' => 5153,\n ],\n [\n 'IndExe' => 1,\n 'NmbItem' => 'ITEM 3 SERVICIO EXENTO',\n 'QtyItem' => 2,\n 'PrcItem' => 6810,\n ],\n ],\n 'DscRcgGlobal' => [\n 'TpoMov' => 'D',\n 'TpoValor' => '%',\n 'ValorDR' => 17,\n ],\n 'Referencia' => [\n 'TpoDocRef' => 'SET',\n 'FolioRef' => $folios[33]+3,\n 'RazonRef' => 'CASO 1595775-4',\n ],\n ],\n // CASO 1595775-5 NOTA CREDITO CORRIGE GIRO RECEPTOR DE CASO 1595775-1\n [\n 'Encabezado' => [\n 'IdDoc' => [\n 'TipoDTE' => 61,\n 'Folio' => $folios[61],\n ],\n 'Emisor' => $Emisor,\n 'Receptor' => $Receptor,\n 'Totales' => [\n 'MntTotal' => 0,\n ]\n ],\n 'Detalle' => [\n [\n 'NmbItem' => 'Cajón AFECTO',\n ],\n ],\n 'Referencia' => [\n [\n 'TpoDocRef' => 'SET',\n 'FolioRef' => $folios[61],\n 'RazonRef' => 'CASO 1595775-5',\n ],\n [\n 'TpoDocRef' => 33,\n 'FolioRef' => $folios[33],\n 'CodRef' => 2,\n 'RazonRef' => 'CORRIGE GIRO DEL RECEPTOR',\n ],\n ]\n ],\n // CASO 1595775-6 NOTA CREDITO ELECTRONICA DEVUELVE MERCADERIAS CASO 1595775-2\n [\n 'Encabezado' => [\n 'IdDoc' => [\n 'TipoDTE' => 61,\n 'Folio' => $folios[61]+1,\n ],\n 'Emisor' => $Emisor,\n 'Receptor' => $Receptor,\n 'Totales' => [\n // estos valores serán calculados automáticamente\n 'MntNeto' => 0,\n 'TasaIVA' => 19,\n 'IVA' => 0,\n 'MntTotal' => 0,\n ],\n ],\n 'Detalle' => [\n [\n 'NmbItem' => 'Pañuelo AFECTO',\n 'QtyItem' => 210,\n 'PrcItem' => 4478, //copiar el precio unitario del caso 2\n 'DescuentoPct' => 8,\n ],\n [\n 'NmbItem' => 'ITEM 2 AFECTO',\n 'QtyItem' => 347,\n 'PrcItem' => 3533, //copiar el precio unitario del caso 2\n 'DescuentoPct' => 17,\n ],\n ],\n 'Referencia' => [\n [\n 'TpoDocRef' => 'SET',\n 'FolioRef' => $folios[61]+1,\n 'RazonRef' => 'CASO 1595775-6',\n ],\n [\n 'TpoDocRef' => 33,\n 'FolioRef' => $folios[33]+1,\n 'CodRef' => 3,\n 'RazonRef' => 'DEVOLUCION DE MERCADERIAS',\n ],\n ]\n ],\n // CASO 1595775-7 NOTA CREDITO ELECTRONICA ANULA FACTURA CASO 3\n [\n 'Encabezado' => [\n 'IdDoc' => [\n 'TipoDTE' => 61,\n 'Folio' => $folios[61]+2,\n ],\n 'Emisor' => $Emisor,\n 'Receptor' => $Receptor,\n 'Totales' => [\n // estos valores serán calculados automáticamente\n 'MntNeto' => 0,\n 'MntExe' => 0,\n 'TasaIVA' => 19,\n 'IVA' => 0,\n 'MntTotal' => 0,\n ],\n ],\n 'Detalle' => [//COPIAR CANTIDADES Y PRECIOS DEL CASO 3\n [\n 'NmbItem' => 'Pintura B&W AFECTO',\n 'QtyItem' => 44,\n 'PrcItem' => 5244,\n ],\n [\n 'NmbItem' => 'ITEM 2 AFECTO',\n 'QtyItem' => 205,\n 'PrcItem' => 3574,\n ],\n [\n 'IndExe' => 1,\n 'NmbItem' => 'ITEM 3 SERVICIO EXENTO',\n 'QtyItem' => 1,\n 'PrcItem' => 35084,\n ],\n ],\n 'Referencia' => [\n [\n 'TpoDocRef' => 'SET',\n 'FolioRef' => $folios[61]+2,\n 'RazonRef' => 'CASO 1595775-7',\n ],\n [\n 'TpoDocRef' => 33,\n 'FolioRef' => $folios[33]+2,\n 'CodRef' => 1,\n 'RazonRef' => 'ANULA FACTURA',\n ],\n ]\n ],\n // CASO 1347240-8 NOTA DEBITO ELECTRONICA ANULA NOTA DE CREDITO CASO 5\n [\n 'Encabezado' => [\n 'IdDoc' => [\n 'TipoDTE' => 56,\n 'Folio' => $folios[56],\n ],\n 'Emisor' => $Emisor,\n 'Receptor' =>$Receptor,\n 'Totales' => [\n 'MntTotal' => 0,\n ],\n ],\n 'Detalle' => [\n [\n 'NmbItem' => 'Cajón AFECTO',\n ],\n ],\n 'Referencia' => [\n [\n 'TpoDocRef' => 'SET',\n 'FolioRef' => $folios[56],\n 'RazonRef' => 'CASO 1595775-8',\n ],\n [\n 'TpoDocRef' => 61,\n 'FolioRef' => $folios[61],\n 'CodRef' => 1,\n 'RazonRef' => 'ANULA NOTA DE CREDITO ELECTRONICA',\n ],\n ]\n ],\n ];\n\n // Objetos de Firma, Folios y EnvioDTE\n $Firma=self::dame_firma();\n if($Firma===false){\n return \"archivo de firma errado.\";\n }\n\n $Folios = [];\n foreach ($folios as $tipo => $cantidad){\n $Folios[$tipo] = new Folios(file_get_contents(base_path().'/xml/folios/'.$tipo.'.xml'));\n }\n\n $EnvioDTE = new EnvioDte();\n\n // generar cada DTE, timbrar, firmar y agregar al sobre de EnvioDTE\n foreach ($set_pruebas as $documento) {\n $DTE = new Dte($documento);\n if (!$DTE->timbrar($Folios[$DTE->getTipo()]))\n break;\n if (!$DTE->firmar($Firma))\n break;\n $EnvioDTE->agregar($DTE);\n }\n\n // enviar dtes y mostrar resultado del envío: track id o bien =false si hubo error\n $EnvioDTE->setCaratula($caratula);\n $EnvioDTE->setFirma($Firma);\n $nombre='set_basico_'.intval(microtime(true));\n file_put_contents(base_path().'/xml/generados/'.$nombre.'.xml', $EnvioDTE->generar()); // guardar XML en sistema de archivos\n return \"Listo: \".$nombre.'.xml en /xml/generados';\n }", "title": "" }, { "docid": "5f5b8e1aa80b746149de45bad998c860", "score": "0.5365072", "text": "function TituloCampos()\n\t{\n\t\t\n\t\t//$this->SetFillColor(244,249,255);\n\t\t$this->SetDrawColor(195,212,235);\n\t\t$this->SetLineWidth(.2);\n\t\t//dimenciones de cada campo\n\t\t$w=array(10,20,21,74,25,25,18);\n\t\t$header=array('Nro','Contrato','Cedula','Nombre y Apellido','Etiqueta','Telefono','Deuda');\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->SetX(10);\n\t\tfor($k=0;$k<count($header);$k++)\n\t\t\t$this->Cell($w[$k],6,strtoupper($header[$k]),\"0\",0,'J',0);\n\t\t$this->Ln();\n\t\treturn $w;\n\t}", "title": "" }, { "docid": "c230fb7000927f65710c300a7ed35583", "score": "0.5363326", "text": "function seleccionarObraSegui() {\n\tglobal $BD;\n\t$BD->query(\"SELECT id_obra, nombre, tipo_proy \"\n\t\t. \"FROM con_obras \"\n\t\t. \"ORDER BY tipo_proy, nombre \");\n\t$html = \"<div id=\\\"div_sele_obra_act\\\">\\n<h1>Seleccionar obra</h1>\\n\";\n\t\n if ($BD->numRows() > 0) {\n\t\t$html .= \"<table class=\\\"listado\\\" cellspacing=\\\"0\\\">\\n\"\n\t\t\t. \"<tr>\\n\"\n\t\t\t. \"<th>OBRA</th>\\n\"\n\t\t\t. \"<th>TIPO</th>\\n\"\n\t\t\t. \"<th>ACCIONES</th>\\n\"\n\t\t\t. \"</tr>\\n\";\n\t\twhile ($reg = $BD->getNext()) {\n\t\t\t$id = $reg['id_obra'];\n\t\t\t$acciones = array();\n\t\t\tif (tienePermiso(ID_ROL_SEGUI, 'ver')) {\n\t\t\t\t$acciones[] = enlace('?r=' . SEGUI_LISTAR . $id, 'Seleccionar', \"Ver las actividades de la obra: {$reg['nombre']}\");\n\t\t\t}\n\t\t\t$html .= \"<tr>\\n\"\n\t\t\t. \"<td>{$reg['nombre']}</td>\"\n\t\t\t. \"<td>{$reg['tipo_proy']}</td>\"\n\t\t\t. \"<td>\" . implode('|', $acciones)\n\t\t\t. \"</td>\"\n\t\t\t. \"</tr>\\n\";\n\t\t}\n\t\t$html .= \"</table>\";\n\t} else {\n\t\t$html .= mensajeNoExistenRegistros();\n\t}\n\t$html .= \"</div>\";\n\treturn $html;\n}", "title": "" }, { "docid": "54f8d64623fbda96f36323612ffa90e1", "score": "0.53607297", "text": "static public function ctrRuta(){\n\n\t\treturn \"http://localhost/reservas-h/\"; /* roota para uso frontend */ /* donde ponemos nuestro dominio en caso del desplegue en un vps */\n\n\t}", "title": "" }, { "docid": "f97872cef6130c8cde5892a4d71544ee", "score": "0.5357764", "text": "function camion(){\n //this es para hacer referencia la porpia clase\n $this->ruedas=8;\n $this->color=\"grey\";\n $this->motor=3600;\n \n }", "title": "" }, { "docid": "32edd1d770c8566e9a7db8f253f22661", "score": "0.53563154", "text": "function crearObservaciones() {\n ?>\n <tr class=\"cuadro_plano centrar\">\n <th colspan=\"2\">\n <hr>Observaciones\n </th>\n </tr>\n <tr class=\"cuadro_plano\">\n <td colspan=\"2\">\n * Si el fondo del enlace est&aacute; en <font color=\"#F90101\">rojo</font>, significa que el grupo presenta cruce o sobrecupo.\n </td>\n </tr>\n <?\n }", "title": "" }, { "docid": "b31ed501eb0d111643a1ea2749dee3e4", "score": "0.5353738", "text": "function TituloCampos()\n\t{\n\t\t\n\t\t$this->SetFillColor(244,249,255);\n\t\t$this->SetDrawColor(225,240,255);\n\t\t$this->SetLineWidth(.2);\n\t\t//dimenciones de cada campo\n\t\t$w=array(10,70,25,20,20,25,80);\n\t\t$header=array(strtoupper(_('nro')),strtoupper(_('Estacion de trabajo')),strtoupper(_('reporte z')),strtoupper(_('fecha')),strtoupper(_('hora')),strtoupper(_('TOTAL')),strtoupper(_('OBSERVACION')));\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->SetX(15);\n\t\tfor($k=0;$k<count($header);$k++)\n\t\t\t$this->Cell($w[$k],7,$header[$k],1,0,'J',1);\n\t\t$this->Ln();\n\t\treturn $w;\n\t}", "title": "" }, { "docid": "6e3381ede8ab9e29780d2e5e8829be60", "score": "0.5351546", "text": "function getDatosEditaCentroCosto($pId, $pDescripcion, $pAbrev, $pActivo, $pUsuario, $pObser, $estacion) {\n parent::ConnectionOpen(\"pnsAccionesCentroCostos\", \"dbweb\");\n parent::SetParameterSP(\"pOpc\", '2');\n parent::SetParameterSP(\"pId\", $pId);\n parent::SetParameterSP(\"pCodCC\", '');\n parent::SetParameterSP(\"pCodJ\", '');\n parent::SetParameterSP(\"pDescripcion\", $pDescripcion);\n parent::SetParameterSP(\"pNivel\", '');\n parent::SetParameterSP(\"pActivo\", $pActivo);\n parent::SetParameterSP(\"pUsuario\", $pUsuario);\n parent::SetParameterSP(\"pAbrev\", $pAbrev);\n parent::SetParameterSP(\"pObser\", $pObser);\n parent::SetParameterSP(\"pEstac\", $estacion);\n parent::SetSelect(\"*\");\n $resultadoArray = parent::executeSPArrayX();\n parent::ConnectionClose();\n return $resultadoArray;\n }", "title": "" }, { "docid": "29756999b1158ae1a06c317956c6c8de", "score": "0.5341009", "text": "function TituloCampos()\n\t{\n\t\t\n\t\t$this->SetFillColor(244,249,255);\n\t\t$this->SetDrawColor(225,240,255);\n\t\t$this->SetLineWidth(.2);\n\t\t//dimenciones de cada campo\n\t\t$w=array(20,25,15,25,15,25,15,20,20,25,18,18,20);\n\t\t$header=array(strtoupper(_('fecha')),strtoupper(_('mant. Z1')),strtoupper(_('n f.')),strtoupper(_('mant. Z2')),strtoupper(_('n f.')),strtoupper(_('mant. Z3')),strtoupper(_('n f.')),strtoupper(_('cable')),strtoupper(_('afil. y der.')),strtoupper(_('trasl. y rec.')),strtoupper(_('base')),strtoupper(_('iva')),strtoupper(_('total')));\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->SetX(10);\n\t\tfor($k=0;$k<count($header);$k++)\n\t\t\t$this->Cell($w[$k],7,$header[$k],1,0,'C',1);\n\t\t$this->Ln();\n\t\treturn $w;\n\t}", "title": "" }, { "docid": "ad36651902cfa472a96eba87c0854898", "score": "0.53374", "text": "private function contabilizaInteracoesGrupo(){\n\t}", "title": "" }, { "docid": "4ae6f5a79f62df68922ebf0055a4416a", "score": "0.5335506", "text": "function Detalhe() {\n extract($GLOBALS);\n global $w_Disabled;\n $w_chave = $_REQUEST['w_chave'];\n $w_chave_pai = $_REQUEST['w_chave_pai'];\n $w_chave_aux = $_REQUEST['w_chave_aux'];\n $w_edita = nvl($_REQUEST['w_edita'],'S');\n\n // Recupera todos os dados do projeto e rubrica\n $sql = new db_getSolicData; $RS_Solic = $sql->getInstanceOf($dbms,$w_chave_pai,'PJGERAL');\n $w_inicio_projeto = formataDataEdicao(f($RS_Solic,'inicio'));\n $w_fim_projeto = formataDataEdicao(f($RS_Solic,'fim'));\n $w_projeto = nvl(f($RS_Solic,'codigo_interno'),$w_chave_pai).' - '.f($RS_Solic,'titulo').' ('.$w_inicio_projeto.' - '.$w_fim_projeto.')';\n $w_valor_projeto = f($RS_Solic,'valor');\n \n // Recupera os dados da rubrica informada\n $sql = new db_getSolicRubrica; $RS_Rubrica = $sql->getInstanceOf($dbms,$w_chave_pai,$w_chave,null,null,null,null,null,null,null);\n foreach($RS_Rubrica as $row) { $RS_Rubrica = $row; break; }\n\n // Recupera os lançamentos da rubrica\n $sql = new db_getSolicRubrica; $RS = $sql->getInstanceOf($dbms,$w_chave_pai,$w_chave,null,null,null,null,$p_inicio,$p_fim,'PJEXECL'.$p_concluido);\n\n cabecalho();\n head();\n ShowHTML('<TITLE>'.$conSgSistema.' - Relatório</TITLE>');\n ShowHTML('<BASE HREF=\"' . $conRootSIW . '\">');\n ShowHTML('</HEAD>');\n BodyOpenClean('onLoad=\\'this.focus()\\';'); \n ShowHTML('<B><FONT COLOR=\"#000000\">'.$w_TP.'</font></B>');\n ShowHTML('<hr/>');\n ShowHTML('<div align=center>');\n ShowHTML('<tr><td colspan=\"2\"><table border=\"0\" width=\"100%\">');\n ShowHTML('<tr><td colspan=\"2\"><hr NOSHADE color=#000000 size=2></td></tr>');\n ShowHTML(' <tr><td colspan=\"2\" bgcolor=\"#f0f0f0\"><div align=justify>Projeto:<b> '.$w_projeto.'</b></div></td></tr>');\n ShowHTML(' <tr><td colspan=\"2\" bgcolor=\"#f0f0f0\"><div align=justify>Rubrica:<b> '.f($RS_Rubrica,'codigo').' - '.f($RS_Rubrica,'nome').' </b></div></td></tr>');\n ShowHTML('<tr><td colspan=\"2\"><hr NOSHADE color=#000000 size=2></td></tr>');\n\n $w_filtro = '';\n if ($p_inicio!='') $w_filtro = $w_filtro . '<tr valign=\"top\"><td align=\"right\">Pagamento realizado de <td><b>' . $p_inicio . '</b> até <b>' . $p_fim . '</b>';\n ShowHTML('<tr><td align=\"left\" colspan=2>');\n if ($w_filtro > '') ShowHTML('<table border=0>' . $w_filtro . '</table>');\n\n ShowHTML('<tr><td><a accesskey=\"F\" class=\"ss\" HREF=\"javascript:this.status.value;\" onClick=\"window.close(); opener.focus();\"><u>F</u>echar</a>&nbsp;');\n ShowHTML(' <td align=\"right\">'.exportaOffice().'<b>Registros: '.count($RS));\n ShowHTML('<tr><td align=\"center\" colspan=3>');\n ShowHTML(' <TABLE class=\"tudo\" WIDTH=\"100%\" bgcolor=\"'.$conTableBgColor.'\" BORDER=\"'.$conTableBorder.'\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\">');\n if ($w_tipo!='WORD') {\n ShowHTML(' <td><b>'.LinkOrdena('Rubrica','or_rubrica').'</td>');\n ShowHTML(' <td><b>'.LinkOrdena('Lançamento','or_financeiro').'</td>');\n ShowHTML(' <td><b>'.LinkOrdena('Descrição','descricao').'</td>');\n ShowHTML(' <td><b>'.LinkOrdena('Valor','valor').'</td>');\n } else {\n ShowHTML(' <td><b>Rubrica</b></td>');\n ShowHTML(' <td><b>Lançamento</b></td>');\n ShowHTML(' <td><b>Descrição</b></td>');\n ShowHTML(' <td><b>valor</b></td>');\n }\n ShowHTML(' </tr>');\n if (count($RS)==0) {\n // Se não foram selecionados registros, exibe mensagem\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=8 align=\"center\"><b>Não foram encontrados registros.</b></td></tr>');\n } else {\n if ($p_ordena>'') { \n $lista = explode(',',str_replace(' ',',',$p_ordena));\n $RS = SortArray($RS,$lista[0],$lista[1],'or_rubrica','asc','or_financeiro','asc');\n } else {\n $RS = SortArray($RS,'or_rubrica','asc','or_financeiro','asc');\n }\n unset($Total);\n foreach ($RS as $row) {\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor;\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\n ShowHTML(' <td align=\"center\">'.f($row,'cd_rubrica').'</td>');\n ShowHTML(' <td nowrap>');\n ShowHTML(ExibeImagemSolic(f($row,'sg_menu'),f($row,'inicio'),f($row,'vencimento'),f($row,'inicio'),f($row,'quitacao'),f($row,'aviso_prox_conc'),f($row,'aviso'),f($row,'sg_tramite'), null));\n ShowHTML(' '.exibeSolic($w_dir,f($row,'sq_financeiro'),f($row,'cd_financeiro'),'N',$w_tipo).'</td>');\n ShowHTML(' <td>'.f($row,'descricao').'</td>');\n ShowHTML(' <td align=\"right\" nowrap>'.f($row,'sb_moeda').' '.formatNumber(f($row,'valor')).'</td>');\n ShowHTML(' </tr>');\n if (nvl($Total[f($row,'sb_moeda')],'')=='') $Total[f($row,'sb_moeda')] = f($row,'valor'); else $Total[f($row,'sb_moeda')] += f($row,'valor');\n } \n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\n ShowHTML(' <td align=\"right\" colspan=\"3\"><b>Tota'.((count($Total)==1) ? 'l' : 'is').'&nbsp;</b></td>');\n ShowHTML(' <td align=\"right\" nowrap><b>');\n $i = 0;\n ksort($Total);\n foreach($Total as $k => $v) { echo((($i) ? '<div></div>' : '').$k.' '.formatNumber($v,2)); $i++; }\n echo('</td>');\n ShowHTML(' </tr>');\n } \n ShowHTML(' </table>');\n ShowHTML(' </td>');\n ShowHTML('</tr>');\n\n ShowHTML('</table>');\n Rodape();\n}", "title": "" }, { "docid": "4f4f937db03076a3131aacff3cd45388", "score": "0.53333545", "text": "function menuCoordinador($variable)\r\n {\r\n ?>\r\n<script language=\"javascript\">\r\n var navegador = navigator.userAgent;\r\n function navega()\r\n {\r\n if (navigator.userAgent.indexOf('MSIE') !=-1)\r\n {\r\n document.write(\"Por favor utilice <b>Firefox</b> para realizar este proceso.\");\r\n document.execCommand('Stop');\r\n } else if (navigator.userAgent.indexOf('Firefox') !=-1)\r\n {\r\n } else if (navigator.userAgent.indexOf('Chrome') !=-1)\r\n {\r\n document.write(\"Por favor utilice <b>Firefox</b> para realizar este proceso.\");\r\n window.stop();\r\n } else if (navigator.userAgent.indexOf('Opera') !=-1)\r\n {\r\n document.write(\"Por favor utilice <b>Firefox</b> para realizar este proceso.\");\r\n window.stop();\r\n document.execCommand('Stop');\r\n } else\r\n { \r\n document.write(\"Por favor utilice <b>Firefox</b> para realizar este proceso.\");\r\n window.stop();\r\n document.execCommand('Stop');\r\n }\r\n }</script><? \r\n $this->codProyecto=$variable[0];\r\n $preinscritos=$inscritos=0;\r\n $eventoInscripcion=$this->consultarEventoInscripcionAutomatica($variable);\r\n $inscripcion=$this->consultarInscripcionAutomatica($variable);\r\n $ejecucion=$this->consultarEjecucionInscripcion();\r\n $inscripciones=$this->consultarInscripcionesProyecto($variable);\r\n $this->inscripciones=$inscripciones;\r\n ?>\r\n\r\n<table class=\"sigma_borde centrar\" width=\"100%\">\r\n <caption class=\"sigma\">INSCRIPCI&Oacute;N AUTOM&Aacute;TICA DEL PROYECTO CURRICULAR</caption>\r\n<tr class=\"centrar\">\r\n <td colspan=\"2\" class=\"sigma centrar\" width=\"50%\" style=\"font-size: 15px\">\r\n <?echo $variable[1]?>\r\n </td>\r\n </tr>\r\n \r\n<?\r\n if(!is_array($eventoInscripcion))\r\n {\r\n ?> \r\n \r\n<tr class=\"centrar\">\r\n <td colspan=\"2\" class=\"sigma centrar\" width=\"50%\" style=\"font-size: 15px;\">\r\n <?echo \"<br>En este momento se encuentran cerradas las fechas para realizar la Inscripci&oacute;n autom&aacute;tica.<br>\";?>\r\n </td>\r\n </tr><?exit;\r\n }elseif(is_array($inscripcion)&&!empty($inscripcion['FIN']))\r\n {\r\n ?> \r\n \r\n<tr class=\"centrar\">\r\n <td colspan=\"2\" class=\"sigma centrar\" width=\"50%\" style=\"font-size: 15px;\">\r\n <?echo \"<br>Este Proyecto Curricular ya ejecutó la Inscripci&oacute;n autom&aacute;tica.<br>\";?>\r\n </td>\r\n </tr><?$inscritos=1;\r\n }elseif(is_array($ejecucion))\r\n {\r\n ?> \r\n \r\n<tr class=\"centrar\">\r\n <td colspan=\"2\" class=\"sigma centrar\" width=\"50%\" style=\"font-size: 15px;\">\r\n <?echo \"<br>En este momento se est&aacute; ejecutando la Inscripci&oacute;n autom&aacute;tica para el Proyecto. Por favor espere.<br>\";?>\r\n </td>\r\n </tr><?exit;\r\n }elseif (is_array($inscripcion)) {\r\n $preinscritos=1;\r\n ?> \r\n \r\n <tr class=\"centrar\">\r\n <td colspan=\"2\" class=\"sigma centrar\" width=\"50%\" style=\"font-size: 15px\">\r\n <div class=\"navdiv\">\r\n <script type=\"text/javascript\">\r\n navega();\r\n </script>\r\n </div> \r\n \r\n <?\r\n $pagina=$this->configuracion[\"host\"].$this->configuracion[\"site\"].\"/index.php?\";\r\n $ruta=\"pagina=registro_inscripcionAutomaticaCoordinador\";\r\n $ruta.=\"&opcion=borrarInscripcion\";\r\n $ruta.=\"&codProyecto=\".$variable[0];\r\n $ruta.=\"&nombreProyecto=\".$variable[1];\r\n\r\n include_once($this->configuracion[\"raiz_documento\"].$this->configuracion[\"clases\"].\"/encriptar.class.php\");\r\n $this->cripto=new encriptar();\r\n $ruta=$this->cripto->codificar_url($ruta,$this->configuracion);\r\n ?>\r\n\r\n <a href=\"<?= $pagina.$ruta ?>\" onclick=\"mostrarDiv()\" style=\"color:#FF0000;\">Ya existen datos de Inscripci&oacute;n autom&aacute;tica<br>¿Desea borrarlos y ejecutarla nuevamente?<br>\r\n <img src=\"<?echo $this->configuracion['site'].$this->configuracion['grafico']?>/preinscripcion/borrar.png\" width=\"50\" height=\"50\" border=\"0\" alt=\"Inscripcion por Grupo\"><br>Borrar Datos\r\n </a>\r\n </td>\r\n\r\n </tr>\r\n<?\r\n \r\n }else{if(is_array($inscripcion)&&!empty($inscripcion['FIN']))\r\n {\r\n ?> \r\n \r\n<tr class=\"centrar\">\r\n <td colspan=\"2\" class=\"sigma centrar\" width=\"50%\" style=\"font-size: 15px;\">\r\n <?echo \"<br>Este Proyecto Curricular ya ejecutó la Inscripci&oacute;n autom&aacute;tica.<br>\";?>\r\n </td>\r\n </tr><?$inscritos=1;\r\n }else{\r\n \r\n ?> \r\n \r\n <tr class=\"centrar\">\r\n <td colspan=\"2\" class=\"sigma centrar\" width=\"50%\" style=\"font-size: 15px\">\r\n <div class=\"navdiv\">\r\n <script type=\"text/javascript\">\r\n navega();\r\n </script>\r\n </div> \r\n \r\n <?\r\n $pagina=$this->configuracion[\"host\"].$this->configuracion[\"site\"].\"/index.php?\";\r\n $ruta=\"pagina=registro_inscripcionAutomaticaCoordinador\";\r\n $ruta.=\"&opcion=ejecutarInscripcion\";\r\n $ruta.=\"&codProyecto=\".$variable[0];\r\n $ruta.=\"&nombreProyecto=\".$variable[1];\r\n\r\n include_once($this->configuracion[\"raiz_documento\"].$this->configuracion[\"clases\"].\"/encriptar.class.php\");\r\n $this->cripto=new encriptar();\r\n $ruta=$this->cripto->codificar_url($ruta,$this->configuracion);\r\n ?>\r\n\r\n <a href=\"<?= $pagina.$ruta ?>\" onclick=\"mostrarDiv()\">Ejecutar Inscripci&oacute;n autom&aacute;tica<br>(Este proceso tardará varios segundos en concluir)<br>\r\n <img src=\"<?echo $this->configuracion['site'].$this->configuracion['grafico']?>/preinscripcion/preinscripcion_hab.png\" width=\"50\" height=\"50\" border=\"0\" alt=\"Inscripcion por Grupo\">\r\n </a>\r\n </td>\r\n\r\n </tr>\r\n <?}\r\n \r\n }\r\n if ($inscritos==0)\r\n {\r\n if(is_array($inscripciones)&&($inscripciones[0]['TOTAL'])>0)\r\n {\r\n?>\r\n <tr class=\"centrar\">\r\n <td colspan=\"2\" class=\"sigma centrar\" width=\"50%\" style=\"font-size: 15px\">\r\n <div class=\"navdiv\">\r\n <script type=\"text/javascript\">\r\n navega();\r\n </script>\r\n </div> \r\n \r\n <?\r\n $pagina=$this->configuracion[\"host\"].$this->configuracion[\"site\"].\"/index.php?\";\r\n $ruta=\"pagina=registro_inscripcionAutomaticaCoordinador\";\r\n $ruta.=\"&opcion=publicarInscripcion\";\r\n $ruta.=\"&codProyecto=\".$variable[0];\r\n $ruta.=\"&nombreProyecto=\".$variable[1];\r\n\r\n include_once($this->configuracion[\"raiz_documento\"].$this->configuracion[\"clases\"].\"/encriptar.class.php\");\r\n $this->cripto=new encriptar();\r\n $ruta=$this->cripto->codificar_url($ruta,$this->configuracion);\r\n ?>\r\n\r\n <br><a href=\"<?= $pagina.$ruta ?>\">Publicar Inscripci&oacute;n autom&aacute;tica<br>\r\n <img src=\"<?echo $this->configuracion['site'].$this->configuracion['grafico']?>/preinscripcion/inscripcion_hab.png\" width=\"50\" height=\"50\" border=\"0\" alt=\"Inscripcion por Grupo\">\r\n \r\n </a>\r\n </td>\r\n\r\n </tr><? \r\n }else\r\n {\r\n ?>\r\n <tr class=\"centrar\">\r\n <td colspan=\"2\" class=\"sigma centrar\" width=\"50%\" style=\"font-size: 15px\">\r\n <img src=\"<?echo $this->configuracion['site'].$this->configuracion['grafico']?>/preinscripcion/inscripcion_des.png\" width=\"50\" height=\"50\" border=\"0\" alt=\"Inscripcion por Grupo\">\r\n <br>Publicar Inscripci&oacute;n autom&aacute;tica\r\n </td>\r\n </tr>\r\n <?\r\n \r\n }\r\n }\r\n if(is_array($inscripciones)&&($inscripciones[0]['TOTAL'])>0)\r\n {\r\n \r\n }else{\r\n if(is_array($inscripcion)&&!empty($inscripcion['FIN']))\r\n {\r\n }else{if (is_array($inscripcion)){}else{\r\n\r\n \r\n?>\r\n <tr class=\"centrar\">\r\n <td colspan=\"2\" class=\"sigma centrar\" width=\"50%\" style=\"font-size: 15px\">\r\n <?\r\n $pagina=$this->configuracion[\"host\"].$this->configuracion[\"site\"].\"/index.php?\";\r\n $ruta=\"pagina=registro_inscripcionAutomaticaCoordinador\";\r\n $ruta.=\"&opcion=noEjecutarInscripcion\";\r\n $ruta.=\"&codProyecto=\".$variable[0];\r\n $ruta.=\"&nombreProyecto=\".$variable[1];\r\n\r\n include_once($this->configuracion[\"raiz_documento\"].$this->configuracion[\"clases\"].\"/encriptar.class.php\");\r\n $this->cripto=new encriptar();\r\n $ruta=$this->cripto->codificar_url($ruta,$this->configuracion);\r\n ?>\r\n\r\n <br><br><a href=\"<?= $pagina.$ruta ?>\"><font color=\"red\">No ejecutar Inscripci&oacute;n autom&aacute;tica</font><br>(Solo se registrar&aacute;n los permisos para la inscripción de Espacios Académicos)<br>\r\n <img src=\"<?echo $this->configuracion['site'].$this->configuracion['grafico']?>/preinscripcion/Modificar.png\" width=\"50\" height=\"50\" border=\"0\" alt=\"Inscripcion por Grupo\">\r\n \r\n </a>\r\n </td>\r\n\r\n </tr><? \r\n }\r\n \r\n }\r\n \r\n }\r\n ?>\r\n </table>\r\n <?\r\n if($preinscritos==1)\r\n {\r\n $this->mostrarListadoEstudiantes('1');\r\n }\r\n if($inscritos==1)\r\n {\r\n $this->mostrarListadoEstudiantes('2');\r\n }\r\n \r\n }", "title": "" }, { "docid": "e5ba2b528b4256ad9cc331c9a0cdd306", "score": "0.5328408", "text": "public function geraClasseControle(){\r\n # Abre o template da classe Controle e armazena conteudo do modelo\t\t\r\n $modelo \t = Util::getConteudoTemplate('class.Modelo.Controle.tpl');\r\n $modeloController = Util::getConteudoTemplate('class.Modelo.Controller.tpl');\r\n\r\n # Abre o template dos metodos de cadastros e armazena conteudo do modelo\r\n $modeloCadastrar = Util::getConteudoTemplate('metodoCadastrar.tpl');\r\n $modeloAlterar \t= Util::getConteudoTemplate('metodoAlterar.tpl');\r\n $modeloExcluir \t= Util::getConteudoTemplate('metodoExcluir.tpl');\r\n $modeloGet \t\t\t= Util::getConteudoTemplate('metodoGet.tpl');\r\n $modeloGetAll \t= Util::getConteudoTemplate('metodoGetAll.tpl'); \r\n $modeloConsultar \t= Util::getConteudoTemplate('metodoConsultar.tpl');\r\n $modeloTotalColecao = Util::getConteudoTemplate('metodoTotalColecao.tpl');\r\n\r\n # Abre arquivo xml para navegacao\r\n $aBanco = simplexml_load_string($this->xml);\r\n\r\n # Varre a estrutura das tabelas\r\n $aRequire = $aCadastrar = $aAlterar = $aExcluir = $aGet = $aGetAll = $aConsultar = $aTotalColecao = array();\r\n $copiaModelo = $modelo;\r\n $copiaModeloController = $modeloController;\r\n \r\n //print_r($aBanco);exit;\r\n foreach($aBanco as $aTabela){\r\n \t$copiaModeloCadastrar = $copiaModeloAlterar = $copiaModeloExcluir = $copiaModeloGet = $copiaModeloGetAll = $copiaModeloConsultar = $copiaModeloTotalColecao = \"\";\r\n $aPKDoc = $aPK = array(); \r\n \r\n foreach($aTabela as $oCampo){\r\n if((string)$oCampo['CHAVE'] == '1'){\r\n $aPKDoc[] = \"\\t * @param integer \\$\".(string)$oCampo['NOME'];\r\n $aPK[] = \"\\$\".(string)$oCampo['NOME'];\r\n }\r\n }\r\n\r\n # Montar a Lista de DOC do metodo selecionar\r\n $listaPKDoc = join(\"\\n\", $aPKDoc);\r\n $listaPK = join(\",\", $aPK);\r\n\r\n # Recupera o nome da tabela e gera os valores a serem gerados\r\n $nomeClasse \t = ucfirst($this->getCamelMode($aTabela['NOME']));\r\n $copiaModeloCadastrar \t = str_replace('%%NOME_CLASSE%%', $nomeClasse, $modeloCadastrar);\r\n $copiaModeloAlterar \t = str_replace('%%NOME_CLASSE%%', $nomeClasse, $modeloAlterar);\r\n $copiaModeloExcluir \t = str_replace('%%NOME_CLASSE%%', $nomeClasse, $modeloExcluir);\r\n $copiaModeloGet \t \t = str_replace('%%NOME_CLASSE%%', $nomeClasse, $modeloGet);\r\n $copiaModeloGetAll \t = str_replace('%%NOME_CLASSE%%', $nomeClasse, $modeloGetAll);\r\n $copiaModeloConsultar \t = str_replace('%%NOME_CLASSE%%', $nomeClasse, $modeloConsultar);\r\n $copiaModeloTotalColecao = str_replace('%%NOME_CLASSE%%', $nomeClasse, $modeloTotalColecao);\r\n\r\n $montaObjetoCAD = $this->retornaObjetosMontados($aTabela['NOME']);\r\n $montaObjetoEDIT = $this->retornaObjetosMontados($aTabela['NOME'], \"edit\");\r\n \r\n $montaObjetoBD = $this->retornaObjetosBDMontados($aTabela['NOME']);\r\n\t\t\t# Cadastrar\r\n $copiaModeloCadastrar = str_replace('%%MONTA_OBJETO%%', $montaObjetoCAD, $copiaModeloCadastrar);\r\n $copiaModeloCadastrar = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloCadastrar);\r\n # Alterar\r\n $copiaModeloAlterar\t = str_replace('%%MONTA_OBJETO%%', $montaObjetoEDIT, $copiaModeloAlterar);\r\n $copiaModeloAlterar = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloAlterar);\r\n # Excluir\r\n $copiaModeloExcluir = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloExcluir);\r\n # Get\r\n $copiaModeloGet = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloGet);\r\n $copiaModeloGet = str_replace('%%DOC_LISTA_PK%%', $listaPKDoc, $copiaModeloGet);\r\n $copiaModeloGet = str_replace('%%LISTA_PK%%', \t $listaPK, $copiaModeloGet);\r\n # GetAll\r\n $copiaModeloGetAll = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloGetAll);\r\n # Consultar\r\n $copiaModeloConsultar = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloConsultar);\r\n\r\n $aRequire[] \t = \"require_once(dirname(__FILE__).'/bd/class.$nomeClasse\".\"BD.php');\";\r\n $aCadastrar[]\t = $copiaModeloCadastrar;\r\n $aAlterar[] \t = $copiaModeloAlterar;\r\n $aExcluir[] \t = $copiaModeloExcluir;\r\n $aGet[] \t \t = $copiaModeloGet;\r\n $aGetAll[] \t = $copiaModeloGetAll;\r\n $aConsultar[] \t = $copiaModeloConsultar;\r\n $aTotalColecao[] = $copiaModeloTotalColecao;\r\n \r\n # ==== Geração das Controllers das Classes =====\r\n $copiaModeloController = str_replace('%%NOME_CLASSE%%',\t $nomeClasse,\t\t \t \t$copiaModeloController);\r\n $copiaModeloController = str_replace('%%METODO_CREATE%%', $copiaModeloCadastrar, \t$copiaModeloController);\r\n $copiaModeloController = str_replace('%%METODO_UPDATE%%', $copiaModeloAlterar,\t \t$copiaModeloController);\r\n $copiaModeloController = str_replace('%%METODO_DEL%%', $copiaModeloExcluir,\t \t$copiaModeloController);\r\n $copiaModeloController = str_replace('%%METODO_GET%%',\t $copiaModeloGet,\t\t \t$copiaModeloController);\r\n $copiaModeloController = str_replace('%%METODO_GETALL%%', $copiaModeloGetAll,\t $copiaModeloController);\r\n $copiaModeloController = str_replace('%%METODO_SEARCH%%', $copiaModeloConsultar, $copiaModeloController);\r\n $copiaModeloController = str_replace('%%METODO_TOTAL%%', $copiaModeloTotalColecao, $copiaModeloController);\r\n \r\n $copiaModeloCadastrar = $copiaModeloAlterar = $copiaModeloExcluir = $copiaModeloGet = $copiaModeloGetAll = $copiaModeloConsultar = $copiaModeloTotalColecao = \"\";\r\n \r\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes\";\r\n if(!file_exists($dir)) mkdir($dir);\r\n \r\n $fp = fopen(\"$dir/class.Controller$nomeClasse.php\",\"w\"); fputs($fp, $copiaModeloController); fclose($fp);\r\n }\r\n\r\n # Monta demais valores a serem substituidos\r\n $listaRequire = join(\"\\n\", $aRequire);\r\n $listaCadastrar = join(\"\\n\\n\", $aCadastrar);\r\n $listaAlterar = join(\"\\n\\n\", $aAlterar);\r\n $listaExcluir = join(\"\\n\\n\", $aExcluir);\r\n $listaGet \t = join(\"\\n\\n\", $aGet);\r\n $listaGetAll = join(\"\\n\\n\", $aGetAll);\r\n $listaConsultar = join(\"\\n\\n\", $aConsultar);\r\n $listaTotalColecao = join(\"\\n\\n\", $aTotalColecao);\r\n\r\n # Substitui todas os parametros pelas variaveis ja processadas\r\n $copiaModelo = str_replace('%%LISTA_REQUIRE%%',\t $listaRequire,\t\t$copiaModelo);\r\n $copiaModelo = str_replace('%%METODOS_CADASTRAR%%', $listaCadastrar,\t$copiaModelo);\r\n $copiaModelo = str_replace('%%METODOS_ALTERAR%%', $listaAlterar,\t\t$copiaModelo);\r\n $copiaModelo = str_replace('%%METODOS_EXCLUIR%%', $listaExcluir,\t\t$copiaModelo);\r\n $copiaModelo = str_replace('%%METODOS_GET%%',\t $listaGet,\t\t\t$copiaModelo);\r\n $copiaModelo = str_replace('%%METODOS_GET_ALL%%', $listaGetAll,\t\t$copiaModelo);\r\n $copiaModelo = str_replace('%%METODOS_CONSULTAR%%', $listaConsultar, $copiaModelo);\r\n $copiaModelo = str_replace('%%METODOS_TOTAL%%', \t$listaTotalColecao, $copiaModelo);\r\n\r\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes\";\r\n if(!file_exists($dir)) mkdir($dir);\r\n\r\n $fp = fopen(\"$dir/class.Controle.php\",\"w\");\r\n fputs($fp,$copiaModelo);\r\n\r\n # ============ Adicionando Classes de core/Config =========\r\n $modeloConfig = Util::getConteudoTemplate(\"Modelo.Config.\".$aBanco['SGBD'].\".tpl\");\r\n $modeloConfig = str_replace('%%DATABASE%%', $this->projeto, $modeloConfig);\r\n $modeloConfig = str_replace('%%HOST%%', $aBanco['HOST'], $modeloConfig);\r\n $modeloConfig = str_replace('%%USER%%', $aBanco['USER'], $modeloConfig);\r\n $modeloConfig = str_replace('%%SENHA%%', $aBanco['SENHA'], $modeloConfig);\r\n \r\n $fpConfig = fopen(\"$dir/core/config.ini\",\"w\"); \t\r\n fputs($fpConfig, $modeloConfig); \r\n fclose($fpConfig);\r\n\r\n copy(dirname(__FILE__).\"/class.Util.php\",\t \"$dir/core/class.Util.php\");\r\n copy(dirname(__FILE__).\"/class.Conexao.php\", \"$dir/core/class.Conexao.php\");\r\n \r\n return true;\r\n }", "title": "" }, { "docid": "3eb733141af4552654bac9029bfb53ef", "score": "0.5321398", "text": "function procesosIniContratacion()\n {\n $this->procedimiento = 'adq.f_proceso_compra_sel';\n $this->transaccion = 'ADQ_INADEJRES_SEL';\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\n\n $this->setParametro('fecha_ini', 'fecha_ini', 'date');\n $this->setParametro('fecha_fin', 'fecha_fin', 'date');\n $this->setParametro('id_depto', 'id_depto', 'integer');\n $this->setParametro('monto_mayor', 'monto_mayor', 'varchar');\n\n //Definicion de la lista del resultado del query\n $this->captura('estado', 'text');\n $this->captura('nombre', 'varchar');\n $this->captura('total', 'bigint');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "268645a07970ab8807a1364a6cf841a4", "score": "0.5313802", "text": "function modificarProcesoCompra()\n {\n $this->procedimiento = 'adq.f_proceso_compra_ime';\n $this->transaccion = 'ADQ_PROC_MOD';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_compra', 'id_proceso_compra', 'int4');\n $this->setParametro('id_depto', 'id_depto', 'int4');\n $this->setParametro('num_convocatoria', 'num_convocatoria', 'varchar');\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\n $this->setParametro('id_estado_wf', 'id_estado_wf', 'int4');\n $this->setParametro('fecha_ini_proc', 'fecha_ini_proc', 'date');\n $this->setParametro('obs_proceso', 'obs_proceso', 'varchar');\n $this->setParametro('id_proceso_wf', 'id_proceso_wf', 'int4');\n $this->setParametro('num_tramite', 'num_tramite', 'varchar');\n $this->setParametro('codigo_proceso', 'codigo_proceso', 'varchar');\n $this->setParametro('estado_reg', 'estado_reg', 'varchar');\n $this->setParametro('estado', 'estado', 'varchar');\n $this->setParametro('num_cotizacion', 'num_cotizacion', 'varchar');\n\n\n $this->setParametro('objeto', 'objeto', 'varchar');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "04bc026beca28c73837f4cd0889cb88e", "score": "0.53131044", "text": "private function crea_compra() {\n \t\t$compranueva = new compra; \n }", "title": "" }, { "docid": "4f1ba5e182136b9cb2031479fd23eca5", "score": "0.53127086", "text": "function Cuerpo($acceso,$where)\n\t{\n\t\t$acceso->objeto->ejecutarSql(\"select id_persona from vista_orden order By id_orden desc LIMIT 1 offset 0\");\n\t\tif($row=row($acceso))\n\t\t{\n\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t}\n\t\telse{\n\t\t\t$acceso->objeto->ejecutarSql(\"select *from vista_tecnico LIMIT 1 offset 0\");\n\t\t\tif($row=row($acceso))\n\t\t\t{\n\t\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\n\t\n\t\n\t\t\n\t\t\n\t\t$dato=lectura($acceso,$where);\n\t\n\t\t\n\t\t$cont=1;\n\t\t\n\t\t\n\t\t$salto=0;\n\t\t$f_act=date(\"d/m/Y\");\n\t\t$h_act=date(\"h:i:s A\");\n\t\t$nombre_zona=utf8_decode(trim($dato[0][\"nombre_zona\"]));\n\t\t$nombre_sector=utf8_decode(trim($dato[0][\"nombre_sector\"]));\n\t\t\n\t\t$this->SetFont('Arial','',10);\n\t\t\t$this->SetX(55);\n\t\t\t$this->Cell(50,5,\"ZONA: $nombre_zona\",\"0\",0,\"C\");\n\t\t\t$this->Cell(50,5,\"SECTOR:: $nombre_sector\",\"0\",0,\"C\");\n\t\t\t\n\t\t\t$this->Ln();\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t$this->SetX(133);\n\t\t$this->Cell(12,5,'Fecha:',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"d/m/Y\"),0,0,'L');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->Cell(12,5,'Hora:',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"h:i:s A\"),0,0,'L');\n\t\t$this->Ln();\t\t\n\t\t\t\n\t\t\t$w=$this->TituloCampos();\n\t\t\n\t\t\n\t\tfor($i=0;$i<count($dato);$i++){\n\t\t\t$this->SetTextColor(0);\n\t\t\t//$this->SetFillColor(249,249,249);\n\t\t\t\n\t\t\t$id_contrato=trim($dato[$i][\"id_contrato\"]);\n\t\t//\tordenDeCorte($acceso,$id_contrato,$tecnico);\n\t\t\t\n\t\t\t$this->SetX(10);\n\t\t\t\n\t\t\t$fill=0;\n\t\t\t\n\t\t\t\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->SetX(10);\n\t\t\t$this->Cell($w[0],5,$cont,\"0\",0,\"L\",$fill);\n\t\t\t\n\t\t\t$this->Cell($w[1],5,utf8_decode(trim($dato[$i][\"nro_contrato\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[2],5,utf8_decode(trim($dato[$i][\"cedula\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[3],5,utf8_decode(trim($dato[$i][\"nombre\"]).\" \".trim($dato[$i][\"apellido\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[4],5,utf8_decode(trim($dato[$i][\"etiqueta\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[5],5,utf8_decode(trim($dato[$i][\"telefono\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[6],5,number_format(trim($dato[$i][\"deuda\"])+0, 2, ',', '.'),\"0\",0,\"R\",$fill);\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->Cell(12,5,\"ZONA: \".utf8_decode(trim($dato[$i][\"nombre_zona\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(40,5,'',\"0\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->Cell(14,5,\"SECTOR: \".utf8_decode(trim($dato[$i][\"nombre_sector\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(50,5,'',\"0\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->Cell(12,5,\"CALLE: \".utf8_decode(trim($dato[$i][\"nombre_calle\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(65,5,'',\"0\",0,\"J\",$fill);\n\t\t\t\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->Cell(17,5,\"NRO CASA: \".utf8_decode(trim($dato[$i][\"numero_casa\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(10,5,'',\"0\",0,\"J\",$fill);\n\t\t\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->Cell(10,5,\"EDIF: \".utf8_decode(trim($dato[$i][\"edificio\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(35,5,'',\"0\",0,\"J\",$fill);\n\t\t\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->Cell(10,5,\"PISO: \".utf8_decode(trim($dato[$i][\"numero_piso\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(7,5,'',\"0\",0,\"J\",$fill);\n\t\t\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$this->Cell(8,5,\"REF: \".utf8_decode(trim($dato[$i][\"direc_adicional\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(96,5,'',\"0\",0,\"J\",$fill);\n\t\t\t//$this->MultiCell(81,5,utf8_decode(trim($dato[$i][\"direc_adicional\"])),'TR','J');\n\t\t\t$this->SetFont('Arial','',10);\n\t\t\t\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Ln(1);\n\t\t\t$this->Cell(180,4,'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ',\"0\",0,\"J\",$fill);\n\t\t\t$this->Ln();\n\t\t\t//$fill=!$fill;\n\t\t\t\n\t\t\t$salto++;\n\t\t\tif($salto==11 && $salto!=count($dato)){\n\t\t\t\t$this->AddPage();\n\t\t\t\t$w=$this->TituloCampos();\n\t\t\t\t$salto=0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t$cont++;\n\t\t}\n\t\t$this->SetX(10);\n\t\t//$this->Cell(array_sum($w),5,'','T');\n\t\t$cad.=\"\\\\pard\\\\par\n}\n\";\n\t\treturn $cad;\n\t}", "title": "" }, { "docid": "87cca1d80018ae55e34a4eb36cb00a00", "score": "0.53106475", "text": "public function giveCognome(){\r\n return $this->dB->utenteCognome($this->nome_utente);\r\n }", "title": "" }, { "docid": "9ad04764af213ba52950b9c06ccd29cc", "score": "0.5309759", "text": "function TituloCampos()\n\t{\n\t\t\n\t\t$this->SetFillColor(244,249,255);\n\t\t$this->SetDrawColor(128,128,128);\n\t\t$this->SetLineWidth(.2);\n\t\t//dimenciones de cada campo\n\t\t$w=array(10,17,19,53,20,22,14,14,14,10);\n\t\t$header=array(strtoupper(_('nro')),strtoupper(_('nro abo.')),strtoupper(_('cedula')),strtoupper(_('nombre y apellido')),strtoupper(_('precinto')),strtoupper(_('telefono')),strtoupper(_('iva')),strtoupper(_('base')),strtoupper(_('deuda')),strtoupper(_('pago')));\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->SetX(10);\n\t\tfor($k=0;$k<count($header);$k++)\n\t\t\t$this->Cell($w[$k],4,$header[$k],0,0,'J',0);\n\t\t$this->Ln();\n\t\treturn $w;\n\t}", "title": "" }, { "docid": "0e319b2361fa321512196dfd8ff5422c", "score": "0.5309328", "text": "function crediti_rimasti($utente) {\n\t\t\n\textract($GLOBALS);\n\tglobal $percorso_cartella_dati, $reset_form, $outente, $frase;\n\t\t$calciatori = file($percorso_cartella_dati.\"/mercato_\".$_SESSION['torneo'].\"_\".$_SESSION['serie'].\".txt\");\n\t\tarray_multisort($calciatori,SORT_NUMERIC,SORT_ASC);\t# Ordino numericamente, decrescente, per avere data più recente top\n\t\t$np = 0;\n\t\t$nd = 0;\n\t\t$nc = 0;\n\t\t$nf = 0;\n\t\t$na = 0;\n\t\t$num_calciatori = count($calciatori);\n\t\tfor($num2 = 0; $num2 < $num_calciatori; $num2++) {\t\n\t\t\t$dati_calciatore = explode(\",\", $calciatori[$num2]);\n\t\t\t$numero = $dati_calciatore[0];\n\t\t\t$ruolo = $dati_calciatore[2];\n\t\t\t$squadra = $dati_calciatore[6];\n\t\t\t$proprietario = $dati_calciatore[4];\n\t\t\tassegna_ruoli('mercato');\n\t\t\tif ($proprietario == $utente) {\n\t\t\t\t$soldi_spesi = $soldi_spesi + $dati_calciatore[3];\n\t\t\t\t$num_calciatori_posseduti++;\n\t\t\t\tif ($ruolo == \"P\")\n\t\t\t\t\t$np++;\n\t\t\t\telse if ($ruolo == \"D\")\n\t\t\t\t\t$nd++;\n\t\t\t\telse if ($ruolo == \"C\")\n\t\t\t\t\t$nc++;\n\t\t\t\telse if ($ruolo == \"F\")\n\t\t\t\t\t$nf++;\n\t\t\t\telse if ($ruolo == \"A\")\n\t\t\t\t\t$na++;\n\t\t\t\t\n\t\t\t\t$surplus = INTVAL($ocrediti);\n\t\t\t\t$variazioni = INTVAL($ovariazioni);\n\t\t\t\t$cambi_effettuati = INTVAL($ocambi);\n\t\t\t\t$soldi_spendibili = $soldi_iniziali + $surplus + $variazioni - $soldi_spesi;\n\t\t\t}\n\t\t}\n\tif ($soldi_spendibili != null) echo $soldi_spendibili; else echo $soldi_iniziali;\n\t}", "title": "" }, { "docid": "2cdb59bc3cdf1f69f585f7c923dd5441", "score": "0.5308286", "text": "function factura(){\n\n echo \"Se han mandado la factura del usuario {$this->id_cliente} al email {$this->email} SIN IVA.\";\n }", "title": "" }, { "docid": "ab19fad8602b83d5db35191f47059403", "score": "0.53054506", "text": "function factura(){\n\n echo \"Se han mandado la factura del usuario {$this->id_cliente} al email {$this->email} CON IVA.\";\n }", "title": "" }, { "docid": "e61f92de31522cead7de2c0d1109cf45", "score": "0.5298435", "text": "public function BonDeCommande($relance=\"\"){\n \t\t\n $date_com \t\t\t= $this->Date;\n $Modepaiement \t\t= $this->ModPaiement;\n $Etat \t\t\t\t= $this->Etat;\n $numcmd\t\t\t= $this->Numcmd;\n $NomComplet\t\t= $this->Nomcomplet;\n $Adresse\t\t\t= $this->Adresse;\n $Adresse2 \t\t\t= $this->Adresse2;\n $Cp\t\t\t\t= $this->Cp;\n $Ville \t\t\t= $this->Ville;\n $Pays\t\t\t\t= $this->Pays;\n $Nomcompletliv \t= $this->Nomcompletliv;\n $Adresseliv \t\t= $this->Adresseliv;\n $Adresse2liv \t\t= $this->Adresse2liv;\n $Cpliv \t\t\t= $this->Cpliv;\n $Villeliv \t\t\t= $this->Villeliv;\n $Paysliv\t\t\t= $this->Paysliv;\n $Commentaire \t\t= $this->Commentaire;\n $total \t\t\t= $this->Total;\n $port \t\t\t\t= $this->Port;\n $remise \t\t\t= $this->Remise;\n $remisepriv\t\t= $this->RemisePriv;\n $privileges\t\t= $this->Privileges;\n $codepromo \t\t= $this->Codepromo;\n $total_avc_port\t= (($total+$port)-$remise - $remisepriv);\t\n $Statut \t\t\t= $this->Statut;\n $Transporteur\t\t= $this->Transporteur;\n $LinkTransporteur \t= ($Etat=='Exp&Eacute;di&Eacute;e')?'Pour suivre votre colis&nbsp;&gt;&nbsp;<a href=\"'.$this->LinkTransporteur.'\" target=\"blank\" class=\"souligne\">Cliquez ici</a>':'';\n \n $liste_prod = $this->listeProd();\n \n $adresse_fact = stripallslashes($Adresse);\n \n if($Adresse2!=\"\")\n \t$adresse_fact .='<br />'.stripallslashes($Adresse2);\n \n $CORPS = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n<meta http-equiv=\"Content-Style-Type\" content=\"text/css\">\n\n<style type=\"text/css\">\n<!--\n.filet_000 {\n\tbackground:#000;\n\tline-height:1px;\n\theight:1px;\n}\n\n.pad10 {\n\tpadding:10px;\n}\n.prix_barre {\n\ttext-decoration:line-through;\n}\n\n.texte10 {\n\tfont-size:10px;\n}\n.texte11 {\n\tfont-size:11px;\n}\n.texte12 {\n\tfont-size:12px;\n}\n.texte13 {\n\tfont-size:13px;\n}\n\n#conteur_bon_commande {\n\twidth:580px;\n\tpadding:10px;\n\tpadding-right:0px;\n\tpadding-bottom:25px;\n\tbackground-color:#FFF;\n}\n#entete_bon_commande {\n\twidth:580px;\n\theight:127px;\n}\n#entete_bon_commande td {\n\tvertical-align:top;\n}\n#entete_bon_commande td.logo {\n\twidth:296px;\n}\n#entete_bon_commande td.commande {\n\ttext-align:right;\n\tpadding-right:20px;\n\tcolor:#525655;\n\tfont-size:22px;\n\tpadding-top:20px;\n\twidth:276px;\n}\n#entete_bon_commande td.fiche_paie {\n\ttext-align:right;\n\tfont-size:24px;\n}\n#entete_bon_commande td.coordonnees {\n\tpadding-left:0px;\n\tpadding-bottom:20px;\n}\n.bloc_detail_cmd {\n\tline-height:20px;\n\twidth:301px;\n\tfont-size:12px;\n}\n.bloc_adresse {\n\twidth:240px;\n\tfloat:right;\n\tpadding:20px;\n\t/*margin-left:293px;*/\n\tfont-size:12px;\n\tmargin-right:20px;\n\tmargin-bottom:13px;\n\tborder:#e5e5e5 solid 1px;\n}\n.bloc_adresse2 {\n\twidth:280px;\n\tfloat:right;\n\t/*margin-left:293px;*/\n\tfont-size:12px;\n\tmargin-right:20px;\n\tmargin-bottom:13px;\n\tborder:#000 solid 1px;\n}\n.txt_adresse {\n\tpadding-top:10px;\n\tfont-size:10px;\n\tpadding-bottom:30px;\n}\n.tab_produit_panier_print {\n\twidth:580px;\n\tborder:#000 solid 1px;\n}\n.tab_produit_panier_print td {\n\tvertical-align:middle;\n}\n.tab_produit_panier_print th {\n\tpadding-top:10px;\n\ttext-align:left;\n\tpadding-bottom:10px;\n}\n.tab_produit_panier_print th.ref {\n\twidth:167px;\n\ttext-align:left;\n\tpadding-left:10px;\n}\n.tab_produit_panier_print th.couleur {\n\twidth:83px;\n\ttext-align:center;\n}\n.tab_produit_panier_print th.taille {\n\twidth:87px;\n\ttext-align:center;\n}\n.tab_produit_panier_print th.quantite {\n\twidth:73px;\n\ttext-align:center;\n}\n.tab_produit_panier_print th.prix {\n\twidth:73px;\n\ttext-align:center;\n}\n.tab_produit_panier_print th.total {\n\twidth:67px;\n\tpadding-right:10px;\n\ttext-align:right;\n}\n.tab_produit_panier_printth.ligne {\n\theight:5px;\n}\n.tab_produit_panier_print td.ref {\n\twidth:167px;\n\ttext-align:left;\n\tpadding-left:10px;\n}\n.tab_produit_panier_print td.couleur {\n\twidth:73px;\n\ttext-align:center;\n\tpadding-left:5px;\n\tpadding-right:5px;\n\tfont-size:12px;\n}\n.tab_produit_panier_print td.taille {\n\twidth:87px;\n\ttext-align:center;\n}\n.tab_produit_panier_print td.quantite {\n\twidth:73px;\n\ttext-align:center;\n}\n.tab_produit_panier_print td.prix {\n\twidth:73px;\n\ttext-align:center;\n\tfont-size:12px;\n}\n.tab_produit_panier_print td.total {\n\twidth:67px;\n\tpadding-right:10px;\n\ttext-align:right;\n\tfont-size:12px;\n}\n.tab_produit_panier_print td.ligne {\n\theight:13px;\n}\n.tab_produit_panier_print td.ligne_color {\n\theight:2px;\n\tline-height:2px;\n\tbackground-color:#D8D8D8;\n}\n.produit_visuel_print {\n\twidth:166px;\n}\n.produit_visuel_print td {\n\tvertical-align:middle;\n}\n.produit_visuel_print td.visuel_66x66 {\n\twidth:66px;\n\theight:66px;\n\tborder:#EDEDED solid 1px;\n}\n.produit_visuel_print td.description_produit {\n\twidth:78px;\n\tpadding-right:8px;\n\tfont-size:12px;\n\tpadding-left:12px;\n}\n.bloc_mode_paiement_print {\n\twidth:237px; \n\tborder:#000 solid 1px;\n\tmargin-top:15px;\n}\n.bloc_cmd2_print {\n\tborder:#000 solid 1px;\n\twidth:300px;\n\t//margin-right:10px;\n\tmargin-left:30px;\n\tmargin-top:15px;\n}\n.recap_panier_total_print {\n\twidth:301px;\n\tmargin-top:22px;\n\tmargin-bottom:5px;\n}\n.recap_panier_total_print td {\n\tvertical-align:top;\n\tpadding-bottom:7px;\n}\n.recap_panier_total_print td.intitule_total {\n\twidth:194px;\n\ttext-align:right;\n}\n.recap_panier_total_print td.montant_total {\n\twidth:91px;\n\ttext-align:right;\n\tpadding-right:15px;\n}\n.recap_panier_total_print td.intitule_total2 {\n\twidth:194px;\n\ttext-align:right;\n\tcolor:#CC492B;\n}\n.recap_panier_total_print td.montant_total2 {\n\twidth:91px;\n\ttext-align:right;\n\tpadding-right:15px;\n\tcolor:#CC492B;\n}\n.recap_panier_total_print td.ligne_color2 {\n\theight:1px;\n\tborder-top:#000 solid 1px;\n}\n.recap_panier_total_print td.ligne {\n\theight:7px;\n}\n-->\n</style>\n</head>\n\n<body>\n\t<div id=\"conteur_bon_commande\">\n\t\t<table id=\"entete_bon_commande\" cellpadding=\"0\" cellspacing=\"0\">\n\t\t\t<tr>\n\t\t\t\t<td class=\"logo\"><img src=\"'.$GLOBALS['_data_']['url_principale'].'css/images/logo_print.gif\" width=\"296\" height=\"90\" alt=\"\" /></td>\n\t\t\t\t<td class=\"commande\">Commande</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=\"2\" class=\"coordonnees\">\n\t\t\t\t <p><br /><br />Ch&egrave;r(e) client(e),<br /><br />';\n\t\t\t\t \n\t\t\t\t switch($relance){\n\t\t\t\t \tcase '1':\n\t\t\t\t \t$CORPS.='Votre commande portant le num&Eacute;ro '.$this->Numcmd.' est en attente de paiement depuis 5 jours.<br />\n\t\t\t\t\tCelle ci ne vous sera r&Eacute;serv&Eacute;e que pour 5 jours suppl&Eacute;mentaires, d&Eacute;lai au del&Agrave; duquel nous ne pourrons vous conserver les produits.<br />';\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase '2':\n\t\t\t\t \t$CORPS.='Votre commande portant le num&Eacute;ro '.$this->Numcmd.' est en attente de paiement depuis 10 jours.<br />\n\t\t\t\t\tCelle ci ne peut malheureusement plus vous &Ecirc;tre r&Eacute;serv&Eacute;e et viens d\\'&Ecirc;tre annul&Eacute;e par notre syst&Egrave;me.<br />';\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:$CORPS.='Nous avons bien reçu votre commande portant le num&Eacute;ro commande '.$this->Numcmd.'<br />\n\t\t\t\t\t';\n\t\t\t\t }\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$CORPS.='Vous trouverez ci dessous le r&eacute;capitulatif de votre commande<br /><br />A bientôt et merci pour votre confiance.<br /><br />\n\t\t\t\t\tL&acute;&eacute;quipe de '.$GLOBALS['_data_']['nom_site'].'<br /><br /></p> </td>\n\t\t\t</tr>\n\t\t</table>\n\t\t<div class=\"bloc_adresse\">\n\t\t\t<p><strong>'.$NomComplet.'</strong></p>\n\t\t\t<p>'.$adresse_fact.'</p>\n\t\t\t<p>'.$Cp.' '.$Ville.'</p>\n\t\t\t<p>'.SelectNomFromTable('pays',$Pays).'</p>\n\t\t</div>\n\t\t<div class=\"bloc_detail_cmd\">\n\t\t <p><strong>N&deg; de commande&nbsp;</strong>:&nbsp;CMD-'.$numcmd.'</p>\n\t\t\t<p><strong>Date de la commande &nbsp;</strong>:&nbsp;'.reverse($date_com).'</p>\n\t\t\t<p><strong>&Eacute;tat de la commande&nbsp;</strong>:&nbsp;'.$Statut.'</p>\n <p><strong>Mode de livraison&nbsp;</strong>:&nbsp;'.$Transporteur.'</p>\n\t\t\t<p><strong>Info livraison&nbsp;</strong>:&nbsp;'.$LinkTransporteur.'</p>\n\t\t</div>\n\t\t<div class=\"clear_right\"></div>\n <p class=\"lineheight30\">&nbsp;</p>\n <table class=\"tab_produit_panier_print\" cellpadding=\"0\" cellspacing=\"0\">\n <tr>\n <th colspan=\"6\" class=\"ligne\"><p class=\"pad_g10\">MES ARTICLES</p></th>\n </tr>\n <tr>\n <td colspan=\"6\"><p class=\"filet_000\">&nbsp;</p></td>\n </tr>\n <tr>\n <th class=\"ref\"><p>R&eacute;f&eacute;rence</p></th>\n <th class=\"couleur\"><p>Couleur</p></th>\n <th class=\"taille\"><p>Taille</p></th>\n <th class=\"quantite\"><p>Quantitt&eacute;</p></th>\n <th class=\"prix\"><p>Prix TTC</p></th>\n <th class=\"total\"><p>Total TTC</p></th>\n </tr>\n <tr>\n <td colspan=\"6\"><img src=\"'.$GLOBALS['_data_']['url_principale'].'css/images/filet_print.gif\" width=\"580\" height=\"1\" /></td>\n </tr>\n <tr>\n <td colspan=\"6\" class=\"ligne\"></td>\n </tr>';\n \n foreach($liste_prod as $cle=>$val){\n \t\n \n $CORPS.='\n <tr>\n <td class=\"ref\"><table class=\"produit_visuel_print\" cellpadding=\"0\" cellspacing=\"0\">\n <tr>\n <td class=\"visuel_66x66\">'.affiche_photo_gene('produits',$val['image'],' width=\"66\" ','', 'MDM-').'</td>\n <td class=\"description_produit\"><p>'.$val['nom'].'</p></td>\n </tr>\n </table></td>';\n \n if(in_array($val['type'],explode(',','totallook,cadeaux'))){\n \t$db = DB::get();\n \t$Req = \"SELECT \tcomarticles_compose_nomarticle,comarticles_compose_idtaille \n\t\t\t\t\tFROM t_comarticles_compose \n\t\t\t\t\tWHERE comarticles_compose_idcomarticles='\".$val['id'].\"' \n\t\t\t\t\tAND comarticles_compose_supprime='0' \n\t\t\t\t\tORDER BY comarticles_compose_id ASC\";\n\t\n \t$Sendreq = $db->query($Req);\n \t\n \t$CORPS.='<td colspan=\"2\" style=\"text-align:center\">';\n \t\n \twhile($row =$db->fetch_array($Sendreq)){\n \t\t$taille_compose = new Taille($row['comarticles_compose_idtaille']);\n \t\t\n \t\t$CORPS.=$row['comarticles_compose_nomarticle'].' - '.$taille_compose->Taille.'<br />';\n \t\t\n \t}\n \t\n \t$CORPS.='</td>\n \t\t\t<td class=\"quantite\"><p>1</p></td>';\n }\n else{\n \t$idcouleur = SelectFieldFromTable('produits_couleurs','idcouleur',$val['couleur']);\n \t$nomcouleur = SelectNomFromTable('couleurs',$val['couleur']);\n \t\n \t$CORPS.='\t<td class=\"couleur\"><p>'.stripallslashes($nomcouleur).'</p></td>\n <td class=\"taille\"><p>'.$val['taille'].'</p></td>\n \t\t\t<td class=\"quantite\"><p>'.$val['quantite'].'</p></td>';\n \t\n }\n if($val['prixpromo']!='0.00'){\n \t$CORPS.=' <td class=\"prix\"><p class=\"prix_barre\">'.$val['prix'].'</p><p>'.$val['prixpromo'].' &euro;</p></td>';\n }\n else{\n \t$CORPS.='\t<td class=\"prix\"><p>'.$val['prix'].'</p></td>';\n }\n $CORPS.='\n \n <td class=\"total\"><p>'.$val['prixfinal'].' &euro;</p></td>\n </tr>\n <tr>\n <td colspan=\"6\" class=\"ligne\"></td>\n </tr>\n <tr>\n <td colspan=\"6\"><img src=\"'.URL_PRINCIPALE.'css/images/filet_print.gif\" width=\"580\" height=\"1\" /></td>\n </tr>\n <tr>\n <td colspan=\"6\" class=\"ligne\"></td>\n </tr>';\n }\n //class=\"bloc_cmd2_print\"\n $CORPS.=' <tr>\n <td colspan=\"6\" class=\"ligne\"></td>\n </tr>\n </table>\n <p><br /></p>\n \n <div class=\"float_right\">\n \n <table>\n\t\t<tr>\n\t\t\n\t\t <td style=\"vertical-align:top\">\n\t <div class=\"bloc_mode_paiement_print\"><div class=\"pad10\">\n\t <p class=\"texte13\"><strong>LIVRAISON</strong></p>\n </div>\n <p class=\"filet_000\">&nbsp;</p>\n <div class=\"pad10\"><p class=\"texte13\">'.$Nomcompletliv.'<br />'.$Adresseliv.'<br />'.$Cpliv.' '.$Villeliv.' '.SelectNomFromTable('pays',$Paysliv).'<br />'.$Commentaire;\n\t \n\t $CORPS.='</p></div></div>\n \n <p>&nbsp;</p>\n <div class=\"bloc_mode_paiement_print\">\n\t \t<div class=\"pad10\"><p class=\"texte11\"><strong>Mode de paiement</strong>&nbsp;:&nbsp;'.$Modepaiement.'</p></div>\n\t\t </div>\n \n </td>\n\t\t\n\t\t\t<td style=\"vertical-align:top\">\n \n\t <div class=\"bloc_cmd2_print\">\n\t \t<div class=\"pad10\"><p class=\"texte13\"><strong>TOTAL DE MA COMMANDE</strong></p></div>\n <p class=\"filet_000\">&nbsp;</p>\n\t\t<table class=\"recap_panier_total_print\" cellpadding=\"0\" cellspacing=\"0\">\n\t\t\t<tr>\n\t\t\t\t<td class=\"intitule_total\"><p>Montant TTC de ma commande</p></td>\n\t\t\t\t<td class=\"montant_total\"><p>'.number_format($total,2,',','').' &euro;</p></td>\n\t\t\t</tr>';\n if($remise != '0.00'){\n $CORPS.='\n <tr>\n <td class=\"intitule_total\"><p>Remise offre sp&eacute;ciale<br /><i>'.$codepromo.'</i></p></td>\n <td class=\"montant_total\"><p>-'.number_format($remise,2,',','').' &euro;</p></td>\n </tr>';\n }\n if($remisepriv != '0.00'){\n \t$Priv = new Privileges($privileges);\n $CORPS.='\n <tr>\n <td class=\"intitule_total\"><p>Remise Client '.$Priv->Nom.' - '.$Priv->Remise.' %</p></td>\n <td class=\"montant_total\"><p>-'.number_format($remisepriv,2,',','').' &euro;</p></td>\n </tr>';\n }\n \n $CORPS.='<tr>\n\t\t\t\t<td class=\"intitule_total\"><p>Frais de port</p></td>\n\t\t\t\t<td class=\"montant_total\"><p>'.number_format($port,2,',','').' &euro;</p></td>\n\t\t\t</tr>\n <tr>\n \t<td class=\"ligne\" colspan=\"2\"></td>\n </tr>\n <tr>\n \t<td height=\"5\" colspan=\"2\" class=\"ligne_color2\"></td>\n </tr>\n <tr>\n \t<td class=\"ligne\" colspan=\"2\"></td>\n </tr>\n <tr>\n\t\t\t\t<td class=\"intitule_total\"><p>Total &agrave; r&eacute;gler TTC</p></td>\n\t\t\t\t<td class=\"montant_total\"><p>'.number_format($total_avc_port,2,',','').' &euro;</p></td>\n\t\t\t</tr>\n <tr>\n\t\t\t\t<td class=\"intitule_total\"><p><em>Dont TVA (19,6%)</em></p></td>\n\t\t\t\t<td class=\"montant_total\"><p>'.number_format(getTva($total_avc_port),2,',','').' &euro;</p></td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\n\t </div>\n\t \n </div>\n </td>\n \n </tr>\n </table>\n\t <div class=\"clear_right\"></div>\n</div>\n\n</body>\n</html>';\nreturn $CORPS;\n \t}", "title": "" }, { "docid": "baa650efc759bb8bf4f30187f3f8fbb9", "score": "0.52905554", "text": "function insertarConsumo(){\n\t\t$this->procedimiento='gecom.ft_consumo_ime';\n\t\t$this->transaccion='GC_CON_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_numero_celular','id_numero_celular','int4');\n\t\t$this->setParametro('id_periodo','id_periodo','int4');\n\t\t$this->setParametro('id_gestion','id_gestion','int4');\n\t\t$this->setParametro('id_servicio','id_servicio','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('observaciones','observaciones','text');\n\t\t$this->setParametro('consumo','consumo','numeric');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "34c5a484c09e6a5f4ecc05e47df70212", "score": "0.529046", "text": "public function principio() {\n\n $this->luz=1;\n $this->activarLuzSuelo[\"l567\"]=0;\n $this->activarLuzSuelo[\"l34\"]=0;\n $this->activarLuzSuelo[\"l12\"]=0;\n $this->thinkClient[\"f567\"]=0;\n $this->thinkClient[\"f34\"]=0;\n $this->thinkClient[\"f12\"]=0;\n $this->pantalla[\"span\"]=1;\n $this->pantalla[\"bpan\"]=0;\n $this->setIntensidadPasillo(self::$intensidades[\"media\"]);\n $this->setIntensidadAlumnos(self::$intensidades[\"media\"]);\n $this->pantallaElectrica=0;\n $comando=$this->procesarComando(\"\", \"\");\n $this->enviarComando($comando);\n $this->guardarEstado();\n\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "ad4b0fdf324bd9719c8231e5e6aaadc6", "score": "0.0", "text": "public function show($id)\n {\n $userId = auth()->id();\n $order = Order::where(function($q) use ($id, $userId) {\n $q->where('user_id', '=', $userId);\n $q->where('id', '=', $id);\n })\n ->with('addresses', 'orderItems')\n ->firstOrFail();\n\n return view('orders.show', compact('order'));\n\n }", "title": "" } ]
[ { "docid": "1b84960e1b92d293ded93b3711f4a5bb", "score": "0.8233718", "text": "public function show(Resource $resource)\n {\n // not available for now\n }", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ed2d107c1c9ce4912402cbef90125ac4", "score": "0.76110697", "text": "public function show(Resource $resource)\n\t{\n\t\treturn $resource;\n\t}", "title": "" }, { "docid": "364c14abc03f539e9a17828c2c3c5094", "score": "0.7142873", "text": "protected function makeDisplayFromResource()\n\t{\n\t\treturn $this->activeResource->makeDisplay();\n\t}", "title": "" }, { "docid": "05f03e4964305c5851a8417af8f32544", "score": "0.6684253", "text": "public function show($resource, $id)\n {\n return $this->repository->get($id);\n }", "title": "" }, { "docid": "e21cb6c5a585a50a5b1a659e50a3576d", "score": "0.6445771", "text": "function show()\n\t{\n\t\techo '<pre>';\n\t\tprint_r($this);\n\t\techo '</pre>';\n\n//\t\tforeach ($this->resources as $id => $resources)\n//\t\t{\n//\t\t\tforeach ($resources as $type => $resource)\n//\t\t\t{\n//\t\t\t\t$resource->show();\n//\t\t\t}\n//\t\t}\n\t}", "title": "" }, { "docid": "2e3da5773c9c5d59c21b1af4e1ac8cd8", "score": "0.623589", "text": "public function show($id)\n {\n if(Module::hasAccess(\"Resources\", \"view\")) {\n \n $resource = Resource::find($id);\n if(isset($resource->id)) {\n $module = Module::get('Resources');\n $module->row = $resource;\n $group_lists = array();\n $user_lists = array();\n\n if(!$resource->is_public){\n $group_lists = DB::table('resource_groups')\n ->select('groups.id', 'groups.name')\n ->join('groups','groups.id','=','resource_groups.group_id')\n ->where('resource_groups.resource_id', $id)->whereNull('groups.deleted_at')->whereNull('resource_groups.deleted_at')->get();\n\n $user_lists = DB::table('resource_users')\n ->select('users.id', 'users.name')\n ->join('users','users.id','=','resource_users.user_id')\n ->where('resource_users.resource_id', $id)->whereNull('users.deleted_at')->whereNull('resource_users.deleted_at')->get();\n }\n \n return view('la.resources.show', [\n 'module' => $module,\n 'view_col' => $module->view_col,\n 'no_header' => true,\n 'no_padding' => \"no-padding\",\n 'user_lists' => $user_lists,\n 'group_lists' => $group_lists\n ])->with('resource', $resource);\n } else {\n return view('errors.404', [\n 'record_id' => $id,\n 'record_name' => ucfirst(\"resource\"),\n ]);\n }\n } else {\n return redirect(config('laraadmin.adminRoute') . \"/\");\n }\n }", "title": "" }, { "docid": "596a976868e24408f49b224b715ef1dd", "score": "0.62268525", "text": "function display() {\n global $CFG, $THEME, $USER;\n\n /// Set up generic stuff first, including checking for access\n parent::display();\n\n /// Set up some shorthand variables\n $cm = $this->cm;\n $course = $this->course;\n $resource = $this->resource;\n\n\n $this->set_parameters(); // set the parameters array\n\n ///////////////////////////////////////////////\n\n /// Possible display modes are:\n /// File displayed embedded in a normal page\n /// File displayed in a popup window\n /// File displayed embedded in a popup window\n /// File not displayed at all, but downloaded\n\n\n /// First, find out what sort of file we are dealing with.\n require_once($CFG->libdir.'/filelib.php');\n\n $querystring = '';\n $resourcetype = '';\n $embedded = false;\n $mimetype = mimeinfo(\"type\", $resource->reference);\n $pagetitle = strip_tags($course->shortname.': '.format_string($resource->name));\n\n $formatoptions = new object();\n $formatoptions->noclean = true;\n\n if ($resource->options != \"forcedownload\") { // TODO nicolasconnault 14-03-07: This option should be renamed \"embed\"\n if (in_array($mimetype, array('image/gif','image/jpeg','image/png'))) { // It's an image\n $resourcetype = \"image\";\n $embedded = true;\n\n } else if ($mimetype == \"audio/mp3\") { // It's an MP3 audio file\n $resourcetype = \"mp3\";\n $embedded = true;\n\n } else if ($mimetype == \"video/x-flv\") { // It's a Flash video file\n $resourcetype = \"flv\";\n $embedded = true;\n\n } else if (substr($mimetype, 0, 10) == \"video/x-ms\") { // It's a Media Player file\n $resourcetype = \"mediaplayer\";\n $embedded = true;\n\n } else if ($mimetype == \"video/quicktime\") { // It's a Quicktime file\n $resourcetype = \"quicktime\";\n $embedded = true;\n\n } else if ($mimetype == \"application/x-shockwave-flash\") { // It's a Flash file\n $resourcetype = \"flash\";\n $embedded = true;\n\n } else if ($mimetype == \"video/mpeg\") { // It's a Mpeg file\n $resourcetype = \"mpeg\";\n $embedded = true;\n\n } else if ($mimetype == \"text/html\") { // It's a web page\n $resourcetype = \"html\";\n\n } else if ($mimetype == \"application/zip\") { // It's a zip archive\n $resourcetype = \"zip\";\n $embedded = true;\n\n } else if ($mimetype == 'application/pdf' || $mimetype == 'application/x-pdf') {\n $resourcetype = \"pdf\";\n $embedded = true;\n } else if ($mimetype == \"audio/x-pn-realaudio\") { // It's a realmedia file\n $resourcetype = \"rm\";\n $embedded = true;\n } \n }\n\n $isteamspeak = (stripos($resource->reference, 'teamspeak://') === 0);\n\n /// Form the parse string\n $querys = array();\n if (!empty($resource->alltext)) {\n $parray = explode(',', $resource->alltext);\n foreach ($parray as $fieldstring) {\n list($moodleparam, $urlname) = explode('=', $fieldstring);\n $value = urlencode($this->parameters[$moodleparam]['value']);\n $querys[urlencode($urlname)] = $value;\n $querysbits[] = urlencode($urlname) . '=' . $value;\n }\n if ($isteamspeak) {\n $querystring = implode('?', $querysbits);\n } else {\n $querystring = implode('&amp;', $querysbits);\n }\n }\n\n\n /// Set up some variables\n\n $inpopup = optional_param('inpopup', 0, PARAM_BOOL);\n\n if (resource_is_url($resource->reference)) {\n $fullurl = $resource->reference;\n if (!empty($querystring)) {\n $urlpieces = parse_url($resource->reference);\n if (empty($urlpieces['query']) or $isteamspeak) {\n $fullurl .= '?'.$querystring;\n } else {\n $fullurl .= '&amp;'.$querystring;\n }\n }\n\n } else if ($CFG->resource_allowlocalfiles and (strpos($resource->reference, RESOURCE_LOCALPATH) === 0)) { // Localpath\n $localpath = get_user_preferences('resource_localpath', 'D:');\n $relativeurl = str_replace(RESOURCE_LOCALPATH, $localpath, $resource->reference);\n\n if ($querystring) {\n $relativeurl .= '?'.$querystring;\n }\n\n $relativeurl = str_replace('\\\\', '/', $relativeurl);\n $relativeurl = str_replace(' ', '%20', $relativeurl);\n $fullurl = 'file:///'.htmlentities($relativeurl);\n $localpath = true;\n\n } else { // Normal uploaded file\n $forcedownloadsep = '?';\n if ($resource->options == 'forcedownload') {\n $querys['forcedownload'] = '1';\n }\n $fullurl = get_file_url($course->id.'/'.$resource->reference, $querys);\n }\n\n /// Print a notice and redirect if we are trying to access a file on a local file system\n /// and the config setting has been disabled\n if (!$CFG->resource_allowlocalfiles and (strpos($resource->reference, RESOURCE_LOCALPATH) === 0)) {\n if ($inpopup) {\n print_header($pagetitle, $course->fullname);\n } else {\n $navigation = build_navigation($this->navlinks, $cm);\n print_header($pagetitle, $course->fullname, $navigation,\n \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));\n }\n notify(get_string('notallowedlocalfileaccess', 'resource', ''));\n if ($inpopup) {\n close_window_button();\n }\n print_footer('none');\n die;\n }\n\n\n /// Check whether this is supposed to be a popup, but was called directly\n if ($resource->popup and !$inpopup) { /// Make a page and a pop-up window\n $navigation = build_navigation($this->navlinks, $cm);\n print_header($pagetitle, $course->fullname, $navigation,\n \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));\n\n echo \"\\n<script type=\\\"text/javascript\\\">\";\n echo \"\\n<!--\\n\";\n echo \"openpopup('/mod/resource/view.php?inpopup=true&id={$cm->id}','resource{$resource->id}','{$resource->popup}');\\n\";\n echo \"\\n-->\\n\";\n echo '</script>';\n\n if (trim(strip_tags($resource->summary))) {\n print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions), \"center\");\n }\n\n $link = \"<a href=\\\"$CFG->wwwroot/mod/resource/view.php?inpopup=true&amp;id={$cm->id}\\\" \"\n . \"onclick=\\\"this.target='resource{$resource->id}'; return openpopup('/mod/resource/view.php?inpopup=true&amp;id={$cm->id}', \"\n . \"'resource{$resource->id}','{$resource->popup}');\\\">\".format_string($resource->name,true).\"</a>\";\n\n echo '<div class=\"popupnotice\">';\n print_string('popupresource', 'resource');\n echo '<br />';\n print_string('popupresourcelink', 'resource', $link);\n echo '</div>';\n print_footer($course);\n exit;\n }\n\n\n /// Now check whether we need to display a frameset\n\n $frameset = optional_param('frameset', '', PARAM_ALPHA);\n if (empty($frameset) and !$embedded and !$inpopup and ($resource->options == \"frame\" || $resource->options == \"objectframe\") and empty($USER->screenreader)) {\n /// display the resource into a object tag\n if ($resource->options == \"objectframe\") {\n /// Yahoo javascript libaries for updating embedded object size\n require_js(array('yui_utilities'));\n require_js(array('yui_container'));\n require_js(array('yui_dom-event'));\n require_js(array('yui_dom'));\n\n\n /// Moodle Header and navigation bar\n $navigation = build_navigation($this->navlinks, $cm);\n print_header($pagetitle, $course->fullname, $navigation, \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, \"parent\"));\n $options = new object();\n $options->para = false;\n if (!empty($localpath)) { // Show some help\n echo '<div class=\"mdl-right helplink\">';\n link_to_popup_window ('/mod/resource/type/file/localpath.php', get_string('localfile', 'resource'), get_string('localfilehelp','resource'), 400, 500, get_string('localfilehelp', 'resource'));\n echo '</div>';\n }\n echo '</div></div>';\n\n /// embedded file into iframe if the resource is on another domain\n ///\n /// This case is not XHTML strict but there is no alternative\n /// The object tag alternative is XHTML strict, however IE6-7 displays a blank object on accross domain by default,\n /// so we decided to use iframe for accross domain MDL-10021\n if (!stristr($fullurl,$CFG->wwwroot)) {\n echo '<p><iframe id=\"embeddedhtml\" src =\"'.$fullurl.'\" width=\"100%\" height=\"600\"></iframe></p>';\n }\n else {\n /// embedded HTML file into an object tag\n echo '<p><object id=\"embeddedhtml\" data=\"' . $fullurl . '\" type=\"'.$mimetype.'\" width=\"800\" height=\"600\">\n alt : <a href=\"' . $fullurl . '\">' . $fullurl . '</a>\n </object></p>';\n }\n /// add some javascript in order to fit this object tag into the browser window\n echo '<script type=\"text/javascript\">\n //<![CDATA[\n function resizeEmbeddedHtml() {\n //calculate new embedded html height size\n ';\n if (!empty($resource->summary)) {\n echo' objectheight = YAHOO.util.Dom.getViewportHeight() - 230;\n ';\n }\n else {\n echo' objectheight = YAHOO.util.Dom.getViewportHeight() - 120;\n ';\n }\n echo ' //the object tag cannot be smaller than a human readable size\n if (objectheight < 200) {\n objectheight = 200;\n }\n //resize the embedded html object\n YAHOO.util.Dom.setStyle(\"embeddedhtml\", \"height\", objectheight+\"px\");\n YAHOO.util.Dom.setStyle(\"embeddedhtml\", \"width\", \"100%\");\n }\n resizeEmbeddedHtml();\n YAHOO.widget.Overlay.windowResizeEvent.subscribe(resizeEmbeddedHtml);\n //]]>\n </script>\n ';\n\n /// print the summary\n if (!empty($resource->summary)) {\n print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions, $course->id), \"center\");\n }\n echo \"</body></html>\";\n exit;\n }\n /// display the resource into a frame tag\n else {\n @header('Content-Type: text/html; charset=utf-8');\n echo \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Frameset//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\\\">\\n\";\n echo \"<html dir=\\\"ltr\\\">\\n\";\n echo '<head>';\n echo '<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />';\n echo \"<title>\" . format_string($course->shortname) . \": \".strip_tags(format_string($resource->name,true)).\"</title></head>\\n\";\n echo \"<frameset rows=\\\"$CFG->resource_framesize,*\\\">\";\n echo \"<frame src=\\\"view.php?id={$cm->id}&amp;type={$resource->type}&amp;frameset=top\\\" title=\\\"\".get_string('modulename','resource').\"\\\"/>\";\n if (!empty($localpath)) { // Show it like this so we interpose some HTML\n echo \"<frame src=\\\"view.php?id={$cm->id}&amp;type={$resource->type}&amp;inpopup=true\\\" title=\\\"\".get_string('modulename','resource').\"\\\"/>\";\n } else {\n echo \"<frame src=\\\"$fullurl\\\" title=\\\"\".get_string('modulename','resource').\"\\\"/>\";\n }\n echo \"</frameset>\";\n echo \"</html>\";\n exit;\n }\n }\n\n\n /// We can only get here once per resource, so add an entry to the log\n\n add_to_log($course->id, \"resource\", \"view\", \"view.php?id={$cm->id}\", $resource->id, $cm->id);\n\n\n /// If we are in a frameset, just print the top of it\n\n if (!empty( $frameset ) and ($frameset == \"top\") ) {\n $navigation = build_navigation($this->navlinks, $cm);\n print_header($pagetitle, $course->fullname, $navigation,\n \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, \"parent\"));\n\n $options = new object();\n $options->para = false;\n echo '<div class=\"summary\">'.format_text($resource->summary, FORMAT_HTML, $options).'</div>';\n if (!empty($localpath)) { // Show some help\n echo '<div class=\"mdl-right helplink\">';\n link_to_popup_window ('/mod/resource/type/file/localpath.php', get_string('localfile', 'resource'),\n get_string('localfilehelp','resource'), 400, 500, get_string('localfilehelp', 'resource'));\n echo '</div>';\n }\n print_footer('empty');\n exit;\n }\n\n\n /// Display the actual resource\n if ($embedded) { // Display resource embedded in page\n $strdirectlink = get_string(\"directlink\", \"resource\");\n\n if ($inpopup) {\n print_header($pagetitle);\n } else {\n $navigation = build_navigation($this->navlinks, $cm);\n print_header_simple($pagetitle, '', $navigation, \"\", \"\", true,\n update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, \"self\"));\n\n }\n\n if ($resourcetype == \"image\") {\n echo '<div class=\"resourcecontent resourceimg\">';\n echo \"<img title=\\\"\".strip_tags(format_string($resource->name,true)).\"\\\" class=\\\"resourceimage\\\" src=\\\"$fullurl\\\" alt=\\\"\\\" />\";\n echo '</div>';\n\n } else if ($resourcetype == \"mp3\") {\n if (!empty($THEME->resource_mp3player_colors)) {\n $c = $THEME->resource_mp3player_colors; // You can set this up in your theme/xxx/config.php\n } else {\n $c = 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.\n 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.\n 'font=Arial&fontColour=FF33FF&buffer=10&waitForPlay=no&autoPlay=yes';\n }\n $c .= '&volText='.get_string('vol', 'resource').'&panText='.get_string('pan','resource');\n $c = htmlentities($c);\n $id = 'filter_mp3_'.time(); //we need something unique because it might be stored in text cache\n $cleanurl = addslashes_js($fullurl);\n\n\n // If we have Javascript, use UFO to embed the MP3 player, otherwise depend on plugins\n\n echo '<div class=\"resourcecontent resourcemp3\">';\n\n echo '<span class=\"mediaplugin mediaplugin_mp3\" id=\"'.$id.'\"></span>'.\n '<script type=\"text/javascript\">'.\"\\n\".\n '//<![CDATA['.\"\\n\".\n 'var FO = { movie:\"'.$CFG->wwwroot.'/lib/mp3player/mp3player.swf?src='.$cleanurl.'\",'.\"\\n\".\n 'width:\"600\", height:\"70\", majorversion:\"6\", build:\"40\", flashvars:\"'.$c.'\", quality: \"high\" };'.\"\\n\".\n 'UFO.create(FO, \"'.$id.'\");'.\"\\n\".\n '//]]>'.\"\\n\".\n '</script>'.\"\\n\";\n\n echo '<noscript>';\n\n echo \"<object type=\\\"audio/mpeg\\\" data=\\\"$fullurl\\\" width=\\\"600\\\" height=\\\"70\\\">\";\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"quality\" value=\"high\" />';\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"autostart\" value=\"true\" />';\n echo '</object>';\n echo '<p><a href=\"' . $fullurl . '\">' . $fullurl . '</a></p>';\n\n echo '</noscript>';\n echo '</div>';\n\n } else if ($resourcetype == \"flv\") {\n $id = 'filter_flv_'.time(); //we need something unique because it might be stored in text cache\n $cleanurl = addslashes_js($fullurl);\n\n\n // If we have Javascript, use UFO to embed the FLV player, otherwise depend on plugins\n\n echo '<div class=\"resourcecontent resourceflv\">';\n\n echo '<span class=\"mediaplugin mediaplugin_flv\" id=\"'.$id.'\"></span>'.\n '<script type=\"text/javascript\">'.\"\\n\".\n '//<![CDATA['.\"\\n\".\n 'var FO = { movie:\"'.$CFG->wwwroot.'/filter/mediaplugin/flvplayer.swf?file='.$cleanurl.'\",'.\"\\n\".\n 'width:\"600\", height:\"400\", majorversion:\"6\", build:\"40\", allowscriptaccess:\"never\", quality: \"high\" };'.\"\\n\".\n 'UFO.create(FO, \"'.$id.'\");'.\"\\n\".\n '//]]>'.\"\\n\".\n '</script>'.\"\\n\";\n\n echo '<noscript>';\n\n echo \"<object type=\\\"video/x-flv\\\" data=\\\"$fullurl\\\" width=\\\"600\\\" height=\\\"400\\\">\";\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"quality\" value=\"high\" />';\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"autostart\" value=\"true\" />';\n echo '</object>';\n echo '<p><a href=\"' . $fullurl . '\">' . $fullurl . '</a></p>';\n\n echo '</noscript>';\n echo '</div>';\n\n } else if ($resourcetype == \"mediaplayer\") {\n echo '<div class=\"resourcecontent resourcewmv\">';\n echo '<object type=\"video/x-ms-wmv\" data=\"' . $fullurl . '\">';\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"autostart\" value=\"true\" />';\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"scale\" value=\"noScale\" />';\n echo \"<a href=\\\"$fullurl\\\">$fullurl</a>\";\n echo '</object>';\n echo '</div>';\n\n } else if ($resourcetype == \"mpeg\") {\n echo '<div class=\"resourcecontent resourcempeg\">';\n echo '<object classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\"\n codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsm p2inf.cab#Version=5,1,52,701\"\n type=\"application/x-oleobject\">';\n echo \"<param name=\\\"fileName\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"autoStart\" value=\"true\" />';\n echo '<param name=\"animationatStart\" value=\"true\" />';\n echo '<param name=\"transparentatStart\" value=\"true\" />';\n echo '<param name=\"showControls\" value=\"true\" />';\n echo '<param name=\"Volume\" value=\"-450\" />';\n echo '<!--[if !IE]>-->';\n echo '<object type=\"video/mpeg\" data=\"' . $fullurl . '\">';\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"autostart\" value=\"true\" />';\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo \"<a href=\\\"$fullurl\\\">$fullurl</a>\";\n echo '<!--<![endif]-->';\n echo '<a href=\"' . $fullurl . '\">' . $fullurl . '</a>';\n echo '<!--[if !IE]>-->';\n echo '</object>';\n echo '<!--<![endif]-->';\n echo '</object>';\n echo '</div>';\n } else if ($resourcetype == \"rm\") {\n\n echo '<div class=\"resourcecontent resourcerm\">'; \n echo '<object classid=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" width=\"320\" height=\"240\">';\n echo '<param name=\"src\" value=\"' . $fullurl . '\" />';\n echo '<param name=\"controls\" value=\"All\" />';\n echo '<!--[if !IE]>-->';\n echo '<object type=\"audio/x-pn-realaudio-plugin\" data=\"' . $fullurl . '\" width=\"320\" height=\"240\">';\n echo '<param name=\"controls\" value=\"All\" />';\n echo '<a href=\"' . $fullurl . '\">' . $fullurl .'</a>';\n echo '</object>';\n echo '<!--<![endif]-->';\n echo '</object>';\n echo '</div>'; \n\n } else if ($resourcetype == \"quicktime\") {\n echo '<div class=\"resourcecontent resourceqt\">';\n\n echo '<object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\"';\n echo ' codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\">';\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"loop\" value=\"true\" />';\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"scale\" value=\"aspect\" />';\n\n echo '<!--[if !IE]>-->';\n echo \"<object type=\\\"video/quicktime\\\" data=\\\"$fullurl\\\">\";\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"loop\" value=\"true\" />';\n echo '<param name=\"scale\" value=\"aspect\" />';\n echo '<!--<![endif]-->';\n echo '<a href=\"' . $fullurl . '\">' . $fullurl . '</a>';\n echo '<!--[if !IE]>-->';\n echo '</object>';\n echo '<!--<![endif]-->';\n echo '</object>';\n echo '</div>';\n } else if ($resourcetype == \"flash\") {\n echo '<div class=\"resourcecontent resourceswf\">';\n echo '<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\">';\n echo \"<param name=\\\"movie\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"loop\" value=\"true\" />';\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"scale\" value=\"aspect\" />';\n echo '<param name=\"base\" value=\".\" />';\n echo '<!--[if !IE]>-->';\n echo \"<object type=\\\"application/x-shockwave-flash\\\" data=\\\"$fullurl\\\">\";\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"loop\" value=\"true\" />';\n echo '<param name=\"scale\" value=\"aspect\" />';\n echo '<param name=\"base\" value=\".\" />';\n echo '<!--<![endif]-->';\n echo '<a href=\"' . $fullurl . '\">' . $fullurl . '</a>';\n echo '<!--[if !IE]>-->';\n echo '</object>';\n echo '<!--<![endif]-->';\n echo '</object>';\n echo '</div>';\n\n } elseif ($resourcetype == 'zip') {\n echo '<div class=\"resourcepdf\">';\n echo get_string('clicktoopen', 'resource') . '<a href=\"' . $fullurl . '\">' . format_string($resource->name) . '</a>';\n echo '</div>';\n\n } elseif ($resourcetype == 'pdf') {\n echo '<div class=\"resourcepdf\">';\n echo '<object data=\"' . $fullurl . '\" type=\"application/pdf\">';\n echo '<param name=\"src\" value=\"' . $fullurl . '\" />';\n echo get_string('clicktoopen', 'resource') . '<a href=\"' . $fullurl . '\">' . format_string($resource->name) . '</a>';\n echo '</object>';\n echo '</div>';\n }\n\n if (trim($resource->summary)) {\n print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions, $course->id), \"center\");\n }\n\n if ($inpopup) {\n echo \"<div class=\\\"popupnotice\\\">(<a href=\\\"$fullurl\\\">$strdirectlink</a>)</div>\";\n echo \"</div>\"; // MDL-12098\n print_footer($course); // MDL-12098\n } else {\n print_spacer(20,20);\n print_footer($course);\n }\n\n } else { // Display the resource on it's own\n if (!empty($localpath)) { // Show a link to help work around browser security\n echo '<div class=\"mdl-right helplink\">';\n link_to_popup_window ('/mod/resource/type/file/localpath.php', get_string('localfile', 'resource'),\n get_string('localfilehelp','resource'), 400, 500, get_string('localfilehelp', 'resource'));\n echo '</div>';\n echo \"<div class=\\\"popupnotice\\\">(<a href=\\\"$fullurl\\\">$fullurl</a>)</div>\";\n }\n redirect($fullurl);\n }\n\n }", "title": "" }, { "docid": "14ed889b850393fe8b1f3290fc49740e", "score": "0.6189695", "text": "public function show(Dispenser $dispenser)\n {\n //\n }", "title": "" }, { "docid": "990c774538153829a382b969fb274ad6", "score": "0.61804265", "text": "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "title": "" }, { "docid": "0180fbb47af0be5e609b81a6e3465c37", "score": "0.6171014", "text": "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "title": "" }, { "docid": "428541aff5a20db0753edebab2c7fb73", "score": "0.6082806", "text": "public function get(Resource $resource);", "title": "" }, { "docid": "1a2ff798e7b52737e1e6ae5b0d854f6a", "score": "0.60512596", "text": "public function show($id)\n\t{\n\t\t// display *some* of the resource...\n\t\treturn Post::find($id);\n\t}", "title": "" }, { "docid": "8cb2cf294db063cb41e20820f36641f0", "score": "0.60389996", "text": "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "title": "" }, { "docid": "586d0347683cd6c5e16251dd1e1a0a98", "score": "0.60363364", "text": "public function show($id)\n {\n $data = Resource::findOrFail($id);\n return view('Resource/view', compact('data'));\n }", "title": "" }, { "docid": "da456d60e11065d629261fc79e691a95", "score": "0.6006895", "text": "public function displayAction()\n {\n $id = $this->params['_param_1'];\n $this->flash['message'] = \"Arriba loco, este es el mensaje del flash!\";\n return $this->render( $id );\n }", "title": "" }, { "docid": "7fdf71b227abd04e4de9889539cd1698", "score": "0.59927016", "text": "public function displayAction()\n {\n \n $this->view->headLink()->appendStylesheet($this->view->baseUrl().'/css/profile.css');\n \n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n );\n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n\n if ($input->isValid()) {\n\n $user_info = new Tripjacks_Model_Venue;\n\n $result = $user_info->getVenue($input->id);\n\n if (count($result) == 1) {\n $this->view->user_info = $result[0];\n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input');\n }\n }", "title": "" }, { "docid": "6791390f58188104a1f11120602bda6c", "score": "0.59724826", "text": "public function show($id)\n {\n // Get the resource using the parent API\n $object = $this->api()->retrieve($id);\n\n // Render show view\n $data = [Str::camel($this->package) => $object];\n return $this->content('show', $data);\n }", "title": "" }, { "docid": "dbf7cb71fa21dced48bad29b90c7f51e", "score": "0.59606946", "text": "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d2bd10ab674d0671bf2851850995cea8", "score": "0.5891874", "text": "public function show(Resena $resena)\n {\n }", "title": "" }, { "docid": "d752fd3972b546ef194ae14ab221ca30", "score": "0.58688277", "text": "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "f02f37fffab992508c7d7d6f7ae94f94", "score": "0.58684236", "text": "public function showAction() {\n\n // validate contact id is int\n $id = $this->route_params[\"id\"];\n // if id is invalid redirect to 404 page\n if (filter_var($id, FILTER_VALIDATE_INT) === false) {\n $this->show404();\n return;\n }\n\n $contact_obj = new Contact();\n $contact = $contact_obj->findById($id);\n // if no contact returned then display error message\n if ($contact == false) {\n //set error message\n $_SESSION[\"error_message\"] = \"Contact not found or deleted\";\n // redirect to show all contacts if contacts not found\n header(\"Location: /contacts\");\n return;\n }\n // render the view if all everything is Ok\n View::renderTemplate(\"contacts/show.twig.php\", [\"contact\" => $contact]);\n }", "title": "" }, { "docid": "4aec6f94d5731faefe27bdf32f7cbd44", "score": "0.5851883", "text": "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "title": "" }, { "docid": "2771b374a21e331a50c3ffd5b3e431ca", "score": "0.58124036", "text": "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "5b7cde41d4a1270d31720878d4a50b19", "score": "0.57936835", "text": "public function show($id)\n\t{\n\t\treturn $this->success($this->resource->getById($id));\n\t}", "title": "" }, { "docid": "41e5ee3783ca0e67337c6b41b7d0ca62", "score": "0.57929444", "text": "public function display()\n {\n echo $this->fetch();\n }", "title": "" }, { "docid": "fd37d1765d15b4bc18c928879eeab887", "score": "0.5791527", "text": "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "title": "" }, { "docid": "e918056f269cc66c35d0c9d5ae72cf98", "score": "0.5785671", "text": "protected function addResourceShow($name, $base, $controller, $options)\n\t{\n\t\t$uri = $this->getResourceUri($name).'/{'.$base.'}.{format?}';\n\n\t\treturn $this->get($uri, $this->getResourceAction($name, $controller, 'show', $options));\n\t}", "title": "" }, { "docid": "8e4604d345a4a1aa92109fa7c7b9b1e1", "score": "0.57850385", "text": "public function showAction(I18NResource $i18NResource)\n {\n $use_translations = $this->get('Services')->get('use_translations');\n\n if(!$use_translations){\n throw $this->createNotFoundException('Not a valid request');\n }\n\n $this->get('Services')->setMenuItem('I18NResource');\n $changes = $this->get('Services')->getLogsByEntity($i18NResource);\n\n return $this->render('i18nresource/show.html.twig', array(\n 'i18NResource' => $i18NResource,\n 'changes' => $changes,\n ));\n }", "title": "" }, { "docid": "dfcf7f89daddfb442f3e0ba6b417b34a", "score": "0.57804495", "text": "public function specialdisplayAction()\n {\n \n $this->view->headLink()->appendStylesheet($this->view->baseUrl().'/css/profile.css');\n \n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n );\n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n\n if ($input->isValid()) {\n\n $user_info = new Tripjacks_Model_Venue;\n\n $result = $user_info->getVenue($input->id);\n\n if (count($result) == 1) {\n $this->view->user_info = $result[0];\n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input');\n }\n }", "title": "" }, { "docid": "496570de6c493cd9fe30f7c52ceb87d1", "score": "0.57693255", "text": "public function show($id)\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t}", "title": "" }, { "docid": "fcef539023519ca355832da7d8f035c5", "score": "0.57576865", "text": "public function displayTask($id=null)\n\t{\n\t\t// Incoming\n\t\tif (!$id)\n\t\t{\n\t\t\t$id = Request::getInt('id', 0);\n\t\t}\n\n\t\t// Ensure we have an ID to work with\n\t\tif (!$id)\n\t\t{\n\t\t\tApp::abort(404, Lang::txt('CONTRIBUTE_NO_ID'));\n\t\t}\n\n\t\t// Get all contributors of this resource\n\t\t$resource = Entry::oneOrFail($id);\n\n\t\t$authors = $resource->authors()\n\t\t\t->ordered()\n\t\t\t->rows();\n\n\t\t// Get all roles for this resoruce type\n\t\t$roles = $resource->type->roles()->rows();\n\n\t\t// Output view\n\t\t$this->view\n\t\t\t->set('config', $this->config)\n\t\t\t->set('id', $id)\n\t\t\t->set('contributors', $authors)\n\t\t\t->set('roles', $roles)\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->setLayout('display')\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.5756713", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "1e8ae24781dac20c4f5e103867a805e0", "score": "0.5756208", "text": "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "title": "" }, { "docid": "69113639710554fd174b3aaec6536b9c", "score": "0.57561266", "text": "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5749091", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "1eedca4ba72a90a807a2f92511283570", "score": "0.57460064", "text": "public function show()\n\t{\n\n\n\t}", "title": "" }, { "docid": "5e79caa6f512ec951cafbf72e8caa6f2", "score": "0.57435393", "text": "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "title": "" }, { "docid": "e68751480fa47a0b2d2bc46570e3a883", "score": "0.5735067", "text": "public function display($id = null) {\n \n }", "title": "" }, { "docid": "ca0564d197f7b97c9c7bb3bf9ec0d891", "score": "0.57342285", "text": "public function display($id = null) {\n\t\t$page = $this->SimplePage->findById($id);\n\t\tif(!$page){\n\t\t\t$this->Session->setFlash(__('Page not found'),'error');\n\t\t\t$this->redirect($this->referer());\n\t\t}\n\t\t\n\t\t//If the page was requested using requestAction, return the page object. Can be handy for integration of content in custom pages.\n\t\tif (! empty($this->request->params['requested']) ) {\n\t\t\treturn $page;\n\t\t}\n\t\t\n\t\t$this->set('page',$page);\n\t}", "title": "" }, { "docid": "cd5d84906dc48426110533ed06d6910f", "score": "0.5728813", "text": "public function show()\n {\n $data = $this->m->getOne('main', Validate::sanitize($_GET['id']));\n \n //sending data to the view\n $this->view->assign('id', $_GET['id']);\n $this->view->assign('data', $data);\n $this->view->assign('title', 'Page title');\n $this->view->display('main/show.tpl');\n \n }", "title": "" }, { "docid": "7684a3ad9102aa78b598eb1a828f68c5", "score": "0.57259274", "text": "public function show($id)\n {\n //\n $this->_show($id);\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "e3c948157c6e692386196d78f9677b46", "score": "0.5713412", "text": "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "title": "" }, { "docid": "a494be3f6d40a2f537ff292b7a0ccaae", "score": "0.5711622", "text": "public function item($id=0)\n {\n\t\tif($this->session->userlogged_in !== '*#loggedin@Yes')\n\t\t{\n\t\t\tredirect(base_url().'dashboard/login/');\n }\n \n $resource = $this->member_resource_model->find($id);\n if(empty($resource))\n {\n $this->session->action_success_message = 'Invalid item selection.';\n redirect(base_url().'member_resources/');\n }\n \n\t\t$data = array(\n 'page_title' => 'Resource detail',\n 'resource' => $resource\n );\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('member_resources/item_view');\n\t\t$this->load->view('templates/footer');\n }", "title": "" }, { "docid": "b791634a3b29fe8adff71b755317e88e", "score": "0.5706405", "text": "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "title": "" }, { "docid": "5766cf8c652099e6e707b39bd867a1c0", "score": "0.5704152", "text": "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "d936662ad1c81979476df2e0767c5e19", "score": "0.5699578", "text": "public function show($id)\n\t{\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "9032057600ac1cb05d858c6264b8aed1", "score": "0.5693083", "text": "public function show()\n {\n return auth()->user()->getResource();\n }", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
78c574f160a17b3186880a48dbef2ae4
Define the frames required to recover.
[ { "docid": "9c2ad803a6641adb96b65d80d2c1b17f", "score": "0.5541028", "text": "public function recoverIn($frames)\n {\n if (null !== $this->recoveryFrames) {\n throw new LogicException('Recovery frames already defined');\n }\n $this->recoveryFrames = $frames;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "18515ca1ccfce42821d5ba6468a61525", "score": "0.5578389", "text": "function dumpFrames()\r\n {\r\n $frameset=new Frameset(null);\r\n $frameset->Align=alClient;\r\n $frameset->FrameSpacing=$this->FrameSpacing;\r\n $frameset->FrameBorder=$this->FrameBorder;\r\n $frameset->BorderWidth=$this->BorderWidth;\r\n $frameset->controls=$this->controls;\r\n $frameset->show();\r\n }", "title": "" }, { "docid": "b172fac1512ebdf96bf3c5da7dfecdf3", "score": "0.5556316", "text": "protected function newFrame()\n {\n $this->currentFrame = $this->blankFrame;\n $this->bitmapsToRender = [];\n }", "title": "" }, { "docid": "60ac4b40ccfd791003048fe7147ab6ed", "score": "0.49497527", "text": "public function setBackgroundFrame(array $frame)\n {\n $this->blankFrame = $frame;\n }", "title": "" }, { "docid": "8eb828217ef0fc3fa2f48d6d8984e378", "score": "0.4902349", "text": "public static function frameInitialize(): void\n {\n date_default_timezone_set('Asia/Shanghai');\n self::loadConf(EASYSWOOLE_ROOT . '/Conf');\n // 获得数据库配置\n $dbConf = Config::getInstance()->getConf('database');\n // 全局初始化\n Db::setConfig($dbConf);\n }", "title": "" }, { "docid": "29ba7ab5adc6de61af762c7cd35f649b", "score": "0.48786595", "text": "public function readFrame($class_name){}", "title": "" }, { "docid": "9bc86cc52f69834baf9a5d2632e95ac7", "score": "0.481535", "text": "public function getFrameList(){}", "title": "" }, { "docid": "532c7915320ac3a7f581012f1b79d2de", "score": "0.478965", "text": "function nextFrame(){}", "title": "" }, { "docid": "3c453676fdb8fc9734621455465a6159", "score": "0.47618136", "text": "public function __construct() {\n\t\t/*\n\t\t\tCalling script path and name is the prefix to several files used by the class: \n\t\t\t- recovery file: {SCRIPT_PATHNAME}.recover.inc\n\t\t\t- input file: {SCRIPT_PATHNAME}.input\n\t\t\t- output file: {SCRIPT_PATHNAME}.output\n\t\t\t- errors file: {SCRIPT_PATHNAME}.errors\n\t\t\t- todo file: {SCRIPT_PATHNAME}.todo\n\t\t*/\n\t\t$this->recovery_file = $_SERVER['PATH_TRANSLATED'] . '.recover.inc';\n\t\tif (file_exists($this->recovery_file)) {\n\t\t\t$this->debug('Running in recovery mode',1);\n\t\t\tif ($recovery = @unserialize(file_get_contents($this->recovery_file))) {\n\t\t\t\tif (!@unlink($this->recovery_file)) $this->debug('Unable to delete recovery file!',2);\n\t\t\t\tforeach ($recovery as $k=>$v) $this->$k = $v;\n\t\t\t} else {\n\t\t\t\t$this->debug('Unable to recover datas, exiting',2);\n\t\t\t\t$this->done = true; // prevent backup\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t\t$this->basefile = $_SERVER['PATH_TRANSLATED'];\n\t\t$this->success_codes = $this->default_success_codes; \n\t\t$this->fail_codes = $this->default_fail_codes;\n\t\t$this->redirect_codes = $this->default_redirect_codes;\n\t\t$this->memory_limit = intval(ini_get('memory_limit'));\n\t\tif (strpos(ini_get('memory_limit'),'K') !== false) $this->memory_limit *= 1024; \n\t\telseif (strpos(ini_get('memory_limit'),'M') !== false) $this->memory_limit *= 1024 * 1024; \n\t\telseif (strpos(ini_get('memory_limit'),'G') !== false) $this->memory_limit *= 1024 * 1024 * 1024; \n\t\t$this->input_file = $this->basefile . '.input';\n\t\t$this->output_file = $this->basefile . '.output';\n\t\t$this->todo_file = $this->basefile . '.todo';\n\t\t$this->errors_file = $this->basefile . '.errors';\n\t\tif (!$this->fp_todo = @fopen($this->todo_file,$this->recovery_mode ? 'ab' : 'wb')) {\n\t\t\t$this->debug(sprintf('Todo file \"%s\" not writable! Exiting',$this->todo_file),2);\n\t\t\texit;\n\t\t}\n\t\tregister_shutdown_function(array($this, '_destruct'));\n\t\tif (function_exists('pcntl_signal')) {\n\t\t\t$this->debug('System interruptions will be intercepted!',1);\t\n\t\t\tpcntl_signal(SIGINT,array($this,'_destruct'));\n\t\t\tpcntl_signal(SIGKILL,array($this,'_destruct'));\n\t\t} \n\t}", "title": "" }, { "docid": "f3b676d89539ef7c816e209a0ada5dfb", "score": "0.47536448", "text": "function exceptionHandler($ex) {\n // @fixme - die errors negeren of niet?... \n\n // Prevent cascading exceptions.\n set_error_handler(null);\n set_exception_handler(null);\n\n // End all output buffers.\n while(ob_get_level()) {\n ob_end_clean();\n }\n\n if (php_sapi_name() !== 'cli') { \n header('HTTP/1.1 500 Internal server error');\n }\n\n // @fixme - only expose this\n // when APP_DEBUG or something is set.\n \n\n $frames = $ex->getTrace();\n if (!($ex instanceof InspectException)) { \n array_unshift($frames, [\n 'file' => $ex->getFile(),\n 'line' => $ex->getLine(),\n ]);\n }\n\n $isFirst = true;\n $newFrames = [];\n\n foreach ($frames as $idx => $fr) {\n if (isset($fr['file'])) {\n if (dirname($fr['file']) === __DIR__) {\n continue;\n }\n $line = $fr['line'];\n $file = $fr['file'];\n $lines = [];\n\n $code_context = '';\n\n if (strpos($file, \"eval()'d code\") > 0) {\n //$file = 'eval()\\'d code';\n if (isset($GLOBALS['last_evalled_code'])) { \n $lastCode = $GLOBALS['last_evalled_code'] ?? [];\n if (is_array($lastCode)) { \n $lastCode = array_pop($GLOBALS['last_evalled_code']);\n }\n $lines = array_map(function($l) { return $l.\"\\n\"; }, explode(\"\\n\", $lastCode));\n } else {\n $lines = [];\n }\n } elseif (file_exists($file)) {\n $lines = file($file);\n }\n\n if ($lines) { \n $code_context = '';\n for ($i = max(0, $line - 5); $i < min($line + 5, count($lines)); $i++) { \n $code_context .= ($i+1).': ' . $lines[$i];\n }\n } \n $newFrames[] = [\n 'file' => $file,\n 'line' => $line,\n 'code' => $code_context,\n 'content' => join(\"\", $lines)\n ];\n }\n }\n\n \n\n if (stripos($_SERVER['HTTP_ACCEPT'] ?? '', 'application/json') !== false) {\n header('Content-type: application/json');\n echo json_encode([\n 'type' => get_class($ex),\n 'message' => $ex->getMessage(),\n 'error' => get_class($ex). \": \" . $ex->getMessage(), \n 'description' => method_exists($ex, 'getDescription') ? $ex->getDescription() : '',\n 'nice_trace' => $newFrames\n ]) . PHP_EOL;\n } else {\n echo \"<pre>$ex</pre>\";\n print_r(array_map(function($f) {\n unset($f['content']);\n return $f;\n }, $newFrames));\n }\n \n exit(1);\n }", "title": "" }, { "docid": "bcec3b2035cd3f160bfd7d7e24667ff0", "score": "0.4692064", "text": "public static function frameInitialize(): void\n {\n date_default_timezone_set('Asia/Shanghai');\n }", "title": "" }, { "docid": "ce8465782324a494188faaf5b3752e3c", "score": "0.4681734", "text": "function dumpContents()\r\n {\r\n if (($this->ControlState & csDesigning)==csDesigning)\r\n {\r\n $msg=$this->Name;\r\n $msg=\"$this->Name<br>place Frames inside this Frameset\";\r\n\r\n $bstyle=\" style=\\\"border: 1px dotted #000000;font-size:10px; font-family:verdana,tahoma,arial\\\" \";\r\n echo \"<table border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" width=\\\"$this->width\\\" height=\\\"$this->height\\\"><tr><td $bstyle align=\\\"center\\\">$msg</td></tr></table>\";\r\n }\r\n else\r\n {\r\n reset($this->controls->items);\r\n $vframes=array();\r\n $hframes=array();\r\n while (list($k,$v)=each($this->controls->items))\r\n {\r\n if (($v->inheritsFrom('Frame')) || ($v->inheritsFrom('Frameset')))\r\n {\r\n if (($v->Align==alTop) || ($v->Align==alBottom))\r\n {\r\n $vframes[$v->Top]=$v;\r\n }\r\n if (($v->Align==alLeft) || ($v->Align==alRight))\r\n {\r\n $hframes[$v->Left]=$v;\r\n }\r\n }\r\n }\r\n\r\n ksort($vframes,SORT_NUMERIC);\r\n ksort($hframes,SORT_NUMERIC);\r\n\r\n //Dump rows\r\n if (count($vframes)!=0)\r\n {\r\n reset($vframes);\r\n $topheights=\"\";\r\n $bottomheights=\"\";\r\n while(list($key, $val)=each($vframes))\r\n {\r\n if ($val->Align==alTop) $topheights.=$val->Height.\",\";\r\n if ($val->Align==alBottom) $bottomheights.=\",\".$val->Height;\r\n }\r\n\r\n $events = $this->readFramesetJSEvents();\r\n\r\n echo \"<frameset rows=\\\"$topheights*$bottomheights\\\" cols=\\\"*\\\" frameborder=\\\"$this->FrameBorder\\\" border=\\\"$this->BorderWidth\\\" framespacing=\\\"$this->FrameSpacing\\\" $events>\\n\";\r\n reset($vframes);\r\n while(list($key, $val)=each($vframes))\r\n {\r\n if ($val->Align==alTop) $val->show();\r\n }\r\n //Dump here the horizontal frameset\r\n //**********************************\r\n $this->dumpHorizontalFrames($hframes, false);\r\n //**********************************\r\n reset($vframes);\r\n while(list($key, $val)=each($vframes))\r\n {\r\n if ($val->Align==alBottom) $val->show();\r\n }\r\n echo \"</frameset>\\n\";\r\n }\r\n else\r\n {\r\n $this->dumpHorizontalFrames($hframes, true);\r\n }\r\n }\r\n\r\n }", "title": "" }, { "docid": "35dcf11dae1ba71c9c08f65067d3cb7f", "score": "0.46737486", "text": "static public function captureFrame ( $source_file , $target_file , $frame_count = 1, $target_type = \"image2\" ,\r\n\t$width = self::DEFAULT_THUMBNAIL_WIDTH , $height = self::DEFAULT_THUMBNAIL_HEIGHT , $position = null , $plain_log_file_name = false )\r\n\t{\r\n\t\tif ($width == 0)\r\n\t\t$width = self::DEFAULT_THUMBNAIL_WIDTH;\r\n\t\t\t\r\n\t\tif ($height == 0)\r\n\t\t$height = self::DEFAULT_THUMBNAIL_HEIGHT;\r\n\t\t\t\r\n\t\t$temp_flv = null;\r\n\t\t\r\n//\t\t***remove if statement because myFlvStaticHandler::clipToNewFile is not making a valid flv\r\n//\t\tif ($frame_count == 1 && $position > 10 && pathinfo($source_file, PATHINFO_EXTENSION) == \"flv\") \r\n//\t\t{\r\n//\t\t\t$timestamp = $position * 1000;\r\n//\t\t\t$temp_flv = myContentStorage::getFSUploadsPath().\"capture_\".microtime(true).rand().\".flv\";\r\n//\t\t\t$first_timestamp = myFlvStaticHandler::clipToNewFile($source_file, $temp_flv, $timestamp, $timestamp + 1);\r\n//\t\t\t$source_file = $temp_flv;\r\n//\t\t\t$position = floor(($timestamp - $first_timestamp) / 1000);\r\n//\t\t\tif ($position < 0)\r\n//\t\t\t\t$position = 0;\r\n//\t\t}\r\n\t\t\r\n\t\t//$duration = 0.01;\r\n\r\n\t\t//$text_output_file = myContentStorage::getFSUploadsPath().hash ( 'md5' , $target_file ) . \".txt\";\r\n\t\t$text_output_file = self::createLogFileName ($source_file , $plain_log_file_name );\r\n\t\t// hq - activate high quality settings\r\n\t\t// deinterlace - deinterlace pictures\r\n\t\t$cmd = kConversionEngineFfmpeg::getCmd();\r\n\t\t\r\n\t\t// Test parameters\r\n\t\t$validInput = TRUE;\r\n\t\t$validInput &= is_numeric($width);\r\n\t\t$validInput &= is_numeric($height);\r\n\t\t$validInput &= is_numeric($frame_count);\r\n\t\t$validInput &= is_numeric($position);\r\n\t\t$validInput &= (realpath($source_file) !== FALSE);\r\n\t\t\r\n\t\tif(!$validInput)\r\n\t\t\tthrow new Exception(\"Illegal input was given\");\r\n\t\t\r\n\t\t// The '-ss 0.01' is 'dummy' seek-to setting is done to ensure preciseness of the main seek\r\n\t\t// command that is done at the beginning of the command line\r\n\t\t// here 'the -ss 0.01' is presented in the $position_str_suffix\r\n\t\t// the $position_str presets the specifix second to capture\r\n\t\t$position_str = $position ? \" -ss $position \" : \"\";\r\n\t\t$position_str_suffix = $position ? \" -ss 0.01 \" : \"\";\r\n\t\t$dimensions = ($width == -1 || $height == -1) ? \"\" : (\"-s \". $width .\"x\" . $height);\r\n\t\t\r\n\t\t$exec_cmd = $cmd . $position_str . \" -i \" . \"\\\"$source_file\\\"\" . \" -an -y -r 1 \" . $dimensions .\r\n\t\t\t\" \" . \" -vframes $frame_count -f \\\"\" . $target_type . \"\\\" \" . $position_str_suffix . \"\\\"$target_file\\\"\" . \" 2>&1\";\r\n\t\t\r\n\t\tKalturaLog::log(\"ffmpeg cmd [$exec_cmd]\");\r\n\t\t$output = array ();\r\n\t\t$return_value = \"\";\r\n\r\n\t\tset_time_limit(120);\r\n\t\t$rv=exec ( $exec_cmd , $output , $return_value );\r\n\t\tif($position<30 && isset($position_str)){\r\n\t\t\tforeach($output as $outLine) {\r\n\t\t\t\tif(strpos($outLine,\"first frame not a keyframe\")===false \r\n\t\t\t\t&& strpos($outLine,\"first frame is no keyframe\")===false)\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\tKalturaLog::log(\"FFMpeg response - \\n\".print_r(implode($output),1));\r\n\t\t\t\tKalturaLog::log(\"The ffmpeg responded with 'first-frame-not-a-keyframe'. The fast-seek mode failed to properly get the right frame. Switching to the 'slow-mode' that is limited to th3 first 30sec only \".print_r(implode($output),1));\r\n\t\t\t\t$exec_cmd = kConversionEngineFfmpeg::getCmd() . \" -i \\\"$source_file\\\"\". $position_str . \" -an -y -r 1 \" . $dimensions .\r\n\t\t\t\t\t\" \" . \" -vframes $frame_count -f \\\"\" . $target_type . \"\\\" \" . \"\\\"$target_file\\\"\" . \" 2>&1\";\r\n\t\t\t\tKalturaLog::log(\"fmpeg cmd [$exec_cmd]\");\r\n\t\t\t\t$output = array ();\r\n\t\t\t\t$return_value = \"\";\r\n\r\n\t\t\t\tset_time_limit(120);\r\n\t\t\t\t$rv=exec ( $exec_cmd , $output , $return_value );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$conversion_info = new conversionInfo();\r\n\t\t$conversion_info->fillFromMetadata( $source_file );\r\n\t\t$conversion_info->video_width = $width;\r\n\t\t$conversion_info->video_height = $height;\r\n\t\t// try to extract the rest of the data from the output file\r\n\t\t\r\n\t\tif ($temp_flv)\r\n\t\t\tunlink($temp_flv);\r\n\r\n\t\t// encapsulte\r\n\t\treturn array ( \"return_value\" => $return_value , \"output\" => $output , \"conversion_info\" => $conversion_info );\r\n\r\n\r\n\t}", "title": "" }, { "docid": "621f5cb6818a98f15d68f7426032a4e8", "score": "0.46338013", "text": "public function setFrames($frames)\n {\n $this->frames = $frames;\n return $this;\n }", "title": "" }, { "docid": "23a39b5fa3d5635969fa206435ff21de", "score": "0.45783755", "text": "public function addFrame($frame){}", "title": "" }, { "docid": "24ab16789cbc51c6945e832e0be7fd02", "score": "0.45493844", "text": "public function recover()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$fo = FOFactory::build('recover');\n\t\t\tif (!$fo->isSent())\n\t\t\t\treturn;\n\t\t\t$this->model->recover($fo);\n\t\t\t$this->request->success = Bundle::get('recover.message.success.password.sent');\n\t\t}\n\t\tcatch (FormNotFoundException $e)\n\t\t{\n\t\t\t$e->getTraceAsString();\n\t\t\t$this->request->error = Bundle::get('form.validation.processing.problem');\n\t\t}\n\t\tcatch (FormValidationException $e)\n\t\t{\n\t\t\t$e->getTraceAsString();\n\t\t\t$this->request->error = Bundle::get('form.validation.invalid.value', $e->getMessage());\n\t\t}\n\t\tcatch (NoResultException $e)\n\t\t{\n\t\t\t$e->getTraceAsString();\n\t\t\t$this->request->error = Bundle::get('recover.message.error.invalid.email', $fo->getEmail());\n\t\t}\n\t}", "title": "" }, { "docid": "d01c730eb12096b906ca8b9c30255703", "score": "0.45424798", "text": "public function frameInitialize(): void\n {\n date_default_timezone_set('Asia/Shanghai');\n }", "title": "" }, { "docid": "3b7fc966ff013ac8ff1d95abfed20e23", "score": "0.45349714", "text": "function acquireFrame($file){\n\t $cmd = 'echo \"\" | '; //just a workarround for videos,\n\t // imagemagick first converts all frames then deletes all but the first\n\t $cmd .= $this->getBinary('convert');\n\t\t$cmd .= ' ' . $file .'[0]' ;\n\t\t$cmd .= ' ' . $this->getDestination() ;\n\t\t\n\t\t$this->execute($cmd);\n\t\t$this->setSource($this->getDestination());\n\t\t$this->setHistory($this->getDestination());\n \treturn $this ;\n\t}", "title": "" }, { "docid": "09b62870f837cd15bec99c088578d85f", "score": "0.45306352", "text": "public function get_frame_details() {\n\n $frame_array = array();\n $usertypeid = 0; \n $query = $this->db->select('frame_id,frame_title,frame_price,frame_description,status')\n ->select('CONCAT(\"'.base_url(FRAMES_PATH).'/\",frame_image) as frame_image',false)\n \n ->from('frames')->where(['status' => '1', 'is_deleted' => '0'])->get();\n \n $data['frame_data'] = $query->result_array();\n \n if (!empty($data['frame_data'])) {\n \n// $data['frame_data'] = $data['frame_data'][0];\n// \n// if(!empty($data['login_data']['profile_image']) && file_exists(USERPROFILE.$data['login_data']['user_id'].'/'.$data['login_data']['profile_image']))\n// {\n// $data['login_data']['profile_image'] = base_url().ABSUSERPROFILE.$data['login_data']['user_id'].'/'.$data['login_data']['profile_image'];\n// }\n// \n// $frame_array = $data['login_data'];\n return $data;\n }\n \n // return $frame_array;\n }", "title": "" }, { "docid": "f138b51cf1e74452d1fc87991d72ab25", "score": "0.45266095", "text": "private function setFrameHeader()\n {\n header('X-Frame-Options: deny');\n }", "title": "" }, { "docid": "d787b267051966069a25e05fea280a17", "score": "0.4524239", "text": "public function writeimage($filename, $all_frames){}", "title": "" }, { "docid": "1cbab0ab5061bc5f29acacef7a5d1256", "score": "0.45186552", "text": "public function pull(): Frame\n {\n // Read the frame \"header\" first, two bytes.\n $data = $this->read(2);\n\n list ($byte_1, $byte_2) = array_values(unpack('C*', $data));\n $final = (bool)($byte_1 & 0b10000000); // Final fragment marker.\n $rsv = $byte_1 & 0b01110000; // Unused bits, ignore\n\n // Parse opcode\n $opcode_int = $byte_1 & 0b00001111;\n $opcode_ints = array_flip(self::$opcodes);\n $opcode = array_key_exists($opcode_int, $opcode_ints) ? $opcode_ints[$opcode_int] : strval($opcode_int);\n\n // Masking bit\n $masked = (bool)($byte_2 & 0b10000000);\n\n $payload = '';\n\n // Payload length\n $payload_length = $byte_2 & 0b01111111;\n\n if ($payload_length > 125) {\n if ($payload_length === 126) {\n $data = $this->read(2); // 126: Payload length is a 16-bit unsigned int\n $payload_length = current(unpack('n', $data));\n } else {\n $data = $this->read(8); // 127: Payload length is a 64-bit unsigned int\n $payload_length = current(unpack('J', $data));\n }\n }\n\n // Get masking key.\n if ($masked) {\n $masking_key = $this->stream->read(4);\n }\n\n // Get the actual payload, if any (might not be for e.g. close frames).\n if ($payload_length > 0) {\n $data = $this->read($payload_length);\n if ($masked) {\n // Unmask payload.\n for ($i = 0; $i < $payload_length; $i++) {\n $payload .= ($data[$i] ^ $masking_key[$i % 4]);\n }\n } else {\n $payload = $data;\n }\n }\n $frame = new Frame($opcode, $payload, $final);\n $this->logger->debug(\"[frame-handler] Pulled '{opcode}' frame\", [\n 'opcode' => $frame->getOpcode(),\n 'final' => $frame->isFinal(),\n 'content-length' => $frame->getPayloadLength(),\n ]);\n return $frame;\n }", "title": "" }, { "docid": "e025c4ffc13818dc9637bcf64123bb86", "score": "0.448367", "text": "function frameImage($matte_color, $width, $height, $inner_bevel, $outer_bevel){}", "title": "" }, { "docid": "228e567153dc267faadbbd97bce4679c", "score": "0.44802874", "text": "public function setPageFrame($Frame='default'){\r\n $this->Frame = $Frame;\r\n}", "title": "" }, { "docid": "03e80daa3d646e18562cc1f68f961f61", "score": "0.44795138", "text": "public function createFrame($version)\n {\n $width = Data::$capacity[$version][Data::QRCAP_WIDTH];\n $frameLine = str_repeat(\"\\0\", $width);\n $frame = array_fill(0, $width, $frameLine);\n // Finder pattern\n $frame = $this->putFinderPattern($frame, 0, 0);\n $frame = $this->putFinderPattern($frame, $width - 7, 0);\n $frame = $this->putFinderPattern($frame, 0, $width - 7);\n // Separator\n $yOffset = $width - 7;\n for ($ypos = 0; $ypos < 7; ++$ypos) {\n $frame[$ypos][7] = \"\\xc0\";\n $frame[$ypos][$width - 8] = \"\\xc0\";\n $frame[$yOffset][7] = \"\\xc0\";\n ++$yOffset;\n }\n $setPattern = str_repeat(\"\\xc0\", 8);\n $frame = $this->qrstrset($frame, 0, 7, $setPattern);\n $frame = $this->qrstrset($frame, $width-8, 7, $setPattern);\n $frame = $this->qrstrset($frame, 0, $width - 8, $setPattern);\n // Format info\n $setPattern = str_repeat(\"\\x84\", 9);\n $frame = $this->qrstrset($frame, 0, 8, $setPattern);\n $frame = $this->qrstrset($frame, $width - 8, 8, $setPattern, 8);\n $yOffset = $width - 8;\n for ($ypos = 0; $ypos < 8; ++$ypos, ++$yOffset) {\n $frame[$ypos][8] = \"\\x84\";\n $frame[$yOffset][8] = \"\\x84\";\n }\n // Timing pattern\n $wdo = $width - 15;\n for ($idx = 1; $idx < $wdo; ++$idx) {\n $frame[6][(7 + $idx)] = chr(0x90 | ($idx & 1));\n $frame[(7 + $idx)][6] = chr(0x90 | ($idx & 1));\n }\n // Alignment pattern\n $frame = $this->putAlignmentPattern($version, $frame, $width);\n // Version information\n if ($version >= 7) {\n $vinf = $this->getVersionPattern($version);\n $val = $vinf;\n for ($xpos = 0; $xpos < 6; ++$xpos) {\n for ($ypos = 0; $ypos < 3; ++$ypos) {\n $frame[(($width - 11) + $ypos)][$xpos] = chr(0x88 | ($val & 1));\n $val = $val >> 1;\n }\n }\n $val = $vinf;\n for ($ypos = 0; $ypos < 6; ++$ypos) {\n for ($xpos = 0; $xpos < 3; ++$xpos) {\n $frame[$ypos][($xpos + ($width - 11))] = chr(0x88 | ($val & 1));\n $val = $val >> 1;\n }\n }\n }\n // and a little bit...\n $frame[$width - 8][8] = \"\\x81\";\n return $frame;\n }", "title": "" }, { "docid": "778ee9378488dd0cf8a9e4b55f903d8a", "score": "0.44775295", "text": "function frameInitialized()\n {\n }", "title": "" }, { "docid": "09a5143b2e9628c6ebed1ef78ce01c3b", "score": "0.44661918", "text": "public function readFrame()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (!isset($this->_read_frame))\n\t\t\t\t$this->_read_frame = new FrameIncoming();\n\t\t\t\n\t\t\t$frame = $this->_read_frame;\n\t\t\t\n\t\t\twhile(!$frame->isReady())\n\t\t\t{\n\t\t\t\tif (strlen($this->_read_buffer) === 0)\n\t\t\t\t\t$this->readRaw();\n\t\t\t\t\t\n\t\t\t\t$this->_read_buffer = $frame->appendFrameRaw($this->_read_buffer);\n\t\t\t}\n\t\t\t$this->_read_frame = null;\n\t\t}\n\t\tcatch (FrameIncomingException $exception)\n\t\t{\n\t\t\t$this->disconnect(self::CONNECTION_CLOSE_MODE_SOFT, 'Invalid frame recieved: '.$frame->getFrameRaw(), self::HOST_LOCAL);\n\t\t\tthrow new ConnectionException(ConnectionException::connectionBroken('FrameIncomingException: '.$exception->getMessage().' Frame raw: '.$frame->getFrameRaw()));\n\t\t}\n\t\t// process control frames, recieved from remote server\n\t\tif ($this->processControlFrames())\n\t\t\tswitch($frame->getOpcode())\n\t\t\t{\n\t\t\t\tcase FrameIncoming::OPCODE_CONNECTION_CLOSE:\n\t\t\t\t\t$this->disconnect(self::CONNECTION_CLOSE_MODE_SOFT, $frame->getPayloadData(), self::HOST_REMOTE);\n\t\t\t\t\tthrow new ConnectionException(ConnectionException::connectionCloseMessageRecieved($frame->getPayloadData()));\n\t\t\t\t\tbreak;\n\t\t\t\tcase FrameIncoming::OPCODE_PING:\n\t\t\t\t\t// try to send PONG frame in response\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->writeFrame(new FrameOutcoming($frame->getPayloadData(), FrameOutcoming::OPCODE_PONG, FrameOutcoming::FLAG_FIN));\n\t\t\t\t\t}\n\t\t\t\t\tcatch(FrameOutcomingException $exception)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->disconnect(self::CONNECTION_CLOSE_MODE_SOFT, 'PONG frame is invalid: '.$frame->getFrameRaw(), self::HOST_LOCAL);\n\t\t\t\t\t\tthrow new ConnectionException(ConnectionException::connectionBroken('FrameOutcomingException: '.$exception->getMessage().' Frame raw: '.$frame->getFrameRaw()));\n\t\t\t\t\t}\n\t\t\t\t\t$frame = $this->readFrame();\n\t\t\t\t\tbreak;\n\t\t\t\tcase FrameIncoming::OPCODE_PONG:\n\t\t\t\t\t$frame = $this->readFrame();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\treturn $frame;\n\t}", "title": "" }, { "docid": "be7e278a0622e75cc44daf3b415c58de", "score": "0.44655958", "text": "public function testNextFrameIncomplete()\n {\n $this->io->push(\"\\x03\\x00\\x00\\x00\\x00\\x00\\x01\\x02\");\n\n $frame = $this->wire->next(true);\n\n self::assertNull($frame);\n }", "title": "" }, { "docid": "6e50ead2fd766597697aae01feddfcdd", "score": "0.44559208", "text": "function dumpHorizontalFrames($hframes, $outputevents)\r\n {\r\n if (count($hframes)!=0)\r\n {\r\n reset($hframes);\r\n $leftwidths=\"\";\r\n $rightwidths=\"\";\r\n while(list($key, $val)=each($hframes))\r\n {\r\n if ($val->Align==alLeft) $leftwidths.=$val->Width.\",\";\r\n if ($val->Align==alRight) $rightwidths.=\",\".$val->Width;\r\n }\r\n\r\n // only output events when they have an affect\r\n // (only the most outer frameset will receive the onload event)\r\n $events = ($outputevents) ? $this->readFramesetJSEvents() : \"\";\r\n\r\n $frameborder = \"\"; // fbDefault\r\n switch ($this->FrameBorder)\r\n {\r\n case fbNo: $frameborder = \"no\"; break;\r\n case fbYes: $frameborder = \"yes\"; break;\r\n }\r\n\r\n echo \"<frameset cols=\\\"$leftwidths*$rightwidths\\\" rows=\\\"*\\\" frameborder=\\\"$frameborder\\\" border=\\\"$this->BorderWidth\\\" framespacing=\\\"$this->FrameSpacing\\\" $events>\\n\";\r\n reset($hframes);\r\n while(list($key, $val)=each($hframes))\r\n {\r\n if ($val->Align==alLeft) $val->show();\r\n }\r\n //Dump here the alClient frames\r\n $this->dumpClientFrames();\r\n\r\n reset($hframes);\r\n while(list($key, $val)=each($hframes))\r\n {\r\n if ($val->Align==alRight) $val->show();\r\n }\r\n echo \"</frameset>\\n\";\r\n }\r\n else\r\n {\r\n $this->dumpClientFrames();\r\n }\r\n }", "title": "" }, { "docid": "7a666eab1b6fd3d1d8e6f767d1ced27b", "score": "0.44382858", "text": "public static function cantAddFrameToReadyMessage()\n\t{\n\t\treturn array('Can\\'t add frame to message. Message ready and has all needed frames.', self::CANT_ADD_FRAME_TO_READY_MESSAGE);\t\n\t}", "title": "" }, { "docid": "489a2a55b14f7dc83dd72812d007dfc4", "score": "0.4430728", "text": "public function frameImage ($matte_color, $width, $height, $inner_bevel, $outer_bevel) {}", "title": "" }, { "docid": "ceb3539ddb433d217ed3bd8eac446167", "score": "0.44304705", "text": "public function recoverFromCorruption(){}", "title": "" }, { "docid": "ceb3539ddb433d217ed3bd8eac446167", "score": "0.44299522", "text": "public function recoverFromCorruption(){}", "title": "" }, { "docid": "1255aa65b1348689a647bd2cfd009d32", "score": "0.44228464", "text": "public static function restore()\n {\n if (! empty(self::$stack)) {\n error_reporting(array_pop(self::$stack));\n }\n }", "title": "" }, { "docid": "cedc9e819164967d5b21305a271af55e", "score": "0.43975183", "text": "function fdf_set_target_frame($fdf_document, $frame_name)\n{\n}", "title": "" }, { "docid": "d13a034ff3f989b951fe75d865d1dbbb", "score": "0.43716162", "text": "public function testNextFrameHeader()\n {\n $this->io->push(\"\\x08\\x00\\x00\\x00\\x00\\x00\\x00\");\n\n $frame = $this->wire->next(true);\n\n self::assertNull($frame);\n }", "title": "" }, { "docid": "e9dce4c6d86df6faa1c3a31684a56ffd", "score": "0.4367353", "text": "public function getFrames()\n {\n return $this->frames;\n }", "title": "" }, { "docid": "15c84fd6cdee482dae6e82adcb3f5037", "score": "0.435844", "text": "public function screencastFrameAck(ContextInterface $ctx, ScreencastFrameAckRequest $request): void;", "title": "" }, { "docid": "607aba347b53974b72df121f944a51e1", "score": "0.43547785", "text": "protected function decodePayload(){\n\t}", "title": "" }, { "docid": "b20eb8454ba5e027c95bedf67637bc24", "score": "0.43409064", "text": "public function __setFrame( $frame )\n {\n $this->frame = $frame;\n if ( $this->frame != null ) {\n $this->frame->_setController( $this );\n }\n }", "title": "" }, { "docid": "acbbdbbddc2eda75bb03298da5155512", "score": "0.43281874", "text": "private function _parseFrames(array $frames)\n {\n // TODO: Throw exceptions/errors instead of continue! (best would be, to display all at once)\n foreach ($frames as $identifier => $frame) {\n if (isset($frame['identifier']) === true) {\n $identifier = $frame['identifier'];\n }\n\n if (strlen($identifier) !== 4) {\n continue;\n }\n\n // Text frames must have content, as default encoding UTF-16LE will be used.\n // Non-Text frames must have raw element.\n if ($identifier{0} === \"T\") {\n if (isset($frame['content']) === false) {\n continue;\n }\n\n if (isset($frame['encoding']) === false || $frame['encoding'] === null) {\n $frame['encoding'] = \"UTF-16LE\";\n $frame['content'] = mb_convert_encoding($frame['content'], \"UTF-16LE\");\n } elseif (in_array($frame['encoding'], $this->_tagWriter->getSupportedTextEncodings()) === false) {\n throw new \\UnexpectedValueException(\"Invalid text encoding, got: \".$frame['encoding']);\n }\n } else {\n if (isset($frame['raw']) === false) {\n continue;\n }\n }\n\n $this->_frames[$identifier] = $frame;\n }\n }", "title": "" }, { "docid": "cc3d2827e861a4772c2fad56eb7dd3fe", "score": "0.432645", "text": "public function capture() {\r\n }", "title": "" }, { "docid": "cc3d2827e861a4772c2fad56eb7dd3fe", "score": "0.432645", "text": "public function capture() {\r\n }", "title": "" }, { "docid": "cc3d2827e861a4772c2fad56eb7dd3fe", "score": "0.432645", "text": "public function capture() {\r\n }", "title": "" }, { "docid": "c75958c4172bbbe954441f4478c43fc0", "score": "0.4317113", "text": "protected function initTrace() {\n $this->trace = debug_backtrace(static::getTraceOptions());\n // Remove top stack frames up to and including Exception::__init__,\n // set the 'file' and 'line' properties appropriately\n while (!empty($this->trace)) {\n $top = $this->trace[0];\n if (isset($top['class']) && isset($top['function']) &&\n strcasecmp($top['class'], 'exception') === 0 &&\n strcasecmp($top['function'], '__init__') === 0) {\n $frame = array_shift($this->trace);\n if (isset($frame['file'])) $this->file = $frame['file'];\n if (isset($frame['line'])) $this->line = $frame['line'];\n return;\n }\n array_shift($this->trace);\n }\n }", "title": "" }, { "docid": "89dd40b4fdc20a2bdd066d5a9aa20d5d", "score": "0.43017784", "text": "public function frameResponse(\\FrameResponseObject $frameResponseObject) {\n }", "title": "" }, { "docid": "0fcb99cf2cdbde1888fb60a89960cffc", "score": "0.42951235", "text": "private function set_resume(){\n if(isset($_SERVER['HTTP_RANGE']))\n {\n list($a, $range) = explode(\"=\",$_SERVER['HTTP_RANGE'],2);\n list($range) = explode(\",\",$range,2);\n list($range, $range_end) = explode(\"-\", $range);\n $range=intval($range);\n if(!$range_end) {\n $range_end=$this->download_hook['file_size']-1;\n } else {\n $range_end=intval($range_end);\n }\n /*\n ------------------------------------------------------------------------------------------------------\n //This application is developed by www.webinfopedia.com\n //visit www.webinfopedia.com for PHP,Mysql,html5 and Designing tutorials for FREE!!!\n ------------------------------------------------------------------------------------------------------\n */\n $new_length = $range_end-$range+1;\n header(\"HTTP/1.1 206 Partial Content\");\n header(\"Content-Length: $new_length\");\n header(\"Content-Range: bytes $range-$range_end/$size\");\n $this->download_hook['range'] = $range;\n } else {\n $new_length=$this->download_hook['file_size'];\n header(\"Content-Length: \".$this->download_hook['file_size']);\n }\n \n \n $this->download_hook['new_length'] = $new_length;\n }", "title": "" }, { "docid": "c36a63136bce2feb8a3c807182de8e13", "score": "0.42888218", "text": "public function load_inspection()\r\n\t{\r\n\t\t//$this->ApiConnect->check_valid_request($this->request);\r\n\t\r\n\t\t$data = array();\r\n\t\t$image_status = true;\r\n\t\t$load_id\t\t\t\t\t= trim($this->request->data['load_id']);\r\n\t\t\r\n\t\t/*\r\n\t\tif (isset($_FILES['notes_image']['error']) && ($_FILES['notes_image']['error'] == 0))\r\n\t\t{\r\n\t\t\t$response = $this->validate_picture($_FILES['notes_image']); // method define in AppController.php file\r\n\t\t\t$user_id = $this->request->data['user_id'];\r\n\t\t\tif ($response['status'] == 'success')\r\n\t\t\t{\r\n\t\t\t\tif (!is_dir(WWW_ROOT.NOTES_IMG_DIR. DS .$load_id))\r\n\t\t\t\t{\r\n\t\t\t\t\tmkdir(WWW_ROOT.NOTES_IMG_DIR. DS .$load_id, 0777);\r\n\t\t\t\t}\r\n\t\t\t\t$x = explode('.', $_FILES['notes_image']['name']);\r\n\t\t\t\t$image_ext = '.'.strtolower(end($x));\r\n\t\t\t\t$new_img_name = $load_id.$image_ext;\r\n\t\t\t\t$picture_name = WWW_ROOT.NOTES_IMG_DIR. DS . $load_id. DS . $new_img_name;\r\n\t\t\t\tif (copy($_FILES['notes_image']['tmp_name'], $picture_name))\r\n\t\t\t\t{\r\n\t\t\t\t\t$status = $this->create_all_thumbs('Load', $picture_name, WWW_ROOT . NOTES_IMG_DIR. DS . $load_id); //method define in AppController.php file\r\n\t\t\t\t\tif ($status)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$message = 'Success';\r\n\t\t\t\t\t\t$image_status = true;\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$message = PICTURE_UPLOADED_FAILED;\r\n\t\t\t\t\t\t$image_status = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$message = PICTURE_UPLOADED_FAILED;\r\n\t\t\t\t\t$image_status = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$message = $response['message'];\r\n\t\t\t\t$image_status = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$message = INVALID_PICTURE_FORMAT;\r\n\t\t\t$image_status = false;\r\n\t\t} */\r\n\t\t\r\n\t\t\r\n\t\tif ($image_status)\r\n\t\t{\r\n\t\t\t$this->loadModel('Vin');\r\n\t\t\t$this->loadModel('VinImage');\r\n\t\t\t$this->Vin->id \t\t\t\t\t= trim($this->request->data['vin_id']);\r\n\t\t\t$load['Vin']['facing'] \t\t\t= trim($this->request->data['facing']);\r\n\t\t\t$load['Vin']['notes']\t\t\t= trim($this->request->data['notes']);\r\n\t\t\t$load['Vin']['ats'] \t\t\t= trim($this->request->data['ats']);\r\n\t\t\t$load['Vin']['position_id'] \t= trim($this->request->data['position_id']);\r\n\t\t\t$load['Vin']['driver_comment'] = (!empty($this->request->data['driver_comment']) ? trim($this->request->data['driver_comment']) : '');\r\n\t\t\t$load['Vin']['dealer_commemt'] = (!empty($this->request->data['dealer_commemt']) ? trim($this->request->data['dealer_commemt']) : '');\r\n\t\t\t$load['Vin']['rejected_by']\t\t= (!empty($this->request->data['rejected_by']) ? trim($this->request->data['rejected_by']) : '');\r\n\t\t\t$load['Vin']['status'] \t\t\t= $this->request->data['status'];\t\t\r\n\t\t\t$user_type \t\t\t\t\t\t= $this->request->data['user_type'];\r\n\t\t\t\r\n\t\t\tif ($this->Vin->save($load))\r\n\t\t\t{\t\t\t\t\t\r\n\t\t\t\t$uploadPath\t=\tWWW_ROOT.VIN_IMAGES. DS .$load_id ;\r\n\t\t\t\t\r\n\t\t\t\tif (!is_dir(WWW_ROOT.VIN_IMAGES. DS .$load_id ))\r\n\t\t\t\t{\r\n\t\t\t\t\tmkdir(WWW_ROOT.VIN_IMAGES. DS .$load_id, 0777);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$returnforuploadmessage\t=\tarray();\r\n\t\t\t\tforeach($_FILES\tas\t$files\t=>\t$details)\r\n\t\t\t\t{\r\n\t\t\t\t\t$returnforuploadmessage[]\t =\t$this->upload_images($details , $files , $this->Vin->id , $uploadPath );\t\t\r\n\t\t\t\t}\r\n\t\t\t\t$data['image_status']\t=\t$returnforuploadmessage ;\r\n\t\t\t\t\r\n\t\t\t\t$total_vins = $this->Vin->find('count', array('conditions' => array('Vin.load_id' => $load_id)));\r\n\t\t\t\t$vin_status = $this->Vin->find('count', array('conditions' => array('Vin.status' => 3, 'Vin.load_id' => $load_id)));\r\n\t\t\t\t$data['status'] = ($total_vins - $vin_status) ? 1 : 0;\r\n\t\t\t\t$message = 'Vin delivered successfully.';\r\n\t\t\t\t/*if ($user_type == UserType::UserDriver)\r\n\t\t\t\t{\r\n\t\t\t\t\t$vin_status = $this->Vin->find('count', array('conditions' => array('Vin.status' => 1, 'Vin.load_id' => $load_id)));\t\t\t\t\r\n\t\t\t\t\t$data['status'] = ($total_vins - $vin_status) ? 1 : 0;\t\t\t\t\r\n\t\t\t\t\t$message = 'Vin inspected successfully.';\r\n\t\t\t\t}\r\n\t\t\t\telse if ($user_type == UserType::UserDealer)\r\n\t\t\t\t{\r\n\t\t\t\t\t$vin_status = $this->Vin->find('count', array('conditions' => array('Vin.status' => 3, 'Vin.load_id' => $load_id)));\r\n\t\t\t\t\t$data['status'] = ($total_vins - $vin_status) ? 1 : 0;\r\n\t\t\t\t\t$message = 'Vin delivered successfully.';\r\n\t\t\t\t}*/\t\t\t\r\n\t\t\t\t$status = 'Success';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$message = ($user_type == UserType::UserDriver) ? 'Vin inspection fail.' : 'Vin delivered fail';\r\n\t\t\t\t$status = 'Failure';\r\n\t\t\t}\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\t$status = 'Failure';\r\n\t\t}\r\n\t\t$this->set(array('status' => $status, 'message' => $message,'data' => $data, '_serialize' => array('status', 'message', 'data')));\r\n\t}", "title": "" }, { "docid": "e0e220890a07908957ff0c50f60829b5", "score": "0.4286297", "text": "public function init() {\n $this->stack = [];\n }", "title": "" }, { "docid": "ca5fb5047007b6bc31a1e1a6462a1650", "score": "0.42828804", "text": "public function getStackFrames()\n {\n return $this->stack_frames;\n }", "title": "" }, { "docid": "23c1186ac50d9a42e8b90d796d9a3018", "score": "0.42757016", "text": "public function fixParameter(){\n\t\t$this->sampleLength = $this->getSampleLength();\n\t\t$this->frameSize = $this->getFrameSize();\n\t\t$this->shift = $this->sampleLength * 8 - $this->bitsPerSample;\n\t}", "title": "" }, { "docid": "4c5832a156a84de4c52d28d41ebe86b4", "score": "0.42745733", "text": "private function doFrameStuff($parts)\n {\n //Get Audio Version\n $seconds = 0;\n $errors = array();\n switch (substr($parts[1], 3, 2)) {\n case '01':\n $errors[] = 'Reserved audio version';\n break;\n case '00':\n $audio = 2.5;\n break;\n case '10':\n $audio = 2;\n break;\n case '11':\n $audio = 1;\n break;\n }\n //Get Layer\n switch (substr($parts[1], 5, 2)) {\n case '01':\n $layer = 3;\n break;\n case '00':\n $errors[] = 'Reserved layer';\n break;\n case '10':\n $layer = 2;\n break;\n case '11':\n $layer = 1;\n break;\n }\n //Get Bitrate\n $bitFlag = substr($parts[2], 0, 4);\n $bitArray = array(\n '0000' => array(0, 0, 0, 0, 0),\n '0001' => array(32, 32, 32, 32, 8),\n '0010' => array(64, 48, 40, 48, 16),\n '0011' => array(96, 56, 48, 56, 24),\n '0100' => array(128, 64, 56, 64, 32),\n '0101' => array(160, 80, 64, 80, 40),\n '0110' => array(192, 96, 80, 96, 48),\n '0111' => array(224, 112, 96, 112, 56),\n '1000' => array(256, 128, 112, 128, 64),\n '1001' => array(288, 160, 128, 144, 80),\n '1010' => array(320, 192, 160, 160, 96),\n '1011' => array(352, 224, 192, 176, 112),\n '1100' => array(384, 256, 224, 192, 128),\n '1101' => array(416, 320, 256, 224, 144),\n '1110' => array(448, 384, 320, 256, 160),\n '1111' => array(- 1, - 1, - 1, - 1, - 1)\n );\n $bitPart = $bitArray[$bitFlag];\n $bitArrayNumber = null;\n if ($audio == 1) {\n switch ($layer) {\n case 1:\n $bitArrayNumber = 0;\n break;\n case 2:\n $bitArrayNumber = 1;\n break;\n case 3:\n $bitArrayNumber = 2;\n break;\n }\n } else {\n switch ($layer) {\n case 1:\n $bitArrayNumber = 3;\n break;\n case 2:\n $bitArrayNumber = 4;\n break;\n case 3:\n $bitArrayNumber = 4;\n break;\n }\n }\n $bitRate = $bitPart[$bitArrayNumber];\n if ($bitRate <= 0) {\n return false;\n }\n //Get Frequency\n $frequencies = array(\n 1 => array(\n '00' => 44100,\n '01' => 48000,\n '10' => 32000,\n '11' => 'reserved'\n ),\n 2 => array(\n '00' => 44100,\n '01' => 48000,\n '10' => 32000,\n '11' => 'reserved'\n ),\n 2.5 => array(\n '00' => 44100,\n '01' => 48000,\n '10' => 32000,\n '11' => 'reserved'\n )\n );\n $freq = $frequencies[$audio][substr($parts[2], 4, 2)];\n $frameLength = 0;\n //IsPadded?\n $padding = substr($parts[2], 6, 1);\n if ($layer == 3 || $layer == 2) {\n $frameLength = 144 * $bitRate * 1000 / $freq + $padding;\n }\n $frameLength = floor($frameLength);\n if ($frameLength == 0) {\n return false;\n }\n $seconds += $frameLength * 8 / ($bitRate * 1000);\n return array($frameLength, $seconds);\n }", "title": "" }, { "docid": "d9b2738e3fb8f4b26e5531d82685aa24", "score": "0.42602253", "text": "function frame($frame_id , $ball_id, $pins)\n\t{\n\n\t\t$this->frames[$frame_id][$ball_id] = $pins;\n\t\t/* Below condition handles the special frame (10), if spare or strike is thrown */\n\t\tif($this->frames[$frame_id][1] == 10 && $frame_id<11)\n\t\t{\n\t\t\techo \"\\nWow!! You hit a Strike\\n\";\n\t\t\t$this->strike_count++;\n\t\t\tif($this->strike_count >=2)\n\t\t\t{\n\t\t\t\techo \"Turkey is bowled\\n\";\n\t\t\t\techo \"<')__V\\n\";\n\t\t\t\techo \" (___)\\n\";\n\t\t\t\techo \" | |\\n\";\n\t\t\t\techo \" x x\\n\";\n\n\t\t\t\t$this->turkey[$frame_id]= 1;\n\n\n\t\t\t}\n\t\t}\n\n\t\tif($ball_id == 2 || $this->extra == true)\n\t\t\t$this->frame_score($frame_id);\n\t}", "title": "" }, { "docid": "ddc822cc682ad113dd09e9450906c4ed", "score": "0.42447868", "text": "function step4()\n {\n\n \t//calculate some spaces\n \tif ($this->cropData->landscape) {\n \t\t$this->cropData->spaces->left = $this->cropData->first_face->left;\n \t\t$this->cropData->spaces->right = $this->cropData->w_new - $this->cropData->spaces->left - $this->cropData->first_face->width;\n \t\t$this->cropData->deltas->left_right = $this->cropData->spaces->left - $this->cropData->spaces->right;\n \t\t$this->cropData->deltas->right_left = $this->cropData->spaces->right - $this->cropData->spaces->left;\n\n \t\t$this->cropData->spaces->left = $this->cropData->first_face->left;\n \t\t$this->cropData->spaces->right = $this->cropData->w_new - $this->cropData->spaces->left - $this->cropData->first_face->width;\n \t\t$this->cropData->deltas->left_right = $this->cropData->spaces->left - $this->cropData->spaces->right;\n \t\t$this->cropData->deltas->right_left = $this->cropData->spaces->right - $this->cropData->spaces->left;\n\n\n \t\t//full cropping needed\n \t\t$this->cropData->full_crop = $this->cropData->max_size - $this->cropData->h_new;\n\n \t\t//if cropping from the left\n \t\tif($this->cropData->deltas->left_right > $this->cropData->deltas->right_left){\n \t\t\t//if final crop will be needed\n \t\t\tif($this->cropData->full_crop > $this->cropData->deltas->left_right){\n \t\t\t\t//crop the initial width\n \t\t\t\t$this->cropData->initial_left = $this->cropData->deltas->left_right;\n \t\t\t} else {\n \t\t\t\t//crop the initial width\n \t\t\t\t$this->cropData->final_crop_needed = false;\n \t\t\t\t$this->cropData->initial_left = $this->cropData->full_crop;\n \t\t\t}\n \t\t}\n\n \t\t//if cropping from the right\n \t\telse {\n \t\t\t//if final crop will be needed; crop the initial width\n \t\t\tif($this->cropData->full_crop > $this->cropData->deltas->right_left){\n \t\t\t\t$this->cropData->initial_right = $this->cropData->deltas->right_left;\n \t\t\t} else {\n \t\t\t\t$this->cropData->final_crop_needed = false;\n \t\t\t\t$this->cropData->initial_right = $this->cropData->full_crop;\n \t\t\t}\n \t\t}\n\n \t\t//perform final crop\n \t\tif($this->cropData->final_crop_needed) {\n \t\t\t$this->cropData->final_landscape = ($this->cropData->full_crop - $this->cropData->initial_right - $this->cropData->initial_left) / 2;\n \t\t}\n\n\n \t\treturn 'landscape';\n \t} // end if landscape\n\n\n \tif ($this->cropData->isPortrait) {\n \t\t$this->cropData->spaces->top = $this->cropData->first_face->top;\n \t\t$this->cropData->spaces->bottom = $this->cropData->h_new - $this->cropData->spaces->top - $this->cropData->first_face->height;\n \t\t$this->cropData->deltas->top_bottom = $this->cropData->spaces->top - $this->cropData->spaces->bottom;\n \t\t$this->cropData->deltas->bottom_top = $this->cropData->spaces->bottom - $this->cropData->spaces->top;\n\n \t\t//full cropping needed\n \t\t$this->cropData->full_crop = $this->cropData->h_new - $this->cropData->max_size;\n\n\n \t\t//if cropping from the left\n \t\tif($this->cropData->deltas->top_bottom > $this->cropData->deltas->bottom_top){\n \t\t\t//if final crop will be needed\n \t\t\tif($this->cropData->full_crop > $this->cropData->deltas->top_bottom){\n \t\t\t\t//crop the initial width\n \t\t\t\t$this->cropData->initial_top = $this->cropData->deltas->top_bottom;\n\n \t\t\t} else {\n \t\t\t\t//crop the initial width\n \t\t\t\t$this->cropData->final_crop_needed = false;\n \t\t\t\t$this->cropData->initial_top = $this->cropData->full_crop;\n \t\t\t}\n \t\t}\n\n \t\t//if cropping from the right\n \t\telse {\n\n \t\t\t//if final crop will be needed\n \t\t\tif($this->cropData->full_crop > $this->cropData->deltas->bottom_top){\n\n \t\t\t\t//crop the initial width\n \t\t\t\t$this->cropData->initial_bottom = $this->cropData->deltas->bottom_top;\n\n \t\t\t}\n \t\t\telse{\n\n \t\t\t\t//crop the initial width\n \t\t\t\t$this->cropData->final_crop_needed = false;\n \t\t\t\t$this->cropData->initial_bottom = $this->cropData->full_crop;\n \t\t\t}\n \t\t}\n\n \t\t//perform final crop\n \t\tif($this->cropData->final_crop_needed){\n\n \t\t\t$this->cropData->final_portrait =\n \t\t\t ( $this->cropData->full_crop\n \t\t\t - $this->cropData->initial_bottom\n \t\t\t - $this->cropData->initial_top) / 2;\n \t\t}\n\n\n \t\treturn 'portrait';\n \t}\n\n \t//this should never be reached\n \tthrow new \\Exception('Error: Could not determine image layout.');\n }", "title": "" }, { "docid": "227fac1f861c382bc9a7e3f9dcb00013", "score": "0.42313585", "text": "public function assignVariables()\n\t{\n\t\tWCF::getTPL()->assign(array(\n\t\t\t'selfLink' => $this->appFrameSelfLink,\n\t\t\t'allowSpidersToIndexThisPage' => $this->appFrameAllowSpidersToIndexThisPage,\n\t\t\t'appFrameGenericSiteTitle' => $this->appFrameGenericSiteTitle,\n\t\t\t'appFrameBreadCrumbs' => $this->appFrameBreadCrumbs,\n\t\t\t'appFrameGenericSiteShowCaption' => $this->appFrameGenericSiteShowCaption,\n\t\t\t'appFrameGenericSiteCaption' => $this->appFrameGenericSiteCaption,\n\t\t\t'appFrameGenericSiteCaptionSub' => $this->appFrameGenericSiteCaptionSub,\n\t\t\t'appFrameGenericSiteCaptionIcon' => $this->appFrameGenericSiteCaptionIcon,\n\t\t\t\n\t\t));\t\n\t}", "title": "" }, { "docid": "8ed55f924e1c0055dddba022f216c483", "score": "0.4209256", "text": "function rcmail_response_frame($attrib)\n{\n global $OUTPUT;\n\n if (!$attrib['id']) {\n $attrib['id'] = 'rcmResponseFrame';\n }\n\n $OUTPUT->set_env('contentframe', $attrib['id']);\n\n return $OUTPUT->frame($attrib, true);\n}", "title": "" }, { "docid": "3465b7f9798bd495f36d10357b5cc0e8", "score": "0.4208526", "text": "function step3()\n {\n \t$this->cropData->first_face = $this->apiclient->detect(); //$response->faces[0]->face_rectangle;\n }", "title": "" }, { "docid": "ff8ae9dcde2b6f9e4e4b037a2847fd9e", "score": "0.41973934", "text": "public function recover(){\n $this->load->view('user/header'); \n $this->load->view('user/forgot');\n $this->load->view('user/footer');\n }", "title": "" }, { "docid": "79fb351edcb89641ce2d94d86a2926f7", "score": "0.4185278", "text": "public function admin_recover() {\n\t\t$this->_recover();\n\t}", "title": "" }, { "docid": "cc530f65dc2c4cd4da40f1e8125652a4", "score": "0.41735193", "text": "function frameInitialize()\n {\n date_default_timezone_set('Asia/Shanghai');\n }", "title": "" }, { "docid": "731f78592c4e455721d5a0af8886df47", "score": "0.41674417", "text": "abstract public function recoverWith(callable $hof);", "title": "" }, { "docid": "837655d9e24568bd9ca4448102e3e7d7", "score": "0.4163778", "text": "function printFrameset()\n {\n if (t3lib_div::_GP('show')=='both') {\n return '\n <html>\n <head>\n <title>Preview and compare workspace version with live version</title>\n </head>\n <frameset cols=\"*\" framespacing=\"3\" frameborder=\"3\" border=\"3\">\n <frameset rows=\"22,60%,20,40%\" framespacing=\"3\" frameborder=\"3\" border=\"3\">\n <frame name=\"frame_drafth\" src=\"'.htmlspecialchars($this->URL['draftHeader']).'\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"1\" scrolling=\"no\">\n <frame name=\"frame_draft\" src=\"'.htmlspecialchars($this->URL['draft']).'\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"1\" scrolling=\"auto\">\n <frame name=\"frame_liveh\" src=\"'.htmlspecialchars($this->URL['liveHeader']).'\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"1\" scrolling=\"no\">\n <frame name=\"frame_live\" src=\"'.htmlspecialchars($this->URL['live']).'\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"1\" scrolling=\"auto\">\n </frameset>\n </frameset>\n </html>';\n } else {\n return '\n <html>\n <head>\n <title>Preview workspace version</title>\n </head>\n <frameset cols=\"*\" framespacing=\"3\" frameborder=\"3\" border=\"3\">\n <frameset rows=\"22,*\" framespacing=\"3\" frameborder=\"3\" border=\"3\">\n <frame name=\"frame_drafth\" src=\"'.htmlspecialchars($this->URL['draftHeader']).'\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"1\" scrolling=\"no\">\n <frame name=\"frame_draft\" src=\"'.htmlspecialchars($this->URL['draft']).'\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"1\" scrolling=\"auto\">\n </frameset>\n </frameset>\n </html>';\n }\n }", "title": "" }, { "docid": "7fd3bb16ed2874362edd68aaa7a6ba16", "score": "0.41541058", "text": "public function setFrame($frame)\n {\n $this->frame = $frame;\n return $this;\n }", "title": "" }, { "docid": "5496839a62163f19c0c3dc86ddc867bf", "score": "0.415405", "text": "function reset() {\n\t\tif ($this->capturing)\t$this->capture();\n\t\t$this->result \t\t\t= $this->template;\n\t\t$this->content\t\t\t= array();\n\t\t$this->captureField\t\t= '';\n\t\t$this->loopTemplate\t\t= array();\n\t\t$this->loopStack\t\t= array();\n\t}", "title": "" }, { "docid": "9eaac86b3bd3307dff97ac881273abda", "score": "0.41463163", "text": "private function prepareDecode() :void{\n $this->finalMessage = preg_replace_callback(\n self::DECODE_PATTERN,\n function ($matches) {\n return str_repeat($matches[self::THIRD_ELEMENT], $matches[self::SECOND_ELEMENT]);\n },\n $this->originalString\n );\n }", "title": "" }, { "docid": "56ea4880cc0db7af1e3df0ee708f1cbf", "score": "0.41314262", "text": "public function frameimage($color, $width, $height, $inner_bevel, $outer_bevel){}", "title": "" }, { "docid": "1680799b5ac415af72ce7c2bd79dbdff", "score": "0.41304263", "text": "function decode80a0( $dest, $payload, $ln, $qos, $dummy)\n {\n // <sequence number: uint8_t> -> 2\n // <endpoint : uint8_t> -> 2\n // <cluster id: uint16_t> -> 4\n // <status: uint8_t> -> 2\n\n // <group ID: uint16_t> -> 4\n // <scene ID: uint8_t> -> 2\n // <transition time: uint16_t> -> 4\n\n // <scene name length: uint8_t> -> 2\n // <scene name max length: uint8_t> -> 2\n // <scene name data: data each element is uint8_t> -> 2\n\n // <extensions length: uint16_t> -> 4\n // <extensions max length: uint16_t> -> 4\n // <extensions data: data each element is uint8_t> -> 2\n // <Src Addr: uint16_t> (added only from 3.0f version)\n\n\n $this->deamonlog('debug', ';Type; 80A0 (Scene View)(decoded but not Processed)'\n . '; dest: '.$dest\n . '; SQN: ' .substr($payload, 0, 2)\n . '; endPoint: ' .substr($payload, 2, 2)\n . '; clusterId: ' .substr($payload, 4, 4)\n . '; status: ' .substr($payload, 8, 2)\n\n . '; group ID: ' .substr($payload,10, 4)\n . '; scene ID: ' .substr($payload,14, 2)\n . '; transition time: ' .substr($payload,16, 4)\n\n . '; scene name lenght: ' .substr($payload,20, 2) // Osram Plug repond 0 pour lenght et rien apres.\n . '; scene name max lenght: ' .substr($payload,22, 2)\n . '; scene name : ' .substr($payload,24, 2)\n\n . '; scene extensions lenght: ' .substr($payload,26, 4)\n . '; scene extensions max lenght: ' .substr($payload,30, 4)\n . '; scene extensions : ' .substr($payload,34, 2) );\n\n }", "title": "" }, { "docid": "bf9e962968a700b76c32e6bb574d1deb", "score": "0.41279235", "text": "function ReSet()\n\t{\t\n\t\t$this->images = array();\n\t}", "title": "" }, { "docid": "2dd9c3185c469af37a838bd36533004a", "score": "0.41186222", "text": "private function addFrame($frame)\r\n\t{\r\n\t\tob_start();\r\n\t\timagegif($frame);\r\n\t\t$this->frames[] = ob_get_contents();\r\n\t\tob_end_clean();\r\n\t}", "title": "" }, { "docid": "befa533f83e3975613a19a332249d143", "score": "0.4104045", "text": "protected function setUp() {\n $this->object = new Frame_Reflower;\n }", "title": "" }, { "docid": "4193682b3f2c38cd25e4f4b27d87b96c", "score": "0.4101596", "text": "function getNumFrames(){}", "title": "" }, { "docid": "e1ac305d057f1ac103ed93eb993299f3", "score": "0.409239", "text": "public function init_capture_handler() {\n\n\t\t$this->capture_handler = new Payment_Gateway\\Handlers\\Capture( $this );\n\t}", "title": "" }, { "docid": "2d0cd5e40146189dbd75f4f384368db6", "score": "0.40912104", "text": "function armar_banner_old($id_zona=0,$sec_id=0,$reg_id=0,$hzo_id=0){\n include_once(conf::getInc().\"/campanias.inc.php\");\n $oCampania = new campanias();\n $banner = $oCampania->listarBannersHome($id_zona,$sec_id,$reg_id,$hzo_id); \n if($campania[\"cam_id\"]){\n /*INCREMENTO LA LAS IMPRESIONES DE LA CAMPANIA*/\n $oCampania->updImpresiones($campania[\"cam_id\"]);\n /*ACTUALIZA LA TABLA DE ESTADISTICAS*/\n $oCampania->updEstadisticas($campania[\"cam_id\"],1,getIP());\n \n $html = \"\";\n $file = \"../data/img_cont/img_banners/\".$campania[\"cam_archivo\"];\n \t\t$img = explode(\".\",$campania[\"cam_archivo\"]);\n \t \t$target = ($campania[\"cam_target\"] == \"p\") ? \"_parent\" : \"_blank\";\n if(is_file($file)){ \n $datosFile = getimagesize($file);\n switch($img[1]){\n \t \t\tcase \"swf\":/*FLASH*/\n $html .= '<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"'.$datosFile[0].'px\" height=\"'.$datosFile[1].'px\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab\">\n \t<param name=\"movie\" value=\"../global/swf/cont_banner.swf\"/>\n \t<param name=\"scale\" value=\"noscale\"/>\n \t<param name=\"salign\" value=\"lt\"/>\n \t<param name=\"quality\" value=\"high\"/>\n <param name=\"bgcolor\" value=\"#ffffff\">\n <param name=\"FlashVars\" value=\"url='.$campania['cam_url_link'].'&camp='.$campania['cam_id'].'&ban='.$campania['cam_id'].'&targ='.$target.'\"/>\n \t<param name=\"allowScriptAccess\" value=\"sameDomain\"/>\n \t<param name=\"menu\" value=\"false\"/>\n <embed src=\"../global/swf/cont_banner.swf\" bgcolor=\"#ffffff\" quality=\"high\" scale=\"noscale\" salign=\"lt\" menu=\"false\" width=\"'.$datosFile[0].'px\" height=\"'.$datosFile[1].'px\" align=\"middle\" quality=\"high\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" FlashVars=\"url='.$campania['cam_url_link'].'&camp='.$campania['cam_id'].'&ban='.$campania['cam_id'].'&targ='.$target.'\"/>\n </object>';\n \n \n \t\t\t\tbreak;\n \t \t\tdefault:/*OTRO...*/\n \t\t \t\tif($campania['cam_url_link']) $add_href = \"<a href='../home/cont_click.php?url=\".$campania['cam_url_link'].\"&idcamp=\".$campania['cam_id'].\"' target='$target'>\";\n \n $html .= $add_href .' \n <img src=\"'.$file.'\" width=\"'.$datosFile[0].'\" height=\"'.$datosFile[1].'\" alt=\"\"></a>';\n \t\t \t\tbreak; \n \t \t} // switch \n }\n }\n\t \treturn $html;\n\t\t\n\t }", "title": "" }, { "docid": "7d23ba3695d69e5488718e49a5451a99", "score": "0.40850082", "text": "public function getFrames(): int\n {\n return $this->frames;\n }", "title": "" }, { "docid": "e6fcebea3a1995c0b5c12aefac2b422a", "score": "0.40813917", "text": "public function captureState();", "title": "" }, { "docid": "bcb13bfa484bd645a99c7a2a96fd8575", "score": "0.4053812", "text": "function dumpClientFrames()\r\n {\r\n $fakeframe=true;\r\n reset($this->controls->items);\r\n while (list($k,$v)=each($this->controls->items))\r\n {\r\n if (($v->inheritsFrom('Frame')) || ($v->inheritsFrom('Frameset')))\r\n {\r\n if ($v->Align==alClient)\r\n {\r\n $v->show();\r\n $fakeframe=false;\r\n }\r\n }\r\n }\r\n\r\n if ($fakeframe)\r\n {\r\n echo \"<frame />\";\r\n }\r\n }", "title": "" }, { "docid": "6cfb151dc1bb4639e49ba97173fcb2ee", "score": "0.40528312", "text": "public function selectFrame($identifier) {\n $variables = array(\"id\" => $identifier);\n $this->execute(\"POST\", \"/session/:sessionId/frame\", $variables);\n }", "title": "" }, { "docid": "27b14b527c35e98663f7adaea005b6dd", "score": "0.4047245", "text": "protected function setRequiredHeaders() {\n $requiredHeaders = array(\n 'X-XSS-Protection' => '1; mode=block',\n 'X-Frame-Options' => 'SAMEORIGIN'\n );\n foreach ($requiredHeaders as $key => $value) {\n if (!isset($this->headers[$key])) {\n $this->headers[$key] = $value;\n } \n }\n }", "title": "" }, { "docid": "7b2b35765699694ee620ac65535a9177", "score": "0.4043911", "text": "public function loadBlocks()\n {\n $this->_view_data['header']=$this->loadHeader('header');\n $this->_view_data['main_navigation']=$this->loadMainNavigation('main_navigation');\n $this->_view_data['first_level_navigation']=$this->loadFirstLevelNavigation('first_level_navigation');\n $this->_view_data['second_level_navigation']=$this->loadSecondLevelNavigation('second_level_navigation');\n $this->_view_data['aside']=$this->loadAside('aside');\n $this->_view_data['footer']=$this->loadFooter('footer');\n /* ...add missing blocks... */\n }", "title": "" }, { "docid": "994c167c6774917d1501fbbe7a685ce6", "score": "0.4042273", "text": "public function restore(){}", "title": "" }, { "docid": "d8d8aa7b2f39a3bf6be16190e49a49c0", "score": "0.40266904", "text": "public static function refresh()\n {\n $_POST = [];\n $_GET = [];\n $_FILES = [];\n }", "title": "" }, { "docid": "91540c60214ed13ba7ee3b3b11a3b55e", "score": "0.40052474", "text": "abstract public function recover(callable $rescueException);", "title": "" }, { "docid": "fa002dbd530684c0119068b1eeaa7522", "score": "0.40036815", "text": "function frame($root, $content) {\n\tglobal $pagecontent;\n\t$pagecontent = $content;\n\tinclude_once(dirname(__DIR__) . '/views/base/' . $root . '.php');\n}", "title": "" }, { "docid": "6b63db1185f04d72cccdf6ab8c819764", "score": "0.40032384", "text": "function frame_open($title='frame',$width='100%',$align='') {\n $file=\"frame_open.html.php\"; $include_once=false;\n include (\"themes/include/theme_file.inc.php\");\n return(0);\n }", "title": "" }, { "docid": "b9f93ceb8f3a338a72cd9f3a6903e02c", "score": "0.3994636", "text": "public static function get_stack_frame_by(string $class = '', string $method = '', array $bt = array(), int $frame_offset = 0): array\n {\n if (!$class && !$method) {\n throw new \\RuntimeException(sprintf('Neither $class nor $method was provided to %s.'), __METHOD__);\n }\n if (!is_string($class)) {\n throw new \\RuntimeException('The provided $class to %s must be string. Instead \"%s\" was provided.', __METHOD__, gettype($class));\n }\n if (!is_string($method)) {\n throw new \\RuntimeException('The provided $method to %s must be string. Instead \"%s\" was provided.', __METHOD__, gettype($method));\n }\n if (!$bt) {\n $bt = self::get_backtrace();\n }\n $ret = [];\n\n //foreach ($bt as $frame) {\n for ($aa = 0; $aa < count($bt); $aa++) {\n $frame = $bt[$aa];\n if ($class && $method) {\n if (isset($frame['class']) && strtolower($frame['class']) == strtolower($class) && isset($frame['function']) && strtolower($frame['function']) == strtolower($method)) {\n //this is wrong as it will return the frame found if the offset is invalid\n //instead an empty array should be returned even if the offset is invalid\n // if ($frame_offset && isset($bt[$aa+$frame_offset])) {\n // $ret = $bt[$aa+$frame_offset];\n // } else {\n // $ret = $frame;\n // }\n // break;\n if (isset($bt[$aa + $frame_offset])) {\n $ret = $bt[$aa + $frame_offset];\n break;\n }\n }\n } elseif ($class) {\n if (isset($frame['class']) && strtolower($frame['class']) == strtolower($class)) {\n if (isset($bt[$aa + $frame_offset])) {\n $ret = $bt[$aa + $frame_offset];\n break;\n }\n }\n } elseif ($method) {\n if (isset($frame['function']) && strtolower($frame['function']) == strtolower($method)) {\n if (isset($bt[$aa + $frame_offset])) {\n $ret = $bt[$aa + $frame_offset];\n break;\n }\n }\n } else {\n //nether class or method was provided\n }\n }\n\n return $ret;\n }", "title": "" }, { "docid": "2137fe13164b33f0a208b9362a38813a", "score": "0.39907178", "text": "function morphImages($number_frames){}", "title": "" }, { "docid": "c5d80fc3fee0c052ac0cd9b3d83b425a", "score": "0.39905033", "text": "public function direct8(){\n\t\t$reg = $this->session->userdata('reg');\n\n\t\tif($reg == 1){\n\t\t\t$this->step1();\n\t\t}else if($reg == 2){\n\t\t\t$this->step2();\n\t\t}else if($reg == 3){\n\t\t\t$this->step3();\n\t\t}else if($reg == 4){\n\t\t\t$this->step4();\n\t\t}else if($reg == 5){\n\t\t\t$this->step5();\n\t\t}else if($reg == 6){\n\t\t\t$this->step6();\n\t\t}else if($reg == 7){\n\t\t\t$this->step7();\n\t\t}else if($reg == 8){\n\t\t\t$no_pendaftaran = $this->session->userdata('no_pendaftaran');\n\t\t\t//$foto = $this->M_mhs->getFoto($no_pendaftaran);\n\n\t\t\t$config['upload_path'] = './assets/foto_dokumen/';\n\t\t\t$config['allowed_types'] = 'pdf|PDF';\n\t\t\t$config['max_size']\t= 1024;\n\n\t\t\t$this->load->library('upload', $config);\n\t\t\t$this->upload->initialize($config);\n\n\t\t\t$error = array();\n\t\t\t$gambar = array();\n\t\t\t/*foreach($_FILES as $field_name => $file){\n\t\t\t\tif(!$this->upload->do_upload($field_name)){\n\t\t\t\t\t$error[] = $this->upload->display_errors();\n\t\t\t\t}else{\n\t\t\t\t\t$gambar0 = $this->upload->data();\n\t\t\t\t\t$gambar[] = $gambar0['file_name'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$result = $this->M_mhs->edit_image($no_pendaftaran, $gambar);\n\t\t\t$this->step8();*/\n\n\t\t\tforeach($_FILES as $field_name => $file){\n\t\t\t\tif(!$this->upload->do_upload($field_name)) {\n\t\t\t\t\t$error[] = $this->upload->display_errors();\n\t\t\t\t\t$this->session->set_flashdata('direct8_error', \n\t\t\t\t\t\t'<div class=\"alert alert-warning\">\n\t\t\t\t\t\t\t<p>Upload Foto Gagal, Silahkan Cek Kembali Ukuran dan Format File Foto Anda</p>\n\t\t\t\t\t\t</div>');\n\t\t\t\t}else{\n\t\t\t\t\t$gambar0 = $this->upload->data();\n\t\t\t\t\t$gambar[] = $gambar0['file_name'];\n\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'reg' => '9'\n\t\t\t\t\t);\n\t\t\t\t\t$this->M_mhs->edit_data($no_pendaftaran, $data);\n\t\t\t\t\t$query_reg = $this->db->get_where('mastermhs_new', array(\n\t\t\t\t\t\t'no_pendaftaran' => $no_pendaftaran\n\t\t\t\t\t))->row();\n\n\t\t\t\t\t$sess_reg = array(\n\t\t\t\t\t\t'reg' => $query_reg->reg\n\t\t\t\t\t);\n\n\t\t\t\t\t$this->session->set_userdata($sess_reg);\n\t\t\t\t\t$this->session->set_flashdata('direct8_success', \n\t\t\t\t\t\t'<div class=\"alert alert-success\">\n\t\t\t\t\t\t\t<p>Foto Berhasil diUpload, Silahkan Lanjut Ke Tahap Selanjutnya</p>\n\t\t\t\t\t\t </div>');\n\n\t\t\t\t\t/*$this->upload->do_upload('foto_rumah_depan');\n\t\t\t\t\t$file1 = $this->upload->data('file_name');\n\t\t\t\t\tunlink('assets/foto_dokumen/'.$foto->upload_foto_rumah_depan);\n\n\t\t\t\t\t$this->upload->do_upload('foto_rumah_kiri');\n\t\t\t\t\t$file2 = $this->upload->data('file_name');\n\t\t\t\t\tunlink('assets/foto_dokumen/'.$foto->upload_foto_rumah_kiri);\n\n\t\t\t\t\t$data = ['upload_foto_rumah_depan' => $file1,\n\t\t\t\t\t\t\t 'upload_foto_rumah_kiri' => $file2\n\t\t\t\t\t];\n\t\t\t\t\t$this->M_mhs->edit_data($no_pendaftaran, $data);\n\t\t\t\t\t$this->step8();*/\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif($this->session->userdata('reg') == 8){\n\t\t\t\tredirect('C_mhs/step8');\n\t\t\t}else if($this->session->userdata('reg') == 9){\n\t\t\t\t$this->M_mhs->edit_image($no_pendaftaran, $gambar);\n\t\t\t\t$this->step9();\n\t\t\t}else{\n\t\t\t\tredirect('C_login');\n\t\t\t}\t\t\n\t\t}else if($reg == 9){\n\t\t\t$this->step9();\n\t\t}else if($reg == 10){\n\t\t\t$this->step10();\n\t\t}else{\n\t\t\t$this->session->sess_destroy();\n\t\t\tredirect('C_login');\n\t\t}\t\n\t}", "title": "" }, { "docid": "0d8290f1f5768aa1a760311aee6efdcf", "score": "0.39884096", "text": "public function extraHeaders()\n {\n // restricted to certain pages/frames only. \n }", "title": "" }, { "docid": "4d8bbc11c101365d84c9b935eb3f2a92", "score": "0.39861917", "text": "function init_capture() {\n\t\tif ( class_exists( 'WPCF7_Mail' ) ) {\n\t\t\t// for CF7 >= 3.9\n\t\t\tadd_action( 'wpcf7_before_send_mail', array( $this, 'storage_capture' ) );\n\t\t} else {\n\t\t\t// for CF7 < 3.9\n\t\t\tadd_action( 'wpcf7_mail_sent', array( $this, 'storage_capture_legacy' ) );\n\t\t}\n\n\t\t// Include the automatic updater\n\t\tinclude plugin_dir_path( __FILE__ ) . 'lib/envato-automatic-plugin-update/envato-plugin-update.php';\n\n\t\tPresetoPluginUpdateEnvato::instance()->add_item( array(\n\t\t\t\t'id' => 7806229,\n\t\t\t\t'basename' => plugin_basename( __FILE__ )\n\t\t\t) );\n\n\t}", "title": "" }, { "docid": "3e14ccd3474f01c65436865d5cb39bab", "score": "0.39791343", "text": "protected function _init_debug_vars() {\n\t\t$zipped = $this->session->flashdata('debug_vars');\n\n\t\tif(!empty($zipped)) {\n\t\t\t$encoded = gzuncompress($zipped);\n\t\t\t$serialized = base64_decode($encoded);\n\t\t\t$debug_vars = unserialize($serialized);\n\n\t\t\tforeach($debug_vars as $dv) {\n\t\t\t\t$this->debug_out('PRE REDIRECT - '. $dv['label'], $dv['var'], $dv['file'], $dv['function'],$dv['line'],$dv['time'], $dv['time_of_day']);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5a2690f1eb5c10309d6667eefdd06799", "score": "0.3972895", "text": "public function formUploaderFrameFinished() {\n $uploader = UploadFactory::getInstance()->uploaderFromRequest('form');\n die($uploader->getFrameFinishedXHtml()); \n }", "title": "" }, { "docid": "36fcfa6dafd9b2d29444041d56c2a6dd", "score": "0.39657614", "text": "private function refill()\r\n {\r\n $_SERVER[\"HTTP_REFERER\"] = $this->http_referer();\r\n $_SERVER[\"HTTP_USER_AGENT\"] = $this->http_useragent();\r\n }", "title": "" }, { "docid": "a512f7f03b6ccb4c0778c22bbb10d518", "score": "0.39650714", "text": "function decode8084( $dest, $payload, $ln, $qos, $dummy) {\n // J ai eu un crash car le soft cherchait cette fonction mais elle n'est pas documentée...\n }", "title": "" }, { "docid": "491bd09b9ff086c5e27bd793823f9b5e", "score": "0.3964092", "text": "public function frameimage($color, $width, $height, $inner_bevel, $outer_bevel)\n {\n }", "title": "" }, { "docid": "78161ee97f483d5e1d64a5c2b33ad771", "score": "0.39636385", "text": "function __construct() {\n $this->errorNumber = 0;\n $this->errorMessage = '';\n $this->info = [];\n $this->headerLines = [];\n $this->code = 0;\n $this->body = '';\n }", "title": "" }, { "docid": "73f461c2c4b7491ca0d85cc32f92bd41", "score": "0.39620376", "text": "function readFrameSpacing() { return $this->_framespacing; }", "title": "" }, { "docid": "3e8ad767bf348f5929b2b56f821108a8", "score": "0.39609778", "text": "function reset() {\r\n if ( count( $this->_headers ) > 0 ) $this->_headers = array();\r\n $this->_debug .= \"\\n--------------- RESETED ---------------\\n\";\r\n }", "title": "" }, { "docid": "474add6e745710f7dc1231086c067860", "score": "0.39606965", "text": "function bm_frame($content) {\n//TODO:move the variables outside the function so that the queries run once.\n\tglobal $perlink,$strTitle, $base, $rollover, $marksdata;\n\t\n\tif(get_option('metamarks_div_id')){\n\t\t$idframe=get_option('metamarks_div_id')+1;\n\t\tupdate_option('metamarks_div_id',$idframe);\n\t}\n\telse {\n\t\tadd_option('metamarks_div_id','10000');\n\t}\n\t$css=get_option('metamarks_css');\n\t$css=explode(\",\",$css);\n\t\t$metamarks_frame_bg=$css[0];\n\t\t$metamarks_frame_brd=$css[1];\n\t$state=get_option('metamarks_state');\n\t$state=explode(\",\",$state);\n\t$expanded=$state[0];\n\t$download = $state[1];\n $textonly = $state[2];\n $rollover=$state[3];\n\t\n\t$strTitle = urlencode(the_title('', '', false));\n\t$perlink = urlencode(get_permalink());\n\t$path=substr($_SERVER['SCRIPT_NAME'],0,strlen($_SERVER['SCRIPT_NAME'])-9);\n\t$base=\"http://\".$_SERVER['SERVER_NAME'].$path.\"/wp-content/plugins/metamarks/\";\n\t$showMarkFlag=get_option('metamarks');\n\t$showMarkFlag = explode(\",\", $showMarkFlag);\n\n\n\t//here we start building the output\n\t//State 0: Markers hidden,\n\t//State 1: Markers shown\n\t\n\t\t\n\tif($state[0]==0) {$marks.=\"<img onclick='mframe=document.getElementById(\\\"fr\".$idframe.\"\\\");if(mframe.style.display==\\\"none\\\"){mframe.style.display=\\\"block\\\";}\telse{\tmframe.style.display=\\\"none\\\"}' src='\".$base.\"images/metamarks.gif' alt='Metamarks' title='Metamarks! Greek Social Bookmarking.Click to show/hide' style='margin-bottom:10px;'/> \"; \n\t\t}\n\t$marks.=\"<div id='fr\".$idframe.\"' style='padding:2px;border:1px solid \".$metamarks_frame_brd.\";background-color:\".$metamarks_frame_bg.\";font-size: 9px\";\n\t//State 1: mark shown as a block\n\tif($state[0]==1){ $marks.=\";display:block;'>Μοιράσου το με: \";}\n\telse{\n\t$marks.= \";display:none;'>Μοιράσου το με: \";\n\t}\n for($i=0;$i<sizeof($marksdata);$i++)\n {\n \t$marks.= show_marker($showMarkFlag,$marksdata,$i, $state);\n }\n\tif($state[1]){$marks.=\"<p style='width:100%;float:left;'>&nbsp;<a style='text-decoration:none;font-size:8px;' href='http://metablogging.gr/metamarks/'>Κατέβασε το metamarks plugin</a></p><br/>\";}\n\n\t$marks.=\"</div>\";\n\t$content=$content.$marks;\n\treturn $content;\n}", "title": "" }, { "docid": "a423456fd8ec2ae2093aff8ea70b9c91", "score": "0.396013", "text": "private function setStacksInfo ($headers) {\n\t\tif (array_key_exists ('signature', $headers)) $this->stacksSignature = $headers['signature'];\n\t\tif (array_key_exists ('stackupdateinfo', $headers)) $this->stacksInfoJSON = $headers['stackupdateinfo'];\n\n\t\tif ($this->stacksInfoJSON) {\n\t\t\t$this->stacksInfo = json_decode($this->stacksInfoJSON);\n\t\t}\n\t}", "title": "" }, { "docid": "635e6cda6cd0aed80f9b2a62a0873375", "score": "0.3951882", "text": "public function resetBoard()\n {\n $this->fields = $this->initializeEmptyBoard();\n }", "title": "" }, { "docid": "3444437de1bfe959e829a94cc2648b57", "score": "0.3941767", "text": "function __construct() {\r\n\t\t# de nuestra pagina que la montara el controler\r\n\t\t# es versatil porque el tpl puede ser un xml y podriamos dar la salida en xml\r\n\t\tparent::__construct(\"ContentLeftFramesController.tpl\");\r\n\t}", "title": "" } ]
5afc77b257454ad5b7af7a5c43eeb659
this up() migration is autogenerated, please modify it to your needs
[ { "docid": "e0dc413f4aa9a297a805b64fbf3c47bd", "score": "0.0", "text": "public function up(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('CREATE TABLE comments (id INT AUTO_INCREMENT NOT NULL, post_id INT DEFAULT NULL, comment LONGTEXT NOT NULL, create_at DATETIME NOT NULL, INDEX IDX_5F9E962A4B89032C (post_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');\n $this->addSql('CREATE TABLE blogs (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, title VARCHAR(255) NOT NULL, INDEX IDX_F41BCA70A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');\n $this->addSql('CREATE TABLE posts (id INT AUTO_INCREMENT NOT NULL, blog_id INT DEFAULT NULL, title VARCHAR(255) NOT NULL, content LONGTEXT NOT NULL, create_at DATETIME NOT NULL, views INT NOT NULL, likes INT NOT NULL, INDEX IDX_885DBAFADAE07E97 (blog_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');\n $this->addSql('CREATE TABLE seo (id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) NOT NULL, desription VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');\n $this->addSql('CREATE TABLE media (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(32) NOT NULL, filename VARCHAR(255) NOT NULL, mime_tipe VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');\n $this->addSql('CREATE TABLE roles (id INT AUTO_INCREMENT NOT NULL, role VARCHAR(32) NOT NULL, name VARCHAR(32) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');\n $this->addSql('CREATE TABLE users (id INT AUTO_INCREMENT NOT NULL, roles_id INT DEFAULT NULL, username VARCHAR(32) NOT NULL, email VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, salt VARCHAR(32) NOT NULL, create_at DATETIME NOT NULL, update_at DATETIME DEFAULT NULL, last_logged_at DATETIME DEFAULT NULL, karma INT NOT NULL, INDEX IDX_1483A5E938C751C4 (roles_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');\n $this->addSql('ALTER TABLE comments ADD CONSTRAINT FK_5F9E962A4B89032C FOREIGN KEY (post_id) REFERENCES posts (id)');\n $this->addSql('ALTER TABLE blogs ADD CONSTRAINT FK_F41BCA70A76ED395 FOREIGN KEY (user_id) REFERENCES users (id)');\n $this->addSql('ALTER TABLE posts ADD CONSTRAINT FK_885DBAFADAE07E97 FOREIGN KEY (blog_id) REFERENCES blogs (id)');\n $this->addSql('ALTER TABLE users ADD CONSTRAINT FK_1483A5E938C751C4 FOREIGN KEY (roles_id) REFERENCES roles (id)');\n }", "title": "" } ]
[ { "docid": "7bb169a05d6ff9b20f86ebad58efea15", "score": "0.7838648", "text": "public function up() {}", "title": "" }, { "docid": "b31842e503e2613fddee62b243393922", "score": "0.76669604", "text": "public function up(){ \n\t\t/*Create a Users table in the up function*/\n\t\t$fields = (array(\n\t\t\t'parent_id'=>array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => 11,\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t'default' => 0,\n\t\t\t\t),\n\t\t\t));\n\t\t$this->dbforge->add_column('pages', $fields);\n\t}", "title": "" }, { "docid": "627326097197ff042404b56d31587847", "score": "0.759487", "text": "public function up();", "title": "" }, { "docid": "ecddff55119732f74177c2e9ce01ed9a", "score": "0.75892407", "text": "public function up()\n {\n// $this->addColumn(\\api\\models\\ProtocolTemplate::tableName(), 'company_code', 'varchar(16) NOT NULL DEFAULT \\'\\' COMMENT \\'厂房code\\' AFTER `contract_code`');\n }", "title": "" }, { "docid": "ee4cdf04362f4da77778254c35ded348", "score": "0.7587873", "text": "public function up()\n\t{ // eliminamos el campo active.\n /* Schema::table('users',function(Blueprint $table){\n $table->dropColumn('active');\n });*/\n\t\t//\n\t}", "title": "" }, { "docid": "0185a22c9b8ee847bc940762d2b5d614", "score": "0.7537505", "text": "public function safeUp()\n {\n $this->createTable('transition_input', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'transitions' => self::MYSQL_TYPE_UINT,\n ));\n }", "title": "" }, { "docid": "c9d99e33da0e386777c2eebb89708223", "score": "0.75255466", "text": "public function safeUp()\n {\n $this->createTable('ngresttest_table_images', [\n 'model_id' => 'int(11) NOT NULL',\n 'image_id' => 'int(11) NOT NULL',\n 'sort_index' => 'int(11) NOT NULL',\n ]);\n }", "title": "" }, { "docid": "3c3385368d056baf21ddbc93a87cd00b", "score": "0.7494583", "text": "public function up()\n\t{\n\t\tif($this->db->field_exists('heard_about', 'orders'))\n\t\t{\n\t\t\t$this->dbforge->drop_column('orders', 'heard_about');\n\t\t}\n\n\n\t\t//update the notes field to be NULL by default\n\t\t$fields\t= array('notes'=>array( 'type'\t\t\t=> 'text'\n\t\t\t\t,'null'\t\t\t=> TRUE\n\t\t)\n\t\t);\n\t\t$this->dbforge->modify_column('orders', $fields);\n\n\t\t//update session ip_address to support ipv6 length\n\t\t$fields\t= array('ip_address'=>array( 'type'\t\t\t=> 'VARCHAR'\n\t\t\t\t,'constraint'\t=> '45'\n\t\t)\n\t\t);\n\t\t$this->dbforge->modify_column('sessions', $fields);\n\n\t}", "title": "" }, { "docid": "64c07ac51d59f4754fd56179321b6309", "score": "0.7446615", "text": "public function up()\n {\n //\n }", "title": "" }, { "docid": "6779c2251748fceb57bfce22aea93014", "score": "0.7443179", "text": "abstract public function up(): void;", "title": "" }, { "docid": "0bf78dda082d5d749f42e583eec883e6", "score": "0.74307704", "text": "public function up()\n {\n }", "title": "" }, { "docid": "0bf78dda082d5d749f42e583eec883e6", "score": "0.74307704", "text": "public function up()\n {\n }", "title": "" }, { "docid": "0bf78dda082d5d749f42e583eec883e6", "score": "0.74307704", "text": "public function up()\n {\n }", "title": "" }, { "docid": "1586a9715fbc4f48de581482fb3bb4af", "score": "0.7420297", "text": "public function safeUp()\n {\n $this->createTable(\"reset_history\", array(\n 'id' =>'pk',\n 'visitor_id' =>'BIGINT(20) NOT NULL',\n 'reset_time' =>'DATETIME NOT NULL',\n 'reason' =>'VARCHAR(250) NOT NULL',\n ));\n $this->addColumn('visit','reset_id','int(11)');\n $this->addColumn('visit','negate_reason','varchar(250)');\n $this->dropColumn('visitor','visit_count');\n $this->insert('visit_status',[\n 'name' => 'Negate'\n ]);\n }", "title": "" }, { "docid": "4f8a622a86c371adb49907cb106d0b23", "score": "0.74169904", "text": "public function safeUp() {\n\t$this->createTable('Translations', array(\n 'row_id' =>\"int(11) NOT NULL\",\n 'lang_id' =>\"int(11) NOT NULL\",\n 'table_key' =>\"enum('Partner','StaticPage','Help','') NOT NULL\",\n 'description' =>\"text NOT NULL\",\n 'name' =>\"varchar(250) NOT NULL\",\n \"PRIMARY KEY (`row_id`,`lang_id`,`table_key`)\",\n \"KEY `row_id` (`row_id`)\",\n \"KEY `lang_id` (`lang_id`)\",\n \"KEY `table_key` (`table_key`)\",\n\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "title": "" }, { "docid": "04923b0716c18a093c355f4706510bb5", "score": "0.7408047", "text": "public function up()\n {\n $this->renameTable('tbl_iran_city','tbl_city');\n// $this->createTable($this->table,[\n// 'id' => $this->primaryKey(),\n// 'group_id' => $this->integer(),\n// 'city_id' => $this->integer(),\n// 'status' => $this->boolean()->notNull()\n// ],'ENGINE InnoDB');\n//\n// $this->addForeignKey(\n// 'fk_to_category',\n// $this->table,\n// 'group_id',\n// 'tbl_category',\n// 'id',\n// 'NO ACTION',\n// 'NO ACTION'\n// );\n//\n// $this->addForeignKey(\n// 'fk_to_cities',\n// $this->table,\n// 'group_id',\n// 'tbl_iran_city',\n// 'id',\n// 'NO ACTION',\n// 'NO ACTION'\n// );\n }", "title": "" }, { "docid": "524fbb8407d1542121a64ebf8ebd615b", "score": "0.7402363", "text": "public function up()\n {\n $this->createTable('apples', [\n 'id' => $this->primaryKey(),\n 'color' => $this->char(6)->notNull(), //для хранения цвета => формат (FF345A)\n 'createdAt' => $this->timestamp()->notNull()->defaultExpression('CURRENT_TIMESTAMP'),\n 'fallAt' => $this->timestamp()->Null(), //дата падения на землю, одновременно статус (null => висит)\n 'eaten' => $this->tinyInteger()->unsigned(), //считаем что откусывают целые проценты\n ]);\n $this->alterColumn('apples', 'id', $this->integer()->unsigned()->notNull().' AUTO_INCREMENT');\n }", "title": "" }, { "docid": "7461eef7fb43d9f46e70178edb12790a", "score": "0.739586", "text": "public function up()\n {\n // Table for manually added phonebook entries\n DBManager::get()->execute(\"CREATE TABLE IF NOT EXISTS `phonebook`\n (\n `entry_id` INT NOT NULL AUTO_INCREMENT,\n `name` VARCHAR(255) NOT NULL COLLATE utf8mb4_unicode_ci,\n `range_id` VARCHAR(32) NULL COLLATE latin1_bin DEFAULT NULL,\n `phone` VARCHAR(255) NOT NULL COLLATE utf8mb4_unicode_ci,\n `creator` VARCHAR(32) NOT NULL COLLATE latin1_bin,\n `mkdate` DATETIME NOT NULL,\n `chdate` DATETIME NOT NULL,\n PRIMARY KEY (`entry_id`),\n INDEX range_id (`range_id`),\n CONSTRAINT FOREIGN KEY (`creator`) REFERENCES `auth_user_md5`(`user_id`)\n ) ENGINE InnoDB ROW_FORMAT=DYNAMIC\");\n }", "title": "" }, { "docid": "fd9354a03d333ea67dfd8c95b82596ad", "score": "0.73950404", "text": "public function up()\n {\n $this->db->disableForeignKeyChecks();\n\n $this->forge->addField([\n\t {attributes}\n\t ]);\n {keys}\n $this->forge->createTable('{table}');\n\n //enable Foreign Key Check\n $this->db->enableForeignKeyChecks();\n\t}", "title": "" }, { "docid": "8912abe1faa2623c3b3846514ad1ce9c", "score": "0.7384391", "text": "public function up() {\n $this->db->query(\"\n ALTER TABLE WasteInvoices\n ADD COLUMN `invoiceNumber` varchar(78) NULL DEFAULT NULL AFTER `invoiceDate`;\n \");\n \n }", "title": "" }, { "docid": "48f9c36768c30b1c502a94ec24ebf6ca", "score": "0.7381426", "text": "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY',\n 'product_type_id' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL COMMENT \"Вид изделия\"',\n 'label' => Schema::TYPE_STRING. ' NOT NULL COMMENT \"Заголовок\"',\n 'height' => Schema::TYPE_STRING. ' NOT NULL COMMENT \"Рост\"',\n 'alias' => Schema::TYPE_STRING. ' DEFAULT NULL COMMENT \"Алиас\"',\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey(\n 'fk_size_to_product_type',\n $this->tableName,\n 'product_type_id',\n '{{%store_product_type}}',\n 'id',\n 'CASCADE'\n );\n }", "title": "" }, { "docid": "366cf61a12a2d07cfc7f4de238a7676c", "score": "0.7370453", "text": "public function preUp()\n {\n }", "title": "" }, { "docid": "cc2ebdf39013fedd5c9930df7b4acbe2", "score": "0.7364476", "text": "public function up()\n\t{\n\t\t$fields = array(\n\n\t\t\t'guardado' => array('type' => 'TINYINT','constraint' => '1','DEFAULT' => '0')\n\t\t);\n\t\t$this->dbforge->add_column('cierre', $fields);\n\t\n\t}", "title": "" }, { "docid": "0a9ab46892a4fdfaad6e83e899701a53", "score": "0.7359576", "text": "public function up(){\n // Because there is a column of type ENUM in the account_types table, we can't modify any columns using ORM\n DB::statement(\"ALTER TABLE `account_types` ADD `create_stamp` TIMESTAMP NULL DEFAULT NULL AFTER `disabled`\");\n DB::statement(\"ALTER TABLE `account_types` CHANGE `last_updated` `modified_stamp` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP\");\n DB::statement(\"ALTER TABLE `account_types` ADD `disabled_stamp` TIMESTAMP NULL DEFAULT NULL AFTER `modified_stamp`\");\n }", "title": "" }, { "docid": "b073fd151076710e1eec8c3ef335c624", "score": "0.7358564", "text": "public function up() {\n $this->_up_object_id();\n }", "title": "" }, { "docid": "ee2dcd10a26d8599578cbd9a973d6a28", "score": "0.7345823", "text": "public function up()\n {\n $this->addColumn('thuchi_de_xuat_chi', 'receiver', $this->string(255));\n $this->addColumn('thuchi_de_xuat_chi', 'receiver_phone', $this->string(15));\n $this->addColumn('thuchi_de_xuat_chi', 'method_payment', $this->string(255));\n $this->addColumn('thuchi_de_xuat_chi', 'owner_credit_name', $this->string(255));\n $this->addColumn('thuchi_de_xuat_chi', 'credit_number', $this->string(20));\n $this->addColumn('thuchi_de_xuat_chi', 'banking_name', $this->string(255));\n }", "title": "" }, { "docid": "9c6ed03e147e7578fe9c0732a77d4df6", "score": "0.73456764", "text": "public function up()\n {\n $fields = array(\n 'ongkir_toko' => array(\n 'type' => \"INT\",\n 'constraint' => 10,\n 'default' => 5000,\n 'null' => FALSE,\n 'after' => \"alamat_toko\"\n ),\n 'ongkirtambahan_toko'=> array(\n 'type' => \"INT\",\n 'constraint' => 10,\n 'default' => 1000,\n 'null' => FALSE,\n 'after' => \"ongkir_toko\"\n ),\n );\n $this->dbforge->add_column(\"toko\", $fields);\n }", "title": "" }, { "docid": "6cc8a881a77db915260073c9661dea57", "score": "0.73445463", "text": "public function up()\n {\n $this->createTable('rubrics',[\n 'id'=>$this->PrimaryKey(),\n 'name'=>$this->string(32)\n ]);\n $this->alterColumn('rubrics','id',$this->smallInteger(8).'NOT NULL AUTO_INCREMENT');\n }", "title": "" }, { "docid": "e33a053ac6dc7ab843358695b0f95555", "score": "0.7336143", "text": "public function up()\n {\n $table = $this->table('convents_religious_orders');\n $table->addColumn('convent_id', 'integer', [\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ]);\n $table->addColumn('religious_order_id', 'integer', [\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ]);\n $table->create();\n\t\n\t$table->addForeignKey('convent_id','convents', array('id'),array('constraint'=>'convent_order_fk'));\n\t$table->addForeignKey('religious_order_id','religious_orders', array('id'),array('constraint'=>'religious_order_convent_fk'));\n\t$table->save();\n }", "title": "" }, { "docid": "3278512c0a4a5c07034cb72347b5efa7", "score": "0.73290944", "text": "public function safeUp()\n {\n //Please note that this matches the original creation of the\n //table from version 1 of the extension. Other migrations will\n //upgrade it from here if we ever need to. This was done so\n //that older versions can still use migrate functionality to upgrade.\n $this->createTable(\n $this->table,\n [\n //'id' => $this->integer(),\n 'old_value' => $this->text(),\n 'new_value' => $this->text(),\n 'action' => $this->string()->notNull(),\n 'model' => $this->string()->notNull(),\n 'field' => $this->string()->defaultValue('NA'),\n 'stamp' => $this->string(20)->notNull(),\n 'user_id' => $this->integer(11),\n 'model_id' => $this->string()->notNull(),\n ]\n );\n\n $this->addForeignKey('fk_trail_id', $this->table, 'user_id', 'DT_USERS', 'USER_ID');\n\n //Index these bad boys for speedy lookups\n $this->createIndex('idx_audit_trail_user_id', $this->table, 'user_id');\n $this->createIndex('idx_audit_trail_model_id', $this->table, 'model_id');\n $this->createIndex('idx_audit_trail_model', $this->table, 'model');\n $this->createIndex('idx_audit_trail_field', $this->table, 'field');\n $this->createIndex('idx_audit_trail_action', $this->table, 'action');\n }", "title": "" }, { "docid": "31c882b5eafe2fd1449d0d2d76b1f427", "score": "0.7319052", "text": "public function up() {\n $this->addColumn('patient_enquiry_general_first', 'patient_id', 'integer');\n $this->addColumn('patient_enquiry_general_second', 'patient_id', 'integer');\n $this->addColumn('patient_enquiry_hospital_details', 'patient_id', 'integer');\n $this->addColumn('patient_enquiry_hospital_first', 'patient_id', 'integer');\n $this->addColumn('patient_enquiry_hospital_second', 'patient_id', 'integer');\n }", "title": "" }, { "docid": "d3cc6f57c53e1b9e49b2b76fcbbbd691", "score": "0.73042905", "text": "public function safeUp()\n {\n $this->createTable('sales', [\n 'id' => Schema::TYPE_PK,\n 'title' => Schema::TYPE_STRING . '(100) NOT NULL',\n 'discount' => Schema::TYPE_DECIMAL . '(12,4) DEFAULT 0.0',\n 'quantity' => Schema::TYPE_INTEGER . ' DEFAULT 0',\n ]);\n\n $this->createTable('products_sales', [\n 'product_id' => Schema::TYPE_INTEGER . ' NOT NULL',\n 'sale_id' => Schema::TYPE_INTEGER . ' NOT NULL',\n ]);\n\n $this->addForeignKey('fk_ps_product_id', 'products_sales', 'product_id', 'products', 'id');\n $this->addForeignKey('fk_ps_sale_id', 'products_sales', 'sale_id', 'sales', 'id');\n\n }", "title": "" }, { "docid": "f8588263431483fdb546cfbabe0355e9", "score": "0.72922313", "text": "public function up() {\n $migrationQuery = \"ALTER TABLE `tbl_property` ADD `cleaning` INT NOT NULL AFTER `bond_amount`\";\n mysql_query($migrationQuery);\n \n $migrationQuery = \"ALTER TABLE `tbl_property` ADD `cleaner_first_name` VARCHAR( 255 ) NOT NULL AFTER `cleaning_fee` ,\n ADD `cleaner_last_name` VARCHAR( 255 ) NOT NULL AFTER `cleaner_first_name` ,\n ADD `cleaner_email` VARCHAR( 255 ) NOT NULL AFTER `cleaner_last_name` ,\n ADD `cleaner_phone` VARCHAR( 255 ) NOT NULL AFTER `cleaner_email` ,\n ADD `cleaner_home_phone` VARCHAR( 255 ) NOT NULL AFTER `cleaner_phone` ,\n ADD `arrange_cleaning` INT NOT NULL AFTER `cleaner_home_phone` ,\n ADD `bed_lines` INT NOT NULL AFTER `arrange_cleaning`\";\n mysql_query($migrationQuery);\n \n }", "title": "" }, { "docid": "ecd30f7fde8812d5b5edb912cf2a95a2", "score": "0.7289544", "text": "public function up()\n {\n $this->execute('ALTER TABLE `item_img` ADD `img_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST');\n\t}", "title": "" }, { "docid": "3f9f9337e039b083f6e9f5cff3bb0250", "score": "0.72818595", "text": "public function safeUp()\n\t{\n\t\t$this->createTable('evento', array(\n\t\t\t\t\t\t\t\t\t\t'id'\t=>\t'serial NOT NULL primary key',\n\t\t\t\t\t\t\t\t\t\t'descricao'\t=>\t'varchar',\n\t\t\t\t\t\t\t\t\t\t'tag'\t=> 'varchar',\n\t\t));\n\t}", "title": "" }, { "docid": "50af8b4f0bc24be3268228b43bf1db85", "score": "0.72764736", "text": "public function up(): void\n {\n }", "title": "" }, { "docid": "83f6f962ea108b4fb508d3cb699ef991", "score": "0.72661084", "text": "public function up()\n {\n $episode_ratings = $this->table('episode_ratings');\n\n $episode_ratings->addColumn('users_id','integer')\n ->addForeignKey('users_id', 'users')\n ->addColumn('episodes_id','integer', ['null' =>true])\n ->addForeignKey('episodes_id', 'episodes')\n ->addColumn('action','string')\n ->addColumn('created_by','integer', ['null' => true])\n ->addColumn('updated_by','integer', ['null' => true])\n ->addColumn('modified','datetime', ['null' => true])\n ->addColumn('created','datetime', ['null' => true])\n ->create();\n }", "title": "" }, { "docid": "e8f77932a8c5ca798cb65b87f8ad8c57", "score": "0.7264565", "text": "public function up()\n\t{\n\t\t// create the purchase_item_details table\n\t\tSchema::create('purchased_item_details', function($table) {\n\t\t\t$table->engine = 'InnoDB';\t\t \n\t\t\t$table->increments('id');\t\t \n\t\t $table->integer('purchased_Item_id')->unsigned();//->foreign()->references('id')->on('purchase_items');\n\t\t $table->integer('product_id')->unsigned();//->foreign()->references('id')->on('products');\n\t\t $table->integer('quantity');\n\t\t $table->date('Expiry_date');\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\n\t\t $table->integer('updated_by')->unsigned();\t \n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "title": "" }, { "docid": "588767bbe7b500ebdeff25d4d1796b62", "score": "0.723948", "text": "public function up()\n\t{\n\t\t$this->execute(\"\n ALTER TABLE `vfue_fuel` \n DROP COLUMN `vfue_ccnt_id`, \n DROP COLUMN `vfue_company`, \n DROP COLUMN `vfue_comapny_reg_number`, \n DROP COLUMN `vfue_series`, \n DROP COLUMN `vfue_fvat_id`, \n DROP COLUMN `vfue_vat`, \n DROP COLUMN `vfue_total`, \n DROP COLUMN `vfue_vase_vat`, \n DROP COLUMN `vfue_base_total`, \n CHANGE `vfue_amt` `vfue_amt` DECIMAL(10,2) UNSIGNED NULL AFTER `vfue_qnt`, \n DROP INDEX `vfue_ccnt_id`,\n DROP FOREIGN KEY `vfue_fuel_ibfk_2`;\n\n\n \");\n\t}", "title": "" }, { "docid": "b615a0354961940e82c1d16f9a508686", "score": "0.723881", "text": "public function safeUp()\n\t{\n\t $this->createTable('user_jobs_paypal_transactions', array(\n\t 'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t 'user_job_payment_id' => 'INT UNSIGNED',\n\t 'transaction_id' => 'VARCHAR(19) NOT NULL',\n 'amount_paid' => 'DECIMAL(8,2)',\n\t 'fee' => 'DECIMAL(6,2)',\n\t 'status' => \"ENUM('COMPLETED', 'FAILED', 'RETURNED', 'REVERSED', 'UNCLAIMED')\",\n\t 'paid_at' => 'TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP',\n\t ), 'DEFAULT CHARSET=\"utf8\" collate utf8_unicode_ci');\n\t}", "title": "" }, { "docid": "4e533ae11d4690231441e5dd8e80afb0", "score": "0.7228438", "text": "public function up()\n\t{\n // \"value\" is displayed to the end-user\n // \"info\" is text for the application field popover\n DB::query(\"\n insert into fakes (id, type_id, template_id, page_id, label, value, info, position, required, button, property, created_at, updated_at)\n values (18, 22, 1, 3, 'My Type', 'This is the default value for mytype-paragraph.', 'The type depends on what is inside its partial view.', 4, 1, null, null, '2013-06-10 12:00:00', '2013-06-10 12:00:00');\n \");\n\n DB::query(\"SELECT setval('fakes_id_seq', 18);\");\n\t}", "title": "" }, { "docid": "1e27e358a4fe93bf09a1dd5674c0e34f", "score": "0.7213626", "text": "public function up(){\n // instead the parameter checksum will be used\n $this->dbforge->drop_column('snapshots', 'snapshot');\n\n }", "title": "" }, { "docid": "8b25247db64e2a2b040e929c0e27a186", "score": "0.72109294", "text": "public function up()\n {\n $this->addColumn('ott_main_class', 'use_flag', \"char(1) not null default '1'\");\n }", "title": "" }, { "docid": "5dd6c8734d7c54d97a37852369e72495", "score": "0.7203551", "text": "public function safeUp()\r\n\t{\r\n $this->createTable('shops', array(\r\n 'id' => 'pk',\r\n 'name' => 'string NOT NULL',\r\n 'slug' => 'string',\r\n 'address' => 'text',\r\n 'phone' => 'string',\r\n ));\r\n\t}", "title": "" }, { "docid": "ebaa846bb2cba5f8e53c07df52c960db", "score": "0.7196355", "text": "public function up()\n\t{\n Schema::table('stocks', function(Blueprint $table)\n {\n $table->renameColumn('history_updated', 'history_downloaded');\n });\n\t}", "title": "" }, { "docid": "8bcfcce35b9dd2f614ee1d49b2c5d3c8", "score": "0.7195662", "text": "public function safeUp()\n {\n \t$this->createTable('Complaint', [\n 'id' => $this->primaryKey(),\n 'complainant_id' => $this->integer()->notNull(),\n 'registration_time' => $this->dateTime(),\n \t\t'status_id' => $this->integer(),\n 'description' => $this->text(),\n ]);\n \t$this->createIndex('index_complaint_complainant_id', 'Complaint', 'complainant_id');\n \t$this->createIndex('index_complaint_status_id', 'Complaint', 'status_id');\n \t\n \t$this->addForeignKey('fk-complaint-complainant_id', 'Complaint', 'complainant_id', 'Complainant', 'id', 'RESTRICT', 'CASCADE');\n \t$this->addForeignKey('fk-complaint-status_id', 'Complaint', 'status_id', 'ComplaintStatus', 'id', 'RESTRICT', 'CASCADE');\n }", "title": "" }, { "docid": "37aacc5e5f954b7282cf53187b12e6fc", "score": "0.7187846", "text": "public function safeUp()\n {\n \n // Create the craft_import_entries table\n craft()->db->createCommand()->createTable('import_entries', array(\n 'historyId' => array('column' => 'integer', 'required' => false),\n 'entryId' => array('column' => 'integer', 'required' => false),\n 'versionId' => array('column' => 'integer', 'required' => false),\n ), null, true);\n \n // Add foreign keys to craft_import_entries\n craft()->db->createCommand()->addForeignKey('import_entries', 'historyId', 'import_history', 'id', 'SET NULL', null);\n craft()->db->createCommand()->addForeignKey('import_entries', 'entryId', 'entries', 'id', 'CASCADE', null);\n craft()->db->createCommand()->addForeignKey('import_entries', 'versionId', 'entryversions', 'id', 'CASCADE', null);\n \n return true;\n \n }", "title": "" }, { "docid": "a882c1e819e9ad758627a2243c1700cc", "score": "0.71845573", "text": "public function safeUp() {\n\t$this->createTable('FavoritesRent', array(\n 'rent_id' =>\"int(11) NOT NULL\",\n 'user_id' =>\"int(11) NOT NULL\",\n \"PRIMARY KEY (`rent_id`,`user_id`)\",\n \"KEY `user_id` (`user_id`)\",\n \"KEY `rent_id` (`rent_id`)\",\n\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "title": "" }, { "docid": "dfcdd992601b0fb09ba6d8d7dd470fd2", "score": "0.7169186", "text": "public function up(){\n $this->dbforge->add_field(\n array(\n 'id' => array(\n 'type' => 'INT',\n 'constraint' => 5,\n 'auto_increment' => TRUE\n ), \n 'username' => array(\n 'type' => 'VARCHAR',\n 'constraint' => 30\n ), \n 'password' => array(\n 'type' => 'VARCHAR',\n 'constraint' => 32\n ), \n 'admin' => array(\n 'type' => 'CHAR',\n 'constraint' => 1,\n 'default' => 'f'\n )\n )\n );\n $this->dbforge->add_key('id', TRUE);\n $this->dbforge->create_table('users', TRUE);\n }", "title": "" }, { "docid": "2d437ccd29f53b565d338baa1b4038f9", "score": "0.7164105", "text": "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "title": "" }, { "docid": "1f0f64b7f449c4ca22ed7197fdd4bd74", "score": "0.71535236", "text": "public function safeUp()\n {\n\t\ttry{\n\t\t\t\n\t\t\t$this->createTable('uploads_collection', [\n\t\t\t\t'id' => 'pk',\n\t\t\t\t'entity_id' => 'INT(11) NOT NULL',\n\t\t\t]);\n\t\t\t\n\t\t\t$this->createTable('uploads', [\n\t\t\t\t'id' => 'pk',\n\t\t\t\t'filepath' => 'VARCHAR(255) NOT NULL',\n\t\t\t\t'collection_id' => 'INT(11) NOT NULL',\n\t\t\t]);\n\t\t\t\n\t\t\t$this->addForeignKey('uploads_collection_uploads_FK', 'uploads', 'collection_id', 'uploads_collection', 'id', 'CASCADE', 'RESTRICT');\n\t\t\t\n\t\t\t\n\t\t}catch(\\Exception $e){\n\t\t\treturn false;\n\t\t}\n }", "title": "" }, { "docid": "17068c8c773a5956e303ac680b2d0cc2", "score": "0.71495986", "text": "public function up()\n {\n $this->createTable('workers', [\n 'id' => Schema::TYPE_PK,\n 'position_id' => Schema::TYPE_INTEGER,\n 'name' => Schema::TYPE_STRING . ' NOT NULL',\n 'soname' => Schema::TYPE_STRING . ' NOT NULL',\n 'characteristic' => Schema::TYPE_TEXT,\n 'salary'=>$this->decimal(10,2)\n ]);\n $this->addForeignKey('fk_position_id','workers','position_id','positions','id','restrict','No action');\n\n }", "title": "" }, { "docid": "387b10cd879c2fbd9dacab9ee7c004dc", "score": "0.71473217", "text": "public function up(){\n // Because there is a column of type ENUM in the account_types, we can't modify any columns using ORM\n DB::statement(\"ALTER TABLE account_types CHANGE account_group account_id INT(10) UNSIGNED NULL\");\n }", "title": "" }, { "docid": "6dfc203a8d7f2b952e8b743ae59f528f", "score": "0.7146913", "text": "public function up()\n\t{\n\t\tSchema::table('user_permissions', function($table) {\n $table->dropColumn('solder_create');\n });\n\n Schema::table('user_permissions', function($table) {\n $table->dropColumn('solder_mods');\n });\n\n Schema::table('user_permissions', function($table) {\n $table->dropColumn('solder_modpacks');\n });\n\n Schema::table('user_permissions', function($table) { \n $table->boolean('solder_keys')->default(0);\n $table->boolean('solder_clients')->default(0);\n $table->boolean('modpacks_create')->default(0);\n $table->boolean('modpacks_manage')->default(0);\n $table->boolean('modpacks_delete')->default(0);\n });\n\t}", "title": "" }, { "docid": "04dc115ef39d209bb99e0f5ed29f975c", "score": "0.714192", "text": "public function up()\n\t{\n\t\t$fields = array(\n\n\t\t\t'privilegios' => array('type' => 'TINYINT','constraint' => '1','DEFAULT' => '0')\n\t\t);\n\t\t$this->dbforge->add_column('empleados', $fields);\n\t\n\t}", "title": "" }, { "docid": "3bd639be3e463ef525ea217bbcedc093", "score": "0.71363246", "text": "public function up()\n {\n /*$faker = \\Faker\\Factory::create();\n $populator = new Faker\\ORM\\CakePHP\\Populator($faker);\n\n $populator->addEntity('Personas', 1, [\n \"cedula\" => \"26026083\", \n \"nombre\" => \"cessare julius\",\n \"apellido\" => \"yanez\",\n \"telefono\" => \"04144532962\",\n \"status\" => 0,\n \"created\" => function () use ($faker){\n return $faker->dateTimeBetween($startDate = \"now\", $endDate = \"now\");\n },\n \"modified\" => function () use ($faker){\n return $faker->dateTimeBetween($startDate = \"now\", $endDate = \"now\");\n }\n ]);\n $populator->execute();*/\n }", "title": "" }, { "docid": "9fb7fab69ae59e6a611e9fb20a7aeace", "score": "0.7128442", "text": "public function up()\n {\n $this->getSchema()->create('user_providers', function($table) {\n $table->increments('id');\n $table->string('user_id');\n $table->string('provider_name', 255);\n $table->string('provider_id', 255);\n $table->timestamps();\n });\n parent::up();\n }", "title": "" }, { "docid": "fd7177bb43a96c424cc16107a335cb0f", "score": "0.7125246", "text": "public function up()\n {\n DbDongle::disableStrictMode();\n\n Schema::table('system_plugin_history', function (Blueprint $table) {\n $table->text('detail')->nullable()->change();\n });\n }", "title": "" }, { "docid": "9c913dd929a7c9407000dd2dcac3e784", "score": "0.712206", "text": "public function safeUp()\n\t{\n\t $this->createTable('welcome_pages', array(\n 'id' => 'pk',\n\t 'module_name' => 'VARCHAR(40)',\n 'language_id' => 'INT NOT NULL',\n 'header' => 'VARCHAR(80)',\n 'text' => 'TEXT',\n\t ),\n\t 'DEFAULT CHARSET=\"utf8\" collate utf8_unicode_ci');\t \n\t}", "title": "" }, { "docid": "47bf2937475bffe61f9d9a95bd757920", "score": "0.71168584", "text": "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "title": "" }, { "docid": "47bf2937475bffe61f9d9a95bd757920", "score": "0.71168584", "text": "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "title": "" }, { "docid": "47bf2937475bffe61f9d9a95bd757920", "score": "0.71168584", "text": "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "title": "" }, { "docid": "a08e03e6008314bb6a4f248b99e0577a", "score": "0.7109818", "text": "public static function databaseUp() {\n\n if (!Capsule::schema()->hasTable(Migrate::prefixedTableName(self::TABLENAME))) {\n Capsule::schema()->create(Migrate::prefixedTableName(self::TABLENAME), function($table) {\n $table->increments('id');\n $table->string('title', 80);\n $table->string('year', 8);\n $table->dateTime('nomination_open');\n $table->dateTime('nomination_close');\n $table->dateTime('voting_open');\n $table->dateTime('voting_close');\n $table->dateTime('winner_announcement_date')->nullable();\n $table->integer('created_by')->nullable();\n $table->integer('last_updated_by')->nullable();\n $table->boolean('live')->default(false);\n $table->boolean('archived')->default(false);\n $table->softDeletes();\n $table->timestamps();\n });\n }\n }", "title": "" }, { "docid": "feebc8c9d1115b693dde4616e64038ae", "score": "0.7105859", "text": "public function getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `user_level`\n ADD `ul_role` VARCHAR(20) AFTER `ul_id`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "title": "" }, { "docid": "3d900b5aa0f5f0d82dfbdd577fdb8c76", "score": "0.7103416", "text": "public function up()\n {\n $this->addProp();\n $this->addContent();\n }", "title": "" }, { "docid": "729686648b4fb19a58079443e2e6f816", "score": "0.7102916", "text": "public function up()\n {\n Schema::table('provinces', function (Blueprint $table) {\n // Get rid of enum field, they're fkcn painful with Laravel\n $table->string('type', 16)->default(ProvinceTypeProxy::defaultValue())->change();\n });\n\n Schema::table('provinces', function (Blueprint $table) {\n $table->integer('parent_id')->unsigned()->nullable();\n\n $table->index('code', 'provinces_code_index');\n $table->unique(['country_id', 'code'], 'provinces_country_id_code_index');\n $table->foreign('parent_id')\n ->references('id')\n ->on('provinces')\n ->onDelete('cascade');\n });\n }", "title": "" }, { "docid": "b22b34a2c7e3e2725354e6153f65e708", "score": "0.7101138", "text": "public function up()\n\t{\n $this->renameTable('{{rights}}','{{user_rights}}');\n\t}", "title": "" }, { "docid": "6a085167be6a3f08a05bf1aa06694240", "score": "0.7095245", "text": "public function up()\n\t{\n\t\t//\n Schema::create('packs', function($table){\n $table->increments('id');\n $table->integer('amount');\n $table->string('uom');\n $table->timestamps();\n });\n\t}", "title": "" }, { "docid": "0a1fd7818578ef4f038bc06e63c6fb67", "score": "0.70857126", "text": "public function safeUp()\n {\n $this->createTable('news', array(\n 'title' => 'string NOT NULL',\n 'teaser' => 'string NOT NULL',\n 'content' => 'text NOT NULL',\n ));\n }", "title": "" }, { "docid": "4c251ec41685cb9dbbe6dfdd53c4ce11", "score": "0.7083349", "text": "public function up()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{shortcut}}\")){\n\t\t\t$this->dropTable(\"{{shortcut}}\");\n\t\t}\n\n\t\t$this->createTable(\"{{shortcut}}\", array(\n\t\t\t\"id\" => \"int UNSIGNED AUTO_INCREMENT\",\n\t\t\t\"id_object\" => \"int UNSIGNED\",\n\t\t\t\"shortcode\" => \"int(5) UNSIGNED\",\n\t\t\t\"pos\"\t\t => \"int UNSIGNED\",\n\t\t\t\"PRIMARY KEY (id)\",\n\t\t\t\"KEY id_object (id_object)\",\n\t\t\t\"KEY shortcode (shortcode)\"\n\t\t\t));\n\t}", "title": "" }, { "docid": "a4984941777730449529d516dc806667", "score": "0.70780045", "text": "public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}", "title": "" }, { "docid": "a4984941777730449529d516dc806667", "score": "0.70780045", "text": "public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}", "title": "" }, { "docid": "a4984941777730449529d516dc806667", "score": "0.70780045", "text": "public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}", "title": "" }, { "docid": "1f0493774eaaba02ea6f93f0bd6d22b5", "score": "0.7073815", "text": "public function migration(){}", "title": "" }, { "docid": "8cdade2aa401fd6394b75af0a0862811", "score": "0.70702875", "text": "public function up()\n {\n parent::up();\n $table = $this->table('auth_group',['engine'=>'innodb']);\n $table->addColumn('pid', 'integer',['limit' => 11,'default'=>'0','comment'=>'父级id'])\n ->addColumn('name', 'string',['limit' => 32,'default'=> '','comment'=>'名称'])\n ->addColumn('rules', 'text',['default'=> null,'comment'=>'规则id'])\n ->addColumn('status', 'enum', ['values' => ['normal','locked'],'default'=>'normal' , 'comment' => '状态', 'null' => false])\n ->addColumn('create_time', 'integer',['limit' => 11,'null' => true,'default'=> null,'comment'=>'创建时间'])\n ->addColumn('update_time', 'integer',['limit' => 11,'null' => true,'default'=> null,'comment'=>'更新时间'])\n ->addColumn('delete_time', 'integer',['limit' => 11,'null' => false, 'default'=> 0,'comment'=>'软删除时间'])\n ->addIndex(['status'])\n ->create();\n $model = model('admin/AuthGroup');\n $data = [];\n $data['pid'] = '0';\n $data['name'] = '超级管理员';\n $data['rules'] = \"*\";\n $data['status'] = \"normal\";\n $user['delete_time'] = '0';\n $model->save($data);\n }", "title": "" }, { "docid": "781650e135b3413baa1ad3e758a0aeb6", "score": "0.70698357", "text": "public function safeUp()\n\t{\n $this->alterColumn('email', 'subject', 'string');\n $this->addColumn('email', 'subid_id', 'int');\n\t}", "title": "" }, { "docid": "bfdd692bcee95faa7f369809f35ca506", "score": "0.7064891", "text": "public function up()\n {\n $this->dbforge->add_column('job', array(\n 'job_text' => array(\n 'type' => 'TEXT',\n 'null' => true,\n 'after' => 'job_detail_title',\n ),\n ));\n }", "title": "" }, { "docid": "faa129589459be6eb6de022bd4948dfd", "score": "0.7062699", "text": "public function up()\n {\n $this->table('private_messages', ['id' => false, \"primary_key\" => [\"private_messages_id\"]])\n ->addColumn('private_messages_id', 'integer', [\n 'autoIncrement' => true,\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ])\n ->addColumn('message_bords_id', 'integer', [\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ])\n ->addColumn('users_id', 'integer', [\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ])->create();\n\n $this->table('private_messages')\n ->addForeignKey(\n 'message_bords_id',\n 'message_bords',\n 'message_bords_id',\n [\n 'update' => 'CASCADE',\n 'delete' => 'CASCADE'\n ]\n )\n ->addForeignKey(\n 'users_id',\n 'users',\n 'users_id',\n [\n 'update' => 'CASCADE',\n 'delete' => 'CASCADE'\n ]\n )->update();\n }", "title": "" }, { "docid": "dae40baa1ae5f5a4c06bc60d042c1571", "score": "0.70592207", "text": "public function up()\n {\n\n $tableOptions = null;\n if( $this->db->driverName === 'mysql' ) {\n $tableOptions = 'ENGINE=InnoDB DEFAULT CHARSET=utf8';\n }\n\n $this->createTable( '{{%auth_item_child}}', [\n 'parent' => $this->string( 64 )->notNull(),\n 'child' => $this->string( 64 )->notNull(),\n ], $tableOptions );\n\n $this->addPrimaryKey( 'PK_auth_item_child', '{{%auth_item_child}}', [ 'parent', 'child' ] );\n }", "title": "" }, { "docid": "282ae6dc4b29ce57e1c2c2d09227c99e", "score": "0.70532584", "text": "public function up()\n {\n Schema::table('attendees', function (Blueprint $table) {\n $table->string('private_reference_number', 15)->change();\n });\n }", "title": "" }, { "docid": "bd68c04b827fc1c55338e1ffdfcd910f", "score": "0.7050901", "text": "public function up()\n {\n Schema::table('posts', function($table){\n $table->renameColumn('author_id', 'user_id');\n });\n }", "title": "" }, { "docid": "b6f0b9b7009969edb6b8f712178614be", "score": "0.7049675", "text": "public function up()\n {\n $this->addColumn(\"{{release}}\", \"artifact_url_base\", Schema::TYPE_STRING . \" null\");\n $this->addColumn(\"{{release}}\", \"artifact_files\", Schema::TYPE_STRING . \" null\");\n }", "title": "" }, { "docid": "6760a90be584e4dec901a742324e288d", "score": "0.70415103", "text": "public function up(){\n $questionsTable = $this->table('question');\n $questionsTable->addColumn('type', 'integer', [\n 'length' => 3,\n ])\n ->update();\n\n $optionTable = $this->table('question_option');\n $optionTable->addColumn('description', 'string', [\n 'length' => 255,\n 'default' => null,\n 'null' => false\n ])\n ->addColumn('value', 'integer', [\n 'length' => 50,\n 'default' => null,\n 'null' => false\n ])\n ->addColumn('orderNumber', 'integer', [\n 'length' => 2,\n 'default' => 0,\n 'null' => false\n ])\n ->addColumn('question_id', 'integer',\n ['length' => 2,\n 'default' => null,\n 'null' => false])\n ->addIndex('question_id')\n ->addForeignKey('question_id', 'question', 'id')\n ->create();\n }", "title": "" }, { "docid": "e5e6c7d2c8d2bf564311be64fd5a35d4", "score": "0.7039936", "text": "public function up()\n {\n // create state table\n if (!Schema::hasTable('state')) {\n Schema::create(\n 'state',\n function (Blueprint $table) {\n $table->increments('id');\n $table->integer('country_id', false, true); // auto increment false, unsigned true\n $table->string('name', 45);\n $table->string('created_by', 45);\n $table->string('updated_by', 45);\n $table->timestamps();\n\n $table->foreign('country_id')->references('id')->on('country');\n }\n );\n } else {\n echo \"Table state already exists\";\n }\n\n }", "title": "" }, { "docid": "5dd7331c5734bf626580404e9cccf842", "score": "0.7032695", "text": "public function up()\n {\n $this->execute(\"drop view IF EXISTS `lpd_page_v`;\n drop table IF EXISTS `lpd_log`;\n drop table IF EXISTS `lpd_file`;\n drop table IF EXISTS `lpd_page`;\n drop table IF EXISTS `pg_category`;\n drop table IF EXISTS `lpd_user`;\n \n\");\n\n $this->execute(\"\ndrop table IF EXISTS `lpd_user`;\nCREATE TABLE `lpd_user` (\n `id` int NOT NULL AUTO_INCREMENT,\n `username` varchar(100) NOT NULL,\n `password` varchar(100) NOT NULL,\n `authKey` varchar(100),\n `accessToken` varchar(30),\n `is_locked` char(1) NOT NULL default 'F',\n PRIMARY KEY (`id`),\n unique uk_lpd_user (`username`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\ncreate index i_lpd_user_at on lpd_user (accessToken);\n\ndrop table IF EXISTS `pg_category`;\ncreate Table `pg_category` (\n `id` int not null AUTO_INCREMENT,\n `code` varchar(30) not null,\n `descr` varchar(255),\n `begin_date` date,\n `end_date` date,\n PRIMARY KEY (`id`)\n ,Unique key (`code`) \n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\ndrop table IF EXISTS `lpd_page`;\ncreate Table `lpd_page` (\n `id` int NOT NULL AUTO_INCREMENT,\n `name` varchar(255) NOT NULL,\n `date_create` datetime NOT NULL default CURRENT_TIMESTAMP,\n `category_id` int not null,\n `url_from` varchar(255),\n `user_id` int,\n PRIMARY KEY (`id`),\n unique uk_lpd_page (`name`)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n \n \");\n\n\n $this->execute(\"drop table IF EXISTS `lpd_file`;\ncreate Table `lpd_file` (\n `id` int NOT NULL AUTO_INCREMENT,\n `page_id` int NOT NULL, \n `file_name` varchar(255) NOT NULL,\n `file_path` varchar(255),\n PRIMARY KEY (`id`),\n CONSTRAINT fk_lpd_file_p \n FOREIGN KEY (page_id) REFERENCES lpd_page (id) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\ncreate index i_lpd_file on lpd_file (page_id);\n\ndrop table IF EXISTS `lpd_log`;\ncreate Table `lpd_log` (\n `id` int NOT NULL AUTO_INCREMENT,\n `user_id` int, \n `date_create` datetime NOT NULL default CURRENT_TIMESTAMP,\n `action` varchar(20),\n `ip` varchar(16),\n `user_agent` varchar(255),\n `extra_info` varchar(200),\n PRIMARY KEY (`id`)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\ncreate index i_lpd_log_u on lpd_log (username);\n\n\");\n\n\n $this->execute(\"create or replace view lpd_page_v as\n select p.id\n ,p.name\n ,p.date_create\n ,p.url_from\n ,c.code category\n ,c.descr category_descr\n ,u.username\n from lpd_page p\n join pg_category c\n on (p.category_id = c.id)\n left join lpd_user u\n on (p.user_id = u.id);\n \");\n\n $this->batchInsert('pg_category',['code','descr','begin_date','end_date']\n ,[['Smartlink','Smartlink ...','2020-01-01', '3000-01-01'],\n ['LeadGen','LeadGen ...','2020-01-01', '3000-01-01'],\n ['Test','for any tests','2020-01-01', '3000-01-01'],\n ['Test_OLD','closes test category','2020-01-01', '2020-02-01']\n ]);\n\n\n }", "title": "" }, { "docid": "06bf5d727dbb5d8c5651a8e7c101a868", "score": "0.7026594", "text": "public function up()\n\t{\n\t\t$this->execute(\"\n ALTER TABLE `ppxs_person_x_setting` \n ADD CONSTRAINT `constrain_ppxs_pprs` FOREIGN KEY (`ppxs_pprs_id`) REFERENCES `pprs_person`(`pprs_id`),\n ADD CONSTRAINT `constrain_ppxs_psty` FOREIGN KEY (`ppxs_psty_id`) REFERENCES `psty_setting_type`(`psty_id`);\n\n \");\n\t}", "title": "" }, { "docid": "ed9b9aa6da8d3413370f56734e28efc8", "score": "0.70250344", "text": "public function up()\n {\n $this->db->truncate('article_type');\n $data = array(\n array(\n 'id' =>'',\n 'name' =>'転職ノウハウ',\n 'sort_order' => '1',\n 'deleted_at' => null\n ),\n array(\n 'id' =>'',\n 'name' => 'お仕事内容',\n 'sort_order' => '2',\n 'deleted_at' => null\n ),\n array(\n 'id' =>'',\n 'name' => 'ニュース',\n 'sort_order' => '3',\n 'deleted_at' => null\n ),\n );\n $this->db->insert_batch('article_type', $data);\n\n $this->dbforge->add_column('prefecture', array(\n 'deleted_at' => array(\n 'type' => 'DATETIME',\n 'null' => true,\n 'after' => 'sort_order',\n ),\n ));\n }", "title": "" }, { "docid": "ac921e0e57cbc8f18d42c60027d68c1a", "score": "0.7022961", "text": "public function safeUp()\n {\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable(static::TABLE_SOCIAL_LINK, [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer()->notNull(),\n 'avatar' => $this->string(255),\n 'source' => $this->string(255)->notNull(),\n 'source_id' => $this->string(255)->notNull(),\n ], $tableOptions);\n\n $this->addForeignKey ('fk-social_link-user', static::TABLE_SOCIAL_LINK, 'user_id', static::TABLE_USER, 'id', 'CASCADE');\n\n }", "title": "" }, { "docid": "422a8a8773b2bbe82a6af8e332286c6c", "score": "0.70222884", "text": "public static function databaseUp() {\n\n if (!Capsule::schema()->hasTable(Migrate::prefixedTableName(self::TABLENAME))) {\n Capsule::schema()->create(Migrate::prefixedTableName(self::TABLENAME), function($table) {\n $table->integer('award_id')->unsigned();\n $table->integer('category_id')->unsigned();\n $table->timestamps();\n\n $table->foreign('award_id')\n ->references('id')\n ->on('v_awards');\n\n $table->foreign('category_id')\n ->references('id')\n ->on('v_categories');\n });\n }\n }", "title": "" }, { "docid": "455065494bd533852e42dfa5e56b4627", "score": "0.7021754", "text": "public function up() {\n\t\t$this->down();\n\n\t\t$this->db->query(\"CREATE TABLE `user_interests` (\n\t\t\t\t\t\t\t\t\t `id` int(11) NOT NULL,\n\t\t\t\t\t\t\t\t\t `userid` int(11) NOT NULL,\n\t\t\t\t\t\t\t\t\t `category_id` int(11) NOT NULL\n\t\t\t\t\t\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=latin1;\");\n\n\t\t$this->db->query(\"ALTER TABLE `user_interests` ADD PRIMARY KEY (`id`);\");\n\t\t$this->db->query(\"ALTER TABLE `user_interests` MODIFY `id` int(5) NOT NULL AUTO_INCREMENT\");\n\n\t}", "title": "" }, { "docid": "6e2d95f6b0d967c7d825f404da1e834c", "score": "0.7016055", "text": "public function up()\n {\n // Drop table 'table_name' if it exists\n $this->dbforge->drop_table('pxmenu', true);\n\n // Table structure for table 'table_name'\n $this->dbforge->add_field(array(\n 'id' => array(\n 'type' => 'MEDIUMINT',\n 'constraint' => '8',\n 'unsigned' => true,\n 'auto_increment' => true\n ),\n 'title' => array(\n 'type' => 'varchar',\n 'constraint' => '255',\n 'null' => true,\n ),\n 'url' => array(\n 'type' => 'varchar', \n 'constraint' => '255',\n 'null' => true,\n ),\n 'icon' => array(\n 'type' => 'varchar', \n 'constraint' => '255',\n 'null' => true,\n ),\n 'ismain_menu' => array(\n 'type' => 'integer', \n 'constraint' => '11',\n 'null' => true,\n ), \n 'isaktif'=> array(\n 'type' => 'smallint', \n 'constraint' => '1',\n 'default' => '1',\n 'null' => true,\n ), \n 'position' => array(\n 'type' => 'integer', \n 'constraint' => '11',\n 'null' => true,\n ),\n 'registerdate' => array(\n 'type' => 'timestamp', \n 'null' => true,\n )\n ));\n $this->dbforge->add_key('id', true);\n $this->dbforge->create_table('pxmenu');\n }", "title": "" }, { "docid": "0ac407739e929b0aa213d2dfa2c3704d", "score": "0.7014887", "text": "public function up()\n {\n if($this->hasTable('Customers')){\n $this->execute(\"\n CREATE TABLE IF NOT EXISTS `Orders` ( \n `OrderID` INT(20) NOT NULL AUTO_INCREMENT , \n `CustomerID` INT(20) NOT NULL , \n `OrderNumber` VARCHAR(50) NOT NULL , \n `PaymentID` INT(20) NOT NULL , \n `OrderDate` DATE NOT NULL , \n `ShipDate` DATE NOT NULL , \n `RequiredDate` DATE NOT NULL , \n `ShipperID` INT(50) NOT NULL , \n `Freight` VARCHAR(50) NOT NULL , \n `SalesTax` VARCHAR(50) NOT NULL , \n `TimeStamp` TIMESTAMP NOT NULL , \n `TransactStatus` INT(10) NOT NULL , \n `ErrLoc` VARCHAR(50) NOT NULL , \n `ErrMsg` VARCHAR(50) NOT NULL , \n `Fulfilled` INT(10) NOT NULL , \n `Deleted` INT(10) NOT NULL , \n `Paid` INT(10) NOT NULL , \n `PaymentDate` DATETIME NOT NULL , \n `Created` DATETIME NOT NULL , \n `Updated` DATETIME NOT NULL , \n PRIMARY KEY (`OrderID`),\n KEY `OrderID` (`OrderID`), \n\n INDEX (CustomerID),\n\n FOREIGN KEY (CustomerID)\n REFERENCES Customers(CustomerID)\n ON UPDATE CASCADE ON DELETE CASCADE\n\n )ENGINE = InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;\n \");\n }\n }", "title": "" }, { "docid": "feca13d1981da319f8fb2c854269991b", "score": "0.69980246", "text": "public function up(){\n DB::unprepared(\n \"CREATE TRIGGER trigger_institute_creation_timestamp\n BEFORE INSERT ON institutions\n FOR EACH ROW\n SET NEW.create_stamp = NOW()\"\n );\n }", "title": "" }, { "docid": "96eb65d5cbe6f2b5f9d7de0237218856", "score": "0.698933", "text": "public function up()\n {\n\n $this->table('easy_menus_settings')\n ->addColumn('brand_display_type', 'integer', ['limit' => 1, 'signed'=>false, 'default'=>1])\n ->addColumn('brand_display_name', 'char', ['limit' => 255, 'default'=>'Brand Name'])\n ->addColumn('brand_display_image', 'char', ['limit' => 255, 'default'=>''])\n ->addColumn('navbar_class', 'char', ['limit' => 255, 'default'=>'navbar-default'])\n ->addColumn('navbar_is_fixed', 'boolean', ['default'=>true])\n ->save();\n\n $this->execute(\"INSERT INTO easy_menus_settings (id, brand_display_type, brand_display_name, navbar_class, navbar_is_fixed, brand_display_image) VALUES(1, 1,'Brand','navbar-default',true,'');\");\n\n }", "title": "" }, { "docid": "ce2cacd77eb15f14572781781e24da83", "score": "0.69863945", "text": "public function up()\n {\n Schema::table('thing', function (Blueprint $table) {\n $table->boolean('excluded')\n ->default(false)\n ->after('type');\n });\n }", "title": "" }, { "docid": "24a3fc4fdf173c4f6f337f56bbd98364", "score": "0.6980546", "text": "public function up()\n {\n if (Schema::hasTable('rainlab_user_states')) {\n Schema::rename('rainlab_user_states', 'rainlab_location_states');\n return;\n }\n\n Schema::create('rainlab_location_states', function(Blueprint $table) {\n $table->engine = 'InnoDB';\n $table->increments('id');\n $table->integer('country_id')->unsigned()->nullable()->index();\n $table->string('name')->index();\n $table->string('code');\n });\n }", "title": "" }, { "docid": "fa3b855e51652278322698c3435b1cc6", "score": "0.69735885", "text": "public function up()\n {\n $fields = array(\n 'max_supply_num' => array('type' => 'int', 'null' => true),\n 'actual_supply_num' => array('type' => 'int', 'null' => true),\n );\n $this->dbforge->add_column('menu', $fields);\n }", "title": "" }, { "docid": "2a2019ac9e1836c0bb4f64427dc765d5", "score": "0.69643253", "text": "public function up()\n {\n\t\t$this->connection->executeQuery(\"INSERT INTO `rule` (`rule`, `mask`) VALUES ('blabla.ru', 1)\");\n }", "title": "" }, { "docid": "c52c9895ed8fd24e75940f25ffaf7c63", "score": "0.69623286", "text": "public function safeUp()\n {\n $sql = <<<SQL\n CREATE TABLE {$this->app_trace}(\n `trace_id` int(11) NOT NULL AUTO_INCREMENT,\n `autotruck_id` int(11) NOT NULL,\n `status_id` int(11) NOT NULL,\n `traсe_first` tinyint(1) NOT NULL,\n `traсe_last` tinyint(1) NOT NULL,\n `prevstatus_id` int(11) NOT NULL,\n `trace_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n PRIMARY KEY (`trace_id`),\n \n CONSTRAINT `fk-app_trace-status_id` FOREIGN KEY (`status_id`) REFERENCES {$this->app_status} (`id`) ON DELETE CASCADE ON UPDATE CASCADE,\n CONSTRAINT `fk-app_trace-autotruck_id` FOREIGN KEY (`autotruck_id`) REFERENCES {$this->autotruck} (`id`) ON DELETE CASCADE ON UPDATE CASCADE\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8\nSQL;\n\n $this->execute($sql);\n }", "title": "" }, { "docid": "abcefe7b1f480e925d258a6a803a3d6d", "score": "0.6957861", "text": "public function safeUp() {\n\t$this->createTable('UserRemindPass', array(\n 'user_id' =>\"int(11) NOT NULL\",\n 'key' =>\"varchar(50) NOT NULL\",\n 'date' =>\"timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP\",\n \"PRIMARY KEY (`user_id`,`key`)\",\n \"UNIQUE KEY `user_id` (`user_id`)\"\n\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "title": "" }, { "docid": "17f76ea172f12c32741c21d457c2f2d9", "score": "0.6956864", "text": "public function up()\n {\n $sql = \"ALTER TABLE `sys_survey` \n DROP INDEX `survey_code`,\n DROP INDEX `store_id`,\n ADD INDEX `survey_code`(`survey_code`) USING HASH,\n ADD INDEX `store_id`(`store_id`) USING HASH;\n ALTER TABLE `init_table` \n ADD INDEX `created_at`(`created_at`),\n ADD INDEX `update_time`(`update_time`);\n ALTER TABLE `sys_engine_result` \n ADD INDEX `update_time`(`update_time`);\n ALTER TABLE `sys_image` \n ADD INDEX `update_time`(`update_time`);\n ALTER TABLE `sys_image_url` \n ADD INDEX `update_time`(`update_time`);\n ALTER TABLE `sys_plan_store_relation` \n ADD INDEX `update_time`(`update_time`);\n ALTER TABLE `sys_question` \n ADD INDEX `company_code`(`company_code`),\n ADD INDEX `type`(`type`),\n ADD INDEX `scene_type_id`(`scene_type_id`),\n ADD INDEX `update_time`(`update_time`);\n ALTER TABLE `sys_question_answer` \n ADD INDEX `store_id`(`store_id`) USING HASH,\n ADD INDEX `update_time`(`update_time`);\n ALTER TABLE `sys_result_node` \n ADD INDEX `rule_output_node_id`(`rule_output_node_id`),\n ADD INDEX `update_time`(`update_time`);\n ALTER TABLE `sys_rule_output_info` \n ADD INDEX `update_time`(`update_time`);\n ALTER TABLE `sys_survey_question` \n ADD INDEX `update_time`(`update_time`);\n \";\n $this->execute($sql);\n }", "title": "" } ]
336940f85fd2e85c97a9972874e8f8f7
Updates Weather Stats for a device/HARDWARE through
[ { "docid": "aab00e755c3d17a41cad8029d6797aa6", "score": "0.6444304", "text": "public function updateStats(Request $request)\n {\n $this->validate($request, [\n 'device_key' => 'required',\n 'temperature' => 'required',\n 'pressure' => 'required',\n 'rain' => 'required',\n 'humidity' => 'required',\n 'soil_moisture' => 'required',\n ]);\n\n\n //check if key exists\n $stat = WeatherStats::where('device_key', $request->device_key)->first();\n if ($stat) {\n\n $stat->temperature = $request->temperature;\n $stat->pressure = $request->pressure;\n $stat->rain = $request->rain;\n $stat->humidity = $request->humidity;\n $stat->soil_moisture = $request->soil_moisture;\n $stat->save();\n $response = array(\n 'status' => 200,\n 'message' => 'OK'\n );\n return Response($response);\n }\n $response = array(\n 'status' => 404,\n 'message' => 'Device needs to be registered.',\n );\n return Response($response);\n }", "title": "" } ]
[ { "docid": "d9aa6aabe57d9c5d706187f8b6b68e03", "score": "0.647909", "text": "public static function updateWeather() {\n\t\t$return = [\n\t\t\t'status' => 'OK',\n\t\t\t'message' => ''\n\t\t];\n $locs = self::all();\n\t\tforeach ($locs as $l) {\n\t\t\techo 'started ' . $l->name . \"\\n\";\n\t\t\t$return['message'] .= 'Started ' . $l->name . '; ';\n\t\t\t$ok = false;\n\t\t\t$counter = 0;\n\n\t\t\twhile (!$ok && $counter<5) {\n\t\t\t\t$json = file_get_contents($l->wunderground_api_call);\n\t\t\t\tif (empty($json)) {\n\t\t\t\t\t$counter++;\n\t\t\t\t\t$return['status'] = 'error';\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$hours = json_decode($json, true)['hourly_forecast'];\n\t\t\t\tif (empty($hours)) {\n\t\t\t\t\t$counter++;\n\t\t\t\t\t$return['status'] = 'error';\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$ok = true;\n\t\t\t}\n\n\t\t\tif (!$ok) continue;\n\t\t\t$return['status'] = 'OK';\n\n\t\t\tforeach ($hours as $h){\n\t\t\t\t\n\t\t\t\t//temporarily solution for time changing\n\t\t\t\tif ($h['FCTTIME']['hour']==0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t//end of temporarily solution for time changing\n\t\t\t\t\n\t $pom = $l->forecasts()->where([\n\t\t\t\t\t\t['year', $h['FCTTIME']['year']],\n\t\t\t\t\t\t['month', $h['FCTTIME']['mon']],\n\t\t\t\t\t\t['day', $h['FCTTIME']['mday']],\n\t\t\t\t\t\t['hour', $h['FCTTIME']['hour']]\n\t\t\t\t\t])->first();\n\n\t $pom->cloud_coverage = $h['sky'];\n\t $pom->temperature = $h['temp']['metric'];\n\t $pom->pv_output_correction = $pom->pv_output*(0.1 + (100 - $h['sky']) * 0.01);\n\t\t\t\t$pom->pv_output_max_correction = $pom->pv_output_max*(0.1 + (100 - $h['sky']) * 0.01);\n\n\t\t\t\tif($pom->save()){\n\t echo \"{$pom->location_id}, {$pom->id}, {$pom->year}, {$pom->month}, {$pom->day}, {$pom->hour}, {$pom->cloud_coverage}, {$pom->temperature}°C\\n\";\n\t\t\t\t}\n\t\t\t\t$return['message'] .= $pom->year . '-' . $pom->month . '-' . $pom->day . ': temp ' . $h['temp']['metric'] . '°C, sky ' . $h['sky'] . '%; ';\n\t\t\t}\n\t\t\t$return['message'] .= 'End ' . $l->name . '; ';\n\t\t} // end foreach location\n\n\t\treturn $return;\n }", "title": "" }, { "docid": "940000dbac614cddc8567f5ac5ac0879", "score": "0.62359416", "text": "public function update_forecasts()\n\t{\n\t $time = microtime(true);\n \n foreach ($this->airports as $key => $values) {\n \n $airportCode = $values['airport_code'];\n \n $rawWeatherData = $this->get_weather_forecast($airportCode);\n $preparedWeatherData = $this->parse_weather_forecast($rawWeatherData);\n $this->update_database($airportCode, $preparedWeatherData ); \n }\n \n $timeNow = (microtime(true));\n $timePassed = $timeNow - $time;\n echo \"finished weather update in: \".$timePassed.' seconds'; \n\t}", "title": "" }, { "docid": "5d004b169bd25d2f5f7fcd482d680e8f", "score": "0.6105793", "text": "public function weatherStat(Request $request)\n {\n $this->validate($request, [\n 'device_id' => 'required',\n ]);\n\n $device_id = (int) $request->device_id;\n\n if ($device_id == 0) {\n $device = Devices::orderBy('created_at')->first();\n } else {\n $device = Devices::find($device_id);\n }\n\n if ($device) {\n $stat = WeatherStats::where('device_id', $device->id)->first();\n\n if ($stat) {\n $response = array(\n 'status' => 200,\n 'message' => 'OK',\n 'datas' => array(\n 'device_id' => $device->id,\n 'device_key' => $device->device_key,\n 'location' => $device->location,\n 'temperature' => $stat->temperature,\n 'pressure' => $stat->pressure,\n 'rain' => $stat->rain,\n 'humidity' => $stat->humidity,\n 'soil_moisture' => $stat->soil_moisture,\n 'updated_at' => $stat->updated_at,\n )\n );\n return Response($response);\n }\n }\n\n\n $response = array(\n 'status' => 404,\n 'message' => 'Some error occured!',\n );\n return Response($response);\n }", "title": "" }, { "docid": "4795196a172f711179eb22a8511dfcbe", "score": "0.6041492", "text": "public function update(float $temp, float $humidity, float $pressure): void;", "title": "" }, { "docid": "5de397ce3e9e0828a1dc6d1b33ab6351", "score": "0.57838726", "text": "public function update($powerBaseStationAnalysi);", "title": "" }, { "docid": "e0f18d6f981b6fcb559a9bac4bcadd49", "score": "0.5728183", "text": "public function update()\n {\n\t\t$measurementArray = array();\n\t\t$getData = array();\n\t\t$funcName = array();\n\t\t$measurementArray = func_get_arg(0);\n\t\tfor($data=0;$data<count($measurementArray);$data++)\n\t\t{\n\t\t\t$funcName[$data] = $measurementArray[$data][0]->getName();\n\t\t\t$getData[$data] = $measurementArray[$data][0]->$funcName[$data]();\n\t\t\t$keyName[$data] = $measurementArray[$data][0]->getkey();\n\t\t}\n\t\t$measurementId = $measurementArray[0][0]->getMeasurementUnitId();\n\t\t// data pass to the model object for update\n\t\t$measurementModel = new MeasurementModel();\n\t\t$status = $measurementModel->updateData($getData,$keyName,$measurementId);\n\t\treturn $status;\t\n\t}", "title": "" }, { "docid": "c7d48749850ed45b5ff006312855f228", "score": "0.5652852", "text": "public function testUpdateDevice()\n {\n }", "title": "" }, { "docid": "7cfec4a63bfd3f3f3c19bd489a840008", "score": "0.5634772", "text": "public function update(Request $request, WeatherData $weatherData)\n {\n //\n }", "title": "" }, { "docid": "bcba9c276d1addbea59090fa31f4ffdf", "score": "0.55925274", "text": "public function SyncStates() {\n\t$nodes = $this->Request('devices=1');\n if ($nodes) {\n foreach ($nodes as $nodeId => $node) {\n $uniqueId = (string)$node->did;\n $deviceId = $this->GetDeviceByUniqueId($uniqueId);\n if($deviceId > 0) \n\t\t\tHP_ApplyJsonData($deviceId, json_encode($node));\n }\n }\n\t$sensors = $this->Request('meters=1');\n\n if ($sensors) {\n foreach ($sensors as $sId => $sensor) {\n $uniqueId = (string)$sensor->did;\n $sensorId = $this->GetDeviceByUniqueId($uniqueId);\n if($sensorId > 0)\n\t\t{\n\t\t\t\n\t\t if( $this->ProtocolVersion() == 4 )\n\t\t {\n\t\t\t$dataRequest = \"meter=$uniqueId\";\n\t\t \n\t\t\t// nun noch die Daten abfragen\n\t\t\t$data = $this->Request($dataRequest );\n\t\t \n\t\t\tif( $data ) {\n\t\t\t // Ergänze Daten\n\t\t\t $sensor->data = $data;\n\t\t\t}\n\t\t }\n\t\t else\n\t\t {\n\t\t\t $sensor->readings->timestamp = date(\"d.m.Y H:i:s\",$sensor->timestamp);\n\t\t $sensor->data = $sensor->readings;\n\n\t\t }\n\n\t\t\t \n\t\t $lObjInfo = IPS_GetInstance($sensorId);\n\t\t \n\t\t switch( $lObjInfo['ModuleInfo']['ModuleName'] )\n\t\t {\n\t\t\tcase 'HPSensor':\n\t\t\t\tHPSensor_ApplyJsonData($sensorId,json_encode($sensor));\n\t\t\t\tbreak;\n\t\t }\n\t\t}\t\t\t\n }\n }\n }", "title": "" }, { "docid": "1e0c2ade4801bb7fca66b3f270c72ef9", "score": "0.5462157", "text": "function ListWind($wxdb,$tweet)\n{\n\n $wxStation = \"SJC\";\n foreach ($wxdb as $wx)\n {\n\n $wxStation = $wx->station;\n echo \"Station \" . $wxStation . \" <br />\\n\";\n\n\n // get hourly forecast\n\n $wurl = \"http://api.wunderground.com/api/\" . WUNDERGROUND_KEY . \"/hourly/q/\" . $wxStation . \".xml\";\n $response = f_get_content($wurl);\n $parsed_xml = simplexml_load_string($response);\n if ($parsed_xml === FALSE) {\n // die quietly\n echo \"Weather hourly forecast failed for \" . $wurl . \" <br />\\n\";\n return 0;\n }\n $maxtime = 0; // hour for forecast max wind speed for the day\n $maxwind = 0; // max wind speed in MPH\n $maxcompass = \"N\"; // forecast wind direction at max wind speed\n\n foreach ($parsed_xml->hourly_forecast->forecast as $forecast) {\n $windspeed = intval($forecast->wspd->english);\n $ftime = intval($forecast->FCTTIME->hour);\n $compass = $forecast->wdir->dir;\n\n // don't look at wind speeds for oh dark thirty\n if ($ftime < 5)\n continue;\n if ($ftime > 21)\n continue;\n\n if ($windspeed > $maxwind) {\n $maxwind = $windspeed;\n $maxtime = $ftime;\n $maxcompass = $compass;\n }\n }\n echo \"maxwind = \" . $maxwind . \", hour = \" . $maxtime . \" from direction \" . $maxcompass . \" <br />\\n\";\n\n // If wind speed greater than threshold, tweet it out.\n // Also check the \"always tweet\" flag.\n if (($tweet) || ($maxwind > $wx->windThresh)) {\n if ($maxtime > 12) {\n $hour = ($maxtime - 12) . \" PM\";\n } else {\n $hour = $maxtime . \" AM\";\n }\n\n // Build the tweet with link to Wunderground forecast page\n $twitterdata = \"Chasing PRs / KOMs in \" . $wx->name . \"? Winds will peak today \" . $maxwind . \" MPH from the \" . $maxcompass . \" at \" . $hour . \" http://www.wunderground.com/cgi-bin/findweather/hdfForecast?query=\" . $wxStation . \"&apiref=194c2e3c30242aca\";\n echo \"\\n--------------------------------------\\n\";\n echo $twitterdata;\n echo \"\\n--------------------------------------\\n\";\n post_to_twitter($twitterdata);\n // don't flood twitter with these all at once\n sleep(60);\n\n } else {\n // Wunderground only allows 10 API calls per minute,\n // so throttle this if no post to twitter\n sleep(7);\n }\n }\n }", "title": "" }, { "docid": "7e1783440ca209515cf11e01e49ada65", "score": "0.54519165", "text": "function windInit()\n{\n\n echo \"windInit<br />\\n\";\n\n // West Coast stations\n\n $wxdb1 = new stationInfo(\n trim(\"SJC\"), // weather station\n trim(\"San Jose, CA\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdb2 = new stationInfo(\n trim(\"zmw:94614.5.99999\"),// weather station\n trim(\"Oakland, CA\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdb3 = new stationInfo(\n trim(\"LAX\"), // weather station\n trim(\"Los Angeles, CA\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdb4 = new stationInfo(\n trim(\"zmw:92101.1.99999\"),// weather station\n trim(\"San Diego, CA\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdb5 = new stationInfo(\n trim(\"93101.1.99999\"), // weather station\n trim(\"Santa Barbara, CA\"),// location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdb6 = new stationInfo(\n trim(\"zmw:97201.1.99999\"),// weather station\n trim(\"Portland, OR\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdb7 = new stationInfo(\n trim(\"SEA\"), // weather station\n trim(\"Seattle, WA\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdb8 = new stationInfo(\n trim(\"SFO\"), // weather station\n trim(\"San Francisco\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n\n $wxdb9 = new stationInfo(\n trim(\"zmw:93901.1.99999\"),// weather station\n trim(\"Salinas, CA\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdba = new stationInfo(\n trim(\"zmw:95060.1.99999\"),// weather station\n trim(\"Santa Cruz, CA\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdbb = new stationInfo(\n trim(\"zmw:94203.1.99999\"),// weather station\n trim(\"Sacramento, CA\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdbc = new stationInfo(\n trim(\"zmw:93650.1.99999\"),// weather station\n trim(\"Fresno, CA\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n\n $wxdbd = new stationInfo(\n trim(\"zmw:93301.1.99999\"),// weather station\n trim(\"Bakersfield, CA\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdbe = new stationInfo(\n trim(\"santa%20clarita\"), // weather station\n trim(\"Santa Clarita, CA\"),// location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdbf = new stationInfo(\n trim(\"zmw:92373.1.99999\"),// weather station\n trim(\"Redlands, CA\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdbg = new stationInfo(\n trim(\"Riverside%20CA\"), // weather station\n trim(\"Riverside, CA\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n\n $wxdbh = new stationInfo(\n trim(\"zmw:92602.1.99999\"),// weather station\n trim(\"Irvine, CA\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdbi = new stationInfo(\n trim(\"zmw:95401.1.99999\"),// weather station\n trim(\"Santa Rosa, CA\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdbj = new stationInfo(\n trim(\"zmw:96001.1.99999\"),// weather station\n trim(\"Redding, CA\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdbk = new stationInfo(\n trim(\"zmw:99001.3.99999\"),// weather station\n trim(\"Spokane, WA\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdbk = new stationInfo(\n trim(\"zmw:99001.3.99999\"),// weather station\n trim(\"Spokane, WA\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n // Arizona\n\n $wxdbl = new stationInfo(\n trim(\"TUCSON\"), // weather station\n trim(\"Tucson, AZ\"),// location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdbm = new stationInfo(\n trim(\"zmw:85001.1.99999\"),// weather station\n trim(\"Phoenix, AZ\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n // Utah\n\n $wxdbn = new stationInfo(\n trim(\"zmw:84601.1.99999\"),// weather station\n trim(\"Provo, UT\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdbo = new stationInfo(\n trim(\"zmw:84060.1.99999\"),// weather station\n trim(\"Park City, UT\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n // Mountain States\n\n $wxdbp = new stationInfo(\n trim(\"zmw:81301.1.99999\"),// weather station\n trim(\"Durango, CO\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdbq = new stationInfo(\n trim(\"zmw:81001.1.99999\"),// weather station\n trim(\"Pueblo, CO\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdbr = new stationInfo(\n trim(\"zmw:80901.1.99999\"), // weather station\n trim(\"Colorado Springs, CO\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdbs = new stationInfo(\n trim(\"zmw:80202.1.99999\"),// weather station\n trim(\"Denver, CO\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdbt = new stationInfo(\n trim(\"zmw:80301.1.99999\"),// weather station\n trim(\"Boulder, CO\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdbu = new stationInfo(\n trim(\"zmw:80301.1.99999\"),// weather station\n trim(\"Ft Collins, CO\"), // location\n 20 // tweet wind speed forecasts over this value\n );\n\n $wxdbv = new stationInfo(\n trim(\"albuquerque\"),\n trim(\"Albuquerque, NM\"),\n 15\n );\n\n // Texas\n\n $wxdbw = new stationInfo(\n trim(\"zmw:79821.2.99999\"),\n trim(\"El Paso, TX\"),\n 20\n );\n\n $wxdbx = new stationInfo(\n trim(\"zmw:78201.1.99999\"),\n trim(\"San Antonio, TX\"),\n 20\n );\n\n $wxdby = new stationInfo(\n trim(\"zmw:78701.1.99999\"),\n trim(\"Austin, TX\"),\n 20\n );\n\n $wxdbz = new stationInfo(\n trim(\"Plano%20TX\"),\n trim(\"Plano, TX\"),\n 20\n );\n\n $wxdbA = new stationInfo(\n trim(\"Houston%20TX\"),\n trim(\"Houston, TX\"),\n 20\n );\n\n $wxdbB = new stationInfo(\n trim(\"Benbrook%20TX\"),\n trim(\"Benbrook, TX\"),\n 20\n );\n\n $wxdbC = new stationInfo(\n trim(\"Wichita%20Falls%20TX\"),\n trim(\"Wichita Falls, TX\"),\n 20\n );\n\n // Oklahoma \n\n $wxdbD = new stationInfo(\n trim(\"Oklahoma%20City%20OK\"),\n trim(\"Oklahoma City, OK\"),\n 20\n );\n\n $wxdbE = new stationInfo(\n trim(\"Tulsa%20OK\"),\n trim(\"Tulsa, OK\"),\n 20\n );\n\n // Midwest\n\n $wxdbF = new stationInfo(\n trim(\"Kansas%20City%20MO\"),\n trim(\"Kansas City, MO\"),\n 20\n );\n $wxdbG = new stationInfo(\n trim(\"Omaha%20NE\"),\n trim(\"Omaha, NE\"),\n 20\n );\n\n $wxdbH = new stationInfo(\n trim(\"Minneapolis%20MN\"),\n trim(\"Minneapolis, MN\"),\n 20\n );\n\n $wxdbI = new stationInfo(\n trim(\"St%20Louis%20MO\"),\n trim(\"St Louis, MO\"),\n 20\n );\n\n\n\n $wxdb = array(\n $wxdb1,$wxdb2,$wxdb3,$wxdb4,$wxdb5,$wxdb6,$wxdb7,$wxdb8,$wxdb9,$wxdba,\n $wxdbb,$wxdbc,$wxdbd,$wxdbe,$wxdbf,$wxdbg,$wxdbh,$wxdbi,$wxdbj,$wxdbk,\n $wxdbl,$wxdbm,$wxdbn,$wxdbo,$wxdbp,$wxdbq,$wxdbr,$wxdbs,$wxdbt,$wxdbu,\n $wxdbv,$wxdbw,$wxdbx,$wxdby,$wxdbz,$wxdbA,$wxdbB,$wxdbC,$wxdbD,$wxdbE,\n $wxdbF,$wxdbG,$wxdbH,$wxdbI,\n );\n\n //$wxdb = array($wxdbI,$wxdbH); // XXX for debug\n\n return $wxdb;\n}", "title": "" }, { "docid": "2302f815bbc793d314cad0365e5ca7ec", "score": "0.5436742", "text": "public function updating(DeviceLog $device_log)\n {\n //\n }", "title": "" }, { "docid": "d6f84f036ae661761ef7ae8a3818f5b9", "score": "0.5403381", "text": "public function statisticUpdate()\n {\n return $this->client->makeRequest(\n '/statistic/update',\n RetailcrmHttpClient::METHOD_GET\n );\n }", "title": "" }, { "docid": "5d77043bfc4751e5100d9408f24396d6", "score": "0.5379007", "text": "function updateStats()\n {\n if (isset($GLOBALS[\"db_access\"][\"driver\"]) && $GLOBALS[\"db_access\"][\"driver\"]==\"sqlite\") \n {\n \t$row[\"num_artists\"] = getFirstResultForQuery(\"SELECT COUNT ([artist_id]) AS [num_artists] FROM (SELECT DISTINCT artist_id FROM [::songs])\");\n \t$row[\"num_albums\"] = getFirstResultForQuery(\"SELECT COUNT ([album_id]) AS [num_albums] FROM (SELECT DISTINCT album_id FROM [::songs])\");\n \t$row[\"num_songs\"] = getFirstResultForQuery(\"SELECT COUNT ([song_id]) AS [num_songs] FROM (SELECT DISTINCT song_id FROM [::songs])\");\n // \t$row[\"total_time\"] = \n \t$time = getFirstResultForQuery(\"SELECT SUM ([length]) AS [total_time] FROM [::songs]\");\n \t$row[\"total_time\"] = $time[\"total_time\"];\n \t$size = getFirstResultForQuery(\"SELECT SUM ([size])/1024000000 AS [total_size] FROM [::songs]\");\n \t$row[\"total_size\"] = round($size[\"total_size\"], 2);\n }\n else\n {\n \t$row = getFirstResultForQuery(\"SELECT COUNT(DISTINCT [album_id]) AS [num_albums], COUNT(DISTINCT [artist_id]) AS [num_artists], COUNT([song_id]) AS [num_songs], \".\n \"SUM([length]) AS [total_time], SUM([size])/1024000000 AS [total_size] FROM [::songs]\"); \n }\n $row2 = getFirstResultForQuery(\"SELECT COUNT([genre_id]) AS [num_genres] FROM [::genres]\");\n \n truncateAbstractTable(\"stats\");\n getFirstResultForQuery(\"INSERT INTO [::stats]\", array(\"num_artists\"=>$row['num_artists'], \"num_albums\"=>$row['num_albums'], \n \"num_songs\"=>$row['num_songs'], \"num_genres\"=>$row2['num_genres'],\n \"total_time\"=>date('H:i:s', $row['total_time']), \"total_size\"=>$row['total_size'].\"GB\"));\n }", "title": "" }, { "docid": "003e859f1164ec21aca84a1c3e39c0a8", "score": "0.531707", "text": "private function SyncSensors() {\n $HomePilotSensorCategory = $this->GetHomePilotSensorCategory();\n if(@$HomePilotSensorCategory > 0) {\n $sensors = $this->Request('meters=1');\n\t \n\t \t \n if ($sensors) {\n foreach ($sensors as $sId => $sensor) {\n\n\t\t $uniqueId = $sensor->did;\n\t\t\t\n $name = utf8_decode((string)$sensor->name);\n $sensorId = $this->GetDeviceByUniqueId($uniqueId);\n\n if ($sensorId == 0) {\n $sensorId = IPS_CreateInstance($this->SensorGuid());\n IPS_SetProperty($sensorId, 'UniqueId', $uniqueId);\n\t\t\tIPS_LogMessage(\"HPBridge\",\"Sensor create new ($name:$uniqueId)\");\n }\n\n IPS_SetParent($sensorId, $HomePilotSensorCategory);\n IPS_SetName($sensorId, $name);\n\n\n // Verbinde Knoten mit Bridge\n if (IPS_GetInstance($sensorId)['ConnectionID'] <> $this->InstanceID) {\n @IPS_DisconnectInstance($sensorId);\n IPS_ConnectInstance($sensorId, $this->InstanceID);\n }\n\t\t \n IPS_ApplyChanges($sensorId);\n\t\t \n\t\t if( $this->ProtocolVersion() == 4 )\n\t\t {\n\t\t\t$dataRequest = \"meter=$uniqueId\";\n\t\t \n\t\t\t// nun noch die Daten abfragen\n\t\t\t$data = $this->Request($dataRequest );\n\t\t \n\t\t\tif( $data ) {\n\t\t\t // Ergänze Daten\n\t\t\t $sensor->data = $data;\n\t\t\t}\n\t\t }\n\t\t else\n\t\t {\n\t\t\t $sensor->readings->timestamp = date(\"d.m.Y H:i:s\",$sensor->timestamp);\n\t\t\t $sensor->data = $sensor->readings;\n\t\t }\n\n\n\t\t $lObjInfo = IPS_GetInstance($sensorId);\n\t\t \n\t\t switch( $lObjInfo['ModuleInfo']['ModuleName'] )\n\t\t {\n\t\t\tcase 'HPSensor':\n\t\t\t\tHPSensor_ApplyJsonData($sensorId,json_encode($sensor));\n\t\t\t\tbreak;\n\t\t }\n }\n }\n\t \n } else {\n echo 'Sensoren konnten nicht syncronisiert werden, da die Sensorkategorie nicht zugewiesen wurde.';\n IPS_LogMessage('SymconHP', 'Sensoren konnten nicht syncronisiert werden, da die Sensorenkategorie nicht zugewiesen wurde.');\n }\n return true;\n }", "title": "" }, { "docid": "17bbdf8b5f23de76afacea00832d9ced", "score": "0.52975637", "text": "public function update();", "title": "" }, { "docid": "17bbdf8b5f23de76afacea00832d9ced", "score": "0.52975637", "text": "public function update();", "title": "" }, { "docid": "17bbdf8b5f23de76afacea00832d9ced", "score": "0.52975637", "text": "public function update();", "title": "" }, { "docid": "17bbdf8b5f23de76afacea00832d9ced", "score": "0.52975637", "text": "public function update();", "title": "" }, { "docid": "bd4319f361216458e8299c577e18dd17", "score": "0.52772236", "text": "public function update(Request $request, WeatherLocation $weatherLocation)\n {\n //\n }", "title": "" }, { "docid": "ee5f5276e0ef564cbd5f8c9e1e46ac6e", "score": "0.52588665", "text": "public function displayWeatherInfo() \n {\n printf(\"\\nLocation Info:\\n\");\n $mask = \"|%+13s |%-20s |\\n\";\n printf($mask, \"City Name==>\", $this->city);\n printf($mask, \"Country==>\", $this->countryName);\n printf($mask, \"Time Zone==>\", $this->timezone);\n printf($mask, 'Place Type==>', $this->placeType);\n printf(\"\\n\");\n\n printf(\"Astronomy Info:\\n\");\n printf($mask, \"Sunrise==>\", $this->astronomyInfo[0]['sunrise']);\n printf($mask, \"Sunset==>\", $this->astronomyInfo[0]['sunset']);\n printf(\"\\n\");\n\n $mask2 = \"|%+30s |%30s |\\n\";\n printf(\"Current Weather Info:\\n\");\n printf($mask2, \"Weather Recorded Time/Date==>\", \n $this->currentWeatherCondition['date']);\n printf($mask2, \"Current Temperature==>\",\n $this->currentWeatherCondition['temp'] . ' ' .\n $this->unit[0]['temperature']);\n printf($mask2, \"Weather Type==>\", \n $this->currentWeatherCondition['text']);\n printf(\"\\n\");\n \n printf(\"Wind Info:\\n\");\n printf($mask, \"Chill==>\", \n $this->wind[0]['chill']);\n printf($mask, \"Direction==>\", \n $this->wind[0]['direction']);\n printf($mask, \"Speed==>\", \n $this->wind[0]['speed'] . ' ' . $this->unit[0]['speed']);\n printf(\"\\n\");\n \n printf(\"Atmosphere Info:\\n\");\n printf($mask, \"Humidity==>\", \n $this->atmosphereInfo[0]['humidity']);\n printf($mask, \"Visibility==>\", \n $this->atmosphereInfo[0]['visibility']);\n printf($mask, \"Pressure==>\", \n $this->atmosphereInfo[0]['pressure'] . ' ' . $this->unit[0]['pressure']);\n printf(\"\\n\");\n \n $mask3 = \"|%5s |%+12s|%5s |%5s |%18s|\\n\";\n printf(\"Weather Forecast:\\n\");\n printf($mask3, \"Day\", \"Date\", \"Low\", \"High\", \"Weather Type\");\n for($i=0; $i<5; $i++){\n printf($mask3, $this->weatherForecast[$i]['day'], \n $this->weatherForecast[$i]['date'], \n $this->weatherForecast[$i]['low'], \n $this->weatherForecast[$i]['high'], \n $this->weatherForecast[$i]['text']);\n }\n printf(\"\\n\");\n }", "title": "" }, { "docid": "74aae45382b04deafa4b0bc0ca228bbe", "score": "0.5222863", "text": "function updateWeight() {\r\n if (isset($this->post['weight']) && isset($this->post['unit'])) {\r\n $weight = $this->post['weight'];\r\n $unit = $this->post['unit'];\r\n\r\n //validation\r\n $weight = floatval($weight);\r\n if (!($weight > 0 && $weight < 1000)) {\r\n throw new Exception('输入的重量范围不在0到1000之间!');\r\n }\r\n \r\n $this->load->model('healthy', 'm');\r\n if (false === array_key_exists($unit, $this->m->weightUnitOpt)) {\r\n throw new Exception('输入的重量单位错误!');\r\n }\r\n $this->session = &load_class('session');\r\n if ($this->m->updateWeight($weight, $unit) === true) {\r\n echo json_encode(array('status' => 0));\r\n }\r\n }\r\n }", "title": "" }, { "docid": "b8a6b20682e1d26ed8ec1904bda3dbdc", "score": "0.5157845", "text": "static function updateOS() {\n $useros = self::getOS();\n $os = DBHelper::allWhere('analytics_os', [\n 'name' => $useros,\n 'ip_addr' => serverValue('REMOTE_ADDR')\n ]);\n if (count($os) > 0)\n {\n DBHelper::updateRecord('analytics_os', [\n 'name' => $useros,\n 'ip_addr' => serverValue('REMOTE_ADDR')\n ],[\n 'visits' => $os->first()->visits+1\n ]);\n } else {\n DBHelper::insertToTable('analytics_os', [\n 'visits' => 1,\n 'name' => $useros,\n 'ip_addr' => serverValue('REMOTE_ADDR')\n ]);\n }\n }", "title": "" }, { "docid": "1d70f678c747aac5dde3a781a39758d1", "score": "0.5137536", "text": "public function updateCharacterInfo() : void\n {\n $data = array(\n \"balance\" => $this->character_balance,\n \"escrow\" => $this->character_escrow,\n \"total_sell\" => $this->character_orders,\n \"broker_relations\" => $this->character_broker_level,\n \"accounting\" => $this->character_accounting_level,\n \"networth\" => $this->character_networth,\n );\n\n $this->db->where('eve_idcharacter', $this->character_id);\n $this->db->update('characters', $data);\n }", "title": "" }, { "docid": "b5eb71b165d8b7fad4384dd169349470", "score": "0.511205", "text": "public function weather($city, $stats=false){\n\t\t\n\t\trequire('weather_lang_jp.php');\n\t\t\n\t\t// WEATHER FORECAST //\n\t\t$key='6ae8c9cc22982ef8cad939095a33c9c3';\n\t\t\t\t\n\t\t$url = \"http://openweathermap.org/data/2.1/find/name?q={$city}&APPID={$key}\";\n\t\t\n\t\t\n\t\t// Open CURL session:\n\t\t$weather_channel= curl_init($url);\n\t\tcurl_setopt($weather_channel, CURLOPT_RETURNTRANSFER, 1);\n\t\t\n\t\t// Get the rates data:\n\t\t$json = curl_exec($weather_channel);\n\t\tcurl_close($weather_channel);\n\t\t\n\t\t// Decode JSON response:\n\t\t$weather_forecast = json_decode($json);\n\t\t\t\n\t\t//echo '<pre>';print_r($weather_forecast);echo '</pre>';\n\t\t\n\t\t$i=0;\n\t\t\n\t\twhile ($weather_forecast->list[$i]->sys->country != $this->countryIsoCode)\n\t\t{\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t//get on the offset time\n\t\t$urlXML = \"http://www.earthtools.org/timezone/{$weather_forecast->list[$i]->coord->lat}/{$weather_forecast->list[$i]->coord->lon}\";\n\t\t$timezone = simplexml_load_file($urlXML);\n\t\t//\n\t\t\n\t\t$treeH = '3h';\n\t\t\n\t\t//echo $timeOffset;\n\t\t\n\t\t//gather all detail\n\t\t$weather_detail = (object) array(\n\t\t\t'id' \t\t\t=> $weather_forecast->list[$i]->id,\n\t\t\t'coordinates'\t=> (object) array( 'latitude' \t=> $weather_forecast->list[$i]->coord->lat,\n\t\t\t\t\t\t\t\t\t\t\t\t'longitude' => $weather_forecast->list[$i]->coord->lon),\n\t\t\t'name'\t\t \t=> $weather_forecast->list[$i]->name,\n\t\t\t'temperature'\t=> (object) array( 'now'\t=> round($weather_forecast->list[$i]->main->temp - 273.15) . '&deg;C',\t//Temperature in Kelvin. Subtracted 273.15 from this figure to convert to Celsius.\n\t\t\t\t\t\t\t\t\t\t\t\t'max' \t=> round($weather_forecast->list[$i]->main->temp_max - 273.15) ,//Temperature in Kelvin. Subtracted 273.15 from this figure to convert to Celsius.\n\t\t\t\t\t\t\t\t\t\t\t\t'min' \t=> round($weather_forecast->list[$i]->main->temp_min - 273.15)),//Temperature in Kelvin. Subtracted 273.15 from this figure to convert to Celsius.\n\t\t\t'pressure'\t\t=> $weather_forecast->list[$i]->main->pressure .' hPa',\n\t\t\t'humidity' \t\t=> $weather_forecast->list[$i]->main->humidity . '%',\n\t\t\t'unixtime'\t\t=> $weather_forecast->list[$i]->dt,\n\t\t\t'date' \t\t\t=> substr($timezone->localtime,0,-3),\n\t\t\t'wind' \t\t\t=> (object) array( 'speed' => $weather_forecast->list[$i]->wind->speed .'m/s', //speed in mps (metres par second) info: 1 mps=2.2 mph(miles perhour) 1mph=1.6kmph(kilometres per hour)\n\t\t\t\t\t\t\t\t\t\t\t\t'degree'=> $weather_forecast->list[$i]->wind->deg .'&deg;'),\n\t\t\t'clouds' \t\t=> $weather_forecast->list[$i]->clouds->all . '%',\n\t\t\t'rain' \t\t\t=> $weather_forecast->list[$i]->rain->$treeH . 'mm',\n\t\t\t'snow' \t\t\t=> $weather_forecast->list[$i]->snow->$treeH . 'mm',\n\t\t\t'code' \t\t\t=> $weather_forecast->list[$i]->weather[0]->code,\n\t\t\t'forecast'\t\t=> $weather_forecast->list[$i]->weather[0]->main,\n\t\t\t//'description'\t=> $weather_forecast->list[$i]->weather[0]->description,\n\t\t\t'description'\t=> $weather_description[$weather_forecast->list[$i]->weather[0]->id],\n\t\t\t'icon' \t\t\t=> \"<a href=\\\"{$weather_forecast->list[$i]->url}\\\" title=\\\"{$weather_forecast->list[$i]->name}\\\"><img src=\\\"http://openweathermap.org/img/w/{$weather_forecast->list[$i]->weather[0]->icon}.png\\\" title=\\\"{$weather_forecast->list[$i]->weather->main}\\\" alt=\\\"{$weather_forecast->list[$i]->weather->main}\\\" /></a>\",\n\t\t\t'offset' => $timezone->offset\n\t\t);\n\t\t\n\t\tif($stats)\n\t\t\t$weather_detail->population = $this->cityPopulation($weather_forecast->list[$i]->coord->lat, $weather_forecast->list[$i]->coord->lon, $weather_forecast->list[$i]->id);\n\t\t\n\t\treturn $weather_detail;\n\t}", "title": "" }, { "docid": "85bf3cf26adda55301c6be49e548f386", "score": "0.50988466", "text": "public function update() { }", "title": "" }, { "docid": "85bf3cf26adda55301c6be49e548f386", "score": "0.50988466", "text": "public function update() { }", "title": "" }, { "docid": "13860b4d6ee196c4217cefb1b20e1e6c", "score": "0.50925344", "text": "public function updated(DeviceLog $device_log)\n {\n //\n }", "title": "" }, { "docid": "2117f34da3f7584fb5e714dfbe260848", "score": "0.50503767", "text": "public function __construct($location)\n {\n $this->location = $location;\n //query=[Taipei];//,例如: Taoyuan Air Base , Taipei\n $xml = simplexml_load_file(\n \"http://api.wunderground.com/auto/wui/geo/WXCurrentObXML/index.xml?query=$location\"\n );\n\n\n \n $wea=$xml->weather;\n\n \n $tem=$xml->temp_c;\n\n $mus=$xml->relative_humidity;\n\n $wind=$xml->wind_dir;\n //date_default_timezone_set('Asia/Taipei');\n $time = date(\n 'Y-m-d H:i',\n strtotime($xml->local_time)\n );\n \n if($wea==\"thunderstorm rain\"){ $wea= \"雷雨 \";}\n if($wea==\"light showers rain\"){ $wea= \"小驟雨 \";}\n if($wea==\"flurries\"){ $wea= \"小雪 \";}\n if($wea==\"Cloudy\"){ $wea= \"霧 \";}\n if($wea==\"Haze\"){ $wea= \"陰霾 \";}\n if($wea==\"Mostly Cloudy\"){ $wea= \"多雲時陰\";}\n if($wea==\"Mostly Sunny\"){ $wea= \"晴時多雲\";}\n if($wea==\"Partly Cloudy\"){ $wea= \"局部多雲\";}\n if($wea==\"Partly Sunny\"){ $wea= \"多雲時晴\";}\n if($wea==\"thunderstorm rain\"){ $wea= \"凍雨\";}\n if($wea==\"Rain\"){ $wea= \"雨 \";}\n if($wea==\"Sleet\"){ $wea= \"冰雹 \";}\n if($wea==\"Snow\"){ $wea= \"雪 \";}\n if($wea==\"Sunny\"){ $wea= \"晴朗 \";}\n if($wea==\"Unknown\"){ $wea= \"未知 \";}\n if($wea==\"Overcast\"){ $wea= \"陰天 \";}\n if($wea==\"Scattered Clouds\"){ $wea= \"疏雲 \";}\n \n $this->text = '氣象狀況:'.$wea.' 溫度:'.$tem.' 相對濕度: '.$mus.' 風向: '.$wind.' 時間:'.$time;\n \n /*\n showers rain = 驟雨\n light showers rain = 小驟雨\n\n Cloudy = 多雲\n Flurries = 小雪\n Fog = 霧\n Haze = 陰霾\n Mostly Cloudy = 多雲時陰\n Mostly Sunny = 晴時多雲\n Partly Cloudy = 局部多雲\n Partly Sunny = 多雲時晴\n Freezing Rain = 凍雨\n Rain = 雨\n Sleet = 冰雹\n Snow = 雪\n Sunny = 晴朗\n Unknown = 未知\n Overcast = 陰天\n Scattered Clouds = 疏雲 \n */\n \n \n \n\n \n \n \n \n \n \n \n \n }", "title": "" }, { "docid": "bbacea71200d2d5e5e8060f18e9eb7c0", "score": "0.5038372", "text": "abstract public function update();", "title": "" }, { "docid": "bbacea71200d2d5e5e8060f18e9eb7c0", "score": "0.5038372", "text": "abstract public function update();", "title": "" }, { "docid": "bbacea71200d2d5e5e8060f18e9eb7c0", "score": "0.5038372", "text": "abstract public function update();", "title": "" }, { "docid": "7d0bb96256f53ca62275c5f0fc74da35", "score": "0.50380045", "text": "function getWeatherInfo() {\n\n //We get the zip function the user submitted earlier in order to use it in our call to WU API\n //We also need to declare these variables as global because we use them outside of this local function\n \t$zip = $_GET['zip'];\n \tglobal $location;\n \tglobal $temp_f;\n \tglobal $weather;\n \tglobal $error;\n\n //Let's get that data.\n $key = \"ENTER YOUR KEY HERE\";\n \t$json_string = file_get_contents(\"http://api.wunderground.com/api/\" . $key . \"/conditions/q/\" . $zip . \".json\");\n \t$parsed_json = json_decode($json_string);\n \t$error = $parsed_json->{'response'}->{'error'}->{'type'};\n\n //If we do not find an error, get the location, temperature, and forecast.\n \tif ($error != 'querynotfound') {\n\t \t$location = $parsed_json->{'current_observation'}->{'display_location'}->{'city'};\n\t \t$temp_f = $parsed_json->{'current_observation'}->{'temp_f'};\n\t \t$weather = $parsed_json->{'current_observation'}->{'weather'};\n \t}\n }", "title": "" }, { "docid": "3c5ec1fbc08cb4eb7170b037ebee51f5", "score": "0.5035362", "text": "public function update(Request $request, tbl_iot_sensors $tbl_iot_sensors)\n {\n //\n }", "title": "" }, { "docid": "f3be51175958f4e138e03f7206006145", "score": "0.50352615", "text": "public abstract function update();", "title": "" }, { "docid": "5511cd3cb9822dd477f914c912bf14ec", "score": "0.5025268", "text": "public function updates()\n {\n // Make sure we arent getting direct accessed, and the user has permission\n $this->check_access('a');\n \n // Disable error reporting\n $debug = load_class('Debug');\n $debug->error_reporting(FALSE);\n \n // Build our headers\n $handle = fsockopen(\"www.wilson212.net/updates.php\", 80, $errno, $errstr, 3);\n if(!$handle)\n {\n $response = \"-1\";\n }\n else\n {\n fclose($handle);\n $response = file_get_contents(\"http://wilson212.net/updates.php\");\n }\n \n // Set back our error reporting\n $debug->error_reporting(TRUE);\n \n // return the result\n echo $response;\n }", "title": "" }, { "docid": "b643f98659bfb48decbed178cf3a090b", "score": "0.50092024", "text": "public function update() {\n \n }", "title": "" }, { "docid": "da613dbeac65fb507e507cbe2c550c8c", "score": "0.50005686", "text": "public function updateWap(): void\n {\n AccessDocument::updateWAPsForPerson($this->person_id, $this->access_date, $this->access_any_time, 'set via BMID update');\n\n $wap = $this->wap;\n if ($wap) {\n $wap->refresh();\n $this->setWap($wap);\n }\n }", "title": "" }, { "docid": "3dd65c95f818ba9ec2e7052a9f2b5f9e", "score": "0.4985673", "text": "protected function update () {\n\n }", "title": "" }, { "docid": "29d33ba5781cb3e04f4dabcb83b16230", "score": "0.49836934", "text": "public function update()\n {\n $currentVersion = $this->getCurrentVersion();\n\n $updatesToRun = $this->updateList->getUpdatesToRun($currentVersion);\n\n $this->log->info(\"Starting global update.\", [\n \"updatesToRun\" => $updatesToRun->pluck(\"name\")->all()\n ]);\n\n foreach ($updatesToRun as $update)\n $this->runUpdate($update, $currentVersion);\n }", "title": "" }, { "docid": "a455092621cba5a8970835fa7060ce34", "score": "0.4971477", "text": "function update_monsters(){\n\t\tglobal $conn;\n\t\t$query = \"\";\n\t\treturn $conn->query($query);\n\t}", "title": "" }, { "docid": "ddc85140420c43617bbd19f45eb2fb2e", "score": "0.49604666", "text": "public function update()\n {\n }", "title": "" }, { "docid": "ece36679f40360767d77b54ef6dd58c9", "score": "0.49595422", "text": "public function updateData($data, $isDeviceBase, $deviceID, $typeID) {\n\t\t$arr0 = (array)$data;\n\t\t$arr = $arr0['data'];\n\t\t\n\t\t$srcTable = \"\";\t\t\n\t\t// in this case need to add proxy countries for matching batType and pwrType IDs\n\t\t$srcTable = \"Consulting.DC_scenarioData\";\n\t\t\n\t\tif ($isDeviceBase) $srcTable = \"Consulting.DC_deviceBaseTable\"; \t\t\t\t\n\t\t\n\t\tfor ($j = 0; $j < count($arr); $j++) {\t\t\n\t\t\t$b =(array) $arr0['data'][$j]; // need to extend to more data points\n\t\t\t$stmnt = \"\n\t\t\t\tUPDATE \".$srcTable.\" \n\t\t\t\tSET\t\t\t\t\t\t\n\t\t\t\t\tY2004 = \".$b['Y2004'].\",\n\t\t\t\t\tY2005 = \".$b['Y2005'].\", Y2006 = \".$b['Y2006'].\", Y2007 = \".$b['Y2007'].\",\n\t\t\t\t\tY2008 = \".$b['Y2008'].\", Y2009 = \".$b['Y2009'].\", Y2010 = \".$b['Y2010'].\",\n\t\t\t\t\tY2011 = \".$b['Y2011'].\", Y2012 = \".$b['Y2012'].\", Y2013 = \".$b['Y2013'].\", \n\t\t\t\t\tY2014 = \".$b['Y2014'].\", Y2015 = \".$b['Y2015'].\", Y2016 = \".$b['Y2016'].\", \n\t\t\t\t\tY2017 = \".$b['Y2017'].\", Y2018 = \".$b['Y2018'].\", Y2019 = \".$b['Y2019'].\", \n\t\t\t\t\tY2020 = \".$b['Y2020'].\"\n\t\t\t\tWHERE scenarioID = \".$b['scenarioID'].\"\t\t\t\n\t\t\t\t\tAND countryID = \".$b['countryID'].\"\n\t\t\t\t\tAND indicatorID = \".$b['indicatorID'];\n\t\t\t\n\t\t\tif ( ($b['indicatorID'] == 203)||($b['indicatorID'] == 210)||($b['indicatorID'] == 211) ) { // means device base\n\t\t\t\t\t$stmnt = $stmnt.\" AND deviceID = \".$deviceID;\n\t\t\t} else \t\t\t\n\t\t\tif ($b['indicatorID'] > 200) { // means not macro\n\t\t\t\t\t$stmnt = $stmnt.\"\n\t\t\t\t\t\tAND deviceID = \".$deviceID.\" AND typeID = \".$typeID.\";\";\n\t\t\t};\n\t\t\n\t\t\t$result = $this->connection->prepare($stmnt);\n\t\t\t$result->execute();\t\n\t\t}\t\t\n\t\treturn true;\n\t\t//return $stmnt;\n\t}", "title": "" }, { "docid": "3f72aedbc05d59673d32a288759e4b43", "score": "0.49565813", "text": "public function update(): void\n {\n\n if (!$this->throwPearl) {\n $this->removeSecInThrow();\n if ($this->secsEnderpearl <= 0) $this->setThrowPearl();\n }\n\n if ($this->combat) {\n $this->secsInCombat--;\n if ($this->secsInCombat <= 0)\n $this->setInCombat(false);\n }\n\n if ($this->spam > 0) {\n $this->spam--;\n }\n\n if ($this->tellSpam > 0)\n $this->tellSpam--;\n\n\n if ($this->previousLimitedFeat !== $this->hasLimitedFeatures()) {\n if (!$this->hasLimitedFeatures()) {\n // TODO SEND MESSAGE\n }\n }\n\n if ($this->currentSecond % 5 === 0) {\n $this->doUpdatePing();\n }\n\n $this->previousLimitedFeat = $this->hasLimitedFeatures();\n $this->currentSecond++;\n }", "title": "" }, { "docid": "1d20797574751658c516c69dfa162f61", "score": "0.4948045", "text": "function logger_rrd_night_update($meter, $start, $end) {\n\n $file_path = _logger_rrd_file($meter);\n $resolution = 15 * MINUTE;\n\n $command = RRDTOOL . \" fetch $file_path \" .\n \"AVERAGE \" .\n \"--resolution $resolution \" .\n \"--start $start \" .\n \"--end $end \" .\n\n \"| tail -n 12 | awk -F': ' '{SUM += $2} END {print SUM/12}'\";\n\n $value = (float) shell_exec($command);\n\n return logger_rrd_update($meter, array($end => $value), 'night');\n}", "title": "" }, { "docid": "e1fc927fffc6f7422c4e6f2febeb88c2", "score": "0.49360892", "text": "public function update_computer_whiz()\n {\n $root_fid = 9;\n if ($this->is_dev_server()) {\n $root_fid = 51;\n }\n $def = $this->container->getParameter(\"jeb.snahp.req\")[\"def\"];\n $a_fid = $this->select_subforum($root_fid);\n $include = $this->db->sql_in_set(\"forum_id\", $a_fid);\n $sql =\n \"SELECT topic_poster, COUNT(*) as count FROM \" .\n TOPICS_TABLE .\n \" WHERE \" .\n $include .\n \" GROUP BY topic_poster ORDER BY count DESC\";\n $result = $this->db->sql_query($sql);\n $row = $this->db->sql_fetchrow($result);\n $this->db->sql_freeresult($result);\n $data = [\n \"unique\" => true,\n \"type\" => \"computer_whiz\",\n \"user_id\" => $row[\"topic_poster\"],\n \"value\" => $row[\"count\"],\n \"modified_time\" => time(),\n ];\n return $data;\n }", "title": "" }, { "docid": "7c777f202e3c54c731bcfac6bc26d50b", "score": "0.49201706", "text": "public function update(): void;", "title": "" }, { "docid": "7c777f202e3c54c731bcfac6bc26d50b", "score": "0.49201706", "text": "public function update(): void;", "title": "" }, { "docid": "183b88675a7f7d85d353f88646172156", "score": "0.4905169", "text": "private function TrafficUpdate()\n {\n $this->getTraffic();\n\n $siteView = SiteView::where('date', $this->date)->first();\n\n if ($siteView) {\n $siteView->pages = $this->traffic->pages + 1;\n $siteView->save();\n }\n\n\n $this->traffic = null;\n }", "title": "" }, { "docid": "270f52ac85fc576da7bddcf0bbd5d1bc", "score": "0.49035394", "text": "public function update() {\r\n\t }", "title": "" }, { "docid": "e7e198be1c5b7c23281cc184556cd27f", "score": "0.49027723", "text": "public function update(Major $major);", "title": "" }, { "docid": "aa4471bc4d5121f5cfde28e7d69b401a", "score": "0.48965016", "text": "public function update_stats($data,$year,$week){\r\n\t\t \r\n\t\t//go through each player and update stats ['gsis']=>all columns\r\n\t\tforeach($data as $nfl_gsis_player_id => $stats){\r\n\t\t\t\r\n\t\t\t//count entries for the player in the stats table\r\n\t\t\t$count = $this->NFL_db->where('nfl_gsis_player_id',$nfl_gsis_player_id)\r\n\t\t\t\t\t\t\t\t->where('week',$week)\r\n\t\t\t\t\t\t\t\t->where('season',$year)\r\n\t\t\t\t\t\t\t\t->count_all_results('NFL_stats_'.$year);\r\n\t\t\tif($count==0){\r\n\t\t\t\t//insert an entry into the stats table for the player\r\n\t\t\t\t$fffl_player_id = $this->Players->convert_player_id($nfl_gsis_player_id, 'nfl_gsis_player_id', 'fffl_player_id');\r\n\t\t\t\tif($fffl_player_id!=FALSE) { \r\n\t\t\t\t\t$this->NFL_db->set('fffl_player_id',$fffl_player_id)\r\n\t\t\t\t\t\t\t->set('nfl_gsis_player_id',$nfl_gsis_player_id)\r\n\t\t\t\t\t\t\t->set('season',$year)\r\n\t\t\t\t\t\t\t->set('week',$week)\r\n\t\t\t\t\t\t\t->set('player_name','')\r\n\t\t\t\t\t\t\t->set('player_team', $stats['playerteam'])\r\n\t\t\t\t\t\t\t->set('player_opponent',$stats['vs'])\r\n\t\t\t\t\t\t\t->insert('NFL_stats_'.$year);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->NFL_db->set('player_name',$stats['playername']);\r\n\t\t\tforeach(array('completions','incompletions','interceptions','rushes','receptions','pass_yards','rush_yards','receiving_yards','pass_tds','rush_tds','receiving_tds','punt_return_tds','kick_return_tds','fumbles','fumbles_lost','xps_made','xps_missed','two_point_made','fgs_made_19','fgs_made_29','fgs_made_39','fgs_made_49','fgs_made_59','fgs_made_60plus','fgs_missed_19','fgs_missed_29','fgs_missed_39','fgs_missed_49','fgs_missed_59','fgs_missed_60plus') as $key){\r\n\t\t\t\tif(array_key_exists($key, $stats)) {\r\n\t\t\t\t\t$this->NFL_db->set($key,$stats[$key]);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t \r\n\t\t\t\t\t$stats[$key]=0;\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//$this->NFL_db->set('targets',$stats['?']);\r\n\t\t\t//$this->NFL_db->set('other_tds',$stats['?']);\r\n\t\t\t$this->NFL_db->where('nfl_gsis_player_id',$nfl_gsis_player_id);\r\n\t\t\t$this->NFL_db->where('week',$week);\r\n\t\t\t$this->NFL_db->update('NFL_stats_'.$this->current_year);\r\n\t\t\r\n\t\t\t//update the scores\r\n\t\t\t$this->calculate_scoring($stats,$nfl_gsis_player_id,$week,$year);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "90182b2122174e837e69feeee5a06665", "score": "0.48804408", "text": "public function update()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "3b721c9bcd01d9dd45d3b583f59c488f", "score": "0.4880338", "text": "public function testUpdateDeviceRegistration()\n {\n }", "title": "" }, { "docid": "828bb2371e3e60de946235b36b0e2869", "score": "0.48470116", "text": "public function UploadToWunderground() {\n\n\t\t$Debug = $this->ReadPropertyBoolean(\"Debug\");\n\n\t\t// setting standard values like time and login\n\n\t\t$WU_ID = $this->ReadPropertyString(\"WU_ID\");\n\t\t$WU_Password = $this->ReadPropertyString(\"WU_StationKey\");\n\t\t$time = \"now\";\n\n\t\t$responseUrl = \"https://weatherstation.wunderground.com/weatherstation/updateweatherstation.php?ID=\".$WU_ID.\"&PASSWORD=\".$WU_Password.\"&dateutc=\".$time;\n\n\t\tIf ($this->ReadPropertyInteger(\"OutsideTemperature\") != \"\" and IPS_VariableExists($this->ReadPropertyInteger(\"OutsideTemperature\")))\t{\n\t\t\t$Temperature = GetValue($this->ReadPropertyInteger(\"OutsideTemperature\"));\n\t\t\t$TemperatureF = str_replace(\",\",\".\",(($Temperature * 9) /5 + 32));\n\t\t\t$this->SendDebug(\"Wunderground PWS Update\",\"Wunderground Upload Temperature F: \".$TemperatureF, 0);\n\n\t\t\t$responseUrl .= \"&tempf=\".$TemperatureF;\n\t\t}\n\n\n\t\t// Prepare Dewpoint for upload\n\n\t\tIf ($this->ReadPropertyInteger(\"DewPoint\") != \"\" and IPS_VariableExists($this->ReadPropertyInteger(\"DewPoint\"))) {\n\t\t\t$DewPoint = GetValue($this->ReadPropertyInteger(\"DewPoint\"));\n\t\t\t$DewPointF = str_replace(\",\",\".\",(($DewPoint * 9) /5 + 32));\n\t\t\t$this->SendDebug(\"Wunderground PWS Update\",\"Wunderground Upload Taupunkt F: \".$DewPointF, 0);\n\n\t\t\t$responseUrl .= \"&dewptf=\".$DewPointF;\n\t\t}\n\n\n\t\t// Prepare Humidity for upload\n\n\t\tIf ($this->ReadPropertyInteger(\"Humidity\") != \"\" and IPS_VariableExists($this->ReadPropertyInteger(\"Humidity\"))) {\n\t\t\t$Humidity = GetValue($this->ReadPropertyInteger(\"Humidity\"));\n\t\t\t$this->SendDebug(\"Wunderground PWS Update\",\"Wunderground Upload Humidity: \".$Humidity, 0);\n\n\t\t\t$responseUrl .= \"&humidity=\".$Humidity;\n\t\t}\n\n\n\t\t// Prepare Windirection for upload\n\n\t\tIf ($this->ReadPropertyInteger(\"WindDirection\") != \"\" and IPS_VariableExists($this->ReadPropertyInteger(\"WindDirection\")))\t{\n\t\t\t$WindDirection = GetValue($this->ReadPropertyInteger(\"WindDirection\"));\n\t\t\t$WindDirectionU = str_replace(\",\",\".\",$WindDirection);\n\t\t\t$this->SendDebug(\"Wunderground PWS Update\",\"Wunderground Upload Wind Direction: \".$WindDirectionU, 0);\n\n\t\t\t$responseUrl .= \"&winddir=\".$WindDirectionU;\n\t\t}\n\n\n\t\t// Prepare Windspeed for upload\n\n\t\tIf ($this->ReadPropertyInteger(\"WindSpeed\") != \"\" and IPS_VariableExists($this->ReadPropertyInteger(\"WindSpeed\"))) {\n\t\t\t$WindSpeed = GetValue($this->ReadPropertyInteger(\"WindSpeed\"));\n\n\t\t\tIf ($this->ReadPropertyString(\"WindConversion\") == \"kmh\") {\n\t\t\t\t\t$WindSpeed = str_replace(\",\",\".\",Round(($WindSpeed / 3.6),2));\n\t\t\t\t\t$this->SendDebug(\"Wunderground PWS Update\",\"Converting from KMH to M/S\", 0);\n\n\t\t\t\t}\n\n\t\t\t$WindSpeedU = str_replace(\",\",\".\",Round(($WindSpeed * 2.2369),2));\n\t\t\t$this->SendDebug(\"Wunderground PWS Update\",\"Wunderground Upload Windspeed: \".$WindSpeedU.\" mph (\".$WindSpeed.\" m/s)\", 0);\n\n\t\t\t$responseUrl .= \"&windspeedmph=\".$WindSpeedU;\n\t\t}\n\n\n\t\t// Prepare Windgust for upload\n\n\t\tIf ($this->ReadPropertyInteger(\"WindGust\") != \"\" and IPS_VariableExists($this->ReadPropertyInteger(\"WindGust\"))) {\n\t\t\t$WindGust = GetValue($this->ReadPropertyInteger(\"WindGust\"));\n\n\t\t\tIf ($this->ReadPropertyString(\"WindConversion\") == \"kmh\") {\n\t\t\t\t$WindGust = str_replace(\",\",\".\",Round(($WindGust / 3.6),2));\n\t\t\t\t$this->SendDebug(\"Wunderground PWS Update\",\"Converting from KMH to M/S\", 0);\n\n\t\t\t}\n\n\t\t\t$WindGustU = str_replace(\",\",\".\",Round(($WindGust * 2.2369),2));\n\t\t\t$this->SendDebug(\"Wunderground PWS Update\",\"Wunderground Upload Wind Gust: \".$WindGustU, 0);\n\n\t\t\t$responseUrl .= \"&windgustmph=\".$WindGustU;\n\t\t}\n\n\n\t\t// Prepare Rain last hour for upload\n\n\t\tIf ($this->ReadPropertyInteger(\"Rain_last_Hour\") != \"\" and IPS_VariableExists($this->ReadPropertyInteger(\"Rain_last_Hour\")))\t{\n\t\t\t$Rain_last_Hour = GetValue($this->ReadPropertyInteger(\"Rain_last_Hour\"));\n\t\t\t$Rain_last_Hour = str_replace(\",\",\".\",Round(($Rain_last_Hour / 25.4),2));\n\t\t\t$this->SendDebug(\"Wunderground PWS Update\",\"Wunderground Upload Rain Last Hour: \".$Rain_last_Hour, 0);\n\n\t\t\t$responseUrl .= \"&rainin=\".$Rain_last_Hour;\n\t\t}\n\n\n\t\t// Prepare Rain 24h for upload\n\n\t\tIf ($this->ReadPropertyInteger(\"Rain24h\") != \"\" and IPS_VariableExists($this->ReadPropertyInteger(\"Rain24h\"))) {\n\t\t\t$Rain24h = GetValue($this->ReadPropertyInteger(\"Rain24h\"));\n\t\t\t$Rain24h = str_replace(\",\",\".\",Round(($Rain24h / 25.4),2));\n\t\t\t$this->SendDebug(\"Wunderground PWS Update\",\"Wunderground Upload Rain in 24h: \".$Rain24h, 0);\n\n\t\t\t$responseUrl .= \"&dailyrainin=\".$Rain24h;\n\t\t}\n\n\n\t\t// Prepare Airpressure for upload\n\n\t\tIf ($this->ReadPropertyInteger(\"AirPressure\") != \"\" and IPS_VariableExists($this->ReadPropertyInteger(\"AirPressure\"))) {\n\t\t\t$AirPressure = GetValue($this->ReadPropertyInteger(\"AirPressure\"));\n\t\t\t$BPI = str_replace(\",\",\".\",Round(($AirPressure * 0.0295299830714),4));\n\t\t\t$this->SendDebug(\"Wunderground PWS Update\",\"Wunderground Upload Airpressure in BPI: \".$AirPressure, 0);\n\n\t\t\t$responseUrl .= \"&baromin=\".$BPI;\n\t\t}\n\n\n\t\t// Prepare UV Index for upload\n\n\t\tIf ($this->ReadPropertyInteger(\"UVIndex\") != \"\" and IPS_VariableExists($this->ReadPropertyInteger(\"UVIndex\"))) {\n\t\t\t$UVIndex = GetValue($this->ReadPropertyInteger(\"UVIndex\"));\n\t\t\t$this->SendDebug(\"Wunderground PWS Update\",\"Wunderground Upload UV Index: \".$UVIndex, 0);\n\n\t\t\t$responseUrl .= \"&UV=\".$UVIndex;\n\t\t}\n\n\t\t// Prepare Solar Radiation for upload\n\n\t\tIf ($this->ReadPropertyInteger(\"SolarRadiation\") != \"\" and IPS_VariableExists($this->ReadPropertyInteger(\"SolarRadiation\"))) {\n\t\t\t$SolarRadiation = GetValue($this->ReadPropertyInteger(\"SolarRadiation\"));\n\t\t\t$this->SendDebug(\"Wunderground PWS Update\",\"Wunderground Upload Solar Radiation: \".$SolarRadiation, 0);\n\n\t\t\t$responseUrl .= \"&solarradiation=\".$SolarRadiation;\n\t\t}\n\n\t\t$Response =file_get_contents($responseUrl);\n\t\t$this->SendDebug(\"Wunderground PWS Update\",\"Wunderground Upload Service: \".$Response, 0);\n\n\t}", "title": "" }, { "docid": "d16d32440e89b8f31c0ca259c26f0400", "score": "0.48455313", "text": "public function update() {\r\n\t\t$this->_update();\r\n\t}", "title": "" }, { "docid": "0c697046c0f9a5a294bc2ae57e8301ff", "score": "0.48454946", "text": "function chdbtick_update_prediction_daily($company_id, $property_id,\n\t\t\t\t\t $lot_id, $today, $tomorrow) {\n $db_name = getenv('APPS_LPMS_TICKET_DB'); //print_r($db_name);\n if ($db_name == FALSE) {\n drupal_set_message(\"Missing HTTP environment for TICKET database!!!\", 'error');\n return 1;\n }\n // connect to SQLite database\n try {\n $db = new PDO(\"sqlite:\".$db_name);\n } catch(PDOException $e) {\n drupal_set_message($e->getMessage(), 'error');\n return 1;\n }\n // Query\n $sql = \"UPDATE prediction_table SET ModifyTime=CURRENT_TIMESTAMP,\";\n $sql .= sprintf(\"Today=%d,Tomorrow=%d\", $today, $tomorrow);\n $sql .= sprintf(\" WHERE CompanyId='%s' AND PropertyId='%s'\",\n\t\t $company_id, $property_id);\n $sql .= sprintf(\" AND LotId='%s'\", $lot_id);\n //drupal_set_message($sql);\n if (!$db->exec($sql)) {\n drupal_set_message(\"Not able to write to DB\", 'error');\n return 1;\n }\n return 0;\n}", "title": "" }, { "docid": "083ac8372135a538616ebd81e803febb", "score": "0.48341307", "text": "function db_update(){\r\n\t\tinclude('sql_start.php');\r\n\t\t$sql = \"UPDATE \".TBL_DEVICES.\" SET \";\r\n\t\tmysql_close();\r\n\t}", "title": "" }, { "docid": "4ff8834704187c478f0ed732b3a67ebf", "score": "0.48269945", "text": "function logger_rrd_update($meter, $values, $subdir = NULL) {\n\n $return = 0;\n $file_path = _logger_rrd_file($meter, $subdir);\n\n $command = RRDTOOL . \" update $file_path \";\n\n ksort($values);\n\n foreach($values as $timestamp => $value) {\n $command .= \" $timestamp:$value\";\n }\n\n system($command, $return);\n\n return $return;\n}", "title": "" }, { "docid": "3d5e0c12d892f99eab3b034cff3a2e60", "score": "0.48269373", "text": "public function updateDataProxy($data, $deviceID, $typeID) {\n\t\t$arr0 = (array)$data;\n\t\t$arr = $arr0['data'];\n\t\t\n\t\t$srcTable = \"Consulting.DC_scenarioDataProxy\"; \n\t\t\n\t\tfor ($j = 0; $j < count($arr); $j++) {\t\t\n\t\t\t$b =(array) $arr0['data'][$j]; // need to extend to more data points\n\t\t\tswitch ($b['indicatorID']) {\n\t\t\t\tcase 204:\n\t\t\t\t\t$col_namen = 'avg_number'; \t break;\n\t\t\t\tcase 205:\n\t\t\t\t\t$col_namen = 'pwr_DPP'; \t break;\n\t\t\t\tcase 206:\n\t\t\t\t\t$col_namen = 'battery_size'; break;\n\t\t\t};\t\t\t\n\t\t\t$stmnt = \"\n\t\t\t\tUPDATE \".$srcTable.\" sdp\n\t\t\t\tJOIN Consulting.DC_namesCountries nc\n\t\t\t\tON sdp.countryID = nc.\".$col_namen.\" \n\t\t\t\tSET\t\t\t\t\t\t\n\t\t\t\t\tY2004 = \".$b['Y2004'].\",\n\t\t\t\t\tY2005 = \".$b['Y2005'].\", Y2006 = \".$b['Y2006'].\", Y2007 = \".$b['Y2007'].\",\n\t\t\t\t\tY2008 = \".$b['Y2008'].\", Y2009 = \".$b['Y2009'].\", Y2010 = \".$b['Y2010'].\",\n\t\t\t\t\tY2011 = \".$b['Y2011'].\", Y2012 = \".$b['Y2012'].\", Y2013 = \".$b['Y2013'].\", \n\t\t\t\t\tY2014 = \".$b['Y2014'].\", Y2015 = \".$b['Y2015'].\", Y2016 = \".$b['Y2016'].\", \n\t\t\t\t\tY2017 = \".$b['Y2017'].\", Y2018 = \".$b['Y2018'].\", Y2019 = \".$b['Y2019'].\", \n\t\t\t\t\tY2020 = \".$b['Y2020'].\"\n\t\t\t\tWHERE scenarioID = \".$b['scenarioID'].\"\t\t\t\t\t\t\t\t\n\t\t\t\t\tAND indicatorID = \".$b['indicatorID'].\"\t\t\t\n\t\t\t\t\tAND deviceID = \".$deviceID.\"\t\t\t\t\t\n\t\t\t\t\tAND typeID = \".$typeID.\"\n\t\t\t\t\tAND nc.id = \".$b['countryID'].\";\";\t\t\t\n\t\t\n\t\t\t$result = $this->connection->prepare($stmnt);\n\t\t\t$result->execute();\t\n\t\t}\t\t\n\t\t//return true;\n\t\treturn $stmnt;\n\t}", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.48268628", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.48268628", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.48268628", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.48268628", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.48268628", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.48268628", "text": "public function update()\n {\n }", "title": "" }, { "docid": "d3ef88724734d24d90bcd424a02654b4", "score": "0.48173222", "text": "public function update($whoPharmarket)\n\t{\n\t}", "title": "" }, { "docid": "571ef04e0419f6ed70d6ffc5f3638431", "score": "0.48166695", "text": "public function get(): CurrentWeather;", "title": "" }, { "docid": "8c3d5f4ee5706122765c9699e64f2507", "score": "0.48129752", "text": "public function update()\n\t{\n\t}", "title": "" }, { "docid": "8c3d5f4ee5706122765c9699e64f2507", "score": "0.48129752", "text": "public function update()\n\t{\n\t}", "title": "" }, { "docid": "8c3d5f4ee5706122765c9699e64f2507", "score": "0.48129752", "text": "public function update()\n\t{\n\t}", "title": "" }, { "docid": "8c3d5f4ee5706122765c9699e64f2507", "score": "0.48129752", "text": "public function update()\n\t{\n\t}", "title": "" }, { "docid": "87b1179a22967f215829b378bc8af30d", "score": "0.4807599", "text": "public function update()\n\t{\t\t\n\t\t$this->updateStatuses();\n\t\t$this->updateCheckins();\n\t\t$this->updateEvents();\n\t\t$this->updateLikes();\n\t\t$this->updatePhotos();\n\t\t$this->updateVideos();\n\t}", "title": "" }, { "docid": "b7015b61298840518e30c8338251f1dd", "score": "0.479844", "text": "public function update()\n {\n \n }", "title": "" }, { "docid": "b7015b61298840518e30c8338251f1dd", "score": "0.479844", "text": "public function update()\n {\n \n }", "title": "" }, { "docid": "9c5997f7f93ad2c7dff8a8d18f3e2979", "score": "0.47955376", "text": "public function updateAction()\n {\n //unset($this->session->token);\n $t = new Catchpoint_Pull();\n\n $this->_helper->layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n\n $charts = new Application_Model_BenchmarkChartsMapper();\n $result = $charts->fetchAll();\n\n foreach ($result as $r) {\n $myArray[] = $t->fetchData('performance/favoriteCharts/'.$r->cid.'/data');\n\n $chart = new Application_Model_BenchmarkCharts(\n array(\n 'id' => $r->id,\n 'cid' => $r->cid,\n 'name' => $r->name,\n 'modified' => date('Y-m-d H:i:s'),\n ));\n\n $mapper = new Application_Model_BenchmarkChartsMapper();\n\n $mapper->save($chart);\n\n sleep(2);\n }\n\n $tests = array();\n\n foreach ($myArray as $m) {\n foreach ($m->summary->items as $a) {\n $tests[] = array(\n 'id' => $chart->cid,\n 'name' => $a->breakdown_1->name,\n 'dns' => round($a->synthetic_metrics[0] / 1000, 3),\n 'wait' => round($a->synthetic_metrics[1] / 1000, 3),\n 'load' => round($a->synthetic_metrics[2] / 1000, 3),\n 'bytes' => round($a->synthetic_metrics[3] / 1000000, 2),\n 'doc_complete' => round($a->synthetic_metrics[4] / 1000, 2),\n 'webpage_response' => round($a->synthetic_metrics[5] / 1000, 2),\n 'items' => round($a->synthetic_metrics[6], 0), );\n }\n }\n\n foreach ($tests as $t) {\n echo 'Updating '.$t['name'];\n $data = new Application_Model_BenchmarkData(\n array(\n 'chartId' => $t['id'],\n 'name' => $t['name'],\n 'dns' => $t['dns'],\n 'wait' => $t['wait'],\n 'load' => $t['load'],\n 'bytes' => $t['bytes'],\n 'docComplete' => $t['doc_complete'],\n 'webpageResponse' => $t['webpage_response'],\n 'items' => $t['items'],\n ));\n\n $mapper = new Application_Model_BenchmarkDataMapper();\n\n $mapper->update($data);\n }\n }", "title": "" }, { "docid": "e70b680d2337f7beceae29f18502b27f", "score": "0.4771124", "text": "public static function getForecast($filter, $unifiedConfig) {\n\n self::rec(\" fetching weather from forecast.io\");\n\n $latitude = val('latitude', $unifiedConfig);\n $longitude = val('longitude', $unifiedConfig);\n $units = val('units', $unifiedConfig);\n\n $apiUnits = 'auto';\n switch ($units) {\n case 'metric':\n $apiUnits = 'ca';\n break;\n\n case 'imperial':\n $apiUnits = 'us';\n break;\n }\n\n $host = val('host', $unifiedConfig);\n $key = val('key', $unifiedConfig);\n\n // Get filter-specific config settings\n $filterConfig = valr(\"filters.{$filter}\", $unifiedConfig);\n $path = val('path', $filterConfig);\n\n $path = formatString($path, [\n 'api' => $key,\n 'latitude' => $latitude,\n 'longitude' => $longitude\n ]);\n\n // Get new HttpClient\n $api = self::getClient();\n $api->setBaseUrl($host);\n\n $response = $api->get($path, [\n 'units' => $apiUnits\n ]);\n\n if ($response->isResponseClass('2xx')) {\n $weatherData = $response->getBody();\n\n $current = val('currently', $weatherData);\n $time = $current['time'];\n\n $minute = val('minutely', $weatherData);\n $hourly = val('hourly', $weatherData);\n\n $daily = val('daily', $weatherData);\n $today = $daily['data'][0];\n $sunRiseToday = $today['sunriseTime'];\n $sunSetTonight = $today['sunsetTime'];\n\n if ($time < $sunSetTonight) {\n if ($time > $sunRiseToday) {\n $timeOfDay = 'day';\n } else {\n $timeOfDay = 'night';\n }\n } else {\n $timeOfDay = 'night';\n }\n\n $summary = val('summary', $hourly);\n $minSummary = val('summary', $minute);\n\n $weather = array_merge($current, [\n 'sky' => $timeOfDay,\n 'summary' => rtrim($current['summary'], '.'),\n 'now' => rtrim($minSummary, '.'),\n 'today' => rtrim($summary, '.')\n ]);\n\n $round = [\n 'temperature' => 0,\n 'apparentTemperature' => 0,\n 'dewPoint' => 0,\n 'visibility' => 1\n ];\n foreach ($round as $roundKey => $roundPrecision) {\n $weather[$roundKey] = round($weather[$roundKey], $roundPrecision);\n }\n\n $percent = [\n 'humidity',\n 'cloudCover',\n 'precipProbability'\n ];\n foreach ($percent as $percentKey) {\n $weather[$percentKey] = round($weather[$percentKey] * 100, 0);\n }\n\n $temp = val('temperature', $weather);\n self::rec(\" {$temp} degrees C ({$weather['now']}, {$weather['today']})\");\n\n return $weather;\n } else {\n $errorBody = $response->getBody();\n $error = val('error', $errorBody, 'unknown error');\n self::rec(sprintf(\"failed to retrieve: %d (%s)\", $response->getStatusCode(), $error));\n }\n return false;\n }", "title": "" }, { "docid": "6c71ea73798ef35613a35270a64a34db", "score": "0.47687438", "text": "public function update($id, UpdatePowerStationRequest $request)\n {\n /** @var PowerStation $powerStation */\n $powerStation = PowerStation::find($id);\n\n if (empty($powerStation)) {\n Flash::error(__('messages.not_found', ['model' => __('models/powerStations.singular')]));\n\n return redirect(route('powerStations.index'));\n }\n\n\n\n $power= intval($request->installed_power);\n $value=$power/20;\n for($i=0; $i<20 ; $i++){\n Transaction::where(\"address\",$request->address)->update([\n \"quentity\" => $value,\n \"address\" => $request->wallet_address,\n \"period\" => $i+1\n ]);\n\n }\n $input = array_merge($request->all(),\n [\n \"vallet_id\" => 1,\n \"doc1\" => upload(\"doc1\"),\n \"doc2\" => upload(\"doc2\"),\n \"doc3\" => upload(\"doc3\"),\n \"doc4\" => upload(\"doc4\"),\n ]);\n $powerStation->fill($input);\n $powerStation->save();\n\n Flash::success(__('messages.updated', ['model' => __('models/powerStations.singular')]));\n\n return redirect(route('powerStations.index'));\n }", "title": "" }, { "docid": "1240b35b1afc2cd020332fae68df5eec", "score": "0.47648326", "text": "public function day(){\n \n $day = new Weathers_V2();\n \n $json = $day->weather_2345(\"http://tianqi.2345.com/api/partnerGetWeather.php\",\"上海\");\n Api::response($json);\n \n }", "title": "" }, { "docid": "8a7947e41acc6a2ee0dc0c357378c82f", "score": "0.4759651", "text": "function chdbtick_update_prediction_weekly($company_id, $property_id,\n\t\t\t\t\t $lot_id, $next_week) {\n $db_name = getenv('APPS_LPMS_TICKET_DB'); //print_r($db_name);\n if ($db_name == FALSE) {\n drupal_set_message(\"Missing HTTP environment for TICKET database!!!\", 'error');\n return 1;\n }\n // connect to SQLite database\n try {\n $db = new PDO(\"sqlite:\".$db_name);\n } catch(PDOException $e) {\n drupal_set_message($e->getMessage(), 'error');\n return 1;\n }\n // Query\n $sql = \"UPDATE prediction_table SET ModifyTime=CURRENT_TIMESTAMP,\";\n $sql .= sprintf(\"NextWeek=%d\", $next_week);\n $sql .= sprintf(\" WHERE CompanyId='%s' AND PropertyId='%s'\",\n\t\t $company_id, $property_id);\n $sql .= sprintf(\" AND LotId='%s'\", $lot_id);\n //drupal_set_message($sql);\n if (!$db->exec($sql)) {\n drupal_set_message(\"Not able to write to DB\", 'error');\n return 1;\n }\n return 0;\n}", "title": "" }, { "docid": "276cddfe8c4cdb288920a62564fd4179", "score": "0.47561675", "text": "function update() {\r\n \r\n }", "title": "" }, { "docid": "1d60b8ed7f9a9834370569e0cc21be7a", "score": "0.47538036", "text": "function getWeather($city, $state, $api_key, $options, $args) {\n\t\t// GeoPlugin Init\n\t\t$geoplugin = new geoPlugin();\n\t\t$geoplugin->locate('86.12.242.36'); // remove before going live\n\n\t\t// Check to see if GeoPlugin enabled\n\t\tif($options['use_geolocation']) {\n\t\t\t$city = $geoplugin->city;\n\t\t\t$state = $geoplugin->countryCode;\n\t\t}\n\n\t\tif($api_key) {\n\t\t\t// set up request url first\n\t\t\t$request_url = 'http://api.wunderground.com/api/' . $api_key . '/geolookup/conditions/forecast/q/' . $state . '/' . $city . '.json';\n\t\t\t// Check cache for url\n\t\t\t$json_current_weather = get_transient($request_url);\n\t\t\t// If not in case, make request\n\t\t\tif($json_current_weather === false) {\n\t\t\t\techo 'api request not cached, making new request.';\n\t\t\t\t$json_current_weather = file_get_contents($request_url);\n\t\t\t\tset_transient($request_url, $json_current_weather, $options['cache_expire']);\n\t\t\t}\n\t\t\t// Parse request\n\t\t\t$parsed_json = json_decode($json_current_weather);\n\n\t\t\t// Get Current Observations And Location\n\t\t\t$location = $parsed_json->{'location'}->{'city'} . ', ' . $parsed_json->{'location'}->{'country_name'};\n\t\t\t$weather = $parsed_json->{'current_observation'}->{'weather'};\n\t\t\t$icon = $parsed_json->{'current_observation'}->{'icon'};\n\t\t\t$temp_f = $parsed_json->{'current_observation'}->{'temp_f'};\n\t\t\t$feelslike_f = $parsed_json->{'current_observation'}->{'feelslike_f'};\n\t\t\t$temp_c = $parsed_json->{'current_observation'}->{'temp_c'};\n\t\t\t$feelslike_c = $parsed_json->{'current_observation'}->{'feelslike_c'};\n\t\t\t$relative_humidity = $parsed_json->{'current_observation'}->{'relative_humidity'};\n\n\t\t\t// Get Next 3 Day Forecast\n\t\t\t$threeDayForecast = $parsed_json->{'forecast'}->{'simpleforecast'}->{'forecastday'};\n\t\t\t// Don't need todays forecast, so start at [1]\n\t\t\t$forecastOne['day'] = $threeDayForecast[1]->{'date'}->{'day'};\n\t\t\t$forecastOne['month'] = $threeDayForecast[1]->{'date'}->{'monthname_short'};\n\t\t\t$forecastOne['temp_high_f'] = $threeDayForecast[1]->{'high'}->{'fahrenheit'};\n\t\t\t$forecastOne['temp_high_c'] = $threeDayForecast[1]->{'high'}->{'celsius'};\n\t\t\t$forecastOne['temp_low_f'] = $threeDayForecast[1]->{'low'}->{'fahrenheit'};\n\t\t\t$forecastOne['temp_low_c'] = $threeDayForecast[1]->{'low'}->{'celsius'};\n\t\t\t$forecastOne['icon'] = $threeDayForecast[1]->{'icon'};\n\n\t\t\t$forecastTwo['day'] = $threeDayForecast[2]->{'date'}->{'day'};\n\t\t\t$forecastTwo['month'] = $threeDayForecast[2]->{'date'}->{'monthname_short'};\n\t\t\t$forecastTwo['temp_high_f'] = $threeDayForecast[2]->{'high'}->{'fahrenheit'};\n\t\t\t$forecastTwo['temp_high_c'] = $threeDayForecast[2]->{'high'}->{'celsius'};\n\t\t\t$forecastTwo['temp_low_f'] = $threeDayForecast[2]->{'low'}->{'fahrenheit'};\n\t\t\t$forecastTwo['temp_low_c'] = $threeDayForecast[2]->{'low'}->{'celsius'};\n\t\t\t$forecastTwo['icon'] = $threeDayForecast[2]->{'icon'};\n\n\t\t\t$forecastThree['day'] = $threeDayForecast[3]->{'date'}->{'day'};\n\t\t\t$forecastThree['month'] = $threeDayForecast[3]->{'date'}->{'monthname_short'};\n\t\t\t$forecastThree['temp_high_f'] = $threeDayForecast[3]->{'high'}->{'fahrenheit'};\n\t\t\t$forecastThree['temp_high_c'] = $threeDayForecast[3]->{'high'}->{'celsius'};\n\t\t\t$forecastThree['temp_low_f'] = $threeDayForecast[3]->{'low'}->{'fahrenheit'};\n\t\t\t$forecastThree['temp_low_c'] = $threeDayForecast[3]->{'low'}->{'celsius'};\n\t\t\t$forecastThree['icon'] = $threeDayForecast[3]->{'icon'};\n\t\t\t?>\n\t\t\t<div class=\"city-weather\" style=\"background-image: url(<?php echo plugins_url() . '/city-weather-report/img/' . ${icon} . '.png'; ?>); background-size: contain; background-repeat: no-repeat; background-position: center top;\">\n\t\t\t\t<?php\n\t\t\t\t\techo $args['before_title'];\n\t\t\t\t\techo ${location};\n\t\t\t\t\techo $args['after_title']; ?>\n\t\t\t\t<?php if($options['temp_type'] == 'Fahrenheit') : ?>\n\t\t\t\t\t<h1><?php echo ${temp_f}; ?>°F</h1>\n\t\t\t\t<?php elseif($options['temp_type'] == 'Celsius') : ?>\n\t\t\t\t\t<h1><?php echo ${temp_c}; ?>°C</h1>\n\t\t\t\t<?php elseif($options['temp_type'] == 'Both') : ?>\n\t\t\t\t\t<h1><?php echo ${temp_f}; ?>°F / <?php echo ${temp_c}; ?>°C</h1>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t<!--\t\t\t\t<img src=\"--><?php //echo plugins_url() . '/city-weather-report/img/' . ${icon} . '.png'; ?><!--\" alt=\"--><?php //echo ${weather}; ?><!--\"> --><?php //echo ${weather}; ?>\n\t\t\t\t<?php if($options['show_realfeel']) : ?>\n\t\t\t\t\t<div class=\"wcr-realfeel\">\n\t\t\t\t\t\t<strong>Feels Like <?php echo ${feelslike_c}; ?>°C</strong>\n\t\t\t\t\t</div>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t<?php if($options['show_humidity']) : ?>\n\t\t\t\t\t<div class=\"wcr-humidity\">\n\t\t\t\t\t\t<strong>Relative Humidity: <?php echo ${relative_humidity}; ?></strong>\n\t\t\t\t\t</div>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t<?php if($options['show_forecast']) : ?>\n\t\t\t\t\t<!-- Show 3 Day Forecast -->\n\t\t\t\t\t<div class=\"row forecast\">\n\t\t\t\t\t\t<div class=\"col-xs-12\">\n\t\t\t\t\t\t\t<div class=\"col-xs-4 day\">\n\t\t\t\t\t\t\t\t<?php echo $forecastOne['day']; ?> <?php echo $forecastOne['month']; ?>\n\t\t\t\t\t\t\t\t<div class=\"col-xs-12\">\n\t\t\t\t\t\t\t\t\t<img src=\"<?php echo plugins_url() . '/city-weather-report/img/' . $forecastOne['icon'] . '.png'; ?>\" alt=\"\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low\">High</div>\n\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low\">Low</div>\n\n\t\t\t\t\t\t\t\t\t<?php if($options['temp_type'] == 'Fahrenheit') : ?>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\"><?php echo $forecastOne['temp_high_f']; ?>°F</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\"><?php echo $forecastOne['temp_low_f']; ?>°F</div>\n\t\t\t\t\t\t\t\t\t<?php elseif($options['temp_type'] == 'Celsius') : ?>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\"><?php echo $forecastOne['temp_high_c']; ?>°C</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\"><?php echo $forecastOne['temp_low_c']; ?>°C</div>\n\t\t\t\t\t\t\t\t\t<?php elseif($options['temp_type'] == 'Both') : ?>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\">\n\t\t\t\t\t\t\t\t\t\t\t<?php echo $forecastOne['temp_high_c']; ?>°C<br>\n\t\t\t\t\t\t\t\t\t\t\t<?php echo $forecastOne['temp_high_f']; ?>°F\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\">\n\t\t\t\t\t\t\t\t\t\t\t<?php echo $forecastOne['temp_low_c']; ?>°C<br>\n\t\t\t\t\t\t\t\t\t\t\t<?php echo $forecastOne['temp_low_f']; ?>°F\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-xs-4 day\">\n\t\t\t\t\t\t\t\t<?php echo $forecastTwo['day']; ?> <?php echo $forecastTwo['month']; ?>\n\t\t\t\t\t\t\t\t<div class=\"col-xs-12\">\n\t\t\t\t\t\t\t\t\t<img src=\"<?php echo plugins_url() . '/city-weather-report/img/' . $forecastTwo['icon'] . '.png'; ?>\" alt=\"\">\n\t\t\t\t\t\t\t\t</div>\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-xs-6 cwr-high-low\">High</div>\n\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low\">Low</div>\n\n\n\t\t\t\t\t\t\t\t\t<?php if($options['temp_type'] == 'Fahrenheit') : ?>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\"><?php echo $forecastTwo['temp_high_f']; ?>°F</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\"><?php echo $forecastTwo['temp_low_f']; ?>°F</div>\n\t\t\t\t\t\t\t\t\t<?php elseif($options['temp_type'] == 'Celsius') : ?>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\"><?php echo $forecastTwo['temp_high_c']; ?>°C</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\"><?php echo $forecastTwo['temp_low_c']; ?>°C</div>\n\t\t\t\t\t\t\t\t\t<?php elseif($options['temp_type'] == 'Both') : ?>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\">\n\t\t\t\t\t\t\t\t\t\t\t<?php echo $forecastTwo['temp_high_c']; ?>°C<br>\n\t\t\t\t\t\t\t\t\t\t\t<?php echo $forecastTwo['temp_high_f']; ?>°F\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\">\n\t\t\t\t\t\t\t\t\t\t\t<?php echo $forecastTwo['temp_low_c']; ?>°C<br>\n\t\t\t\t\t\t\t\t\t\t\t<?php echo $forecastTwo['temp_low_f']; ?>°F\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-xs-4 day\">\n\t\t\t\t\t\t\t\t<?php echo $forecastThree['day']; ?> <?php echo $forecastThree['month']; ?>\n\t\t\t\t\t\t\t\t<div class=\"col-xs-12\">\n\t\t\t\t\t\t\t\t\t<img src=\"<?php echo plugins_url() . '/city-weather-report/img/' . $forecastThree['icon'] . '.png'; ?>\" alt=\"\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low\">High</div>\n\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low\">Low</div>\n\n\t\t\t\t\t\t\t\t\t<?php if($options['temp_type'] == 'Fahrenheit') : ?>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\"><?php echo $forecastThree['temp_high_f']; ?>°F</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\"><?php echo $forecastThree['temp_low_f']; ?>°F</div>\n\t\t\t\t\t\t\t\t\t<?php elseif($options['temp_type'] == 'Celsius') : ?>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\"><?php echo $forecastThree['temp_high_c']; ?>°C</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\"><?php echo $forecastThree['temp_low_c']; ?>°C</div>\n\t\t\t\t\t\t\t\t\t<?php elseif($options['temp_type'] == 'Both') : ?>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\">\n\t\t\t\t\t\t\t\t\t\t\t<?php echo $forecastThree['temp_high_c']; ?>°C<br>\n\t\t\t\t\t\t\t\t\t\t\t<?php echo $forecastThree['temp_high_f']; ?>°F\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-xs-6 cwr-high-low-data\">\n\t\t\t\t\t\t\t\t\t\t\t<?php echo $forecastThree['temp_low_c']; ?>°C<br>\n\t\t\t\t\t\t\t\t\t\t\t<?php echo $forecastThree['temp_low_f']; ?>°F\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t<?php endif; ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t} else {\n\t\t\t?>\n\t\t\t<div class=\"city-weather\">\n\t\t\t\t<h3>No API Key Found</h3>\n\t\t\t\t<p>Please register for a free api key at <a href=\"http://www.wunderground.com\">www.wunderground.com</a> and update your settings.</p>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}", "title": "" }, { "docid": "727fbf601a92813d2373e54ab2861f47", "score": "0.47442633", "text": "public function run()\n {\n //\n\n $data =[\n [\n 'name'=>'Hot',\n 'min_grades'=>35,\n 'max_grades'=>40\n ],\n [\n 'name'=>'Warm',\n 'min_grades'=>24,\n 'max_grades'=>34\n ],\n [\n 'name'=>'Sunny',\n 'min_grades'=>18,\n 'max_grades'=>23\n ],\n [\n 'name'=>'Cold',\n 'min_grades'=>0,\n 'max_grades'=>27\n ],\n\n ];\n\n\n foreach ($data as $weather){\n Weather::create($weather);\n }\n\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.47373843", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.47373843", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.47373843", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "7cfb48e946df75ba52ca9e393b86827c", "score": "0.47305423", "text": "public function actionWeather() {\n $nw = new \\common\\components\\noaaWeather();\n $nw->loadData();\n return $this->render('weather', [\n 'nw' => $nw,\n ]);\n }", "title": "" }, { "docid": "fd56ad7e193f5485f2ba9868f3b3d8b9", "score": "0.4727276", "text": "public function UpdateDataForScreens(UpdateDataForScreens $parameters) {\n return $this->__soapCall('UpdateDataForScreens', array($parameters), array(\n 'uri' => 'http://mdtoolboxrx.com/',\n 'soapaction' => ''\n )\n );\n }", "title": "" }, { "docid": "ff4b6355a19b8018ac9e99c3304868db", "score": "0.47210506", "text": "public function aaiGetAirportWeather($airport_name) {\n $airport_name = ucwords($airport_name);\n $airport_iata = $this->aaiGetAirportTermDetails($airport_name, array('field_airport_code'));\n $airport_iata = 'JAI'; //strtoupper($airport_iata['field_airport_code']);\n\n // check if airport weather detail exists in cache\n $cache_weather_data = cache_get('aaiAirportWeather:'.$airport_iata);\n\n // if data is not cached or expires\n if (!$cache_weather_data || (time() > $cache_weather_data->expire)) {\n // get airport LAT LONG\n $aai_airports = unserialize(variable_get('airport_codes'));\n $current_airport_data = $aai_airports[$airport_iata];\n $airport_lat = $current_airport_data['lat'];\n $airport_lng = $current_airport_data['lng'];\n\n $weather_api_key = variable_get('weather_api_key');\n $weather_url = variable_get('weather_api_url');\n\n $url = $weather_url . \"/lat=$airport_lat&lon=$airport_lng&APPID=$weather_api_key&units=metric\";\n $connect = curl_init();\n // Set URL and other appropriate options.\n curl_setopt($connect, CURLOPT_URL, $url);\n curl_setopt($connect, CURLOPT_RETURNTRANSFER, TRUE);\n // Grab URL and pass it to the browser.\n $result_json = curl_exec($connect);\n $weather_data = json_decode($result_json);\n \n // temporary weather data\n $weather_data = json_decode('{\"coord\":{\"lon\":77.22,\"lat\":28.63},\"weather\":[{\"id\":741,\"main\":\"Fog\",\"description\":\"fog\",\"icon\":\"50d\"}],\"base\":\"stations\",\"main\":{\"temp\":17.62,\"pressure\":1020,\"humidity\":93,\"temp_min\":15,\"temp_max\":20},\"visibility\":350,\"wind\":{\"speed\":1.5,\"deg\":270},\"clouds\":{\"all\":0},\"dt\":1480656600,\"sys\":{\"type\":1,\"id\":7809,\"message\":0.0062,\"country\":\"IN\",\"sunrise\":1480642048,\"sunset\":1480679628},\"id\":1273840,\"name\":\"Connaught Place\",\"cod\":200}');\n\n // set expiry time for cache\n $expire = time() + (60*60*2);\n\n // cache airport weather data\n cache_set('aaiAirportWeather:'.$airport_iata, $weather_data, 'cache', $expire);\n\n // watchdog entry\n $this->aaiWatchdog(\"New weather data cache set for $airport_name | $airport_iata\", WATCHDOG_INFO);\n return $weather_data;\n }\n\n return $cache_weather_data;\n }", "title": "" }, { "docid": "42eaa777da4b778d2619bac2283d652d", "score": "0.47193834", "text": "public function getCurrentWeather($where, $event)\n {\n if (!$found = $this->getLatLongForLocation($where)) {\n $this->addLatLongError($event);\n return;\n }\n\n try {\n list($lat, $long) = $found;\n $forecast = $this->darksky->getBriefForecast($lat, $long);\n\n $event->addResponse(\n Response::msg(\n $event->getRequest()->getSource(),\n sprintf('[Weather for %s] Currently: %s, %s degrees. For the next hour: %s',\n $where,\n $forecast['currentSummary'],\n $forecast['currentTemp'],\n $forecast['hourSummary']\n )\n )\n );\n } catch (\\Exception $ex) {\n $this->addErrorMsg($event, \"Oops, I'm unable to get the weather for that location...\");\n return;\n }\n }", "title": "" }, { "docid": "e74bd64798f4db81407f6154a27a0dd2", "score": "0.4718754", "text": "public function Statistics()\n\t{\n\t\t// Roomlog records\n\t\t$obj = $this->Database->prepare(\"DROP TABLE IF EXISTS THRoomlog\")->execute();\n\t\t$obj = $this->Database->prepare(\"CREATE TABLE THRoomlog SELECT pid, YEAR(FROM_UNIXTIME(tstamp)) as year, MONTH(FROM_UNIXTIME(tstamp)) as month, DAY(FROM_UNIXTIME(tstamp)) as day, HOUR(FROM_UNIXTIME(tstamp)) as hour,\n\t\t\t\t\t\t\t\t\t\t\tMax(tstamp) as tstamp,\n\t\t\t\t\t\t\t\t\t\t\tround(avg(light),0) as light,\n\t\t\t\t\t\t\t\t\t\t\tround(avg(humidity),0) as humidity,\n\t\t\t\t\t\t\t\t\t\t\tround(avg(temp),1) as temp\n\t\t\t\t\t\t\t\t\t\t\tfrom Roomlog GROUP BY pid, year, month, day, hour\")->execute();\n\n // Replace into table, but only data that is recent (i.e. within last week), to avoid overwriting old averages\n // but also exclude data that is less than an hour (or day) old, otherwise duplicate timestamp entries will be inserted\n // this counts for all\n\t\t$obj = $this->Database->prepare(\"REPLACE INTO HourlyRoomlog\n\t\t SELECT pid, year, month, day, hour, tstamp, light, humidity, temp\n\t\t\t\t\t\t\t\t\t\t\tFROM THRoomlog WHERE tstamp > UNIX_TIMESTAMP()-604800 AND tstamp < UNIX_TIMESTAMP()-3600\")->execute();\n\n // Same for daily room log\n\t\t$obj = $this->Database->prepare(\"DROP TABLE IF EXISTS TDRoomlog\")->execute();\n\t\t$obj = $this->Database->prepare(\"CREATE TABLE TDRoomlog SELECT pid, YEAR(FROM_UNIXTIME(tstamp)) as year, MONTH(FROM_UNIXTIME(tstamp)) as month, DAY(FROM_UNIXTIME(tstamp)) as day,\n\t\t\t\t\t\t\t\t\t\t\tMax(tstamp) as tstamp,\n\t\t\t\t\t\t\t\t\t\t\tround(avg(light),0) as light,\n\t\t\t\t\t\t\t\t\t\t\tround(avg(humidity),0) as humidity,\n\t\t\t\t\t\t\t\t\t\t\tround(avg(temp),1) as temp,\n\t\t\t\t\t\t\t\t\t\t\tMax(temp) as hitemp,\n\t\t\t\t\t\t\t\t\t\t\tMin(temp) as lowtemp\n\t\t\t\t\t\t\t\t\t\t\tfrom Roomlog GROUP BY pid, year, month, day\")->execute();\n\n // Replace into table, but only data that is recent (i.e. within last week), to avoid overwriting old averages\n\t\t$obj = $this->Database->prepare(\"REPLACE INTO DailyRoomlog\n\t\t SELECT pid, year, month, day, tstamp, light, humidity, temp, hitemp, lowtemp\n\t\t\t\t\t\t\t\t\t\t\tFROM TDRoomlog WHERE tstamp > UNIX_TIMESTAMP()-604800 AND tstamp < UNIX_TIMESTAMP()-3600*24\")->execute();\n\n\n // Delete older Roomlog records (over 31 days old)\n\t\t$obj = $this->Database->prepare(\"DELETE FROM Roomlog WHERE tstamp < UNIX_TIMESTAMP()-2678400\")->execute();\t\t\n\t\t// And drop the table to preserve space\n\t\t$obj = $this->Database->prepare(\"DROP TABLE IF EXISTS THRoomlog\")->execute();\n\t\t$obj = $this->Database->prepare(\"DROP TABLE IF EXISTS TDRoomlog\")->execute();\n\n\n\t\t// Sensor records\n\t\t$obj = $this->Database->prepare(\"DROP TABLE IF EXISTS THSensorlog\")->execute();\n\t\t$obj = $this->Database->prepare(\"CREATE TABLE THSensorlog SELECT pid, YEAR(FROM_UNIXTIME(tstamp)) as year, MONTH(FROM_UNIXTIME(tstamp)) as month, DAY(FROM_UNIXTIME(tstamp)) as day, HOUR(FROM_UNIXTIME(tstamp)) as hour,\n\t\t\t\t\t\t\t\t\t\t\tMax(tstamp) as tstamp,\n\t\t\t\t\t\t\t\t\t\t\tround(avg(value),2) as value\n\t\t\t\t\t\t\t\t\t\t\tfrom Sensorlog GROUP BY pid, year, month, day, hour\")->execute();\n\n // Replace into table, but only data that is recent (i.e. within last week), to avoid overwriting old averages\n\t\t$obj = $this->Database->prepare(\"REPLACE INTO HourlySensorlog\n\t\t SELECT pid, year, month, day, hour, tstamp, value\n \t\t\t\t\t\t\t\t\t\t\tFROM THSensorlog WHERE tstamp > UNIX_TIMESTAMP()-604800 AND tstamp < UNIX_TIMESTAMP()-3600\")->execute();\n\n\t\t$obj = $this->Database->prepare(\"DROP TABLE IF EXISTS TDSensorlog\")->execute();\n\t\t$obj = $this->Database->prepare(\"CREATE TABLE TDSensorlog SELECT pid, YEAR(FROM_UNIXTIME(tstamp)) as year, MONTH(FROM_UNIXTIME(tstamp)) as month, DAY(FROM_UNIXTIME(tstamp)) as day,\n\t\t\t\t\t\t\t\t\t\t\tMax(tstamp) as tstamp,\n\t\t\t\t\t\t\t\t\t\t\tround(avg(value),2) as value,\n\t\t\t\t\t\t\t\t\t\t\tMax(value) as hivalue,\n\t\t\t\t\t\t\t\t\t\t\tMin(value) as lowvalue\n\t\t\t\t\t\t\t\t\t\t\tfrom Sensorlog GROUP BY pid, year, month, day\")->execute();\n\t\t\t\t\t\t\t\t\t\t\t\n // Replace into table, but only data that is recent (i.e. within last week), to avoid overwriting old averages\n\t\t$obj = $this->Database->prepare(\"REPLACE INTO DailySensorlog\n\t\t SELECT pid, year, month, day, tstamp, value, hivalue, lowvalue\n\t\t\t\t\t\t\t\t\t\t\tFROM TDSensorlog WHERE tstamp > UNIX_TIMESTAMP()-604800 AND tstamp < UNIX_TIMESTAMP()-3600*24\")->execute();\n\n\n\t\t// Electricity records\n\t\t$obj = $this->Database->prepare(\"DROP TABLE IF EXISTS THEleclog\")->execute();\n\t\t$obj = $this->Database->prepare(\"CREATE TABLE THEleclog SELECT YEAR(FROM_UNIXTIME(tstamp)) as year, MONTH(FROM_UNIXTIME(tstamp)) as month, DAY(FROM_UNIXTIME(tstamp)) as day, HOUR(FROM_UNIXTIME(tstamp)) as hour,\n\t\t\t\t\t\t\t\t\t\t\tMax(tstamp) as tstamp,\n\t\t\t\t\t\t\t\t\t\t\tSum(count) as value\n\t\t\t\t\t\t\t\t\t\t\tfrom Sensorlog \n\t\t\t\t\t\t\t\t\t\t\tWHERE pid=8 GROUP BY year, month, day, hour\")->execute();\n // Replace into table, but only data that is recent (i.e. within last week), to avoid overwriting old averages\n\t\t$obj = $this->Database->prepare(\"REPLACE INTO HourlyEleclog\n\t\t SELECT year, month, day, hour, tstamp, value\n \t\t\t\t\t\t\t\t\t\t\tFROM THEleclog WHERE tstamp > UNIX_TIMESTAMP()-604800 AND tstamp < UNIX_TIMESTAMP()-3600\")->execute();\n\n\n\t\t$obj = $this->Database->prepare(\"DROP TABLE IF EXISTS TDEleclog\")->execute();\n\t\t$obj = $this->Database->prepare(\"CREATE TABLE TDEleclog SELECT YEAR(FROM_UNIXTIME(tstamp)) as year, MONTH(FROM_UNIXTIME(tstamp)) as month, DAY(FROM_UNIXTIME(tstamp)) as day,\n\t\t\t\t\t\t\t\t\t\t\tMax(tstamp) as tstamp,\n\t\t\t\t\t\t\t\t\t\t\tSum(value) as value\n\t\t\t\t\t\t\t\t\t\t\tfrom HourlyEleclog \n\t\t\t\t\t\t\t\t\t\t\tGROUP BY year, month, day\")->execute();\n // Replace into table, but only data that is recent (i.e. within last week), to avoid overwriting old averages\n\t\t$obj = $this->Database->prepare(\"REPLACE INTO DailyEleclog\n\t\t SELECT year, month, day, tstamp, value\n\t\t\t\t\t\t\t\t\t\t\tFROM TDEleclog WHERE tstamp > UNIX_TIMESTAMP()-604800 AND tstamp < UNIX_TIMESTAMP()-3600*24\")->execute();\n\t\t\t\t\t\t\t\t\t\t\t\n // Delete older Roomlog records (over 31 days old)\n\t\t$obj = $this->Database->prepare(\"DELETE FROM Sensorlog WHERE tstamp < UNIX_TIMESTAMP()-2678400\")->execute();\t\t\n\t\t// And drop the table to preserve space\t\t\t\t\t\t\t\t\t\t\n\t\t$obj = $this->Database->prepare(\"DROP TABLE IF EXISTS THSensorlog\")->execute();\n\t\t$obj = $this->Database->prepare(\"DROP TABLE IF EXISTS TDSensorlog\")->execute();\n\t\t$obj = $this->Database->prepare(\"DROP TABLE IF EXISTS THEleclog\")->execute();\n\t\t$obj = $this->Database->prepare(\"DROP TABLE IF EXISTS TDEleclog\")->execute();\n\n\t\t// Delete old motion logs (over a week old)\n\t\t$obj = $this->Database->prepare(\"DELETE FROM Motionlog WHERE tstamp < UNIX_TIMESTAMP()-604800\")->execute();\t\t\n\n // Here's a set of queries to clean them all up\n /* \n DELETE FROM DailyEleclog WHERE tstamp > UNIX_TIMESTAMP()-3600*24;\n DELETE FROM DailyRoomlog WHERE tstamp > UNIX_TIMESTAMP()-3600*24;\n DELETE FROM DailySensorlog WHERE tstamp > UNIX_TIMESTAMP()-3600*24;\n DELETE FROM HourlyEleclog WHERE tstamp > UNIX_TIMESTAMP()-3600*24;\n DELETE FROM HourlyRoomlog WHERE tstamp > UNIX_TIMESTAMP()-3600*24;\n DELETE FROM HourlySensorlog WHERE tstamp > UNIX_TIMESTAMP()-3600*24;\n */\n\n\t}", "title": "" }, { "docid": "9ae8811779eceb42e8c77a6972c9da71", "score": "0.47172087", "text": "public function updateHoverMeasurement()\n {\n try {\n $measurementId = Request::get('measurement_id');\n $filePath = config('jp.BASE_PATH').'hover_reports/1549358486_1763812421_reports.pdf';\n $measurement = $this->service->getMeasurementById($measurementId);\n $data = $this->service->updateHoverMeasurement($measurement, $filePath);\n return ApiResponse::success([\n 'message' => trans('response.success.updated',['attribute' => 'Measurement'])\n ]);\n } catch (\\Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "11451838ef40878361c79589c559f9b8", "score": "0.4710462", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\", lastname=\\\"$this->lastname\\\", cellphone=\\\"$this->cellphone\\\", client_id=$this->client_id, city_id=$this->city_id where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "e20f7ffa93c20aa3210fe5c5154df3c7", "score": "0.47099543", "text": "function updateUserDashboardStats() {\n\n //get most recent time program initiation segment was saved\n\n //get most recently saved program initiation segment\n\n //get pending program initiations\n\n //get attempted program initiations\n\n //get current user session details\n\n}", "title": "" }, { "docid": "35fd78a33791613c1350bd947850dc97", "score": "0.47084185", "text": "private function doUpdatePing(): void\n {\n\n $pkt = MineceitUtil::constructCustomPkt([\"GetPing\", $this->getName()]);\n RequestPool::addRequest(Request::TYPE_PING, $this, $pkt->buffer, function ($data, $uuid) {\n if (($player = MineceitUtil::getPlayerFromUUID($uuid)) != null && $player instanceof MineceitPlayer) {\n $player->completePingUpdate($data['ping']);\n }\n });\n $this->dataPacket($pkt);\n }", "title": "" }, { "docid": "6125e22f0eabb24076a449e878125426", "score": "0.4706309", "text": "protected function update(){\n\t}", "title": "" }, { "docid": "6125e22f0eabb24076a449e878125426", "score": "0.4706309", "text": "protected function update(){\n\t}", "title": "" }, { "docid": "9f65fcc584474b921fbb5701393f0f1f", "score": "0.4706089", "text": "public function process_device() {\n\n\t\t//read device first, so as to delay anything cpu intensive\n\t\t$data= $this->read_device(); \t\n\t\tif (!$data) $this->code= 1;\n\t\telse {\n\t\t\t//now get the day's periodic data \n\t\t\t$this->read_dbase();\n\n\t\t\t//then add the fresh sample to the dp data\n\t\t\t$this->datetimes['current_value']= $this->datetime;\n\t\t\t$this->datetimes['periodic'][]= $this->datetime;\n\t\t\tif (!in_array(date(\"Y-m-d\"), $this->datetimes['day'])) $this->datetimes['day'][]= date(\"Y-m-d\", strtotime($this->datetime)); \n\t\t\tforeach ($this->datapoints as $label=> $datapoint) {\n\t\t\t\tif (isset($data[$label]) and count($data[$label])) $datapoint->append($data[$label]);\t\t\n\t\t\t}\n\n\t\t\t//finally do the derivations\n\t\t\t$this->calc_derived();\n\t\t\t\n\t\t\t//mark done\n\t\t\t$this->device_has_been_read= true;\n\t\t}\n\t\t\n\t\t//store all permanently\n\t\t$this->write_dbase();\n\t\t\n\t\treturn !$this->code;\n\t}", "title": "" }, { "docid": "5c80faac416bc253e48588a57b6ccad4", "score": "0.47023377", "text": "public function update_charter() {\n\t\t$this->security('create_new_charter',$_SESSION['user_typeID']);\n\n\t\t$start_date = date(\"Ymd\", strtotime($_POST['charter_date']));\n\t\t$sql = \"UPDATE `charters` SET `nights` = '$_POST[nights]', `start_date` = '$start_date', `statusID` = '$_POST[status]', `status_commentID` = '$_POST[status_commentID]',\n\t\t`destinationID` = '$_POST[destinationID]', `overriding_comment` = '$_POST[overriding_comment]', `itinerary` = '$_POST[itinerary]',\n\t\t`destination` = '$_POST[destination]', `embarkment` = '$_POST[embarkment]', `disembarkment` = '$_POST[disembarkment]', `group1` = '$_POST[group1]',\n\t\t`group2` = '$_POST[group2]', `add_on_price_commissionable` = '$_POST[add_on_price_commissionable]', `add_on_price` = '$_POST[add_on_price]'\n\t\tWHERE `charterID` = '$_POST[charterID]'\";\n\n $result = $this->new_mysql($sql);\n if ($result == \"true\") {\n print '<div class=\"alert alert-success\">The charter was updated. Loading please wait...</div>';\n ?>\n <script>\n setTimeout(function() {\n\t\t\t\twindow.location.replace('/locate_charter')\n }\n ,3000);\n </script>\n <?php\n } else {\n\t\t\tprint '<div class=\"alert alert-success\">The charter failed to update.</div>';\n\t\t\tprint \"<br><font color=red>SQL Query:<br><pre>$sql</pre>\";\n }\n\t}", "title": "" }, { "docid": "84bc910efa1aef404d231347172d9b25", "score": "0.4696268", "text": "function updateComputer($data) {\r\n\r\n\t$this->query('UPDATE computers SET `modified` = CURRENT_TIMESTAMP(), `name` = \"'. $data['name'] .'\", `type` = \"'. $data['type'] .'\", \r\n\t\t\t\t `serial_number` = \"'. $data['serial_number'] .'\", `operating_system` = \"'. $data['operating_system'] .'\", `memory` = '. $data['memory'] .', \r\n\t\t\t\t `hdd_space` = \"'. $data['hdd_space'] .'\", `processor` = \"'. $data['processor'] .'\" WHERE id = '. $data['id'] .';');\r\n\r\n\r\n\t}", "title": "" } ]
a2ef13ac5bfc2e725ec74bac887a2b9a
Check whether a session variable is set in an application context
[ { "docid": "beb731307add31ba39dbdfff0c95ce2e", "score": "0.0", "text": "public function has($index)\n {\n return isset(self::$sessionStorage[$index]);\n }", "title": "" } ]
[ { "docid": "66958d0548bb9acee70ea241e681e245", "score": "0.73473305", "text": "public function hasSessionParameters();", "title": "" }, { "docid": "fcd435b607e8a0ae64726dba6b9ae859", "score": "0.73157036", "text": "function has_session(){\n return (!empty($_SESSION['app_session']) && !empty($_SESSION['app_session']['user_id']));\n }", "title": "" }, { "docid": "9b29732959ff9636d0799071d867712a", "score": "0.7189287", "text": "public function hasSession() {\n return FALSE; // XXX \n }", "title": "" }, { "docid": "ff43507f9ae91d07ce86d5caa2cbbdb7", "score": "0.71519405", "text": "public function hasSession();", "title": "" }, { "docid": "26926b66affa0fc39930a5a28109bde5", "score": "0.7149066", "text": "public function hasSession() {}", "title": "" }, { "docid": "fc0e0ad30e4deaa1467c22c4638282bd", "score": "0.7135308", "text": "function exponent_sessions_isset($var) {\n\treturn isset($_SESSION[SYS_SESSION_KEY]['vars'][$var]);\n}", "title": "" }, { "docid": "3986e30758eb6c46b7e88f4bbc45d2e7", "score": "0.7048938", "text": "function checkSession(){\n return isset($_SESSION['userId']);\n }", "title": "" }, { "docid": "9b87eb8f319d3eb648fa34ffbe71a160", "score": "0.7029692", "text": "public function existsSession(){\n\t//\techo self::SESSION_VAR;\n\t\treturn isset($_SESSION[self::SESSION_VAR]);\n\t}", "title": "" }, { "docid": "67c21e0b7bcb090beed13761fd783fca", "score": "0.70156443", "text": "public function has_session()\n {\n }", "title": "" }, { "docid": "0372a08d7700e138e0bd2228d9b78f41", "score": "0.69299275", "text": "public function isSetSessionCookie() {}", "title": "" }, { "docid": "0372a08d7700e138e0bd2228d9b78f41", "score": "0.69292426", "text": "public function isSetSessionCookie() {}", "title": "" }, { "docid": "86af41e5d8565fe3eba434699d2e7160", "score": "0.6864361", "text": "function isSessionNeeded() {\n global $blForceSession;\n return $blForceSession;\n}", "title": "" }, { "docid": "365ce3afe198a3eed369c7a9c2bc5c1b", "score": "0.67987853", "text": "protected function checkSession(){\n\t\tif(empty($this->session_id)){\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "e2217f4b2c40fac120dde4420ffb1ab0", "score": "0.6795703", "text": "function is_set($key) {\n\t\t\t\tglobal $_SESSION;\n\t\t\t\treturn isset($_SESSION[$key]);\n\t\t\t}", "title": "" }, { "docid": "fd7266f2b5c7fcb5c23d84e5c6cf0064", "score": "0.67867374", "text": "function has_session()\n \t{\n \t\treturn $_SESSION[\"Login\"];\n \t}", "title": "" }, { "docid": "cce1d11b032370d98b40ab241a3f4de5", "score": "0.6758202", "text": "public static function checkSession() {\n\t\tif (isset($_SESSION[\"TRANS2LATE_USERNAME\"])) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "ee6771112b956e308f28ab5f42bbd5a4", "score": "0.6739012", "text": "public static function has(string $key) : bool\n\t{\n\t\tself::checkSession(\"Session variable $key could not be checked if set. Session has not been initialized\");\n\t\treturn isset($_SESSION[$key]);\n\t}", "title": "" }, { "docid": "1396c7e72fbfda30efaa53ef70a9b518", "score": "0.6727714", "text": "private function isSessionRequest()\n {\n return MiddlewareHelper::requestUrlContains($this->request, 'session');\n }", "title": "" }, { "docid": "e3ddc308109213c2e33775d17e4fa764", "score": "0.6721314", "text": "public function isSetSession($key);", "title": "" }, { "docid": "29d473b609b7f2df508234343e53e0a7", "score": "0.6689309", "text": "public function checkAuth() {\n if (isset($_SESSION[$this->_sessionVarName]) &&\n $_SESSION[$this->_sessionVarName] == 1\n ) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "bc574f968c561c9bf1c13e519ed0be51", "score": "0.6684909", "text": "public function check()\n {\n return $this->session->has(self::SESSION_KEY);\n }", "title": "" }, { "docid": "2e6b7c4b23b191f12ba2836414e6b6f9", "score": "0.6617592", "text": "public function checkSession() {\n if(isset($_SESSION['username']))\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "4dbd2e552edc4f66bcd31f41d8e97bbc", "score": "0.66101617", "text": "protected function Check_Session()\n {\n return true;\n }", "title": "" }, { "docid": "2960c2fe88e0f8c183d96af560467fb2", "score": "0.6598639", "text": "public function canLoadExistingAuthenticatedSession() {}", "title": "" }, { "docid": "a387e2051f8f43d5313ce7a82c1b52ff", "score": "0.65742654", "text": "public function session_active() {\n return isset($this->session_id);\n }", "title": "" }, { "docid": "d64870d8edcdac6b83592ab36dd39444", "score": "0.65712833", "text": "function has(string $key): bool\n{\n return isset($_SESSION[$key]);\n}", "title": "" }, { "docid": "a46e585d1f2b9e3998550f60cae55803", "score": "0.65609586", "text": "public function hasSession() {\n $sessionCookieName = $this->getSessionCookieName();\n\n return $this->session !== null || $this->getCookie($sessionCookieName) || $this->getQueryParameter($sessionCookieName);\n }", "title": "" }, { "docid": "3c0e3978c2d0bce8c184e085291c2dea", "score": "0.6560573", "text": "function checkSessionName(){\r\nreturn isset($_SESSION['name'],$_SESSION['address']);\r\n}", "title": "" }, { "docid": "012a1d4614f6cd146330f53ced152adf", "score": "0.6521391", "text": "function sys_session_test(){\n session_name(\"MELOLSESSION\");\n session_start();\n if (isset($_SESSION[\"userId\"]) && isset($_SESSION[\"sessionId\"]) && isset($_REQUEST[\"sessionId\"])) {\n if ($_SESSION[\"sessionId\"] == $_REQUEST[\"sessionId\"]) {\n return TRUE;\n }\n }\n return FALSE;\n}", "title": "" }, { "docid": "08438153dd509665855fb3f7cc7e1c9b", "score": "0.6519186", "text": "protected function hasSessionUUID() {\n\t\treturn (bool)isset($this->session_uuid);\n\t}", "title": "" }, { "docid": "34e90f13782b4334ecafd638f8202a85", "score": "0.64991164", "text": "function isAuth () {\n session_start();\n return isset($_SESSION['user']);\n}", "title": "" }, { "docid": "67cde09aa423d42e2f7e7e79ea92c2c3", "score": "0.64985734", "text": "public function needsSecondFactor() {\n\t\treturn $this->session->exists(self::SESSION_UID_KEY);\n\t}", "title": "" }, { "docid": "0075314fd6743641b4c2518765f44264", "score": "0.64972216", "text": "function oauth_session_exists() {\n if((is_array($_SESSION)) && (array_key_exists('oauth', $_SESSION))) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "title": "" }, { "docid": "f0a074f361eee0d9d27998fefc132b88", "score": "0.6495221", "text": "public function check(){\n\t\treturn isset($_SESSION['user']);\n\t}", "title": "" }, { "docid": "87bf587b439d918b5d87ea02aa898696", "score": "0.64843655", "text": "protected static function isFrontendSession() {}", "title": "" }, { "docid": "8b86eb54398fcdb2ea6255819cdd3581", "score": "0.64775944", "text": "protected function checkSession(){\n if( !session_id()){\n session_start();\n }\n }", "title": "" }, { "docid": "05166f30304e67418c6cee6a2d201e41", "score": "0.6466245", "text": "public function hasSession()\n {\n return null !== $this->session;\n }", "title": "" }, { "docid": "ccbb898435c6d16e29e220e6283c024f", "score": "0.6461615", "text": "public function _session_check() {\n $this->_session_start();\n\n if ( isset($_SESSION[$this->session_name]) && !empty($_SESSION[$this->session_name]) ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "12b9e05ba0312891235ef88c9ddea716", "score": "0.64585435", "text": "function areSessionsSet()\n{\n\n if (!isset($_SESSION[\"email\"]) || empty($_SESSION[\"email\"])) {\n return false;\n }\n if (!isset($_SESSION[\"pass\"]) || empty($_SESSION[\"pass\"])) {\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "75dda1a28b0962b43ea0e7fe6dca49b8", "score": "0.6451263", "text": "function lookup_sessions(){\n\n\t\tif( empty($_SESSION[COOKIE_NAME]) || empty($_SESSION[COOKIE_KEY]))\n\t\t\treturn 0;\n\treturn 1;\n}", "title": "" }, { "docid": "d8ef9f9265567e4b177826d425054ef8", "score": "0.644751", "text": "public function __isset($key)\n {\n return array_key_exists($key, $_SESSION);\n }", "title": "" }, { "docid": "6cb0b269f4c1eac9480f26aaefd184da", "score": "0.64455223", "text": "public function __isset($key) {\n return isset($_SESSION[$key]);\n }", "title": "" }, { "docid": "615931df6b2f5ff3fa54ef816fadc4b9", "score": "0.64404565", "text": "public function hasSessionId(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "b7ebbd56dc25ad403a59fa72f373262b", "score": "0.64383316", "text": "static function isAuth(): bool {\n return isset($_SESSION['user']);\n }", "title": "" }, { "docid": "a81d6adb3a5f1e884ccf930f8ea78092", "score": "0.6433034", "text": "public function has($key) {\n\n return array_key_exists($_SESSION , $key);\n\n }", "title": "" }, { "docid": "d8050b5acf134ac99e94e13aa0dac4e0", "score": "0.642822", "text": "public function checkSession(){\n\t\tif ( session_id() == '' ) session_start();\n\t\tif ( count($_SESSION) === 0 ) return $this->restoreAndReturn(0);\n\t\tforeach( $this->_session_keys as $key => $value ){\n\t\t\tif ( !isset( $_SESSION[$key] ) )\n\t\t\t\treturn $this->restoreAndReturn(0);\n\t\t}\n\t\treturn $this->restoreAndReturn(true);\n\t}", "title": "" }, { "docid": "460543fa95039c33ef0eecdcda33a688", "score": "0.6422939", "text": "function session_active(){\n return (isset($_SESSION['user']) && $_SESSION != \"\");\n}", "title": "" }, { "docid": "1fbdd0d304e0a7bfabe3e3f8ba01a9be", "score": "0.6419075", "text": "function Has_Session()\n {\n if(!isset($_SESSION['UserID']) or\n $_SESSION['UserID'] == \"\")\n {\n return false;\n }\n else if(!isset($_SESSION['permission']) or\n $_SESSION['permission'] == \"\")\n {\n return false;\n }\n else if(!isset($_SESSION['Username']) or\n $_SESSION['Username'] == \"\")\n {\n return false;\n }\n\t\telse if(!isset($_SESSION['department']) or\n $_SESSION['department'] == \"\")\n {\n return false;\n }\n else\n {\n return true;\n }\n }", "title": "" }, { "docid": "8d089ab100376e8453faa4c7f1e5b646", "score": "0.6417151", "text": "function ifset($k) {\n return isset($_SESSION[$this->sessionName][$k]);\n }", "title": "" }, { "docid": "580903e77373bfe6245c54c2c8269268", "score": "0.6405357", "text": "public function has_session() {\n\t \treturn isset( $_COOKIE[ $this->_cookie ] ) || $this->_has_cookie || is_user_logged_in();\n\t }", "title": "" }, { "docid": "28cd6bf0433ab1f65f6a813c18d03b55", "score": "0.6405216", "text": "public function isAuthenticated()\n {\n // simple check to see if we have sso session variables\n // uses $options['namespace'] which must be consistant across all apps (inc sso server app)\n\n return (!empty($this->getAttributes()));\n }", "title": "" }, { "docid": "87bff9ba82d9fc50dee846c58d90f7cd", "score": "0.6396483", "text": "function isAuth(): bool\n {\n return array_key_exists(\"auth\", $_SESSION);\n }", "title": "" }, { "docid": "3a083d971883023a6326da2ace736f74", "score": "0.63964576", "text": "static public function userSessionIsValid()\r\n\t{\r\n\t\t// force a session read if session has started but not yet used\r\n\t\tif ( self::$userSessionIsValid === null &&\r\n\t\tself::$hasSessionCookie === true )\r\n\t\t{\r\n\t\t\t$tempSession = $_SESSION;\r\n\t\t}\r\n\t\treturn self::$userSessionIsValid;\r\n\t}", "title": "" }, { "docid": "fafacfc1f13a7138ed5a9ff64dd20536", "score": "0.63964117", "text": "private function user_information_set() {\r\n return isset($_SESSION['username']);\r\n }", "title": "" }, { "docid": "943f122a9ebdb1632d59c61a0cf6b25f", "score": "0.639264", "text": "public function hasSessionToken()\n {\n return ($this->session->has(self::TOKEN_KEY) && $this->session->has(self::TOKEN_SECRET_KEY));\n }", "title": "" }, { "docid": "ba1873aedf47b0a7a13f193c7487afcb", "score": "0.6392306", "text": "function sessionValid()\n {\n \treturn $this->Session->check('othAuth.' . $this->hashkey);\n }", "title": "" }, { "docid": "4bc19bb35305b580d94399e38a9baf83", "score": "0.6384654", "text": "public function compareWithSession()\n\t{\n\t\treturn Session::fetch(self::TOKEN_NAME) == Request::get(self::TOKEN_NAME);\n\t}", "title": "" }, { "docid": "0e5d5ea4d0899c6c9bd7ef5640eb111c", "score": "0.63675535", "text": "public static function hasSession(): bool\n {\n return self::proxy()->hasSession();\n }", "title": "" }, { "docid": "e163a177d30d2bde46d592cc50f6a37e", "score": "0.6363265", "text": "protected function _hasVar($name)\n {\n $store = $this->_getVariableStore();\n\n if ($store instanceof \\Zend_Session_Namespace) {\n return $store->__isset($name);\n } else {\n return $store->offsetExists($name);\n }\n }", "title": "" }, { "docid": "177815e814eca693f91ebb9e11507cee", "score": "0.6359834", "text": "function get_sessionStatus($session_id)\n { # If so, is the 'temp_template' filled out?\n $sessionData = $this->session->userdata($session_id);\n return ($sessionData[\"temp_template\"]!=NULL?TRUE:FALSE);\n }", "title": "" }, { "docid": "f91a24d2868781cdd674cdb8ec9a66bb", "score": "0.6357038", "text": "public function hasSessionParameters()\n {\n return sizeof($this->sessionParameters) > 0;\n }", "title": "" }, { "docid": "f91a24d2868781cdd674cdb8ec9a66bb", "score": "0.6357038", "text": "public function hasSessionParameters()\n {\n return sizeof($this->sessionParameters) > 0;\n }", "title": "" }, { "docid": "f1d53ee2a96192d7d667e15f429bd7c1", "score": "0.635251", "text": "public function session_check() \n {\n if (empty($_SESSION[\"{$_SERVER['HTTP_HOST']}_token\"])) {\n //$this->create_session($data_ar);\n return false;\n \n } elseif (!empty($_SESSION[\"{$_SERVER['HTTP_HOST']}_token\"])) {\n \n return true;\n }\n }", "title": "" }, { "docid": "f77895066a7df7b0d5f96efd6b69ef39", "score": "0.6350598", "text": "public static function check($key) {\n return isset($_SESSION[$key]) ? true : false;\n }", "title": "" }, { "docid": "f9696af20dd0a6d91fffb607d087f90c", "score": "0.6350111", "text": "function hasSessionCookie() {\n\t\tglobal $wgDisableCookieCheck, $wgRequest;\n\t\treturn $wgDisableCookieCheck ? true : $wgRequest->checkSessionCookie();\n\t}", "title": "" }, { "docid": "5f3af0adcba960c5573e366a67d4125b", "score": "0.63482445", "text": "public function check()\n {\n return Session::exists($this->container->configs['auth']['session']);\n }", "title": "" }, { "docid": "6b8285084f7bfb5305697a219475ff94", "score": "0.6346262", "text": "function checkSession($sessionId, $request){\n // get the session values from the database\n\n return true;\n }", "title": "" }, { "docid": "60fbf6efb791d18a213884c091db9a6e", "score": "0.6342213", "text": "public function checkValidationSession() \n\t{\n //lookup in Session if valide\n //return true of false\n if ($_SESSION['activated'] == true) {\n return true;\n }\n else {\n return false;\n }\n \n }", "title": "" }, { "docid": "44ce1dee011283bebad3c40626fa56e4", "score": "0.6337866", "text": "public function has($key)\r\n {\r\n return isset($_SESSION[$key]);\r\n }", "title": "" }, { "docid": "35c1e25b87edeca43c3a5ab8bcc4f84c", "score": "0.6336795", "text": "public function isRequestVar()\n {\n if(empty($this->request))\n {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "477c2548fc0678b41a7a83cc3c87afab", "score": "0.63357127", "text": "function SessionStatus() {\r\n\tif (isset($_SESSION['user_id'])) {\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}", "title": "" }, { "docid": "7426b1b2c1caa350a4f0852abf323f31", "score": "0.6333411", "text": "public function sessionExists ()\n {\n if (isset($_SESSION['userID']) and \n isset($_SESSION['userType']) and \n $_SESSION['emailID']) {\n \n if ($this->isRequiredType() == 1) { \n return 1;\n } else { \n $this->_message = \"You are not authorized to view this page\"; \n return 0;\n }\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "08533544f5ef9cf3c5a73331be4bcc42", "score": "0.63309586", "text": "static function checkisLogged() : bool \n {\n return isset($_SESSION['userId']);\n }", "title": "" }, { "docid": "0aa70a70369d2f33857a7c3e831fc0d1", "score": "0.6329022", "text": "public function __isset($name)\n\t\t{\n\t\t\treturn ( bool ) isset($_SESSION[$name]);\n\t\t}", "title": "" }, { "docid": "0797cda43537de38dd5075fc4cb66a0d", "score": "0.6324798", "text": "public function hasSession (string $key) : bool;", "title": "" }, { "docid": "b9119919ff989ab07d99b5d371bf6c7a", "score": "0.6318559", "text": "function exists($key)\n {\n return isset($_SESSION[$key]);\n }", "title": "" }, { "docid": "ca5e4b6dfe25d677b85f4ea38e133788", "score": "0.63168204", "text": "function isLoggedIn() {\n return isset($_SESSION['sid']);\n }", "title": "" }, { "docid": "cfa066cdcc21e084158a2c97fa1c14c3", "score": "0.6316013", "text": "function is_session_exist()\n \t {\n\t if(isset ($this->site_id) && !empty($this->site_id)){\n\t\t return true;\n\t }else\n\t {\n\t\t \n\t\t // redirect('MyAccount/login'); \n\t\t redirect(\"http://\".$_SERVER['HTTP_HOST']);\n\t }\n }", "title": "" }, { "docid": "54e8ba1cbcbe8dbfc882b0169eb3d7ed", "score": "0.63017416", "text": "public function hasSessionId(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "54e8ba1cbcbe8dbfc882b0169eb3d7ed", "score": "0.63017416", "text": "public function hasSessionId(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "54e8ba1cbcbe8dbfc882b0169eb3d7ed", "score": "0.63017416", "text": "public function hasSessionId(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "45c14d6188dada605711573061cfb3b9", "score": "0.62888396", "text": "public static function isSessionSet($session_var) {\n\t\t\tself::throwExceptionIfNull($session_var);\n\t\t\tself::throwExceptionIfNotString($session_var);\n\t\t\tself::throwExceptionIfEmptyString($session_var);\n\t\t\treturn isset($_SESSION[$session_var]);\n\t\t}", "title": "" }, { "docid": "47441cedb75d75f9fbab9ab41d2d97c4", "score": "0.6286652", "text": "public static function active()\n\t{\n\t\treturn isset($_SESSION);\n\t}", "title": "" }, { "docid": "4b92197a529c6435a98848ab9d459173", "score": "0.6282286", "text": "public function isSessionCheck()\n {\n return ((int) $this->get('SessionCheck')) === 1;\n }", "title": "" }, { "docid": "1efab376c9db257384cad65f5aafa8fb", "score": "0.6280788", "text": "public function has_session() {\n\t\t\treturn $this->_has_cookie; // @codingStandardsIgnoreLine.\n\t\t}", "title": "" }, { "docid": "3315c008ce528a4616a76ca33433b5e7", "score": "0.62760454", "text": "public static function has($key)\n {\n return isset($_SESSION[$key]);\n }", "title": "" }, { "docid": "d5a86dc97a040acd47899563a8538253", "score": "0.62755775", "text": "public function has($key)\n {\n return isset($_SESSION[$key]);\n }", "title": "" }, { "docid": "03f022c17e5694d277862a731a00a1d4", "score": "0.6274196", "text": "function usuarioQueEstaLogado() {\n return isset($_SESSION[\"usuario_logado\"]);}", "title": "" }, { "docid": "3380d6cbdefc28a7890918906ca38300", "score": "0.6273904", "text": "public function has($key)\n {\n return isset($_SESSION[$key]) ? true : false;\n }", "title": "" }, { "docid": "989150368a0f76d990705dc4ba7d6c4c", "score": "0.62712663", "text": "public function has($key) {\n return array_key_exists($key, $_SESSION);\n }", "title": "" }, { "docid": "f17c2bfa898ce59252e8920e763e8639", "score": "0.6270939", "text": "private function user_session_exist() {\n // get session ID\n // $this->sessionID = $this->get_session( $this->sessionName, 'session_id' );\n $this->userID = $this->get_session( $this->sessionName, 'id' );\n\n if ( ! empty( $this->sessionID ) || $_COOKIE[$this->cookieName] ) {\n if ( $this->load_user_data( $this->userID ) ) {\n return TRUE;\n }\n }\n return FALSE;\n }", "title": "" }, { "docid": "3d59e072cb12ea0b0282b7a37ca1abf2", "score": "0.6262988", "text": "public function hasSessionId(){\n return $this->_has(7);\n }", "title": "" }, { "docid": "3d59e072cb12ea0b0282b7a37ca1abf2", "score": "0.6262988", "text": "public function hasSessionId(){\n return $this->_has(7);\n }", "title": "" }, { "docid": "270ef11d96c3cb6dc89bbc89ae28a3c3", "score": "0.62626994", "text": "function session_exists($attribute_name){\n return key_exists($attribute_name, $_SESSION) && strlen(trim($_SESSION[$attribute_name])) > 0;\n}", "title": "" }, { "docid": "042f013484cd4da84827e8f011390ed6", "score": "0.62608933", "text": "static public function userHasSessionCookie()\r\n\t{\r\n\t\treturn self::$hasSessionCookie;\r\n\t}", "title": "" }, { "docid": "02ff9c8cbde413eb64a98cf1acaf448a", "score": "0.6260652", "text": "private static function checkSession()\n {\n \n if (self::$session == null) {\n self::$session = new Session();\n }\n \n if (self::$session->get('todos', false) == false) {\n \n self::$session->set('todos', self::$initTodos);\n }\n }", "title": "" }, { "docid": "25030a99da2dc9f9d862fda6ce452ecf", "score": "0.62587565", "text": "public static function check()\n {\n if (Session::exists('user_session')) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "f3e23a03f71c4c29ebbd8071d771bfd5", "score": "0.6252561", "text": "function isLoggedIn() {\n return isset($_SESSION['name']);\n }", "title": "" }, { "docid": "0828f1d5501b9c2a6a2774c394d32566", "score": "0.6246815", "text": "public function doesVisitorHaveSession()\n\t{\n\t\tif (!$loginSession = $this->session->has_userdata('usersSession')) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "b1b99225327e76e4e5576b6bc306d78a", "score": "0.6243039", "text": "public function testSessionHas()\n {\n // Should return false if the session doesn't have the key\n $this->assertFalse($this->session->has('testSessionHas'));\n\n // Put data\n $this->session->put('testSessionHas', true);\n $this->session->put('testSessionHasNull', null);\n\n // Should return true for values that exist and are [not] null\n $this->assertTrue($this->session->has('testSessionHas'));\n\n // Should return false if the value exists but [is] null\n $this->assertFalse($this->session->has('testSessionHasNull'));\n }", "title": "" }, { "docid": "f9596cbd2f8c53c9d42f5b52fd40ec9a", "score": "0.62425417", "text": "public function valid(): bool\n {\n $this->doInit();\n\n return key($_SESSION) !== null;\n }", "title": "" } ]
7133cd6b866b3132ab10e9085ec8c296
Sets the userExperienceAnalyticsBatteryHealthDevicePerformance User Experience Analytics Battery Health Device Performance
[ { "docid": "765d8bea9a8602d061c64463ff365e38", "score": "0.78875095", "text": "public function setUserExperienceAnalyticsBatteryHealthDevicePerformance($val)\n {\n $this->_propDict[\"userExperienceAnalyticsBatteryHealthDevicePerformance\"] = $val;\n return $this;\n }", "title": "" } ]
[ { "docid": "21a53cf805f53f7cf1a6338befe8fea2", "score": "0.74928206", "text": "public function setUserExperienceAnalyticsBatteryHealthOsPerformance($val)\n {\n $this->_propDict[\"userExperienceAnalyticsBatteryHealthOsPerformance\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "2d3031bf0ebc1114093138c5d803a7c4", "score": "0.7337358", "text": "public function getUserExperienceAnalyticsBatteryHealthDevicePerformance()\n {\n if (array_key_exists(\"userExperienceAnalyticsBatteryHealthDevicePerformance\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsBatteryHealthDevicePerformance\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "89d3afd73fdddb6b9cf7c4f7ce4092c5", "score": "0.7081183", "text": "public function setUserExperienceAnalyticsBatteryHealthModelPerformance($val)\n {\n $this->_propDict[\"userExperienceAnalyticsBatteryHealthModelPerformance\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "74a462608946eb78fa946cff66298398", "score": "0.6940667", "text": "public function setUserExperienceAnalyticsAppHealthDevicePerformance($val)\n {\n $this->_propDict[\"userExperienceAnalyticsAppHealthDevicePerformance\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "a8f00690ef33777883c76b84e6ba74f6", "score": "0.68274856", "text": "public function getUserExperienceAnalyticsBatteryHealthOsPerformance()\n {\n if (array_key_exists(\"userExperienceAnalyticsBatteryHealthOsPerformance\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsBatteryHealthOsPerformance\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "38c6a5b9909b2ecce66de91b17739a5c", "score": "0.6716651", "text": "public function getUserExperienceAnalyticsBatteryHealthModelPerformance()\n {\n if (array_key_exists(\"userExperienceAnalyticsBatteryHealthModelPerformance\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsBatteryHealthModelPerformance\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "2aebe29113abe939436c7fd0f004f9a5", "score": "0.65329236", "text": "public function setUserExperienceAnalyticsBatteryHealthRuntimeDetails($val)\n {\n $this->_propDict[\"userExperienceAnalyticsBatteryHealthRuntimeDetails\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "df0240f9844862f0573c1266ced065b1", "score": "0.649307", "text": "public function setUserExperienceAnalyticsBatteryHealthDeviceAppImpact($val)\n {\n $this->_propDict[\"userExperienceAnalyticsBatteryHealthDeviceAppImpact\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "25a5567e65ee4aad17273de428fa9af2", "score": "0.6434594", "text": "public function byUserExperienceAnalyticsBatteryHealthDevicePerformanceId(string $userExperienceAnalyticsBatteryHealthDevicePerformanceId): UserExperienceAnalyticsBatteryHealthDevicePerformanceItemRequestBuilder {\n $urlTplParams = $this->pathParameters;\n $urlTplParams['userExperienceAnalyticsBatteryHealthDevicePerformance%2Did'] = $userExperienceAnalyticsBatteryHealthDevicePerformanceId;\n return new UserExperienceAnalyticsBatteryHealthDevicePerformanceItemRequestBuilder($urlTplParams, $this->requestAdapter);\n }", "title": "" }, { "docid": "c43dc101a1ad6b6323ccab3eec575587", "score": "0.6372672", "text": "public function setUserExperienceAnalyticsBatteryHealthCapacityDetails($val)\n {\n $this->_propDict[\"userExperienceAnalyticsBatteryHealthCapacityDetails\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "e1e470b80ef98e3c826f95ad0e7dc06e", "score": "0.63574785", "text": "public function getUserExperienceAnalyticsBatteryHealthDeviceAppImpact()\n {\n if (array_key_exists(\"userExperienceAnalyticsBatteryHealthDeviceAppImpact\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsBatteryHealthDeviceAppImpact\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "9c394d136bfc915f3322ab737ec6b07a", "score": "0.6357155", "text": "public function setUserExperienceAnalyticsBatteryHealthAppImpact($val)\n {\n $this->_propDict[\"userExperienceAnalyticsBatteryHealthAppImpact\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "af30f81fb4e385985ed66001def749a7", "score": "0.6350917", "text": "public function setUserExperienceAnalyticsAppHealthDeviceModelPerformance($val)\n {\n $this->_propDict[\"userExperienceAnalyticsAppHealthDeviceModelPerformance\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "da0a5043bd7b5e886a111948d8a6bbf8", "score": "0.63461953", "text": "public function setUserExperienceAnalyticsAppHealthDevicePerformanceDetails($val)\n {\n $this->_propDict[\"userExperienceAnalyticsAppHealthDevicePerformanceDetails\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "6b6abd9730a534e604f3664a4c6e472d", "score": "0.63415134", "text": "public function getUserExperienceAnalyticsBatteryHealthCapacityDetails()\n {\n if (array_key_exists(\"userExperienceAnalyticsBatteryHealthCapacityDetails\", $this->_propDict)) {\n if (is_a($this->_propDict[\"userExperienceAnalyticsBatteryHealthCapacityDetails\"], \"\\Beta\\Microsoft\\Graph\\Model\\UserExperienceAnalyticsBatteryHealthCapacityDetails\") || is_null($this->_propDict[\"userExperienceAnalyticsBatteryHealthCapacityDetails\"])) {\n return $this->_propDict[\"userExperienceAnalyticsBatteryHealthCapacityDetails\"];\n } else {\n $this->_propDict[\"userExperienceAnalyticsBatteryHealthCapacityDetails\"] = new UserExperienceAnalyticsBatteryHealthCapacityDetails($this->_propDict[\"userExperienceAnalyticsBatteryHealthCapacityDetails\"]);\n return $this->_propDict[\"userExperienceAnalyticsBatteryHealthCapacityDetails\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "c6e7ea028e637ea5f4b02aa2497ac8eb", "score": "0.6316781", "text": "public function getUserExperienceAnalyticsBatteryHealthRuntimeDetails()\n {\n if (array_key_exists(\"userExperienceAnalyticsBatteryHealthRuntimeDetails\", $this->_propDict)) {\n if (is_a($this->_propDict[\"userExperienceAnalyticsBatteryHealthRuntimeDetails\"], \"\\Beta\\Microsoft\\Graph\\Model\\UserExperienceAnalyticsBatteryHealthRuntimeDetails\") || is_null($this->_propDict[\"userExperienceAnalyticsBatteryHealthRuntimeDetails\"])) {\n return $this->_propDict[\"userExperienceAnalyticsBatteryHealthRuntimeDetails\"];\n } else {\n $this->_propDict[\"userExperienceAnalyticsBatteryHealthRuntimeDetails\"] = new UserExperienceAnalyticsBatteryHealthRuntimeDetails($this->_propDict[\"userExperienceAnalyticsBatteryHealthRuntimeDetails\"]);\n return $this->_propDict[\"userExperienceAnalyticsBatteryHealthRuntimeDetails\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "c860147d5d6a15d4f9b8596e5700be82", "score": "0.63122475", "text": "public function getUserExperienceAnalyticsAppHealthDevicePerformance()\n {\n if (array_key_exists(\"userExperienceAnalyticsAppHealthDevicePerformance\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsAppHealthDevicePerformance\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "5972c819b78e662930d3c6a1778248d2", "score": "0.6245226", "text": "public function setUserExperienceAnalyticsAppHealthApplicationPerformance($val)\n {\n $this->_propDict[\"userExperienceAnalyticsAppHealthApplicationPerformance\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "051631eef6c5a18d99a910e7fcb25bb1", "score": "0.6190438", "text": "public function getUserExperienceAnalyticsBatteryHealthAppImpact()\n {\n if (array_key_exists(\"userExperienceAnalyticsBatteryHealthAppImpact\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsBatteryHealthAppImpact\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "96e0df5375073efedc4603765302cbd9", "score": "0.61428386", "text": "public function setUserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory($val)\n {\n $this->_propDict[\"userExperienceAnalyticsBatteryHealthDeviceRuntimeHistory\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "7965bf85a4a6a1f1f86d173de19a81fd", "score": "0.5967598", "text": "public function getUserExperienceAnalyticsAppHealthDeviceModelPerformance()\n {\n if (array_key_exists(\"userExperienceAnalyticsAppHealthDeviceModelPerformance\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsAppHealthDeviceModelPerformance\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "676938d82c4095145ce0c6e6aa317d89", "score": "0.5928739", "text": "public function setUserExperienceAnalyticsDevicePerformance($val)\n {\n $this->_propDict[\"userExperienceAnalyticsDevicePerformance\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "6b7507deadec2357b952e7c40b6a208f", "score": "0.58528423", "text": "public function getUserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory()\n {\n if (array_key_exists(\"userExperienceAnalyticsBatteryHealthDeviceRuntimeHistory\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsBatteryHealthDeviceRuntimeHistory\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "20453ab29eca9ee18af378c44896ea81", "score": "0.5841292", "text": "public function getUserExperienceAnalyticsAppHealthApplicationPerformance()\n {\n if (array_key_exists(\"userExperienceAnalyticsAppHealthApplicationPerformance\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsAppHealthApplicationPerformance\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "48ee1b4c44022b4e32db736f0e199d7c", "score": "0.5794209", "text": "public function getUserExperienceAnalyticsAppHealthDevicePerformanceDetails()\n {\n if (array_key_exists(\"userExperienceAnalyticsAppHealthDevicePerformanceDetails\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsAppHealthDevicePerformanceDetails\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "0446ae8923f2bea0c3a6fd163367c12d", "score": "0.55213904", "text": "public function setHealth($hp);", "title": "" }, { "docid": "4bf2f6aa49af6c3450ea0c5919d8f4fc", "score": "0.5501845", "text": "public function getUserExperienceAnalyticsDevicePerformance()\n {\n if (array_key_exists(\"userExperienceAnalyticsDevicePerformance\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsDevicePerformance\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "1cf5fae835b54a87bd461efba49e9d44", "score": "0.546599", "text": "public function getUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId()\n {\n if (array_key_exists(\"userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "e1c61d6b5e2e660199e235d98eb415dc", "score": "0.5363634", "text": "public function setUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId($val)\n {\n $this->_propDict[\"userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "e670b8fd7cd1ae2c2849efcb36a4ed59", "score": "0.53173304", "text": "public function setUserExperienceAnalyticsAppHealthOSVersionPerformance($val)\n {\n $this->_propDict[\"userExperienceAnalyticsAppHealthOSVersionPerformance\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "699f1195e0f3bc4d311e030cfd715242", "score": "0.5283936", "text": "public function getUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion()\n {\n if (array_key_exists(\"userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "ec832f5ec95640d433de8e990fe77ce3", "score": "0.51791817", "text": "public function setUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion($val)\n {\n $this->_propDict[\"userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "567b3321543e97967a9ec7e5ee2434da", "score": "0.51284707", "text": "public function setUserExperienceAnalyticsDeviceStartupProcessPerformance($val)\n {\n $this->_propDict[\"userExperienceAnalyticsDeviceStartupProcessPerformance\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "3ac239b9dcf4ce3e3681f61a8fc944b9", "score": "0.512635", "text": "public function setUserExperienceAnalyticsResourcePerformance($val)\n {\n $this->_propDict[\"userExperienceAnalyticsResourcePerformance\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "89bbe9be60cd81105742ed0fc3952aa9", "score": "0.511692", "text": "public function getUserExperienceAnalyticsAppHealthOSVersionPerformance()\n {\n if (array_key_exists(\"userExperienceAnalyticsAppHealthOSVersionPerformance\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsAppHealthOSVersionPerformance\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "f5c60b75dbda1e886dc07ec9e0ba2f92", "score": "0.5116327", "text": "public static function createFromDiscriminatorValue(ParseNode $parseNode): UserExperienceAnalyticsBatteryHealthAppImpact {\n return new UserExperienceAnalyticsBatteryHealthAppImpact();\n }", "title": "" }, { "docid": "8585741543c83bdc97aaeccfa00f67de", "score": "0.50687385", "text": "public function setBatteryUsagePercentage(?float $value): void {\n $this->getBackingStore()->set('batteryUsagePercentage', $value);\n }", "title": "" }, { "docid": "446946850dd35e58d19a7c9fabe08cb8", "score": "0.4977597", "text": "public function getUserExperienceAnalyticsAppHealthOverview()\n {\n if (array_key_exists(\"userExperienceAnalyticsAppHealthOverview\", $this->_propDict)) {\n if (is_a($this->_propDict[\"userExperienceAnalyticsAppHealthOverview\"], \"\\Beta\\Microsoft\\Graph\\Model\\UserExperienceAnalyticsCategory\") || is_null($this->_propDict[\"userExperienceAnalyticsAppHealthOverview\"])) {\n return $this->_propDict[\"userExperienceAnalyticsAppHealthOverview\"];\n } else {\n $this->_propDict[\"userExperienceAnalyticsAppHealthOverview\"] = new UserExperienceAnalyticsCategory($this->_propDict[\"userExperienceAnalyticsAppHealthOverview\"]);\n return $this->_propDict[\"userExperienceAnalyticsAppHealthOverview\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "e51c1d93ade51dcd798b43bf0864f486", "score": "0.49692833", "text": "public function setUserExperienceAnalyticsAppHealthOverview($val)\n {\n $this->_propDict[\"userExperienceAnalyticsAppHealthOverview\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "8ab4fb3b8e75167a0feccce75315e28d", "score": "0.49672133", "text": "public function getUserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion()\n {\n if (array_key_exists(\"userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "692e2bbf94a3a74cad49beb2cf2450ae", "score": "0.49229217", "text": "public function getUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails()\n {\n if (array_key_exists(\"userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "74d0faefeae61430aa28996029b2effa", "score": "0.48992112", "text": "public function setUserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion($val)\n {\n $this->_propDict[\"userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "8b47fb0cb66651cd4cdc1cea31dbf420", "score": "0.48987716", "text": "public function setUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails($val)\n {\n $this->_propDict[\"userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "522e223f0fdf408d31b4b1d8f5b57ff2", "score": "0.48983896", "text": "public function getUserExperienceAnalyticsDeviceStartupProcessPerformance()\n {\n if (array_key_exists(\"userExperienceAnalyticsDeviceStartupProcessPerformance\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsDeviceStartupProcessPerformance\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "fe6819145055f16d61862aa3535d1768", "score": "0.4868047", "text": "public function setUserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric($val)\n {\n $this->_propDict[\"userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "2ef29d34cee99c1ade354f358e1f0341", "score": "0.48671195", "text": "public function setUserExperienceAnalyticsDeviceScores($val)\n {\n $this->_propDict[\"userExperienceAnalyticsDeviceScores\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "40a26195751fbff090521b195d5bf72f", "score": "0.47637138", "text": "public function post(UserExperienceAnalyticsBatteryHealthDevicePerformance $body, ?UserExperienceAnalyticsBatteryHealthDevicePerformanceRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise {\n $requestInfo = $this->toPostRequestInformation($body, $requestConfiguration);\n try {\n $errorMappings = [\n '4XX' => [ODataError::class, 'createFromDiscriminatorValue'],\n '5XX' => [ODataError::class, 'createFromDiscriminatorValue'],\n ];\n return $this->requestAdapter->sendAsync($requestInfo, [UserExperienceAnalyticsBatteryHealthDevicePerformance::class, 'createFromDiscriminatorValue'], $errorMappings);\n } catch(Exception $ex) {\n return new RejectedPromise($ex);\n }\n }", "title": "" }, { "docid": "c67a533df5ea06c9f4f9bfaf1c2e3402", "score": "0.4745307", "text": "public function setMaximumAllowedDeviceThreatLevel(?ManagedAppDeviceThreatLevel $value): void {\n $this->getBackingStore()->set('maximumAllowedDeviceThreatLevel', $value);\n }", "title": "" }, { "docid": "b56fdd544102a41cab844deea4c2f7e1", "score": "0.4729335", "text": "public function setUserExperienceAnalyticsDeviceMetricHistory($val)\n {\n $this->_propDict[\"userExperienceAnalyticsDeviceMetricHistory\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "4b14134a760492c8324acd19d8c9bbd5", "score": "0.4704329", "text": "public function getUserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric()\n {\n if (array_key_exists(\"userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric\", $this->_propDict)) {\n if (is_a($this->_propDict[\"userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric\"], \"\\Beta\\Microsoft\\Graph\\Model\\UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric\") || is_null($this->_propDict[\"userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric\"])) {\n return $this->_propDict[\"userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric\"];\n } else {\n $this->_propDict[\"userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric\"] = new UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric($this->_propDict[\"userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric\"]);\n return $this->_propDict[\"userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "47e398409e64b66546f74962320932e1", "score": "0.46637347", "text": "public function getUserExperienceAnalyticsResourcePerformance()\n {\n if (array_key_exists(\"userExperienceAnalyticsResourcePerformance\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsResourcePerformance\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "f4943c02a9d9fb24c18a383d5b1b8bc9", "score": "0.46448308", "text": "public function setTunnelServerHealthStatus(?MicrosoftTunnelServerHealthStatus $value): void {\n $this->getBackingStore()->set('tunnelServerHealthStatus', $value);\n }", "title": "" }, { "docid": "cbcab90de70d902d4b2a3478aaed99ea", "score": "0.46263346", "text": "public function setHp($hp)\n {\n $this->hp=$hp;\n }", "title": "" }, { "docid": "54a306de64ef844475f8e4ca8da8cf1d", "score": "0.46001017", "text": "public function setUserExperienceAnalyticsWorkFromAnywhereModelPerformance($val)\n {\n $this->_propDict[\"userExperienceAnalyticsWorkFromAnywhereModelPerformance\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "ca2f932e87218796d82556a68690d34e", "score": "0.45798013", "text": "public function withUrl(string $rawUrl): UserExperienceAnalyticsBatteryHealthDevicePerformanceRequestBuilder {\n return new UserExperienceAnalyticsBatteryHealthDevicePerformanceRequestBuilder($rawUrl, $this->requestAdapter);\n }", "title": "" }, { "docid": "97e30ddd087f6267d1f9e3f93cf15319", "score": "0.45425144", "text": "public function getUserExperienceAnalyticsDeviceScores()\n {\n if (array_key_exists(\"userExperienceAnalyticsDeviceScores\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsDeviceScores\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "afbe42b794653b2acc0d357df39305fb", "score": "0.44862697", "text": "public function getUserExperienceAnalyticsDeviceMetricHistory()\n {\n if (array_key_exists(\"userExperienceAnalyticsDeviceMetricHistory\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsDeviceMetricHistory\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "f537bd65a977ad3d9e9427629ed63547", "score": "0.44804898", "text": "public function setUserExperienceAnalyticsWorkFromAnywhereMetrics($val)\n {\n $this->_propDict[\"userExperienceAnalyticsWorkFromAnywhereMetrics\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "e8b072052167fdd1b32b9a80ebd5de11", "score": "0.44599274", "text": "public function setMicrosoftTunnelHealthThresholds($val)\n {\n $this->_propDict[\"microsoftTunnelHealthThresholds\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "0678e3e8849a040650246ae1020825fd", "score": "0.4423947", "text": "public function get(?UserExperienceAnalyticsBatteryHealthDevicePerformanceRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {\n $requestInfo = $this->toGetRequestInformation($requestConfiguration);\n try {\n $errorMappings = [\n '4XX' => [ODataError::class, 'createFromDiscriminatorValue'],\n '5XX' => [ODataError::class, 'createFromDiscriminatorValue'],\n ];\n return $this->requestAdapter->sendAsync($requestInfo, [UserExperienceAnalyticsBatteryHealthDevicePerformanceCollectionResponse::class, 'createFromDiscriminatorValue'], $errorMappings);\n } catch(Exception $ex) {\n return new RejectedPromise($ex);\n }\n }", "title": "" }, { "docid": "fc9421978a80c616b4862e7daf356141", "score": "0.44068325", "text": "protected function setUsersHisotry($userUid, array $usersHistory) {\n\t\tarray_splice(\n\t\t\t$usersHistory,\n\t\t\tintval($this->extensionSettings['HISTORYCOUNT'])\n\t\t);\n\n\t\t$updateUsersHistory = array(\n\t\t\t'tx_pagehits_history_history' => implode(',', $usersHistory)\n\t\t);\n\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery(\n\t\t\t'fe_users',\n\t\t\t'uid = ' . $userUid,\n\t\t\t$updateUsersHistory\n\t\t);\n\t}", "title": "" }, { "docid": "feb44a16b7017b860cb322a024d867a7", "score": "0.43730313", "text": "public function setEnergy($energy){\n $this->energy=$energy;\n }", "title": "" }, { "docid": "0a5b9ffc1327fd582f7d1e27fce802c2", "score": "0.43355", "text": "public function setUserExperienceAnalyticsAnomalyDevice($val)\n {\n $this->_propDict[\"userExperienceAnalyticsAnomalyDevice\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "0f336f52237c885e767bc6ce91f06d99", "score": "0.431746", "text": "public function getUserExperienceAnalyticsWorkFromAnywhereModelPerformance()\n {\n if (array_key_exists(\"userExperienceAnalyticsWorkFromAnywhereModelPerformance\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsWorkFromAnywhereModelPerformance\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "74abc72492ce2d963e822827eed96b1b", "score": "0.4298464", "text": "function setAvgSpeed($meterPerSec) {\n\t\treturn update_post_meta($this->getId(), self::META_AVG_SPEED, $meterPerSec);\n\t}", "title": "" }, { "docid": "dc136c836cff08b991ff3ea915a938f2", "score": "0.42871478", "text": "public function setDeviceHealthScripts($val)\n {\n $this->_propDict[\"deviceHealthScripts\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "52ed81400b6a9da385fd92dc2bcef8ca", "score": "0.42843574", "text": "public function setSpeed()\n {\n $this->_person->speed = \"low\";\n }", "title": "" }, { "docid": "148ca8400f06672579bacb138d47f9ac", "score": "0.42825323", "text": "public function chargeBattery() : void;", "title": "" }, { "docid": "20346953d5ecfc5eba58708812ab61f0", "score": "0.4265358", "text": "public function getHealthStatus()\n {\n if (array_key_exists(\"healthStatus\", $this->_propDict)) {\n if (is_a($this->_propDict[\"healthStatus\"], \"\\Microsoft\\Graph\\Model\\UserExperienceAnalyticsHealthState\") || is_null($this->_propDict[\"healthStatus\"])) {\n return $this->_propDict[\"healthStatus\"];\n } else {\n $this->_propDict[\"healthStatus\"] = new UserExperienceAnalyticsHealthState($this->_propDict[\"healthStatus\"]);\n return $this->_propDict[\"healthStatus\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "463aee7c7a3a565da891fbbc48f33bde", "score": "0.42493367", "text": "public function setLowBatteryMinutes($lowBatteryMinutes = 0) { $this->lowBatteryMinutes = $lowBatteryMinutes; }", "title": "" }, { "docid": "c6319c2e1797f98cf3a98ebd276c86ad", "score": "0.42245737", "text": "public function setUserExperienceAnalyticsMetricHistory($val)\n {\n $this->_propDict[\"userExperienceAnalyticsMetricHistory\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "dccbe955e9d52726a3282bbea4d421a4", "score": "0.41494212", "text": "protected function setHumidity($humidity)\n {\n $this->humidity = (float)$humidity;\n\n return $this;\n }", "title": "" }, { "docid": "f20bb1f0016797b102e8c7510375487d", "score": "0.4144872", "text": "public function getHealth();", "title": "" }, { "docid": "92c205349a5a587a717850c71dc27ef8", "score": "0.41370308", "text": "public static function createFromDiscriminatorValue(ParseNode $parseNode): UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId {\n return new UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId();\n }", "title": "" }, { "docid": "0b7adc60d4d79339bfa88be927db5abb", "score": "0.41211304", "text": "public function setAttendanceHours(float $hours) {\n\t\t$this->attendanceHours = $hours;\n\t}", "title": "" }, { "docid": "a3a0e0e39469e721cfc4140e0cc919d2", "score": "0.41166824", "text": "public function setPercentage($user_id = null){\n if ($user_id == null) $user_id = Yii::app()->user->id;\n if ($this->details == array()) $this->init($user_id);\n \n $maxVal = 0;\n $realVal = 0;\n foreach ($this->details as $detail){\n $maxVal += $detail[\"weight\"];\n \n if ($detail[\"active\"]) $realVal += $detail[\"weight\"];\n }\n \n $perc = 0;\n if ($maxVal) $perc = round($realVal/$maxVal*100);\n \n $stat = UserStat::model()->findByAttributes(array(\"user_id\"=>$user_id));\n if ($stat == null){\n $stat = new UserStat();\n $stat->user_id = $user_id;\n $stat->completeness = 0;\n }\n $stat->completeness = $perc;\n $stat->save();\n \n // add invites\n $user = User::model()->findByPk($user_id);\n if (($user->invitations == 0) && ($stat->completeness > PROFILE_COMPLETENESS_MIN) && ($stat->invites_send == 0)){\n $user->invitations = 5;\n $user->save();\n }\n\n return $perc;\n }", "title": "" }, { "docid": "9b229ef73c2dc9ae46b40e756d51eca0", "score": "0.4113488", "text": "public function setHighScore($highScore)\r\n {\r\n if($highScore > $this->highScore)\r\n {\r\n $this->highScore = $highScore;\r\n }\r\n\r\n }", "title": "" }, { "docid": "ffbf81c9dfff28c75c6d5dc1fe4daa3f", "score": "0.41053882", "text": "public function __construct($numberOfHMetrics)\n {\n $this->numberOfHMetrics = $numberOfHMetrics;\n }", "title": "" }, { "docid": "70689e2909e949f2e5335178dd33ffeb", "score": "0.40999076", "text": "public function setMaximumUptimeHours($maximumUptimeHours = 0) { $this->maximumUptimeHours = $maximumUptimeHours; }", "title": "" }, { "docid": "b7792e8e797342dcbb2e2b25852af39d", "score": "0.4081181", "text": "function setHealth($who, $new_health) {\n\t$dbconn = DatabaseConnection::getInstance();\n\t$statement = DatabaseConnection::$pdo->prepare(\"UPDATE players SET health = :health WHERE player_id = :user\");\n\t$statement->bindValue(':health', $new_health);\n\t$statement->bindValue(':user', $who);\n\t$statement->execute();\n\n\treturn $new_health;\n}", "title": "" }, { "docid": "d900939cae54ca58a4b9488172e58303", "score": "0.40742016", "text": "public function getHealthChange();", "title": "" }, { "docid": "9c5abd78e7bd546a2805190b0a93e840", "score": "0.40730315", "text": "public function getUserExperienceAnalyticsWorkFromAnywhereMetrics()\n {\n if (array_key_exists(\"userExperienceAnalyticsWorkFromAnywhereMetrics\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsWorkFromAnywhereMetrics\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "961558f3bf417a8baa1143b069932b1a", "score": "0.40512514", "text": "public function getUserExperienceAnalyticsAnomalyDevice()\n {\n if (array_key_exists(\"userExperienceAnalyticsAnomalyDevice\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsAnomalyDevice\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "b10b82c80b53ea9b8935f359ada36b90", "score": "0.40391394", "text": "public function setLevelupHeroSkillHero($value)\n {\n return $this->set(self::LEVELUP_HERO_SKILL_HERO, $value);\n }", "title": "" }, { "docid": "c9d0d2dc64646f040d5ad03858227acc", "score": "0.40382197", "text": "public static function setTimedReport($str_hwid, $float_timestamp, $arr_report)\n {\n $classname = self::functionClass($str_hwid);\n self::$_fnByType[$classname]->setTimedReport($str_hwid, $float_timestamp, $arr_report);\n }", "title": "" }, { "docid": "48fec9157124dd1ea952ec715280ff60", "score": "0.40225586", "text": "public function getHealth()\n {\n return $this->health;\n }", "title": "" }, { "docid": "48fec9157124dd1ea952ec715280ff60", "score": "0.40225586", "text": "public function getHealth()\n {\n return $this->health;\n }", "title": "" }, { "docid": "1610b4014c1bd921c10524aacb96f271", "score": "0.40084925", "text": "public function getUserExperienceAnalyticsMetricHistory()\n {\n if (array_key_exists(\"userExperienceAnalyticsMetricHistory\", $this->_propDict)) {\n return $this->_propDict[\"userExperienceAnalyticsMetricHistory\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "07e9bad45b8f42eb5b4caf7c736ab3b7", "score": "0.40013355", "text": "public function setMeasurements(float $temperature, float $humidity, float $pressure){\n\t\t$this->temperature = $temperature;\n\t\t$this->humidity = $humidity;\n\t\t$this->pressure = $pressure;\n\t\t$this->measurementsChanged();\n\t}", "title": "" }, { "docid": "28ab5508253c8d8747f2d8c24077795a", "score": "0.39995658", "text": "public function setHEffectives($hEffectives) {\n $this->hEffectives = $hEffectives;\n return $this;\n }", "title": "" }, { "docid": "15cf590ed2a50356170ef66420cc01b1", "score": "0.3976419", "text": "public function setChsHeight($height)\n {\n $this->chsHeight = (integer) $height;\n }", "title": "" }, { "docid": "b5a723125cd5c8bcbd60613d0cdd8cd9", "score": "0.39731303", "text": "public function update($powerAmmeterChinamobile){\r\n\t\t$sql = 'UPDATE power_ammeter_chinamobile SET station_id = ?, ammeter_normal = ?, ammeter_normal_chinamobile = ?, begin_value = ?, end_value = ?, creator_id = ?, create_time = ? WHERE ammeter_id = ?';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t\r\n\t\t$sqlQuery->setNumber($powerAmmeterChinamobile->stationId);\r\n\t\t$sqlQuery->setNumber($powerAmmeterChinamobile->ammeterNormal);\r\n\t\t$sqlQuery->setNumber($powerAmmeterChinamobile->ammeterNormalChinamobile);\r\n\t\t$sqlQuery->setNumber($powerAmmeterChinamobile->beginValue);\r\n\t\t$sqlQuery->setNumber($powerAmmeterChinamobile->endValue);\r\n\t\t$sqlQuery->setNumber($powerAmmeterChinamobile->creatorId);\r\n\t\t$sqlQuery->setNumber($powerAmmeterChinamobile->createTime);\r\n $sqlQuery->setNumber($powerAmmeterChinamobile->eValue);\r\n\t\t$sqlQuery->setNumber($powerAmmeterChinamobile->ammeterId);\r\n\t\treturn $this->executeUpdate($sqlQuery);\r\n\t}", "title": "" }, { "docid": "a171bee73fbbafcd718ab7ff081855d4", "score": "0.39578995", "text": "public function setSpeed()\n {\n $this->_person->speed = \"fast\";\n }", "title": "" }, { "docid": "5ebe178d66f7095e5a92b1ed5062d5ad", "score": "0.39120328", "text": "public function getLowBatteryMinutes() { return $this->lowBatteryMinutes; }", "title": "" }, { "docid": "ca316e0e0d8dd6999b0552d0c1c0c032", "score": "0.39047536", "text": "public function setTendencyValueData(float $tendencyValue) : void\n {\n $this->tendencyValue = $tendencyValue;\n }", "title": "" }, { "docid": "df3f5ad9cffe14d3e8ee47a6676ee759", "score": "0.3899114", "text": "public function consumeBattery($instruction) {\r\n $before = $this->getBattery();\r\n $consumed = $this->batteryCommandConsume[$instruction];\r\n $after = $before - $consumed; \r\n \r\n $this->setBattery($this->getBattery() - $this->batteryCommandConsume[$instruction]);\r\n }", "title": "" }, { "docid": "8f0e2070a7ad5e10468d97ff43f838a7", "score": "0.38850158", "text": "public function setInstanceHealth($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->setInstanceHealthWithOptions($request, $runtime);\n }", "title": "" }, { "docid": "bfe5b07aa82b2c8aebff4e89764fd907", "score": "0.38668185", "text": "protected function setHealth($health)\n {\n $this->health = $health;\n\n return $this;\n }", "title": "" }, { "docid": "79e8e21f2c251992b2ea29f7dbeb85c1", "score": "0.38613316", "text": "public function Health();", "title": "" }, { "docid": "4f1dd2ebcc2e3b46a4508c6a4eb4e8f7", "score": "0.38466382", "text": "function setThresholdY($thresholdY)\n{\n\t$this->thresholdY = $thresholdY;\n}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "7c50ff67fb98dbe73bf0e253b525c5a5", "score": "0.0", "text": "public function index()\n {\n $products = Product::with('category')->orderByDesc('id')->get();\n\n return view('shop.product.list', compact('products'));\n }", "title": "" } ]
[ { "docid": "5d4e963a8d7919c8e89993bd060a7615", "score": "0.77891225", "text": "public function listAction()\n {\n $this->_messenger = $this->getHelper('MessengerPigeon');\n\n\t\tif ($this->_messenger->broadcast()) {\n\t\t\t// disables the back button for 1 hop\n\t\t\t$this->_namespace->noBackButton = true;\n\t\t\t$this->_namespace->setExpirationHops(1);\n\t\t}\n\n\t\t$this->view->assign(array(\n\t\t\t\t'partialName' => sprintf(\n\t\t\t\t\t'partials/%s-list.phtml', $this->_controller),\n\t\t\t\t'controller' => $this->_controller\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * @var Svs_Controller_Action_Helper_Paginator\n\t\t */\n\t\t$this->_helper->paginator(\n $this->_service->findAll($this->_findAllCriteria),\n $this->_entriesPerPage\n );\n\n\t\t$this->_viewRenderer->render($this->_viewFolder . '/list', null, true);\n }", "title": "" }, { "docid": "1632f74e581286fce11b428cee004b2f", "score": "0.72384894", "text": "public function actionlist()\n {\n $this->render('list',array(\n\n ));\n }", "title": "" }, { "docid": "ec9493ef0340397f64bb67b1aea5887e", "score": "0.71595275", "text": "public function listAction()\r\n {\r\n $modelType = $this->modelType();\r\n $this->view->items = $this->dbService->getObjects($modelType);\r\n $this->renderView($this->_request->getControllerName().'/list.php');\r\n }", "title": "" }, { "docid": "effdeaea4d3380c2ef0732f21651687d", "score": "0.71066624", "text": "public function index()\n {\n $resources = $this->resource->all();\n\n return view('laramanager::resources.index', compact('resources'));\n }", "title": "" }, { "docid": "07362c5ae7e016d5baf6bf3f76e0e81c", "score": "0.7078552", "text": "public function listAction() {\n $this->view->category = $this->category->full_List();\n $this->view->alert = $this->params->alert->toArray();\n $this->view->notfound = $this->params->label_not_found;\n }", "title": "" }, { "docid": "626774f0cb5b1be60be2c6a661bcc11a", "score": "0.70473844", "text": "public function listAction()\n {\n $this->view->headTitle('Vehicle Listing ', 'PREPEND');\n $this->view->vehicles = $this->vehicleService->listService();\n }", "title": "" }, { "docid": "6bcdfec0867dafc8b42448cdcf9d2175", "score": "0.70293266", "text": "public function index(){\n $this->show_list();\n }", "title": "" }, { "docid": "a0e66c2a11450ae99c175dd520d5d27a", "score": "0.7017443", "text": "public function index()\n {\n //list\n $list = $this->model->all();\n //return list view\n return view($this->getViewFolder().\".index\",[\n 'list' => $list,\n 'properties' => $this->model->getPropertiesShow(),\n 'resource' => $this->resource\n ]);\n }", "title": "" }, { "docid": "9bcef73798e00117c331333c00edef00", "score": "0.69753855", "text": "public function index()\n {\n return $this->sendResponse($this->resource::collection($this->model->all()));\n }", "title": "" }, { "docid": "fb56645c022f8b4ee60bad747c7c629b", "score": "0.6944075", "text": "public function actionList() {\n $rows = Bul::model()->findAll();\n $this->render('list', array('rows'=>$rows));\n }", "title": "" }, { "docid": "94eb33a8dc9192b76cda156b58de92e8", "score": "0.69046986", "text": "function index()\n\t\t{\t\n\t\t\t\t//Call show_list by default\n\t\t\t\t$this->show_list();\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "b64b879e653308029c5411df996e30a5", "score": "0.68639064", "text": "public function listAll(){\n $this->render('intervention.list');\n }", "title": "" }, { "docid": "c72ddbe4283fe8d28a198836a20283ca", "score": "0.6857927", "text": "public function listAction()\n {\n $this->_forward('index');\n }", "title": "" }, { "docid": "5959432636f2924b51d09876dd5202b6", "score": "0.68528235", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, ['paginator' => $paginator]);\n\n $parameters = [\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'batch_form' => $this->createBatchForm($this->entity['name'])->createView(),\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ];\n\n return $this->executeDynamicMethod('render<EntityName>Template', ['list', $this->entity['templates']['list'], $parameters]);\n }", "title": "" }, { "docid": "d30c6180099f7dd3b33628d897022777", "score": "0.6819029", "text": "public function show_list() {\n }", "title": "" }, { "docid": "8403a5ff042f4c677d7d939d9b2b750f", "score": "0.68169737", "text": "public function view_crud_list () {\n $this->getResponse()->setData('context', 'crud');\n if($this->getRequest()->getData('action') == 'crud_stats') {\n $this->getCrudinstance()->stats();\n } else {\n $this->getCrudinstance()->listview();\n }\n return;\n }", "title": "" }, { "docid": "01bc93b08e6ad107f9316b34bcad9511", "score": "0.68048567", "text": "public function index()\n\t{\n $resources = Resource::all();\n return View::make('resources.index', compact('resources'));\n\t}", "title": "" }, { "docid": "3389c0d5e9637b099b7cd7e20021ea55", "score": "0.67939425", "text": "public function listsAction()\n {\n // Checks authorization of users\n if (!$this->isGranted('ROLE_DATA_REPOSITORY_MANAGER')) {\n return $this->render('template/AdminOnly.html.twig');\n }\n\n $GLOBALS['pelagos']['title'] = 'Lists Available';\n return $this->render('List/Lists.html.twig');\n }", "title": "" }, { "docid": "e8b936bcbc3c7cd4f66fc62525379e0b", "score": "0.67760646", "text": "public function mylist() {\n $this->render();\n }", "title": "" }, { "docid": "c545ab38f5dbdba7091a7d9ce680b802", "score": "0.67675877", "text": "public function index()\n\t{\n\t\t$subResourceDetails = $this->subResourceDetailRepository->paginate(10);\n\n\t\treturn view('subResourceDetails.index')\n\t\t\t->with('subResourceDetails', $subResourceDetails);\n\t}", "title": "" }, { "docid": "6d63bb11ea8b0a8583e9363e358ff9b7", "score": "0.6752695", "text": "public function index()\n {\n\n $total = isset($this->parameters['total']) ? $this->parameters['total'] : config('awesovel')['total'];\n\n $this->data['collection'] = $this->api('HEAD', 'paginate', $total);\n\n\n return $this->view($this->operation->layout, ['items' => $this->model->getItems()]);\n }", "title": "" }, { "docid": "828fa63f223e081c2e33ac1cee981572", "score": "0.6749301", "text": "public function index()\n {\n $entity = Entity::all();\n return EntityResource::collection($entity);\n }", "title": "" }, { "docid": "e7e46511a4b7697f60b99262a9448541", "score": "0.674787", "text": "public function index(){\n\n $entries = $this->paginate();\n\n $this->set(\"entries\", $entries);\n\n }", "title": "" }, { "docid": "8f58024e3cccac78c2edf40dcdf1d9b5", "score": "0.6738217", "text": "public function index()\n {\n return VideomakerResource::collection(Videomaker::orderBy('sort', 'asc')->get());\n }", "title": "" }, { "docid": "720fa44f82097ad862a1223667f1a4ae", "score": "0.67326105", "text": "public function list()\n {\n $this->vars = array('items' => ['Patrick', 'Claude', 'Pierre', 'André']);\n $this->render('list.php');\n }", "title": "" }, { "docid": "82ffea34883f2d4ec003859ff27130f4", "score": "0.6717062", "text": "public function index()\n {\n // Get results\n $results = Result::orderBy('created_at', 'desc')->get();\n\n // Return collection of results as a resource\n return ResultResource::collection($results);\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "174e07a1688ac732f0e66ae6d8398d84", "score": "0.6711562", "text": "public function index()\n {\n // list\n }", "title": "" }, { "docid": "1ca180cd47a9c5ba1d48b4b6c9917a8e", "score": "0.6701197", "text": "public function index()\n {\n $resources = Ressource::orderby('created_at','DESC')->get();;\n return RessourceR::collection($resources);\n }", "title": "" }, { "docid": "443c1ed051c412c645eecf92a9792f61", "score": "0.6685732", "text": "public function listAction()\n {\n $request=$this->getRequest();\n $requestUtil=$this->getRequestUtil();\n \n $pageRequestData=$requestUtil->getPageRequestDataFrom($request);\n $dataPage=$this->getSystemUserManager()->findPageFrom($pageRequestData);\n \n return $requestUtil->defaultListJsonResponse($dataPage->getData(), $dataPage->getTotalRecords());\n }", "title": "" }, { "docid": "3e2213e2e64e6d315c5f7f2b9390d5af", "score": "0.66802585", "text": "public function index()\n {\n return $this->showAll();\n }", "title": "" }, { "docid": "d387587609cbbdf03cfc0669056e5bc7", "score": "0.66796803", "text": "public function action_list()\n\t{\n\t\t$client = Model::factory('Client');\n\t\t$rs = $client->select()\n\t\t\t//->select('id', 'name', 'email', 'phone', 'is_active')\n\t\t\t->order_by('name')\n\t\t\t->execute();\n\t\t$client_data = $rs->as_array();\n\t\t\n\t\t// Remap client data for JS lookup\n\t\t$client_details = array();\n\t\tforeach($client_data as $item) {\n\t\t\t$client_details[$item['id']] = $item;\n\t\t}\n\t\t\n\t\t$view = View::factory('client/list');\n\t\t$view->set('client_data', $client_data);\n\t\t$view->set('client_details', $client_details);\n\t\t$this->response->body($view);\n\t}", "title": "" }, { "docid": "dd7ea5bccadd522adc846631298726c5", "score": "0.6678547", "text": "public function index()\n {\n return RecordResource::collection(\n auth()->user()->records()->paginate(config('general.pagination.perPage'))\n );\n }", "title": "" }, { "docid": "bf724845d7b3ef1d4914762d244fb1ab", "score": "0.6675193", "text": "public function listAction()\n {\n $limit = isset($_GET['limit']) ? (int)$_GET['limit'] : PostDB::LIMIT;\n $offset = isset($_GET['offset']) ? (int)$_GET['offset'] : 0;\n\n return $this->render([\n 'posts' => $this->model->fetchList($limit, $offset),\n 'limit' => $limit,\n 'offset' => $offset,\n 'totalPosts' => $this->model->count(),\n 'alert' => $this->getAlerts(['post_created', 'post_deleted', 'post_updated'])\n ]);\n }", "title": "" }, { "docid": "a8301ed92dc9170afd4b6448fca5d0f3", "score": "0.6674207", "text": "public function index()\n {\n $products = Product::paginate(100);\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "1fd7963662b3e9d8e35a3c5a837bbc57", "score": "0.6667426", "text": "public function listAction()\n {\n $configName = filter_var($_GET['name'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);\n\n $trieurConfig = $this->getConfig($configName);\n\n $this->view->name = $configName;\n $this->view->title = isset($trieurConfig['title']) ? $trieurConfig['title'] : '';\n\n $this->view->breadCrumbs[] = [\n 'title' => $this->view->title,\n 'url' => FrontController::getCurrentUrl(),\n ];\n }", "title": "" }, { "docid": "0fe4e291e7634c2aeb63063cd376272f", "score": "0.6666447", "text": "public function index()\n {\n // $this->authorize('all', User::class);\n \n $allResources = Resource::all();\n\n $view_elements = [];\n \n $view_elements['allResources'] = $allResources; \n $view_elements['page_title'] = 'Resources'; \n $view_elements['component'] = 'resources'; \n $view_elements['menu'] = 'resources'; \n $view_elements['breadcrumbs']['All Resources'] = array(\"link\"=>'/resources',\"active\"=>'1');\n \n \n $view = viewName('resources.all');\n return view($view, $view_elements);\n }", "title": "" }, { "docid": "333a397f407728909d14c6eb4e496493", "score": "0.664738", "text": "public function listingAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SettingContentBundle:News')->findBy(array(),array('name' => 'asc'));\n\n return $this->render('SettingContentBundle:News:index.html.twig', array(\n 'pagination' => $entities,\n ));\n }", "title": "" }, { "docid": "905f7fbfbb2fff73099979bdf45d3db6", "score": "0.66408366", "text": "public function list() {\n //kalau HRD pusat bisa milih dari cabang mana saja\n //kalau HRD cabang cuma list document masuk yg ada di cabang doang.\n }", "title": "" }, { "docid": "81a9d2c3f66799032c4d7ddc8ee3e2ef", "score": "0.6629056", "text": "public function list() {\n include '../templates/driver/list.html.php';\n }", "title": "" }, { "docid": "e4852525485e4ed47dcb985523ad108d", "score": "0.6627158", "text": "public function listAction(){\n\t\t$view = Zend_Registry::get('view');\n\t\t$table = new Mae();\n\t\t$table->getCollection();\n\t\t$this->_response->setBody($view->render('default.phtml'));\n\t}", "title": "" }, { "docid": "728b150b646c20e91cdcb0b476ee8df4", "score": "0.6626183", "text": "public function listAction()\n {\n if (false === $this->admin->isGranted('LIST')) {\n throw new AccessDeniedException();\n }\n\n $datagrid = $this->admin->getDatagrid();\n $formView = $datagrid->getForm()->createView();\n\n // set the theme for the current Admin Form\n $this->get('twig')->getExtension('form')->renderer->setTheme($formView, $this->admin->getFilterTheme());\n\n if(isset($_GET['activityId'])){\n $activityId = $_GET['activityId'];\n $em = $this->getDoctrine()->getManager();\n $activity = $em->getRepository('ZesharCRMCoreBundle:Activity')->findOneBy(array('id' => $activityId));\n $activityTitle = $activity->getTitle();\n }\n\n return $this->render($this->admin->getTemplate('list'), array(\n 'action' => 'list',\n 'form' => $formView,\n 'datagrid' => $datagrid,\n 'csrf_token' => $this->getCsrfToken('sonata.batch'),\n 'pageTitle' => $activityTitle ? $activityTitle : '',\n ));\n }", "title": "" }, { "docid": "03690e7a09f22de0d26d268d13653dd8", "score": "0.6626126", "text": "function index(){\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "0cfc4663300d21f5b0e90285019bc71a", "score": "0.66242784", "text": "public function indexAction() {\n $locationFieldEnable = Engine_Api::_()->getApi('settings', 'core')->getSetting('list.locationfield', 1);\n if ( empty($locationFieldEnable) ) {\n return $this->setNoRender();\n }\n\n $items_count = $this->_getParam('itemCount', 5);\n\n //GET LIST LIST FOR MOST RATED\n $this->view->listLocation = Engine_Api::_()->getDbTable('listings', 'list')->getPopularLocation($items_count);\n\n //DONT RENDER IF LIST COUNT IS ZERO\n if (!(count($this->view->listLocation) > 0)) {\n return $this->setNoRender();\n }\n\n $this->view->searchLocation = null;\n if (isset($_GET['list_location']) && !empty($_GET['list_location'])) {\n $this->view->searchLocation = $_GET['list_location'];\n\t\t}\n }", "title": "" }, { "docid": "90baaa24c8a589876a1c98f625e68458", "score": "0.6623648", "text": "public function index()\n {\n $categories = BusinessCategory::all();\n $listings = BusinessListingResource::collection(BusinessListing::all());\n return Inertia::render('Admin/BusinessListing', ['categories'=> $categories, 'listings'=>$listings]);\n }", "title": "" }, { "docid": "75a5bb13804a5d6235a9088089fdf3dc", "score": "0.6607636", "text": "public static function list()\n {\n if (isset($_POST[\"search\"])) {\n foreach ($_POST[\"search\"] as $key => $value) {\n $queryOptions[\"$key LIKE\"] = \"%$value%\";\n }\n };\n static::render(\"list\", [\n 'entities' => static::getDao()::findAll()\n ]);\n }", "title": "" }, { "docid": "a8073549d697653019630bfd5b2ce4f4", "score": "0.6607086", "text": "public function listAction() {\n\t\t$this->view->liste = Category::getInstance()->fetch();\n\t}", "title": "" }, { "docid": "ca1737541b9936d406a94bdf9aa8a617", "score": "0.65998626", "text": "public function index()\n {\n $cat = Category::paginate(10);\n\t\treturn CategoryResources::collection($cat);\n }", "title": "" }, { "docid": "9053e22130cf25ad82ec7601e536a4b4", "score": "0.65884763", "text": "public function index()\n\t{\n\t\t$subResourceDetailAudios = $this->subResourceDetailAudioRepository->paginate(10);\n\n\t\treturn view('subResourceDetailAudios.index')\n\t\t\t->with('subResourceDetailAudios', $subResourceDetailAudios);\n\t}", "title": "" }, { "docid": "c7230f7fbeb33b3a78b09ad92bcf4b13", "score": "0.6586963", "text": "public function index()\n {\n $article=Booklover::paginate(10);\n //return collection of articles as resource\n return BookloverResource::collection($article);\n }", "title": "" }, { "docid": "ad00df27d12646f83d77fce9a7bb953d", "score": "0.6586538", "text": "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n \t$em = $this->getDoctrine()->getManager();\n \t$oRepRobot = $em->getRepository('BoAdminBundle:Robot');\n\t\t$nb_tc = $oRepRobot->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$robots = $em->getRepository('BoAdminBundle:Robot')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n \treturn $this->render('robot/index.html.twig', array(\n \t\t'robots' => $robots,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"tools\",\n\t\t\t'sm'=>\"robot\",\n \t));\n }", "title": "" }, { "docid": "bc61607b7973a96af644a943e09c1e49", "score": "0.65858775", "text": "public function listAction(): void\n {\n $demand = $this->getRequestArgument('demand') ?: $this->getDemand(true);\n\n // Get posts depending on demand object\n $posts = $this->getRequestArgument('posts') ?: RepositoryService::getPostRepository()->findByDemand($demand);\n\n // Set list id\n if ($demand->getListId() === 0) {\n $demand->setListId($this->contentData['uid']);\n }\n\n // Create pagination\n $itemsPerPage = $this->settings['items_per_stages'] ?: $this->settings['post']['list']['itemsPerStages'] ?: '6';\n $pagination = GeneralUtility::makeInstance(Pagination::class, $posts, $demand->getStage(), $itemsPerPage, $this->settings['max_stages']);\n\n // Pass variables to the fluid template\n $this->view->assignMultiple([\n 'pagination' => $pagination,\n 'demand' => $demand,\n 'posts' => $posts\n ]);\n }", "title": "" }, { "docid": "54716cd3af1f040766e6972b2709f836", "score": "0.6585739", "text": "public function index()\n {\n $lists = $this->shareRepository->lists();\n\n return $this->respond($lists , new ShareTransformer);\n }", "title": "" }, { "docid": "6a06fa8c4288da120ae96f4207dfe6a2", "score": "0.65765756", "text": "public function index()\n {\n $dummies=dummy::paginate(10);\n\n return dummyResource::collection($dummies);\n }", "title": "" }, { "docid": "1d717f725bf8e320ff8af8985fc9e146", "score": "0.6575916", "text": "public function all(){\n $products = $this->product->getProducts();\n\n $data['products'] = $products;\n\n $this->render('list', $data);\n }", "title": "" }, { "docid": "ac951f46baeea8952ab1bf72102e758d", "score": "0.6571351", "text": "public function indexAction($pageNumber)\n {\n\t$connectedUser = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n $userContext = new UserContext($em, $connectedUser); // contexte utilisateur\n\n $resourceRepository = $em->getRepository('SDCoreBundle:Resource');\n\n $numberRecords = $resourceRepository->getResourcesCount($userContext->getCurrentFile());\n\n $listContext = new ListContext($em, $connectedUser, 'core', 'resource', $pageNumber, $numberRecords);\n\n $listResources = $resourceRepository->getDisplayedResources($userContext->getCurrentFile(), $listContext->getFirstRecordIndex(), $listContext->getMaxRecords());\n \n return $this->render('SDCoreBundle:Resource:index.html.twig', array(\n 'userContext' => $userContext,\n 'listContext' => $listContext,\n\t\t'listResources' => $listResources));\n }", "title": "" }, { "docid": "b7e9ea6b80279bc7feede5632a90202e", "score": "0.65709573", "text": "public function resourcesList(){\r\n\t\t$type = $this->view->getVariable(\"currentusertype\");\r\n\t\tif ($type != \"administrador\") {\r\n\t\t\tthrow new Exception(i18n(\"You must be an administrator to access this feature.\"));\r\n\t\t}\r\n\t\t// Guarda todos los recursos de la base de datos en una variable.\r\n\t\t$resources = $this->resourceMapper->findAll();\r\n\t\t$this->view->setVariable(\"resources\", $resources);\r\n\t\t// Se elige la plantilla y renderiza la vista.\r\n\t\t$this->view->setLayout(\"default\");\r\n\t\t$this->view->render(\"resources\", \"resourcesList\");\r\n\t}", "title": "" }, { "docid": "bccc75a4abe2c6c3bd9fc15d85ca4be6", "score": "0.657009", "text": "public function listAction ()\n {\n $dbAlbums = $this->_albumsMapper->fetchAllDesc();\n $albums = array();\n foreach ($dbAlbums as $dbAlbum) {\n /* @var $dbAlbum Application_Model_Album */\n $album = array();\n $album['id'] = $dbAlbum->getId();\n $album['name'] = $dbAlbum->getName();\n $album['folder'] = $dbAlbum->getFolder();\n $path = self::GALLERY_PATH . $album['folder'];\n $counter = 0;\n if (file_exists($path)) {\n foreach (scandir($path) as $entry) {\n $entrypath = $path . '/' . $entry;\n if (! is_dir($entrypath)) {\n $finfo = new finfo();\n $fileinfo = $finfo->file($entrypath, FILEINFO_MIME_TYPE);\n if (in_array($fileinfo, $this->image_types)) {\n $counter ++;\n }\n }\n }\n }\n $album['pictures'] = $counter;\n $albums[] = $album;\n }\n $this->view->albums = $albums;\n return;\n }", "title": "" }, { "docid": "d3246fb2ff9e0523d1570475de5151d9", "score": "0.65691483", "text": "public function listing()\n {\n\n // check the acl permissions\n if( !$this->acl->access( array( 'daidalos/projects:access' ) ) )\n {\n $this->errorPage( \"Permission denied\", Response::FORBIDDEN );\n return false;\n }\n\n // check the access type\n if( !$view = $response->loadView( 'table_daidalos_projects', 'DaidalosProjects' ) )\n return false;\n\n $view->display( $this->getRequest(), $this->getFlags( $this->getRequest() ) );\n\n\n }", "title": "" }, { "docid": "81af47766ea10675d82eb09c7177c488", "score": "0.65669", "text": "public function lists()\n\t{\n\t\treturn View::make(\"loan.list\");\n\t}", "title": "" }, { "docid": "80fe37cd073c0845deb3f2f3dc56f953", "score": "0.6564314", "text": "public function _list() {\n return $this->run('list', array());\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "f32df56cd8eb057e778dd688838ae6e1", "score": "0.6558956", "text": "public function index() {\n $fds = FactoryDevice::paginate(50);\n return FactoryDeviceResource::collection($fds);\n }", "title": "" }, { "docid": "2d830a7f9271146c892f5525ff06cba8", "score": "0.6546971", "text": "public function index()\n {\n save_resource_url();\n //$items = VideoRecordPlaylist::with(['category', 'photos'])->get();\n $items = VideoRecordPlaylist::all();\n\n return $this->view('video_records.playlists.index', compact('items'));\n }", "title": "" }, { "docid": "592ef21e8cf01343d8f7bf69f6571783", "score": "0.65467274", "text": "public function listAction() {\n\ttry {\n\t\t$page = new Knowledgeroot_Page($this->_getParam('id'));\n\t} catch(Exception $e) {\n\t\t// redirect to homepage on error\n\t\t$this->_redirect('');\n\t}\n\n\t$contents = Knowledgeroot_Content::getContents($page);\n\t$files = array();\n\n\t// get files for each content\n\tforeach($contents as $value) {\n\t $files[$value->getId()] = Knowledgeroot_File::getFiles(new Knowledgeroot_Content($value->getId()));\n\t}\n\n\t// set page for view\n\t$this->view->id = $page->getId();\n\t$this->view->title = $page->getName();\n\t$this->view->subtitle = $page->getSubtitle();\n\t$this->view->description = $page->getDescription();\n\t$this->view->contentcollapse = $page->getContentCollapse();\n\t$this->view->showpagedescription = $page->getShowContentDescription();\n\t$this->view->showtableofcontent = $page->getShowTableOfContent();\n\n\t// set contents for view\n\t$this->view->contents = $contents;\n\n\t// set files for view\n\t$this->view->files = $files;\n }", "title": "" }, { "docid": "ec0437b332d8ab59b1dc12514564cf24", "score": "0.65349644", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $collections = $em->getRepository(Collection::class)->findAll();\n\n return $this->render('CollectionBundle::index.html.twig', array(\n 'collections' => $collections,\n ));\n }", "title": "" }, { "docid": "e28f7ac3556efbf46ef07a458594e0f4", "score": "0.6534658", "text": "public function listView()\r\n {\r\n $todosResults = $this->AdminToDoModel->getTodos();\r\n $todos = $todosResults['records'];\r\n echo json_encode(array(\r\n 'pagination' => $todosResults['pagination'],\r\n 'total_pages' => $todosResults['total_pages'],\r\n 'list' => $this->load->view('admin/todos/item', compact('todos'), TRUE),\r\n ));\r\n }", "title": "" }, { "docid": "d2551d513444995f440c040295b5f79a", "score": "0.6531914", "text": "public function listAction() {\n\t\t$newsRecords = $this->newsRepository->findList();\n\n\t\t$this->view->assign('news', $newsRecords);\n\t}", "title": "" }, { "docid": "7ff71fea74a014e23f3059d0628ca0c1", "score": "0.652987", "text": "public function index()\n {\n return view('resources/index', [\n 'categories' => ResourceCategory::all()\n ]);\n }", "title": "" }, { "docid": "e6a4c98ba5c74f530846a0e2799e83cd", "score": "0.65274894", "text": "public function indexAction() {\n\t\t$this->_forward('list');\n\t}", "title": "" }, { "docid": "13c10da740abbcd8b1714424cd80b7f0", "score": "0.6523997", "text": "public function index()\n\t{\n\t\t$tools = Tool::paginate(12);\n\n\t\treturn view( self::$prefixView . 'lists', compact('tools'));\n\t}", "title": "" }, { "docid": "8658a767a07d5f3d222e30b3461f8908", "score": "0.6519245", "text": "public function index() {\n\n\t\tself::init();\n\n\t\t$result = $this->_dbTable->paginatorCat(\n\t\t\t$this->_paginatorParams,\t\t\t\n\t\t\t$offset = $this->_list, \n\t\t\t$limit = 50,\n\t\t\t$this->_lang\n\t\t);\n\n\t\t$this->registry['layout']->sets(array(\n\t\t\t'titleMenu' => $this->translate->translate('Pages'),\n\t\t\t'content' => $this->_content.'index.phtml',\n\t\t\t'records' => $result['records'],\n\t\t\t'paginator' => $result['paginator'],\n\t\t));\t\n\t\t$this->registry['layout']->view();\t\n\t}", "title": "" }, { "docid": "b4ddd46c2382d5ddf2a44ea188de6a3b", "score": "0.6519022", "text": "public function actionIndex()\n {\n $dataProvider = (new Route())->search();\n return $this->render('index', ['dataProvider' => $dataProvider]);\n }", "title": "" }, { "docid": "116c403ea907dd01837aaf78536361f2", "score": "0.6515897", "text": "public function actionListing()\n {\n require_once Yii::app()->basePath . '/vendor/facebook-php-sdk/src/facebook.php';\n $fb = new Facebook(array(\n 'appId' => '894567207287021',\n 'secret' => 'cf43d6c081acaed16c908cac9d49bc07',\n ));\n $model = new FacebookModel();\n $customer = $model->setCustomer($fb);\n $getLikes = $model->getLikes($fb);\n $this->render('list',array('data'=>array('customer' => $customer, 'getLikes' => $getLikes)));\n }", "title": "" }, { "docid": "e3cdc4c3d9ae3aaa6a0cd5478456a58d", "score": "0.65145594", "text": "public function index()\n {\n return UnityResource::collection(Unity::paginate());\n }", "title": "" }, { "docid": "bc53de285b94ddd2a447a5820f5b4765", "score": "0.65121585", "text": "public function listing($route) {\n\t\t$this->render_view('listing', null);\n\t}", "title": "" }, { "docid": "9e06846e2f6d2e1269338eadf8e0b894", "score": "0.6510727", "text": "public function index()\n {\n $categories = Category::paginate(10);\n return CategoryResource::collection($categories);\n }", "title": "" }, { "docid": "d3708a38680b59bc16eca3c31b86b78d", "score": "0.6510369", "text": "public function index()\n {\n $abonnes = AbonneModel::all();\n $count = AbonneModel::count();\n //$this->debug($abonnes);\n $this->render('app.abonne.listing',array(\n // faire passer les abonnes à la vue dans view/app/abonne/listing.php\n 'abonnes' => $abonnes,\n 'count' => $count\n ));\n }", "title": "" }, { "docid": "7a4839b9dce0e81aa7d22a30b5050ba1", "score": "0.65067625", "text": "public function index()\n {\n return View::make('pages.listing')->with([\n 'listings' => Listing::all()\n ]);\n }", "title": "" }, { "docid": "9574404dd05ce3c2611ce508bd896204", "score": "0.6504046", "text": "public function indexAction() {\n $this->_forward('list');\n }", "title": "" }, { "docid": "b3002ffdca77085e05c201d4c8cb1e99", "score": "0.6501504", "text": "public function showList()\n\t{\n\t\t$query_params = $this->getQueryParams();\n\n\t\t// Get all biblio entities that match our query string params\n\t\t$query = new EntityFieldQuery();\n\t\t$query->entityCondition('entity_type', 'biblio');\n\t\tforeach ($query_params as $field => $value) {\n\t\t\t$query->fieldCondition($field, 'value', $value, 'like');\n\t\t}\n\n\t\t$result = reset($query->execute());\n\n\t\t// Create an array of IDs from the result\n\t\tforeach ($result as $entity_data) {\n\t\t\t$this->data['document_ids'][] = $entity_data->bid;\n\t\t}\n\n\t\t$this->outputJSON();\n\t}", "title": "" }, { "docid": "8f4a27465d71a62a589ec5adaeb0986b", "score": "0.64991456", "text": "public function index()\n {\n $todos = Todo::orderBy('created_at', 'DESC')->get();\n return TodoResource::collection($todos);\n }", "title": "" }, { "docid": "dc0149898375c89e944c9a4e88c4c3a8", "score": "0.6499016", "text": "public function index()\n {\n $table = item::all();\n return view('list')->with('table', $table);\n }", "title": "" }, { "docid": "3bcd0d0bc609b30833a686c0ca043c6e", "score": "0.6498308", "text": "public function index()\n {\n $links = Link::all();\n\n return LinkResource::collection($links);\n }", "title": "" }, { "docid": "046c051adc81c4edc84279daf9165d00", "score": "0.64961153", "text": "public function index() {\n\t\t$this->paginate = array(\n\t\t\t\t'limit' => 6,\n\t\t\t\t'order' => 'Listing.last_mod DESC'\n\t\t);\n\t\t//debug($this->params);\n\t\t$cond = $this->searchCriteria($this->params['data'], $this->params['pass'], $this->params['named']);\n\t\t$lt = $this->paginate('Listing', $cond);\n\t\t$this->getAddress($lt);\n\t\t$this->getListingPrice($lt);\n\t\t$this->set('listings', $lt);\n\t\t$this->set('GetMapListingData', $this->GetMapListingData($lt));\n\t\t$this->set('search_title', $this->searchTitle($this->params['pass']));\n\t\t$this->set('heading', $this->pageHeading($this->params['pass']));\n\t\t$this->set('bodyClass', 'listings');\n\t\t$this->render('listings');\n\t}", "title": "" }, { "docid": "b3705b62ffca7af4878e295922e07f4b", "score": "0.6494691", "text": "public function index()\n {\n $categories = Category::all();\n\n\t\treturn CategoryResource::collection($categories);\n }", "title": "" }, { "docid": "2acb8764426117ce1e24a4dffeca03b3", "score": "0.6488265", "text": "public function getList() {\n $pages = PageModel::getList();\n\n $this->renderView( $pages );\n }", "title": "" }, { "docid": "19401e81d482911677b86104e4316af5", "score": "0.6483004", "text": "public function index()\n {\n return ClientResource::collection(Client::paginate(5));\n }", "title": "" }, { "docid": "5053d441932d8864d4bf822f4564836c", "score": "0.64802396", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $this->service->openConnection();\n $users =$this->service->retrieveAllClientUsers($page);\n $this->view->users = $users;\n $this->view->paginator = $this->service->getPaginator($page);\n }", "title": "" }, { "docid": "984e2e8264667b3d8e5fbfff39850e73", "score": "0.64776826", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $books = $em->getRepository('AppBundle:Book')->findAllOrderedByName();\n\n return $this->render('dashboard/listBook.html.twig', ['books' => $books]);\n }", "title": "" }, { "docid": "c8bce961d8c00f94db1cc45bb581d8eb", "score": "0.6476608", "text": "public function index()\n {\n $products = Product::all();\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "5fc2cbaa57895f367e3994638939768f", "score": "0.6475312", "text": "public function fetchlistAction(){}", "title": "" }, { "docid": "221cee52eb0850b671832164d9811aa5", "score": "0.64749444", "text": "public function listAction() {\n }", "title": "" }, { "docid": "f19185733d416e8afe327cca78be3112", "score": "0.64742154", "text": "public function index()\n {\n // returns the latest inventory info and constricts the page to entries\n return Inventory::latest()->paginate(10);\n }", "title": "" }, { "docid": "548f4f0a081099012cd8664830d71f5f", "score": "0.6473625", "text": "public function index()\n {\n $books = Book::paginate(1);\n return view('admin.books.book-lists', compact('books'));\n }", "title": "" }, { "docid": "ed4ac6060cb66e23543b207ea1f66b10", "score": "0.6470538", "text": "public function index()\n {\n $shops = Shop::paginate(20);\n return ShopResource::collection($shops);\n }", "title": "" }, { "docid": "207685ef95ff8434191b610cea3c73d5", "score": "0.6470286", "text": "public function index()\n {\n $items = $this->itemService->all();\n\n return JsonResource::collection($items);\n }", "title": "" }, { "docid": "4e5084aa458aae2dccdd7bdb7ebbdaf1", "score": "0.6469868", "text": "public function indexAction() {\n $this->view->headTitle('Lista zarejestrowanych obiektów');\n $request = $this->getRequest();\n \n $qb = $this->_helper->getEm()->createQueryBuilder();\n $qb->select('c')\n ->from('\\Trendmed\\Entity\\Clinic', 'c');\n $qb->setMaxResults(50);\n $qb->setFirstResult(0);\n \n $query = $qb->getQuery();\n \n \n $paginator = new Paginator($query, $fetchJoin = true);\n $this->view->paginator = $paginator;\n }", "title": "" }, { "docid": "f8cb4b5b72a3f7046a46ff5e92d156e6", "score": "0.6469414", "text": "public function allAction()\n {\n /* Getting total questions number */\n $totalQuestions = Question::count();\n\n /* Getting current user's data */\n $user = Auth::getUser();\n\n /* Adding pagination */\n $paginator = new Paginator($_GET['page'] ?? 1, $this->config->per_page_user, $totalQuestions, '/questions/all?page=(:num)');\n\n /* Getting questions list */\n $questions = Question::get([\n 'offset' => $paginator->offset, \n 'limit' => $paginator->limit,\n 'order_by' => $this->sortTypeColumn,\n 'order_type' => 'DESC',\n 'current_user' => $user\n ]);\n\n /* Load view template */\n View::renderTemplate('Questions/stream.twig',[\n 'this_page' => [\n 'title' => 'All Questions',\n 'menu' => 'questions_all',\n 'url' => 'questions/all',\n 'order_name' => $this->sortTypeName,\n ],\n 'questions' => $questions,\n 'paginator' => $paginator,\n 'total_questions' => $totalQuestions,\n ]);\n }", "title": "" }, { "docid": "f9d8426baa3f2a5993b5c1f018099562", "score": "0.64684117", "text": "public function resources_index()\n\t{\n\t\t$init = new admin_model();\n\t\t$resources = $init->getAllResources()->getResultArray();\n\n\t\t$menus = $init->getAllMenu()->getResultArray();\n\t\t$this->data = ['menus' => $menus, 'resources' => $resources];\n\t\treturn view('admin' . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'index', $this->data);\n\t}", "title": "" } ]
5afc77b257454ad5b7af7a5c43eeb659
this up() migration is autogenerated, please modify it to your needs
[ { "docid": "36d435f4529bf55c3ed82acc011b8758", "score": "0.0", "text": "public function up(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE category (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\n $this->addSql('CREATE TABLE games_category (games_id INT NOT NULL, category_id INT NOT NULL, INDEX IDX_AF4B7EFD97FFC673 (games_id), INDEX IDX_AF4B7EFD12469DE2 (category_id), PRIMARY KEY(games_id, category_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\n $this->addSql('ALTER TABLE games_category ADD CONSTRAINT FK_AF4B7EFD97FFC673 FOREIGN KEY (games_id) REFERENCES games (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE games_category ADD CONSTRAINT FK_AF4B7EFD12469DE2 FOREIGN KEY (category_id) REFERENCES category (id) ON DELETE CASCADE');\n }", "title": "" } ]
[ { "docid": "bb38fb8ac2f09e505dec3fa7ae2f7a52", "score": "0.82252175", "text": "abstract public function migrationUp();", "title": "" }, { "docid": "c843feb5cfdf27da4bd79bf943cfe611", "score": "0.8114191", "text": "public function up(){}", "title": "" }, { "docid": "20b3078116cca0d8f0cbce1a8d663632", "score": "0.791459", "text": "abstract public function up();", "title": "" }, { "docid": "0db52ef664583eb946b30d69ae1eff85", "score": "0.78283167", "text": "private function up() {\n }", "title": "" }, { "docid": "2b6b08a052405f52f7571399eebafe14", "score": "0.7805932", "text": "abstract function up();", "title": "" }, { "docid": "22838c05881b0e27de950521bde109da", "score": "0.7748111", "text": "public function up(){\n \n }", "title": "" }, { "docid": "38ce4802a1e1a837e264c2c1ec46b717", "score": "0.7678377", "text": "public function up()\n\t{\n\t\t$this->execute(\"\n ALTER TABLE `vvoy_voyage` \n ADD COLUMN `vvoy_fuel_tank_start` SMALLINT UNSIGNED NULL COMMENT 'fuel in tank at start voyage' AFTER `vvoy_notes`,\n ADD COLUMN `vvoy_fuel_tank_end` SMALLINT UNSIGNED NULL COMMENT 'fuel in tank at end voyage' AFTER `vvoy_fuel_tank_start`,\n ADD COLUMN `vvoy_fuel_tank_start_amt` DECIMAL(10,2) NULL AFTER `vvoy_fuel_tank_end`,\n ADD COLUMN `vvoy_fuel_tank_end_amt` DECIMAL(10,2) NULL AFTER `vvoy_fuel_tank_start_amt`, \n ADD COLUMN `vvoy_odo_start` INT NULL AFTER `vvoy_fuel_tank_end_amt`,\n ADD COLUMN `vvoy_odo_end` INT NULL AFTER `vvoy_odo_start`,\n ADD COLUMN `vvoy_fuel` SMALLINT UNSIGNED NULL AFTER `vvoy_fuel_tank_end_amt`,\n ADD COLUMN `vvoy_fuel_amt` DECIMAL(10,2) NULL AFTER `vvoy_fuel`, \n ADD COLUMN `vvoy_abs_odo_start` INT NULL AFTER `vvoy_fuel_amt`,\n ADD COLUMN `vvoy_abs_odo_end` INT NULL AFTER `vvoy_abs_odo_start`,\n ADD COLUMN `vvoy_mileage` SMALLINT NULL AFTER `vvoy_abs_odo_end`;\n \");\n\t}", "title": "" }, { "docid": "aada49026494ddf8b1bf8aa4bd510e69", "score": "0.76614517", "text": "public function up()\n\t{\n\t\t$this->execute(\"\n ALTER TABLE `vfue_fuel` \n ADD COLUMN `vfue_ppxd_id` INT UNSIGNED NULL COMMENT 'Payment card, advance' AFTER `vfue_amt`,\n ADD FOREIGN KEY (`vfue_ppxd_id`) REFERENCES `ppxd_person_x_document`(`ppxd_id`);\n \");\n\t}", "title": "" }, { "docid": "627326097197ff042404b56d31587847", "score": "0.7596341", "text": "public function up();", "title": "" }, { "docid": "ead4a8b96b3dfc35936b5a6efee5c639", "score": "0.75758433", "text": "public function up()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5780227a76b21886c3a95fff8f865373", "score": "0.7534413", "text": "public static function up()\n {\n DB::table(self::NAME)\n ->create(function (DBTableBuilder $table) {\n $table->field('id')->int()->increment();\n $table->field('userid')->int();\n $table->field('orgid')->int();\n $table->field('category')->varchar();\n $table->field('name')->varchar();\n $table->field('description')->varchar();\n $table->field('amount')->int();\n $table->field('manufacturer')->varchar();\n $table->field('serial_no')->varchar();\n $table->field('size')->varchar();\n $table->field('location')->varchar();\n $table->field('longitude')->varchar();\n $table->field('latitude')->varchar();\n $table->field('quantity')->varchar();\n $table->field('table_type')->int();\n $table->field('asset')->int();\n });\n }", "title": "" }, { "docid": "471a0826985d5899080c777de24d5c6e", "score": "0.75248104", "text": "public function up()\n\t{\n\t\techo __CLASS__ . \" migration up.\\n\";\n\t\treturn parent::up();\n\t}", "title": "" }, { "docid": "146301593bf3fded0c6593c75adc3cbe", "score": "0.7490243", "text": "public function up()\n {\n $tblMess = $this->table('tbl_master_message', [\n 'id' => false,\n 'primary_key' => ['id']\n ]);\n $tblMess->addColumn('id', 'integer', [\n 'autoIncrement' => true,\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ])\n ->addPrimaryKey(['id'])\n ->addColumn('from_id', 'integer')\n ->addColumn('to_id', 'integer')\n ->addColumn('talk_id', 'integer')\n ->addColumn('body', 'text')\n ->addColumn('is_new', 'string', array('limit' => 1,'default'=>'y'))\n ->addColumn('from_user_info', 'text')\n ->addColumn('to_user_info', 'text')\n ->addColumn('created', 'datetime',['default'=> \"CURRENT_TIMESTAMP\"])\n ->addColumn('modified', 'datetime', array('null' => true,'default'=>null))\n ->save();\n\n }", "title": "" }, { "docid": "b8c1ecf0c3bb205890a2417e6b1c4a24", "score": "0.74733543", "text": "public abstract function up();", "title": "" }, { "docid": "8c0dbb97481e05978039cf862b3e6400", "score": "0.74458337", "text": "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY',\n 'type_id' => Schema::TYPE_SMALLINT. '(1) NOT NULL DEFAULT 1',\n 'name' => Schema::TYPE_STRING. ' NOT NULL COMMENT \"Тип доставки и оплаты\"',\n 'price' => Schema::TYPE_STRING. ' NOT NULL COMMENT \"Стоимость\"',\n 'for_kiev' => Schema::TYPE_SMALLINT. '(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"Для Киева\"',\n 'for_regions' => Schema::TYPE_SMALLINT. '(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"Для регионов\"',\n 'visible' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL DEFAULT 1 COMMENT \"Отображать\"',\n 'position' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL DEFAULT 0 COMMENT \"Позиция\"',\n 'created' => Schema::TYPE_DATETIME. ' NOT NULL COMMENT \"Создано\"',\n 'modified' => Schema::TYPE_DATETIME. ' NOT NULL COMMENT \"Обновлено\"',\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n }", "title": "" }, { "docid": "0bf78dda082d5d749f42e583eec883e6", "score": "0.7432558", "text": "public function up()\n {\n }", "title": "" }, { "docid": "0bf78dda082d5d749f42e583eec883e6", "score": "0.7432558", "text": "public function up()\n {\n }", "title": "" }, { "docid": "0759b65fbd1c184ea7caeec2a0019047", "score": "0.7410924", "text": "public function up(): void\n {\n try {\n // SM: We NEVER delete this table.\n if ($this->db->tableExists('prom2_migrations')) {\n return;\n }\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"CREATE TABLE `prom2_migrations` (\n `cntID` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `datExecute` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,\n `txtFilename` varchar(255) NOT NULL DEFAULT '' COMMENT 'Name of migration script run.', \n PRIMARY KEY (`cntID`),\n UNIQUE KEY `txtFilename` (`txtFilename`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "title": "" }, { "docid": "812bca716e0e6494275f6006e6c45054", "score": "0.7394664", "text": "public function safeUp()\n\t{\n\t\t$this->createTable('linea_servicio', array(\n\t\t\t\t'id' => 'pk',\n\t\t\t\t'nombre' => 'VARCHAR(45) NOT NULL',\n\t\t));\n\t\t\n\t\t//$this->addForeignKey('FK02_issue_linea_servicio', 'issue', 'linea_servicio_id', 'linea_servicio', 'id', 'SET NULL');\n\t\t\n\t\t$this->insert(\"linea_servicio\", array(\n\t\t\t\t'nombre' => 'Preventa',\n\t\t));\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "8d61687887da35ce0224b933ac6f6fb8", "score": "0.73910534", "text": "public function up()\n\t{\n $this->alterColumn('{{user_role}}','ur_switch','VARCHAR( 54 ) NULL DEFAULT \\'1\\'');\n\t}", "title": "" }, { "docid": "c17ad9d27402681745867d30f5f75827", "score": "0.7371939", "text": "public function up()\n\t{\n\t\t// create the sale_units table\n\t\tSchema::create('sale_units', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\n\t\t $table->string('name', 128);\n\t\t $table->string('symbol',128);\t\t \t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\n\t\t $table->integer('updated_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "title": "" }, { "docid": "690b491dd946db0be3239aeeb0b36266", "score": "0.73683035", "text": "public function up()\n\t{\n //$this->addColumn(TBL_DEVICE, 'path_tiny', 'VARCHAR(255) NOT NULL');\n //$this->addColumn(TBL_DEVICE, 'path_thumbnail', 'VARCHAR(255) NOT NULL');\n\t}", "title": "" }, { "docid": "040c2760b1afb1c2538b688d91ff27b1", "score": "0.7359633", "text": "public function up()\n {\n $this->changeColumn('security_migration', 'version', 'integer', array('unsigned' => 1));\n }", "title": "" }, { "docid": "7a7a98356aac896086671f8b00c9477a", "score": "0.73419833", "text": "public function up()\n {\n $users = $this->table('categories');\n $users->addColumn('material_id', 'integer', ['limit' => 3])\n ->addColumn('ih_correspond_id', 'integer')\n ->addColumn('name', 'string', ['limit' => 50])\n ->addColumn('description', 'text')\n ->addColumn('file_name1', 'text')\n ->addColumn('file_name2', 'text')\n ->addColumn('file_name3', 'text')\n ->addColumn('file_name4', 'text')\n ->addColumn('file_name5', 'text')\n ->addColumn('created_at', 'datetime')\n ->addColumn('updated_at', 'datetime', ['null' => true])\n ->save();\n }", "title": "" }, { "docid": "4bfdac3a97fec753edc31869ec873c17", "score": "0.73416805", "text": "public function up()\n {\n $player = $this->table('player');\n\n $player->addForeignKey('game_id', 'game', 'id', array('delete'=> 'RESTRICT', 'update'=> 'NO_ACTION'));\n\t$player->changeColumn('name', 'string', array('null'=>false, 'limit'=>50));\n\t$player->changeColumn('genome', 'integer', array('null'=>false, 'signed'=>false, 'default'=>1));\n\t$player->renameColumn('camp', 'mutated');\n\t$player->changeColumn('mutated', 'integer', array('null'=>false, 'signed'=>false, 'default'=>0));\n\t$player->renameColumn('state', 'paralysed');\n\t$player->changeColumn('paralysed', 'integer', array('null'=>false, 'signed'=>false, 'default'=>0));\n $player->addColumn('role', 'string', array('null' => false, 'limit'=>15, 'default'=>'astronaut'));\n\t\n\n $player->save();\n }", "title": "" }, { "docid": "00ae4807cec3b8da6a6ac612cd48ecbf", "score": "0.73346865", "text": "public function safeUp()\n {\n \t$this->up();\n }", "title": "" }, { "docid": "4419c7ccd1b38d02f0947ad02b3d51e6", "score": "0.73189396", "text": "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => Schema::TYPE_INTEGER . ' UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY',\n 'user_id' => Schema::TYPE_INTEGER . ' UNSIGNED DEFAULT NULL',\n 'order_id' => Schema::TYPE_INTEGER . ' UNSIGNED DEFAULT NULL',\n 'sum' => Schema::TYPE_DECIMAL . '(10,2) NOT NULL COMMENT \"Цена\"',\n 'sum_uah' => Schema::TYPE_DECIMAL . '(10,2) NOT NULL COMMENT \"Цена в гривне\"',\n 'comment' => Schema::TYPE_TEXT . ' DEFAULT NULL COMMENT \"Комментарий\"',\n 'status' => Schema::TYPE_SMALLINT . '(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT \"Статус\"',\n 'created' => Schema::TYPE_DATETIME . ' NOT NULL COMMENT \"Создано\"',\n 'modified' => Schema::TYPE_DATETIME . ' NOT NULL COMMENT \"Обновлено\"',\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey(\n 'fk_payment_user_id_to_user_table_id',\n $this->tableName,\n 'user_id',\n '{{%user}}',\n 'id',\n 'CASCADE',\n 'CASCADE'\n );\n $this->addForeignKey(\n 'fk_payment_order_id_to_order_table_id',\n $this->tableName,\n 'order_id',\n '{{%store_order}}',\n 'id',\n 'SET NULL',\n 'CASCADE'\n );\n }", "title": "" }, { "docid": "006a0a7dc7a1e4e6954e3e8d31e036c2", "score": "0.73089874", "text": "public function safeUp()\n {\n $this->createTable('apartment_i18n', array(\n 'apartment_id' => self::MYSQL_TYPE_INT,\n 'language_code' => 'varchar(6) NOT NULL',\n 'i18n_name' => 'string NOT NULL',\n 'i18n_type_name' => 'string NOT NULL',\n 'i18n_parent_name' => 'string NOT NULL',\n 'i18n_area_name' => 'string NOT NULL',\n 'i18n_city_name' => 'string NOT NULL',\n ));\n $this->addForeignKey('apartment_i18n_apartment_id', 'apartment_i18n', 'apartment_id', 'apartment', 'id', 'CASCADE', 'RESTRICT');\n }", "title": "" }, { "docid": "c420b905a6e76e8e16fadb623825eb43", "score": "0.72890127", "text": "public function up()\n {\n DB::unprepared($this->getRawSqlMigration());\n }", "title": "" }, { "docid": "d7243bf6f02de2fdc39b5232140de899", "score": "0.7288538", "text": "public function up()\n\t{\n $this->dbforge->add_column('measurements', array(\n 'time_interval' => array(\n 'type' => 'MEDIUMINT',\n 'constraint' => '8',\n 'unsigned' => TRUE\n ),\n 'area' => array(\n 'type' => 'VARCHAR',\n 'constraint' => '255'\n ),\n 'external_type' => array(\n 'type' => 'VARCHAR',\n 'constraint' => '255'\n ),\n 'external_model' => array(\n 'type' => 'VARCHAR',\n 'constraint' => '255',\n ),\n 'external_serial' => array(\n 'type' => 'VARCHAR',\n 'constraint' => '255'\n )\n ));\n\n\t}", "title": "" }, { "docid": "93864b5de87f8218e8028a55a7da5771", "score": "0.7283695", "text": "public function up()\n {\n $tags = [\n [\n 'name' => 'CakePHP'\n ],\n [\n 'name' => 'Framework'\n ],\n [\n 'name' => 'PHP'\n ]\n ];\n $this->insert('tags', $tags);\n \n $users_tags = [\n [\n 'user_id' => 1,\n 'tag_id' => 1\n ],\n [\n 'user_id' => 1,\n 'tag_id' => 2\n ]\n ];\n $this->insert('users_tags', $users_tags);\n }", "title": "" }, { "docid": "a2dc3eeeddaef21bf71a3a3b7902dce3", "score": "0.7261895", "text": "public function up()\n {\n $this->table('rewidx_system')->changeColumn('registration', 'string', array('length' => 10, 'default' => 'optional'));\n $this->execute(\"UPDATE `rewidx_system` SET `registration` = 'optional' WHERE `idx` = '';\");\n }", "title": "" }, { "docid": "3111e5de240c764c0e2f25a67cbedb49", "score": "0.7254696", "text": "public function up(){\n $this->dbforge->add_field(array( //creacion del vector que contiene los campos de la tabla \n 'GNDR_PK' => array( //columna GNDR_PK tipo int, tamaño 10, auto icremental, no vacio\n 'type' => 'INT',\n 'constraint' => 10,\n 'unsigned' => TRUE,\n 'auto_increment' => TRUE\n ),\n 'GNDR_gender' => array( //columna GNDR_gender tipo VARCHAR, tamaño 45\n 'type' => 'VARCHAR',\n 'constraint' => '45',\n ),\n ));\n $this->dbforge->add_key('GNDR_PK', TRUE); //agregar atributo de llave primaria al campo GNDR_PK \n $this->dbforge->create_table('genders'); //creacion de la tabla genders con los atributos y columnas\n }", "title": "" }, { "docid": "2135b3f3d2235d33ec4fac3f0f9ce558", "score": "0.7226441", "text": "public function up(){\n $this->addColumn('users', 'user_name', 'varchar (100) DEFAULT NULL AFTER `user_id`');\n $this->addColumn('users', 'user_pwd', 'varchar (100) Not NULL AFTER `user_name`');\n }", "title": "" }, { "docid": "7c3441cedd91f64a4a763aeeec70fead", "score": "0.72119814", "text": "public function up()\n {\n $this->dbforge->add_field(array(\n \n 'id' => array(\n 'type' => 'INT',\n 'constraint' => 11,\n 'auto_increment' => TRUE,\n 'null' => FALSE\n ),\n 'created_at' => array(\n 'type' => 'DATETIME',\n 'null' => TRUE\n ),\n 'updated_at' => array(\n 'type' => 'DATETIME',\n 'null' => TRUE\n ),\n \n // extra fields:\n 'role_id' => array(\n 'type' => 'INT',\n 'constraint' => 11,\n 'null' => TRUE\n ),\n 'user_id' => array(\n 'type' => 'INT',\n 'constraint' => 11,\n 'null' => TRUE \n )\n ));\n \n $this->dbforge->add_key('id', TRUE); // TRUE makes it primary\n $this->dbforge->add_key(array('role_id','user_id'));\n $this->dbforge->create_table('roles_users'); //change dbs to table name\n }", "title": "" }, { "docid": "95b214588b71a93bcaa7feeeb8e702f7", "score": "0.71788675", "text": "public function up()\n\t{\n\t\t//\n\t\tSchema::table('users', function($table) {\n\t\t\t$table->string('codeivate_user')->nullable();\n\t\t});\t\t\t\t\t\n\t}", "title": "" }, { "docid": "7fa3c2c80b0605ad209238149a24e8d4", "score": "0.71693045", "text": "public function safeUp()\n {\n $this->createTable( '{{declaration}}', array(\n 'id' => 'int(10) unsigned NOT NULL AUTO_INCREMENT',\n 'number' => 'varchar(10) NOT NULL',\n 'from_date' => 'date DEFAULT NULL',\n 'to_date' => 'date DEFAULT NULL',\n 'created_date' => 'TIMESTAMP DEFAULT CURRENT_TIMESTAMP',\n 'created_by_user_id' => 'int(10) unsigned NOT NULL',\n 'type' => \"ENUM( 'normal', 'null' ) DEFAULT 'normal'\",\n 'signed' => 'tinyint(1) NOT NULL DEFAULT 0',\n 'PRIMARY KEY (id)',\n ), 'ENGINE=InnoDB DEFAULT CHARSET=utf8'\n );\n\n $this->addForeignKey( 'fk_declaration_created_by_user_id_user_id', '{{declaration}}', 'created_by_user_id',\n '{{user}}', 'id', 'RESTRICT', 'CASCADE'\n );\n }", "title": "" }, { "docid": "0b8d3a493c1fe598c2e1d2038e46704e", "score": "0.7162582", "text": "public function up()\n\t{\n\t\t$fields = array(\n\n\t\t\t'valuacion_HPMH' => array('type' => 'DECIMAL','constraint' => '11,4'),\n\t\t\t'HPMH_30' => array('type' => 'DECIMAL','constraint' => '11,4'),\n\t\t\t'sugerencia_herreria' => array('type' => 'DECIMAL','constraint' => '11,4'),\n\t\t\t'sugerencia_mecanica' => array('type' => 'DECIMAL','constraint' => '11,4'),\n\t\t\t'sugerencia_hojalateria' => array('type' => 'DECIMAL','constraint' => '11,4')\n\t\t);\n\t\t$this->dbforge->add_column('cierre', $fields);\n\t\n\t}", "title": "" }, { "docid": "60413a2fa8393801712781f869dafff4", "score": "0.7156278", "text": "public function up()\n {\n $this->createTable($this->table,[\n 'id' => $this->primaryKey(),\n 'product_id' => $this->integer()->notNull(),\n 'warehouse_id' => $this->integer()->notNull(),\n 'type' => $this->smallInteger()->notNull(),\n 'quantity' => $this->integer()->notNull(),\n 'initiator' => $this->string()->notNull(),\n 'time_stamp' => $this->timestamp()->notNull()->defaultExpression('CURRENT_TIMESTAMP()')\n ], $this->tableOptions);\n\n $this->createIndex(\"loperation_product_idx\", $this->table,'product_id');\n $this->createIndex(\"loperation_warehouse_idx\", $this->table,'warehouse_id');\n $this->createIndex(\"leftover_operation_idx\", $this->table,['product_id','warehouse_id']);\n\n $this->addForeignKey('fk_loperation_product', $this->table, 'product_id', \"{{%catalog_product}}\", 'id', \"CASCADE\",\"CASCADE\");\n $this->addForeignKey('fk_loperation_warehouse', $this->table, 'warehouse_id', \"{{%catalog_warehouse}}\", 'id', \"CASCADE\",\"CASCADE\");\n }", "title": "" }, { "docid": "f120296d14ec328dc533875835dba09f", "score": "0.7152377", "text": "public static function up()\n {\n DB::table(self::NAME)\n ->create(function (DBTableBuilder $table) {\n $table->field('id')->int()->increment();\n $table->field('userid')->int();\n $table->field('amount')->int();\n $table->field('loannumber')->int();\n $table->field('duedate')->varchar();\n $table->field('status')->varchar();\n });\n }", "title": "" }, { "docid": "d49470b9d08108f9a9375f97f896f238", "score": "0.7150671", "text": "public function up()\n {\n $this->createTable('metro', [\n 'id' => $this->primaryKey(),\n 'name' => 'VARCHAR(256) NOT NULL',\n 'city_id' => 'INT(19) DEFAULT 1' //FK\n ]);\n }", "title": "" }, { "docid": "441e362a187468c7f7dd5b39043bc968", "score": "0.71460044", "text": "public function safeUp()\n {\n $this->createTable('{{%user_cards}}', [\n 'card_id' => $this->primaryKey(),\n 'card_user_id' => $this->integer()->notNull(),\n 'card_number' => $this->string()->notNull(),\n ]);\n $this->addForeignKey('FK_cards_user', '{{%user_cards}}', 'card_user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n }", "title": "" }, { "docid": "94bfdb2b274e407867b3beb8eaf3243b", "score": "0.71444845", "text": "public function up()\n\t{\n\t\tDB::table('rooms')->insert(array(\n\t\t\t'name'=>'Room_A0',\n\t\t\t'created_at' => date(\"Y-m-d H:i:s\"),\n\t\t\t'updated_at' => date(\"Y-m-d H:i:s\")\n\t\t\t));\n\t\tDB::table('rooms')->insert(array(\n\t\t\t'name'=>'Room_B1',\n\t\t\t'created_at' => date(\"Y-m-d H:i:s\"),\n\t\t\t'updated_at' => date(\"Y-m-d H:i:s\")));\n\t}", "title": "" }, { "docid": "314e2086127adfd14ffd39d2a137b643", "score": "0.7141835", "text": "public function up() {\n\t\t\t$fields = array(\n\t\t\t\t'staff_exceptionID' => array(\n\t\t\t\t\t'type' => 'INT',\n\t\t\t\t\t'constraint' => 11,\n\t\t\t\t\t'default' => NULL,\n\t\t\t\t\t'after' => 'lessonID'\n\t\t\t\t)\n\t\t\t);\n\t\t\t$this->dbforge->add_column('bookings_lessons_exceptions', $fields);\n\t\t\t$this->dbforge->add_key('staff_exceptionID');\n\t\t\t// set foreign keys\n\t\t\t$this->db->query('ALTER TABLE `' . $this->db->dbprefix('bookings_lessons_exceptions') . '` ADD CONSTRAINT `fk_bookings_lessons_exceptions_staff_exceptionID` FOREIGN KEY (`staff_exceptionID`) REFERENCES `' . $this->db->dbprefix('staff_availability_exceptions') . '`(`exceptionsID`) ON DELETE CASCADE ON UPDATE CASCADE');\n\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "0fa3a6b9fa27fd1a5d37c13fdf314e79", "score": "0.7138719", "text": "public function safeUp()\n {\n $this->createTable(\n '{{event_log}}',\n [\n 'id' => 'pk',\n 'user_id' => 'int null',\n 'topic' => 'varchar(64) not null',\n 'details' => 'varchar(1024) not null',\n 'created' => 'datetime not null',\n ],\n \"ENGINE=InnoDB DEFAULT CHARSET=utf8\"\n );\n $this->addForeignKey('fk_event_log_user_id', '{{event_log}}', 'user_id',\n '{{user}}','id','CASCADE','NO ACTION');\n }", "title": "" }, { "docid": "c3c8743d2a29015b6740d233e9fdd33b", "score": "0.71364504", "text": "public function up()\n {\n\t\t### Drop table ##\n\t$this->db->insert('config', array('parameter' => 'request_emails', 'value' => '0'));\n $this->dbforge->add_column(\"users\", array('email_address' => array('type' => 'varchar', 'constraint' => '150')));\n $this->dbforge->add_column(\"users\", array('activation_hash' => array('type' => 'varchar', 'constraint' => '64')));\n $this->dbforge->add_column(\"users\", array('activation_id' => array('type' => 'varchar', 'constraint' => '64')));\n $this->dbforge->add_column(\"users\", array('email_activated' => array('type' => 'enum', 'constraint' => array('0','1'), 'default' => '1')));\n $this->dbforge->add_column(\"users\", array('email_updates' => array('type' => 'enum', 'constraint' => array('0','1'), 'default' => '1')));\n\n }", "title": "" }, { "docid": "c6f8fe00b4778ced959f34075325f233", "score": "0.71252036", "text": "public function up()\n {\n $this->alterColumn( 'product_variants','created_at',$this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n $this->alterColumn( 'product_variants','updated_at',$this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n\n $this->alterColumn('tophatter_shopdetails','created_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n $this->alterColumn('tophatter_shopdetails','updated_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n\n $this->alterColumn('pricefalls_shop_details','created_at' ,$this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n $this->alterColumn('pricefalls_shop_details','updated_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n\n $this->alterColumn('pricefalls_product_variants','created_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n $this->alterColumn('pricefalls_product_variants','updated_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n\n $this->alterColumn('pricefalls_products','created_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n $this->alterColumn('pricefalls_products','updated_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n\n $this->alterColumn('pricefalls_payment','billing_on', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n $this->alterColumn('pricefalls_registration','created_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n\n $this->alterColumn('merchant','updated_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n $this->alterColumn('merchant','created_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n\n $this->alterColumn('latest_updates','updated_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n $this->alterColumn('latest_updates','created_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n\n\n $this->alterColumn('pricefalls_failed_orders','updated_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n $this->alterColumn('pricefalls_failed_orders','created_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n\n\n $this->alterColumn('pricefalls_orders','updated_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n $this->alterColumn('pricefalls_orders','created_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n\n\n $this->alterColumn('products','updated_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n $this->alterColumn('products','created_at', $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'));\n }", "title": "" }, { "docid": "9cf3cab67092ef6823d3b41c00bcfb68", "score": "0.7124612", "text": "public function up()\n {\n foreach ($this->providers as $provider => $keys)\n {\n if ($keys['key'] === NULL)\n {\n $this->db->insert($this->table_name, array('provider' => $provider));\n }\n else\n {\n $this->db->insert($this->table_name, array('provider' => $provider, 'key' => $keys['key'], 'secret' => $keys['secret']));\n }\n }\n $this->db->where(array('provider' => 'Facebook'));\n $this->db->update($this->table_name, array('scope' => 'email'));\n }", "title": "" }, { "docid": "198263e8d179016f2182910a661b8c47", "score": "0.7123", "text": "public function safeUp()\n\t{\n\t\t$sql=\"ALTER TABLE `points` ADD COLUMN `old_id` int(10) NOT NULL DEFAULT 0 COMMENT '' AFTER `status`;\";\n\t\t$this->execute($sql);\n\t\t$this->refreshTableSchema('points');\n\t}", "title": "" }, { "docid": "731950291150698f78068b49f7965383", "score": "0.71214396", "text": "public function up()\n {\n DBManager::get()->exec(\"ALTER TABLE `garuda_messages`\n ADD `send_date` INT NULL DEFAULT NULL AFTER `author_id`\");\n\n SimpleORMap::expireTableScheme();\n }", "title": "" }, { "docid": "47bf2937475bffe61f9d9a95bd757920", "score": "0.711902", "text": "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "title": "" }, { "docid": "47bf2937475bffe61f9d9a95bd757920", "score": "0.711902", "text": "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "title": "" }, { "docid": "47bf2937475bffe61f9d9a95bd757920", "score": "0.711902", "text": "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "title": "" }, { "docid": "d197c9903b3a29b83bfe5734f6befb75", "score": "0.7106838", "text": "public function up() {\n DB::table('searchengine')->insert(array(\n 'name' => 'googleDE',\n 'url' => 'www.google.de',\n 'positionsEachSite' => 10\n ));\n\n DB::table('searchengine')->insert(array(\n 'name' => 'suchmaschineB',\n 'url' => 'www.suchmaschineB.de',\n 'positionsEachSite' => 10\n ));\n DB::table('searchengine')->insert(array(\n 'name' => 'suchmaschineC',\n 'url' => 'www.suchmaschineC.de',\n 'positionsEachSite' => 20\n ));\n }", "title": "" }, { "docid": "fd42415e0e3b7644ab931c5b72c703c2", "score": "0.7101603", "text": "public function up()\n\t{\n\t\tDB::table('student_types')->insert(array(\n\t\t\t\t'name'=>'full time',\n\t\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t\t));\n\t\tDB::table('student_types')->insert(array(\n\t\t\t\t'name'=>'part time',\n\t\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t\t));\n\t}", "title": "" }, { "docid": "ac54622654f2e8e114c98a06747edaa8", "score": "0.7097316", "text": "public function up(){\n $count = $this->execute('\n CREATE TABLE `users` (\n `id` int(11) unsigned NOT NULL AUTO_INCREMENT,\n `name` varchar(100) DEFAULT NULL,\n `kana` varchar(100) DEFAULT NULL,\n `login_code` varchar(30) DEFAULT NULL,\n `password` varchar(30) DEFAULT NULL,\n `birth_day` date DEFAULT NULL,\n `email` varchar(255) DEFAULT NULL,\n `created` datetime NOT NULL,\n PRIMARY KEY (`id`)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n ');\n }", "title": "" }, { "docid": "0eec4ba3fc571a63841cc8a1c23ffe3b", "score": "0.7092695", "text": "public function safeUp()\n {\n $this->getDbConnection()->createCommand(\"\nALTER TABLE `compare_estimated_price_table` \n ADD `bathrooms_weighted` INT(11) DEFAULT '5' AFTER `house_weighted`,\n ADD `bedrooms_weighted` INT(11) DEFAULT '2' AFTER `bathrooms_weighted`,\n ADD `garages_weighted` INT(11) DEFAULT '3' AFTER `bedrooms_weighted`,\n ADD `pool_weighted` INT(11) DEFAULT '5' AFTER `garages_weighted`,\n DROP `amenties_weighted`\n \")->execute();\n }", "title": "" }, { "docid": "3907a81d7c08405177b9280ce75c7878", "score": "0.7091722", "text": "public function safeUp()\n\t{\n $this->execute(\"\n ALTER TABLE `Deals`\n ADD COLUMN `negotiable` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Negotiable' AFTER `archive`,\n ADD COLUMN `currency_id` INT(10) UNSIGNED NULL DEFAULT NULL COMMENT 'Currency ID' AFTER `city_id`,\n ADD CONSTRAINT `FK_Deals_Currencies` FOREIGN KEY (`currency_id`) REFERENCES `Currencies` (`id`) ON UPDATE CASCADE ON DELETE SET NULL;\n \");\n\t}", "title": "" }, { "docid": "7df80ccb6400f43a234ab16c77c6456e", "score": "0.70834595", "text": "public function up()\n\t{\n\t\t// código para crear la tabla estudio\n\t\tSchema::create('estudio', function ($tabla){\n\t\t\t$tabla->increments('id_estudio')->onDelete('cascade');\n\t\t\t$tabla->text('nombre')->onDelete('cascade'); // Nombre del estudio, obvio\n\t\t\t$tabla->string('descripcion', 255)->onDelete('cascade'); // Describa brevemente qué hizo\n\t\t\t$tabla->date('fecha_inicio')->onDelete('cascade'); //\n\t\t\t$tabla->boolean('situacion')->onDelete('cascade'); // falso como cursando\n\t\t\t$tabla->string('ubicacion')->onDelete('cascade'); // Dónde lo hizo\n\t\t\t//$table->foreign('id_usuario')->references('id')->on('usuario');\n\t\t});\n\t}", "title": "" }, { "docid": "0e3684928ed1b2d1a46515b5aec4fd49", "score": "0.70819044", "text": "public function change(): void\n {\n /** //Caso precise mudar o id\n use Phinx\\Migration\\AbstractMigration;\n class MyNewMigration extends AbstractMigration\n {\n public function change()\n {\n $table = $this->table('followers', ['id' => false, 'primary_key' => ['user_id', 'follower_id']]);\n $table->addColumn('user_id', 'integer')\n ->addColumn('follower_id', 'integer')\n ->addColumn('created', 'datetime')\n ->create();\n }\n }\n */\n $table = $this->table(\"state\");\n $table->addColumn('name', 'string', ['limit' => 50,'null' => false])\n ->addColumn('uf', 'string', ['limit' => 2, 'null' => false])\n ->create();\n }", "title": "" }, { "docid": "da6e7c54f19a4d1129a81c7b2cf9f134", "score": "0.7068467", "text": "public function up()\n\t{\n\t\tDB::table('course')->insert(array(\n\t\t\t'name'=>'Calculo II',\n\t\t\t'eap' => 'SW',\n\t\t\t'term' => '2',\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\n\n\t\tDB::table('course')->insert(array(\n\t\t\t'name'=>'Programación II',\n\t\t\t'eap' => 'SW',\n\t\t\t'term' => '3',\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\n\t\tDB::table('course')->insert(array(\n\t\t\t'name'=>'Calidad de Software',\n\t\t\t'eap' => 'SW',\n\t\t\t'term' => '8',\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\n\t\tDB::table('course')->insert(array(\n\t\t\t'name'=>'Taller de Construcción de Software',\n\t\t\t'eap' => 'SW',\n\t\t\t'term' => '7',\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\n\t\t//\n\t}", "title": "" }, { "docid": "6d29660393e962862c3ad9c141682916", "score": "0.70576864", "text": "public function safeUp()\n {\n $this->addColumn($this->tableName, 'old_price', Schema::TYPE_DECIMAL. '(10, 2) DEFAULT NULL');\n $this->addColumn($this->tableName, 'is_sale', Schema::TYPE_SMALLINT. '(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT \"Распродажа\"');\n $this->addColumn($this->tableName, 'is_popular', Schema::TYPE_SMALLINT. '(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT \"Популярное\"');\n }", "title": "" }, { "docid": "b9b263f876bc84751e64f71bd38183bb", "score": "0.70548034", "text": "public function up()\n {\n $table = $this->table('rarities');\n $table->removeColumn('RarityName')\n ->save();\n }", "title": "" }, { "docid": "f2f436b6a0c3d68041c07c760151c492", "score": "0.7047267", "text": "public function up()\n {\n $this->upUsers()\n ->upOrganizations()\n ->upGroups()\n ->upImages()\n ->upGames()\n ->upPivots();\n }", "title": "" }, { "docid": "56a43c06228fd39f0255bcc9a0c590f7", "score": "0.7047023", "text": "public function up(){\n $this->dbforge->add_field(array( //creacion del vector que contiene los campos de la tabla \n 'TPDI_PK' => array( //columna TPDI_PK tipo int, tamaño 10, auto icremental, no vacio \n 'type' => 'INT',\n 'constraint' => 10,\n 'unsigned' => TRUE,\n 'auto_increment' => TRUE\n ),\n 'TPDI_type_identification' => array( //columna TPDI_type_identification tipo VARCHAR, tamaño 45\n 'type' => 'VARCHAR',\n 'constraint' => '45',\n ),\n ));\n $this->dbforge->add_key('TPDI_PK', TRUE); //agregar atributo de llave primaria al campo TPDI_PK \n $this->dbforge->create_table('types_identifications'); //creacion de la tabla types_identifications con los atributos y columnas\n }", "title": "" }, { "docid": "ccb21ea03c7335def67d6a19c2ec5b4e", "score": "0.7045901", "text": "public function up()\r\n {\r\n $this->execute(\"ALTER TABLE title CHANGE COLUMN asking_price asking_price VARCHAR(255);\");\r\n }", "title": "" }, { "docid": "a84db57ed5dfb11619ac737bae548799", "score": "0.7042771", "text": "public function safeUp()\n\t{\n\t\t$fkName = DatabaseIndexHelper::getForeignKeyName('user','tenant_agent','user','id');\n\t\tif(isset($fkName) && $fkName!='') {\n\t\t\t$this->dropForeignKey($fkName, 'user');\n\t\t}\n\t\t$tableName = Yii::app()->db->quoteTableName('user');\n\t\t$this->execute(\"update $tableName set tenant_agent = NULL where id = 1\");\n //$this->addForeignKey('user_tenant_agent_fk','user','tenant_agent','tenant_agent','id');\n\n\t}", "title": "" }, { "docid": "b3cf9d8092a2a5f2bf5cb5a39d926550", "score": "0.7040363", "text": "public function up()\n {\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable('{{%permission_other}}', [\n 'id' => $this->bigPrimaryKey()->unsigned(),\n 'name' => $this->string(255),\n 'label' => $this->string(255),\n 'description' => $this->string(512),\n 'created_at' => 'timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP',\n ], $tableOptions);\n }", "title": "" }, { "docid": "06604a8104afcd5f1217f34d232ba71a", "score": "0.70398265", "text": "public function safeUp()\n {\n $this->createTable('posts', [\n 'id' => Schema::TYPE_PK,\n 'url' => Schema::TYPE_STRING.'(255) NOT NULL',\n 'active' => Schema::TYPE_INTEGER.'(1) NOT NULL',\n 'created_at' => Schema::TYPE_INTEGER.'(11) DEFAULT NULL',\n 'updated_at' => Schema::TYPE_INTEGER.'(11) DEFAULT NULL',\n ]);\n\n $this->createIndex('posts_url_unique', 'posts', 'url', true);\n\n $this->createTable('posts_lang', [\n 'id' => Schema::TYPE_PK,\n 'post_id' => Schema::TYPE_INTEGER.'(11) NOT NULL',\n 'lang_id' => Schema::TYPE_INTEGER.'(11) NOT NULL',\n 'title' => Schema::TYPE_STRING.'(255) DEFAULT NULL',\n 'text' => 'longtext DEFAULT NULL',\n 'created_at' => Schema::TYPE_INTEGER.'(11) DEFAULT NULL',\n 'updated_at' => Schema::TYPE_INTEGER.'(11) DEFAULT NULL',\n ]);\n\n $this->createTable('posts_tags', [\n 'id' => Schema::TYPE_PK,\n 'name' => Schema::TYPE_STRING.'(255) NOT NULL',\n 'created_at' => Schema::TYPE_INTEGER.'(11) DEFAULT NULL',\n 'updated_at' => Schema::TYPE_INTEGER.'(11) DEFAULT NULL',\n ]);\n\n $this->createIndex('posts_tags_index', 'posts_tags', 'name');\n\n $this->createTable('posts_tags_assign', [\n 'id' => Schema::TYPE_PK,\n 'tag_id' => Schema::TYPE_INTEGER.'(11) NOT NULL',\n 'post_id' => Schema::TYPE_INTEGER.'(11) NOT NULL',\n 'created_at' => Schema::TYPE_INTEGER.'(11) DEFAULT NULL',\n 'updated_at' => Schema::TYPE_INTEGER.'(11) DEFAULT NULL',\n ]);\n\n $this->createIndex('posts_tags_assign_tag_id_post_id_unique', 'posts_tags_assign', ['tag_id', 'post_id'], true);\n\n $this->addForeignKey(\n 'fk_posts_lang_lang_id_languages_id',\n 'posts_lang', 'lang_id',\n 'languages', 'id'\n );\n\n $this->addForeignKey(\n 'fk_posts_lang_posts_id_post_id',\n 'posts_lang', 'post_id',\n 'posts', 'id'\n );\n\n $this->addForeignKey(\n 'fk_posts_tags_assign_tag_id_posts_tags_id',\n 'posts_tags_assign', 'tag_id',\n 'posts_tags', 'id'\n );\n\n $this->addForeignKey(\n 'fk_posts_tags_assign_post_id_posts_id',\n 'posts_tags_assign', 'post_id',\n 'posts', 'id'\n );\n }", "title": "" }, { "docid": "2351909fa8ef7f22bd8809e1d1f1edfa", "score": "0.7030146", "text": "public function safeUp()\n\t{\n $this->createTable('{{user}}', array(\n 'id' => 'char(32) null',\n 'name' => 'varchar(64) not null',\n 'email' => 'varchar(128) not null',\n 'access_token' => 'char(40) null',\n 'created' => 'datetime null',\n 'last_login' => 'datetime null',\n 'role' => 'varchar(16) not null',\n 'status' => 'tinyint(1) not null',\n ), 'ENGINE = InnoDB DEFAULT CHARACTER SET = utf8 COLLATE = utf8_general_ci');\n $this->addPrimaryKey('pk_user', '{{user}}', 'id');\n $this->createIndex('idx_user_email', '{{user}}', 'email', true);\n\t}", "title": "" }, { "docid": "489bc9d7e1807cf2da205d1899fb8fed", "score": "0.70257705", "text": "public function up()\n {\n if (!\\Schema::hasTable('snapshot_t')) {\n \\Schema::create('snapshot_t',\n function (Blueprint $table){\n $table->bigIncrements('id');\n $table->integer('user_id')->index();\n $table->integer('instance_id')->index();\n $table->integer('route_hash_id')->index();\n $table->string('snapshot_id_text', 128)->index();\n $table->boolean('public_ind')->default(true);\n $table->string('public_url_text', 1024);\n $table->dateTime('expire_date');\n\n $table->dateTime('create_date');\n $table->timestamp('lmod_date')->default(\\DB::raw('CURRENT_TIMESTAMP'));\n\n // Make snapshot ID unique for user\n $table->unique(['user_id', 'snapshot_id_text']);\n\n // Foreign keys\n $table->foreign('user_id')->references('id')->on('user_t')->onDelete('cascade');\n $table->foreign('instance_id')->references('id')->on('instance_t')->onDelete('cascade');\n $table->foreign('route_hash_id')->references('id')->on('route_hash_t')->onDelete('cascade');\n });\n }\n }", "title": "" }, { "docid": "6d15943de205a0a4704d9aec75bd8865", "score": "0.70255685", "text": "public function up()\n\t{\n\t\tDB::table('gin_table')->insert(array(\n\t\t\t'name' => 'GinTonic',\n\t\t\t'description' => 'Gin de ejemplo',\n\t\t\t'price' => '5.50',\n\t\t\t'picture' => 'placeholder.jpg',\n\t\t\t'created_at' => date('y-m-d H:m:s'),\n\t\t\t'updated_at' => date('y-m-d H:m:s')\n\t\t));\n\t}", "title": "" }, { "docid": "9141bb894b28b741aa55e165f9eafdc7", "score": "0.70223224", "text": "public function safeUp()\n\t{\n\t\t$this->alterColumn('commerce_emails','to',AttributeType::String);\n\n\t\t// Add recipientType\n\t\t$this->addColumnAfter('commerce_emails','recipientType',\"enum('customer', 'custom') NOT NULL DEFAULT 'customer'\",'subject');\n\n\t\tcraft()->db->createCommand()->update('commerce_emails', ['recipientType' => 'custom']);\n\t}", "title": "" }, { "docid": "1a48f9ce867a3350568d8bcc48e18524", "score": "0.7016612", "text": "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => $this->primaryKey(11),\n 'component' => $this->string(45)->notNull(),\n 'path' => $this->string(255)->notNull(),\n 'access_owner' => $this->integer(11),\n 'access_read' => $this->string(255),\n 'access_update' => $this->string(255),\n 'access_delete' => $this->string(255),\n 'created_at' => $this->dateTime(),\n 'updated_at' => $this->dateTime(),\n ]\n );\n\n $this->createIndex('unique_filefly_hashmap_component_path', 'filefly_hashmap', ['component','path'], true);\n }", "title": "" }, { "docid": "e25dbce7e65674982004291e70d15b2c", "score": "0.7015313", "text": "public function safeUp()\n {\n// if (Craft::$app->projectConfig->get('plugins.powerapi', true) === null) {\n if (!$this->db->tableExists('{{%products}}')) {\n // create the products table\n $this->createTable('{{%products}}', [\n 'id' => $this->integer()->notNull(),\n 'price' => $this->integer()->notNull(),\n 'currency' => $this->char(3)->notNull(),\n 'dateCreated' => $this->dateTime()->notNull(),\n 'dateUpdated' => $this->dateTime()->notNull(),\n 'uid' => $this->uid(),\n 'PRIMARY KEY(id)',\n ]);\n\n // give it a FK to the elements table\n $this->addForeignKey(\n $this->db->getForeignKeyName('{{%products}}', 'id'),\n '{{%products}}', 'id', '{{%elements}}', 'id', 'CASCADE', null);\n }\n// }\n }", "title": "" }, { "docid": "36fc3854bf2e375cc440c4fba9076d1f", "score": "0.7015112", "text": "public function up()\n\t{\n\t\t// create the securables table\n\t\tSchema::create('securables', function($table) {\n\t\t\t//$table->engine = 'InnoDB';\n\t\t $table->increments('id');\n\t\t $table->string('name', 128);\n\t\t $table->string('display_name', 128);\t \t \n\t\t $table->integer('module_id')->unsigned();\n\t\t $table->integer('created_by')->unsigned();\n\t\t $table->integer('updated_by')->unsigned();\n\t\t $table->timestamps();\t\t \n\t\t});\n\n\t}", "title": "" }, { "docid": "0b4a000c55467805cd129d634f05f5c1", "score": "0.70135653", "text": "public function safeUp()\n {\n $this->insert($this->tableName, [\n 'label' => 'укр',\n 'code' => 'ua',\n 'locale' => 'uk',\n 'visible' => 1,\n 'position' => 0,\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s'),\n ]);\n }", "title": "" }, { "docid": "75481551aca8ebb2eef7791de22ff947", "score": "0.70126384", "text": "public function up()\n {\n echo \"\\n Adding facilitator_id column to client_applications table\";\n\n $group_id = Schema::add_column('client_applications', 'facilitator_id', 'varchar', array('constraint' => 255, 'default' => 0, 'null' => FALSE), 'user_id');\n\n echo \"\\n Schema changes successful\";\n }", "title": "" }, { "docid": "5bd39be035387691bde9bec8fc69bab2", "score": "0.70071316", "text": "public function up() {\n $this->addColumn('service', 'frequency', 'string(200) after duty_type');\n $this->addColumn('service', 'hours', 'string(200) after frequency');\n $this->addColumn('service', 'days', 'string(200) after hours');\n }", "title": "" }, { "docid": "5c685e52b96acc62792f7380503066eb", "score": "0.69963235", "text": "public function up(): void\n {\n\n $this->table('system_categories')\n ->addColumn('price_level_id', 'integer', [\n 'after' => 'classification',\n 'default' => null,\n 'length' => null,\n 'null' => true,\n 'signed' => false,\n ])\n ->addIndex(\n [\n 'price_level_id',\n ],\n [\n 'name' => 'FK_system_categories_price_level_id_idx',\n ]\n )\n ->update();\n }", "title": "" }, { "docid": "1d8cb716722b736abbadbb14205092de", "score": "0.69811356", "text": "public function up()\n\t{\n $this->forge->addField([\n 'id' => [\n 'type' => 'INT',\n 'constraint' => 6,\n 'unsigned' => true,\n 'auto_increment' => true,\n ],\n 'tanggal_datang' => [\n 'type' => 'DATE',\n 'null' => true,\n ],\n 'penghunis_id' => [\n 'type' => 'INT',\n 'constraint' => 6,\n 'unsigned' => true,\n ],\n 'karyawans_id' => [\n 'type' => 'INT',\n 'constraint' => 6,\n 'unsigned' => true,\n ],\n 'isi_paket' => [\n 'type' => 'TEXT',\n 'null' => true,\n ],\n 'tanggal_ambil' => [\n 'type' => 'DATE',\n 'null' => true,\n ],\n ]);\n\n # MENAMBAHKAN RELASI --> id\n $this->forge->addForeignKey('penghunis_id', 'penghunis', 'id', 'NO ACTION', 'CASCADE');\n $this->forge->addForeignKey('karyawans_id', 'karyawans', 'id', 'NO ACTION', 'CASCADE');\n\n # MENAMBAHKAN PRIMARY KEY --> id\n $this->forge->addKey('id', TRUE);\n\n # MEMBUAT TABEL PAKETS\n $this->forge->createTable('pakets', TRUE);\n\t}", "title": "" }, { "docid": "7ae8aa08bfb8145f32373015d869d410", "score": "0.6980958", "text": "public function up()\n\t{\n\t DB::table('articles')->insert(array(\n\t\t\t'title'=>'Kurslar',\n\t\t\t'content'=>'ÇOK ÇOK çok önemli kurslarımız var',\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s'),\n\t ));\n\t \n\t DB::table('articles')->insert(array(\n\t\t\t'title'=>'küslar',\n\t\t\t'content'=>'ÇOK ÇOK çok önemli kurslarımız var',\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s'),\n\t ));\n\t}", "title": "" }, { "docid": "266622fe52e6776a41098bc969d122ec", "score": "0.6980247", "text": "public function safeUp()\n\t{\n\t\t$this->addPrimaryKey(\"vtct_pk\",\"visitor_type_card_type\",\"visitor_type,card_type\");\n\t}", "title": "" }, { "docid": "425a384e267389a203605be7ad8911f1", "score": "0.6967637", "text": "public function up()\n {\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable('{{%gol_pns}}', [\n 'id' => $this->primaryKey(2),\n 'gol' => $this->string(5)->notNull()->unique(),\n 'pangkat' => $this->string(32)->notNull(),\n ], $tableOptions);\n\n $this->batchInsert('{{%gol_pns}}',['id', 'gol', 'pangkat'], [\n ['11', 'I/a', 'Juru Muda'],\n ['12', 'I/b', 'Juru Muda Tingkat I'],\n ['13', 'I/c', 'Juru'],\n ['14', 'I/d', 'Juru Tingkat I'],\n ['21', 'II/a', 'Pengatur Muda'],\n ['22', 'II/b', 'Pengatur Muda Tingkat I'],\n ['23', 'II/c', 'Pengatur'],\n ['24', 'II/d', 'Pengatur Tingkat I'],\n ['31', 'III/a', 'Penata Muda'],\n ['32', 'III/b', 'Penata Muda Tingkat I'],\n ['33', 'III/c', 'Penata'],\n ['34', 'III/d', 'Penata Tingkat I'],\n ['41', 'IV/a', 'Pembina'],\n ['42', 'IV/b', 'Pembina Tingkat I'],\n ['43', 'IV/c', 'Pembina Utama Muda'],\n ['44', 'IV/d', 'Pembina Utama Madya'],\n ['45', 'IV/e', 'Pembina Utama'],\n ]);\n }", "title": "" }, { "docid": "71f4425b8c37c6501ae869b37328008e", "score": "0.69647354", "text": "public function up()\n\t{\n\t\tSchema::table('jenjang_topik', function($table)\n\t\t{\n\t\t\t$table->create();\n\t\t\t$table->increments('id');\n\t\t\t$table->integer('topik_id', 10);\n\t\t\t$table->integer('jenjang_id', 10);\n\t\t\t$table->integer('bobot', 3);\n\t\t\t$table->timestamps();\n\t\t});\n\t}", "title": "" }, { "docid": "5cabfb5736409ed5f65c30ed8e8e9d63", "score": "0.6953814", "text": "public function up()\n {\n\t\t$this->db->query(\"CREATE TABLE IF NOT EXISTS `paper_tags` ( \n\t\t`paper_id` INT(11) NOT NULL , \n\t\t`tag_id` INT(11) NOT NULL ,\n\t\tFOREIGN KEY (`tag_id`) REFERENCES `tags`(tag_id),\n\t\tFOREIGN KEY (`paper_id`) REFERENCES `papers`(paper_id)) \n\t\tENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;\");\n\t\t\n\t\t$this->db->query(\"INSERT INTO `paper_tags` (`paper_id`, `tag_id`) VALUES \n\t\t('1', '1'),\n\t\t('1', '2'),\n\t\t('2', '1'),\n\t\t('2', '2'),\n\t\t('3', '1'),\n\t\t('3', '2'),\n\t\t('4', '3'),\n\t\t('5', '1'),\n\t\t('6', '1'),\n\t\t('6', '4'),\n\t\t('7', '1'),\n\t\t('7', '4'),\n\t\t('8', '1'),\n\t\t('9', '1'),\n\t\t('9', '5'),\n\t\t('10', '3'),\n\t\t('11', '1'),\n\t\t('11', '4'),\n\t\t('12', '1'),\n\t\t('12', '4');\");\n\t}", "title": "" }, { "docid": "e94dfe3eeb7b7cee316afac3fe36d764", "score": "0.6949918", "text": "public function up()\n {\n $table = $this->table('posts');\n $table->addColumn('title', 'string', ['limit'=>500]);\n $table->addColumn('content', 'string', ['limit'=>10000]);\n $table->addColumn('url', 'string', ['limit'=>500]);\n $table->addColumn('photo', 'string', ['null' => true]);\n $table->addColumn('photo_dir', 'string',['null' => true]);\n $table->addColumn('photo_size', 'integer',['null' => true]);\n $table->addColumn('photo_type', 'integer',['null' => true]);\n $table->addColumn('created_by', 'integer');\n $table->addColumn('category_id', 'integer');\n $table->addIndex(['created_by', 'category_id']);\n $table->addForeignKey('created_by', 'users', 'id'); \n $table->addForeignKey('category_id', 'categories', 'id'); \n $table->addColumn('created', 'datetime');\n $table->addColumn('modified', 'datetime', ['default' => null]);\n $table->create();\n }", "title": "" }, { "docid": "e542555e147080171a3434f934632a94", "score": "0.69492817", "text": "public function up()\n {\n $view_name = self::$table_name;\n $sql = <<<EOF\ncreate or replace view $view_name as\nselect\n\tvd_quiz_user.quiz_user_id,\n\tvd_quiz_user.user_id,\t\n\tvd_quiz_user.quiz_id,\n\tvd_quiz.video_id,\n\tvd_quiz.description as quiz_description,\n\tvd_quiz.correct_quiz_answer_id,\n\ttb_correct_quiz_answer.description as correct_quiz_answer_description,\n\tvd_quiz_user.quiz_answer_id,\n\tvd_quiz_answer.description as quiz_answer_description\nfrom vd_quiz_user\nleft join vd_quiz on vd_quiz_user.quiz_id = vd_quiz.quiz_id\nleft join vd_quiz_answer as tb_correct_quiz_answer on tb_correct_quiz_answer.quiz_answer_id = vd_quiz.correct_quiz_answer_id\nleft join vd_quiz_answer on vd_quiz_user.quiz_answer_id = vd_quiz_answer.quiz_answer_id\nEOF;\n\n DB::statement($sql);\n }", "title": "" }, { "docid": "d91038c1b6ce8d2d13671cde23112f26", "score": "0.69469875", "text": "public function up()\n {\n \tif (!$this->db->table_exists('mahasiswa')) {\n \t\t$this->dbforge->add_field( array(\n \t\t\t'nrp' => array(\n\t\t\t\t\t'type' => 'varchar',\n\t\t\t\t\t'constraint' => 9,\n\t\t\t\t\t'unsigned' => true,\n\t\t\t\t\t'auto_increment' => true\n \t\t\t),\n \t\t\t'nm_mahasiswa' => array(\n\t\t\t\t\t'type' => 'varchar',\n\t\t\t\t\t'constraint' => 50,\n\t\t\t\t\t'null' => false,\n 'auto_increment' => true\n \t\t\t),\n 'phone' => array(\n 'type' => 'varchar',\n 'constraint' => 20,\n 'null' => false\n ),\n 'email' => array(\n 'type' => 'varchar',\n 'constraint' => 50,\n 'null' => false,\n 'auto_increment' => true\n ),\n 'id_role' => array(\n 'type' => 'int',\n 'constraint' => 11,\n 'null' => false\n ),\n 'id_kelas' => array(\n 'type' => 'int',\n 'constraint' => 11,\n 'null' => false\n ),\n \t\t));\n \n \t\t/**\n \t\t * add key and create the table\n \t\t */\t\n \t\t$this->dbforge->add_key('nrp', true);\n \t\t$this->dbforge->create_table('mahasiswa');\n \n \t} //else\n }", "title": "" }, { "docid": "4964c282da66562099d9201cf2783c80", "score": "0.69402456", "text": "public function up()\n {\n $this->createTable('table_blud', [\n 'id' => $this->primaryKey(11),\n 'id_bluda' => $this->smallInteger(11),\n 'id_ingredient' => $this->smallInteger(11),\n 'datecreate' => $this->smallInteger(11),\n 'lastupdate' => $this->smallInteger(11),\n 'status' => $this->smallInteger(4),\n ]);\n $this->alterColumn('ingredient', 'id', $this->smallInteger(8).' NOT NULL AUTO_INCREMENT');\n\n $this->addForeignKey(\n 'FK_table_blud',\n 'table_blud',\n 'id_bluda',\n 'bluda',\n 'id',\n 'CASCADE'\n );\n\n $this->addForeignKey(\n 'FK_table_blud2',\n 'table_blud',\n 'id_ingredient',\n 'ingredient',\n 'id',\n 'CASCADE'\n );\n }", "title": "" }, { "docid": "02c3131d907c9a9de76fd55d642ed60c", "score": "0.6940046", "text": "public function up(): void\n {\n $objects = $this->table(\"objects\");\n $objects->addColumn(\"users_id\", \"integer\", [\"comment\" => \"Идентификатор владельца объекта\"])\n ->addColumn(\"name\", \"text\", [\"comment\" => \"Название объекта\"])\n ->addColumn(\"coordinates\", \"text\", [\"comment\" => \"Координаты объекта\"])\n ->addColumn(\"address\", \"text\", [\"comment\" => \"Адрес объекта\"])\n ->addColumn(\"points\", \"text\", [\"comment\" => \"Набор точек, определяющий контур объекта\"])\n ->addIndex([\"coordinates\"], [\"unique\" => true])\n ->addIndex([\"address\"])\n ->save();\n\n $objects->changeComment(\"Таблица объектов\")->update();\n }", "title": "" }, { "docid": "1732450f93641c3d23c77daa31081046", "score": "0.69378304", "text": "public function up(): void\n {\n $sql = <<<SQL\nUPDATE\n characters\nSET\n character_type = 'dhampir'\nWHERE\n character_type = 'dhamphir'\nSQL;\n $this->execute($sql);\n }", "title": "" }, { "docid": "7f77ddf54283340456ba773ca8794b73", "score": "0.69338185", "text": "public function up(){\n $table = $this->table('entries', array('id'=>false, 'primary_key'=>'id'));\n $table->addColumn('id', 'integer', array('signed'=>false, 'identity'=>true));\n $table->addColumn('date', 'date');\n $table->addColumn('account_type', 'integer', array('signed'=>false));\n $table->addColumn('value', 'decimal', array('precision'=>10, 'scale'=>2));\n $table->addColumn('memo', 'text');\n $table->addColumn('expense', 'integer', array('limit'=>MysqlAdapter::INT_TINY, 'default'=>1));\n $table->addColumn('confirm', 'integer',\n array('limit'=>MysqlAdapter::INT_TINY, 'default'=>0, 'comment'=>'confirmed according to statements')\n );\n $table->addColumn('deleted', 'integer', array('limit'=>MysqlAdapter::INT_TINY, 'default'=>0));\n $table->addColumn('stamp', 'timestamp', array('default'=>'CURRENT_TIMESTAMP'));\n $table->addIndex(array('date'));\n $table->save();\n }", "title": "" }, { "docid": "0dd3859f73730eb0bc539b4540b9d11f", "score": "0.6932733", "text": "public function safeUp()\n\t{\n $this->addColumn('products','images_count','int NOT NULL DEFAULT 0');\n\t}", "title": "" }, { "docid": "d93510d54ab14be008517f3dcf0ac2ce", "score": "0.69306475", "text": "public function up()\n {\n $rows = [\n [\n 'model' => 'ServiceContract',\n 'status' => 0\n ]\n ];\n\n $table = $this->table('custom_field_settings');\n $table->insert($rows);\n $table->saveData();\n }", "title": "" }, { "docid": "52e9bddd366afa26603b66527effb222", "score": "0.6905924", "text": "public function up()\n {\n $this->connect();\n $this->executeInTransaction('migrateUp');\n }", "title": "" }, { "docid": "41c779bcaddc3ea6750dcbf32509722c", "score": "0.69038683", "text": "public function up()\n\t{\n\t\tSchema::table('projects', function($t){\n\t\t\t$t->drop_column('fbo_solnbr');\n\t\t\t$t->date('posted_to_fbo_at')->nullable();\n\t\t});\n\n\t\tSchema::table('officers', function($t){\n\t\t\t$t->drop_column('verified_at');\n\t\t\t$t->drop_column('verified_solnbr');\n\t\t});\n\t}", "title": "" }, { "docid": "92481c283e93381a903189e3d240c392", "score": "0.68956184", "text": "public function up()\n\t{\n\t\t// Create Table\n\t\tSchema::create($this->name, function($table){\n\t\t\t$table->increments('id');\n\t\t\t$table->boolean('deleted')->default(0);\n\t\t\t$table->text('description')->nullable();\n\t\t\t$table->integer('discussion_count')->default(0)->unsigned();\n\t\t\t$table->integer('document_count')->default(0)->unsigned();\n\t\t\t$table->integer('member_count')->default(0)->unsigned();\n\t\t\t$table->string('name');\n\t\t\t$table->integer('project_category_id')->nullable();\n\t\t\t$table->integer('user_id')->nullable();\n\t\t\t$table->timestamps();\n\t\t});\n\t}", "title": "" }, { "docid": "10366a4324bb4ccd7bff019309c56a45", "score": "0.68929565", "text": "public function safeUp()\n\t{\n $this->addColumn('robot', 'sort', 'integer DEFAULT 0');\n\t}", "title": "" }, { "docid": "8eba40ea9e029b78b96bfe530aa5be1f", "score": "0.6886834", "text": "public function up()\n {\n $modulos = [\n [\n 'id' => 2,\n 'modulo' => 'Usuários',\n 'icon_cls' => 'fa fa-users',\n 'ui_sref' => 'app.usuario-list',\n 'aplicacao_id' => 1,\n 'ordem' => 100,\n 'ativo' => 1,\n 'migration' => time()\n ]\n ];\n\n $this->insert('singular_modulo', $modulos);\n }", "title": "" }, { "docid": "3104a9dabdfe267bf55c8172731371cb", "score": "0.68863523", "text": "public function up()\n {\n $this->table('setting_groups')\n ->addColumn('modal', 'integer', [\n 'after' => 'url',\n 'default' => '0',\n 'length' => 1,\n 'null' => false\n ])\n ->update();\n\n // Add data to new modal column of setting_groups table\n $this->query(\"UPDATE `setting_groups` SET `modal`=1 WHERE `slug`='AUTH' OR `slug`='BAR' OR `slug`='DBRESET' OR `slug`='ERRORLOG' OR `slug`='MAILLOG' OR `slug`='LOGO' OR `slug`='HEALTH'\");\n\n // Update column hidden in setting_groups table\n $this->query(\"UPDATE `setting_groups` SET `hidden`=1 WHERE `slug`='NOTIFICATION' OR `slug`='ROLES'\");\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "9f75cfc7cf88ef3fc7b3545a4248fc8e", "score": "0.0", "text": "public function run()\n {\n $arr = [\n [\n 'nama_bahan_baku' => 'Sabun',\n 'jumlah_bahan_baku' => 10,\n 'jenis_bahan_baku' => 'Pembersih',\n 'satuan' => 'Liter'\n ],\n [\n 'nama_bahan_baku' => 'Parfum',\n 'jumlah_bahan_baku' => 10,\n 'jenis_bahan_baku' => 'Pewangi',\n 'satuan' => 'Liter'\n ]\n ];\n foreach ($arr as $value) {\n BahanBaku::create($value);\n }\n }", "title": "" } ]
[ { "docid": "fe865198b7339ada0253770db050b45a", "score": "0.7975537", "text": "public function run()\n {\n $this->call(ContinentSeeder::class);\n $this->call(GenreSeeder::class);\n $this->call(RoleSeeder::class);\n DB::table(\"equipes\")->insert([\n \"nom\" => \"Sans Equipe\",\n \"ville\" => \"null\",\n \"pays\" => \"null\",\n \"max\" => 1000,\n \"att\" => 200,\n \"ct\" => 200,\n \"dc\" => 300,\n \"rp\" => 300,\n \"continent_id\" => 1\n ]);\n Team::factory(5)->create();\n Player::factory(15)->create();\n }", "title": "" }, { "docid": "def0e002a739b23c5ce75c2f4a5b60ba", "score": "0.7960287", "text": "public function run()\n {\n $permissions = new PermissionsTableSeeder();\n $permissions->run();\n $roles = new RolesTableSeeder();\n $roles->run();\n $headings = new headingsSeeder();\n $headings->run();\n $posts = new postsSeeder();\n $posts->run();\n\n $user = [\n [\n 'name' => 'Joe',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n ],\n ];\n\n foreach ($user as $key => $value) {\n User::create($value);\n }\n\n $role = [\n [\n 'user_id' => 1,\n 'role_id' => 1,\n ],\n ];\n\n foreach ($role as $key => $value) {\n DB::table('role_user')->insert($value);\n }\n\n\n }", "title": "" }, { "docid": "cbed0f656974d268b41fddcd9a665e9c", "score": "0.7946394", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n Article::create([\n 'body' => $faker->paragraph,\n 'heading' => $faker->sentence,\n 'subheading' => $faker->sentence,\n 'slug' => $faker->unique()->slug(),\n 'meta' => $faker->sentence,\n 'version' => $faker->numberBetween(1, 5),\n 'user_id' => 3,\n 'photo_id' => 12,\n ]);\n }\n }", "title": "" }, { "docid": "45e58516482f7ffcb96904e69bc69eff", "score": "0.79225564", "text": "public function run()\n {\n Eloquent::unguard();\n\n $faker= Faker\\Factory::create();\n\n foreach (range(1,5) as $key => $index) {\n $title = str_replace('.', '', $faker->sentence(2));\n $slug = str_slug($title, \"-\");\n NewsPost::create([\n 'active' => $faker->randomElement($array = array('active','inactive')),\n 'language' => locale(),\n 'title' => $title,\n 'slug' => $slug,\n 'meta_title' => str_replace('.', '', $faker->sentence(3)),\n 'meta_keywords' => str_replace('.', '', $faker->sentence(3)),\n 'meta_description' => $faker->realText(50),\n 'content' => $faker->realText(500), \n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(), \n ]);\n }\n }", "title": "" }, { "docid": "cafb15a42a31714bd832585fe9064750", "score": "0.792249", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n app('db.connection')->table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => app('hash')->make('secret'),\n 'email_verified_at' => date('Y-m-d H:i:s'),\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n\n app('db.connection')->table('posts')->insert([\n 'user_id' => 1,\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "title": "" }, { "docid": "8c188dde223b9cb3601be82fc53c11dd", "score": "0.7905214", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,50) as $index) {\n\t \\DB::table('users')->insert([\n\t \t'uuid' => Uuid::uuid4()->getHex(),\n\t 'name' => $faker->name,\n\t 'email' => $faker->email,\n\t 'password' => bcrypt('admin'),\n\t 'role_id' => 1,\n\t 'username' => $faker->username,\n\t 'gender' => 'L',\n\t 'phone' => $faker->phoneNumber,\n\t 'birthdate' => $faker->date($format = 'Y-m-d', $max = 'now')\n\t ]);\n\t }\n\n\t $role = ['admin', 'writter', 'member'];\n\t for ($i = 0; $i < 3; $i++) {\n\t \t\\DB::table('roles')->insert([\n\t \t\t'name' => $role[$i]\n\t \t]);\n\t }\n }", "title": "" }, { "docid": "bfcf0b9eb675e9685b1f439b58c20b58", "score": "0.79041165", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n// DB::statement('drop database blog');\n// DB::statement('create database blog');\n factory(App\\Models\\UsersModel::class, 10)->create();\n factory(App\\Models\\TagsModel::class, 5)->create();\n factory(App\\Models\\ArticlesModel::class, 20)->create();\n factory(App\\Models\\FriendlyLinksModel::class, 5)->create();\n factory(App\\Models\\CommentsModel::class, 60)->create();\n factory(App\\Models\\RepliesModel::class, 180)->create();\n// factory(App\\Models\\AdvertsModel::class, 10)->create();\n $articles = App\\Models\\ArticlesModel::query()->get();\n $tags = App\\Models\\TagsModel::query()->get();\n $data = [];\n $articles->map(function ($item) use ($tags, &$data) {\n $tow = $tags->random(2);\n $data[] = [\n 'article_id' => $item->id,\n 'tag_id' => $tow->first()->id\n ];\n $data[] = [\n 'article_id' => $item->id,\n 'tag_id' => $tow->last()->id\n ];\n });\n App\\Models\\ArticleTagModel::query()->insert($data);\n }", "title": "" }, { "docid": "956f8d1cb5383bddc4ac094153d68875", "score": "0.7901195", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n\n //modo Laravel official site (utilizza helper \"factory\")\n\n //factory(\\App\\User::class, 50)->create()->each(function($u) {\n //\t$u->post()->save(factory(\\App\\Post::class)->make());\n //});\n\n \n /*\n $authors = factory(App\\Author::class, 5)->create();\n\n $authors->each(function ($author) {\n $author\n ->profile()\n ->save(factory(App\\Profile::class)->make());\n \n $author\n ->posts()\n ->saveMany(\n factory(App\\Post::class, rand(20,30))->make()\n );\n });\n */\n\n\n\n\n $this->call(ArticlesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n\n }", "title": "" }, { "docid": "e98ca58a614a2e587dc869a8561ff53e", "score": "0.78984624", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Album::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Album::create([\n 'album_name' => $faker->name,\n 'album_description' => $faker->paragraph,\n 'cover_image' => $faker->url,\n 'user_id' => $faker->numberBetween(0, 10)\n ]);\n }\n }", "title": "" }, { "docid": "ebc3450d00c6f694252757b995f49049", "score": "0.7897771", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $products = [\n \t'Piłka',\n \t'Buty sportowe',\n \t'Skarpetki',\n \t'Dresy piłkarskie',\n \t'Bluzka',\n \t'T-shirt',\n \t'Kurtka przeciwdeszczowa',\n \t'Kurtka zimowa'\n ];\n\n $faker = Faker::create();\n\n $id = 1;\n\n foreach($products as $product) {\n\n \tDB::table('products')->insert([\n \t\t'name' => $product,\n \t\t'description' => $faker->sentence($nbWords = 6, $variableNbWords = true),\n 'created_at' => $faker->dateTimeThisYear(),\n 'updated_at' => $faker->dateTimeThisYear()\n \t]);\n\n DB::table('prices')->insert([\n 'product_id' => $id++,\n 'price' => $faker->numberBetween($min = 10, $max = 2000)\n ]);\n\n }\n\n \n\n }", "title": "" }, { "docid": "e56ca4e58ec7f68a1082b8357e7ad60b", "score": "0.7896924", "text": "public function run()\n {\n // Truncate the table\n Player::truncate();\n \n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n Player::create([\n 'first_name' => $faker->firstNameMale,\n 'last_name' => $faker->lastName,\n 'form' => $faker->randomFloat(2, 0, 1000),\n 'total_points' => $faker->randomDigitNotNull,\n 'influence' => $faker->randomFloat(2, 0, 1000),\n 'creativity' => $faker->randomFloat(2, 0, 1000),\n 'threat' => $faker->randomFloat(2, 0, 1000),\n 'ict_index' => $faker->randomFloat(2, 0, 1000),\n ]);\n }\n }", "title": "" }, { "docid": "c97f05061b43ec8fea282d5f3213d6ac", "score": "0.7894218", "text": "public function run()\n\t{\n\t\tDB::table('news')->delete();\n\t\t$faker = Faker::create();\n\t\t$categories = Category::all()->lists('id');\n\t\t$tags = Tag::all()->lists('id');\n\t\t$users = User::all()->lists('id');\n\t\tforeach(range(1,100) as $index)\n\t\t{\n\t\t\tNews::create([\n\t\t\t\t'slug'=>$faker->word,\n\t\t\t\t'text'=>$faker->text($maxNbChars = 800, $index = 2 ),\n\t\t\t\t'category_id'=>$faker->randomElement($categories),\n\t\t\t\t'tag_id'=> $faker->randomElement($tags),\n\t\t\t\t'user_id'=>$faker->randomElement($users),\n\t\t\t\t]);\n\t\t}\n\t\t\n\t\t\n\t\tEloquent::unguard();\n\n\t\t// $this->call('UserTableSeeder');\n\t}", "title": "" }, { "docid": "2adc405bf0b1c0e815d1221f71529e3b", "score": "0.78856826", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n User::create([\n 'name' => 'Leo Buchner',\n 'email' => '[email protected]',\n 'password' => Hash::make('password')\n ]);\n\n Page::create([\n 'parent_id' => null,\n 'title' => 'Quem Somos',\n 'slug' => 'quem-somos',\n 'body' => 'Conteúdo de Quem somos'\n ]);\n\n Page::create([\n 'parent_id' => 1,\n 'title' => 'Missão',\n 'slug' => 'missao',\n 'body' => 'Conteúdo de Missão'\n ]);\n\n Page::create([\n 'parent_id' => 1,\n 'title' => 'Visão',\n 'slug' => 'visao',\n 'body' => 'Conteúdo de Visão'\n ]);\n }", "title": "" }, { "docid": "0bd0f1606d68cef700792f0dd441bd4d", "score": "0.7885222", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 50)->create();\n factory(Category::class, 15)->create();\n factory(Post::class, 500)->create();\n factory(Comment::class, 1500)->create();\n }", "title": "" }, { "docid": "567e23c56d50f67ffb0efde7e5d4625c", "score": "0.78843975", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n DB::table('projets')->truncate();\n\n $models = array(\n ['title' => 1, 'user_id' => 1]\n );\n\n // Uncomment the below to run the seeder\n DB::table('projets')->insert($models);\n }", "title": "" }, { "docid": "7f9a14a4c0bc145934c8c161a34f4f54", "score": "0.7878623", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\")\n ]);\n\n DB::table('authors')->insert([\n 'id' => 1,\n 'name' => 'Joanne',\n 'surname' => 'Rowling',\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('books')->insert([\n 'title' => \"Harry Potter and the Philosopher's Stone\",\n 'author_id' => 1,\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\")\n ]);\n }", "title": "" }, { "docid": "75367f324e8fc349a7f7a4b71729043a", "score": "0.7878553", "text": "public function run()\n {\n // Disable Foreign key check for this connection before running seeder\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table( 'document_types' )->truncate();\n \n //create document types\n $types = [\n [\n 'name' => 'Vendors Supporting Documents',\n 'description' => 'These are the documents vendors upload during registration. This type should never be deleted.'\n ],\n [\n 'name' => 'Proposal Document',\n 'description' => 'Document submitted by xyz for xyz purpose'\n \n ],\n [\n 'name' => 'Others',\n 'description' => 'Other types of documents' \n ]\n ];\n\n foreach ($types as $type) {\n $documentFormat = new DocumentType($type);\n $documentFormat->save();\n };\n\n // enable Foreign key check \n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "9176f195933997b4883dd0f7505f9cf5", "score": "0.787096", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n \n 'name' => $faker->name,\n 'type' => $faker->company,\n 'category' => $faker->creditCardType,\n 'sub' => $faker->userName\n 'price' => $faker->biasedNumberBetween($min = 10, $max = 20, $function = 'sqrt'),\n 'quantity' => $faker->biasedNumberBetween($min = 10, $max = 20, $function = 'sqrt')\n\n \t\t\t\t\t\n ]);\n }\n }", "title": "" }, { "docid": "49aa7e2235ee60d3e4e3da48fe378ddf", "score": "0.78695685", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Post::truncate();\n\n $faker = \\Faker\\Factory::create();\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Post::create([\n 'category_name' => $faker->sentence,\n 'category_slug' => PostHelper::post_slug($faker->sentence),\n 'meta_description' => $faker->paragraph,\n 'meta_title' => $faker->sentence,\n 'meta_keywords' => $faker->sentence,\n 'publication_status' => $faker->numberBetween(0,1),\n ]);\n }\n }", "title": "" }, { "docid": "1bf093e5298bec6ab9623533f62b1138", "score": "0.786323", "text": "public function run()\n {\n User::factory()->create([\n 'role' => 'admin',\n ]);\n User::factory()->count(4)->create([\n 'role' => 'author',\n ]);\n User::factory()->count(8)->create();\n\n // insert default user \n DB::table('users')->insert([\n [\n 'name' => 'samia',\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678'),\n 'role' => 'admin',\n 'valid' => 1\n ]\n ]);\n\n // insert categories\n DB::table('categories')->insert([\n [\n 'title' => 'Category 1',\n ],\n [\n 'title' => 'Category 2',\n ],\n [\n 'title' => 'Category 3',\n ],\n ]);\n\n // insert tags \n DB::table('tags')->insert([\n [\n 'tag' => 'Tag 1', \n ],\n [\n 'tag' => 'Tag 2',\n ],\n [\n 'tag' => 'Tag 3',\n ],\n [\n 'tag' => 'Tag 4',\n ],\n [\n 'tag' => 'Tag 5',\n ],\n [\n 'tag' => 'Tag 6',\n ]\n ]);\n\n // seed some posts \n foreach (range(1, 3) as $i) {\n Post::factory()->create([\n 'title' => 'Post ' . $i,\n 'slug' => 'post-' . $i,\n 'user_id' => 3,\n 'image' => 'img0' . $i . '.jpg',\n ]);\n }\n foreach (range(4, 10) as $i) {\n Post::factory()->create([\n 'title' => 'Post ' . $i,\n 'slug' => 'post-' . $i,\n 'user_id' => 4,\n 'image' => 'img0' . $i . '.jpg',\n ]);\n }\n }", "title": "" }, { "docid": "522cd5fdba487ddde3d6b9d32593e2af", "score": "0.7858243", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory('App\\User', 20)->create();\n factory('App\\Company', 20)->create();\n factory('App\\job', 20)->create();\n\n\n $categories = [\n 'Government','Banking','BITM','Medical','Software','Engineering'\n ];\n\n foreach ($categories as $category){\n Category::create(['name' => $category]);\n }\n }", "title": "" }, { "docid": "5f2cca1fa3a2c50a447bcf26be71b5fc", "score": "0.78552336", "text": "public function run()\n {\n //\n Staff::truncate();\n\n $faker = \\Faker\\Factory::create('zh_CN');\n $position=array('后端工程师','前端工程师','总监','主任','项目组长');\n $sex=array(10,20,30);\n // And now, let's create a few articles in our database:\n DB::statement(\"ALTER TABLE staff AUTO_INCREMENT = 1000;\");\n for ($i = 0; $i < 1000; $i++) {\n Staff::insert([\n// 'name' => $faker->addProvider(new \\Faker\\Provider\\zh_CN\\Person($faker)),\n// 'name'=>$faker->addProvider(new \\Faker\\Provider\\zh_CN\\Person()),\n 'name'=>$faker->name,\n 'age' => array_random([20,22,25,26,30,28,33,31,30,29,27,38,40,39]),\n 'sex'=>array_random($sex),\n 'position'=>array_random($position),\n 'state'=>0,\n 'created_at'=>date('Y-m-d H-i-s'),\n 'updated_at'=>date('Y-m-d H-i-s'),\n ]);\n }\n }", "title": "" }, { "docid": "71ef9086bdef705406c334abd42529e9", "score": "0.783668", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n \n $tags = factory('App\\Tag', 8)->create();\n\n factory('App\\Post', 30)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory('App\\Comment')->make());\n $post->categories()->attach(mt_rand(1,5));\n $post->tags()->attach($tags->random(mt_rand(1,4))->pluck('id')->toArray());\n });\n }", "title": "" }, { "docid": "b80ba6a80746c13a65e6a74dc9c32a63", "score": "0.7836474", "text": "public function run()\n {\n //invoke seeder faker package to seed the database with dummy data\n $faker = Faker::create();\n\n $new = News::create([\n 'user_id' => 2,\n 'title' => $faker->sentence,\n 'abst' => $faker->sentence,\n 'body' => $faker->paragraph,\n 'mediapath' => $faker->url,\n ]);\n \n }", "title": "" }, { "docid": "9094efdb19f24a063107ecf5940ecdfb", "score": "0.78354853", "text": "public function run()\n {\n $this->call([\n PermissionsTableSeeder::class,\n RolesTableSeeder::class,\n PermissionRoleTableSeeder::class,\n UsersTableSeeder::class,\n RoleUserTableSeeder::class,\n StatusTableSeeder::class,\n ProductTableSeeder::class,\n ]);\n\n Category::factory()->count(3)->create();\n // Product::factory()->count(5)->create();\n\n $categories = Category::all();\n Product::all()->each(function ($product) use ($categories){\n $product->categories()->attach(\n $categories->random(1)->pluck('id')->toArray()\n );\n });\n\n \n }", "title": "" }, { "docid": "1ac2f951ea20568364995cb478f4c848", "score": "0.7827812", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // create mock data using php artisan db:seed\n\n // create mock user data\n factory(App\\User::class,10)->create();\n\n // create mock role data\n $this->call(RolesTableSeeder::class);\n\n // factory(App\\Role::class,5)->create();\n // Using the below seed method to insert roles in specific order using array instead of randomizing it and making sure it only appearts once.\n // $roles = ['project owner', 'project leader', 'junior developer', 'medior developer', 'senior developer'];\n // for($i=0; $i < count($roles); $i++){\n // DB::table('roles')->insert([\n // 'role' => $roles[$i]\n // ]);\n // }\n\n\n // create mock level data\n // factory(App\\Level::class)->create();\n\n // create mock user_projects data\n $this->call(UsersProjectsTableSeeder::class);\n\n // create mock project data\n factory(App\\Project::class,10)->create();\n\n // create mock task data\n factory(App\\Task::class,20)->create();\n }", "title": "" }, { "docid": "d8dbbd6952e51afba458d100498efcf6", "score": "0.78265905", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $todoLists = factory(TodoList::class, 3)->create();\n\n $todoLists->each(function ($list) {\n factory(Todo::class, 6)->create(['todo_list_id'=>$list->id]);\n });\n }", "title": "" }, { "docid": "dfe051095ab9dad76a095becab65d15f", "score": "0.78256834", "text": "public function run()\n {\n //\n //Rubros::truncate();\n $faker = \\Faker\\Factory::create();\n\n\n for ($i = 0; $i < 50; $i++) {\n Rubros::create([\n 'nombre'=> $faker->name,\n 'created_at'=>$faker->dateTimeBetween(),\n 'updated_at'=>$faker->dateTimeBetween(),\n ]);\n }\n\n //Articles::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few Articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Articles::create([\n 'rubro_id' => $faker->numberBetween(1,50),\n 'nombre'=> $faker->name,\n 'descripcion'=>$faker->text(200),\n 'codigo'=>$faker->numberBetween(000000,5555555),\n 'precio'=>$faker->numberBetween(1,200),\n 'caracteristicas'=>$faker->text(200),\n 'created_at'=>$faker->dateTimeBetween(),\n 'updated_at'=>$faker->dateTimeBetween(),\n ]);\n }\n }", "title": "" }, { "docid": "f983241a695a5e39eb832ac04acb5dbe", "score": "0.782249", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class,5)->create();\n factory(Category::class,10)->create();\n factory(Article::class,100)->create();\n factory(Comment::class,500)->create();\n }", "title": "" }, { "docid": "6a91bbe4cd963f04b1edf9ac5661b1e5", "score": "0.7819753", "text": "public function run()\n {\n $faker = Faker\\Factory::create('pl_PL');\n DB::table('role')->insert([\n 'id'=>1,\n 'name'=>'User',\n ]);\n DB::table('role')->insert([\n 'id'=>2,\n 'name'=>'Kucharz',\n ]);\n DB::table('role')->insert([\n 'id'=>3,\n 'name'=>'Dostawca',\n ]);\n DB::table('role')->insert([\n 'id'=>4,\n 'name'=>'Admin',\n ]);\n }", "title": "" }, { "docid": "8b57fa3b60e07bc383b7c7950c199b92", "score": "0.78077936", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('users')->insert([\n 'id' => '1',\n 'name' => 'Sergio Sanchez',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('categories')->insert([\n 'id' => '1',\n 'name' => 'Programación',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('categories')->insert([\n 'id' => '2',\n 'name' => 'Diseño',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('categories')->insert([\n 'id' => '3',\n 'name' => 'Software',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('categories')->insert([\n 'id' => '4',\n 'name' => 'Tecnología',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n }", "title": "" }, { "docid": "391e06a0577efad849ffd33edc20c4af", "score": "0.7802653", "text": "public function run()\n {\n $this->cleanDatabase();\n $this->call(CitiesTableSeeder::class);\n $this->call(AcademiesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(IngredientsTableSeeder::class);\n $this->call(CriteriaTableSeeder::class);\n\n factory('App\\Judge', 5)->create();\n factory('App\\User', 50)->create();\n factory('App\\Recipe', 102)->create();\n \n// $this->IngredientRecipeTableSeeder();\n $this->VotesTableSeeder();\n $this->RoleUserTableSeeder();\n }", "title": "" }, { "docid": "bc18e1b07936000ee483f32bf7332f03", "score": "0.779398", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// factory(App\\Author::class, 50)->create();\n// factory(App\\Publisher::class, 50)->create();\n //factory(App\\Book::class, 50)->create();\n factory(App\\User::class, 5)->create();\n// factory(App\\Item::class, 50)->create();\n// factory(App\\Order::class, 50)->create();\n// factory(App\\Invoice::class, 50)->create();\n\n// factory(App\\Account::class, 50)->create();\n }", "title": "" }, { "docid": "226907a8e7d8adb8c96e7797871e7037", "score": "0.77881116", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0 ');\n\n Role::truncate();\n User::truncate();\n Vendor::truncate();\n Customer::truncate();\n Category::truncate();\n Offer::truncate();\n Bookmark::truncate();\n Category_has_offer::truncate();\n\n\n $usersQuantity=20;\n $vendorsQuantity=5;\n $customersQuantity=15;\n $categoriesQuantity=5;\n $offersQuantity=20;\n $bookmarksQuantity=20;\n $category_has_offersQuantity=20;\n\n\n factory(Role::class,2)->create();\n factory(User::class,$usersQuantity)->create();\n factory(Vendor::class,$vendorsQuantity)->create();\n factory(Customer::class,$customersQuantity)->create();\n factory(Category::class,$categoriesQuantity)->create();\n factory(Offer::class,$offersQuantity)->create();\n factory(Bookmark::class,$bookmarksQuantity)->create();\n factory(Category_has_offer::class,$category_has_offersQuantity)->create();\n\n }", "title": "" }, { "docid": "f952b220e598b5188cd9160f6854f6cd", "score": "0.77875453", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin')\n ]);\n\n // $this->call(UsersTableSeeder::class);\n DB::table('datosempresas')->insert([\n 'nombreEmpresa' => 'Moto Boxes',\n 'nit' => '11454337',\n 'direccion' => 'México # 131 Esquina Av. De las Américas',\n 'telefono' => 'S/N',\n 'celular' => '68620333'\n ]);\n\n }", "title": "" }, { "docid": "1881d531d91c3c81f91ad0f0c8328ad1", "score": "0.7786826", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n Category::factory()->count(5)->create();\n Category::factory()->count(20)->create([\n 'category_id' => rand(1,4),\n ]);\n Post::factory()->count(20)->create();\n }", "title": "" }, { "docid": "802bb77125f03e0915c06d50346e98f8", "score": "0.77848125", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n penalitzacions::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n \tpenalitzacions::create([\n \t\t'pentipus' => $faker->randomElement($array = array('exclusio','baneig')),\n \t\t'pendata_inici' => $faker->date,\n \t\t'pendata_final' => $faker->date,\n \t]);\n }\n }", "title": "" }, { "docid": "ef3b1a3883f3d079a4d8dfe5989ab713", "score": "0.7781416", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /*\n $faker = Faker::create();\n \tforeach (range(1,20) as $index) {\n\t DB::table('companies')->insert([\n\t 'name' => $faker->name,\n\t 'email' => $faker->email,\n\t 'website' => $faker->domainName,\n ]);\n } */\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n list($first_name,$last_name) = explode(' ',$faker->name);\n\t DB::table('employees')->insert([\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n\t 'email' => $faker->email,\n 'phone' => $faker->phoneNumber,\n 'id_company' => rand(30, 33),\n ]);\n }\n }", "title": "" }, { "docid": "de4eb402a27ca0b92fe133e4278163eb", "score": "0.7777538", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n /* Seed the most basic tables */\n $this->call([\n MuscleSeeder::class,\n CategorySeeder::class,\n ExerciseSeeder::class,\n ]);\n\n /* Seed test user */\n $user = new \\App\\Models\\User;\n $user->name = 'Tony Stark';\n $user->email = '[email protected]';\n $user->email_verified_at = now();\n $user->password = Hash::make('PepperPotts<3');\n $user->remember_token = Str::random(10);\n $user->birthdate = Carbon::today()->subYears(rand(0, 30));\n $user->genre = 'Hombre';\n $user->description = 'HOMBRE DE ACERO. Genio. Multimillonario. Filántropo. La confianza de Tony Stark solo se compara con sus habilidades de alto vuelo como el héroe llamado Iron Man.';\n $user->save();\n /* Seed the users and routines via factories */\n \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Routine::factory(40)->create();\n \\App\\Models\\Workout::factory(750)->create();\n\n $users = \\App\\Models\\User::all();\n $routines = \\App\\Models\\Routine::all();\n $categories = \\App\\Models\\Category::all();\n $sets = \\App\\Models\\Set::all();\n $workouts = \\App\\Models\\Workout::all();\n $exercises = \\App\\Models\\Exercise::all();\n\n /* Seed the many to many relationships */\n \\App\\Models\\User::all()->each(function ($user) use ($routines) { \n $user->favouriteRoutines()->attach(\n $routines->random(rand(1, 3))->pluck('id')->toArray()\n ); \n });\n\n \\App\\Models\\User::all()->each(function ($user) use ($users) { \n $user->followers()->attach(\n $users->random(rand(1, 3))->pluck('id')->toArray()\n ); \n });\n\n \\App\\Models\\Exercise::all()->each(function ($exercise) use ($exercises) { \n $exercise->similar()->attach(\n $exercises->random(rand(1, 3))->pluck('id')->toArray()\n ); \n });\n\n \\App\\Models\\Routine::all()->each(function ($routine) use ($routines) { \n $routine->similar()->attach(\n $routines->random(rand(1, 3))->pluck('id')->toArray()\n ); \n });\n\n \\App\\Models\\Routine::all()->each(function ($routine) use ($categories) { \n $routine->categories()->attach(\n $categories->random(rand(1, 3))->pluck('id')->toArray()\n ); \n });\n\n \\App\\Models\\Routine::all()->each(function ($routine) use ($sets) { \n $routine->sets()->attach(\n $sets->random(rand(1, 5))->pluck('id')->toArray()\n ); \n });\n\n \\App\\Models\\Workout::all()->each(function ($workout) use ($sets) {\n $workout->sets()->attach(\n $sets->random(rand(1, 5))->pluck('id')->toArray(),\n ['weight' => rand(0, 100)]\n );\n });\n\n /* Seed the comments */\n \\App\\Models\\Comment::factory(40)->create();\n \\App\\Models\\Rating::factory(40)->create();\n\n\n\n }", "title": "" }, { "docid": "7ae21bf6d66f3a33452b6cb157df32da", "score": "0.7776954", "text": "public function run()\n {\n $this->call(StateSeeder::class);\n $this->call(DocumentSeeder::class);\n /*$categories=factory(App\\Category::class, 6)->create();\n\n $products = factory(App\\Product::class,300)->create();\n\n $customers = factory(App\\Customer::class,10)->create();\n\n $customers->each(function(App\\Customer $customer)\n {\n factory(App\\Order::class,8)->create(['customer_id'=> $customer->id])\n ->each(function(App\\Order $order)\n {\n \n for ($i=0; $i < rand(1,10); $i++) \n {\n $order->products()->attach(rand(1,300),['quantity' => rand(1,10)]); \n }\n\n });\n });*/\n \n $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "ca90d8592dcc8dabba72ec0ea966f14a", "score": "0.77743125", "text": "public function run()\n {\n $faker = app(Faker\\Generator::class);\n // 获取作者的 id\n $authors = App\\Models\\User::activated()->lists('id')->toArray();\n // 获取栏目的 id\n $columns = App\\Models\\Column::visible()->lists('id')->toArray();\n // 生成 100 篇测试文章内容\n $articles = factory(App\\Models\\Article::class)->times(100)->make()->each(function($ele) use ($faker, $authors, $columns) {\n $ele->user_id = $faker->randomElement($authors);\n $ele->column_id = $faker->randomElement($columns);\n })->toArray();\n // 保存测试数据\n App\\Models\\Article::insert($articles);\n }", "title": "" }, { "docid": "c107b0e64a3c47feca08f929f10d419c", "score": "0.7771645", "text": "public function run()\n {\n // DB::table('articles')->insert([\n // 'title' => 'BeritaUtama',\n // 'content' => \"Lorem, ipsum dolor sit amet consectetur adipisicing elit. Deleniti, officiis asperiores fugiat nam, reiciendis minima ratione exercitationem alias, possimus delectus corporis ullam perferendis veniam odio nobis eius ducimus doloremque a.\",\n // 'created_at' => Carbon::now()\n // ]); \n\n $faker = Faker::create('id_ID');\n\n for ($i = 1; $i < 20; $i++) {\n DB::table('articles')->insert([\n 'title' => $faker->word,\n 'content' => $faker->text\n ]);\n }\n }", "title": "" }, { "docid": "6d836f21914828ae17c384b3f209f115", "score": "0.7771384", "text": "public function run()\n {\n User::factory(3)->create();\n // Student::factory(10)->create();\n // Subject::factory(20)->create();\n // Post::factory(10)->create();\n // Comment::factory(10)->create();\n // Category::factory(10)->create();\n // CategoryPost::factory(10)->create();\n // $this->call([\n // StudentsTableSeeder::class,\n // SubjectsTableSeeder::class,\n // ]);\n }", "title": "" }, { "docid": "a19a863a3c172b1e3a5f89379a980807", "score": "0.77686507", "text": "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(10)->create();\n Car::factory(50)->create();\n Customer::factory(100)->create();\n Rental::factory(100)->create();\n }", "title": "" }, { "docid": "c5105a8b1575468d787e6846d5ac9104", "score": "0.7767463", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $actors = factory(Actor::class)->times(3)->create();\n $movies = factory(Movie::class)->times(3)->create();\n\n foreach($movies as $movie) {\n $movie->actors()->saveMany($actors->random(1));\n }\n foreach($actors as $actor) {\n $actor->favoriteMovie()->associate($movies->random(1)->first())->save();\n }\n }", "title": "" }, { "docid": "77bc83bb77c84b6a32d69a26bb84cc8c", "score": "0.7764518", "text": "public function run()\n {\n $this->call(DefaultSeeder::class);\n\n factory(User::class, 10)->create();\n factory(Person::class, 10)->create();\n factory(Warehouse::class, 10)->create();\n }", "title": "" }, { "docid": "e6dd5ab1ad8ada2d2ed87bf4b12f83e9", "score": "0.77591866", "text": "public function run()\n {\n if (!DatabaseSeeder::$seedDemo) return;\n\n $this->seedCategories();\n\n $this->seedMenuOptions();\n\n $this->seedMenuItems();\n }", "title": "" }, { "docid": "72aedb6158851cf44c9d6084118effa4", "score": "0.77547807", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /*for($i=0; $i<100; $i++) {\n DB::table('products')->insert([\n 'name' => 'Элик'.str_random(5),\n 'alias' => str_random(10),\n 'small_description' => str_random(10),\n 'description' => str_random(10),\n 'price' => 5,\n 'image_menu' => str_random(10),\n 'image_item' => str_random(10),\n 'category_id' => 1\n ]);\n }*/\n }", "title": "" }, { "docid": "5a433d20681743d4ddb252825dc36aaa", "score": "0.77538455", "text": "public function run()\n {\n // Trunkate the databse so we don't repeat the seed\n DB::table('specialties')->delete();\n\n Specialty::create(['name' => 'BTO']);\n Specialty::create(['name' => 'CSI']);\n Specialty::create(['name' => 'FTS']);\n Specialty::create(['name' => 'FTO']);\n }", "title": "" }, { "docid": "ba7e0fd641cb31099e2c5fa54faa8e77", "score": "0.7753819", "text": "public function run()\n {\n $this->call(RolesAndPermissionsSeeder::class);\n $this->call(DefaultUserSeeder::class);\n User::factory(15)->create();\n Article::factory(500)->create();\n ShoutBox::factory(100)->create();\n }", "title": "" }, { "docid": "05e7312b7e2cb072c0c676e15665b127", "score": "0.7752797", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n factory(App\\Models\\User::class, 10)->create();\n $this->call(CategoriesTableSeeder::class);\n factory(App\\Models\\Product::class, 150)->create();\n $this->call(ProductCategoryTableSeeder::class);\n }", "title": "" }, { "docid": "12c9b31b505f5dfffae32aa5afae328d", "score": "0.7749977", "text": "public function run()\n {\n $this->call([\n AdminSeeder::class,\n AuthorSeeder::class\n ]);\n\n User::factory(50)->create();\n Book::factory(50)->create();\n }", "title": "" }, { "docid": "913d91c0a927c572219a293692dfe0e4", "score": "0.7745714", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(\\App\\Aspirante::class,200)\n ->create()\n ->each(function(\\App\\Aspirante $a){\n $a->families()->saveMany(factory(\\App\\Family::class,3)->create());\n $a->schools()->saveMany(factory(\\App\\School::class,2)->create());\n });\n }", "title": "" }, { "docid": "6533a8576521ed0b51140445635dbc1c", "score": "0.7737327", "text": "public function run()\n {\n // Create users & posts factory\n User::factory(15)\n ->has(\n Post::factory()->count(rand(0, 20))\n )->create();\n\n $this->call(PostTagTableSeeder::class);\n $this->call(CommentTableSeeder::class);\n }", "title": "" }, { "docid": "d5c6e8dbb5ab0124c21111d415bacac3", "score": "0.77356786", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // factory(App\\Models\\User::class, 19)->create()->each(function ($user) {\n // $user->profile()->save(factory(App\\Models\\Profile::class)->make())->each(function ($profile) {\n\t // $profile->education()->save(factory(App\\Models\\Education::class)->make());\n\t // $profile->family()->save(factory(App\\Models\\Family::class)->make());\n\t // });\n // });\n factory(App\\Models\\Education::class, 9)->create();\n factory(App\\Models\\Family::class, 9)->create();\n \n }", "title": "" }, { "docid": "8a8d6c0890f498137961596d881803f3", "score": "0.7733169", "text": "public function run()\n {\n // Llamadas a los seeds creados\n $this->call([\n UserTableSeeder::class,\n ProvinceSeeder::class,\n LocalitiesSeeder::class,\n PropertyTableSeeder::class,\n AddressTableSeeder::class,\n SaleTableSeeder::class,\n RentalTableSeeder::class,\n ImageTableSeeder::class,\n Visiting_hourTableSeeder::class,\n //PostSeeder::class,\n //CommentSeeder::class,\n ]);\n }", "title": "" }, { "docid": "d92013d87584b99403c59872bc05f603", "score": "0.77330625", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(CompanyTableSeeder::class);\n //factory(App\\Models\\Position::class, 2000)->create(); //插入2000个职位\n \n //factory(App\\Models\\Resume::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemBasic::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemEducation::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemContact::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemProject::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemWork::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemAward::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemJob::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemSkill::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemComment::class, 2000)->create(); //插入2000个职位\n //factory(App\\Models\\ItemAttach::class, 2000)->create(); //插入2000个职位\n factory(App\\Models\\CareerTalk::class, 1000)->create(); //插入2000个职位\n factory(App\\Models\\JobFair::class, 20)->create();\n }", "title": "" }, { "docid": "5914f265808c32f93ca0d075523a7744", "score": "0.7732018", "text": "public function run()\n {\n DB::table('admin_users')->truncate();\n DB::table('classes')->truncate();\n DB::table('admin_menus')->truncate();\n DB::table('base_area')->truncate();\n DB::table('base_dictionary_option')->truncate();\n DB::table('base_settings')->truncate();\n \n $fileSystem = new Filesystem();\n $database = $fileSystem->get(base_path('database/seeds') . '/' . 'init.sql');\n DB::connection()->getPdo()->exec($database);\n DB::table('admin_users')->insert([\n 'name' => 'user1',\n 'real_name' => 'user1',\n 'password' => bcrypt('123456'),\n 'email' => '[email protected]',\n 'mobile' => '123456',\n 'avatar' => 'http://webimg-handle.liweijia.com/upload/avatar/avatar_0.jpg',\n 'type' => 0,\n 'is_root' => 1\n ]);\n\n DB::table('classes')->insert([\n 'class' => '未分类',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n // $this->call(NeedSeeder::class);\n $this->call(TestSeeder::class);\n $this->call(UserWeightSeeder::class);\n $this->call(SendRangeSeeder::class);\n // $this->call(CountySeeder::class);\n $this->call(FoodSetSeeder::class);\n }", "title": "" }, { "docid": "b066733d83ed33033a7498684d0b7ab4", "score": "0.77264494", "text": "public function run()\n {\n $faker=Faker::create();\n DB::table('proveedors')->insert([\n 'nombre' => 'No Proveedor',\n 'nit'=>000000,\n 'direccion'=>'Sin direccion',\n 'telefono'=>00000,\n 'estado'=>1,\n \t\n ]);\n }", "title": "" }, { "docid": "cbaca813899707dac06e08e37cf5ef72", "score": "0.7725645", "text": "public function run()\n {\n //\n\n $faker = Faker::create();\n $count = 20;\n\n foreach (range(1,$count) as $index) {\n\t DB::table('doujinshis')->insert([\n\t 'author' => $faker->name,\n\t 'title' => $faker->sentence(3),\n\t 'published_at' => $faker->date('Y-m-d')\n\t ]);\n\t}\n }", "title": "" }, { "docid": "6da5b1895275bf537422e69e8f38b733", "score": "0.772362", "text": "public function run()\n {\n //\n $faker = \\Faker\\Factory::create();\n $store = Store::all()->pluck('id')->toArray();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->colorName,\n 'description' => $faker->sentence(6, true),\n 'price' => $faker->randomFloat(2, 100, 999999),\n 'total_in_shelf' => $faker->numberBetween(1, 30),\n 'total_in_vault' => $faker->numberBetween(20, 100),\n 'store_id' => $faker->randomElement($store),\n ]);\n }\n }", "title": "" }, { "docid": "426529b7aca5b6fa857b2025bfe1d04d", "score": "0.77212536", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::table('categories')->insert([\n ['code' => 'tn', 'name' => 'tai nghe'],\n ['code' => 'bp', 'name' => 'bàn phím'],\n ['code' => 'ch', 'name' => 'chuột']\n ]);\n DB::table('brands')->insert([\n ['code' => 'rz', 'name' => 'razor'],\n ['code' => 'lt', 'name' => 'logitech'],\n ['code' => 'du', 'name' => 'dareu'],\n ['code' => 'as', 'name' => 'asus'],\n ['code' => 'cs', 'name' => 'corsair'],\n ['code' => 'ed', 'name' => 'e-dra'],\n ['code' => 'ss', 'name' => 'steelseries']\n ]);\n DB::table('sliders')->insert([\n 'img1'=>'uploads/hinh-slider.jpg',\n 'img2'=>'uploads/hinh-slider1.jpg',\n 'img3'=>'uploads/hinh-slider2.png',\n 'img4'=>'uploads/hinh-slider3.jpg',\n 'img5'=>'uploads/hinh-slider4.jpg'\n ]);\n\n }", "title": "" }, { "docid": "609cd7f299c3c08ad820677c3406ecd0", "score": "0.77187014", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n foreach (range(1, 20) as $index) {\n Db::table('transportatoris')->insert([\n 'nume' => $faker->company,\n 'persoana_contact' => $faker->name,\n 'numar_telefon' => $faker->phoneNumber,\n 'email' => $faker->email,\n ]);\n }\n }", "title": "" }, { "docid": "9638067e470dc0f60e70e7951a8808de", "score": "0.77170426", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n $role = collect([\"Owner\", \"Manager\", \"Staff\"]);\n $role->each(function($r) {\n \\App\\Role::create([\n 'role' => $r\n ]);\n });\n\n $categories = collect([\"Alat Masak\", \"Alat Olahraga\",\"Perabotan Rumah\"]);\n $categories->each(function($c) {\n \\App\\Category::create([\n 'name' => $c,\n ]);\n });\n\n $rooms = collect([\"Gudang 1\", \"Gudang 2\", \"Gudang 3\"]);\n $rooms->each(function($room) {\n \\App\\Room::create([\n 'name' => $room\n ]);\n });\n\n \\App\\User::create([\n 'role_id' => 1,\n 'name' => \"Fizar Rama Waluyo\",\n 'email' => \"[email protected]\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n 'avatar' => \"images/users/avatar.png\",\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n }", "title": "" }, { "docid": "dd797f58badcb0d75964f3f26aa64b0d", "score": "0.77166605", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert([\"title\"=>\"Πελάτης\"]);\n // DB::table('roles')->insert([\"title\"=>\"Διαχειριστής\"]);\n // DB::table('roles')->insert([\"title\"=>\"Τεχνικός\"]);\n // DB::table('roles')->insert([\"title\"=>\"Admin\"]);\n // DB::table('roles')->insert([\"title\"=>\"Super Admin\"]);\n // factory(App\\Manufacturer::class,5)->create();\n // factory(App\\Mark::class,5)->create();\n // factory(App\\Device::class,10)->create();\n // factory(App\\DamageType::class,5)->create();\n // factory(App\\Damage::class,25)->create();\n DB::table('users')->insert([\"firstname\" => \"TestAdmin\", \"lastname\" => \"Progressnet\", \"email\" => \"[email protected]\", \"password\" => bcrypt(\"progressnet\"), \"telephone\" => \"2111828724\", \"active\" => true]);\n $admin_id = DB::table('users')->where('email', '[email protected]')->value('id');\n DB::table('role_user')->insert([\"role_id\" => 5, \"user_id\" => $admin_id]);\n }", "title": "" }, { "docid": "6417c94284d2ecfa7f85acad0d1c77b7", "score": "0.77159977", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n App\\Student::create([\n 'name' => $faker->name,\n 'phone' => $faker->phoneNumber,\n 'email' => $faker->email,\n 'address' => $faker->address,\n 'matric_no' => $faker->randomNumber($nbDigits = null, $strict = false),\n 'password' => $faker->password,\n 'date_of_birth' => $faker->date,\n 'department' => 'computer science',\n ]);\n }\n }", "title": "" }, { "docid": "f4924a7cee9b80ce57e70727ff2b56d3", "score": "0.7714849", "text": "public function run()\n {\n $roles = array('Admin','Inventory','Budget');\n foreach($roles as $role){\n \\DB::table('roles')->insert([\n 'role' => $role\n ]);\n }\n\n \\DB::table('links')->insert([\n 'url' => 'https://devinv.efulife.com/'\n ]);\n\n \n\n \\DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('secret') ,\n 'role_id' => 1\n ]);\n\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "65d3ab32705054a2ea9c046b128713fd", "score": "0.77113473", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::table('users')->insert([\n 'name' => \"sasuke uchia\",\n 'email' => \"[email protected]\",\n 'email_verified_at' => now(),\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n 'remember_token' => Str::random(10),\n ]);\n\n factory(App\\User::class, 10)->create();\n\n $this->call([PostSeeder::class, ArticleSeeder::class]);\n\n $i = 10;\n\t\twhile ($i--) {\n\t\t\tPost::find(rand(1, 5))->rating(\n\t\t\t\t[\n\t\t\t\t\t\"title\" => Str::random(5),\n\t\t\t\t\t\"body\" => Str::random(10),\n\t\t\t\t\t\"rating\" => rand(1, 5),\n\t\t\t\t],\n\t\t\t\tUser::find(rand(1, 10))\n\t\t\t);\n\n\t\t\tArticle::find(rand(1, 5))->rating(\n\t\t\t\t[\n\t\t\t\t\t\"title\" => Str::random(5),\n\t\t\t\t\t\"body\" => Str::random(10),\n\t\t\t\t\t\"rating\" => rand(1, 5),\n\t\t\t\t],\n\t\t\t\tUser::find(rand(1, 10))\n\t\t\t);\n\t\t}\n\n $this->call([ReviewReplySeeder::class, ReviewLikeSeeder::class]);\n }", "title": "" }, { "docid": "dc0c7e250bf5314ea23e0ea59f3f133a", "score": "0.7711072", "text": "public function run()\n {\n Factory(User::class,10)->create();\n Factory(Albums::class,4)->create()->each(function ($album) {\n $album->audios()->save(factory(Audio::class)->make());\n });\n Factory(Events::class,10)->create();\n Factory(Category::class,6)->create();\n Factory(Products::class,40)->create();\n\n DB::table('users')->insert([\n 'name' => 'Abraham Kivondo',\n 'email' => '[email protected]',\n 'phone' => '0707585566',\n 'password' => '$2y$10$R98BYALxEPcH0TlGK3xckOmpLaFHoGKgHTg38wBIOv1NVGkWVNS6y' //12345678\n ]);\n\n }", "title": "" }, { "docid": "c0af7490e96cc60f0b79f5e406e73121", "score": "0.7710323", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //$this->call(UserRolesSeeder::class);\n DB::table('roles')->insert([\n 'nombre' => 'Administrador'\n ]);\n DB::table('roles')->insert([\n 'nombre' => 'Director de Escuela'\n ]);\n DB::table('roles')->insert([\n 'nombre' => 'Profesor'\n ]);\n DB::table('roles')->insert([\n 'nombre' => 'Tutor'\n ]);\n }", "title": "" }, { "docid": "971f80406e455b142db58bad5527fa2e", "score": "0.7709564", "text": "public function run()\n {\n Model::unguard();\n\n $seeds = [\n [\n 'content_type_id' => 2,\n 'created_by' => 1,\n 'category_id' => 1,\n 'language_id' => 1,\n 'mime_type' => 'text/html',\n 'title' => 'About',\n 'summary' => 'About our team',\n 'body' => '<p>Everything you ever wanted to know about us, but were afraid to ask.</p>',\n ],\n ];\n\n foreach ($seeds as $seed) {\n Content::create($seed);\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "1f09d8a77b5b6bb263ad745d038d7964", "score": "0.77075446", "text": "public function run()\n {\n \t/* $Model::unguard();\n \t\n \tDB::table('posts')->truncate();\n \t$faker = Faker::create();\n \t \t\n \tforeach (range(1,50) as $index) {\n \t\tDB::table('posts')->insert([\n \t\t\t\t'title' => $faker->sentence(3),\n \t\t\t\t'body' => $faker->paragraph(4)\n \t\t\t\t//'created_at'=> $faker->unixTime($max = 'now') ,\n \t\t]);\n \t} */\n \t\n \tfactory('App\\Post',50)->create();\n }", "title": "" }, { "docid": "eea2224b1a696a86a3771f6042ff6603", "score": "0.7706848", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(StaresineTableSeeder::class);\n $this->call(SmeroviTableSeeder::class);\n $this->call(UceniciTableSeeder::class);\n // $faker = Faker::create('sr_Latn_RS');\n \t// foreach (range(1,10) as $index) {\n // $gender = $faker->randomElement(['male', 'female']);\n // if ($gender == 'male') {\n // $pol = 1;\n // $jmbg_pol = 850;\n // $ime = $faker->firstNameMale();\n // } else {\n // $pol = 2;\n // $jmbg_pol = 750;\n // $ime = $faker->firstNameFemale();\n // }\n // $rodjendan = $faker->dateTimeBetween('2007-01-01', '2007-12-31');\n // $jmbg = \\Carbon\\Carbon::parse($rodjendan)->format('dmY');\n // $jmbg .= $jmbg_pol.$faker->numberBetween(100,999);\n\t // DB::table('ucenici')->insert([\n\t // 'ime_prezime' => $ime.' '.$faker->lastName(),\n\t // 'datum_rodjenja' => $faker->dateTimeBetween('2007-01-01', '2007-12-31'),\n // 'pol' => $pol,\n // 'jmbg' => $jmbg,\n // 'broj_bodova' => $faker->numberBetween(50,100),\n // 'odeljenje_id' => null\n\t // ]);\n\t // }\n }", "title": "" }, { "docid": "2035c36fe09b0a6f28a0b69bb54fb5cc", "score": "0.7700806", "text": "public function run()\n {\n // Seed roles\n $roles = ['administrator', 'publisher'];\n foreach($roles as $role) {\n Role::create(['name' => $role]);\n }\n\n // Seed admin\n Role::where('name', 'administrator')->first()\n ->users()->create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => '$2y$10$7FeLPtByNZQtSOyfZcLm7.RttEFyd3luWPzF1uXF9cwgxms.1l2EC',\n ]);\n\n // Seed devices\n $devices = ['Device 1', 'Device 2', 'Device 3'];\n foreach($devices as $device) {\n Device::create([\n 'name' => $device,\n 'password' => '$2y$10$7FeLPtByNZQtSOyfZcLm7.RttEFyd3luWPzF1uXF9cwgxms.1l2EC',\n ]);\n }\n\n // Seed publishers\n $publishers = ['Ahmad', 'Usama', 'Mohammad'];\n $publisher_role = Role::where('name', 'publisher')->first();\n foreach($publishers as $publisher) {\n $publisher_role->users()->create([\n 'name' => $publisher,\n 'email' => strtolower($publisher).'@system.com',\n 'password' => '$2y$10$7FeLPtByNZQtSOyfZcLm7.RttEFyd3luWPzF1uXF9cwgxms.1l2EC',\n ]);\n }\n }", "title": "" }, { "docid": "cb6f282d3642b226d1ff24dbcffeffe5", "score": "0.76973236", "text": "public function run()\n {\n User::factory(10)->create();\n Product::factory(10)->create();\n Category::factory(10)->create();\n Comment::factory(10)->create();\n DB::table('roles')->insert(\n [\n [\n 'name' => 'User',\n ],\n [\n 'name' => 'Admin',\n ],\n [\n 'name' => 'Super admin',\n ],\n ]\n );\n }", "title": "" }, { "docid": "6a8e11e9a3ca3b1475c1657aad881d5c", "score": "0.7697183", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n Author::factory()->count(10)->create();\n Book::factory()->count(10)->create();\n Library::factory()->count(10)->create();\n\n // populate book_library table\n $books = Book::all();\n Library::all()->each(function ($library) use ($books) {\n $library->books()->attach(\n $books->random(2)->pluck('id')->toArray()\n );\n });\n }", "title": "" }, { "docid": "cfbccd2dcfc81691ff9d209d605d6cc6", "score": "0.7696808", "text": "public function run()\n {\n $this->seed('lelframeworkMenuDataRowsTableSeeder');\n $this->seed('SettingsVoyagerTableSeeder');\n $this->seed('ChapitreDataTypesTableSeeder');\n $this->seed('ChapitrePermissionsTableSeeder');\n $this->seed('ChapitrePermissionRoleTableSeeder');\n }", "title": "" }, { "docid": "e0f964329c2a72b1870ad1ec590add4b", "score": "0.76955813", "text": "public function run()\n {\n User::factory(5)->create();\n Product::factory(20)->create();\n // Category::factory(3)->create();\n Category::create([\n 'name' => 'Web Programming',\n 'slug' => 'web-programming'\n ]);\n\n Category::create([\n 'name' => 'Web Design',\n 'slug' => 'web-design'\n ]);\n\n Category::create([\n 'name' => 'Personal',\n 'slug' => 'personal'\n ]);\n }", "title": "" }, { "docid": "7ffac702dfbc13e5962980bf191f840d", "score": "0.76919836", "text": "public function run()\n {\n $faker=Factory::create();\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('users')->truncate();\n DB::table('users')->insert(\n [\n [\n 'name'=>'Cim Bederri',\n 'slug'=>'cim-bederri',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('admin123'),\n 'bio'=>$faker->text(rand(250,300))\n ],[\n 'name'=>'Dengje Bederri',\n 'slug'=>'dengje-bederri',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('admin123'),\n 'bio'=>$faker->text(rand(250,300))\n ],[\n 'name'=>'Cim dengje',\n 'slug'=>'cim-dengje',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('admin123'),\n 'bio'=>$faker->text(rand(250,300))\n ]\n ]\n );\n }", "title": "" }, { "docid": "9b171ddfee6b2d7bde0c9cd36fe5c980", "score": "0.76910377", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n for($i = 0; $i < 50; $i++) {\n \\App\\Models\\Customers::create([\n 'name' => $faker->name(),\n 'cmnd' => $faker->regexify('[A-Za-z0-9]{10}'),\n 'address' => $faker->address(),\n 'birthday' => $faker->date(),\n 'household' => $faker->address(),\n 'phone' => $faker->phoneNumber()\n ]);\n }\n\n \\App\\Models\\Project::create(['name' => 'Riverside', 'description' => 'Dự án Riverside']);\n \\App\\Models\\Project::create(['name' => 'Novaland', 'description' => 'Dự án Novaland']);\n \\App\\Models\\Project::create(['name' => 'Diamond', 'description' => 'Dự án Diamond']);\n\n $this->call([\n PermissionSeeder::class ,\n RoleSeeder::class ,\n RoleHasPermissionSeeder::class ,\n UserSeeder::class ,\n ExperimentSeeder::class,\n ]);\n }", "title": "" }, { "docid": "403f3670b426f8eab8481b81acaae173", "score": "0.7690881", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n //Insert Roles:\n\n $rroot = Role::create([\n 'id'=>3,\n 'name'=>'root',\n 'display_name'=>'Root',\n 'description'=>'Dueño del sistema'\n ]);\n\n $radmin = Role::create([\n 'id'=>2,\n 'name'=>'admin',\n 'display_name'=>'Administrador',\n 'description'=>'Administrador del sistema'\n ]);\n\n \n\n $rcliente = Role::create([\n 'id'=>1,\n 'name'=>'cliente',\n 'display_name'=>'Cliente',\n 'description'=>'Cliente del sistema'\n ]);\n\n $admin = User::create([\n 'user' => 'admin',\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n ]);\n $admin->attachRole($rroot);\n \n\n\n $gold = Memberships::create([\n 'id'=>1,\n 'tipo'=>'GOLD',\n 'precio'=>100\n \n ]);\n $silver = Memberships::create([\n 'id'=>2,\n 'tipo'=>'SILVER',\n 'precio'=>70\n ]);\n $bronce = Memberships::create([\n 'id'=>3,\n 'tipo'=>'BRONCE',\n 'precio'=>50\n ]);\n\n //$this->call(MembershipTableSeeder::class);\n }", "title": "" }, { "docid": "acb7d491148c575144b4e8f6d8b2cbdc", "score": "0.76899445", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('tipousuario')->insert([\n 'descripcion'=>'admin',\n 'estado'=>'1',\n ]);\n DB::table('users')->insert([\n \t'nombre'=>'admin',\n \t'apellido'=>'admin',\n \t'cedula'=>'12345678',\n \t'usuario'=>'admin',\n \t'direccion'=>'admin',\n \t'telefono'=>'091233123',\n \t'email'=>'[email protected]',\n \t'password'=>bcrypt('12345678'),\n 'idtipoUsuario'=>'1',\n 'estado'=>'1',\n ]);\n\n DB::table('dineros')->insert([\n 'dinero_disponible' => 0 ,\n ]);\n }", "title": "" }, { "docid": "7d138fbb5d4f1ef56c6a508fe8e8c241", "score": "0.76879454", "text": "public function run()\n {\n User::create([\n 'name' => 'Test User',\n 'email' => '[email protected]',\n 'password' => bcrypt('thinherd'),\n ]);\n\n $faker = \\Faker\\Factory::create();\n for ($i = 0; $i < Config::get('seeds.users'); $i++) {\n User::create([\n 'name' => \"{$faker->firstName} {$faker->lastName}\",\n 'email' => $faker->email,\n 'password' => bcrypt('thinherd')\n ]);\n }\n }", "title": "" }, { "docid": "d0025cde4d47d4ec25529491a601fd54", "score": "0.76868474", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // \n factory(App\\Account::class, 5)->create();\n factory(App\\Construction::class, 5)->create();\n factory(App\\GeneralExpenditure::class, 30)->create();\n factory(App\\ExpenditureType::class, 100)->create();\n factory(App\\Expenditure::class, 3000)->create();\n factory(App\\Income::class, 100)->create();\n }", "title": "" }, { "docid": "a5e19d0c2645e773a1163c03199bb052", "score": "0.7682829", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n $actors = array (\n array (\n 'id' => '1',\n 'nom' => 'François Truffaut'\n ),\n array (\n 'id' => '2',\n 'nom' => 'Alfred Hitchcock'\n ),\n array (\n 'id' => '3',\n 'nom' => 'Federico Fellini'\n ),\n array (\n 'id' => '4',\n 'nom' => 'Alain Resnais'\n ),\n );\n $faker = \\Faker\\Factory::create();\n for($i=0; $i<=50; $i++):\n DB::table('films')\n ->insert([\n 'nom' => $faker->userName,\n 'annee' => $faker->numberBetween(1980,2021),\n 'acteurs' => serialize($actors)\n ]);\n endfor;\n }", "title": "" }, { "docid": "7d7db54c2b09e7ac8a6bc7ee04a8d0c8", "score": "0.768187", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(EstadoSeeder::class);\n $this->call(DocumentoSeeder::class);\n $this->call(EtapaSeeder::class);\n $this->call(PolizaSeeder::class);\n $this->call(CanalSeeder::class);\n $this->call(ContactoSeeder::class);\n $this->call(AccionSeeder::class);\n //$this->call(TipoEmpresaSeeder::class);\n //NOTA: SE DEBEN VOLVER A CREAR LAS TABLAS TIPO_SERVICIOS Y TIPO_EMPRESAS YA QUE LOS NOMBRES FUERON MODIFICADOS Y NO SON RECONOCIDOS\n }", "title": "" }, { "docid": "bf00554b81e51b6d86d031e3948b56a0", "score": "0.76803976", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n \\App\\Models\\User::factory(20)->create();\n Product::factory(30)->create();\n Order::factory(30)->create()->each(function (Order $order) {\n OrderItem::factory(random_int(1,5))->create([\n 'order_id' => $order->id,\n ]);\n });\n\n Permission::insert([\n ['name' => 'view_users'],\n ['name' => 'edit_users'],\n ['name' => 'view_roles'],\n ['name' => 'edit_roles'],\n ['name' => 'view_products'],\n ['name' => 'edit_products'],\n ['name' => 'view_orders'],\n ['name' => 'edit_orders'],\n ]);\n }", "title": "" }, { "docid": "20ae14124baa4279206056c183739f5b", "score": "0.7680361", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => \"Admin\",\n 'phone' => \"666\",\n 'email' => \"admin\",\n 'password' => bcrypt(\"admin\"),\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('users')->insert([\n 'name' => \"Son Dao\",\n 'phone' => \"01633460820\",\n 'email' => \"[email protected]\",\n 'password' => bcrypt(\"test\"),\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n $faker = Faker::create();\n $faker->seed(time());\n foreach (range(1, 100) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'phone' => $faker->phoneNumber,\n 'email' => $faker->email,\n 'password' => bcrypt(1111),\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n }\n }", "title": "" }, { "docid": "5f5fcd257d97fb7b1cc40477c360c943", "score": "0.76800436", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // esto sirve para insertar datos en la base DB los seeds\n\n DB::table('categories')->insert([\n 'name' => 'Frituras',\n 'description' => 'Cualquier cosa'\n ]);\n\n DB::table('categories')->insert([\n 'name' => 'Dulces',\n 'description' => 'Cualquier cosa'\n ]);\n\n DB::table('categories')->insert([\n 'name' => 'Salado',\n 'description' => 'Cualquier cosa'\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Chettos bolita',\n 'price' => 10,\n 'description' => 'Algo',\n 'category_id' => 1\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Doritos',\n 'price' => 10,\n 'description' => 'Algo',\n 'category_id' => 1\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Paleta',\n 'price' => 10,\n 'description' => 'Algo',\n 'category_id' => 2\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Chocolate',\n 'price' => 10,\n 'description' => 'Algo',\n 'category_id' => 2\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Cacahuates',\n 'price' => 10,\n 'description' => 'Algo',\n 'category_id' => 3\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Habas',\n 'price' => 10,\n 'description' => 'Algo',\n 'category_id' => 3\n ]);\n\n }", "title": "" }, { "docid": "07dc877427a22cbb7e30262753978501", "score": "0.76798505", "text": "public function run()\n {\n \t $faker = Faker::create();\n\n\n \t //Seeder de Proveedores\n \t DB::table('proveedores')->delete();\n \t foreach (range(1, 20) as $index) \n {\n \t \t$proveedor = new Proveedore;\n \t \t$proveedor->nombre = $faker->firstName;\n \t \t$proveedor->telefono = $faker->randomNumber;\n \t \t$proveedor->direccion = $faker->city;\n $proveedor->save();\n \t }\n \t}", "title": "" }, { "docid": "7aa3cf8a74ef9865d5a0edd7b5e88bd0", "score": "0.7678149", "text": "public function run()\n {\n $faker = Faker::create();\n DB::table('users')->insert([\n 'name' => 'John',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456789'),\n 'confirmed' => 1,\n 'created_at' => $faker->dateTime,\n 'updated_at' => $faker->dateTime,\n ]);\n\n DB::table('datos__usuarios')->insert([\n 'nombre' => 'John',\n 'apellidos' => 'Doe',\n 'fecha_nacimiento' => $faker->dateTime,\n 'celular' => $faker->tollFreePhoneNumber,\n 'id_pais' => rand(1,214),\n 'id_ciudad' => rand(1,1000),\n 'correo' => '[email protected]',\n 'id_usuario' => 1,\n 'id_rol' => 1,\n 'created_at' => $faker->dateTime,\n 'updated_at' => $faker->dateTime,\n ]);\n\n }", "title": "" }, { "docid": "23b0133e7d1e2e6667c2d12ccd090041", "score": "0.76758325", "text": "public function run()\n {\n DB::table('users')->delete();\n DB::table('categories')->delete();\n DB::table('products')->delete();\n\n $this->call(PlansSeeder::class);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n ]);\n\n factory(Category::class, 2)->create()->each(function ($category) {\n factory(Product::class, 10)->create(['category_id' => $category->id]);\n });\n }", "title": "" }, { "docid": "1e12f6904559c36d53a178e7b032c4ef", "score": "0.76697963", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,1) as $index) {\n DB::table('posts')->insert([\n 'title' =>$faker->sentence(3),\n 'body' =>$faker->sentence(500)\n ]);\n }\n }", "title": "" }, { "docid": "145e033afe331c698b8d3fddc7c182e4", "score": "0.7669658", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Administrator',\n 'email' => '[email protected]',\n 'password' => bcrypt('_Arowosegbe1'),\n ]);\n\n $faker = Faker::create('App\\Courses');\n\n for ($i = 0; $i <= 100; $i++) {\n DB::table('rooms')->insert([\n 'room_id' => '0' . $i,\n 'floor' => $i + 1,\n ]);\n }\n\n\n $customers = Faker::create('App\\Customers');\n\n for ($i = 0; $i <= 200; $i++) {\n DB::table('customers')->insert([\n 'customer_id' => $customers->randomNumber(9),\n 'fullname' => $customers->name,\n 'email' => $customers->email,\n 'number' => $customers->phoneNumber,\n 'address' => $customers->address\n ]);\n }\n\n\n }", "title": "" }, { "docid": "a73b97f270795a3decf85ff1003b9090", "score": "0.7669066", "text": "public function run()\n {\n $this->call(FilmsTableSeeder::class);\n\n $this->call(RoomTableSeeder::class);\n\n factory(App\\Seance::class, 10)->create()->each(function (App\\Seance $s) {\n $s->tickets()->saveMany(factory (App\\Ticket::class, 10)->create());\n\n });\n\n }", "title": "" }, { "docid": "17df07d161b199f3bfd69574ab023d6b", "score": "0.76662344", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('shoes')->insert([\n 'created_at' => $faker->dateTimeBetween($startDate = '-30 days', $endDate = 'now', $timezone = null),\n 'name' => $faker->word,\n 'details' => $faker->text($maxNbChars = 200),\n 'sex' => 'F',\n 'id_category' => $faker->numberBetween($min = 73, $max = 82),\n 'id_style' => $faker->numberBetween($min = 64, $max = 74),\n 'id_brand' => $faker->numberBetween($min =68, $max = 79),\n 'id_promo' => $faker->numberBetween($min = 1, $max = 80),\n 'id_news' => $faker->numberBetween($min = 10, $max = 100),\n ]);\n }\n }", "title": "" }, { "docid": "78a18644be7bcafdeb323157eab11b93", "score": "0.76646423", "text": "public function run()\r\n {\r\n // $this->call(UsersTableSeeder::class); \r\n\r\n\r\n //$usuarios = factory(App\\User::class)->times(150)->create(); \r\n //EJECUTAR PRIMERO ESTA\r\n\r\n\r\n //$posteos = factory(App\\Posteo::class)->times(500)->create(); \r\n //LUEGO VERIFICAR EN LA DB EL ID MAX Y MIN DE LA TABLA USUARIOS Y MODIFICAR EL POST_FACTORY USER_ID\r\n\r\n $seguidos = App\\User::All();\r\n\r\n App\\User::All()->each(function ($user) use ($seguidos){\r\n $user->seguidos()->saveMany($seguidos->random(50));\r\n });\r\n }", "title": "" }, { "docid": "8480f4e7964590727ca802a9e2da19f6", "score": "0.7663058", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n # create 3 specific users\n $users = [\n [\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'is_admin' => true,\n 'password' => Hash::make('secret'),\n 'remember_token' => Str::random(10),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(), \n ],\n [\n 'name' => 'Hans',\n 'email' => '[email protected]',\n 'is_admin' => true,\n 'password' => Hash::make('secret'),\n 'remember_token' => Str::random(10),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'name' => 'Manfred',\n 'email' => '[email protected]',\n 'is_admin' => true,\n 'password' => Hash::make('secret'),\n 'remember_token' => Str::random(10),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n ]; \n DB::table('users')->insert($users);\n \n # creating fake entries\n factory(User::class, 10)->create();\n factory(Data::class, 100)->create();\n }", "title": "" }, { "docid": "1e37d96ca188a3a2053d7c0215acb3ed", "score": "0.7662772", "text": "public function run()\n {\n\n //seeder de paises\n DB::table('paises')->insert([\n [\n 'id'=>1,\n 'pais' => 'Colombia',\n \n ],\n [\n 'id'=>2,\n 'pais' => 'México',\n \n ],\n [\n 'id'=>3,\n 'pais' => 'Brazil',\n \n ],\n [\n 'id'=>4,\n 'pais' => 'Argentina',\n \n ],\n ]);\n }", "title": "" }, { "docid": "6d906d1cede1a83855f4d257c35331d8", "score": "0.7660167", "text": "public function run()\n {\n Projects::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Projects::create([\n 'projectTitle' => $faker->sentence,\n 'description' => $faker->paragraph,\n 'level' => $faker->word,\n 'status'=> $faker->word,\n 'developersIds'=> '1,2',\n 'ngo_id' => $i,\n 'dueDate'=> $faker->date,\n ]);\n }\n }", "title": "" }, { "docid": "4bae8363c376ac6bd31966b852a18755", "score": "0.76591355", "text": "public function run()\n\t{\n\t\t DB::table('products')->delete();\n\n\t\t$items = array(\n\n//['cat_id'=>'1', 'artist_id'=>'2', 'genre_id'=>'1', 'img'=>'sample.jpg', 'name'=>'Album Name', 'description'=>'Description', 'catalog'=>'DL001', 'barcode'=>'0001'],\n\t\t);\n\n\t\t// Uncomment the below to run the seeder\n\t\t DB::table('products')->insert($items);\n\t}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "2151e719a109ae042e0bc56fbdaf0b31", "score": "0.0", "text": "public function index(Request $request)\n {\n $task = DB::table('tasks')->where('id','=',$request->task_id)->get(['id','description','expiration'])->first();\n $logs = DB::table('logs')->where('task_id','=',$request->task_id)->get();\n return view('logs',compact('logs', 'task'));\n }", "title": "" } ]
[ { "docid": "a5f21f14f06e50e6c899fc50c1823371", "score": "0.748859", "text": "public function index()\n {\n return $this->listing();\n }", "title": "" }, { "docid": "496d5d54d7c7a7947e57216e38436eaa", "score": "0.7468274", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "5aa4c5557a26f8808de23dbd0200fb1e", "score": "0.7446935", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "eca6104bc4f03f55970223ec5e260d62", "score": "0.7403906", "text": "public function index()\n {\n $per_page = !request()->filled('per_page') ? 10 : (int) request('per_page');\n $direction = request()->query('direction');\n $sortBy = request()->query('sortBy');\n\n $query = LaporanHarian::query();\n\n $lists = $query->orderBy($sortBy, $direction)->paginate($per_page);\n\n return new ListResources($lists);\n }", "title": "" }, { "docid": "3ec6f8ee193fb6eb0e96d6d5c89ac849", "score": "0.7346841", "text": "public function index()\n {\n $resources = $this->_resourceRepo->fetchResources();\n return view('travellers-inn.admin.resource.index', compact('resources'));\n }", "title": "" }, { "docid": "7573e843d1b7cfeddf14f70707821b32", "score": "0.7310731", "text": "public function actionList()\n\t{\n\t\t$this->renderPartial('list', array(), false, true);\n\t}", "title": "" }, { "docid": "cd35602f7c25a9b8e631ce80beb8ea4d", "score": "0.7295102", "text": "public function index()\n {\n $query = $this->resourceModel::query();\n\n $this->beforeIndex($query);\n\n $query->fieldsForMasterList();\n\n $this->viewData['resourceList'] = $this->afterIndex($query->get());\n\n return view(\n \"{$this->viewBaseDir}.{$this->viewFiles['index']}\",\n $this->viewData\n );\n }", "title": "" }, { "docid": "93cf9bf71a1973929a2edbc182c4df80", "score": "0.72826904", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if (! $this->data['crud']->ajaxTable()) {\n $this->data['entries'] = $this->data['crud']->getEntries();\n }\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n // $this->crud->getListView() returns 'list' by default, or 'list_ajax' if ajax was enabled\n return view('vendor.backpack.crud.list', $this->data);\n }", "title": "" }, { "docid": "813d60bea2fa858e658620b3d43f028b", "score": "0.72776103", "text": "public function index()\n {\n $fields = $this->parseFields();\n $filter = $this->parseFilters();\n $sort = $this->parseOrders();\n $paging = $this->parsePaging();\n $data = $this->listResources($fields, $filter, $sort, $paging);\n return self::getResponse()->setHeader(DefaultController::$defaultApiHeaders)->setResType('json')->setData($data)->send();\n }", "title": "" }, { "docid": "df01f7ff8d6a105850fbefd31e546f03", "score": "0.7190641", "text": "function list() {\n\n\t\t\tif($this->listJWT) $this->requireJWT();\n\n\t\t\t//Items to show, we can define the number of items via the show query param\n\t\t\t$show = $this->request->get('show', 100);\n\t\t\t$show = $show ?: 100;\n\n\t\t\t//Pages to show, we can define the page number via the page query param\n\t\t\t$page = $this->request->get('page', 1);\n\t\t\t$page = $page ?: 1;\n\n\t\t\t//Sorting defined via the sort query param\n\t\t\t$sort = $this->request->get('sort', 'asc');\n\t\t\t$sort = $sort ?: 'asc';\n\n\t\t\t//Sort by parameter defined via the by query param\n\t\t\t$by = $this->request->get('by', 'id');\n\t\t\t$by = $by ?: 'id';\n\n\t\t\t$args = [ 'show' => $show, 'page' => $page, 'sort' => $sort, 'by' => $by, 'args' => [] ];\n\n\t\t\t//Defines if we want to fetch metas or not\n\t\t\t$fetch_metas = $this->request->get('fetch_metas');\n\t\t\tif($fetch_metas) {\n\n\t\t\t\tif($fetch_metas != 1) $fetch_metas = explode(',', $fetch_metas);\n\t\t\t\t$args['args']['fetch_metas'] = $fetch_metas;\n\t\t\t}\n\n\t\t\t//Automagically add conditions based on get params\n\t\t\tforeach($_GET as $key => $value) {\n\n\t\t\t\tif(in_array($key, $this->plural::getTableFields())) {\n\t\t\t\t\t$args['conditions'][] = \"`{$key}` = '{$value}'\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Query Fields\n\t\t\t$query_fields = $this->request->get('query_fields');\n\t\t\tif($query_fields && is_string($query_fields)) $query_fields = explode(',', $query_fields);\n\t\t\tif($query_fields) $args['query_fields'] = $query_fields;\n\n\t\t\t//Fetch\n\t\t\tforeach($_GET as $key => $value) {\n\t\t\t\tif(preg_match('/fetch_(?<entity>.*)/', $key)) {\n\t\t\t\t\t$args['args'][$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Passing args via URL\n\t\t\tif($url_args = $this->request->get('args')) {\n\n\t\t\t\t$args = array_merge($args, $url_args);\n\t\t\t}\n\n\t\t\t// Specifically passing PDO Args\n\t\t\tif($pdo = $this->request->get('pdo')) {\n\n\t\t\t\t$args['args'] = array_merge($args['args'], $pdo);\n\t\t\t}\n\n\t\t\t//$args['debug'] = 1;\n\n\t\t\t// Conditions Filter\n\t\t\t$args['conditions'] = $this->filterListConditions(get_item($args, 'conditions', []));\n\n\t\t\tif(is_array($args['conditions'])) {\n\t\t\t\t$args['conditions'] = array_filter($args['conditions']);\n\t\t\t}\n\n\t\t\t$items = $this->plural::all($args);\n\t\t\t$this->data = $items;\n\n\t\t\t$count = $this->plural::count($args['conditions'] ?? []);\n\t\t\t$pages = ceil($count / $show);\n\n\t\t\t$this->properties['current_page'] = (int) $page;\n\t\t\t$this->properties['per_page'] = (int) $show;\n\t\t\t$this->properties['last_page'] = (int) $pages;\n\t\t\t$this->properties['count'] = (int) $count;\n\t\t\t$this->properties['sort'] = $sort;\n\t\t\t$this->properties['by'] = $by;\n\t\t\t$this->properties['total'] = (int) $pages;\n\n\t\t\tif(count($items)) {\n\n\t\t\t\t$this->result = 'success';\n\t\t\t}\n\n\t\t\t$this->respond();\n\t\t}", "title": "" }, { "docid": "6dbec524e0edfa12a7b39fd3954be29e", "score": "0.7157161", "text": "public function index()\n {\n $resources = Resource::paginate(15);\n \n return view('resource.index', compact('resources'));\n }", "title": "" }, { "docid": "3a75e00cbfe822ce4067afcff2f6a3d8", "score": "0.71310157", "text": "public function index()\n {\n return $this->listResponse($this->model->all());\n }", "title": "" }, { "docid": "f7a87ae6c993ad3c3f6ec9da2248552a", "score": "0.71200645", "text": "public function listAction()\n {\n if (Config::get('error')) {\n return false;\n }\n $this->_template = 'ItemsList';\n Route::factory()->setAction('list');\n // Filter parameters to array if need\n Filter::setFilterParameters();\n // Set filter elements sortable\n Filter::setSortElements();\n // Check for existance\n $group = Model::getRow(Route::param('alias'), 'alias', 1);\n if (!$group) {\n return Config::error();\n }\n // Seo\n $this->setSeoForGroup($group);\n // Add plus one to views\n Model::addView($group);\n // Get items list\n $result = Filter::getFilteredItemsList($this->limit, $this->offset, $this->sort, $this->type);\n // Generate pagination\n $pager = Pager::factory($this->page, $result['total'], $this->limit)->create();\n // Render page\n $this->_content = View::tpl(['result' => $result['items'], 'pager' => $pager], 'Catalog/ItemsList');\n }", "title": "" }, { "docid": "bf1bc30233a225c042addf1175ede637", "score": "0.71117574", "text": "public function list()\n\t\t{\n\n\t\t}", "title": "" }, { "docid": "4b74341b17d61539d4d1fc0aa8693955", "score": "0.70722556", "text": "public function index()\n {\n $resources = Resource::orderBy('description')->get();\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "7e6f0d9f30924279b300346ae37d90a7", "score": "0.7063389", "text": "public function index()\n {\n $resources = Table_resources::all();\n return view(\"admin.resource.list\",['resources'=>$resources]);\n }", "title": "" }, { "docid": "05a3a1abee5cdb637e4ecb2bed78f793", "score": "0.7044714", "text": "public function index() {\n ${$this->resources} = $this->model->orderBy('created_at', 'DESC')\n ->paginate(Variables::get('items_per_page'));\n\n return view($this->view_path . '.index', compact($this->resources));\n }", "title": "" }, { "docid": "d755a2c0bd42a2f83eb1df7236545733", "score": "0.7039909", "text": "public function index()\n {\n $request = app(Request::class);\n $listbuilder = app(ListBuilder::class);\n $args = $request->route()->parameters();\n\n $slug = (empty($this->slug)) ? substr($request->getPathInfo(), 1) : $this->slug;\n $list_slug = (empty($this->list_slug)) ? $slug : $this->list_slug;\n\n $collection = $this->getListQuery($request, $args);\n $total = $collection->total();\n $list_data = $this->getListData($request, $args);\n $list_class = $this->getListClass();\n\n $list = $listbuilder->build($list_class, $collection, [\n 'show_action' => false,\n 'slug' => $list_slug,\n 'data' => $list_data,\n ]);\n $filter = $this->list_filter;\n $show_add = $this->show_add;\n\n $heading = $this->getIndexBreadcrumb($request, $args, $total);\n $object_name = $this->object_name;\n\n if($request->ajax()) {\n return view($this->list_view, compact('list', 'heading', 'filter', 'show_add', 'args', 'object_name', 'total', 'request', 'list_data'));\n } else {\n $layout = $this->layout;\n $section = $this->section;\n $view = $this->list_view;\n return view('cms-package::default-resources.layout-extender', compact('list', 'heading', 'filter', 'show_add', 'args', 'object_name', 'layout', 'section', 'view', 'total', 'request', 'list_data'));\n }\n }", "title": "" }, { "docid": "fb3f72e030e93427b7b0611e0dd87596", "score": "0.70328826", "text": "public function actionRestList()\n {\n $this->doRestList();\n }", "title": "" }, { "docid": "0efbc638dffdcac13f3ee9915260ba01", "score": "0.70086366", "text": "public function actionIndex() {\n $items = $this->getItems();\n self::ret($items);\n }", "title": "" }, { "docid": "349599c7292a71cd03fc4c4ffdd1f19b", "score": "0.7004859", "text": "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_personModel->getPersons();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "title": "" }, { "docid": "5caa574ebf95b5ac2455613f57b23c8e", "score": "0.7001385", "text": "public function listAction(){\n\t\t$view = Zend_Registry::get('view');\n\t\t$table = new Aluno();\n\t\t$table->getCollection();\n\t\t$this->_response->setBody($view->render('default.phtml'));\n\t}", "title": "" }, { "docid": "ca1a292f025cf9b2b20d1b3eacf7ae21", "score": "0.6937133", "text": "public function index()\n {\n $this->pageTitle = 'Resources';\n $this->pageIcon = 'ti-folder';\n $this->icons = $this->icons();\n $this->resources = Resource::paginate(15);\n $this->trashCount = Resource::onlyTrashed()->count();\n\n return view('resource::member.index', $this->data);\n }", "title": "" }, { "docid": "b68550d3783cf092706159aad39af9a4", "score": "0.69189066", "text": "public function indexAction()\n {\n $request = $this->getRequest();\n $recordType = $request->getParam('api_record_type');\n $resource = $request->getParam('api_resource');\n $page = $request->getQuery('page', 1);\n\n $this->_validateRecordType($recordType);\n\n // Determine the results per page.\n $perPageMax = (int) get_option('api_per_page');\n $perPageUser = (int) $request->getQuery('per_page');\n $perPage = ($perPageUser < $perPageMax && $perPageUser > 0) ? $perPageUser : $perPageMax;\n\n // Get the records and the result count.\n $recordsTable = $this->_helper->db->getTable($recordType);\n $totalResults = $recordsTable->count($_GET);\n $records = $recordsTable->findBy($_GET, $perPage, $page);\n\n // Set the non-standard Omeka-Total-Results header.\n $this->getResponse()->setHeader('Omeka-Total-Results', $totalResults);\n\n // Set the Link header for pagination.\n $this->_setLinkHeader($perPage, $page, $totalResults, $resource);\n\n // Build the data array.\n $data = array();\n $recordAdapter = $this->_getRecordAdapter($recordType);\n foreach ($records as $record) {\n $data[] = $this->_getRepresentation($recordAdapter, $record, $resource);\n }\n\n $this->_helper->jsonApi($data);\n }", "title": "" }, { "docid": "1c09e7c92f1c21d273b8b885cd8bfa5f", "score": "0.6918077", "text": "public function listing()\n\t{\n\t\t/* Get request variables */\n\t\t$category = Request::getString('category', null);\n\t\t$sort = Request::getString('sort', BluApplication::getSetting('listingSort', 'date'));\n\t\t$page = Request::getInt('page', 1);\n\n\t\t/* Get parameters. */\n\t\t$total = true;\n\t\t$limit = BluApplication::getSetting('listingLength', 9);\n\t\tswitch($sort){\n\t\t\tcase 'owner':\n\t\t\t\t$function = 'Owned';\n\t\t\t\tbreak;\n\n\t\t\tcase 'title':\n\t\t\t\t$function = 'Alphabetical';\n\t\t\t\tbreak;\n\n\t\t\tcase 'comments':\n\t\t\t\t$function = 'MostCommented';\n\t\t\t\tbreak;\n\n\t\t\tcase 'votes':\n\t\t\t\t$function = 'MostVoted';\n\t\t\t\tbreak;\n\n\t\t\tcase 'views':\n\t\t\t\t$function = 'MostViewed';\n\t\t\t\tbreak;\n\n\t\t\tcase 'date':\n\t\t\tdefault:\n\t\t\t\t$sort = 'date';\n\t\t\t\t$function = 'Latest';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t/* Get data. */\n\t\t$itemsModel = $this->getModel('items')->set('category', $category);\n\t\t$items = $itemsModel->{'get'.$function}($this->_itemtype, ($page - 1) * $limit, $limit, $total);\n\n\t\t/* Prepare pagination */\n\t\t$pagination = Pagination::simple(array(\n\t\t\t'limit' => $limit,\n\t\t\t'total' => $total,\n\t\t\t'current' => $page,\n\t\t\t'url' => '?sort=' . urlencode($sort) . '&amp;category=' . urlencode($category) . '&amp;page='\n\t\t));\n\n\t\t/* Load template */\n\t\tinclude($this->listing_template());\n\t}", "title": "" }, { "docid": "a39f80fe6fb15777c044c4596b95aefd", "score": "0.68882495", "text": "public function index()\n {\n\t\t\t\t$Items = Resource::whereStatus(\"ACTIVE\")->get()->toArray();\n\t\t\t\t$Actions = Action::all()->toArray();\n return view('resource.index',compact(\"Items\",\"Actions\"));\n }", "title": "" }, { "docid": "4342e58d9a88e2330015685845c6b214", "score": "0.68863964", "text": "public function index()\n {\n //get all resource categories, order by name\n $categories = ResourceCategoryFacade::with('resources')->orderBy('name');\n\n PageFacade::mimic([\n 'title' => 'Resources'\n ]);\n\n return view('pilot::frontend.resources.index', compact('categories'));\n }", "title": "" }, { "docid": "e62c3e28d314d6ca7e07a98c0154e01f", "score": "0.68825537", "text": "public function index()\n {\n // get articles\n $articles= Api::paginate(10);\n\n //return collection of articles of a resource\n return ApiResource::collection($articles);\n }", "title": "" }, { "docid": "f1d6678e9ee6cd0e2aba29cc6d3a57e6", "score": "0.68781596", "text": "public function listingAction()\r\n {\r\n $oZendDbSelect = new Zend_Db_Select(Zend_Db_Table::getDefaultAdapter());\r\n $oSelect = $oZendDbSelect->from('View_Rrubrique_Listing')->order('r_rub_id asc');\r\n\r\n // Search engine on the query\r\n $oMySearchEngine = new My_Search_Engine($oSelect);\r\n $oMySearchEngine->findWordOn(array('r_rub_libelle' => array('operator' => 'like')));\r\n $oMySearchEngine->findByFields(array(\r\n 'r_rub_id' => array('operator' => 'eql'),\r\n 'actif' => array('operator' => 'eql'),\r\n 'r_rub_libelle' => array('operator' => 'like'),\r\n 'r_tva_type_id' => array('operator' => 'eql'),\r\n 'r_rub_type_id' => array('operator' => 'eql')\r\n ));\r\n $oMySearchEngine->makeOrderBy();\r\n\r\n // Downloading the filtered list in CSV\r\n if ($this->_helper->ContextSwitch()->getCurrentContext() == 'csv') {//context csv\r\n $oAdapterExport = new My_Data_Export_Source_Adapter_Select($oMySearchEngine->getSelect());\r\n $oExport = new My_Data_Export_CSV($oAdapterExport);\r\n $this->view->csv = $oExport->make();\r\n $this->view->filename = Phoenix_Data_Export_Csv::buildFileName();\r\n } // Viewing the filtered list in HTML\r\n else {\r\n // Declaration of the Paginator Adapter\r\n $oAdapter = new Zend_Paginator_Adapter_DbSelect($oMySearchEngine->getSelect());\r\n // Pagination management\r\n $oPaginator = new My_Paginator($oAdapter);\r\n $oPaginator->setCurrentPageNumber($this->_getParam('page'));\r\n $oPaginator->setItemCountPerPage(15);\r\n $this->view->paginator = $oPaginator;\r\n }\r\n }", "title": "" }, { "docid": "c04f0a07b4332dc7490328fd75b7859d", "score": "0.6874425", "text": "public function index()\n {\n // Set Pagination options\n $options = array(\n 'total_items' => {module}::count(),\n 'items_per_page' => 10,\n );\n\n $pagination = Pagination::create($options);\n\n // Get from Model\n $lists = {module}::orderBy('created_at', 'desc')\n ->take(Pagination::limit())\n ->skip(Pagination::offset())\n ->get();\n\n $this->template->title('{module} Index')\n ->set('lists', $lists)\n ->set('pagination', $pagination)\n ->view('index');\n }", "title": "" }, { "docid": "934002dc44d9e88dec4d87456bacf202", "score": "0.68599224", "text": "public function index()\n {\n //Get Cars\n $cars = Car::paginate(15);\n\n // Return Collection of cars\n return CarResource::collection($cars);\n }", "title": "" }, { "docid": "9ba180ed65da59bf2b9a95f1c09cb0ef", "score": "0.68457514", "text": "public function listAction() {\n\t\t$flexSliders = $this->flexSliderRepository->findAll();\n\n\t\t$tplObj = array(\n\t\t\t'configuration' => EmConfiguration::getConfiguration(),\n\t\t\t'data' => $this->contentObject->data,\n\t\t\t'altUid' => uniqid('alt'),\n\t\t\t'flexSliders' => $flexSliders\n\t\t);\n\t\t$this->view->assignMultiple($tplObj);\n\t}", "title": "" }, { "docid": "4b10c5eaaff873799c32bd4500119f37", "score": "0.68380994", "text": "public function index()\n {\n $inventories = Inventory::paginate();\n\n return InventoryResource::collection($inventories);\n }", "title": "" }, { "docid": "3a4c68e643acd61065e40f913519f57a", "score": "0.68314296", "text": "public function index()\n {\n $request = $this->app->request();\n $filter = Filter::fromRequest($request);\n\n $result = $this->profiles->getAll($filter);\n\n $paging = array(\n 'total_pages' => $result['totalPages'],\n 'page' => $result['page'],\n 'sort' => 'asc',\n 'direction' => $result['direction']\n );\n\n $this->_template = 'waterfall/list.twig';\n $this->set(array(\n 'runs' => $result['results'],\n 'search' => $filter->toArray(),\n 'paging' => $paging,\n 'base_url' => 'waterfall.list',\n 'show_handler_select' => true,\n ));\n }", "title": "" }, { "docid": "874f996d6d98ea380f469ff6759de504", "score": "0.6829909", "text": "public function actionList(){\r\n\t\t$contacts = Contacts::find();\t\t\r\n\t\t\r\n\t\trender('list',array(\r\n\t\t\t'title'\t\t\t=> 'Showing all Contacts on database',\r\n\t\t\t'contacts'\t=> $contacts\t\t\r\n\t\t));\t\t\r\n\t}", "title": "" }, { "docid": "e0e7982de8f7a8c918aef7f3a34c9a7d", "score": "0.6822929", "text": "public function index()\n {\n return TierlistResource::collection(Tierlist::newly()->paginate());\n }", "title": "" }, { "docid": "e662e21bf83b7498445e86cb8e8d5a50", "score": "0.68194026", "text": "public function index()\n {\n // To make sure that we only show records of current user\n $query = $this->getModel();\n\n // Allow to filter results in query string\n $query = $this->applyQueryStringFilter($query);\n\n // If this controller is sortable\n if ($this->getOlutOptions('sortable') === true) {\n $query = $query->orderBy('order');\n }\n\n // Eager loading\n if ($prefetch = $this->getOlutOptions('prefetch')) {\n $query = $query->with($prefetch);\n }\n\n $query = $this->oulutCustomIndexQuery($query);\n\n // Pagination please\n $perPage = (int) Input::get('perPage', Config::get('view.perPage'));\n $perPage = $perPage < 0 ? 0 : $perPage;\n $items = $query->paginate($perPage);\n\n return $this->renderList($items);\n }", "title": "" }, { "docid": "26f44273688d9b90c69abab35c8e4854", "score": "0.6802107", "text": "public function index()\n {\n // $this->authorize('isAdmin');\n return ItemResource::collection(Item::latest()->get());\n }", "title": "" }, { "docid": "24c960a369d6f3101a5432770f2cc5c4", "score": "0.6795378", "text": "public function listAction(){\n $this->view->role = Auth_Info::getUser()->user_type;\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';Start action');\n \n if($this->getRequest()->isGet()&&!isset($this->_input->page)){\n $this->session->removeData(self::SESSION_KEY_SEARCH);\n }\n $this->session->removeData(self::SESSION_KEY_PAGE);\n $this->session->removeData(self::SESSION_KEY_RETURN_DETAIL);\n $page = null;\n if ($this->getRequest()->isPost()) {\n $where = $this->_input->getEscaped();\n\n } else {\n $where = $this->session->getData(self::SESSION_KEY_SEARCH);\n if (is_null($where)) {\n $where = array();\n }\n $page = isset($this->_input->page) ? $this->_input->page : $this->session->getData(self::SESSION_KEY_PAGE);\n }\n $this->getRequest()->setParams($where);\n $this->session->setModuleScope(self::SESSION_KEY_SEARCH, $where);\n $this->session->setModuleScope(self::SESSION_KEY_PAGE, $page);\n\n $select = MFaqs::getInstance()->getListSelectEU($where);\n $this->view->max_display_char = Zynas_Registry::getConfig()->constants->max_display_char;\n $this->view->paginator = Zynas_Paginator::factoryWithOptions($select, $page, $this->view);\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';End action');\n }", "title": "" }, { "docid": "2bf2ec527100629f6d7d50c50d603001", "score": "0.6783082", "text": "function list() {\n /* fetches all entries in table student for listing.\n * ---------------------------------------------- */\n Debug::echo(\"GET /api/student/list\");\n \n $listAll = new ListAll();\n $listAll->main(); \n }", "title": "" }, { "docid": "ae6ac1129584c76c474a8718bca91c33", "score": "0.6780087", "text": "public function ListView() {\n $this->Render();\n }", "title": "" }, { "docid": "40e0ec86808c42433eec790a68931477", "score": "0.6770408", "text": "public function indexAction() {\n\t\t$this->view->assign('resources', $this->modelReflectionService->getResources());\n\t\t$this->view->assign('routes', $this->getRoutes());\n\t}", "title": "" }, { "docid": "c972e2ad36aea9593c2ac76cbc11b8bf", "score": "0.6767648", "text": "public function index()\n {\n return Restful::collection($this->getRepository()->all());\n }", "title": "" }, { "docid": "a611acae3e681926a6968198c5dab110", "score": "0.6765221", "text": "public function index()\n {\n $list = view('site.client.listing')->render();\n return $list;\n }", "title": "" }, { "docid": "602ed8dee2e015ea55511aa59ba3ed40", "score": "0.6761819", "text": "public function showList()\n {\n return view();\n }", "title": "" }, { "docid": "902d092c31e6544c2b9cf0edfb02ea3a", "score": "0.6750531", "text": "public function index()\n {\n return view('admin.listing.index')->withListings(Listing::all());\n }", "title": "" }, { "docid": "8eef2b9b847b9c58a5cfb5d664f2e780", "score": "0.6748404", "text": "public function listAction() {\n\t\tif ($this->request->hasArgument('selectedCategories')) {\n\t\t\t$selectedCategories = $this->request->getArgument('selectedCategories');\n\t\t\t$this->view->assign('objects', $this->exampleRepository->findByCategories($selectedCategories));\n\t\t\t$this->view->assign('selectedCategories', $this->categoriesRepository->findSelectedCategories($selectedCategories));\n\t\t} else {\n\t\t\t$this->view->assign('objects', $this->exampleRepository->findAll());\n\t\t}\n\t\t$this->view->assign('arguments', $this->request->getArguments());\n\t}", "title": "" }, { "docid": "21b5c64ea30098dcc23c030c81b33431", "score": "0.6747242", "text": "public function index()\n {\n //\n\n if (Auth::user()->hasRole('Admin')) {\n $resources = MyResource::latest()->paginate(5);\n } else {\n $resources = MyResource::where('user_id', Auth::user()->id)->latest()->paginate(5);\n }\n\n return view('resources.index', compact('resources'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6742193", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "b6c185d0aed440370b1e22ff2d401da5", "score": "0.6724648", "text": "public function index()\n {\n $this->load->library('pagination');\n\n $count = $this->model->listingCount($this->listing_config);\n\n $returns = $this->paginationCompress( $this->config['page'].\"/\", $count, 15 );\n\n $data['objects'] = $this->model->listing($returns[\"per_page\"], $returns[\"segment\"],$this->listing_config);\n $data['pageVar'] = $this->config;\n $data['columns'] = $this->listing;\n $data['config'] = $this->listing_config;\n\n $this->global['pageTitle'] = $this->config['pageName'] ;\n\n $this->loadViews(\"admin/CRUD_R\", $this->global, $data, NULL);\n }", "title": "" }, { "docid": "ce95675bc5d2c976a855abe40a22da29", "score": "0.67158294", "text": "public function index()\n {\n // Get Books\n $books = Books::orderBy('created_at', 'desc') ->paginate(5);\n\n // Return collection of books as a resource\n return BooksResource::collection($books);\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "afcbd1f71b8bf87347a3fa60719ba0be", "score": "0.67056316", "text": "public function index() {\n\t\t$datas = DAO::getAll ( $this->model );\n\t\techo $this->_getResponseFormatter ()->get ( $datas );\n\t}", "title": "" }, { "docid": "4bc4ef9abd1fba68e2b86b542b49eca2", "score": "0.67025477", "text": "public function listAction() {\n\t\t// Preload info\n\t\t$this->view->viewer = $viewer = Engine_Api::_ ()->user ()->getViewer ();\n\t\t$this->view->owner = $owner = Engine_Api::_ ()->getItem ( 'user', $this->_getParam ( 'user_id' ) );\n\t\tEngine_Api::_ ()->core ()->setSubject ( $owner );\n\n\t\tif (! $this->_helper->requireSubject ()->isValid ()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Search Params\n\t\t$form = new Ynblog_Form_Search ();\n\t\t$form->isValid ( $this->_getAllParams () );\n\t\t$params = $form->getValues ();\n\t\t$params ['date'] = $this->_getParam ( 'date' );\n\t\t$this->view->formValues = $params;\n\n\t\t$params ['user_id'] = $owner->getIdentity ();\n\t\t$params ['draft'] = 0;\n\t\t$params ['is_approved'] = 1;\n\t\t$params ['visible'] = 1;\n\n\t\t// Get paginator\n\t\t$this->view->paginator = $paginator = Engine_Api::_ ()->ynblog ()->getBlogsPaginator ( $params );\n\t\t$items_per_page = Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'ynblog.page', 10 );\n\t\t$paginator->setItemCountPerPage ( $items_per_page );\n\t\tif (isset ( $params ['page'] )) {\n\t\t\t$this->view->paginator = $paginator->setCurrentPageNumber ( $params ['page'] );\n\t\t}\n\t\t// Render\n\t\t$this->_helper->content->setEnabled ();\n\t}", "title": "" }, { "docid": "c2e0dc884bf03158662e5bf33ae92498", "score": "0.67018956", "text": "public function actionList()\n {\n if (!Parameters::hasParam('type'))\n throw new APIException('Invalid resource TYPE (parameter name: \\'type\\')', APIResponseCode::API_INVALID_METHOD_PARAMS);\n \n// if (!Parameters::hasParam('devkey'))\n// throw new APIException('Invalid application DEVELOPER KEY (parameter name: \\'devkey\\')', APIResponseCode::API_INVALID_METHOD_PARAMS);\n \n $resource_type = Parameters::get('type');\n// $devkey = Parameters::get('devkey');\n \n $finder = new YiiResourceFinder($resource_type);\n// $finder->setDevKey($devkey);\n $result = $finder->findAll();\n \n $dataSet = array();\n foreach ($result as $object) {\n $dataSet[] = $object->getAttributes();\n }\n \n $format = Parameters::hasParam('format') ? Parameters::get('format') : 'json';\n $coder = ObjectCodingFactory::factory()->createObject($format);\n if ($coder === null)\n throw new APIException('Invalid Coder for format', APIResponseCode::API_INVALID_CODER);\n \n $response = $coder->encode($dataSet);\n \n echo $response;\n }", "title": "" }, { "docid": "81277fc0f68d7bdc3634177cde0439a7", "score": "0.66943973", "text": "public function list()\n {\n $books = Book::visible();\n\n return $this->apiListingResponse($books, [\n 'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'owned_by', 'image_id',\n ]);\n }", "title": "" }, { "docid": "7c934a7b8506c7db64d5ad367d48f525", "score": "0.6692943", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Servers list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the servers.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/servers/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Servers::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "59dfb79d5d5452f4f70e9cf4eec1e070", "score": "0.66803515", "text": "public function index()\n {\n //Get Articles\n\n $articles = Articles::paginate(15);\n\n // Return collection of articles as a resource\n return ArticlesResource::collection($articles);\n \n }", "title": "" }, { "docid": "88425de2823c6c6b170f46c36cff4af3", "score": "0.6677779", "text": "public function index()\n {\n $this->callHook('beforeIndex');\n $this->crud->hasAccessOrFail('list');\n\n $this->data[ 'crud' ] = $this->crud;\n $this->data[ 'title' ] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if ( !$this->data[ 'crud' ]->ajaxTable() ) {\n $this->data[ 'entries' ] = $this->data[ 'crud' ]->getEntries();\n }\n\n $this->callHook('afterIndex');\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "345876c650e46751471c85aa681fe81d", "score": "0.6673378", "text": "public function index()\n {\n //Get employees\n $employees = Employee::Paginate(15);\n //Return Employees as collection\n return EmployeeResource::collection($employees);\n }", "title": "" }, { "docid": "637eadb6ce19bd72fb45f6d4655ad277", "score": "0.66667867", "text": "public function listAction(){\r\n $userRepository = new \\Itb\\Model\\UserRepository();\r\n $users = $userRepository->getAll();\r\n\r\n $argsArray = ['users' => $users];\r\n $templateName = 'list';\r\n return $this->app['twig']->render($templateName . '.html.twig', $argsArray);\r\n }", "title": "" }, { "docid": "f3eff99c83c1adfe50ea93c0e478d078", "score": "0.66651416", "text": "public function index()\n {\n $students = Student::all();\n return (new StudentResourceCollection($students))->response();\n }", "title": "" }, { "docid": "4cfaa693b1306205053c160e2512565f", "score": "0.66650486", "text": "public function index()\n {\n $employees = Employee::all();\n return EmployeeForListResource::collection($employees);\n }", "title": "" }, { "docid": "f7578349cae5019055b4943e15786163", "score": "0.6661141", "text": "public function index()\n {\n //Get product\n $product = Products::paginate(15);\n \n //Return collection of product as a resource\n return ProductsResource::collection($product);\n }", "title": "" }, { "docid": "6f716fb0d645620791c39e3c2af2b242", "score": "0.66564786", "text": "function index() {\n Event::run('system.404');\n if ( ! A2::instance()->allowed('recruit', 'manage'))\n Event::run('system.403');\n \n $this->title = 'Manage Recruitment Lists';\n $this->lists = ORM::factory('recruit_list')->get();\n }", "title": "" }, { "docid": "5048b1d929efd7b88543fcf092cf843a", "score": "0.66558444", "text": "public function index()\n {\n return response(\n RecipeList::all()\n );\n }", "title": "" }, { "docid": "78496e0d8128f2673df1944c04d854e7", "score": "0.6653842", "text": "public function index()\n {\n $results = $this->Paginator->paginate($this->Results->find()->order(['created' => 'DESC']));\n $this->set(compact('results'));\n }", "title": "" }, { "docid": "2947b2c8c3c02fb9550821c40f31fc67", "score": "0.6650542", "text": "function list() {\n $data = $this->handler->handleList();\n\n $page = new Page(\"Roles\", \"Roles\");\n $page->top();\n\n listView($data);\n\n $page->bottom();\n }", "title": "" }, { "docid": "a2a6ac8b209515c5bee6b4f54354fdf5", "score": "0.66499305", "text": "public function index()\n {\n return LivreResource::collection(Livre::paginate(25));\n }", "title": "" }, { "docid": "726c696b08b65fb98a73b42e4ea85b29", "score": "0.6629493", "text": "public function index()\n {\n $products = Product::paginate(10);\n\n return ProductResource::collection($products);\n\n }", "title": "" }, { "docid": "c790cdb69ca9826f2d216ed3504b7bf4", "score": "0.66200316", "text": "public function list_( $args = array(), $assoc_args = array() ) {\n\n\t\t$assoc_args['all'] = 1;\n\n\t\t$this->get( $args, $assoc_args );\n\t}", "title": "" }, { "docid": "1d411fb7a37e8af4ad44010eef0ae6f9", "score": "0.66184205", "text": "public function index()\n {\n // Get the paginator using the parent API\n $paginator = $this->api()->index();\n\n // Show collection as a paginated table\n $collection = $paginator->getCollection();\n return $this->content('index', compact('paginator', 'collection'));\n }", "title": "" }, { "docid": "7d5ab4818059473cc9dd3d9aa19144cc", "score": "0.6611835", "text": "public function index()\n {\n $layanan = Layanan::paginate('15');\n return LayananResource::collection($layanan);\n }", "title": "" }, { "docid": "5284e0e8a629d94b2c297dec365035f8", "score": "0.6611247", "text": "function index(){\n\n\t\t$this->post_listing($start=0);\n\n\t}", "title": "" }, { "docid": "0b23f3dc133820a3f769ef803e71d588", "score": "0.6609974", "text": "public function listAction()\n\t{\n\t\t$module = $this->_useModules ? $this->_moduleName.'/' : '';\n\t\t\n\t\tZend_Paginator::setDefaultScrollingStyle('Sliding');\n\n\t\tZend_View_Helper_PaginationControl::setDefaultViewPartial('list.phtml');\n\n\t\t$this->_currentPage = $this->_getParam('page',1);\n\t\t$this->_currentPage = $this->_currentPage < 1 ? 1 : $this->_currentPage;\n\n\t\t$where = isset($this->_post->key) ? ($this->_post->key.\" like '%\".$this->_post->value.\"%'\") : null;\n\n\t\tif ($where == null)\n\t\t{\n\t\t\t$select = $this->_model->select()->\n\t\t\torder($this->_model->getOrderField())->\n\t\t\tlimit($this->_itemsPerPage,($this->_currentPage-1)*$this->_itemsPerPage);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$select = $this->_model->select()->\t\t\n\t\t\twhere($where)->\n\t\t\torder($this->_model->getOrderField())->\n\t\t\tlimit($this->_itemsPerPage,($this->_currentPage-1)*$this->_itemsPerPage);\t\t\t\n\t\t}\t\t\n\t\t\n\t\t$rows = $this->_model->fetchAll($select);\t\t\n\n\t\t$profile = $this->_profiler->getLastQueryProfile();\n\n\t\t$paginator = Zend_Paginator::factory($rows);\n\n\t\t$paginator->setCurrentPageNumber($thi->_currentPage)\n\t\t\t\t\t->setItemCountPerPage($this->_itemsPerPage);\n\t\t\n\t\t/** TODO get total of records for $totalOfItems \n\t\t * @var unknown_type\n\t\t */\n\t\t$totalOfItems = $this->_itemsPerPage;\n\n\t\t$this->_lastPage = (int)(($totalOfItems/$this->_itemsPerPage));\n\n\t\t$html = new Fgsl_Html();\n\n\t\t$html->addDecorator(Fgsl_Html_Constants::HTML_DECORATOR_TABLE);\n\n\t\t$records = array();\n\n\t\t$fieldKey = $this->_model->getFieldKey();\n\n\t\t$currentItems = $paginator->getCurrentItems();\n\t\tforeach ($currentItems as $row)\n\t\t{\n\t\t\t$records[] = array();\n\t\t\t\t\n\t\t\t$id = $row->$fieldKey;\n\t\t\t$records[count($records)-1][$this->_model->getFieldLabel($fieldKey)] = '<a href=\"'.BASE_URL.$module.$this->_controllerAction.'/edit/'.$fieldKey.'/'.$id.'\">'.$id.'</a>';\n\t\t\t\t\n\t\t\tforeach ($this->_fieldNames as $fieldName)\n\t\t\t{\n\t\t\t\tif ($fieldName == $fieldKey) continue;\n\t\t\t\t$records[count($records)-1][$this->_model->getFieldLabel($fieldName)] = $row->$fieldName;\n\t\t\t}\n\t\t\t\t\n\t\t\t$records[count($records)-1]['remove'] = '<a href=\"'.BASE_URL.$module.$this->_controllerAction.'/remove/'.$fieldKey.'/'.$id.'\">X</a>';\n\t\t}\n\t\t$this->_model->setRelationships($records);\t\t\n\t\t\n\t\t$this->_table = $html->create($records,Fgsl_Html_Constants::HTML_DECORATOR_TABLE);\t\t\n\n\t\t$this->configureViewAssign();\n\t\t$this->_view->render('list.phtml');\n\t}", "title": "" }, { "docid": "25424750ec44aa26547175ff6ccff0e1", "score": "0.66043633", "text": "public function index()\n {\n $posts = Post::listAllPublished();\n\n return PostResourceListing::collection($posts)->additional(['message' => 'ok', 'success' => true]);\n }", "title": "" }, { "docid": "7848eedd65d74e3882f897e7b74ca571", "score": "0.65999943", "text": "public function apiListsAction() {\n\t\t$api = $this->_param( 'api' );\n\n\t\tif ( ! $api || ! array_key_exists( $api, Thrive_Dash_List_Manager::available() ) ) {\n\t\t\texit();\n\t\t}\n\t\t$connection = Thrive_Dash_List_Manager::connectionInstance( $api );\n\n\t\techo $this->_view( 'partials/api-lists', array(\n\t\t\t'selected_api' => $connection,\n\t\t\t'connection' => $connection,\n\t\t\t'lists' => $connection->getLists( $this->_param( 'force_fetch' ) ? false : true )\n\t\t) );\n\n\t\texit();\n\t}", "title": "" }, { "docid": "71c5dbf8452cd67d212ff39d40f0c37d", "score": "0.65966225", "text": "public function index()\n {\n $students = Student::all();\n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "15871bf4ada7393bc878944a01d437da", "score": "0.6594662", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_role->get_all();\n\t\t$this->template->set('title', 'Role List');\n\t\t$this->template->load('template', 'contents', 'role/list', $data);\n\t}", "title": "" }, { "docid": "41f78864c980c5b1e66654bd42f82083", "score": "0.65942985", "text": "public function listAction ()\n {\n $lans = new Application_Model_Mapper_LansMapper();\n $currentLans = $lans->fetchCurrent();\n $comingLans = $lans->fetchComing();\n $passedLans = $lans->fetchPassed();\n $this->view->currentLans = $currentLans;\n $this->view->comingLans = $comingLans;\n $this->view->passedLans = $passedLans;\n return;\n }", "title": "" }, { "docid": "af4f1232545bca0bcf287f1972d50981", "score": "0.6587391", "text": "public function listingAction() {\n\t\t$viewer = Engine_Api::_ ()->user ()->getViewer ();\n\t\t$params = $this -> _getAllParams();\n\t\t$ids = array ();\n\t\t// Do the show thingy\n\t\tif (isset($params ['by_authors'] ) && in_array('networks', $params['by_authors'])) \n\t\t{\n\t\t\t// Get an array of user ids\n\t\t\t\n\t\t\t$network_table = Engine_Api::_()->getDbtable('membership', 'network');\n \t\t$network_select = $network_table->select()->where('user_id = ?', $viewer -> getIdentity());\n \t\t$networks = $network_table->fetchAll($network_select);\n\t\t\tforeach($networks as $network)\n\t\t\t{\n\t\t\t\t$network_select = $network_table->select()->where('resource_id = ?', $network -> resource_id) -> where(\"active = 1\");\n \t\t\t$users = $network_table->fetchAll($network_select);\n\t\t\t\tforeach ( $users as $user ) {\n\t\t\t\t\t$ids [] = $user->user_id;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif (isset($params ['by_authors'] ) && in_array('professional', $params['by_authors'])) \n\t\t{\n\t\t\t$userIds = Engine_Api::_() -> user() -> getProfessionalUsers();\n\t\t\tforeach ($userIds as $id) {\n\t\t\t\t$ids [] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$params ['users'] = $ids;\n\t\t\n\t\t// Get blog paginator\n\t\t$paginator = Engine_Api::_ ()->ynblog ()->getBlogsPaginator ( $params );\n\t\t$items_per_page = Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'ynblog.page', 10 );\n\t\t$paginator->setItemCountPerPage ( $items_per_page );\n\n\t\tif (isset ( $params ['page'] )) {\n\t\t\t$paginator->setCurrentPageNumber ( $params ['page'] );\n\t\t}\n\t\t$this->view->paginator = $paginator;\n\t\t// Render\n\t\t$this->_helper->content->setEnabled ();\n\t}", "title": "" }, { "docid": "ca351a6c1fb5996a24802e4695371409", "score": "0.6585022", "text": "public function index()\n {\n $students = Student::all();\n \n return $this->sendResponse(StudentResource::collection($students), 'Students retrieved.');\n }", "title": "" }, { "docid": "ee362204073e5cbb647d776b2ab10940", "score": "0.6583899", "text": "public function indexAction()\n {\n $this->display();\n }", "title": "" }, { "docid": "ee0f12e894ffa19b553c5842d61bc92f", "score": "0.65838", "text": "public function list()\n {\n return view('Demo::list');\n }", "title": "" }, { "docid": "7e85268d6b01a017717a7d038d6b5c73", "score": "0.65802336", "text": "public function index()\n {\n $book = Book::paginate(2);\n return BookResource::collection($book);\n }", "title": "" }, { "docid": "8fd0dba76f9273c1033b432a513959af", "score": "0.65758175", "text": "public function doRestList()\n {\n $this->renderJson(array('success'=>true, 'message'=>'Records Retrieved Successfully', 'data'=>$this->getModel()->findAll()));\n }", "title": "" }, { "docid": "939f04db957f01973a6f0fa7f41c4007", "score": "0.657049", "text": "public function index()\n {\n $cond = Resource::where('id', '>', -1);\n $resources = $cond->get();\n\n $deviceList = [];\n foreach ($resources as $resource) {\n $data = [];\n $data['id'] = $resource->id;\n $data['name'] = $resource->name;\n $data['size'] = $resource->size;\n $data['created_at'] = $resource->created_at;\n\n array_push($deviceList, $data);\n }\n\n return view('resources', array('resources' => $deviceList));\n }", "title": "" }, { "docid": "d3d661b18964ba7ea7a108ea11a1a8a3", "score": "0.6568526", "text": "public function list ()\n {\n // Récupération de TOUS les articles avec le REPOSITORY\n // 1. Récupération du repository Article\n $articleRepository = $this->getDoctrine()\n ->getRepository(Article::class);\n\n // 2. Appel à la fonction findAll\n $liste = $articleRepository->findAll();\n\n // Renvoi de la liste à la vue\n return $this->render('article/list.html.twig', [\n 'listeArticles' => $liste\n ]);\n }", "title": "" }, { "docid": "7b5e2b301434be8bca6abbff68773c36", "score": "0.6567384", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate(10));\n }", "title": "" }, { "docid": "81cae78d81b024602d92e06f78dd089e", "score": "0.65654266", "text": "public function list() {\n $article = new article();\n echo \"<h2 class='text-center m-5 border-bottom border-dark pb-5'>la page qui affiche la liste des articles</h2>\";\n $articleManager = $this->getDoctrine()->getRepository(article::class);\n $articles = $articleManager->findById();\n return $this->render('listeView.html.twig', ['articles' => $articles]);\n }", "title": "" }, { "docid": "b06d85985f7ef908e89d4534e8f29c97", "score": "0.6552259", "text": "public function index()\n {\n\t\t\treturn $this->respond($this->model\n ->orderBy('created_at', 'asc')\n ->findAll());\n }", "title": "" }, { "docid": "4d53d7254450e0c10db064ccddb74ae9", "score": "0.6551876", "text": "public function showAction()\n {\n $list = $this->listFactory->createList($this->dataBackend, $this->configurationBuilder);\n $renderedCaptions = $this->rendererChain->renderCaptions($list->getListHeader());\n $columnSelector = $this->columnSelectorFactory->getInstance($this->configurationBuilder);\n\n $this->view->assign('columnSelector', $columnSelector);\n $this->view->assign('listHeader', $list->getListHeader());\n $this->view->assign('listCaptions', $renderedCaptions);\n }", "title": "" }, { "docid": "e6be331bf6ee794db504703782e4abe5", "score": "0.65461046", "text": "public function index()\n {\n $items = Item::all();\n return view('list',compact('items'));\n }", "title": "" }, { "docid": "e8f09968b69af986e66d5cd3f404f3ad", "score": "0.6535171", "text": "public static function list() {\n $data = [\n 'pages' => PageService::get()\n ];\n\n Twig::render('pillar/layouts/pillar-pages', $data);\n }", "title": "" }, { "docid": "497bb71da959ab5e52433887d4acf412", "score": "0.6525618", "text": "public function listAction()\r\n {\r\n $form_data = $this->request->getArguments();\r\n \r\n $settings = GeneralUtility::makeInstance(ConfigurationObject::class);\r\n $itemsPerPage = (int)$settings->getPaginateItemsPerPage();\r\n\r\n if($form_data) {\r\n $objects = $this->objectimmoRepository->getAllObjectsBySearch($form_data);\r\n } else {\r\n $objects = $this->objectimmoRepository->getAllObjects();\r\n }\r\n \r\n $GLOBALS['TSFE']->fe_user->setKey('ses', 'search', $form_data);\r\n \r\n $count_objects = count($objects);\r\n\r\n $this->view->assign('objects', $objects);\r\n $this->view->assign('count_objects', $count_objects);\r\n $this->view->assign('itemsPerPage', $itemsPerPage);\r\n }", "title": "" }, { "docid": "365ef354e23f522e48d950c7ede25035", "score": "0.65234184", "text": "public function listAction()\n {\n return $this->render('task/list.html.twig',\n ['tasks' => $this->getDoctrine()->getRepository('AppBundle:Task')->findAllTask()]\n );\n }", "title": "" }, { "docid": "50b4e9cfb2f2db278dc000419368b6b9", "score": "0.65208316", "text": "public function index()\n {\n //Using Eloquent to get all the news in latest order. This is wil expose all the data\n //return Questions::latest()->get();\n\n //Use pagination\n //return Questions::latest()->paginate(1);\n\n //Using the \"QuestionResource\" API Resource wrapper to expose only the specified data without pagination\n //return QuestionResource::collection(Questions::latest());\n\n //Using the \"QuestionResource\" API Resource wrapper to expose only the specified data with pagination - set to return 5 items per page\n return QuestionResource::collection(Questions::latest()->paginate(5));\n\n }", "title": "" }, { "docid": "889d04be26f484433ced3afeb258119e", "score": "0.6518248", "text": "public function index()\n {\n return EmployeeResource::collection(Employee::paginate(10));\n }", "title": "" }, { "docid": "4ba8a9b727755a6ba7f5d1c4a619aff0", "score": "0.65151894", "text": "public function index()\n {\n return ReadingListBookResource::collection(ReadingListBook::all());\n }", "title": "" } ]
211cf1b59eeb4e96306216dba7e0f713
Delegate delete to the field DataStore instance
[ { "docid": "e79d83eee9bf6f0edbb1498bf5e49f61", "score": "0.67086005", "text": "function delete() {\r\n\t\treturn $this->store->delete($this);\r\n\t}", "title": "" } ]
[ { "docid": "6eb32ad464ef685866d932e0a25c1ce3", "score": "0.78664684", "text": "public function delete() {\n field_delete_field($this->field_name);\n }", "title": "" }, { "docid": "ec31431637999863047dd575625d3419", "score": "0.74018764", "text": "public function delete(){\n\t\tif (!$this->deleted){\n\t\t\tforeach ($this->fields as $item){\n\t\t\t\t/** @var DBItemField $item */\n\t\t\t\t$item->deleteDependencies($this);\n\t\t\t}\n\t\t\t\n\t\t\t$this->db->query(\"DELETE FROM \" . $this->table . \" WHERE `id` = \" . $this->DBid);\n\t\t\t\n\t\t\tunset(self::$instances[$this->specifier->getSpecifiedName()][$this->DBid]);\n\t\t\t$this->deleted = true;\n\t\t\t$this->changed = false;\n\t\t}\n\t}", "title": "" }, { "docid": "5820bcda7e5af9f2621ee631a563515b", "score": "0.7305197", "text": "public function del()\n\t{\n\t\t$this->deleted = 1;\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "8aae4fbe9ab718d76b53d6bb60a56c7d", "score": "0.7260453", "text": "public function delete(Field $field);", "title": "" }, { "docid": "268c30c6782025503083fc7ba52c1d0a", "score": "0.72505486", "text": "public function delete() {\n $this->dataStoreAdapter->deleteObject($this->getUuid());\n }", "title": "" }, { "docid": "9ab9b5b49d5abb2e7d40da06986babc6", "score": "0.71435624", "text": "abstract public function deleteFromDb();", "title": "" }, { "docid": "f6453761d242466206211a719e11b978", "score": "0.70160294", "text": "public function delete(){\r\n\t\t$params = array();\r\n\t\tforeach($this->id as $fieldName){\r\n\t\t\t$alias = $this->fields[$fieldName];\r\n\t\t\t$params[$this->fields[$fieldName]] = $this->$alias;\r\n\t\t}\r\n\r\n\t\t$this->deleteById($params);\r\n\t}", "title": "" }, { "docid": "f1478119dd234e3034a7cb73695cb290", "score": "0.6922331", "text": "public function delete()\n {\n // Call the parent delete function AFTER child delete function\n $this->storage->deleteDiaNode($this->id);\n\n parent::delete();\n }", "title": "" }, { "docid": "50e0460d52624285cdab99bcffe1a5b8", "score": "0.6904278", "text": "public function deletion();", "title": "" }, { "docid": "dec8008a7ff4971074f78c213ebaaa3e", "score": "0.68505305", "text": "public function deleting()\n {\n //\n }", "title": "" }, { "docid": "e0cfae1678e48a585bd1e2255eb340d5", "score": "0.6840187", "text": "public function deleteData()\n {\n\t}", "title": "" }, { "docid": "eb161eb1e5cc4191b58942b7b51fd5ed", "score": "0.6794341", "text": "function deleteEntry() \n {\n // first remove any associated fields with this DAObj\n $daFieldList = new DAFieldList( $this->getID() );\n $daFieldList->setFirst();\n while( $field = $daFieldList->getNext() ) {\n $field->deleteEntry();\n }\n \n // now call parent method\n parent::deleteEntry();\n \n }", "title": "" }, { "docid": "6a7b8bbcc8c70368b66a2b1fa3407ddd", "score": "0.6793159", "text": "public function delete() {\n\n if($this->persists) {\n\n // Get arranger (for compatibility with 5.6 set into separated operation)\n $arranger = DBOModelTransformerManager::getArranger();\n\n // Do Delete\n if ($arranger::delete($this->_getStructure(), $this->currentData)) {\n\n // Flag entity as not persisted in system\n $this->persists = false;\n\n // Erase value of the indexing parameter in the child\n if($this->__currentSchema->primary) {\n\n $this->currentData[$this->__currentSchema->primary->parameterName] = null;\n\n }\n\n }\n\n }\n\n }", "title": "" }, { "docid": "0d0727c41c09538e3c5053ad5a5fa5f6", "score": "0.672218", "text": "public function delete() {\n\n\t}", "title": "" }, { "docid": "f4540b140bf75f871cac0cd9c69030ff", "score": "0.67192197", "text": "public function deleteFromDb()\n\t{\n\t\t// TODO: Implement deleteFromDb() method.\n\t}", "title": "" }, { "docid": "a4fe92ca4446063146a88021ef358120", "score": "0.6707793", "text": "public function delete(){\n $this->attributes()->delete();\n return parent::delete();\n }", "title": "" }, { "docid": "7313589621da47b39ac136984be9c5dd", "score": "0.6700122", "text": "protected function delete() {\n }", "title": "" }, { "docid": "7bf9c10f6b902a85bee13a4bf8df9287", "score": "0.66980135", "text": "public abstract function delete();", "title": "" }, { "docid": "0164a547fe92b83c542fbcaadcc5f01a", "score": "0.668543", "text": "public function delete() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "d407364fbf19a243676e054f0e4cc4bd", "score": "0.6662857", "text": "public function deleted()\n {\n //\n }", "title": "" }, { "docid": "4aa2e289ccc8856c4c9e89349b50a29a", "score": "0.66580135", "text": "public function delete() {\n }", "title": "" }, { "docid": "b81b6fb1de1bb01ae276a57074e328ad", "score": "0.6649508", "text": "public function delete()\n {\n $database = cbSQLConnect::adminConnect('object');\n if (isset($database))\n {\n return ($database->SQLDelete(self::$table_name, 'id', $this->id));\n }\n }", "title": "" }, { "docid": "c7bb26bc700d22b92bc2656bdf262244", "score": "0.6642937", "text": "public function delete()\n {\n //\n }", "title": "" }, { "docid": "bb95cc530b5fbb74d64948dadb89d02a", "score": "0.6631656", "text": "public function delete(){\n\n\t \t}", "title": "" }, { "docid": "ca9fd41878ca8caf4df22c15cc77b872", "score": "0.6627331", "text": "public function deleted(Record $record)\n {\n //\n }", "title": "" }, { "docid": "983565d6d9b68a41e86765f99d42118c", "score": "0.661844", "text": "public function delete()\n {\n $this->setup_ft();\n $this->call_ft('settings_modify_column', array(\n 'field_id' => $this->id,\n 'ee_action' => 'delete'\n ));\n }", "title": "" }, { "docid": "857ca450b4133a6bb916ed82187d9907", "score": "0.66173065", "text": "public function delete()\n {\n \n }", "title": "" }, { "docid": "857ca450b4133a6bb916ed82187d9907", "score": "0.66173065", "text": "public function delete()\n {\n \n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.66108954", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.66108954", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.66108954", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.66108954", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.66108954", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.66108954", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.66108954", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.66108954", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.66108954", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.66108954", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.66108954", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.66108954", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.66108954", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.66108954", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.66108954", "text": "public function delete();", "title": "" }, { "docid": "e8e06da3052fd781641802b42e5c18d5", "score": "0.6602515", "text": "public function delete () {\n\n\t}", "title": "" }, { "docid": "ac0316a68ae2cf31bdc5171b8c82b93e", "score": "0.65983796", "text": "abstract public function deleteBy( $field, $value );", "title": "" }, { "docid": "28987c5e414d9e8af1d114e40c6c578f", "score": "0.65958554", "text": "public function delete()\n {\n $q = 'DELETE\n FROM `' . $this->tablename . '`\n WHERE '. $this->id_field . ' = :id;';\n $stmt = $this->getDb()->prepareStatement($q);\n $stmt->execute(array(':id' => $this->getId()));\n }", "title": "" }, { "docid": "8ee4d02dac649639fd4696fdf8a09ca7", "score": "0.65870106", "text": "protected function delete() {\n\t\t\t$this->deleted = true;\n\t\t}", "title": "" }, { "docid": "108198546d60c5c2f4e6426775d54514", "score": "0.6580605", "text": "function doDelete()\n {\n global $ilDB;\n\n if ($this->getServiceName() != null)\n {\n $plugin_class = ilCloudConnector::getPluginClass($this->getServiceName(), $this->getId());\n if ($plugin_class)\n {\n $plugin_class->doDelete($this->getId());\n }\n }\n\n $ilDB->manipulate(\"DELETE FROM il_cld_data WHERE \" .\n \" id = \" . $ilDB->quote($this->getId(), \"integer\")\n );\n\n }", "title": "" }, { "docid": "eb6afc1082959e681bf43a0bee6b1de0", "score": "0.65804374", "text": "public function delete(){\r\n \r\n }", "title": "" }, { "docid": "dcc36c1b6117768ee48bf7286b22b332", "score": "0.6577975", "text": "function dataplus_delete() {\n global $dataplusdb, $CFG, $id, $groupmode, $dataplusfilehelper;\n\n require_once('delete_form.php');\n\n $fid = optional_param('fid', null, PARAM_INT);\n\n // Check the current group can delete this field.\n $coldetails = $dataplusdb->get_column_details($fid);\n\n if (!dataplus_check_groups($coldetails, true, true)) {\n return;\n }\n\n $murl = $CFG->wwwroot.'/mod/dataplus/manage.php?id='.$id.'&mode=deletesubmit&fid='.$fid;\n $mform = new dataplus_delete_form($murl);\n\n if ($mform->is_cancelled() || empty($fid)) {\n dataplus_manage();\n return;\n }\n\n // If the delete form has been submitted...\n if ($form = $mform->get_data()) {\n dataplus_log('deletecolumn');\n\n $formfieldtype = $coldetails->form_field_type;\n\n // If the field had supporting files, delete them.\n if ($formfieldtype == 'image' || $formfieldtype == 'file') {\n $cname = $coldetails->name;\n $ctype = $coldetails->form_field_type;\n\n $dataplusfilehelper->delete_column_files($cname, $ctype);\n }\n\n $del = $dataplusdb->delete_dataplus_column($fid);\n\n if (!$del) {\n $msg = get_string('actionfailed', 'dataplus');\n dataplus_manage($msg);\n return;\n }\n\n $msg = get_string('fielddeleted', 'dataplus');\n\n // When delete is complete, go to the manage screen...\n dataplus_manage($msg);\n return;\n }\n\n $columndetails = $dataplusdb->get_column_details($fid);\n\n $table = new html_table();\n\n // No form has been submitted, so display a table with the column detail and the delete form.\n $langfname = get_string('fieldname', 'dataplus');\n $langftype = get_string('fieldtype', 'dataplus');\n\n if ($groupmode > 0) {\n $table->head = array($langfname, $langftype, get_string('group', 'dataplus'));\n } else {\n $table->head = array($langfname, $langftype);\n }\n\n $desc = $dataplusdb->get_field_type_description($columndetails->form_field_type);\n\n if ($groupmode > 0) {\n $groupname = dataplus_get_group_name($columndetails->group_id);\n $table->data[] = array($columndetails->label, $desc, $groupname);\n } else {\n $table->data[] = array($columndetails->label, $desc);\n }\n\n echo html_writer::table($table);\n echo '<br/>';\n\n $mform->display();\n}", "title": "" }, { "docid": "9a0b1dd8f8d5f00621f8c00a8ce54be8", "score": "0.65449333", "text": "public function del(){\n\t\t$sql = \"delete from \".self::$tablename.\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "c9a09e565ae479c530b2a42291837c91", "score": "0.6540723", "text": "public function delete() {\n\n }", "title": "" }, { "docid": "0ba11449e45a3f0618d17739bdf7b6fa", "score": "0.6540409", "text": "abstract public function deleteFromDatabase($data_object);", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.65393996", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.65393996", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.65393996", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.65393996", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.65393996", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.65393996", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.65393996", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.65393996", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.65393996", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.65393996", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.65393996", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "e03518153045acb2413eac7df5dc3eea", "score": "0.65319675", "text": "protected function afterDelete () {}", "title": "" }, { "docid": "8a6bee51137a23fed0f3761fa6656cdf", "score": "0.6526524", "text": "function entity_field_delete_instance() {\n entity_property_info_cache_clear();\n}", "title": "" }, { "docid": "5575f191a36dd423ba7241be515e1fb3", "score": "0.65074056", "text": "public function delete($data);", "title": "" }, { "docid": "78f5d2516891b03d1a5da90bc69cb86f", "score": "0.65066326", "text": "public function handleDelete()\n\t{\n\t\t$record = $this->getRecord();\n\t\t$record->delete();\n\t}", "title": "" }, { "docid": "94abad94dd24b28007d24a40e8f56a9f", "score": "0.6497239", "text": "function delete() {\r\n $this->that->ac_delete($this->id, $this->name);\r\n $this->put_id();\r\n }", "title": "" }, { "docid": "bed0f0cf89f329db57f22e4d696c2cb0", "score": "0.6489831", "text": "abstract public function delete();", "title": "" }, { "docid": "bed0f0cf89f329db57f22e4d696c2cb0", "score": "0.6489831", "text": "abstract public function delete();", "title": "" }, { "docid": "3ccb0fc4fd5ca04d61efc02344b36f78", "score": "0.64852387", "text": "public function deleteDocFromIndex()\n {\n if (isset($this->data)) {\n $this->filter();\n $this->normalize();\n $this->selectIndexService();\n $index = $this->control->getIndex();\n if ($this->enableSearchById) {\n $index->includePrimaryKey();\n }\n $index->delete($this->id);\n echo 'Deleted' . PHP_EOL;\n } else {\n echo 'Please Insert ID To Delete';\n }\n\n }", "title": "" }, { "docid": "4200f7d7ea51e3d2ef875b86a18fef47", "score": "0.64695954", "text": "function deleteInDatabase(){\n }", "title": "" }, { "docid": "33ed560c5c8f1e3756d330fa48658345", "score": "0.64549387", "text": "#[NoReturn] public abstract function delete();", "title": "" }, { "docid": "da44f777c6e2882fa71a6975b2fba687", "score": "0.64490247", "text": "public function doDelete(){\r\n\t\t}", "title": "" }, { "docid": "01a2996a1956140904b56b694a2154de", "score": "0.6433129", "text": "function Delete()\n {\n if ($this->KeyValue())\n {\n $schema = $this->GetSchema();\n $schema->Delete($this->KeyCondition());\n }\n }", "title": "" }, { "docid": "a9b370f89eaf12bb247374df450c5436", "score": "0.64307356", "text": "public function delete() {\n return $this->table()\n ->where(array($this->primaryKeyName() => $this->primaryKey()))\n ->delete(); \n }", "title": "" }, { "docid": "c0ba3cc4d3ccfaab90097965f4de9129", "score": "0.6430329", "text": "public static function delete()\n\t{\n\t\tstatic::$queryObject->delete();\n\n\t}", "title": "" }, { "docid": "39bce08e14d272f06f65104e77ea1323", "score": "0.64116454", "text": "public function delete(){\r\n\t\t//delete\r\n\t\t$this->conn->setData(\"DELETE from department where departmentId = :id\",array(\r\n\t\t\":id\"=> $this->deptId\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "c8c0245626dd9a19c3e98f9fd3df574a", "score": "0.6404177", "text": "public function del()\n\t{\n\t\t$param = array();\n\t\tforeach($this->_param->primary AS $row => $name)\n\t\t\t$param[':'.$name] = $this->_data[$name];\n\t\t\n\t\t\\He\\Trace::addTrace(\"Supression de la ligne \".print_r($param[':'.$name.$row], 1).\"...\", get_called_class());\n\t\t\n\t\t$this->_prepareDel()->execute($param);\n\t\t$this->_exist = false;\n\t\t\\He\\Trace::addTrace(\"Effectué !\", get_called_class());\n\t\tunset($this);\n\t}", "title": "" }, { "docid": "07d128816a6f85da795a175a54a96aa4", "score": "0.63662916", "text": "public function deleteFromDatabase()\n {\n $this->deleteRepository->delete(\n $this->deleteData->tableName(),\n $this->deleteData->detailTableName(),\n $this->deleteData->workflowData()\n );\n }", "title": "" }, { "docid": "dd50f3bb5483f23bcdbbfd5c8054af33", "score": "0.63613224", "text": "public function delete()\n {\n if ($this->isNewEntity()) {\n return;\n } else {\n $this->row->delete();\n }\n }", "title": "" }, { "docid": "11d135c4f11305730c30e003222df524", "score": "0.6357586", "text": "public function delete()\n {\n $this->detail()->delete();\n $data = Detail::where(\"order_id\", $this->id)->delete();\n return parent::delete();\n }", "title": "" }, { "docid": "0b91638d07121a1dfc244880419f54ab", "score": "0.635198", "text": "public function delete()\n {\n if (isset($this->vals, $this->name)) {\n $this->filter();\n if (!isset($this->Dname)) {\n $this->normalize();\n }\n $delCommand = $this->mainP->delete()->from($this->Dname . 'Rt')->where('id', $this->vals['id']);\n $this->result = $delCommand->execute();\n if ($this->result) {\n echo 'Deleting successfully Accomplished!' . PHP_EOL;\n }\n } else {\n echo 'Insert Vals and Name first!' . PHP_EOL;\n }\n }", "title": "" }, { "docid": "91fe5df168a78811ad29c2d6d2d461c1", "score": "0.6347146", "text": "public function deleteEvent() \n {\n EventDAC::deleteEvent($this);\n }", "title": "" }, { "docid": "7fbeef1f5c322686c42da3a8a892ea81", "score": "0.6345791", "text": "public function delete(): void;", "title": "" }, { "docid": "9cee305e2a36db0037ebe093fc554031", "score": "0.6335724", "text": "protected function _delete()\n{\n\t# Record id to delete from table.\n\t$id = $this->read_attribute($this->primary_key);\n\t\n\t# Only delete if id exists.\n\tif ( $id )\n\t{ \t\n\t\t# Delete record from table.\n\t\t$this->db->delete($this->table_name(), array($this->primary_key() => $id));\t\n\t}\n}", "title": "" }, { "docid": "356d8a2160704c71efd11df50250db6a", "score": "0.63187855", "text": "public function delete()\n {\n $this->processor->delete($this);\n }", "title": "" }, { "docid": "712fd9b3b799e4f0c4b69a2e69d9e5cc", "score": "0.6317659", "text": "protected function afterDelete()\n {}", "title": "" }, { "docid": "280fb5028bc5f94f80008c80fd76b387", "score": "0.6315144", "text": "public static function storeDelete($key)\n {\n return parent::where(self::$storeColumn['key'],$key)->delete();\n }", "title": "" }, { "docid": "7e97dea970ab570d8238e28ee45efcba", "score": "0.6307905", "text": "abstract public function deleteAction();", "title": "" }, { "docid": "948480605833a427666bc469b7103d93", "score": "0.6305854", "text": "abstract public function delete( $entity );", "title": "" }, { "docid": "9e7d23d0f79fe530b4d26b5f3fab1352", "score": "0.6305508", "text": "public function action_delete()\n {\n $this->objects['academicrecords']->action_delete();\n }", "title": "" }, { "docid": "1b397e3a72485c4c3b7952b27d2b2384", "score": "0.6304662", "text": "public function Del()\n\t{\n\t\t$this->sql->Query( \"DELETE FROM $this->table_name WHERE $this->id_col = $this->id\" );\n\t}", "title": "" }, { "docid": "5afeea666c220cb6890d8c14fcddfbd1", "score": "0.63039297", "text": "public function delete()\n{\n\tlog_message('debug', get_class($this) . '->delete');\n\n\t/**\n\t * \tpost-id - The integer ID of the post you wish to delete.\n\t */\n}", "title": "" }, { "docid": "519aded79e6ecec78e9b6a718912d710", "score": "0.63004225", "text": "abstract protected function delete();", "title": "" }, { "docid": "a895c62cc262528c02d453fa066e7501", "score": "0.6283092", "text": "public function delete(){\r\n $where = $this->input->post('key');\r\n parent::delete();\r\n }", "title": "" }, { "docid": "964d2ac553002dff2ecf623b049eba0f", "score": "0.6280634", "text": "public function delete()\n {\n $this->db->delete(self::TABLE_NAME_RELATIONS,\n $this->db->quoteInto(\"colId = ? AND \", $this->model->getColId())\n . $this->db->quoteInto(\"groupId = ? \", $this->model->getGroupId()));\n }", "title": "" }, { "docid": "f7c8aea5afe97c2b62b8239f812b2c7e", "score": "0.62666845", "text": "protected function afterDelete( $event ) {}", "title": "" }, { "docid": "7a2056d13478b20f53e55fff3c82b621", "score": "0.62657446", "text": "function doRealDelete()\n {\n $this->assignSingle();\n /* Delete the record */\n DatabaseBean::dbDeleteById();\n }", "title": "" } ]
64cf4e4a4b35e9e938c71d2ec0f63f48
Saving model When primary key is set, model will be updated otherwise inserted
[ { "docid": "7d1bbc94bd98cbd9b87bd405cc5addf9", "score": "0.0", "text": "public function save() {\n if ($this->isView()) {\n throw new Exception('Unable to save view.');\n }\n\n $pk = $this->getPrimaryKey();\n\n // has primary key set, record exists -> updating\n if ($this->fields[$pk]->getValue()) {\n if ($this->isExtended()) {\n $this->extends->save();\n }\n return $this->update();\n }\n // no primary key value, record does not exists -> inserting\n else {\n if ($this->isExtended()) {\n $this->{$pk} = $this->extends->save();\n }\n return $this->insert();\n }\n }", "title": "" } ]
[ { "docid": "18248d524a32ff815d5a986d67627bf6", "score": "0.7467342", "text": "public function save()\n { \n if ( is_null( $this->id )) \n $this->create();\n else \n $this->update(); \n }", "title": "" }, { "docid": "b79bc0682a6b7d1ed26d43a798351121", "score": "0.7439794", "text": "public function save() {\n\t\treturn isset($this->{static::primary_key_field()}) ? $this->update() : $this->create();\n\t}", "title": "" }, { "docid": "2ef9ceb55821c1130a4b1dc856166526", "score": "0.73952985", "text": "public function save()\n {\n $id = $this->get_id();\n\n if (!$id) :\n $this->create();\n else :\n $this->update();\n endif;\n }", "title": "" }, { "docid": "4c04b94c85b21bbaf8d778ea13a8f040", "score": "0.7253882", "text": "public function save()\n\t{\n\t\t$table = $this->table();\n\t\tif ($this->exists()) {\n\t\t\t$table->update($this->toRowArray(), $this->where());\n\t\t} else {\n\t\t\t$table->insert($this->toRowArray());\n\t\t\t$this->_id = $table->getAdapter()->lastInsertId();\n\t\t}\n\t}", "title": "" }, { "docid": "017fa736238cc36dadba557a68e43335", "score": "0.7248987", "text": "public function save(){\r\n\t\tif(!$this->get('id')){\r\n\t\t\t// insert new \r\n\t\t} else {\r\n\t\t\t// update\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "7eda57ce01c8c8ea382785f8fe35f068", "score": "0.7220642", "text": "public function save()\r\n {\r\n\r\n if ($this->model->getId()) {\r\n return $this->model->update();\r\n }\r\n return $this->create();\r\n }", "title": "" }, { "docid": "f0c72aabd4f4b9c196e86243b7409258", "score": "0.72010696", "text": "public function save()\n {\n if ($this->Id == 0) {\n // Empty classes are set with ID = 0\n $this->create();\n } elseif ($this->Id == -1) {\n // Unretrievable rows are set up as ID = -1\n // Do nothing\n } else {\n // Otherwise, it's an existing ID\n $this->update();\n }\n }", "title": "" }, { "docid": "1864e16f5114571cb49ccee068f0858d", "score": "0.7181971", "text": "public function save()\n\t{\t\tif (static::existsInTable($this->id)) {\n\t\t\t$this->update();\n\t\t} else {\n\t\t\t$this->insert();\n\t\t}\n\t}", "title": "" }, { "docid": "534d634e9162fe55e9ba124955cf242f", "score": "0.715066", "text": "public function save()\n {\n\n $fields = $this->fields;\n\n\n unset($fields[$this->getPk()]);\n foreach ($fields as $key => $fieldOptions) {\n if (isset($this->$key)) {\n $values[$key] = $this->$key;\n }\n }\n\n $adapter = Flame::getAdapter();\n\n $adapter->beginTransaction();\n\n try {\n $query = new Query($adapter);\n\n if (! is_null($this->getPkValue())) {\n\n $query->update($this->table)\n ->set($values)\n ->where(\"{$this->getPk()} = :pk\")\n ->setParam('pk', $this->getPkValue())\n ->execute();\n\n } else {\n\n $values[$this->getPk()] = null;\n $query->insert($this->table)\n ->values($values)\n ->execute();\n\n $insertId = Flame::getAdapter()->getLastInsertId();\n $this->{$this->getPk()} = $insertId;\n }\n foreach ($this->relations['hasOne'] as $relation) {\n $relation->processChanges();\n }\n foreach ($this->relations['hasMany'] as $relation) {\n $relation->processChanges();\n }\n $adapter->commit();\n } catch (\\Exception $ex) {\n $adapter->rollBack($ex);\n throw $ex;\n }\n }", "title": "" }, { "docid": "dc46bf5effb202f59c4ea0b34046d77a", "score": "0.7079457", "text": "public function save() {\n\t // A new record won't have an id yet.\n\t return isset($this->id) ? $this->update() : $this->create();\n\t}", "title": "" }, { "docid": "78c5178c3f57bcc02acf7d98aea16055", "score": "0.7025913", "text": "public function save()\n {\n if (isset($this->{self::$primaryKey})) {\n return $this->update();\n }\n return $this->insert();\n }", "title": "" }, { "docid": "8fa580c346fda121d739bee3e8bb48ba", "score": "0.70120907", "text": "public function save() {\r\n if ($this->id === 0) return $this->insert();\r\n else return $this->update();\r\n }", "title": "" }, { "docid": "e19299e7f0a4ff1b06f07cbb3133cb8c", "score": "0.6875086", "text": "public function save() {\n // Get db fields for this object\n $vars = $this->getDbFields();\n\n // Prepare save query\n\t\t$save_query = \"UPDATE \" . static::$tableName . \" SET \";\n\t\tforeach ($vars as $key => $value) {\n\t\t\t$save_query .= $key . \"='$value', \";\n\t\t}\n $save_query = substr($save_query, 0, strlen($save_query) - 2)\n . \" \" . $this->genPrimaryKeyWhereClause(); \n \n // Execute save query\n self::$database->query($save_query);\n }", "title": "" }, { "docid": "f6e2ccf7ca46ddd74964b3f253ecd1b2", "score": "0.68402344", "text": "function save() {\n\t\tif ($this->id && $this->id > 0) {\n\t\t\treturn $this->update();\n\t\t} else {\n\t\t\treturn $this->insert();\n\t\t}\n\t}", "title": "" }, { "docid": "1b0c43cfc1b2be129bbf331d67f60dc8", "score": "0.67916906", "text": "public function save() {\n if ($this->get($this->id) != FALSE || $this->id != -1) {\n $this->on_before_save(self::DATA_SAVE_ACTION_UPDATE);\n $this->db->update($this->table, $this, array('id' => $this->id));\n } else {\n $this->on_before_save(self::DATA_SAVE_ACTION_INSERT);\n\n $valuesToInsert = array();\n foreach ($this as $property => $value) {\n if ($property != 'id' && $property != 'table')\n $valuesToInsert[$property] = $value;\n }\n $this->db->insert($this->table, $valuesToInsert);\n $this->id = $this->db->insert_id();\n }\n }", "title": "" }, { "docid": "d499b4cd6ec356f2f97b659980586d18", "score": "0.6768254", "text": "function save() {\n\t\tif ($this->is_loaded) {\n\t\t\t// is an object instantiated\n\t\t\t$q = 'UPDATE '.$this->tablename.' SET ';\n\t\t\tforeach($this->fields as $k => $v) {\n\t\t\t\tif(in_array($k,$this->pk)){ continue; }\n\t\t\t\tif($v == '') {\n\t\t\t\t\t$q .= \"$k = NULL, \";\n\t\t\t\t} else {\n\t\t\t\t\t$q .= \"$k = '\".$v.\"', \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$q = substr($q,0,-2);\n\t\t\t$q .= \" WHERE \".$this->sqlpk($this->getPKValues());\n\t\t} else {\n\t\t\t// new object\n\t\t\t$c = $p = '';\n\t\t\t$q = 'INSERT INTO '.$this->tablename.' (';\n\t\t\tforeach($this->fields as $k => $v) {\n\t\t\t\tif(in_array($k,$this->pk)){\n\t\t\t\t\tif(!$v) { \n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$c .= \"$k,\";\n\t\t\t\tif($v == '') {\n\t\t\t\t\t$p .= \"NULL,\";\n\t\t\t\t} else {\n\t\t\t\t\t$p .= \"'$v',\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$q .= substr($c,0,-1).') VALUES ('.substr($p,0,-1).')';\n\t\t}\n\t\tif(!$this->query($q)){\n\t\t\terror_log(\"Save : query failed: $q\");\n\t\t\treturn false;\n\t\t}\n\t\t// go through values and if the primary key is an autonumber field (there can only be one) set it to the last insert id\n\t\tif(count($this->pk) == 1) {\n\t\t\t$p = reset($this->pk);\n\t\t\tif(!$this->fields[$p]) {\n\t\t\t\t$this->fields[$p] = $this->db->insert_id;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fba81c1fd998bc6273fdc4a375e42d0b", "score": "0.675658", "text": "public function save(): bool\n {\n\n try {\n $properties = array_excepts(get_object_vars($this->model), [\"table\", \"db\", \"relations\"]);\n\n if (!isset($this->model->id)) {\n $fields = implode(', ', array_keys($properties));\n $values = \":\" . implode(', :', array_keys($properties));\n $query = \"INSERT INTO {$this->model->table} ({$fields}) VALUES ({$values})\";\n\n $stmt = $this->connect($this->model->db)->prepare($query);\n return $stmt->execute($properties);\n } else {\n $fields = array_keys($properties);\n $sets = [];\n foreach ($fields as $index => $field) {\n $sets[] = \"{$field} = :{$field}\";\n }\n $setsString = implode(\", \", $sets);\n\n $query = \"UPDATE {$this->model->table} SET {$setsString} WHERE id = {$this->model->id}\";\n $stmt = $this->connect($this->model->db)->prepare($query);\n return $stmt->execute($properties);\n }\n } catch (PDOException $e) {\n if (DEBUG) dd($e->getMessage());\n return null;\n }\n }", "title": "" }, { "docid": "3e0623ae1b34d20226934c41594a2865", "score": "0.6749209", "text": "public function save() {\n\t return isset($this->id) ? $this->update() : $this->create();\t\n\t}", "title": "" }, { "docid": "7e9e258d036c4427fb68533a483edfe4", "score": "0.67441714", "text": "protected function _savePrimaryKey() {\n\t if (!empty($this->_primaryKey)) {\n\t foreach ($this->_primaryKey as $pkey) {\n\t $name = $pkey[\"name\"];\n\t $this->_oldPrimaryKey[$name] = $this->$name;\n\t }\n\t }\n\t}", "title": "" }, { "docid": "b945c1472428a4cb61d0a96e912b22f6", "score": "0.67419374", "text": "public function save()\n {\n if ($this->id == 0) {\n return $this->insert(); //new record\n } else {\n return $this->update(); //updating existing record\n }\n }", "title": "" }, { "docid": "1f1836b8900ace08d6426b119cb984b7", "score": "0.6741362", "text": "public function save(){\n if (isset($this->id) && !is_blank($this->id)) {\n return $this->update();\n } else {\n return $this->create();\n } \n }", "title": "" }, { "docid": "4101839fa58af3cf09e286f8819388e6", "score": "0.67358834", "text": "public function save()\n {\n $targetTable = $this->getDbTable();\n // The id property is the primary key for accessing database records\n $pk = $this->_model->id;\n\n $this->_model->SysMan->Logger->info('START '.$this->_className.'->save()','Common_Abstracts_Mapper');\n\n $this->_model->SysMan->Logger->info('START '.$this->_className.'->_preSave()','Common_Abstracts_Mapper');\n $this->_preSave();\n $this->_model->SysMan->Logger->info('END '.$this->_className.'->_preSave()','Common_Abstracts_Mapper');\n\n $map = $this->_map;\n $data = $this->mapModel($map);\n\n $this->_model->SysMan->Logger->info('Mapped data to save = '.print_r($data,true),'Common_Abstracts_Mapper');\n\n // remove primary key field for insert and update operations (for insert it insures return of $pk, for update modifying primary key not allowed\n if(isset($data[$targetTable->getPrimary()])){\n unset($data[$targetTable->getPrimary()]);\n }\n\n try {\n if (!is_null($pk) && $pk > 0) {\n // if id property set, then this save operation is an update\n $key = $targetTable->getPrimary();\n if(!is_array($key)){\n $where[$key.' = ?'] = $pk;\n $targetTable->update($data, $where);\n }else{\n throw new Exception('Table '.$targetTable->getName().' has more than one primary key. The '.\n $this->_className.'.save() method only accounts for one. You will need to update the abstract or override.');\n }\n } else {\n// $pkArray = $targetTable->getPrimary();\n// for($i=0;$i<=count($pkArray);$i++){\n// if(isset($data[$pkArray[$i]])){\n// unset($data[$pkArray[$i]]);\n// }\n// }\n\n // Otherwise, the data is new and should be entered into a new database table row.\n $pk = $targetTable->insert($data);\n // set the model's id to primary key for usage is postSave methods as required\n $this->_model->id = $pk;\n }\n }\n catch (Exception $e) {\n throw new Exception('Exception thrown during '.$this->_className.'->save() method: '.$e->getMessage());\n }\n\n $this->_model->SysMan->Logger->info('START '.$this->_className.'->_postSave()','Common_Abstracts_Mapper');\n $this->_postSave();\n $this->_model->SysMan->Logger->info('END '.$this->_className.'->_postSave()','Common_Abstracts_Mapper');\n\n $this->_model->SysMan->Logger->info('END '.$this->_className.'->save() complete, primary key returned = '.$pk,'Common_Abstracts_Mapper');\n\n return $pk;\n }", "title": "" }, { "docid": "249e626c89f3f931044dd4b31febfcea", "score": "0.67188376", "text": "public function save() {\n\t return isset($this->id) ? $this->update() : $this->create();\n\t}", "title": "" }, { "docid": "6aca607d0f95532931b390e748896452", "score": "0.66967404", "text": "public function save()\r\n {\r\n if (isset($this->id)) {\r\n return $this->update();\r\n }\r\n return $this->insert();\r\n }", "title": "" }, { "docid": "f4c1049d181c1bb9b68ade8f077e4b28", "score": "0.6687301", "text": "public function save() {\n $info = Model::modelInfo($this);\n $db = Model::database();\n // Get the integer id for this model's key\n $key = $db->real_escape_string($this->{$info['keyField']});\n $class = $db->real_escape_string($info['class']);\n $r = $db->query(\"SELECT keyid FROM modelkey WHERE keyvalue='$key' AND classname='$class'\");\n if (!$r) {\n throw new Exception(\"Error running query: \" . $db->error);\n }\n if ($r->num_rows == 0) {\n $db->query(\"INSERT INTO modelkey(classname, keyvalue) VALUES('$class', '$key')\");\n $id = $db->insert_id;\n } else {\n $row = $r->fetch_assoc();\n $id = $row['keyid'];\n $db->query(\"DELETE FROM model WHERE keyid='$id'\");\n $db->query(\"DELETE FROM fieldindex WHERE keyid='$id'\");\n }\n $db->query(\"INSERT INTO model VALUES($id, '\" . $db->real_escape_string(serialize($this)) . \"')\");\n foreach ($info['indexes'] as $field) {\n $db->query(\"INSERT INTO fieldindex VALUES($id, '\" . $db->real_escape_string($field) . \"', '\" . $db->real_escape_string($this->{$field}) . \"')\");\n }\n $db->close();\n }", "title": "" }, { "docid": "538dfb5b86b1cc448055e731567c43f0", "score": "0.6678621", "text": "public function saving($model)\n {\n if (! $model->isDirty('updated_by')) {\n $model->updated_by = $this->getAuthenticatedUserId();\n }\n }", "title": "" }, { "docid": "44c44f1a192b5eea8c61afac24125896", "score": "0.6668175", "text": "public function save(){\n\t\treturn isset($this->id) ? $this->update() : $this->create();\n\t}", "title": "" }, { "docid": "f53dac2829a3968eab3069d1c4f766cc", "score": "0.665158", "text": "final public function save()\n {\n if (!$this->beforeSave()) {\n return false;\n }\n\n $query = new FluentInterface();\n $primaryKey = $this->{$this->getPrimaryKey()};\n $fields = $this->getAllFields();\n if (!empty($primaryKey)) {\n unset($fields[$this->getPrimaryKey()]);\n $sql = $query\n ->update($this->getTableName())\n ->set($fields)\n ->where([[$this->getPrimaryKey() => $primaryKey]]);\n $result = $this->updateOne($sql);\n } else {\n $sql = $query\n ->insert($this->getTableName())\n ->columns(array_keys($fields))\n ->values(array_values($fields));\n $result = $this->insertOne($sql);\n }\n\n return $result == true ? $this->beforeSave() : false;\n }", "title": "" }, { "docid": "4743212941362de4614fa2f34d9b54a6", "score": "0.66414803", "text": "public function save() {\n if ($this->_model !== null) {\n return $this->_model->save();\n }\n }", "title": "" }, { "docid": "ecc3d495ce8a5ec87799afef1bcfc747", "score": "0.6640787", "text": "protected function _save()\n {\n $this->_factory()->put($this);\n }", "title": "" }, { "docid": "5ee594a74719e11a817001bf14938581", "score": "0.6637478", "text": "public function save($model);", "title": "" }, { "docid": "5ee594a74719e11a817001bf14938581", "score": "0.6637478", "text": "public function save($model);", "title": "" }, { "docid": "53e73c28e8df7f249ccec06a963fcd64", "score": "0.66071516", "text": "public function save()\n\t{\n\t\t$id = $this->getId();\n\t\tif (empty($id)) {\n\t\t\treturn $this->create();\n\t\t} else {\n\t\t\treturn $this->update();\n\t\t}\n\t}", "title": "" }, { "docid": "0d76ea0b618c821574300c39e5d57579", "score": "0.66022027", "text": "public function save()\n {\n if ($this->state === 'unset') {\n $this->insert_new();\n } else {\n $this->update_db();\n }\n }", "title": "" }, { "docid": "dc4606c48c55b1080ed125d6300e9f15", "score": "0.6599986", "text": "public function save() {\n return isset($this->id) ? $this->update() : $this->create();\n }", "title": "" }, { "docid": "317f7b8f95293bbc59ed0b2237dfd47f", "score": "0.65723234", "text": "final public function save() {\n\t\t $modelClassName = get_called_class();\n\n\t\t\t// Localize unique id column name value\n\t\t\t$uidName = $modelClassName::$uidName;\n\n\t\t\t// Check that there is a table name set\n\t\t\t$thisClassName = get_class($this);\n\t\t\t$tableName = $thisClassName::TABLE_NAME;\n\t\t\tif (empty($tableName)) { return false; }\n\n\t\t\t// Make sure there is an ID with which to save\n\t\t\tif (empty($this->data->$uidName)) { return false; }\n\n\t\t\t// Calculate whether there have been changes made to the data\n\t\t\t$diff = array_diff_assoc(\n\t\t\t\t((array) $this->data),\n\t\t\t\t((array) $this->originalData)\n\t\t\t);\n\n\t\t\t// If there are changes to be saved, continue\n\t\t\tif (count($diff) > 0) {\n\n\t\t\t\t// Start SQL statement\n\t\t\t\t$sql = \"UPDATE `{$tableName}` SET \";\n\n\t\t\t\tforeach ($this->data as $col => $value) {\n\n\t\t\t\t\t// If it isn't the ID field\n\t\t\t\t\t// (and it is different from what is originally loaded),\n\t\t\t\t\tif ($col != $uidName && $value != $this->originalData->$col) {\n\n\t\t\t\t\t\t// add it to the query\n\t\t\t\t\t\t$sql .= \"`{$col}`='\";\n\t\t\t\t\t\t$sql .= self::dbInstance()->real_escape_string($value);\n\t\t\t\t\t\t$sql .= \"', \";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t\t// Trim off the extra \", \"\n\t\t\t\t$sql = rtrim($sql,', ');\n\n\t\t\t\t// Add the where clause for ID\n\t\t\t\t$sql .= \" WHERE `{$uidName}`='{$this->data->$uidName}' LIMIT 1\";\n\n\t\t\t\tif (self::dbInstance()->query($sql)) { return true; }\n\t\t\t\telse { return false; }\n\n\t\t\t// If there aren't changes, return true\n\t\t\t} else { return true; }\n\n\n\t\t}", "title": "" }, { "docid": "8a1f4c29959c423efa9cfe6624f10217", "score": "0.65715057", "text": "public function save(): void\n {\n $this->_isNew() ?\n self::repository()->persist($this) : self::repository()->upgrade($this);\n }", "title": "" }, { "docid": "caee3671596316d7b15f16842b6796b4", "score": "0.65641785", "text": "public function save() {\n if($this->id == 0 || !isset($this->id) || $this->id == NULL) {\n return $this->create();\n }\n else {\n return $this->update();\n }\n }", "title": "" }, { "docid": "0ae63f1657688f5d01f9cf675fc99f7f", "score": "0.6563742", "text": "public function save()\n {\n if (isset($this->id)) {\n return $this->update();\n } else {\n return $this->create();\n }\n }", "title": "" }, { "docid": "5edfd65b91b2a1ff417e95a5c2ad4809", "score": "0.6561642", "text": "public function save()\n\t{\n\t\tif ($this->id)\n\t\t\t\\SQL::table($this->table)->update($this->id, $this->getDBValues());\n\t\telse\n\t\t\t\\SQL::table($this->table)->insert($this->getDBValues());\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8e3f8c81277857cd574fc44fd7c4a41f", "score": "0.6561493", "text": "public function saveAlways() {\n $table = static::$_tablename;\n $pk = static::$_pk;\n $db = $this->db;\n $id = $this->id;\n if (static::$_timestamps) {\n $this->o[\"updated_at\"] = \\Gb_String::date_iso();\n if (null === $id) {\n $this->o[\"created_at\"] = $this->o[\"updated_at\"];\n }\n }\n if (null === $id) {\n $db->insert($table, $this->o);\n $id = (int) $db->lastInsertId();\n $this->id = $id;\n $this->o[$pk] = $id;\n } else {\n $id = (int) $this->id;\n $db->update($table, $this->o, \"$pk = $id\");\n }\n\n // reload the row into the buffer\n self::_fetch($db, $id);\n\n return $this;\n }", "title": "" }, { "docid": "ccfdcf6c6584aede3bacd21822b84cd0", "score": "0.65453035", "text": "public function save()\n {\n if (is_null($this->getId())) {\n return $this->create();\n } else {\n return $this->update();\n }\n }", "title": "" }, { "docid": "69756764b4aaf0531c1cbaceddae3a11", "score": "0.651653", "text": "public function save()\n {\n return isset($this->id) ? $this->update() : $this->create();\n }", "title": "" }, { "docid": "af54a66bb26bda0d040f24dd8a5f9203", "score": "0.65140647", "text": "public function save() {\n\t\tself::getEntityManager()->persist($this);\n\t}", "title": "" }, { "docid": "872afd083c29754460eb6f5e1a61c14b", "score": "0.6509612", "text": "public function save()\n {\n // set date\n if (!(int)$this->getId()) {\n $this->getResource()->create();\n }\n $this->update();\n }", "title": "" }, { "docid": "90233515af83bb99989a4b4b79c192bb", "score": "0.6500637", "text": "protected function _save()\n {}", "title": "" }, { "docid": "2e1b0a022ee1a313aaade36c1c8938b6", "score": "0.64889514", "text": "final public function save() {\n\t\t\t// Call the \"before saving\" method, if it exists.\n\t\t\tif( $this->hasMethod( 'beforeSaving' ) ) {\n\t\t\t\t$this->beforeSaving();\n\t\t\t}\n\n\t\t\t// Result is defaulted to false\n\t\t\t$success = false;\n\n\t\t\t// If the object is new, we insert\n\t\t\tif( $this->_new ) {\n\t\t\t\t$success = self::table()->insert( parent::asArray() );\n\t\t\t\t$insert_id = intval( self::table()->database()->lastInsertId() );\n\n\t\t\t\t// Apply the incremented primary key\n\t\t\t\t$primary_key = $this->primaryKey( false );\n\t\t\t\tif( count( $primary_key ) === 1 && $insert_id !== 0 ) {\n\t\t\t\t\t$this->setValueOfProperty( $primary_key[0], $insert_id );\n\t\t\t\t}\n\n\t\t\t\t// Not new any more.\n\t\t\t\t$this->_new = ! boolval( $success );\n\t\t\t}\n\n\t\t\t// Otherwise we update\n\t\t\telse if( ( $query = $this->_selfQuery() ) !== null ) {\n\t\t\t\t$success = $query->set( parent::asArray() );\n\t\t\t}\n\n\t\t\t// Call the \"after saving\" method, if it exists.\n\t\t\tif( $this->hasMethod( 'afterSaving' ) ) {\n\t\t\t\t$this->afterSaving( $success );\n\t\t\t}\n\n\t\t\t// Return\n\t\t\treturn boolval( $success );\n\t\t}", "title": "" }, { "docid": "613f3bf68da20eba3e099fdadf5d6031", "score": "0.64837044", "text": "public function save()\n {\n if (empty($this->id)) {\n $this->insertModel();\n return $this;\n }\n\n $this->updateModel();\n return $this;\n }", "title": "" }, { "docid": "3e838a05544ef0a94d5b200d65de4e87", "score": "0.6472957", "text": "protected function save()\n {\n self::$id_map[$this->id] = $this;\n }", "title": "" }, { "docid": "e9be6829de7010ca910f3e9f05644b79", "score": "0.64692473", "text": "public function save()\n {\n if ($this->id)\n {\n $this->update();\n } else\n {\n return $this->insert();\n }\n }", "title": "" }, { "docid": "7d7990d8ff38b8fc0346b422e2f6bda2", "score": "0.6468634", "text": "public function forceSave()\n {\n $criteria = array(\n 'identity' => $this->getIdentity(),\n 'type' => $this->getType()\n );\n $fields = array(\n 'seo_text' => $this->getSeoText(),\n 'title' => $this->getTitle(),\n 'description' => $this->getDescription(),\n );\n $this->storage->upsert(self::DOMAIN, $criteria, $fields);\n\n // reset `dirty` flag\n $this->dirty = false;\n }", "title": "" }, { "docid": "d0a2bf430175b24e8a033c3534799e24", "score": "0.6467766", "text": "public function save() {\n\n\t\t$fields = $this->fields;\n\n\t\tforeach ( $fields as $key => $value ) {\n\t\t\tif ( is_bool( $value ) ) {\n\t\t\t\t$fields[ $key ] = (int) $value;\n\t\t\t}\n\t\t}\n\n\t\tif ( static::$needs_update_timestamp ) {\n\t\t\t$fields = array_merge(\n\t\t\t\t$fields, [\n\t\t\t\t\t'modified_on' => date( 'Y-m-d H:i:s' ),\n\t\t\t\t]\n\t\t\t);\n\t\t}\n\n\t\t$primary_key_column = static::$primary_key;\n\n\t\treturn EE::db()\n\t\t\t->table( static::$table )\n\t\t\t->where( $primary_key_column, $this->$primary_key_column )\n\t\t\t->update( $fields );\n\t}", "title": "" }, { "docid": "aa4a395ac590f9f92b7b612bdae6383b", "score": "0.6455469", "text": "public function save(Model &$model);", "title": "" }, { "docid": "34e62dbf388e0e4a9e10c426d927d8d1", "score": "0.64430153", "text": "public function save()\r\n {\r\n //get database connection\r\n $db = dbConn::getConnection();\r\n \r\n //run pre-hook activities\r\n $this->preHook();\r\n\r\n //create new row if id is blank\r\n if ($this->id == '')\r\n {\r\n \r\n //prepare and bind values\r\n $sql = $this->insert();\r\n \r\n //get sql statement with placeholders\r\n $statement = $db->prepare($sql);\r\n $columnValues = $this->getColumnValues();\r\n \r\n $i = 1;\r\n foreach($columnValues as $value)\r\n {\r\n $statement->bindValue($i, $value);\r\n $i++;\r\n }\r\n \r\n $statement->execute();\r\n \r\n //good practice for an orm to return id\r\n return $db->lastInsertId();\r\n } \r\n else\r\n {\r\n //run sql update\r\n $sql = $this->update();\r\n \r\n //check to see if the record you want to update exists\r\n $statement = $db->prepare($sql);\r\n $statement->execute();\r\n \r\n //good practice for an orm to return id\r\n return $this->id;\r\n }\r\n }", "title": "" }, { "docid": "46f8d12a5c38d18274d29f74df1b327d", "score": "0.6435306", "text": "public function save(Model $model)\n {\n $this->setTableNameFromModel($model);\n\n $values = implode('=?, ', array_keys($model->attributes));\n\n $values .= '=?';\n\n $this->query = \"INSERT INTO $this->table SET $values\";\n\n $this->binds = array_values($model->attributes);\n\n $this->createStatement();\n }", "title": "" }, { "docid": "75ea8742fdf05f0b8808ed9c26b744b0", "score": "0.64231974", "text": "public function save() { if ($this->id != null) {\n $this->update();\n // if we do changes delete cached file\n if (file_exists($this->getCachePath())) {\n unlink($this->getCachePath());\n }\n } else {\n $this->insert();\n }\n }", "title": "" }, { "docid": "b39c00458452dc73723fe370b3fc8928", "score": "0.6420219", "text": "public function save() {\n\t\t$this->updateColumns();\n\n\t\t$this->columns = array_filter( $this->columns );\n\n\t\tif ( empty( $this->ID ) ) {\n\t\t\treturn $this->create();\n\t\t} else {\n\t\t\treturn $this->update();\n\t\t}\n\t}", "title": "" }, { "docid": "120dfef98a434c7862f02d7fcd84c634", "score": "0.63969076", "text": "public function save()\n {\n $this->beforeSave();\n\n $queryMas = [];\n $insertMas = [];\n foreach ($this->data as $key => $value) {\n if ($key != $this->primaryKey) {\n $queryMas[$key] = '`' . $key . '` = ?';\n $insertMas[] = $value;\n }\n }\n\n if ($this->isLoaded) {\n\n $query = \"UPDATE `$this->table` SET \" . implode(', ', $queryMas)\n . \" WHERE $this->primaryKey = ?\";\n\n $statement = self::$dbh->prepare($query);\n\n array_push($insertMas, $this->data[$this->primaryKey]);\n\n $inserted = $statement->execute($insertMas);\n return $inserted;\n } else {\n $items = [];\n foreach ($this->fields as $key => $value) {\n $this->fields[$key] = \"`$value`\";\n $items[] = '?';\n }\n $query = \"INSERT INTO `$this->table` (\" . implode(\n ', ', $this->fields\n ) . \") VALUES (\" . implode(', ', $items) . \")\";\n\n $statement = self::$dbh->prepare($query);\n $inserted = $statement->execute($insertMas);\n if($inserted != false) $this->afterSave();\n return $inserted;\n }\n }", "title": "" }, { "docid": "a78c372c161ff83fcfd37dd82e6750eb", "score": "0.6390175", "text": "public function save() {\n if ($this->_data[$this->_key]) {\n return $this->update();\n } else {\n return $this->insert();\n }\n }", "title": "" }, { "docid": "528e2674cd8f7b1a1e21a945d18528e6", "score": "0.6358863", "text": "public function save() {\n $tableMeta = EQM::tableMeta(get_class($this));\n if ($tableMeta->hasAutoIncrement()) {\n if (empty($this->{$tableMeta->getAutoIncrement()})) {\n return $this->insert();\n } else {\n return $this->update();\n }\n } else {\n throw new EQMException('save() is not possible for entities without auto increment primary key', 10001);\n }\n }", "title": "" }, { "docid": "4bdda6bb1ef2be16145b8e075aa04c79", "score": "0.63586015", "text": "public function save() {\n $this->merge();\n $this->new = FALSE;\n }", "title": "" }, { "docid": "603d0b895e854b9e4535ae55b2cc655d", "score": "0.6352445", "text": "protected function _save(){\n \tforeach ($this->_intfields as $int){ \n\t \t$this->_attr[$int] = str_replace(',', '.', $this->_attr[$int]);\n \t}\n \tforeach ($this->_attr as $key => $value){\n \t\t\n \t\t// Make sure all fields default to default db value if they are empty\n \t\tif (!isset($value) || is_null($value) || strlen($value) == 0){\n \t\t\t$this->_attr[$key] = $this->_defaults[$key];\n \t\t}\n \t\tif (!is_null($value)){\n\t \t\t// Let's make date fields the right format for mysql\n\t \t\tif (in_array($key, $this->_dateFields)){\n\t \t\t\tif (is_object($value) && get_class($value) == 'Zend_Date'){\n\t\t \t\t\t$this->_attr[$key] = $value->get(Zend_Date::ISO_8601);\n\t\t \t\t} else {\n\t\t \t\t\t// Fallback if something goes awry\n\t\t \t\t\tif (is_numeric($value)){\n\t\t \t\t\t\t$zDate = new Zend_Date($value, Zend_Date::TIMESTAMP);\n\t\t \t\t\t} else {\n\t\t \t\t\t\t$zDate = new Zend_Date($value, Zend_Date::ISO_8601);\n\t\t \t\t\t}\n\t\t \t\t\t$this->_attr[trim($key)] = $zDate->get(Zend_Date::ISO_8601);\n\t\t \t\t}\n\t \t\t}\n\t \t}\n \t}\n\n \tif ($this->isNew()){\n \t\t$this->_dbTable->insert($this->_attr);\n \t\t$id = $this->loadLastId();\n \t} else {\n\t\t\t$where = $this->_dbTable->getAdapter()->quoteInto($this->_primaryKey . ' = ?', $this->getId());\n \t\t$this->_dbTable->getAdapter()->update($this->_name, $this->_attr, $where);\n \t}\n }", "title": "" }, { "docid": "b4a227d8c86248bfc0c6f4a28f77484f", "score": "0.6347172", "text": "public function save()\n {\n $this->getMapper()->save($this);\n }", "title": "" }, { "docid": "996df64887129fa118f3e0961a5681a6", "score": "0.63377666", "text": "public function save() {}", "title": "" }, { "docid": "996df64887129fa118f3e0961a5681a6", "score": "0.63377666", "text": "public function save() {}", "title": "" }, { "docid": "996df64887129fa118f3e0961a5681a6", "score": "0.63377666", "text": "public function save() {}", "title": "" }, { "docid": "5869c486b59a112fde7853cee2c312de", "score": "0.6304601", "text": "function Save(){\n $rowsAffected = 0;\n if(isset($this->id)){\n $rowsAffected = $this->UpdateSQL([\"id = \".$this->id]);\n }else{\n $rowsAffected = $this->InsertSQL();\n if($rowsAffected > 0){\n $this->id = $this->Max(\"id\");\n }\n }\n if($rowsAffected == 0){\n throw new \\Exception(\"Error al guardar Materia\");\n }else{\n $this->Refresh();\n }\n }", "title": "" }, { "docid": "05211578e034c073e3d0d4c9260a6a1c", "score": "0.6300971", "text": "public function save() {\n if (! $this->beforeSave()) return false;\n\n $value_of = [];\n\n if (empty($this->id)) {\n\n if (! $this->beforeInsert()) return false;\n\n $columns = $this->getColumns();\n\n // Escape and format for SQL insert query\n // @todo check if we like this new method of escaping and defaulting\n foreach ($columns as $column) {\n // Make sure we don't try to add \"id\" field;\n if ($column === 'id') {\n continue;\n }\n\n if (!empty($this->$column) || is_numeric($this->$column)) { // Do include 0 as value\n $value_of[$column] = self::$__CONN__->quote($this->$column);\n }\n elseif (isset($this->$column)) { // Properly fallback to the default column value instead of relying on an empty string\n // SQLite can't handle the DEFAULT value\n if (self::$__CONN__->getAttribute(PDO::ATTR_DRIVER_NAME) != 'sqlite') {\n $value_of[$column] = 'DEFAULT';\n }\n }\n }\n\n $sql = 'INSERT INTO ' . self::tableNameFromClassName(get_class($this)) . ' ('\n . implode(', ', array_keys($value_of)) . ') VALUES (' . implode(', ', array_values($value_of)) . ')';\n $return = self::$__CONN__->exec($sql) !== false;\n $this->id = self::lastInsertId();\n\n if (! $this->afterInsert()) return false;\n\n } else {\n\n if (! $this->beforeUpdate()) return false;\n\n $columns = $this->getColumns();\n\n // Escape and format for SQL update query\n foreach ($columns as $column) {\n if (!empty($this->$column) || is_numeric($this->$column)) { // Do include 0 as value\n $value_of[$column] = $column . '=' . self::$__CONN__->quote($this->$column);\n }\n elseif (isset($this->$column)) { // Properly fallback to the default column value instead of relying on an empty string\n // SQLite can't handle the DEFAULT value\n if (self::$__CONN__->getAttribute(PDO::ATTR_DRIVER_NAME) != 'sqlite') {\n $value_of[$column] = $column . '=DEFAULT';\n }\n else{\n //Since DEFAULT values don't work in SQLite empty strings should be passed explicitly\n $value_of[$column] = $column . \"=''\";\n }\n }\n }\n\n unset($value_of['id']);\n\n $sql = 'UPDATE ' . self::tableNameFromClassName(get_class($this)) . ' SET '\n . implode(', ', $value_of) . ' WHERE id = ' . $this->id;\n $return = self::$__CONN__->exec($sql) !== false;\n\n if (! $this->afterUpdate()) return false;\n }\n\n self::logQuery($sql);\n\n if (! $this->afterSave()) return false;\n\n return $return;\n }", "title": "" }, { "docid": "11b83c85344ce759b7a5e76dfaade348", "score": "0.62962663", "text": "abstract public function saveToDb($new_if_no_id=true);", "title": "" }, { "docid": "d1081177b56ae98a62f2666970da47d2", "score": "0.6289426", "text": "public function save() {\n\n\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'post_id' => $this->postId,\n 'user_id' => $this->userId\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "title": "" }, { "docid": "d06441a0484300016d4d8956531d7632", "score": "0.62829506", "text": "public function save(){\r\n\t\tif($this->id){\r\n\t\t\t$where = $this->getAdapter()->quoteInto('id = ?', $this->id);\r\n\t\t\t$this->update($this->scheduleData,$where);\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$this->id = $this->insert($this->scheduleData);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "97751e3497987e83d93f6ffa25fcff43", "score": "0.6275321", "text": "public function Save(): void {\n if($this->ID !== null) {\n Expression::Update(static::Table)\n ->SetIf([\n \"X\" => [$this->XChanged => $this->X],\n \"Y\" => [$this->YChanged => $this->Y]\n ])\n ->Where([\"ID\" => $this->ID])\n ->Execute();\n } else {\n $this->ID = Expression::Insert()\n ->Into(static::Table)\n ->Values([\n \"ID\" => null,\n \"Owner\" => $this->Owner,\n \"Element\" => $this->Element,\n \"X\" => $this->X,\n \"Y\" => $this->Y\n ])\n ->ID();\n }\n }", "title": "" }, { "docid": "7c597e36f72b5256f863e46d02241d6e", "score": "0.626956", "text": "function afterSave($Model, $created, $primary = false) {\n\t\tif ($created) {\n\t\t\t$this->id($Model, $Model->id, true);\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fb6782d4d434270c092200aa9359b85c", "score": "0.6260737", "text": "public function save() {\n if (!$this->validate()) {\n return false;\n }\n if ($this->isNewRecord()) {\n return $this->insert();\n } else {\n return $this->update();\n }\n }", "title": "" }, { "docid": "3def409823614f2eb4d953481d8d6d42", "score": "0.62518966", "text": "public function save() {\n\n $this->get(\"id\") ? $this->_update() : $this->_create();\n return $this;\n\n }", "title": "" }, { "docid": "a36d92bd0a6657dd8aeb56cd593a4527", "score": "0.62455404", "text": "public function save(\\Stafleu\\Models\\Model $model)\n {\n $data = $model->toArray();\n foreach ( $data as $key => $value ) {\n if ( is_array($value) ) {\n unset($data[$key]);\n }\n } // foreach\n\n $success = $model->getId();\n $id = $model->getId();\n if ( empty($id) ) {\n unset($data['id']);\n $this->getDbTable()->insert($data);\n } else {\n $this->getDbTable()->update($data, array('id = ?' => $id));\n }\n\n return $model;\n }", "title": "" }, { "docid": "40f79678b441d469b77366348c4aeff1", "score": "0.62413216", "text": "public function save($inTransaction = false) {\n\n try {\n\n $primaryKey = $this->metadata->getPrimaryKey();\n\n foreach ($this->metadata->getBelongsToRelations() as $property => $model) {\n\n if ($this->model->$property !== null) {\n\n $metadata = MetadataStorage::get($model);\n $value = $this->model->$property->{$metadata->getPrimaryKey()};\n $this->model->{$this->metadata->getForeignKey($model)} = $value;\n }\n }\n\n $values = $this->getValues(true);\n\n if (! empty($values)) {\n\n if (! $inTransaction) $this->db->beginTransaction();\n\n if ($this->model->$primaryKey) {\n\n $sql = $this->builder->update(\n $this->metadata->getTable(),\n $this->metadata->getColumns(true),\n $primaryKey\n );\n\n $values[] = $this->model->$primaryKey;\n\n Database::execute($sql, $values);\n }\n else {\n\n $sql = $this->builder->insert(\n $this->metadata->getTable(),\n $this->metadata->getColumns(true)\n );\n\n Database::execute($sql, $values);\n\n $sequence = '';\n\n if (Database::getDriver() === 'pgsql') {\n\n $sequence = sprintf('%s_%s_seq',\n $this->metadata->getTable(),\n $primaryKey\n );\n }\n\n $this->model->$primaryKey = $this->db->lastInsertId($sequence);\n }\n\n if (! $inTransaction) $this->db->commit();\n }\n }\n catch (\\PDOException $e) {\n\n $this->db->rollback();\n throw new DatabaseException($e->getMessage());\n }\n }", "title": "" }, { "docid": "102eb8f0fcb912b6a13ef3c8c5932dea", "score": "0.62307173", "text": "public function save(): void\n {\n if ($this->tableName !== '') {\n $saveData = [\n 'name' => $this->name,\n 'alternate' => $this->alternate,\n 'type' => $this->type,\n ];\n if ($this->id === null) {\n $this->db->saveArray($this->tableName, $saveData);\n } else {\n $this->db->saveArray($this->tableName, $saveData, $this->id);\n }\n }\n }", "title": "" }, { "docid": "12c4a09ddf02c7d0e89194cc79aebbcd", "score": "0.6229557", "text": "public function save($model) {\n return parent::save($model);\n }", "title": "" }, { "docid": "283e19b743966e54aaba58a32bbe11f7", "score": "0.62212807", "text": "static function save($model);", "title": "" }, { "docid": "331cc381c4aeaabbad7d09b020fde804", "score": "0.62141967", "text": "public function save ()\n {\n $this->getMapper()->save($this);\n }", "title": "" }, { "docid": "812f16febcf192c2e6f0e8311166afd3", "score": "0.6212061", "text": "public static function save ()\n {\n if ( ! self::exists() ) \n {\n return SaveEntity::executeInsertQuery( self::$properties, self::getTableName(), 'id');\n }\n else\n {\n return SaveEntity::executeUpdateQuery( self::$properties, self::getTableName(), 'id');\n }\n }", "title": "" }, { "docid": "1dd7e0b3073eeee13293ba6d91227af4", "score": "0.62116385", "text": "protected function _preSave() {}", "title": "" }, { "docid": "be127e3f86ef08400d9ee12e153df456", "score": "0.62109005", "text": "public function save() {\n\t\tif ( $this->data_store ) {\n\t\t\t// Trigger action before saving to the DB. Use a pointer to adjust object props before save.\n\t\t\tdo_action( 'uni_cpo_before_' . $this->object_type . '_object_save', $this, $this->data_store );\n\n\t\t\tif ( $this->get_id() ) {\n\t\t\t\t$this->data_store->update( $this );\n\t\t\t} else {\n\t\t\t\t$this->data_store->create( $this );\n\t\t\t}\n\t\t\treturn $this->get_id();\n\t\t}\n\t}", "title": "" }, { "docid": "c0ce333658a3a0d274a44d9dc6af2566", "score": "0.6204152", "text": "public function save() {\n\n $data = array(\n 'name' => $this->getName(),\n 'email' => $this->getEmail(),\n 'phone' => $this->getPhone(),\n 'speciality' => $this->getSpeciality(),\n 'zipcode'=> $this->getZipcode(),\n 'status'=> $this->getStatus()\n );\n\n if (null === ($id = $this->getId())) {\n unset($data['id']);\n $data['status'] = 0;\n return $this->getMapper()->getDbTable()->insert($data);\n } else {\n $data['status'] = $this->getStatus();\n return $this->getMapper()->getDbTable()->update($data, array('id = ?' => $id));\n }\n\n }", "title": "" }, { "docid": "1d5107890aee63c60831185fa4e9a6de", "score": "0.62021303", "text": "public function save(){\n //Just a convinience function...\n //instead of calling create or update we just call save and let this line of code figure it out.\n \n //This also prevents recreating users by mistake\n return isset($this->id) ? $this->update() : $this->create(); \n }", "title": "" }, { "docid": "f7a4dec72a96a39c257fd661b747e7e8", "score": "0.61951995", "text": "public function save() {\n\t\t$result = false;\n\n\t\tif (isset($this->id) and $this->id > 0) {\n\t\t\t$result = DatabaseController::update($this);\n\t\t} else {\n\t\t\t$this->id = DatabaseController::insert($this);\n\t\t\t\n\t\t\tif($this->id > 0) $result = true;\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "bca700cf0a5b047a586049387ca8c63d", "score": "0.6194905", "text": "public function saved($model)\n\t{\n\n\t}", "title": "" }, { "docid": "c5b6cdad9b4f94210cab2ad0e6dc31a1", "score": "0.61944216", "text": "public function fillAndSave(Model $model, array $attributes = []);", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.61936826", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.61936826", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.61936826", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.61936826", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.61936826", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.61936826", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.61936826", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.61936826", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.61936826", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.61936826", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.61936826", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.61936826", "text": "public function save();", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "68d54d875c30e7b9e3d57012abe241cd", "score": "0.0", "text": "public function store(Request $request)\n {\n $request->validate([\n 'title' => 'required',\n 'notice_category_id' => 'required'\n ]);\n\n $notice = new Notice();\n $notice->title = $request->input('title');\n $notice->slug = strtolower(str_replace(\" \",\"-\", $notice->title));\n $notice->notice_category_id = $request->input('notice_category_id');\n if($request->hasFile('avatar')){\n $notice->avatar = explode(\"/\", $request->avatar->store('public/notices/avatars'))[3];\n }else{\n $notice->avatar = NULL;\n }\n $notice->status = $request->input('status');\n $notice->user_id = Auth::user()->id;\n $notice->content = $request->input('content');\n $notice->club_id = $request->input('club_id');\n $notice->save();\n\n $notice_tags = [];\n $cont = 0;\n foreach ($request->input('tags') as $tag) {\n $notice_tags[$cont]['notice_id'] = $notice->id;\n $notice_tags[$cont]['tag_id'] = $tag;\n $cont++;\n }\n\n $notice->tags()->attach($notice_tags);\n\n flash()->overlay('Registro Insertado con Exito!!', 'Alerta!!');\n\n return redirect()->route('notices.index');\n }", "title": "" } ]
[ { "docid": "dcb5d67c26376fd57a5dc3977e13979f", "score": "0.720747", "text": "public function store(Resource $resource, $tempResource);", "title": "" }, { "docid": "29f523253fa183bb58e06565b71660d4", "score": "0.70471525", "text": "public function store(ResourceStoreRequest $request)\n {\n $input = $request->all();\n $input['is_facility'] = $request->has('is_facility');\n\n $resource = Resource::create($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n flash('Resource \"'.$resource->name.'\" was created');\n\n return ($backUrl = session()->get('index-referer-url'))\n ? redirect()->to($backUrl)\n : redirect('/resources');\n }", "title": "" }, { "docid": "43692f9286169160bb1c60a601ad98b5", "score": "0.679025", "text": "protected function storeResources()\n {\n $resources = $this->resources(['format' => 'json']);\n $this->resourceRepo->put($resources);\n }", "title": "" }, { "docid": "414a41005fac4c5124023387fb0ac54f", "score": "0.6786136", "text": "public function store(ResourceStoreRequest $request)\n {\n $resource = Resource::create($request->all());\n $resource->groups()->sync($request->get('groups'));\n\n flash('Resource was created');\n\n return redirect('/resources');\n }", "title": "" }, { "docid": "c8211f121a8daac5ecd303e9a47b19e5", "score": "0.67509526", "text": "public function store(ResourceStoreRequest $request)\n {\n $this->data->resource = Resource::create($request->all());\n return $this->json();\n }", "title": "" }, { "docid": "2550c05736a0d6808eb726ba834a3af7", "score": "0.6565381", "text": "public function save()\n {\n if ($id = Input::get('id')) {\n $storage = Storage::find($id);\n }\n\n // Validation\n $validator = Validator::make($data = Input::all(), Storage::$rules);\n\n // Check if the form validates with success.\n if ($validator->passes()) {\n // Own?\n if (isset($storage) && $storage->isMine()) {\n // Save model\n $storage->update($data);\n // Message\n Flash::success('Storage saved successfully');\n } else {\n // Create model\n $storage = new Storage($data);\n // Asociate to current user\n Auth::user()->storages()->save($storage);\n // Message\n Flash::success('Storage created successfully');\n }\n\n // Redirect to resource list\n return Redirect::route('storages.index');\n }\n\n // Something went wrong\n return Redirect::back()->withErrors($validator)->withInput(Input::all());\n }", "title": "" }, { "docid": "ec6d262da21079d4f1969481774027a6", "score": "0.6557738", "text": "public function store(ResourceStoreRequest $request)\n {\n ResourceResource::withoutWrapping();\n\n $input = $request->all();\n\n $resource = Resource::create($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n return (new ResourceResource($resource))\n ->response()\n ->setStatusCode(201);\n }", "title": "" }, { "docid": "c47832a35d324942b82c153c36e19205", "score": "0.6529359", "text": "public function create($storage = null);", "title": "" }, { "docid": "7a008e03ec51a0b31adc684eaf2fd916", "score": "0.651324", "text": "public function store(CreateStorageAPIRequest $request)\n {\n $input = $request->all();\n\n $storages = $this->storageRepository->create($input);\n\n return $this->sendResponse($storages->toArray(), 'Storage saved successfully');\n }", "title": "" }, { "docid": "c8c10c69f24ff56f5e9054d0271d55ee", "score": "0.64884007", "text": "protected function store()\n {\n if (!$this->id) {\n $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "98fadc36fd3a4194a25023de21dae9ff", "score": "0.6428514", "text": "public function save($resource);", "title": "" }, { "docid": "fa129c22fa10de6d1193110a7112a319", "score": "0.64097387", "text": "public function store(StoreResourceRequest $request)\n {\n $resource = new resource();\n $user = $request->user();\n if (!!$user->resources\n ->where('resource_name', $request->get('resource_name'))\n ->where('path', $request->get('path'))\n ->where('trashed', false)->count()) {\n throw ValidationException::withMessages([\n \"resource\" => [\"400006\"],\n ])->status(400);\n }\n $resource->resource_name = $request->get('resource_name');\n $resource->file = false;\n $resource->path = $request->get('path');\n if (!$resource->save()) {\n throw ValidationException::withMessages([\n \"resource\" => [\"500001\"],\n ])->status(500);\n }\n $user->resources()->attach($resource->id);\n\n return new ResourceResource(Resource::find($resource->id));\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "5ca3b168620bb43c8e426b5b5e9b4164", "score": "0.6365236", "text": "public function store(Request $request)\n {\n $resource = new Resource;\n\n $resource->name = $request->name;\n $resource->description = $request->description;\n \n\n $resource->save();\n return redirect()->route('resources.show', [$resource->id]);\n }", "title": "" }, { "docid": "27c4a631f3e680f007d86149d1c453b3", "score": "0.6359224", "text": "private function store()\n\t{\n\t\t// Store the instance\n\t\t_MyCache::set($this->getServer(), $this->generateKey(), json_encode($this->aRecord));\n\n\t\t// Reset the changed flag\n\t\t$this->bChanged\t= false;\n\t}", "title": "" }, { "docid": "508f9936cc069ee7a710b93d12ee1beb", "score": "0.63469714", "text": "public function create(IResource $resource);", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
917c10d3ba350ecb224040f1705f458f
Handle the size "deleted" event.
[ { "docid": "0d64a162b877ea309121d562888f2f6f", "score": "0.66226083", "text": "public function deleted(Size $size)\n {\n activity('Art Component')\n ->causedBy(Auth::user()->id)\n ->withProperties(['name' => $size->name])\n ->log('Art size component deleted successfully.');\n }", "title": "" } ]
[ { "docid": "43d78f1651159b4e94fdc3bb64d5baef", "score": "0.69415385", "text": "public function forceDeleted(Size $size)\n {\n //\n }", "title": "" }, { "docid": "3a30091c8eea4344952f976b70d30024", "score": "0.6164379", "text": "public function deleted()\n {\n // do something after delete\n }", "title": "" }, { "docid": "3d2afd1e5718f932bb6733183fb0c33c", "score": "0.60278624", "text": "public function afterDelete(CakeEvent $event) {\n\n\t}", "title": "" }, { "docid": "97c05e0f6d4d7d3df99fea9422004e77", "score": "0.60268396", "text": "public function afterDelete($event)\n {\n $this->deleteFile();\n }", "title": "" }, { "docid": "94fe47e659838fe320d0660175f5bc0e", "score": "0.6010361", "text": "protected function afterDeletion() {}", "title": "" }, { "docid": "7b06581fbcd17e2ac7e051c40a5db15d", "score": "0.59890974", "text": "protected function onBeforeDelete() { parent::onBeforeDelete(); }", "title": "" }, { "docid": "0074d4cb0a33699931696c736a951d71", "score": "0.59697723", "text": "public function deleteAction(Request $request, Size $size) {\n $form = $this->createDeleteForm($size);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n try {\n $em->remove($size);\n $em->flush();\n } catch (DBALException $e) {\n return $this->render('error-delete.html.twig', array('error' => $e->getMessage()));\n }\n }\n\n return $this->redirectToRoute('backoffice_size_index');\n }", "title": "" }, { "docid": "d7e0642edb1830a8d8d23ea607982c27", "score": "0.5957809", "text": "public function awaitStorageBucketDeleted(ContextInterface $ctx): StorageBucketDeletedEvent;", "title": "" }, { "docid": "f5605df89d7bb278b57efae006e570c6", "score": "0.5876678", "text": "public function afterDelete()\n {\n $this->trigger(self::EVENT_AFTER_DELETE);\n }", "title": "" }, { "docid": "ee656798b77eb78a1f492363b4acdaeb", "score": "0.58699816", "text": "public function forceDeleted(Event $event)\n {\n //\n }", "title": "" }, { "docid": "80b67e1f67d2c1d1aacf7a2eeb34da41", "score": "0.58511627", "text": "public function destroy(Size $size)\n {\n //\n }", "title": "" }, { "docid": "32ceeec977e7360defaa8eee9924d182", "score": "0.5848695", "text": "public function onIndexDelete(IndexDeleteEvent $event)\n {\n $query = $this->em->createQuery(\n 'DELETE SumoCodersFrameworkSearchBundle:IndexItem i\n WHERE i.otherId = :id AND i.objectType = :objectType'\n )->setParameter('id', $event->getOtherId())\n ->setParameter('objectType', $event->getObjectType());\n $query->getResult();\n }", "title": "" }, { "docid": "5f4ff169129a5a9785c78e4b9c9af50e", "score": "0.5815976", "text": "public static function onSpaceDelete($event)\n {\n\n foreach (Content::model()->findAllByAttributes(array('space_id' => $event->sender->id, 'object_model' => 'Activity')) as $content) {\n $content->delete();\n }\n }", "title": "" }, { "docid": "0d6cbcc632e629df3cb688a61b120ac0", "score": "0.5807652", "text": "public static function onAfterDelete(Main\\Entity\\Event $event)\n\t{\n\t\tstatic::clearCache();\n\t}", "title": "" }, { "docid": "de4380260011baa3a49954167b8d8b0b", "score": "0.5798778", "text": "public function trashSize($id){\n Size::find($id)->delete();\n Session::flash('msg', 'Data has been delete!' );\n return response()->json([\n 'status' => 'success',\n 'msg' => 'Size has been deleted'\n ]);\n }", "title": "" }, { "docid": "56fe231e4dfe92b3025d4154915d2a53", "score": "0.5788183", "text": "public function onDeletedEvent(Closure $callback){\n\t\t$this->registerActions('deleted',$callback);\n\t}", "title": "" }, { "docid": "a0caa105f4baab0230aa4ea28f30644f", "score": "0.5775049", "text": "public function onDelete(class_module_messaging_message $objMessage) {\n\n }", "title": "" }, { "docid": "ef9696e8f633264444bb36d58ae4f3e4", "score": "0.5773313", "text": "public function deleteSize($id,Request $request){\n $Sizes = ProductSizes::find(base64_decode($id)); \n if($Sizes)\n\t\t\t$Sizes->delete();\t\n\t\t\t\t\t\t\t\n\t\t\\Session::flash('alert-success', 'Size deleted successfully');\n return redirect()->route(\"sizeList\"); \n \n\n }", "title": "" }, { "docid": "b4e8db9f5a523766fb47733ad2726e54", "score": "0.57410717", "text": "public function afterDelete()\n {\n }", "title": "" }, { "docid": "b1edaaf9ad5f0d6252365cb17a09666b", "score": "0.57292396", "text": "public function destroy($size)\n {\n Sizes::find($size)->delete();\n return redirect(route('size.index',['SID' => '204']));\n }", "title": "" }, { "docid": "e8a60bbad5c59385a076fb8d505d871f", "score": "0.57259405", "text": "public function deleted()\n {\n //Log::info('observe model deleted');\n self::updateCacheStatus();\n }", "title": "" }, { "docid": "69938d257b7b2f67559be69cc2b4ad45", "score": "0.5712654", "text": "public function deleted(EntryInterface $entry)\n {\n $this->commands->dispatch(new DeleteTypeStream($entry));\n\n parent::deleted($entry);\n }", "title": "" }, { "docid": "e286d54f6728fc24d5d477d44d6424c0", "score": "0.571098", "text": "public function beforeDelete(CakeEvent $event) {\n\n\t}", "title": "" }, { "docid": "f97f3a88480ab874a5c3b0f0e02d0c90", "score": "0.5689447", "text": "protected function afterDelete(&$Entity) {}", "title": "" }, { "docid": "0bdcc0ed245eb4fa497e6aa55bbb518d", "score": "0.56816655", "text": "protected function onDelete(): Delete\n {\n }", "title": "" }, { "docid": "a443887e390605b2ef168c8e76860c14", "score": "0.567928", "text": "public function sortableDeleted()\n {\n $this->decrementAbovePosition();\n }", "title": "" }, { "docid": "a50217d315184108f90eb059b0b083f5", "score": "0.56668824", "text": "abstract public static function deleted($callback);", "title": "" }, { "docid": "a50217d315184108f90eb059b0b083f5", "score": "0.56668824", "text": "abstract public static function deleted($callback);", "title": "" }, { "docid": "3ac1d552bb6d88d6b6c67ce8e467cdf3", "score": "0.5647614", "text": "public function onArticleDeleted($id)\n\t{\n\t}", "title": "" }, { "docid": "bcdf1f7c118fca73434ae34f0d429ced", "score": "0.564455", "text": "public function delete(Request $request, $id)\n {\n \n // echo $id;\n $model=Size::find($id);\n $model->delete();\n \n $request->session()->flash('message','Size Deleted');\n return redirect('admin/size');\n }", "title": "" }, { "docid": "6e7508a55b8256857e06b54ae1216f3b", "score": "0.5644498", "text": "public function onDeleted()\n {\n // Get the directory of an output\n if (($sources = (array) $this->outputs) // Convert sources to an array\n && count($sources) // If there are sources\n && ($first = array_pop($sources)) // Get the last source\n && preg_match('#^/(?!/)#', $first) // Make sure it's a local path\n && ($dir = public_path().dirname($first)) // Get the path of the filename\n && is_dir($dir)) { // Make sure it's a directory\n File::deleteDir($dir);\n }\n }", "title": "" }, { "docid": "e49e5dfdcf45615989b0d97fc4a7eccf", "score": "0.5634838", "text": "public static function deleted($callback)\n {\n static::registerModelEvent('deleted', $callback);\n }", "title": "" }, { "docid": "56ef7c20f77ab2bc2806d06e5342a95d", "score": "0.56250244", "text": "public static function onContentDelete($event)\n {\n\n foreach (models\\Comment::find()->where(['object_model' => $event->sender->className(), 'object_id' => $event->sender->id])->all() as $comment) {\n $comment->delete();\n }\n }", "title": "" }, { "docid": "640ae7be141a30291f6118aaf9161917", "score": "0.56022674", "text": "function afterDelete(){\r\n\t\t\r\n\t}", "title": "" }, { "docid": "8082d34bc6df401aca32bf51340bf9e0", "score": "0.56011724", "text": "public function onDelete(){\n\t\tif($this->getImageAbsolutePath() !== null){\n\t\t\tunlink($this->getImageAbsolutePath());\n\t\t}\n\t}", "title": "" }, { "docid": "11356d2867cd7ea513edcf2081c6dd4e", "score": "0.55997115", "text": "public function afterDelete(){\n // TODO: Implement afterDelete() method.\n }", "title": "" }, { "docid": "75bb58106b70092f5ae163e67933f76e", "score": "0.558697", "text": "public function onAfterDelete()\n {\n parent::onAfterDelete();\n $client = $this->s3Facade->setupS3Client();\n $bucket = $this->s3Facade->getBucket();\n $key = $this->owner->getFilename();\n $objExists = $client->doesObjectExist($bucket, $key);\n if ($objExists) {\n $deleteInfo = array(\n 'Bucket' => $bucket,\n 'Key' => $key,\n );\n try {\n //Check if file has changed, and update if that's the case\n $client->deleteObject($deleteInfo);\n $this->s3Facade->InvalidateCache($key);\n } catch (\\Aws\\S3\\Exception\\S3Exception $e) {\n SS_Log::log($e->getMessage(), SS_Log::ERR);\n } catch (\\Aws\\CloudFront\\Exception\\CloudFrontException $e) {\n SS_Log::log($e->getMessage(), SS_Log::ERR);\n }\n }\n }", "title": "" }, { "docid": "68b060e7c3d5c2939455ce04a69cdaff", "score": "0.55844223", "text": "protected function beforeDeletion() {}", "title": "" }, { "docid": "baee0d9411eeaa1e430c6625c3d07f1d", "score": "0.558099", "text": "protected function processDeletedObjects() {}", "title": "" }, { "docid": "f809c75ef685431bdea88cc77fe1aadf", "score": "0.55485415", "text": "public function deleting()\n {\n // do something before delete\n }", "title": "" }, { "docid": "730e853703840ecb1eca69fd68782a24", "score": "0.5542098", "text": "public static function onContentDelete($event)\n {\n\n foreach (Comment::model()->findAllByAttributes(array('object_model' => get_class($event->sender), 'object_id' => $event->sender->id)) as $comment) {\n $comment->delete();\n }\n }", "title": "" }, { "docid": "8d6230cdb788d15493873d253ff6ca6f", "score": "0.5508742", "text": "public function __onDelete()\n {\n //add code here\n\n }", "title": "" }, { "docid": "4e65a1478abb04abf90fa1580b8964f5", "score": "0.5501282", "text": "public function onDelete($id)\n {\n }", "title": "" }, { "docid": "4e65a1478abb04abf90fa1580b8964f5", "score": "0.5501282", "text": "public function onDelete($id)\n {\n }", "title": "" }, { "docid": "0126b8d6aa9cceac689c7e4e8aea789b", "score": "0.54912406", "text": "public function deleted(Event $event)\n {\n Log::info('Marked an Event as deleted', [\n 'id' => $event->id\n ]);\n }", "title": "" }, { "docid": "6b166d0f4bc05926f60f5c3bfe6b9276", "score": "0.5489142", "text": "public function testOnFlushInterceptsDeleteRequest(): void\n {\n // Create entity manager\n $entityManager = $this->getDoctrineEntityManager();\n\n // Add entity to manager\n $entity = new EntityStub();\n $entityManager->persist($entity);\n $entityManager->flush();\n\n // Remove entity (softly)\n $entityManager->remove($entity);\n\n // Ensure the remove hasn't set deletedAt\n self::assertFalse($entity->isDeleted());\n\n // Call flush\n $this->createInstance()->onFlush(new OnFlushEventArgs($entityManager));\n\n // Check entity deletedAt has been set\n self::assertTrue($entity->isDeleted());\n }", "title": "" }, { "docid": "4f790b97fd626ab187e719b626abdab0", "score": "0.5475282", "text": "public function onDelete(): string;", "title": "" }, { "docid": "4a039af634b9039dd7ae9980dbadd2f8", "score": "0.5472194", "text": "public static function deleteSize($id) {\n\t\treturn self::_getDao()->delete(intval($id));\n\t}", "title": "" }, { "docid": "80a5caaeb753dde801b493f9e213762c", "score": "0.54704636", "text": "public function afterDelete(CakeEvent $event) {\n\t\tDebugTimer::stop('Event: Crud.Delete');\n\t}", "title": "" }, { "docid": "5569d2c266d6175c83b2dcb638036d91", "score": "0.5455571", "text": "public function diskSizeAction(): void{\n global $cfg;\n exec('df -h',$data);\n\n $data = array_filter($data,static function($v){\n return mb_strpos($v,'/dev/loop')===false;\n });\n $out = implode(PHP_EOL,$data);\n if (preg_match('/([9]\\d|100)%/u',$out)) {\n Terminal::logError('Some drive almost filled!');\n // send notification here\n } else {\n Terminal::log('Free space enough on all drives');\n }\n }", "title": "" }, { "docid": "787791e67371c9c193397962a6845c3d", "score": "0.5449101", "text": "public static function onDelete(Main\\Entity\\Event $event)\n\t{\n\t\tif (!static::isAllowedClearCache())\n\t\t\treturn;\n\t\t$rule = static::getList(array(\n\t\t\t'select' => array('ID', 'CATALOG_GROUP_ID'),\n\t\t\t'filter' => array('=ID' => $event->getParameter('id'))\n\t\t))->fetch();\n\t\tif (!empty($rule))\n\t\t\tself::$priceTypeIds[$rule['CATALOG_GROUP_ID']] = $rule['CATALOG_GROUP_ID'];\n\t\tunset($rule);\n\t}", "title": "" }, { "docid": "4230ffe5caa0b1fe0956b786f0132b94", "score": "0.5447085", "text": "public function onDeleted($consumer, $interaction, $hash)\n {\n // Remove from database (safely)\n Interaction::remove($interaction['interaction']['id']);\n }", "title": "" }, { "docid": "b77faa2cba7003b76349a290df2c0c52", "score": "0.543758", "text": "public function deleted(Stat $stat)\n {\n //\n }", "title": "" }, { "docid": "40a9e19d2b3307638d796bec58865841", "score": "0.5434979", "text": "public function destroySize($id)\n {\n if (ViewHelper::universalHasPermission(array(34)) == false) {\n return redirect('/')->with('messageSecondary', trans('documentForm.noPermission'));\n }\n $size = InventorySize::find($id);\n if (!is_null($size)) {\n $size->delete();\n }\n\n return redirect()->back()->with('messageSecondary', trans('inventoryList.invetorySizeDeleted'));\n }", "title": "" }, { "docid": "525b5c39ec2f72506658e1d111e363c8", "score": "0.5429011", "text": "public function updated(Size $size)\n {\n //\n }", "title": "" }, { "docid": "1e6f761a1deeaa06d3f12c8644f19823", "score": "0.5427841", "text": "protected static function getOnValueDeletedEventName(): string\n\t{\n\t\treturn 'OnSalePropertyValueDeleted';\n\t}", "title": "" }, { "docid": "638082f72934b36274892973f9f4d9b9", "score": "0.5424474", "text": "public static function deleted($event) {\n\n\t\t$order = $event->getSubject();\n\n\t}", "title": "" }, { "docid": "6d536f03be02d605aa3ba08c586c08aa", "score": "0.5422368", "text": "abstract function processDelete();", "title": "" }, { "docid": "88696861d2434f39ac2283183aed56df", "score": "0.54201454", "text": "public function onDeleted($event, $model)\n {\n if (!$this->isEncodable($model)) {\n return;\n }\n\n $model->deleteEncodings();\n }", "title": "" }, { "docid": "d06c113c321708d3df404dc046b4a140", "score": "0.5413067", "text": "protected function onDelete(&$data)\n {\n if ($this->deleteFile) {\n $file = sy_get_param($data, $this->getFieldName());\n\n if (!empty($file)) {\n $this->getThumbComponent($file)->cleanCached();\n\n if (!sy_path_is_absolute($file)) {\n $file = \\Simplify::config()->get('www:dir') . $file;\n }\n\n if (file_exists($file)) {\n $this->getThumbComponent($file)->cleanCached();\n\n @unlink($file);\n }\n }\n }\n }", "title": "" }, { "docid": "2b1699705dc4b43ab2379782de8f01ed", "score": "0.54069287", "text": "public function hook_after_delete($id) {\n\n }", "title": "" }, { "docid": "2b1699705dc4b43ab2379782de8f01ed", "score": "0.54069287", "text": "public function hook_after_delete($id) {\n\n }", "title": "" }, { "docid": "d5c751e81ab28449524eeb3ea1389921", "score": "0.5406902", "text": "public function handleDeletedSchema(ConfigEvent $event)\n {\n $uid = $event->tokenMatches[0];\n $schemaRecord = $this->_getSchemaRecord($uid);\n\n if ($schemaRecord->getIsNewRecord()) {\n return;\n }\n\n $db = Craft::$app->getDb();\n $transaction = $db->beginTransaction();\n\n try {\n // Delete the scope\n $db->createCommand()\n ->delete(Table::GQLSCHEMAS, ['id' => $schemaRecord->id])\n ->execute();\n\n $transaction->commit();\n } catch (\\Throwable $e) {\n $transaction->rollBack();\n throw $e;\n }\n\n $this->invalidateCaches();\n }", "title": "" }, { "docid": "9eb08d69e6667fcd0564eada806f6e5b", "score": "0.5406797", "text": "public function testDecreaseSize() {\n\n $obj = new Document();\n $obj->setSize(200);\n\n $obj->decreaseSize(100);\n $this->assertEquals(100, $obj->getSize());\n\n $obj->decreaseSize(100);\n $this->assertEquals(0, $obj->getSize());\n }", "title": "" }, { "docid": "ed0bbd780439437c0e5681a899a97e5f", "score": "0.5406368", "text": "public function onBeforeDelete() {\n $store = $this->targetStore();\n if (strlen($store)) {\n Config::inst()->update('File', 'update_filesystem', false);\n }\n\n\t\tparent::onBeforeDelete();\n }", "title": "" }, { "docid": "fab8a714a1bf02a650facdbbde9ea279", "score": "0.54053926", "text": "public function entityDeleted($event, $data)\n {\n $repository = $data[0];\n\n $repository->flushCache();\n }", "title": "" }, { "docid": "6d53f4d587c4597d171845a19b89655f", "score": "0.53868675", "text": "protected function _delete()\n {\n if( $this->_disableHooks ) return;\n \n parent::_delete();\n \n Engine_Hooks_Dispatcher::getInstance()\n ->callEvent('on'.$this->getType(true).'DeleteBefore', $this);\n Engine_Hooks_Dispatcher::getInstance()\n ->callEvent('onItemDeleteBefore', $this);\n\n // Unindex from search\n Engine_Api::_()->getApi('search', 'core')->unindex($this);\n }", "title": "" }, { "docid": "cf4fb8d712396ed57188cfe31b819aa8", "score": "0.53728735", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "cf4fb8d712396ed57188cfe31b819aa8", "score": "0.53728735", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "cf4fb8d712396ed57188cfe31b819aa8", "score": "0.53728735", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "cf4fb8d712396ed57188cfe31b819aa8", "score": "0.53728735", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "cf4fb8d712396ed57188cfe31b819aa8", "score": "0.53728735", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "cf4fb8d712396ed57188cfe31b819aa8", "score": "0.53728735", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "cf4fb8d712396ed57188cfe31b819aa8", "score": "0.53728735", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "cf4fb8d712396ed57188cfe31b819aa8", "score": "0.53728735", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "57d3d8c83c4896bd7cfe0ac492291015", "score": "0.53691787", "text": "public function EventDelete(&$form, $form_state) {\n // most of this should be handled in the base entity classes\n // but we need to handle the delete of the timeseries that is attached \n // to the block and erefed here to the agchem appplication event\n }", "title": "" }, { "docid": "2a0d518655ffe5fff3ccb3b260ea1a97", "score": "0.5359643", "text": "public function hook_before_delete($id) {\n\n }", "title": "" }, { "docid": "2a0d518655ffe5fff3ccb3b260ea1a97", "score": "0.5359643", "text": "public function hook_before_delete($id) {\n\n }", "title": "" }, { "docid": "6f1930315e5ea19009e055b72194364e", "score": "0.5353652", "text": "protected function onDelete(&$data)\n {\n if ($this->deleteFile) {\n foreach ($this->fields as $field) {\n $file = $data[$field[self::FIELD_FILENAME]];\n\n if (!empty($file)) {\n $this->getThumbComponent($file)->cleanCached();\n \n if (!sy_path_is_absolute($file)) {\n $file = \\Simplify::config()->get('www:dir') . $file;\n }\n \n if (file_exists($file)) {\n $this->getThumbComponent($file)->cleanCached();\n \n @unlink($file);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "162dadcec8532fe5b0c24882e62f5790", "score": "0.5346616", "text": "public function destroy($id)\n {\n $delete = CakeSize::destroy($id);\n return redirect('admin/cake-sizes')->with('success', 'Category with id: ' . $id . ' DELETED!');\n }", "title": "" }, { "docid": "af7a2fc7554355f87b257cee64d7bf86", "score": "0.53440887", "text": "public function deleted(RequestOrder $requestOrder)\n {\n //\n }", "title": "" }, { "docid": "abe45abd151993a14f1baba396452a89", "score": "0.53317696", "text": "public function handleDelete()\n\t{\t\n\t\t$this->init();\t\n\t\t\n\t\t// setting file to be removed (for removal strategy)\n\t\t$this->file_to_edit = $this->getItemFromContent(\n\t\t\t\t\t\t\t\t\t$this->request_registry->getContentItemId());\n\n\t\t\t\t\t\t\t\t\n\t\t$module_item_id_parts = pathinfo($this->module_item_id);\n\t\t$filename_parts = pathinfo($this->file_to_edit->getName());\n\t\t\n\t\t// initializing file transfer manager\t\n\t\t\t\n\t\t$this->file_transfer_manager->setDirname($module_item_id_parts[\"basename\"]);\n\t\t$this->file_transfer_manager->setFilename($filename_parts[\"basename\"]);\n\t\t\t\t\t\n\t\t$this->strategy_factory->getDeleteStrategy()->apply($this);\n\t\t\n\t}", "title": "" }, { "docid": "c24f42d47a156a79a0f50f6eeead7f35", "score": "0.53243107", "text": "protected function onAfterDelete()\n {\n parent::onAfterDelete();\n \n //To remove image object after PARK deleted\n if($this->hasPendingImage()){\n $this->PendingImage()->delete();\n }\n\n if($this->hasLiveImage()){\n $this->LiveImage()->delete();\n }\n }", "title": "" }, { "docid": "676d36e16bff03fb9e296a174415d26e", "score": "0.53167564", "text": "public function destroy($id)\n {\n Size::destroy($id);\n return redirect('/admin/size');\n }", "title": "" }, { "docid": "d0973a89bb494bc0beb65c93b37e6c90", "score": "0.5305718", "text": "public function hook_before_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "d0973a89bb494bc0beb65c93b37e6c90", "score": "0.5305718", "text": "public function hook_before_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "d0973a89bb494bc0beb65c93b37e6c90", "score": "0.5305718", "text": "public function hook_before_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "d0973a89bb494bc0beb65c93b37e6c90", "score": "0.5305718", "text": "public function hook_before_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "d0973a89bb494bc0beb65c93b37e6c90", "score": "0.5305718", "text": "public function hook_before_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "d0973a89bb494bc0beb65c93b37e6c90", "score": "0.5305718", "text": "public function hook_before_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "d0973a89bb494bc0beb65c93b37e6c90", "score": "0.5305718", "text": "public function hook_before_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "1ae9b721fe3dfb28082d3c5d1331d4df", "score": "0.5287464", "text": "public function awaitDomStorageItemRemoved(ContextInterface $ctx): DomStorageItemRemovedEvent;", "title": "" }, { "docid": "5b11a83cfe4160d51db32e6638967632", "score": "0.5285794", "text": "public static function onDelete(Entity\\Event $event)\n\t{\n\t\t$data = $event->getParameters();\n\t\t$fields = static::getRowById($data['primary']['ID']);\n\t\tif ($fields)\n\t\t{\n\t\t\t$fileQuery = MessageFieldTable::getById([\n\t\t\t\t'MESSAGE_ID' => $fields['MESSAGE_ID'],\n\t\t\t\t'CODE' => 'ATTACHMENT',\n\t\t\t]);\n\n\t\t\tif($row = $fileQuery->fetch())\n\t\t\t{\n\t\t\t\t$files = explode(\",\", $row['VALUE']);\n\n\t\t\t\tforeach ($files as $file)\n\t\t\t\t{\n\t\t\t\t\tif((int)$file)\n\t\t\t\t\t{\n\t\t\t\t\t\t\\CFile::Delete((int)$file);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$messageQuery = MessageFieldTable::getById([\n\t\t\t\t'MESSAGE_ID' => $fields['MESSAGE_ID'],\n\t\t\t\t'CODE' => 'MESSAGE',\n\t\t\t]);\n\n\t\t\tif($row = $messageQuery->fetch())\n\t\t\t{\n\t\t\t\tFileTable::syncFiles($data['primary']['ID'], 0, $row['VALUE'], true, true);\n\t\t\t}\n\n\t\t\tMessageTable::delete($fields['MESSAGE_ID']);\n\t\t}\n\n\t\treturn MailingChainTable::onDelete($event);\n\t}", "title": "" }, { "docid": "95c2b51fce959c2d44701519539e3b90", "score": "0.5284282", "text": "public function onDeleted($post)\n {\n //$post->notify(new PostDeleted);\n }", "title": "" }, { "docid": "ffdbd896b77aa11ac092d098cd982c5f", "score": "0.52811474", "text": "public function delete_DeleteUpload() {\n $evidence_id=$this->db->clean($_REQUEST['evidence_id']);\n \n #update the data\n $sql=\"DELETE FROM evidence WHERE evidence_id='$evidence_id'\";\n $delete_result=$this->db->query($sql);\n \n #either return the last event log or the error message\n if ($delete_result=='') {\n $this->db->add_event(\"Upload deleted: for evidence_id $evidence_id\");\n $last_event_message=$this->db->get_last_events(1);\n return $last_event_message;\n }\n else {\n return $delete_result;\n }\n }", "title": "" }, { "docid": "df631f8d9674800e7804924a9a3012a9", "score": "0.5269666", "text": "public function beforeDelete()\n {\n $this->deleteFile();\n }", "title": "" }, { "docid": "4ebde8552741bd3d78e3453e15244e50", "score": "0.5266596", "text": "public function onProcessEntityDeleted($event)\n {\n // Delete all process data associated with entity being deleted.\n $processInstanceIds = $event->entity->processInstances->pluck('id')->all();\n if (! empty($processInstanceIds)) {\n ProcessInstanceForm::whereIn('process_instance_id', $processInstanceIds)->delete();\n ProcessInstanceStep::whereIn('process_instance_id', $processInstanceIds)->delete();\n ProcessInstance::destroy($processInstanceIds);\n }\n }", "title": "" }, { "docid": "3e76c55bc9ff9d8b5d6a6fa190236e72", "score": "0.5261229", "text": "protected function _postDelete()\n {\n if( $this->_disableHooks ) return;\n \n parent::_postDelete();\n\n Engine_Hooks_Dispatcher::getInstance()\n ->callEvent('on'.$this->getType(true).'DeleteAfter', array(\n 'type' => $this->getType(),\n 'identity' => $this->getIdentity()\n ));\n Engine_Hooks_Dispatcher::getInstance()\n ->callEvent('onItemDeleteAfter', array(\n 'type' => $this->getType(),\n 'identity' => $this->getIdentity()\n ));\n }", "title": "" }, { "docid": "73a12e56d5ef50aae169792d2ba2b506", "score": "0.52411324", "text": "public function hook_after_delete($id)\n\t{\n\t\t//Your code here\n\n\t}", "title": "" }, { "docid": "b638b3575b975aef55ea94a7a418accc", "score": "0.5235521", "text": "public function forceDeleted(EventAttachment $eventAttachment)\n {\n //\n }", "title": "" } ]
fadabd0a219af56bbeffdf705b4763f8
Deletes a template from the system. All virtual machines using the deleted template will not be affected.
[ { "docid": "a65ae1dba13f4b1d96ca9b1601e98e35", "score": "0.62593937", "text": "public function deleteTemplate($id) {\n\t\t$data = array (\n\t\t\t\t\"apiKey\" => $this->apiKey,\n\t\t\t\t\"command\" => \"deleteTemplate\",\n\t\t\t\t\"response\" => \"json\",\n\t\t\t\t\"id\" => $id\n\t\t);\n\t\t$url = $this->getSignatureUrl ( $data );\n\t\treturn $this->curlGet ( $url );\n\t}", "title": "" } ]
[ { "docid": "eaa6f5fb0f67844e0b4828e2f531b372", "score": "0.76803714", "text": "public function delete()\n\t{\n\t\t$db = App\\Db::getInstance();\n\t\t$templateId = $this->getId();\n\t\t$db->createCommand()\n\t\t\t->delete('vtiger_trees_templates', ['templateid' => $templateId])\n\t\t\t->execute();\n\t\t$db->createCommand()\n\t\t\t->delete('vtiger_trees_templates_data', ['templateid' => $templateId])\n\t\t\t->execute();\n\t\t$this->clearCache();\n\t}", "title": "" }, { "docid": "4a77c5e98f77e5f9afd02b6b408c63e7", "score": "0.71414506", "text": "public static function deleteTemplate(Template $oTemplate) { \n\t\t$db = CdtDbManager::getConnection(); \n\n\t\t$cd_template = $oTemplate->getCd_template();\n\n\t\t$tableName = BOL_TABLE_TEMPLATE;\n\t\t\n\t\t$sql = \"DELETE FROM $tableName WHERE cd_template = $cd_template \"; \n\n\t\t$result = $db->sql_query($sql);\n\t\tif (!$result)//hubo un error en la bbdd.\n\t\t\tthrow new DBException($db->sql_error());\n\n\t}", "title": "" }, { "docid": "193ea70c12c94346b1dd3dab3f9a034e", "score": "0.6997356", "text": "public function Delete($template = '')\n {\n if ( '' != $template )\n unset($this->_Template[$template]);\n else\n $this->_Template = [];\n }", "title": "" }, { "docid": "4550c3b017e819d87178215a10f2df3d", "score": "0.6950041", "text": "public function deleteTemplate(int $templateId) {\n $template = Templates::template($templateId);\n\n if (isset($template)) {\n DB::transaction(function () use ($templateId) {\n DB::table('templates')\n ->where('id', '=', $templateId)\n ->delete();\n\n DB::table('templates_pages_binding')\n ->where('template_id', '=', $templateId)\n ->delete();\n });\n\n return response('', 204);\n } else {\n return response('', 404);\n }\n }", "title": "" }, { "docid": "3e77533ca448ae6e8f5cc40ed3092c64", "score": "0.6868633", "text": "public function delete()\n\t{\n\t\t/* Check permission */\n\t\t\\IPS\\Dispatcher::i()->checkAcpPermission( 'template_delete' );\n\n\t\t/* Make sure the user confirmed the deletion */\n\t\t\\IPS\\Request::i()->confirmedDelete();\n\n\t\t$key = \\IPS\\Request::i()->t_key;\n\t\t$return = array(\n\t\t\t'template_content' => NULL,\n\t\t\t'template_id' \t => NULL\n\t\t);\n\t\t\n\t\ttry\n\t\t{\n\t\t\t\\IPS\\cms\\Templates::load( $key )->delete();\n\t\t\t\n\t\t\t/* Now reload */\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$template = \\IPS\\cms\\Templates::load( $key );\n\t\t\t\t\n\t\t\t\t$return['template_location'] = $template->location;\n\t\t\t\t$return['template_content'] = $template->content;\n\t\t\t\t$return['template_id']\t\t = $template->id;\n\t\t\t\t$return['InheritedValue'] = ( $template->user_added ) ? 'custom' : ( $template->user_edited ? 'changed' : 0 );\n\t\t\t}\n\t\t\tcatch( \\OutOfRangeException $ex )\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tcatch( \\OutOfRangeException $ex )\n\t\t{\n\t\t\t\\IPS\\Output::i()->error( 'node_error', '3T285/4', 500, '' );\n\t\t}\n\n\t\t/* Clear guest page caches */\n\t\t\\IPS\\Data\\Cache::i()->clearAll();\n\n\t\tif( \\IPS\\Request::i()->isAjax() )\n\t\t{\n\t\t\t\\IPS\\Output::i()->json( $return );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\\IPS\\Output::i()->redirect( \\IPS\\Http\\Url::internal( 'app=cms&module=pages&controller=templates' ), 'completed' );\n\t\t}\n\t}", "title": "" }, { "docid": "47d0a31be798bf89838a4b45a7d69673", "score": "0.68117607", "text": "function delete_template($template_id)\n {\n $parameter_array = array();\n \n array_push($parameter_array, array(\n 'and',\n 'id',\n '=',\n $template_id\n ));\n \n parent::delete('i', $parameter_array);\n }", "title": "" }, { "docid": "97f8cb0b7dc06a6b6b1b9860084d0cc6", "score": "0.6662173", "text": "public function destroy_template($id)\n {\n try{\n $model = DesignCertificate::find($id);\n $filename = $model->filename;\n Storage::disk('local')->delete('public/templates/'.$filename);\n $model->delete();\n return redirect('/certificate/view-template');\n } catch (\\Exception $e){\n return $e->getMessage();\n }\n }", "title": "" }, { "docid": "68fee3b97aa63cc67016ed6481e2e85c", "score": "0.6604458", "text": "public function deleteMessageTemplate($messageTemplateId)\n {\n return $this->start()->uri(\"/api/message/template\")\n ->urlSegment($messageTemplateId)\n ->delete()\n ->go();\n }", "title": "" }, { "docid": "56f9ef7fceb43f41ccf80412912cd38a", "score": "0.6535199", "text": "public function deleteTemplate ()\n {\n // Recovering template id\n $target =Input::get('data'); \n \n // Removing template\n $num = DB::update(\"DELETE FROM ezz_templates where id_template = $target\");\n return response () -> json ([\n 'borradas' => $num,\n 'status' => 'success'\n ],200);\n }", "title": "" }, { "docid": "e52f2a3e7d95a961a98022c6d92f915b", "score": "0.6482301", "text": "public function deleteEmailTemplate(Request $request) {\n $conditions = ['id' => $request->template_id];\n $template = $this->commonObj->find('EmailTemplate', $conditions);\n if(!$template) {\n return jsonResponse('not found', 201, []);\n }\n if($template->deletable==true) {\n return jsonResponse('can\\'t delete this template', 400, []);\n }\n $this->commonObj->destroy('EmailTemplate', $conditions);\n return jsonResponse('done', 201, []);\n }", "title": "" }, { "docid": "64dce25f22f32d7e1e788e4f67890d78", "score": "0.64481014", "text": "public function delete()\n {\n try {\n $this->getSoapClient()->DeleteTemplate(array(\n 'filename' => basename($this->getName())\n ));\n\n return $this;\n } catch ( SoapException $ex ) {\n throw new DeleteException('Error while deleting the remote template from Livedocx service' , $ex);\n }\n }", "title": "" }, { "docid": "9cfe87f3e0a9f7a630f55e99bd84c05c", "score": "0.64306414", "text": "public function delete_builder_template($name = \"%\")\n\t\t{\n\t\t check_ajax_referer('avia_nonce_save','avia-save-nonce');\n\t\t\n $name = isset($_POST['templateName']) ? $_POST['templateName'] : $name;\n $id = AviaStoragePost::get_custom_post('template_builder_snippets');\n\n \n $key = $this->generate_key($name);\n $result = delete_post_meta($id, $key);\n echo 'avia_template_deleted';\n die();\n\t\t}", "title": "" }, { "docid": "c5e6f798a28cd767d401954f3205f410", "score": "0.6419874", "text": "public function deleteTemplateGroup()\n\t{\n\t\tforeach( \\IPS\\cms\\Templates::$databaseDefaults as $field => $template )\n\t\t{\n\t\t\t\\IPS\\Db::i()->update( 'cms_databases', array( 'database_template_' . $field => $template ), array( 'database_template_' . $field . ' =?', \\IPS\\Request::i()->group ) );\n\t\t}\n\t\n\t\t\\IPS\\Db::i()->delete( 'cms_templates', array( 'template_location=? and template_group=?', 'database', \\IPS\\Request::i()->group ) );\n\t\t\n\t\tunset( \\IPS\\Data\\Store::i()->cms_databases );\n\t\t\n\t\t\\IPS\\Output::i()->redirect( \\IPS\\Http\\Url::internal( 'app=cms&module=pages&controller=templates' . ( isset( \\IPS\\Request::i()->t_location ) ? '&t_location=' . \\IPS\\Request::i()->t_location : '' ) ), 'deleted' );\n\t}", "title": "" }, { "docid": "aa47c1c47dd9164bd8dcf023e5f6f1d1", "score": "0.63848114", "text": "public static function delete_template($conn, $template_id) \n {\n Ossim_db::check_connection($conn);\n \n $query = \"SELECT name, 'users' AS type FROM users WHERE template_id = UNHEX(?)\";\n \n $rs = $conn->Execute($query, array($template_id));\n \n if (!$rs) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n \n return _('Error while deleting the template');\n }\n \n $num_rows = $conn->Affected_Rows();\n \n if ($num_rows >= 1) \n {\n $users = array();\n \n while (!$rs->EOF) \n {\n $users[] = utf8_encode($rs->fields['name']);\n \n $rs->MoveNext();\n }\n \n $msg = _(\"You can't delete this template. Some users are using it\");\n \n if (!empty($users))\n { \n $msg .= ': '.implode(', ', $users);\n }\n \n return $msg;\n }\n \n $query = \"DELETE FROM acl_templates_perms WHERE ac_templates_id = UNHEX(?)\"; \n \n $rs = $conn->Execute($query, array($template_id));\n \n if (!$rs) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n \n return _('Error while deleting the template perms');\n }\n \n \n $query = \"DELETE FROM acl_templates WHERE id=UNHEX(?)\";\n \n $rs = $conn->Execute($query, array($template_id));\n \n if (!$rs) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n \n return _('Error while deleting the template');\n } \n \n return '';\n }", "title": "" }, { "docid": "1065f88f0f3666c90ddc054e229ca939", "score": "0.63305104", "text": "public function destroy($id) {\n $template = Template::find($id);\n $template->delete();\n\n return redirect(route('template.index'));\n }", "title": "" }, { "docid": "5868ac86ec066bf903bab9b9cf9bc1b6", "score": "0.6317699", "text": "public function destroy(Template $template)\n {\n $template->delete();\n\n return redirect()->route('template.index');\n }", "title": "" }, { "docid": "599467ac2a1f104cfba5671c4626cf37", "score": "0.63052446", "text": "public function deleteInvoiceTemplate(string $template_id)\n {\n $this->apiEndPoint = \"v2/invoicing/templates/{$template_id}\";\n\n $this->verb = 'delete';\n\n return $this->doPayPalRequest(false);\n }", "title": "" }, { "docid": "19ca1ee6516b5814c31e23e151f39670", "score": "0.62896913", "text": "public function delete($id)\n\t{\n\t\tTemplate::destroy($id);\n\t\treturn Redirect::to('/templates');\n\t}", "title": "" }, { "docid": "203af1e00553fbcc14f02a518eca8cff", "score": "0.62687767", "text": "public function deleteTemplate($templateid)\n\t{\n\t\tglobal $conf;\n\t\t$error = 0;\n\t\t$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'printer_receipt_template';\n\t\t$sql .= \" WHERE rowid = \".((int) $templateid);\n\t\t$sql .= \" AND entity = \".$conf->entity;\n\t\t$resql = $this->db->query($sql);\n\t\tif (!$resql) {\n\t\t\t$error++;\n\t\t\t$this->errors[] = $this->db->lasterror;\n\t\t}\n\t\treturn $error;\n\t}", "title": "" }, { "docid": "6e951874243c0dce1d2d642995341f85", "score": "0.6226887", "text": "public function emailtemplatedelete(Request $request,$id=0)\n {\n $del_qry = DB::table('email_templates')->where('id', $id)->delete();\n if($del_qry)\n {\n $request->session()->flash('admin_successmsgdata_sess', 'Template Deleted successfully.');\n }\n return redirect(ADMINSEPARATOR.'/email-template');\n }", "title": "" }, { "docid": "9149d4fc19ac70fdea9b0cee0d3e8198", "score": "0.62187105", "text": "public function deleteTemplate($m_TemplateId)\n {\n $sqlStatement=\"Delete FROM Templates WHERE TemplateId='$m_TemplateId' \";\n\n $this->result = @$this->dbConnection->query($sqlStatement);\n if(!$this->result)\n {\n die('Could not retrieve records from the CMS Database: ' .\n $this->dbConnection->error);\n }\n\n return $this->dbConnection->affected_rows;\n }", "title": "" }, { "docid": "f1126a8ee6d98bf3103100affd4d07f9", "score": "0.61853945", "text": "public function destroy($id)\n {\n $this->template->find($id)->delete();\n\n return Redirect::route('admin.templates.index');\n }", "title": "" }, { "docid": "d2d4074e183f69b93229f5547fa84af8", "score": "0.6183774", "text": "public static function deleteTemplate($alias){\n File::delete(self::getPagePath() . $alias . self::getPageExtension());\n }", "title": "" }, { "docid": "08591bf2b882d20127602867fd52db6e", "score": "0.61261356", "text": "public function destroy($id){\n $currentTemplate = CssTemplate::find($id);\n $modifications = CssTemplateModification::where('cssTemplateModified', $currentTemplate->id)->get();\n foreach($modifications as $modification){\n $modification->delete();\n }\n $currentTemplate->delete();\n return redirect('manage/templates');\n }", "title": "" }, { "docid": "dff6361955e6a74a329d93d2dc7fa885", "score": "0.6053648", "text": "public function delTemplateData() {\r\n\t\t$this->templateData = [];\r\n\t}", "title": "" }, { "docid": "622dcc6493a8f88d13bb586b49a292b2", "score": "0.6005772", "text": "public function deleteTemplate(object $parameters, object $data, object $headers): object\n {\n $this->checkParameters(['uuid'], $parameters);\n\n // Get template from DB\n $template = Template::whereUuid($parameters->uuid)->first();\n\n if(!$template)\n throw new BusinessException('Template not found');\n\n // Delete template\n $template->delete();\n\n return $data;\n }", "title": "" }, { "docid": "2cd0c6cde4cd5c03257cfc11c706383b", "score": "0.59818417", "text": "public function destroy($id) {\n Template::destroy($id);\n }", "title": "" }, { "docid": "e612f4078435d1801a701e9ebd4e33bb", "score": "0.59604114", "text": "protected function uninstall_templates()\n {\n // initialize the Finder\n $finder = new Finder();\n // we need only the top level\n $finder->depth('== 0');\n // get all directories in the /Examples\n $finder->directories()->in(MANUFAKTUR_PATH.'/TemplateTools/Examples');\n \n foreach ($finder as $directory) {\n $template_name = $directory->getFilename();\n $target_directory = CMS_PATH.'/templates/'.$template_name;\n \n if ($this->app['filesystem']->exists($target_directory)) {\n // the template exists - remove it\n $this->app['filesystem']->remove($target_directory);\n }\n \n $this->app['db']->delete(CMS_TABLE_PREFIX.'addons', \n array('type' => 'template', 'directory' => $template_name));\n }\n }", "title": "" }, { "docid": "f755fadc9c515c46fb7172e831fdbb9e", "score": "0.5897319", "text": "public function deleteSmsTemplate($id)\n {\n $appStage = app_config('AppStage');\n if ($appStage == 'Demo') {\n return redirect('user/sms/sms-templates')->with([\n 'message' => language_data('This Option is Disable In Demo Mode'),\n 'message_important' => true\n ]);\n }\n\n $st = SMSTemplates::find($id);\n if ($st) {\n $st->delete();\n\n return redirect('user/sms/sms-templates')->with([\n 'message' => language_data('Sms template delete successfully', Auth::guard('client')->user()->lan_id)\n ]);\n\n } else {\n return redirect('user/sms/sms-templates')->with([\n 'message' => language_data('Sms template not found', Auth::guard('client')->user()->lan_id),\n 'message_important' => true\n ]);\n }\n }", "title": "" }, { "docid": "899a321e171df8a9dcb2d2963e53600a", "score": "0.5890899", "text": "public function delete($id)\n {\n $response = $this->mailjet->delete(Resources::$Template, ['id' => $id]);\n if (!$response->success()) {\n $this->throwError(\"TemplateManager:delete() failed\", $response);\n }\n\n return $response->getData();\n }", "title": "" }, { "docid": "bd00d0e23b8aab40baf0a1945dfacd70", "score": "0.5862348", "text": "public function delete(): void\n {\n $this->instances->demo()->runHook($this->root(), 'delete:before', $this);\n\n Dir::remove($this->root());\n $this->instances->delete($this->id);\n\n $this->instances->demo()->runHook($this->root(), 'delete:after', $this);\n }", "title": "" }, { "docid": "a74eb4db2dbe49feb0359c3f9f25f32c", "score": "0.5825147", "text": "public\n function destroy($id)\n {\n $id = (int)$id;\n try {\n $value = Template::find($id);\n\n if ($value) {\n $valueId = $value->id;\n $useTemplate = OutgoingDocument::where('template_id', $valueId)->get();\n $digitizeduseTemplate=DigitizedDocument::where('template_id',$valueId)->get();\n\n if (count($useTemplate) > 0 || count($digitizeduseTemplate)>0) {\n session()->flash('error', 'Template is in use. Unable to delete!');\n return back();\n }\n else {\n $value->delete();\n \n session()->flash('success', 'Template successfully deleted');\n return back();\n \n }\n } else {\n session()->flash('error', 'Template could not found');\n return back();\n }\n\n } catch\n (\\Exception $e) {\n $exception = $e->getMessage();\n session()->flash('error', 'EXCEPTION' . $exception);\n return back();\n\n }\n }", "title": "" }, { "docid": "6ed15f7bea3573862279f1b4de2e5797", "score": "0.5791873", "text": "public function destroy($id)\n {\n if (env('DELETE_DISABLED') == true) {\n \\Flash::error('Delete operation is disabled from environment file');\n return \\Redirect::back();\n }\n if ($id == 1) {\n \\Flash::error(\"Template 'Default' cannot be deleted!\");\n } else {\n Replytemplate::destroy($id);\n \\Flash::success('Deleted!');\n }\n return \\Redirect::route('super.reply-template.index');\n }", "title": "" }, { "docid": "39d2cd08bc5bf3e9e5ca2d05afe3db6a", "score": "0.5780274", "text": "public function jobTemplateDelete($project_id, $id, $x_phrase_app_otp = null, $branch = null)\n {\n $this->jobTemplateDeleteWithHttpInfo($project_id, $id, $x_phrase_app_otp, $branch);\n }", "title": "" }, { "docid": "adc888dbeeba6c8885b09472283cf733", "score": "0.57733846", "text": "public function deleteTemplate($id)\n {\n $response = $this->delete(Resources::$Template, ['id' => $id]);\n if (!$response->success()) {\n $this->throwError('MailjetService:deleteTemplate() failed', $response);\n }\n return $response->getData();\n }", "title": "" }, { "docid": "d9289fb7642926a93564bebbccde2ddb", "score": "0.577308", "text": "public function destroy($id)\n {\n $data = Template::findOrFail($id);\n $data->delete();\n $this->template->deleteFile($data->file);\n return 1;\n }", "title": "" }, { "docid": "63fc2774ea7befa28c92f6ca00cbfde0", "score": "0.5762068", "text": "public function destroy($id)\n {\n $template = $this->templates->find((int)$id);\n\n if ($template->is_in_use)\n {\n return redirect()\n ->back()\n ->withErrors(['template' => 'Cannot delete a template that has been used.']);\n }\n\n $this->templates->destroy($template->id);\n\n return redirect()\n ->back()\n ->with('success', 'Template successfully deleted.');\n }", "title": "" }, { "docid": "59f7f6969f257190ae305548b89dac27", "score": "0.57518613", "text": "function VM_delete($vmName)\n{\n\t$info = VM_getSWandHost($vmName);\n\n\t//Exit if it's not a VM\n\tif ($info == false)\n\t\treturn(false);\n\n\t$cmd = VM_delVMCMD($info['vmSoftware'], $vmName);\n\n\tCLIENT_executeOnClientOrIP($info['vmHost'],\"VM_deleteVM\",\"$cmd\",\"m23-vbox\",true);\n\treturn(true);\n}", "title": "" }, { "docid": "dad34636cab7a78e5ca0b20b5a6a7429", "score": "0.5735159", "text": "public function remove(LabelTemplate $labelTemplate);", "title": "" }, { "docid": "b0efdac1672b20c5413187d2cd8eb0fb", "score": "0.5690925", "text": "public function testDeleteGlobalTemplate()\n {\n\n }", "title": "" }, { "docid": "1315f1b72128dcd7a096adc2bfbf0588", "score": "0.56841516", "text": "public function deleteEmailTemplate($emailTemplateId)\n {\n return $this->start()->uri(\"/api/email/template\")\n ->urlSegment($emailTemplateId)\n ->delete()\n ->go();\n }", "title": "" }, { "docid": "4c9e2a9811be00b6cbe9fe76c2970326", "score": "0.5666533", "text": "protected function deletePatch() {\n\t\t$sql = \"DELETE FROM\t\twcf\".WCF_N.\"_\".$this->type.\"template_patch \n\t\t\tWHERE\t\t\tpackageID = \".$this->packageID;\n\t\tWCF::getDB()->sendQuery($sql);\n\t}", "title": "" }, { "docid": "bab370b0d8d79d25320d5b1cd728d9a8", "score": "0.56264126", "text": "private function remove_template_access($tv_id, $template_id)\n {\n $tv_template = $this->modx->getObject('modTemplateVarTemplate', array(\n 'tmplvarid' => $tv_id,\n 'templateid' => $template_id\n ));\n\n if (isset($tv_template))\n {\n if ( ! $tv_template->remove())\n {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "61e64c1b89794f5b8306ad79169223d8", "score": "0.5613475", "text": "public function delete_email_template($del_email_tmpid) {\n\t\treturn $this->db->delete('email_template_detail',array('templateid'=>$del_email_tmpid));\n\t}", "title": "" }, { "docid": "f32d59d023918d7facb2d25b64283e1b", "score": "0.56093204", "text": "public function destroy($id)\n\t{\n\t\tInvoiceTemplate::destroy($id);\n\t}", "title": "" }, { "docid": "40b6f65799dff9e5bee3f59cb19a35a8", "score": "0.5596831", "text": "public function deleteCompiledTemplates() {\n\t\t// templates\n\t\t$filenames = glob(WCF_DIR.'templates/compiled/*_'.$this->languageID.'_*.php');\n\t\tif ($filenames) foreach ($filenames as $filename) @unlink($filename);\n\t\t\n\t\t// acp templates\n\t\t$filenames = glob(WCF_DIR.'acp/templates/compiled/*_'.$this->languageID.'_*.php');\n\t\tif ($filenames) foreach ($filenames as $filename) @unlink($filename);\n\t}", "title": "" }, { "docid": "f3a0abf56dfcb2841deb5155d832e3e1", "score": "0.55704504", "text": "public function delete_email_template(Request $request,$enc_id)\n\t{\t\n\t\t$content_id = base64_decode($enc_id);\n\n\t\t$obj_delete = $this->BaseModel->where('id',$content_id)->delete();\n\n\t\tif($obj_delete){\n\t\t\tSession::flash('success', 'Template deleted successfully.');\n\t\t\treturn redirect($this->module_url_path);\n \t}else{\n \t\tSession::flash('error', 'Something went wrong.');\n\t\t\treturn redirect($this->module_url_path);\n \t}\n\t}", "title": "" }, { "docid": "1f07122928f5182771da94b8f8835b79", "score": "0.55624986", "text": "public function deleteTemplates($setId) {\n $delete = $this->getDatabase()->delete()\n ->setTable(self::TEMPLATES_TABLE)\n ->where('statisticSetId = ?', $setId);\n\n return $delete->run();\n }", "title": "" }, { "docid": "2360d501aedca542d69913b3f8e3bd92", "score": "0.55511194", "text": "function DeleteDocumentTemplateLanguage($documentTemplateId, $languageCode)\n\t{\n\t\t$result = $this->sendRequest(\"DeleteDocumentTemplateLanguage\", array(\"DocumentTemplateId\"=>$documentTemplateId, \"LanguageCode\"=>$languageCode));\t\n\t\treturn $this->getResultFromResponse($result, true);\n\t}", "title": "" }, { "docid": "9394891452a3e08f0e3daab08102b9c9", "score": "0.5542801", "text": "public function deleteTemplateItem($id)\n {\n $this->deleteTemplateItemWithHttpInfo($id);\n }", "title": "" }, { "docid": "6969661404b0240ab1426bb1de9df357", "score": "0.5522993", "text": "public function delete($templateUid)\n {\n $client = new MailWizzApi_Http_Client(array(\n 'method' => MailWizzApi_Http_Client::METHOD_DELETE,\n 'url' => $this->config->getApiUrl(sprintf('templates/%s', $templateUid)),\n ));\n \n return $response = $client->request();\n }", "title": "" }, { "docid": "24d6aa8ae15284d651bc1c063173e863", "score": "0.5510369", "text": "public function generic_template_delete($data) {\r\n try {\r\n if (!is_array($data) || empty($data) || count($data) === 0) {\r\n throw new Exception(\"List_model::generic_template_delete::invalid array provided for update\", 1);\r\n } else {\r\n # variable for status of deletion process\r\n $status = false;\r\n\r\n # delete the records from template_master table for each new template\r\n foreach ($data as $template) {\r\n $this->db->where($template[\"where\"]);\r\n $status = $this->db->delete(\"template_master\");\r\n }\r\n\r\n # return status\r\n return $status;\r\n }\r\n } catch (Exception $e) {\r\n throw $e;\r\n }\r\n }", "title": "" }, { "docid": "2258a7af9430cf7328cef34c5df97249", "score": "0.5504824", "text": "public function destroy($tname)\n {\n DB::table('templates')->where('tname','=', $tname)->delete();\n\n Session::flash('message', 'Successfully deleted the template!');\n return Redirect::to('/templates');\n\n }", "title": "" }, { "docid": "39057421509ad7eaa418ae66bd71115a", "score": "0.5495419", "text": "public function testDeleteTemplate()\n {\n\n }", "title": "" }, { "docid": "c6f9a4ed93e895b83dd930d660336f0c", "score": "0.5463606", "text": "public function actionDelete($id)\n {\n Templates::deleteAll([Templates::primaryKey()[0] => $id]);\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "57b39c162e4170f6dfe90ffef125bd0c", "score": "0.5455323", "text": "public function deleteEbayTemplate()\n\t{\n\t\t$filteredIdx = array();\n\n\t\tif (isset($_POST['templates']) && is_array($_POST['templates'])) {\n\t\t\t$filteredIdx = array_filter($_POST['templates'], \"isId\");\n\t\t}\n\n\t\tif (is_array($filteredIdx) && !empty($filteredIdx)) {\n\t\t\t$query = \"DELETE [|PREFIX|]ebay_listing_prices, [|PREFIX|]ebay_listing_template, [|PREFIX|]ebay_shipping, [|PREFIX|]ebay_shipping_serv \"\n\t\t\t. \"FROM [|PREFIX|]ebay_listing_template \"\n\t\t\t. \"LEFT JOIN [|PREFIX|]ebay_listing_prices ON ([|PREFIX|]ebay_listing_prices.ebay_listing_template_id = [|PREFIX|]ebay_listing_template.id) \"\n\t\t\t. \"LEFT JOIN [|PREFIX|]ebay_shipping ON ([|PREFIX|]ebay_shipping.ebay_listing_template_id = [|PREFIX|]ebay_listing_template.id) \"\n\t\t\t. \"LEFT JOIN [|PREFIX|]ebay_shipping_serv ON ([|PREFIX|]ebay_shipping_serv.ebay_shipping_id = [|PREFIX|]ebay_shipping.id) \"\n\t\t\t. \"WHERE [|PREFIX|]ebay_listing_template.id IN (\".implode(',', $filteredIdx).\") \"\n\t\t\t;\n\t\t\t$result = $GLOBALS[\"ISC_CLASS_DB\"]->Query($query);\n\t\t\tif (!$result) {\n\t\t\t\tFlashMessage(GetLang('UnknownErrorDeletion'), MSG_ERROR, 'index.php?ToDo=viewEbay&currentTab=1', 'EbayListingTemplate');\n\t\t\t} else {\n\t\t\t\t// Log this action\n\t\t\t\t$GLOBALS['ISC_CLASS_LOG']->LogAdminAction(count($_POST['templates']));\n\t\t\t\tFlashMessage(GetLang('TemplateDeletedSuccessfully'), MSG_SUCCESS, 'index.php?ToDo=viewEbay&currentTab=1', 'EbayListingTemplate');\n\t\t\t}\n\t\t} else {\n\t\t\tFlashMessage(GetLang('ChooseTemplate'), MSG_ERROR, 'index.php?ToDo=viewEbay&currentTab=1', 'EbayListingTemplate');\n\t\t}\n\t}", "title": "" }, { "docid": "116e30be23009de03c1a2da36573e32b", "score": "0.54359716", "text": "public function deleteApiEmailTemplate($template, $sort = null, $page = null, $search = null)\n {\n $this->deleteApiEmailTemplateWithHttpInfo($template, $sort, $page, $search);\n }", "title": "" }, { "docid": "b4c12bdc4951ba8527cc94aa256e98c4", "score": "0.5435214", "text": "public function destroy($id)\n {\n $disk = getStorageDisk();\n $form = Form::findOrFail($id);\n $template_id = $form->template_id;\n //Local delete\n //DeleteFormFolderImage($folder_id,$id);\n //S3 delete\n $disk->deleteDirectory(\"admin/template_$template_id/form/$id\");\n $form->delete();\n \\Session::flash('message', 'Your Form has been deleted successfully');\n return \\Redirect::back();\n }", "title": "" }, { "docid": "bfed242507e4dfa1bdb4002176f30be6", "score": "0.5427069", "text": "public function actionDeleteFileBlockTemplate($fileTemplateId, $deletePass = false)\n {\n if (!Yii::$app->request->isPjax) throw new BadRequestHttpException('No pjax');\n\n /** @var FilesBlock $filesBlock */\n $filesBlock = FilesBlock::findOne($fileTemplateId);\n\n if (!$filesBlock) throw new NotFoundHttpException('Wrong fileTemplateId');\n\n if ($filesBlock->isConstraints())\n if (!Yii::$app->security->validatePassword($deletePass, CommonHashForm::DEV_HASH))\n throw new CommonException('Wrong dev password');\n\n $fileTemplateReference = $filesBlock->file_template_reference;\n\n $filesBlock->delete();\n\n $filesBlocks = FilesBlock::getListQuery($fileTemplateReference)\n ->orderBy([FilesBlock::getOrderFieldName() => SORT_ASC])\n ->all();\n\n return $this->render('@yicms-common/Views/pjax/update-files-list-container', [\n 'fileTemplateReference' => $fileTemplateReference,\n 'filesBlocks' => $filesBlocks,\n ]);\n }", "title": "" }, { "docid": "6f4f65070368b98f561314523240b7a1", "score": "0.54191756", "text": "public function delete_time_template($id, $temp_id, $description){\n\t\t\t\techo $this->deleteTimeTemplate($id, $temp_id, $description);\n\t\t}", "title": "" }, { "docid": "968dd84838692050ff062270e7f021f2", "score": "0.54178226", "text": "public function delete() {\n $this->remove_content();\n\n parent::delete();\n }", "title": "" }, { "docid": "564a6a3dd47e0dd80662f771ebef2d29", "score": "0.54067016", "text": "public function deleteTranscoderTemplateAppConfig($server_name, $vhost_name, $template_name, $app_name)\n {\n $this->deleteTranscoderTemplateAppConfigWithHttpInfo($server_name, $vhost_name, $template_name, $app_name);\n }", "title": "" }, { "docid": "f24d62ae2feabf93144a00428090f6b1", "score": "0.540298", "text": "protected function deleteTimeTemplate($id, $temp_id, $description){\n\t\t// INCLUDE CLASS FILES FOR JQUERY\n\t\tinclude \"inc/class.php\";\n\t\t$standard = new ViewBasic();\n\n\t\t// THE REST IS NORMAL CONTROL METHOD\n\t\t$sql = \"DELETE FROM time_control WHERE id=?\";\n\t\t$stmt = $this->prpConnect()->prepare($sql);\n\t\t// GET MOTHER TEMPLATE INFO\n\t\t$template = $standard->get_template($temp_id, null);\n\t\tif ($stmt->execute([$id])){\n\t\t\t$action = \"Time Segment: \".$id.\"-\".$description.\" DELETED. Belonging to Template name: \".$template[0]['name'].\"\";\n\t\t\techo $action;\n\t\t\t// ADDING RECORD TO LOG\n\t\t\t$standard->newInsLog(null,null,null,$_SESSION['name'],$action);\n\t\t} else {\n\t\t\t$action = \"DB Error - Trying to DELETE Time Segment: \".$id.\"-\".$description.\". Belonging to Template name: \".$template[0]['name'].\"\";\n\t\t\techo $action;\n\t\t\t// ADDING RECORD TO LOG\n\t\t\t$standard->newInsLog(null,null,null,$_SESSION['name'],$action);\n\t\t}\n\t\t}", "title": "" }, { "docid": "fbfc7ad862b2723ea2c4c9c26f39c90f", "score": "0.53559685", "text": "public function destroy($id)\n {\n $ContractTemplate = $this->ContractTemplateRepository->destroy($id);\n return back()->with(['success', 'Deleted Successfully']);\n }", "title": "" }, { "docid": "2f2e201d746d5782d65679d270ec751e", "score": "0.5348761", "text": "public function destroy($id)\n {\n $styleTemplate = StyleTemplate::find($id);\n $styleTemplate->delete();\n return redirect()->action('StyleTemplateController@index');\n }", "title": "" }, { "docid": "4f977ce8429cafb1ada7f7159b3b68ff", "score": "0.53484726", "text": "public static function delete($id) {\n global $lC_Database;\n\n $Qdel = $lC_Database->query('delete from :table_templates_boxes_to_pages where id = :id');\n $Qdel->bindTable(':table_templates_boxes_to_pages', TABLE_TEMPLATES_BOXES_TO_PAGES);\n $Qdel->bindInt(':id', $id);\n $Qdel->setLogging($_SESSION['module'], $id);\n $Qdel->execute();\n\n if ( !$lC_Database->isError() ) {\n lC_Cache::clear('templates_' . $_GET['set'] . '_layout');\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "8a13ce2a118cc76dca96c684e2d685c1", "score": "0.5321415", "text": "public function removeTemplateFile(string $fileName)\n {\n $config = $this->getAlertingConfigs();\n $templateFiles = (array) $config['template_files'];\n $templateFileName = $fileName . '.tmpl';\n\n if (is_null($templateFiles))\n {\n throw new TemplateNotExist('Template not exist.');\n }\n else\n {\n if (!array_key_exists($templateFileName, $templateFiles))\n {\n throw new TemplateNotExist('Template not exist.');\n }\n }\n\n unset($config['template_files'][$templateFileName]);\n\n $this->op->request('POST', '/api/prom/configs/alertmanager', [\n 'headers' => [\n 'X-Scope-OrgID' => $this->consumerId,\n ],\n 'json' => $config,\n ]);\n }", "title": "" }, { "docid": "1c5b747ca57e21952fc7ea8f9623b9d1", "score": "0.5316652", "text": "protected function _deleteEntity( $id )\n\t\t{\n\t\t\t$data = explode( '__', $id );\n\t\t\t$template = array_pop( $data );\n\t\t\t$type = str_replace( '.phtml', '', $template );\n\t\t\t// Delete a file.\n\t\t\tif ( count( $data ) > 1 ) {\n\t\t\t\t$directory = $this->_getTypeDirectory( $type );\n\t\t\t\tif ( is_file( $directory . $id ) ) {\n\t\t\t\t\tunlink( $directory . $id );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "ca1dcf58f662c28ce6177ce4eedb7ce3", "score": "0.5296102", "text": "public function deleteDetailContentTemplate($id)\n {\n $nullContent = null;\n $response = $this->post(\n Resources::$TemplateDetailcontent,\n ['id' => $id, 'body' => $nullContent]\n );\n if (!$response->success()) {\n $this->throwError(\n 'MailjetService:deleteDetailContentTemplate() failed',\n $response\n );\n }\n return $response->getData();\n }", "title": "" }, { "docid": "77f25d0b0eba75733218a74dea46eb7e", "score": "0.52891445", "text": "public function testDeleteWebhookQueueTemplateMessage()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhookQueueTemplateMessageDelete());\n\n $webhook = $sw->deleteWebhookQueueTemplateMessage('TestingGUID', 'MessageID');\n $this->assertInstanceOf(SmartwaiverWebhookMessageDelete::class, $webhook);\n\n $this->checkDeleteRequests($container, ['/v4/webhooks/queues/template/TestingGUID/MessageID']);\n }", "title": "" }, { "docid": "8d9b10d23d0e37efa623c518bc387a1c", "score": "0.5275666", "text": "public function destroy($id, Request $request)\n {\n \n $deleteVM = VM::with('rework')->find($id);\n \n $path = storage_path('app/'.$deleteVM->dir);\n $process = new Process('terraform12 destroy -var=\"project='.$deleteVM->project.'\" -lock=false -no-color -auto-approve');\n //$process = new Process('ping -c 50 www.google.com');\n $process->setTimeout(3600);\n $process->setWorkingDirectory($path);\n $process->run();\n Log::debug($process->getOutput()); \n if ($process->isSuccessful()) {\n $deleteVM->active = 0;\n $deleteVM->jira = $deleteVM->jira.'/'.$request->jira;\n $deleteVM->deleted_by = Auth::user()->name;\n if($deleteVM->save()){\n\n if(count($deleteVM->rework)){\n $this->openstack->deleteVolume($deleteVM);\n }\n\n Mail::to('[email protected]')->send(new IpUpdateNotification($deleteVM));\n $explodeHostname = explode('.',$deleteVM->hostname);\n $policy = $explodeHostname[0].'_'.$deleteVM->username;\n\n $cookieName = 'del-'.$deleteVM->name;\n $this->ipa->login($cookieName);\n // $this->ipa->deleteUser($deleteVM->username, $cookieName);\n $this->ipa->deleteHost($deleteVM->hostname, $cookieName);\n $this->ipa->deletePolicy($policy, $cookieName);\n $this->ipa->delDNS($explodeHostname[0], $cookieName);\n Log::info($deleteVM->vmname.'- VM deleted');\n return $deleteVM->id;\n }\n }else{\n dd('error');\n }\n\n\n \n }", "title": "" }, { "docid": "38fe519ea5f9253b8f9706c85955ba6b", "score": "0.5269952", "text": "public static function removeById($id)\n\t{\n\t\treturn static::create()->removeByEntity(TemplateTable::getEntity(), $id);\n\t}", "title": "" }, { "docid": "a73831054e25f55f4460949fae7d6373", "score": "0.52654165", "text": "public function destroy(CustomerOrderTemplate $customerordertemplate)\n {\n $id = $customerordertemplate->id;\n\n $customerordertemplate->delete();\n\n return redirect('customerordertemplates')\n ->with('success', l('This record has been successfully deleted &#58&#58 (:id) ', ['id' => $id], 'layouts'));\n }", "title": "" }, { "docid": "5bb36f163668a235aa80821b0746c2bc", "score": "0.52445024", "text": "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "title": "" }, { "docid": "e85b16a3beb4addf2a3c0abbe7789c2d", "score": "0.5226968", "text": "public function executeDelTemple(sfWebRequest $request) {\r\n\t\t$this->forward404Unless($request->isMethod(sfRequest::POST));\r\n\r\n\t\t$id = $request->getParameter('id');\r\n\t\t$temple = Doctrine_Core::getTable('Temple')->findOneById($id);\r\n\t\tif($temple) {\r\n\t\t\t$temple->delete();\r\n\t\t\t$this->flashDelSuccess();\r\n\t\t}\r\n\r\n\t\treturn $this->renderText(1);\r\n\t}", "title": "" }, { "docid": "278bbb57db72b715597a2c74495da03e", "score": "0.5204962", "text": "public function DeleteContentElementRecord(Params $params) {\n $template=$params->getOrFail('id_template','is_not0_integer','Invalid template identifier!');\n $pIndex=$params->getOrFail('pindex','is_integer','Invalid page position!');\n $id=$params->getOrFail('id','is_not0_integer','Invalid field identifier!');\n $result=DataProvider::Get('Plugins\\DForms\\Templates','UnsetField',['for_id'=>$id]);\n if($result===FALSE) {\n throw new AppException('Unknown database error!');\n }\n $target=$params->safeGet('target','','is_string');\n $cTarget=$params->safeGet('c_target','','is_string');\n $this->Exec('ShowContentTable',['id_template'=>$template,'pindex'=>$pIndex,'target'=>$target,'c_target'=>$cTarget],$target);\n }", "title": "" }, { "docid": "9b0614e75ca28a4053dd7a324826ebb9", "score": "0.5195542", "text": "public function taskDelete(): void\n {\n $directory = $this->getDirectory();\n if (!$directory) {\n throw new RuntimeException('Not Found', 404);\n }\n\n $object = null;\n try {\n $object = $this->getObject();\n if ($object && $object->exists()) {\n $authorized = $object instanceof FlexAuthorizeInterface\n ? $object->isAuthorized('delete', 'admin', $this->user)\n : $directory->isAuthorized('delete', 'admin', $this->user);\n\n if (!$authorized) {\n throw new RuntimeException($this->admin::translate('PLUGIN_ADMIN.INSUFFICIENT_PERMISSIONS_FOR_TASK') . ' delete.', 403);\n }\n\n $object->delete();\n\n $this->admin->setMessage($this->admin::translate('PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_DELETE_SUCCESS'));\n if ($this->currentRoute->withoutGravParams()->getRoute() === $this->referrerRoute->getRoute()) {\n $redirect = dirname($this->currentRoute->withoutGravParams()->toString(true));\n } else {\n $redirect = $this->referrerRoute->toString(true);\n }\n\n $this->setRedirect($redirect);\n\n $this->grav->fireEvent('onFlexAfterDelete', new Event(['type' => 'flex', 'object' => $object]));\n }\n } catch (RuntimeException $e) {\n $this->admin->setMessage($this->admin::translate(['PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_DELETE_FAILURE', $e->getMessage()]), 'error');\n\n $this->setRedirect($this->referrerRoute->toString(true), 302);\n }\n }", "title": "" }, { "docid": "879266d06d9317f8658bd408d433f55f", "score": "0.5185633", "text": "function delete() {\n\t\t$sqlStatements = array();\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS tags\";\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS siteViews\";\n\t\texecuteSqlStatements($sqlStatements);\n\t}", "title": "" }, { "docid": "e3f43f68ef904c852402b8c411de09b3", "score": "0.5183671", "text": "public function destroy($id)\n {\n ProductTemplateModel::findOrFail($id)->delete();\n Toastr::success('Product Deleted Successfully', '', [\"positionClass\" => \"toast-top-right\"]);\n return back();\n }", "title": "" }, { "docid": "e1a531ce883a0122738688ee9179a8ab", "score": "0.51774013", "text": "public final function delete() {\n }", "title": "" }, { "docid": "3fc6a946cbe052a0697315d4db639e74", "score": "0.5152623", "text": "public function deleteTemplateWithHttpInfo($template_id)\n {\n // verify the required parameter 'template_id' is set\n if ($template_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $template_id when calling deleteTemplate');\n }\n // parse inputs\n $resourcePath = \"/template/{templateId}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'application/xml']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']);\n\n // path params\n if ($template_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"templateId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($template_id),\n $resourcePath\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('ApiKey');\n if (strlen($apiKey) !== 0) {\n $headerParams['ApiKey'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\BumbalCommunicationAdmin\\Model\\ApiResponse',\n '/template/{templateId}'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\BumbalCommunicationAdmin\\Model\\ApiResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\BumbalCommunicationAdmin\\Model\\ApiResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "a3863910a741f5d0ab74fe792fc1de36", "score": "0.51517904", "text": "public function destroy(TournamentTemplate $tournamentTemplate)\n {\n if ($tournamentTemplate === null) {\n return GeneralHelper::sendNotification(NotificationTypes::ERROR, \"Diese Wettkampf-Vorlage existiert nicht in der Datenbank.\");\n }\n $tournamentTemplateName = $tournamentTemplate->tournament_name;\n $tournamentTemplate->delete();\n return GeneralHelper::sendNotification(NotificationTypes::SUCCESS, \"Die Wettkampf-Vorlage \\\"\" . $tournamentTemplateName . \"\\\" wurde erfolgreich gelöscht.\");\n }", "title": "" }, { "docid": "45e20e350f36841855698d05719aa5cd", "score": "0.51496744", "text": "public function sitePageDeleteAction ()\n {\n\t\t$Page = Tg_Site::getInstance ()->getPageById($this->_getParam ('id'));\n\t\tif (!$Page)\n\t\t\tthrow new Exception (\"Page not found\");\n\t\t\t\n\t\tif ($Page->locked)\n\t\t\tthrow new Exception (\"Page is locked\");\n\t\t\n \t$Page->delete();\n \t\n\t\techo '{\"success\":true,\"msg\":\"Delete successful\"}';\n\t\tdie;\n }", "title": "" }, { "docid": "7e6fcc7d50136bb9e1ca747fea127024", "score": "0.5149163", "text": "public function delete()\n\t{\n\t\t$this->hard_delete();\n\t}", "title": "" }, { "docid": "6ffeb9dd7505e3508c0c580e0733fd29", "score": "0.5139418", "text": "public function delete()\n {\n Contest::destroy($this->modelId);\n $this->modalConfirmDeleteVisible = false;\n $this->resetPage();\n }", "title": "" }, { "docid": "297ff8ba8b101555b1bc29057af425c5", "score": "0.5132496", "text": "public function testDelete()\n {\n $context = $this->createPageContext();\n $storage = $this->createStorage();\n $tokenStorage = $this->createTokenStorage();\n\n $layout1 = $storage->create();\n $layout2 = $storage->create();\n $layout3 = $storage->create();\n\n $context->addLayoutList([$layout1->getId(), $layout2->getId(), $layout3->getId()]);\n $token = $context->createEditToken([$layout1->getId(), $layout3->getId()], ['user_id' => 17]);\n $tokenString = $token->getToken();\n $tokenStorage->saveToken($token);\n\n // Save our editable instances\n $tokenStorage->update($tokenString, $layout1);\n $tokenStorage->update($tokenString, $layout3);\n\n // Validate that load still work\n $tokenStorage->loadToken($tokenString);\n $tokenStorage->loadMultiple($tokenString, [$layout1->getId(), $layout3->getId()]);\n\n // And now delete\n $tokenStorage->deleteAll($tokenString);\n\n try {\n $tokenStorage->loadToken($tokenString);\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n try {\n $tokenStorage->loadMultiple($tokenString, [$layout1->getId()]);\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n try {\n $tokenStorage->load($tokenString, $layout3->getId());\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n }", "title": "" }, { "docid": "8105269630f84e3a59e9e61ea9aeea60", "score": "0.5106923", "text": "public function delete()\n {\n $filesystem = $this->localFilesystem(dirname($this->path));\n\n method_exists($filesystem, 'deleteDir')\n ? $filesystem->deleteDir(basename($this->path))\n : $filesystem->deleteDirectory(basename($this->path));\n }", "title": "" }, { "docid": "b96521ac0a45d4af2abd98a169f470e6", "score": "0.51061463", "text": "public function delete(): void\n {\n unlink($this->getPath());\n }", "title": "" }, { "docid": "f62c9b44a8d0c51bcfc43d16b7cbd100", "score": "0.50848997", "text": "public function actionDelete()\n {\n if ($post = Template::validateDeleteForm()) {\n $id = $post['id'];\n $this->findModel($id)->delete();\n }\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "02436278b72d788803fbd1efa4067eef", "score": "0.5077231", "text": "public function delete(): void\n {\n unlink($this->path);\n }", "title": "" }, { "docid": "e36beb2fe688fa9ad3d5830ed09cf88c", "score": "0.5052631", "text": "public function DELETE() {\n\t\t$this->scriptForceHint('DELETE');\n\t}", "title": "" }, { "docid": "ee1ac934befb838bb5a6464e7e4edea9", "score": "0.5046957", "text": "protected function process_mailtemplate__delete($p_id)\n {\n if (!is_array($p_id))\n {\n $p_id = [$p_id];\n } // if\n\n $this->m_dao->delete_mailtemplate(array_filter($p_id, 'is_numeric'));\n }", "title": "" }, { "docid": "5e06cee20f9c4d9dc8bea70fdbb9e8ef", "score": "0.50429606", "text": "public function delete() {\n\t\t$this->deleted = true;\n\t}", "title": "" }, { "docid": "c1b55c96fa995477eb8d4c8ba623cbf7", "score": "0.50355417", "text": "public function delete() {\n global $DB;\n\n if ($this->id) {\n $fs = get_file_storage();\n $contextid = $this->df->context->id;\n foreach ($this::get_file_areas() as $filearea) {\n $fs->delete_area_files($contextid, $this->component, $filearea, $this->id);\n }\n\n $DB->delete_records('dataform_views', array('id' => $this->id));\n\n // Trigger an event for deleting this view.\n $event = \\mod_dataform\\event\\view_deleted::create($this->default_event_params);\n $event->add_record_snapshot('dataform_views', $this->data);\n $event->trigger();\n }\n\n return true;\n }", "title": "" }, { "docid": "cdc10a955c6fea4814533dc91b2fea3a", "score": "0.50344276", "text": "public function delete()\n {\n // TODO: Implement delete() method.\n }", "title": "" }, { "docid": "6396744829089dbb5b603c6328743658", "score": "0.50312173", "text": "public static function delete(){\n\t\tglobal $current_user;\n\t\tinsert('DELETE FROM tag WHERE id=' . $_POST['id'] .\n\t\t\t\t'AND user_id=' . $current_user['id']);\n\t}", "title": "" }, { "docid": "a49cbfdf36108ebf65e2733975db1040", "score": "0.5014913", "text": "public function delete() {\n\t\t$query = new WP_Query( array(\n\t\t\t'name' => $this->params['post_name'],\n\t\t\t'post_type' => $this->params['post_type']\n\t\t) );\n\n\t\t$post = array_shift( $query->posts );\n\n\t\t// die('<pre>'.var_export($post,true).'</pre>');\n\n\t\tif ( $post ) {\n\t\t\t$current_action = $this->get_current_action();\n\t\t\t$this->action_results[ 'status' ] = 'success';\n\t\t\t$this->action_results[ 'messages' ][ $post->post_type ][ $post->ID ][ 'note' ] = __( 'The information has been deleted', 'kickpress' );\n\t\t\t$this->action_results[ 'data' ][ 'post_id' ] = $post->ID;\n\n\t\t\twp_trash_post( $post->ID );\n\t\t}\n\t}", "title": "" }, { "docid": "9a5dfeb522e8b8883397ebfbc0e9d95b", "score": "0.50045353", "text": "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "title": "" }, { "docid": "bc81a0bb4d1dfb124b4d04600d0ad115", "score": "0.49735302", "text": "function delete() {\n\t\t\n\t\t$this->autoRender = false;\n\t\t$this->layout = \"\";\n\t\t\n\t\tConfigure::write('debug', 0);\n\t\t\n\t\t$id = $this->Session->read('Member.memberid');\n\t\t\n\t\t// id 4 means trash\n\t\t\n\t\t$activeid = 4;\n\t\t\t$this->Member->updateAll(array(\n\t\t\t\t'Member.active' => \"'\" . $activeid . \"'\"\n\t\t\t), array(\n\t\t\t\t'Member.id' => $id\n\t\t\t));\n\t\t\n\t\techo \"deleted\";\n\t\t\t\n\t\n\t/*\tif ($id) {\n\t\t\t\n\t\t\t$delete = $this->Member->delete($id);\n\t\t\t\n\t\t \tif ($delete) {\n\t\t\t\t$meta = $this->userMeta->deleteAll(array(\n\t\t\t\t\t'userMeta.member_id' => $id\n\t\t\t\t));\n\t\t\t\t$course = $this->TutCourse->deleteAll(array(\n\t\t\t\t\t'TutCourse.member_id' => $id\n\t\t\t\t));\n\t\t\t\t$event = $this->TutEvent->deleteAll(array(\n\t\t\t\t\t'TutEvent.tutor_id' => $id\n\t\t\t\t));\n\t\t\t\t$image = $this->UserImage->deleteAll(array(\n\t\t\t\t\t'UserImage.user_id' => $id\n\t\t\t\t));\n\t\t\t\t\n\t\t\t}\n\t\t\tif ($meta) {\n\t\t\t\techo \"deleted\";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} */\n\t\t\n\t\t\n\t\n\t\n\t}", "title": "" }, { "docid": "fec7f9df8f756756c9a59104260b131e", "score": "0.49680415", "text": "function unset_template()\r\n\t{\r\n\t\t$this->_template = null;\r\n\t\t$this->set_mode(self::OUTPUT_MODE_NORMAL);\r\n\t}", "title": "" } ]
1f66b6bcd291a054f95fd2b01f348a0e
========================================================================================================================================================= PROSESS COPY ========================================================================================================================================================= copy megamenu
[ { "docid": "9ab8527928cc22c70b1647e78a3f4fef", "score": "0.6200462", "text": "public function copyMegamenu($sourceId=0, $ajax = true){\n\t\t\t\t\n\t\tif(!$sourceId) $sourceId = Tools::getValue('id', 0);\n\t\t$response = new stdClass();\n\t\tif($sourceId >0){\n\t\t\t$item = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(\"Select * From \"._DB_PREFIX_.\"megaboxs_module Where id = $sourceId\");\t\t\t\n\t\t\tif($item){\n\t\t\t\t$shopId = Context::getContext()->shop->id;\n\t\t\t\t$themeId = (int)$this->context->shop->id_theme;\n\t\t\t\t$theme = new Theme($themeId);\n\t\t\t\t$optionDirectory = Configuration::get('CURRENT_OPTION_DIR') ? Configuration::get('CURRENT_OPTION_DIR') : '';\t\t\n\t\t\t\t$sourceItemLanguages = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(\"Select * From \"._DB_PREFIX_.\"megaboxs_module_lang Where `module_id`='$sourceId'\");\n\t\t\t\t$maxOrdering = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(\"Select MAX(ordering) From \"._DB_PREFIX_.\"megaboxs_module Where `position_name` = '\".$item['position_name'].\"'\");\n\t\t \t\tif($maxOrdering >0) $maxOrdering++;\n\t\t \t\telse $maxOrdering = 1;\t\t\t\t\n\t\t\t\t$arrInsert = array(\n\t\t\t\t\t'id_shop'\t\t\t=>\t$shopId,\n\t\t\t\t\t'theme_directory'\t=>\t$theme->directory,\n\t\t\t\t\t'option_directory'\t=>\t$optionDirectory,\n\t\t\t\t\t'position_name'\t\t=>\t$item['position_name'],\n\t\t\t\t\t'layout'\t\t\t=>\t$item['layout'],\n\t\t\t\t\t'display_name'\t\t=>\t$item['display_name'],\n\t\t\t\t\t'show_count'\t\t=>\t$item['show_count'],\n\t\t\t\t\t'custom_class'\t\t=>\t$item['custom_class'],\t\t\t\t\t\n\t\t\t\t\t'status'\t\t\t=>\t$item['status'],\n\t\t\t\t\t'ordering'\t\t\t=>\t$maxOrdering,\n\t\t\t\t);\n\t\t\t\tif(Db::getInstance(_PS_USE_SQL_SLAVE_)->insert('megaboxs_module', $arrInsert)){\n\t\t\t\t\t$insertId = Db::getInstance(_PS_USE_SQL_SLAVE_)->Insert_ID();\n\t\t\t\t\t$arrInserts = array();\n\t\t\t\t\tforeach($sourceItemLanguages as $i=>$sourceItemLanguage){\n\t\t\t\t\t\t$arrInserts[] = array(\n\t\t\t\t\t\t\t'module_id'\t=>\t$insertId,\n\t\t\t\t\t\t\t'id_lang'\t=>\t$sourceItemLanguage['id_lang'],\n\t\t\t\t\t\t\t'name'\t\t=>\t$this->l('Copy ').$sourceItemLanguage['name'],\n\t\t\t\t\t\t); \n\t\t\t\t\t}\n\t\t\t\t\tif($arrInserts) Db::getInstance(_PS_USE_SQL_SLAVE_)->insert('megaboxs_module_lang', $arrInserts);\n\t\t\t\t\t$rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(\"Select id From \"._DB_PREFIX_.\"megaboxs_row Where module_id = \".$sourceId);\n\t\t\t\t\tif($rows)\n\t\t\t\t\t\tforeach($rows as $row)\n\t\t\t\t\t\t\t$this->copyRow($row['id'], false, $insertId);\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif($ajax === false) return true;\n\t\t\t\t$response->status = '1';\n \t$response->msg = $this->l('Copy menu successful');\n\t\t\t}else{\n\t\t\t\tif($ajax === false) return false;\n\t\t\t\t$response->status = '0';\n \t$response->msg = $this->l('Menu not found');\n\t\t\t}\n\t\t}else{\n\t\t\tif($ajax === false) return false;\n\t\t\t$response->status = '0';\n $response->msg = $this->l('Menu not found');\n\t\t}\n\t\tdie(Tools::jsonEncode($response));\n\t}", "title": "" } ]
[ { "docid": "acc7e3cb4032088e2d7851b0d23bd54c", "score": "0.6568808", "text": "function aktt_menu_items() {\n/*\n\tif (current_user_can('manage_options')) {\n\t\tadd_options_page(\n\t\t\t__('Auto Shop Options', 'auto-shop')\n\t\t\t, __('Auto Shop', 'auto-shop')\n\t\t\t, 10\n\t\t\t, basename(__FILE__)\n\t\t\t, 'autoshop_options_form'\n\t\t);\n\t}\n*/\n\tif (current_user_can('publish_posts')) {\n\t\tadd_menu_page(\n\t\t\t'Auto Shop'\n , 'Auto Shop'\n , 2\n , 'autoshop-menu'\n\t\t);\n\t\tadd_submenu_page(\n\t\t\t'autoshop-menu'\n\t\t\t,'Edit Vehicle'\n\t\t\t,'Edit Vehicle'\n\t\t\t, 2\n\t\t\t, 'autoshop-menu'\n\t\t\t, 'autoshop_edit_vehicle_form'\n\t\t);\n\t\tadd_submenu_page(\n\t\t\t'autoshop-menu'\n\t\t\t,'New Vehicle'\n\t\t\t,'New Vehicle'\n\t\t\t, 2\n\t\t\t, basename(__FILE__)\n\t\t\t, 'autoshop_new_vehicle_form'\n\t\t);\n\t}\n}", "title": "" }, { "docid": "55de2791884927e33c453fdd10f76539", "score": "0.6472001", "text": "function mtmb_tools_menu_on_collapse() {\n\t$menu_to_insert='';\n\tif ( is_user_logged_in() ) {\n\t\t$tool_sub_items = array();\n\t\t$tool_sub_items['Admin'] = get_site_url() .'/wp-admin/';\n\t\tif (get_edit_post_link() !='' ) {\n\t\t\t$tool_sub_items['Edit Page'] = get_edit_post_link(); \n\t\t}\n\t\t// only if the theme has a menu location of header\n\t\tif ( ! current_user_can('subscriber') ) {\n\t\t\t$edit_link = get_edit_post_link();\n\t\t\t$menu_to_insert.=\"<li class='menu-item tg-xt' ><a href='/'>Tools</a>\";\n\t\t\t$menu_to_insert.=\t\"<ul class='sub-menu'>\";\n\t\t\t// add the submenu items under tools\n\t\t\tforeach ($tool_sub_items as $name=>$link) {\n\t\t\t\t$menu_to_insert.=\"<li class='menu-item tg-xt'><a href='\". $link .\"'>\". $name .\"</a></li>\";\n\t\t\t}\n\t\t\t$menu_to_insert.=\"</ul>\";\n\t\t\t$menu_to_insert.=\"</li>\";\n\t\t}\n\t}\t\n\treturn $menu_to_insert;\n}", "title": "" }, { "docid": "e63f7a9370e3db0c82bfc2ffadf52c0a", "score": "0.6351395", "text": "function customize_admin_menus() {\n}", "title": "" }, { "docid": "b13241e47d803a00e6295f0fd93f22df", "score": "0.6333993", "text": "function cmgc_admin_create_menu() {\n add_menu_page('CMGC Admin', \"CMGC Admin\", \n 'edit_pages', 'cmgc-admin-menu', 'cmgc_admin_show_menu',\n 'dashicons-admin-home', 99);\n \n add_submenu_page('cmgc-admin-menu', // slug name for parent menu\n 'Membership Waitlist', // title of page\n 'Membership Waitlist', // name of sub-menu\n 'edit_pages', // minimum capability (editor)\n 'cmgc-admin-membership-waitlist', // slub name for submenu\n 'cmgc_admin_membership_waitlist_page'); // function to call\n\n add_submenu_page('cmgc-admin-menu', 'Membership Applications', 'Membership Applications',\n 'edit_pages', 'cmgc-admin-membership-applications', 'cmgc_admin_membership_application_page');\n\n }", "title": "" }, { "docid": "91950f27395f81347dab9a31d025f9a1", "score": "0.6315937", "text": "function loja_produtos_modifymenu() {\n\tadd_menu_page('produtos', //page title\n\t'Produtos', //menu title\n\t'manage_options', //capabilities\n\t'loja_produtos_list', //menu slug\n\tloja_produtos_list //function\n\t);\n\t\n\t//this is a submenu\n\tadd_submenu_page('loja_produtos_list', //parent slug\n\t'Adicionar Novo Produto', //page title\n\t'Adicionar', //menu title\n\t'manage_options', //capability\n\t'loja_produtos_create', //menu slug\n\t'loja_produtos_create'); //function\n\t\n\t//this submenu is HIDDEN, however, we need to add it anyways\n\tadd_submenu_page(null, //parent slug\n\t'Atualizar Produtos', //page title\n\t'Atualizar', //menu title\n\t'manage_options', //capability\n\t'loja_produtos_update', //menu slug\n\t'loja_produtos_update'); //function\n}", "title": "" }, { "docid": "220af442eb8063388bd39c3e3dfe90f0", "score": "0.62859446", "text": "function build () {\n foreach ( $this->items as $item ) {\n if ( $item->parent_id() == $this->current->id() ) {\n $this->menu[]=$item;\n }\n }\n reset ( $this->menu );\n }", "title": "" }, { "docid": "987ea0c061922ecb9bd13d5589f47a65", "score": "0.6239061", "text": "public function Base_Render_Before($Sender) {\n // $Session = Gdn::Session();\n // if ($Sender->Menu && $Session->IsValid()) { \n if ($Sender->Menu) { \n $itemname1 = (C('Plugins.AddMenuitem.Name1'));\n $itemlink1 = (C('Plugins.AddMenuitem.Link1'));\n $itemname2 = (C('Plugins.AddMenuitem.Name2'));\n $itemlink2 = (C('Plugins.AddMenuitem.Link2'));\n $itemname3 = (C('Plugins.AddMenuitem.Name3'));\n $itemlink3 = (C('Plugins.AddMenuitem.Link3')); \n $itemname4 = (C('Plugins.AddMenuitem.Name4'));\n $itemlink4 = (C('Plugins.AddMenuitem.Link4')); \n $itemname5 = (C('Plugins.AddMenuitem.Name5'));\n $itemlink5 = (C('Plugins.AddMenuitem.Link5')); \n\n $IsMobile = (IsMobile());\n\n if (!$IsMobile) { \n if (($itemname1) && ($itemlink1)) {\n $Sender->Menu->AddLink($itemname1, T($itemname1), $itemlink1,FALSE,array('class' => 'sub-menu'),array('class' => 'sub-anchor'));\n }\n if ($itemname2 && $itemlink2) {\n $Sender->Menu->AddLink($itemname2, T($itemname2), $itemlink2,FALSE,array('class' => 'sub-menu'),array('class' => 'sub-anchor'));\n }\n if (($itemname3) && ($itemlink3)) {\n $Sender->Menu->AddLink($itemname3, T($itemname3), $itemlink3,FALSE,array('class' => 'sub-menu'),array('class' => 'sub-anchor'));\n }\n }\n if (($itemname4) && ($itemlink4)) {\n $Sender->Menu->AddLink($itemname4, T($itemname4), $itemlink4,FALSE,array('class' => 'sub-menu'),array('class' => 'sub-anchor'));\n }\n if (($itemname5) && ($itemlink5)) {\n $Sender->Menu->AddLink($itemname5, T($itemname5), $itemlink5,FALSE,array('class' => 'sub-menu'),array('class' => 'sub-anchor'));\n }\n \n }\n \n }", "title": "" }, { "docid": "f1768c25d96fa0e5af0c8ed150024001", "score": "0.62361974", "text": "function menuMulti2($data,$parent_id=0,$ul=\"cat_menu\"){\n\techo '<ul class=\"'.$ul.'\">';\n\tforeach ($data as $value) {\n\t\t$id=$value['id_cat'];\n\t\t$name=$value['namecat'];\n\t\t$text=editString($name);\n\t\t$url=route('shop.cat.index',['namecat'=>$text,'id'=>$id]);\n\t\tif($value['parent_id']==$parent_id){\n\t\t\techo '<li><a href=\"'.$url.'\">'.$name.'</a>';\n\t\t\tmenuMulti2($data,$id,'');\n\t\t\techo'</li>';\n\t\t}\n\t}\n\techo '</ul>';\n}", "title": "" }, { "docid": "15aa63652ece4a36f97f37f6b548381a", "score": "0.6219649", "text": "function menu_drop_child($link, $title){\r\n global $url;\r\n echo '<li><a href=\"'.BASE_PATH.'/'.$link.'\">'.$title.'</a></li>\r\n ';\r\n}", "title": "" }, { "docid": "a1b682c7482ca23a59f783647ecacd60", "score": "0.6215347", "text": "function _cb_admin_menu(): void {\n\tglobal $submenu;\n\tif ( isset( $submenu['themes.php'] ) ) {\n\t\t$customize_menu_index = -1;\n\t\tforeach ( $submenu['themes.php'] as $index => $menu_item ) {\n\t\t\tforeach ( $menu_item as $data ) {\n\t\t\t\tif ( strpos( $data, 'customize' ) === 0 ) {\n\t\t\t\t\t$customize_menu_index = $index;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( -1 !== $customize_menu_index ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tunset( $submenu['themes.php'][ $customize_menu_index ] );\n\t}\n}", "title": "" }, { "docid": "0a9fbb326095c90b78c22a43ae6809e3", "score": "0.61982983", "text": "function add_images_to_special_submenu( $items ) {\n $special_menu_parent_ids = array();\n\n foreach ( $items as $item ) {\n if ( in_array( 'bb-special-dropdown', $item->classes, true ) && isset( $item->ID ) ) {\n $special_menu_parent_ids[] = $item->ID;\n }\n\n if ( in_array( $item->menu_item_parent, $special_menu_parent_ids ) && has_post_thumbnail( $item->object_id ) ) {\n $item->title = sprintf(\n '%1$s %2$s',\n get_the_post_thumbnail( $item->object_id, 'medium', array( 'alt' => esc_attr( $item->title ) ) ),\n $item->title\n );\n }\n }\n\n return $items;\n}", "title": "" }, { "docid": "36627d26931c92c82fce9d83ddcaaa35", "score": "0.6157441", "text": "function rabe_menu_item() {\n\t\tif ( is_admin() ) {\n\t\t\t// Move broadcast menu\n\t\t\tremove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=broadcast' ); // Remove broadcast taxonomy submenu\n\t\t\tadd_menu_page( __('Broadcasts', 'rabe' ), __('Broadcasts', 'rabe' ), 'edit_posts', 'edit-tags.php?taxonomy=broadcast', null, 'dashicons-category', 4 ); // Add broadcast taxonomy menu\n\t\t}\n\t}", "title": "" }, { "docid": "d8bdee027bd0685321fa03d01359805a", "score": "0.614785", "text": "function jaw_add_AdminMenu() {\n\n// add children menu elements to parent\n add_submenu_page('tools.php', // $parent_slug\n 'Fragment caching', // $page_title\n 'Fragment caching', // $menu_title\n 'manage_options', // $capability\n 'jaw_fragment_caching', // $menu_slug\n 'jaw_admin_ctrl_fragment_caching_main', // $function\n );\n}", "title": "" }, { "docid": "92e002fd21f60144387ca07085f52970", "score": "0.6144926", "text": "function premio_products_modifymenu() {\n\tadd_menu_page('Products', //page title\n\t'Products', //menu title\n\t'manage_options', //capabilities\n\t'premio_products_list', //menu slug\n\t'premio_products_list' //function\n\t);\n\t\n\t//this is a submenu\n\tadd_submenu_page('premio_products_list', //parent slug\n\t'Add New Product', //page title\n\t'Add New', //menu title\n\t'manage_options', //capability\n\t'premio_products_create', //menu slug\n\t'premio_products_create'); //function\n\t\n\t//this submenu is HIDDEN, however, we need to add it anyways\n\tadd_submenu_page(null, //parent slug\n\t'Update Product', //page title\n\t'Update', //menu title\n\t'manage_options', //capability\n\t'premio_products_update', //menu slug\n\t'premio_products_update'); //function\n}", "title": "" }, { "docid": "2b62568d0fdc6c6b5dbff418968b4de8", "score": "0.6141736", "text": "public function createMenu()\n {\n $this->createMenuItem(\n array(\n 'label' => 'Import/Export Advanced',\n 'controller' => 'SwagImportExport',\n 'class' => 'sprite-server--plus',\n 'action' => 'Index',\n 'active' => 1,\n 'parent' => $this->Menu()->findOneBy(array('label' => 'Inhalte')),\n 'position' => 6,\n )\n );\n }", "title": "" }, { "docid": "04a80c73407c47af6850e5e0af04de97", "score": "0.61377835", "text": "function bp_admin_menu() {\n\t$menupg = add_menu_page(TBP_GULP_PLUGIN_NAME, TBP_GULP_PLUGIN_NAME, 'manage_options', __FILE__, 'bp_plugin_admin');\n add_submenu_page(__FILE__, 'Imported Articles', 'Imported Articles', 'manage_options', __FILE__.'/custom', 'clivern_render_custom_page');\n\n\t// Enqueues JS only on our page\n\tadd_action( 'load-'.$menupg, 'bp_admin_head' );\n\n\n \n}", "title": "" }, { "docid": "0ccce84d2cd0d8525039a0f9f93d505d", "score": "0.61262715", "text": "public function action_admin_menu_late() {\n\t\tglobal $menu;\n\n\t\t// Hide posts menu because we don't use posts\n\t\tunset( $menu[ 5 ] );\n\n\t\t// Orient video, media, liveblog and zones\n\t\t/* $liveblog = array(\n\t\t\tesc_html__( 'Liveblogs', 'chicagosuntimes' ),\n\t\t\t'edit_posts',\n\t\t\t'edit.php?post_type=cst_liveblog',\n\t\t\t'',\n\t\t\t'menu-top menu-icon-cst_liveblog',\n\t\t\t'menu-posts-cst_liveblog',\n\t\t\t'dashicons-format-status',\n\t\t); */\n\t\t$media = $menu[ 10 ];\n\t\t$zones = $menu[ 11 ];\n\t\t$video = $menu[ 12 ];\n\n\t\tif ( isset( $menu[ 25 ] ) ) {\n\t\t\t$menu[ 25 ][ 2 ] = 'https://cstbreakingnews.disqus.com/admin/moderate/';\n\t\t}\n\n\t\t//$menu[ 10 ] = $liveblog;\n \t\t$menu[ 10 ] = $media;\n \t\t$menu[ 11 ] = $zones;\n \t\t$menu[ 12 ] = $video;\n\n\t\t// Modify standard taxonomy links\n\t\t$taxonomies = array( 'cst_section', 'cst_person', 'cst_location', 'cst_topic' );\n\t\t$post_types_to_change = CST()->get_post_types();\n\t\tif ( current_user_can( 'adops' ) ) {\n\t\t\t$post_types_to_change[] = 'cst_wire_item';\n\t\t\t$post_types_to_change[] = 'cst_usa_today_item';\n\t\t\t$post_types_to_change[] = 'cst_shia_kapos_item';\n\t\t\t$post_types_to_change[] = 'cst_chicago_item';\n\t\t}\n\t\tforeach ( $post_types_to_change as $post_type ) {\n\t\t\tforeach ( $taxonomies as $taxonomy ) {\n\t\t\t\tremove_submenu_page( 'edit.php?post_type=' . $post_type, 'edit-tags.php?taxonomy=' . $taxonomy . '&amp;post_type=' . $post_type );\n\t\t\t\tif ( current_user_can( 'adops' ) && ! current_user_can( 'manage_options' ) ) {\n\t\t\t\t\tremove_menu_page( 'edit-tags.php?taxonomy=' . $taxonomy . '&amp;post_type=' . $post_type );\n\t\t\t\t\tremove_menu_page( 'edit.php?post_type=' . $post_type );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( current_user_can( 'edit_others_posts' ) ) {\n\t\t\tadd_menu_page( esc_html__( 'Terms', 'chicagosuntimes' ), esc_html__( 'Terms', 'chicagosuntimes' ), 'edit_others_posts', 'edit-tags.php?taxonomy=cst_section', false, 'dashicons-tag', 14 );\n\t\t\tforeach ( $taxonomies as $taxonomy ) {\n\t\t\t\tif ( ! current_user_can( 'adops' ) || current_user_can( 'manage_options' ) ) {\n\t\t\t\t\tadd_submenu_page( 'edit-tags.php?taxonomy=cst_section', get_taxonomy( $taxonomy )->labels->name, get_taxonomy( $taxonomy )->labels->name, 'adops', 'edit-tags.php?taxonomy=' . $taxonomy );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "7df465224dc8bb3feda2d21c81ea3563", "score": "0.6121538", "text": "function admin_menu()\n {\n }", "title": "" }, { "docid": "7df465224dc8bb3feda2d21c81ea3563", "score": "0.6121538", "text": "function admin_menu()\n {\n }", "title": "" }, { "docid": "7df465224dc8bb3feda2d21c81ea3563", "score": "0.6121538", "text": "function admin_menu()\n {\n }", "title": "" }, { "docid": "7df465224dc8bb3feda2d21c81ea3563", "score": "0.6121538", "text": "function admin_menu()\n {\n }", "title": "" }, { "docid": "7df465224dc8bb3feda2d21c81ea3563", "score": "0.6121538", "text": "function admin_menu()\n {\n }", "title": "" }, { "docid": "18fad049e3824c5cf6db2cffd0d2f4cd", "score": "0.60926116", "text": "function vjDn_modifymenu() {\n\tadd_submenu_page(\"menu_transportes\",\n\t'Orden de Viaje-Dineros', //page title\n\t'Orden de Viaje-Dineros', //menu title\n\t'manage_options', //capabilities\n\t'tran_vjDn_list', //menu slug\n\t'tran_vjDn_list' //function\n\t);\n\n\t//this submenu is HIDDEN, however, we need to add it anyways\n\tadd_submenu_page(null, //parent slug\n\t'Update Orden de Viaje-Dineros', //page title\n\t'Update', //menu title\n\t'manage_options', //capability\n\t'tran_vjDn_update', //menu slug\n\t'tran_vjDn_update'); //function\n\n\t//this is a submenu\n\tadd_submenu_page(null, //parent slug\n\t'New Orden de Viaje-Dineros', //page title\n\t'New', //menu title\n\t'manage_options', //capability\n\t'tran_vjDn_create', //menu slug\n\t'tran_vjDn_create'); //function\n\t\n}", "title": "" }, { "docid": "c7475dbf16085e73e6e8fc8d0fb8fbf1", "score": "0.6082752", "text": "function custom_menu_page(){\n\t\t\tinclude_once( COVID19_PATH .'templates/admin.php');\n\t\t}", "title": "" }, { "docid": "f53f27d01132e017251fdc021826338c", "score": "0.6078115", "text": "function vjVh_modifymenu() {\n\tadd_submenu_page(\"menu_transportes\",\n\t'Orden de Viaje-Vehiculo', //page title\n\t'Orden de Viaje-Vehiculo', //menu title\n\t'manage_options', //capabilities\n\t'tran_vjVh_list', //menu slug\n\t'tran_vjVh_list' //function\n\t);\n\n\t//this submenu is HIDDEN, however, we need to add it anyways\n\tadd_submenu_page(null, //parent slug\n\t'Update Orden de Viaje-Vehiculo', //page title\n\t'Update', //menu title\n\t'manage_options', //capability\n\t'tran_vjVh_update', //menu slug\n\t'tran_vjVh_update'); //function\n\n\t//this is a submenu\n\tadd_submenu_page(null, //parent slug\n\t'New Orden de Viaje-Vehiculo', //page title\n\t'New', //menu title\n\t'manage_options', //capability\n\t'tran_vjVh_create', //menu slug\n\t'tran_vjVh_create'); //function\n\t\n}", "title": "" }, { "docid": "6bb8f97f7f89cbc8919769339567376f", "score": "0.6067173", "text": "function genererMenu()\n\t{\n $aMenu = getMenuItems();\n return $aMenu;\n\t}", "title": "" }, { "docid": "0fa2318c6db027d6cdad2c5aa41a0952", "score": "0.6055117", "text": "function catalog_menu($menu_name, $current_page){\n\n\tif (($locations = get_nav_menu_locations()) && isset($locations[$menu_name])) {\n $menu = wp_get_nav_menu_object($locations[$menu_name]);\n\t\t$menu_items = wp_get_nav_menu_items($menu->term_id);\n $menu_items = buildTree($menu_items);\n ?>\n <ul class=\"navbar-nav flex-column\">\n <?php\n foreach( $menu_items as $item ){\n create_menu($item, $current_page);\n }\n ?>\n </ul>\n <?php\n\n\t} else {\n echo (\"Menu is not added!!\");\n }\n\t \n}", "title": "" }, { "docid": "f2d4e9f72af65db57c29ea166c611a36", "score": "0.6049914", "text": "function menuConfig() {\r\n\t\t$this->MOD_MENU = array();\r\n\t\t$this->MOD_MENU['function'] = array();\r\n\t\tforeach ($this->items as $key => $row) {\r\n\t\t\t$this->MOD_MENU['function'] [] = $row['title'];\r\n\t\t}\r\n\t\tparent::menuConfig();\r\n\t}", "title": "" }, { "docid": "4f2538d6e5d02220adf15a028efca491", "score": "0.6036396", "text": "public static function addMenu(){\n add_submenu_page(\n tablebouddha_customtheme::GROUP, // slug parent\n self::SUB1_TITLE, // page_title\n self::SUB1_MENU, // menu_title\n self::PERMITION, // capability\n self::SUB1_GROUP, // slug_menu\n [self::class, 'render'] // CALLBACK\n );\n }", "title": "" }, { "docid": "9af2b06b75eb5858da8de571bc885c22", "score": "0.60320425", "text": "public function admin_menu() {\n\n\t\tadd_submenu_page( 'edit.php?post_type=wpsc-product', __( 'Product Order', 'wpsc-dnd-cat-ui' ), __( 'Product Order', 'wpsc-dnd-cat-ui' ), 'edit_posts', 'wpsc_dnd_cat_ui', array( $this, 'dnd_cat_ui_page' ) );\n\n\t}", "title": "" }, { "docid": "3c9dce042ef3e1321f42f2cbf798db69", "score": "0.6031356", "text": "function add_test_menu()\n{\n $menu = [\n 'icon_class' => 'dashicons-admin-test',\n 'icon-font' => '\\f468',\n 'url' => '/test/default',\n 'text' => '测试',\n 'submenus' => [\n ['/test/default/index', '所有测试', ['default/index']],\n ['/test/default/hello','hello',['default/hello']]\n ],\n ];\n echo get_menu_html($menu);\n}", "title": "" }, { "docid": "a13389aceef7bda720953ef42698a982", "score": "0.601375", "text": "function agilepress_admin_menu() {\n\t$myAgilePress_Admin = new AgilePress_Admin;\n\n\t$return_code = $myAgilePress_Admin->add_leftside_admin_menu();\n}", "title": "" }, { "docid": "e4f97b5f4ced768d8844637141cc737c", "score": "0.60132384", "text": "function loja_clientes_modifymenu() {\n\tadd_menu_page('clientes', //page title\n\t'Clientes', //menu title\n\t'manage_options', //capabilities\n\t'loja_clientes_list', //menu slug\n\tloja_clientes_list //function\n\t);\n\t\n\t//this is a submenu\n\tadd_submenu_page('loja_clientes_list', //parent slug\n\t'Adicionar Clientes', //page title\n\t'Adicionar', //menu title\n\t'manage_options', //capability\n\t'loja_clientes_create', //menu slug\n\t'loja_clientes_create'); //function\n\t\n\t//this submenu is HIDDEN, however, we need to add it anyways\n\tadd_submenu_page(null, //parent slug\n\t'Update Clientes', //page title\n\t'Update', //menu title\n\t'manage_options', //capability\n\t'loja_clientes_update', //menu slug\n\t'loja_clientes_update'); //function\n}", "title": "" }, { "docid": "bf2e897fe9a1ba96ea628a15c4c434fa", "score": "0.6001365", "text": "function menuMulti1($data,$parent_id){\n\techo '<ul>';\n\tforeach ($data as $value) {\n\t\t$id=$value['id_cat'];\n\t\t$name=$value['namecat'];\n\t\t$urlEdit=route('admin.cat.edit',['id'=>$id]);\n\t\t$urlDel=route('admin.cat.del',['id'=>$id]);\n\t\tif($value['parent_id']==$parent_id){\n?>\n\t\t\t<li><?php echo $name;?><span class=\"chucnang\">-<a href=\"<?php echo $urlEdit;?>\">Sửa</a> | <a onclick=\"message('<?php echo $id;?>')\" href=\"javascrpit:void(0)\">Xóa</a>-</span>\n<?php\n\t\t\tmenuMulti1($data,$id);\n\t\t\techo'</li>';\n\t\t}\n\t}\n\techo '</ul>';\n}", "title": "" }, { "docid": "5e76f7a95617df786e36a52d999933df", "score": "0.59900624", "text": "function add_menu() {\n\n\t\tBetter_Framework()->admin_menus()->add_menupage( array(\n\t\t\t\t'id' => $this->page_id,\n\t\t\t\t'slug' => 'better-studio/' . $this->args['slug'],\n\t\t\t\t'name' => __( 'Rebuild Thumbnails', 'publisher' ),\n\t\t\t\t'parent' => 'better-studio',\n\t\t\t\t'page_title' => __( 'Rebuild Thumbnails', 'publisher' ),\n\t\t\t\t'menu_title' => __( 'Rebuild Thumbnails', 'publisher' ),\n\t\t\t\t'position' => 50.02,\n\t\t\t\t'callback' => array( $this, 'display' ),\n\t\t\t)\n\t\t);\n\n\t}", "title": "" }, { "docid": "7d2059d36a048e90350af603d281a50d", "score": "0.5986151", "text": "function wpa_add_menu() {\r\n\r\n add_menu_page( 'recipe', 'recipe', 'manage_options', 'recipe-dashboard', array(\r\n __CLASS__,\r\n 'wpa_page_file_path'\r\n ), plugins_url('images/wp-recipe-logo.png', __FILE__),'2.2.9');\r\n\r\n add_submenu_page( 'recipe-dashboard', 'recipe' . ' Dashboard', ' Dashboard', 'manage_options', 'recipe-dashboard', array(\r\n __CLASS__,\r\n 'wpa_page_file_path'\r\n ));\r\n\r\n add_submenu_page( 'recipe-dashboard', 'recipe' . ' All recipes', '<b style=\"color:#f9845b\">All recipes</b>', 'manage_options', 'recipe-All recipes', array(\r\n __CLASS__,\r\n 'wpa_page_file_path'\r\n ));\r\n\r\n add_submenu_page( 'recipe-dashboard', 'recipe' . ' veg', '<b style=\"color:#f9845b\">veg</b>', 'manage_options', 'recipe-veg', array(\r\n __CLASS__,\r\n 'wpa_page_file_path'\r\n ));\r\n\r\n add_submenu_page( 'recipe-dashboard', 'recipe' . 'Non veg', '<b style=\"color:#f9845b\">Non veg</b>', 'manage_options', 'recipe-Non veg', array(\r\n __CLASS__,\r\n 'wpa_page_file_path'\r\n ));\r\n }", "title": "" }, { "docid": "6fd5d4f8cded0102b72336b26b39d027", "score": "0.5985888", "text": "function sugarforms_menu_items($items) {\n // query sugarforms\n $args = array( 'post_type' => 'sugarform','meta_key' => 'sugarform_display_menu','meta_value'=>'1','meta_compare'=>'=');\n $loop = new WP_Query( $args );\n // add to menu\n if($loop->found_posts > 0) {\n foreach($loop->posts as $post) {\n $new_item = wp_setup_nav_menu_item($post);\n $items[] = $new_item;\n //print_r($new_item);\n }\n }\n return $items;\n }", "title": "" }, { "docid": "8fe930c835d5b8859c92d134824e6897", "score": "0.5982348", "text": "function createMenus() {\r\n foreach ($this->getFormattedMainMenu($this->getMyParam()) as $mainMenu) {\r\n $this->_tpl->assign_block_vars('mainmenu_row',$mainMenu);\r\n }\r\n foreach ($this->getFormattedSubmenu($this->getMyParam().\"_\".$this->getMyMode()) as $exportMenu) {\r\n $this->_tpl->assign_block_vars('submenu_row',$exportMenu);\r\n }\r\n\r\n }", "title": "" }, { "docid": "3e380fe181c1f3ebe87dcbb0b9307f96", "score": "0.59717", "text": "function codernize_configure_dashboard_menu() {\n\tglobal $menu,$submenu;\n\n\tglobal $current_user;\n\tget_currentuserinfo();\n\n\t\t// $menu and $submenu will return all menu and submenu list in admin panel\n\t\t\n\t\t// $menu[2] = \"\"; // Dashboard\n\t\t// $menu[5] = \"\"; // Posts\n\t\t// $menu[15] = \"\"; // Links\n\t\t// $menu[25] = \"\"; // Comments\n\t\t// $menu[65] = \"\"; // Plugins\n\n\t\t// unset($submenu['themes.php'][5]); // Themes\n\t\t// unset($submenu['themes.php'][12]); // Editor\n}", "title": "" }, { "docid": "dacc37f7a52e3fb60795e6cab6365658", "score": "0.5963832", "text": "function gigx_remove_menus() {\n\n}", "title": "" }, { "docid": "bf8683f154090415464128d2a44cd0a8", "score": "0.5947339", "text": "public function createMenu();", "title": "" }, { "docid": "46687bc9c605fef586a00f97ba500dc9", "score": "0.59471065", "text": "function menuprinc() {\n $consulmenu = paraTodos::arrayConsulta(\"distinct m.*\",\"menu m, perfiles_det pd\",\"m.menu_codigo=pd.perdet_menucodigo and m.menu_status=1 and perdet_S=1\");\n foreach($consulmenu as $menu){\n if (strlen($menu['menu_descripcion']) > 14) {\n $menuli = substr($menu['menu_descripcion'],0,14).'... ';\n } else {\n $menuli = $menu['menu_descripcion'];\n }\n ?>\n <li>\n <a href=\"#\" title=\"<?php echo $menu['menu_descripcion']; ?>\">\n <i class=\"<?php echo $menu[menu_icono]?>\"></i>\n <span class=\"nav-label\"><?php echo $menuli; ?></span><span class=\"fa arrow\"></span>\n </a>\n <?php\n Menu::submenu($menu['menu_codigo'], 0, 0);\n ?>\n </li>\n\n <?php\n }\n ////////////////////////////////////////////////////////////////////\n }", "title": "" }, { "docid": "e42abc22d228c16dde4c2d640dc9b15b", "score": "0.5946956", "text": "function sld_manage_menu_items() {\n\tif( !current_user_can( 'administrator' ) ) {\n\t}\n\tremove_menu_page('link-manager.php'); // Links\n\t// remove_menu_page('edit.php'); // Posts\n\t// remove_menu_page('upload.php'); // Media\n\t// remove_menu_page('edit-comments.php'); // Comments\n\t// remove_menu_page('edit.php?post_type=page'); // Pages\n\t// remove_menu_page('plugins.php'); // Plugins\n\t// remove_menu_page('themes.php'); // Appearance\n\t// remove_menu_page('users.php'); // Users\n\t// remove_menu_page('tools.php'); // Tools\n\t// remove_menu_page('options-general.php'); // Settings\n}", "title": "" }, { "docid": "ec0996ce96def940b5631f6c377f2510", "score": "0.594575", "text": "function add_admin_menu_items() {\n\n\t\tadd_submenu_page( 'themes.php', 'CUNY J-School Theme Options', 'Theme Options', 'manage_options', 'cunyj_options', array( &$this, 'options_page' ) );\t\t\t\n\n\t}", "title": "" }, { "docid": "78b3c495089062e9397d1e4fc624ed2a", "score": "0.59303224", "text": "private function get_menu() {\n\t\t$items = $this->main_menu();\n\n\t\t$this->load->library(\"multi_menu\");\n\t\t$this->multi_menu->set_items($items);\n\n\t\t$this->load->library(array('layout', 'multi_menu'));\n\n\t\t$config[\"nav_tag_open\"] = '<ul class=\"mainnav\">';\t\t\n\t\t$config[\"parent_tag_open\"] = '<li class=\"dropdown\">';\t\t\t\n\t\t$config[\"children_tag_open\"] = '<ul class=\"dropdown-menu\">';\n\t\t$this->multi_menu->initialize($config);\n }", "title": "" }, { "docid": "5c38d51c1f11063570c2487b56bc7f18", "score": "0.59281546", "text": "public function cmwp_create_menu_items()\n\t{\n\t\tadd_menu_page( \n\t\t\t'Campaign Monitor', \n\t\t\t'Campaign Monitor', \n\t\t\t'manage_options', \n\t\t\t'cmwp-overview-menu',\n\t\t\tarray($this, 'cmwp_display_overview'),\n\t\t\t'dashicons-email-alt',\n\t\t\t23 \n\t\t);\n\n\t\tadd_submenu_page( \n\t\t\t'cmwp-overview-menu', \n\t\t\t'Overview', \n\t\t\t'Overview', \n\t\t\t'manage_options', \n\t\t\t'cmwp-overview-menu',\n\t\t\tarray($this, 'cmwp_display_overview') \n\t\t);\n\n\t\tadd_submenu_page( \n\t\t\t'cmwp-overview-menu', \n\t\t\t'Create &amp; Send', \n\t\t\t'Create/Send', \n\t\t\t'manage_options', \n\t\t\t'cmwp-create-send-menu',\n\t\t\tarray($this, 'cmwp_display_create_send') \n\t\t);\n\n\t\tadd_submenu_page( \n\t\t\t'cmwp-overview-menu', \n\t\t\t'Lists &amp; Subscribers', \n\t\t\t'Lists/Subscribers', \n\t\t\t'manage_options', \n\t\t\t'cmwp-lists-subscribers-menu',\n\t\t\tarray($this, 'cmwp_display_lists_subscribers') \n\t\t);\n\n\t\tadd_submenu_page( \n\t\t\t'cmwp-overview-menu', \n\t\t\t'Reports', \n\t\t\t'Reports', \n\t\t\t'manage_options', \n\t\t\t'cmwp-reports-menu',\n\t\t\tarray($this, 'cmwp_display_reports') \n\t\t);\n\t}", "title": "" }, { "docid": "321cb5189ae067510eb3f1c06cd229bd", "score": "0.5925071", "text": "public function action__jcc_CreateMenu() {\n\n\t\t/*\n\t\t * create new top-level menu\n\t\t */\n\t\tadd_submenu_page( 'options-general.php',\n\t\t ucfirst( $this->_slug ),\n\t\t 'JS Currency Converter',\n\t\t 'administrator',\n\t\t __FILE__,\n\t\t [ $this, 'jcc_options_page' ] );\n\t}", "title": "" }, { "docid": "442c703978e14074ec4858b3e1f9fd84", "score": "0.59164494", "text": "function tpg_add_menu() {\n add_submenu_page('genesis', __('Dorman Farrell','tpg'), __('Dorman Farrell Settings','tpg'), 'manage_options', 'dorman-farrell-settings', 'tpg_admin_page' );\n}", "title": "" }, { "docid": "3803279f67b52741f8eaafbf6e0b13ef", "score": "0.59096014", "text": "function trans_add_submenus($subpages, $item, $topID, $topmenu = 'menu'){\n\t?>\t\t\n\t\t\t var submenu_<?php echo $topID ?> = <?php echo $topmenu; ?>.addMenu(<?php echo $item ?>);\n\t\t\t \n\t\t\t <?php foreach ($subpages as $subpage) { ?>\n\t\t\t\t <?php $cc=0; ?>\n\t\t\t\t submenu_<?php echo $topID ?>.addItem(\"<? echo $subpage->post_title; ?>\", \"<? echo get_permalink($subpage->ID); ?>\");\n\t\t\t\t <?php if($subsubpages=trans_get_pages('child_of='.$subpage->ID)) trans_add_submenus($subsubpages, 'submenu_'.$topID.'.items['.$cc.']',$subpage->ID,'submenu_'.$topID); ?>\n\t\t\t\t <?php $cc=$cc+1; ?>\n\t\t\t <?php } ?>\t\t\t\t \n\n\t<?\t\n}", "title": "" }, { "docid": "2e53a7fd7112a869c16cc75be5e8e938", "score": "0.590267", "text": "function pmxi_admin_menu() {\n\tglobal $menu, $submenu;\n\t\n\tif (current_user_can(PMXI_Plugin::$capabilities)) { // admin management options\n\t\t\n\t\t$wpai_menu = array(\n\t\t\tarray('pmxi-admin-import', __('New Import', 'wp_all_import_plugin')),\n\t\t\tarray('pmxi-admin-manage' , __('Manage Imports', 'wp_all_import_plugin')),\n\t\t\tarray('pmxi-admin-settings', __('Settings', 'wp_all_import_plugin')),\n\t\t\t//array('pmxi-admin-license', __('Licenses', 'wp_all_import_plugin')),\n\t\t\tarray('pmxi-admin-history', __('History', 'wp_all_import_plugin'))\n\t\t\t/*array('pmxi-admin-addons', __('Add-ons', 'wp_all_import_plugin')), */\t\t\t\n\t\t);\n\n\t\t$wpai_menu = apply_filters('pmxi_admin_menu', $wpai_menu);\t\t\n\n\t\tadd_menu_page(__('WP All Import', 'wp_all_import_plugin'), __('All Import', 'wp_all_import_plugin'), PMXI_Plugin::$capabilities, 'pmxi-admin-home', array(PMXI_Plugin::getInstance(), 'adminDispatcher'), PMXI_Plugin::ROOT_URL . '/static/img/xmlicon.png', 112);\n\t\t// workaround to rename 1st option to `Home`\n\t\t$submenu['pmxi-admin-home'] = array();\n\n\t\tforeach ($wpai_menu as $key => $value) {\n\t\t\tadd_submenu_page('pmxi-admin-home', $value[1], $value[1], PMXI_Plugin::$capabilities, $value[0], array(PMXI_Plugin::getInstance(), 'adminDispatcher'));\t\n\t\t}\n\t\t\n\t}\t\n}", "title": "" }, { "docid": "541dd881d55fa69b8d847c873b8a52b5", "score": "0.59009635", "text": "public function _adminMenu() {\n\n\t\t// init vars\n\t\t$name = $this->xml->first('name')->text();\n\t\t$icon = $this['path']->url('config:images/yoo_icon_16.png');\n\n\t add_menu_page('', $name, apply_filters('warp_edit_theme_options', 'edit_theme_options'), 'warp', false, $icon);\n\n\t\tadd_submenu_page('warp', 'Theme Options', 'Theme Options', apply_filters('warp_edit_theme_options', 'edit_theme_options'), 'warp', array($this, '_adminThemeOptions'));\n\t\tadd_submenu_page('warp', 'Widget Options', 'Widget Options', apply_filters('warp_edit_theme_options', 'edit_theme_options'), 'warp_widget', array($this, '_adminWidgetOptions'));\n\t}", "title": "" }, { "docid": "b6256e41f6a6d252b5aed3e45e8b5036", "score": "0.5889137", "text": "function admin_menu() {\n\n // Modules we need\n require_once($this->plugin_path.'/class.moneypress-adminui.php');\n require_once($this->plugin_path.'/WPCSL-generic/classes/CSL-plugin.php');\n \n // WPCSL = common plugin helper methods\n //\n $WPCSL_options = array(\n 'cache_path' => $this->plugin_path.'/cache/',\n 'css_prefix' => $this->prefix,\n 'name' => $this->name,\n 'no_license' => true,\n 'plugin_path' => $this->plugin_path.'/',\n 'plugin_url' => $this->plugin_url,\n 'prefix' => $this->prefix,\n );\n $this->WPCSL = new wpCSL_plugin__mp($WPCSL_options);\n\n // The Admin UI = admin menus and pages\n //\n $AdminUI_options = array(\n 'plugin' => $this,\n );\n $this->AdminUI = new MoneyPress_AdminUI($AdminUI_options);\n $this->AdminUI->create_AdminMenu();\n }", "title": "" }, { "docid": "dec70981c3954825b71f47a35acc4538", "score": "0.5883184", "text": "function hi_admin_menu()\n\t{\n\t\t$page_title = $menu_title = __( 'Hover Effects Builder', 'hitd' );\n\n\t\tglobal $wp_version;\n\t\tif( $wp_version >= 3.8 )\n\t\t{\n\t\t\t$page = add_menu_page( $page_title, $menu_title, hi_get_rights(), 'hover-effects-builder', 'hi_admin_interface', 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIxMjhweCIgaGVpZ2h0PSIxMjhweCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDEyOCAxMjg7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBzdHlsZT0iZmlsbDojOTk5OTk5OyIgZD0iTTEyMi45NDMsNDEuNzc1TDEwNS42MzcsMTEzTDU4LjQxLDEwMi4xMzJsLTI5LjAxNSw5LjQ3TDQuNjg2LDM5LjIzOWw3NC4zNTMtMjQuMjZsNi4wNDUsMTcuNzA0TDEyMi45NDMsNDEuNzc1eiBNNjQuNTYzLDM2LjQ5MUwyOS4zMDUsNDguMDA3bDIuNjI5LDcuNjI1bDEzLjE2NS00LjNsMTIuMjQzLDM1LjQ5Nmw4LjkyOS0yLjkxN0w1NC4wMjcsNDguNDE1bDEzLjE2Ni00LjNMNjQuNTYzLDM2LjQ5MXogTTY5LjMzMSw5OC41NjlsMzEuMjU4LDcuMzc4bDE1LjE0NC01OS45NGwtMjguNDc4LTYuOTYybDE2LjQ5Miw0OC4yOTdMNjkuMzMxLDk4LjU2OXoiLz48L3N2Zz4=' );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$page = add_menu_page( $page_title, $menu_title, hi_get_rights(), 'hover-effects-builder', 'hi_admin_interface', plugins_url( 'hover-effects-builder/assets/img/logo-18.png' ) );\n\t\t}\n\t\tadd_filter( 'admin_print_styles', 'hi_admin_print_styles_fonts' );\n\t\tadd_filter( 'admin_print_styles-' . $page, 'hi_admin_print_styles' );\n\t\tadd_filter( 'admin_print_scripts-' . $page, 'hi_admin_print_scripts' );\n\t\tadd_action( 'load-' . $page, 'hi_admin_help');\n\t}", "title": "" }, { "docid": "899858b3c449299dfee2818b88efe310", "score": "0.5878917", "text": "function menu()\n {\n include 'common/admin/admin_menu.php';\n return $menubox->generate();\n }", "title": "" }, { "docid": "bddb2d4b702003644a6a9542fed72dc3", "score": "0.58636576", "text": "function buzzgrowl_menu() {\n\tadd_submenu_page('plugins.php', 'BuzzGrowl Configuration', 'BuzzGrowl Configuration', 'manage_options', 'buzzgrowl-key-config', 'buzzgrowl_options');\n}", "title": "" }, { "docid": "87de82b7987d896e74def954dc32efaa", "score": "0.58534557", "text": "public function getMegamenu()\n {\n return Mage::registry('current_megamenu');\n }", "title": "" }, { "docid": "0851eac2628b867bf420c39a5079d349", "score": "0.5850179", "text": "function s3bk_menu() {\n add_menu_page('s3bk', 's3bk', 'administrator', 's3bk-options', 's3bk_options');\n}", "title": "" }, { "docid": "a995a5f64ea31c0aea399b6799a1c785", "score": "0.58471906", "text": "function __construct(){\n $this->__menu_item_fields = array(\n\n 'megamenu' => array(\n 'label' => __( 'Submenu as Mega menu', 'phlox' ),\n 'type' => 'switch',\n 'id' => 'megamenu',\n 'default' => '0',\n 'max_depth' => 0\n ),\n 'nolink' => array(\n 'label' => __( 'Disable Link', 'phlox' ),\n 'type' => 'switch',\n 'id' => 'nolink',\n 'default' => '0'\n ),\n 'hide_label' => array(\n 'label' => __( 'Hide Label', 'phlox' ),\n 'type' => 'switch',\n 'id' => 'hide_label',\n 'default' => '0'\n ),\n 'icon' => array(\n 'label' => __( 'Icon', 'phlox' ),\n 'type' => 'icon',\n 'id' => 'icon',\n 'default' => ''\n ),\n 'icon_align' => array(\n 'label' => __( 'Icon Alignment', 'phlox' ),\n 'type' => 'select',\n 'id' => 'icon_align',\n 'choices' => array(\n '' => esc_attr__( 'Auto', 'phlox' ),\n 'left' => esc_attr__( 'Left' , 'phlox' ),\n 'right' => esc_attr__( 'Right' , 'phlox' ),\n 'top' => esc_attr__( 'Top' , 'phlox' ),\n 'bottom' => esc_attr__( 'Bottom' , 'phlox' )\n ),\n 'default' => ''\n ),\n 'row_start' => array(\n 'label' => __( 'Start Row From Here', 'phlox' ),\n 'type' => 'switch',\n 'id' => 'row_start',\n 'default' => '0',\n 'min_depth' => 1,\n 'max_depth' => 1\n ),\n 'hide_title' => array(\n 'label' => __( 'Hide Title', 'phlox' ),\n 'type' => 'switch',\n 'id' => 'hide_title',\n 'default' => '0',\n 'min_depth' => 1,\n 'max_depth' => 1\n ),\n 'col_num' => array(\n 'label' => __( 'Number of Columns', 'phlox' ),\n 'type' => 'select',\n 'id' => 'col_num',\n 'choices' => array(\n //'auto' => __( 'Auto', 'phlox' ),\n 1 => 1,\n 2 => 2,\n 3 => 3,\n 4 => 4,\n 5 => 5,\n 6 => 6\n ),\n 'default' => 2,\n 'max_depth' => 0\n ),\n 'hide_desktop' => array(\n 'label' => __( 'Hide on Desktop', 'phlox' ),\n 'type' => 'switch',\n 'id' => 'hide_desktop',\n 'default' => '0'\n ),\n 'hide_tablet' => array(\n 'label' => __( 'Hide on Tablet', 'phlox' ),\n 'type' => 'switch',\n 'id' => 'hide_tablet',\n 'default' => '0'\n ),\n 'hide_mobile' => array(\n 'label' => __( 'Hide on Mobile', 'phlox' ),\n 'type' => 'switch',\n 'id' => 'hide_mobile',\n 'default' => '0'\n ),\n 'sec_text' => array(\n 'label' => __( 'Seconadary Text', 'phlox' ),\n 'type' => 'textarea',\n 'id' => 'sec_text',\n 'default' => ''\n ),\n 'sec_bg_color' => array(\n 'label' => __( 'Seconadary Text Background Color', 'phlox' ),\n 'type' => 'textarea',\n 'id' => 'sec_bg_color',\n 'default' => '#FFF'\n ),\n 'custom_style' => array(\n 'label' => __( 'Custom Style', 'phlox' ),\n 'type' => 'textarea',\n 'id' => 'custom_style',\n 'default' => ''\n ),\n 'aux_background_image' => array(\n 'label' => __( 'Image ID', 'phlox' ),\n 'type' => 'textarea',\n 'id' => 'aux_background_image',\n 'default' => '',\n 'min_depth' => 1,\n 'max_depth' => 1\n ),\n 'link_path' => array(\n 'label' => __( 'Link/anchor ID', 'phlox' ),\n 'type' => 'text',\n 'id' => 'link_path',\n 'default' => '',\n 'visible' => array( 'page' ),\n )\n );\n\n\n // Change the walker class and default args for front end navigation menu\n add_filter( 'wp_nav_menu_args' , array( $this, 'change_nav_menu_frontend_walker' ), 9, 1 );\n // Add HTML comment before and after of menu section\n add_filter( 'wp_nav_menu' , array( $this, 'add_html_comment_nav_menu_front' ), 9, 1 );\n }", "title": "" }, { "docid": "45c08c0c7d1165bfddc77ed572c95d81", "score": "0.584438", "text": "function bc_custom_admin_menus( $wp_admin_bar ) {\n\t$bc_menu_args = array(\n\t\t'id'\t=> 'bc_menu',\n\t\t'title' => '<img src=\"' . plugin_dir_url( dirname( __FILE__ ) ) . 'img/bc-logo.png\" alt=\"Bellevue College Content Management System\" />',\n\t\t'href' => 'https://www.bellevuecollege.edu',\n\t);\n\t$wp_admin_bar->add_node( $bc_menu_args );\n\n\t// Add Homepage submenu\n\t$bc_menu_home_args = array(\n\t\t'parent' => 'bc_menu',\n\t\t'id'\t => 'bc_menu_home',\n\t\t'title' => 'Bellevue College Homepage',\n\t\t'href' => 'https://www.bellevuecollege.edu',\n\t);\n\t$wp_admin_bar->add_node( $bc_menu_home_args );\n\n\t// Add Service Desk submenu\n\t$bc_menu_sd_args = array(\n\t\t'parent' => 'bc_menu',\n\t\t'id'\t => 'bc_menu_sd_args',\n\t\t'title' => 'Get Help - BC Service Desk',\n\t\t'href' => 'https://www.bellevuecollege.edu/servicedesk/',\n\t);\n\t$wp_admin_bar->add_node( $bc_menu_sd_args );\n}", "title": "" }, { "docid": "94af3721ae26dbe2f61aaf5b941b5684", "score": "0.58405954", "text": "function sinetiks_students_modifymenu() {\n\tadd_menu_page('Students', //page title\n\t'Students', //menu title\n\t'manage_options', //capabilities\n\t'sinetiks_students_list', //menu slug\n\t'sinetiks_students_list' //function\n\t);\n\t\n\t//this is a submenu\n\tadd_submenu_page('sinetiks_students_list', //parent slug\n\t'Add New Student', //page title\n\t'Add New', //menu title\n\t'manage_options', //capability\n\t'sinetiks_students_create', //menu slug\n\t'sinetiks_students_create'); //function\n\t\n}", "title": "" }, { "docid": "5d0a55c1ee39976d74720b5fc5d61673", "score": "0.5838659", "text": "function be_admin_bar_items() {\n\tglobal $wp_admin_bar;\n\t$wp_admin_bar->remove_menu( 'new-link', 'new-content' );\n}", "title": "" }, { "docid": "2a4629b6cac67aa92aacd3405cf38043", "score": "0.58331925", "text": "function add_cm_menu() {\n\n\t\t$page_title = esc_attr__( 'Membership Dashboard', 'membership' );\n\t\t$menu_title = esc_attr__( 'Membership', 'membership' );\n\t\t$capability = esc_attr__( 'manage_options', 'membership' );\n\t\t$menu_slug = esc_attr__( 'membership_dashboard', 'membership' );\n\t\t$plugin_function = esc_attr__( 'membership_dashboard', 'membership' );\n\t\t$icon_url = esc_attr__( 'dashicons-palmtree', 'membership' );\n\t\t$menu_position = '4.1';\n\t\t$this->membership_dashboard = add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $plugin_function, $icon_url, $menu_position );\n\n\t\t// Current Members report menu option\n\t\t$submenu_page_title = esc_attr__( 'Active Members', 'membership' );\n\t\t$submenu_title = esc_attr__( 'Active', 'membership' );\n\t\t$submenu_slug = esc_attr__( 'active_members', 'membership' );\n\t\t$submenu_function = esc_attr__( 'active_members', 'membership' );\n\t\t$this->current_members_page = add_submenu_page( $menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function );\n\n\t\t//Pending Members report menu option\n\t\t$submenu_page_title = esc_attr__( 'Pending Members', 'membership' );\n\t\t$submenu_title = esc_attr__( 'Pending', 'membership' );\n\t\t$submenu_slug = esc_attr__( 'pending_members', 'membership' );\n\t\t$submenu_function = esc_attr__( 'pending_members', 'membership' );\n\t\t$this->pending_members_page = add_submenu_page( $menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function );\n\n\t\t//Archived Members report menu option\n\t\t$submenu_page_title = esc_attr__( 'Archived Members', 'membership' );\n\t\t$submenu_title = esc_attr__( 'Archived', 'membership' );\n\t\t$submenu_slug = esc_attr__( 'archived_members', 'membership' );\n\t\t$submenu_function = esc_attr__( 'archived_members', 'membership' );\n\t\t$this->archived_members_page = add_submenu_page( $menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function );\n\n\t\t//All Members report menu option\n\t\t$submenu_page_title = esc_attr__( 'All Members', 'membership' );\n\t\t$submenu_title = esc_attr__( 'All', 'membership' );\n\t\t$submenu_slug = esc_attr__( 'all_members', 'membership' );\n\t\t$submenu_function = esc_attr__( 'all_members', 'membership' );\n\t\t$this->all_members_page = add_submenu_page( $menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function );\n\n\t\t//Create New Member menu option\n\t\t$submenu_page_title = esc_attr__( 'Add New', 'membership' );\n\t\t$submenu_title = esc_attr__( 'Add New', 'membership' );\n\t\t$submenu_slug = esc_attr__( 'new_members', 'membership' );\n\t\t$submenu_function = esc_attr__( 'new_members', 'membership' );\n\t\t$this->new_members_page = add_submenu_page( $menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function );\n\n\t\t//Will only use this once on production server\n\t\t/**\n\t\t$submenu_page_title = 'Migrate Members';\n\t\t$submenu_title = 'Migrate';\n\t\t$submenu_slug = 'migrate_members';\n\t\t$submenu_function = 'migrate_members';\n\t\tadd_submenu_page( $menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function );\n\t\t */\n\n\t\t//Will only use this once on production server\n\t\t/*\n\t\t$submenu_page_title = 'Insert Pending Members';\n\t\t$submenu_title = 'InsertPending';\n\t\t$submenu_slug = 'insert_pending_members';\n\t\t$submenu_function = 'insert_pending_members';\n\t\tadd_submenu_page( $menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function );\n\t\t*/\n\n\t\t//For testing purposes only\n\t\t/*\n\t\t$submenu_page_title = 'WP_Meta_Query Testing';\n\t\t$submenu_title = 'Meta Query Testing';\n\t\t$submenu_slug = 'meta_query_testing';\n\t\t$submenu_function = 'meta_query_testing';\n\t\tadd_submenu_page( $menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function );\n\t\t*/\n\t}", "title": "" }, { "docid": "bf8038a97d90812f597ff9f2fefc9437", "score": "0.5831556", "text": "function friendly_create_demo_menu_items()\n\t{\n\t\t$run_once = get_option('friendly_install_default_menu_items');\n\t\n\t\tif (!$run_once)\n\t\t{\n\t\t //give your menu a name\n\t\t $name = 'Main Menu';\n\t\t //create the menu\n\t\t $menu_id = wp_create_nav_menu($name);\n\t\t //then get the menu object by its name\n\t\t $menu = get_term_by( 'name', $name, 'nav_menu' );\n\t\t \n\t\t $page_1_id = friendly_get_id_from_slug('contact-page','page');\n\t\t $page_2_id = friendly_get_id_from_slug('example-pages','page');\n\t\t $page_3_id = friendly_get_id_from_slug('404-error-page','page');\n\t\t $page_4_id = friendly_get_id_from_slug('column-example','page');\n\t\t $page_5_id = friendly_get_id_from_slug('example-product-page','page');\n\t\t $page_6_id = friendly_get_id_from_slug('holding-page','page');\n\t\t $page_7_id = friendly_get_id_from_slug('left-hand-sidebar','page');\n\t\t $page_8_id = friendly_get_id_from_slug('no-sidebar','page');\n\t\t $page_9_id = friendly_get_id_from_slug('right-hand-sidebar','page');\n\t\t $page_10_id = friendly_get_id_from_slug('slider-and-accordion','page');\n\t\t \n\t\t $portfolio_1_id = friendly_get_id_from_slug('featured-portfolio-item','portfolio');\n\t\t $portfolio_2_id = friendly_get_id_from_slug('portfolio-item-1','portfolio');\n\t\t $portfolio_3_id = friendly_get_id_from_slug('full-width-with-large-slider','portfolio');\n\t\t\n\t\t //then add the actual link/ menu item and you do this for each item you want to add\n\t\t $home_page_menu_item = wp_update_nav_menu_item($menu->term_id, 0, array(\n\t\t 'menu-item-title' => __('Home', THEMENAME),\n\t\t 'menu-item-classes' => 'home',\n\t\t 'menu-item-url' => home_url( '/' ), \n\t\t 'menu-item-status' => 'publish',\n\t\t 'menu-item-parent-id' => 0\n\t\t ));\n\t\t \n\t\t $example_pages_menu_item = wp_update_nav_menu_item($menu->term_id, 0, array(\n\t\t 'menu-item-title' => __('Example Pages', THEMENAME),\n\t\t 'menu-item-classes' => '',\n\t\t 'menu-item-url' => home_url( '/' ).'example-pages', \n\t\t 'menu-item-status' => 'publish',\n\t\t 'menu-item-parent-id' => 0\n\t\t ));\n\t\t \n\t\t\t$error_page_menu_item = wp_update_nav_menu_item($menu->term_id, 0, array(\n\t\t\t\t'menu-item-title' => __('404 Error Page', THEMENAME),\n\t\t\t\t'menu-item-classes' => '',\n\t\t\t\t'menu-item-url' => home_url( '/' ).'example-pages/404-error-page', \n\t\t\t\t'menu-item-status' => 'publish',\n\t\t\t\t'menu-item-parent-id' => $example_pages_menu_item\n\t\t\t));\n\t\t\t\n\t\t\t$column_example_menu_item = wp_update_nav_menu_item($menu->term_id, 0, array(\n\t\t\t\t'menu-item-title' => __('Columns Example', THEMENAME),\n\t\t\t\t'menu-item-classes' => '',\n\t\t\t\t'menu-item-url' => home_url( '/' ).'example-pages/column-example', \n\t\t\t\t'menu-item-status' => 'publish',\n\t\t\t\t'menu-item-parent-id' => $example_pages_menu_item\n\t\t\t));\n\t\t\t\n\t\t\t$example_product_page_menu_item = wp_update_nav_menu_item($menu->term_id, 0, array(\n\t\t\t\t'menu-item-title' => __('Example Product Page', THEMENAME),\n\t\t\t\t'menu-item-classes' => '',\n\t\t\t\t'menu-item-url' => home_url( '/' ).'example-pages/example-product-page', \n\t\t\t\t'menu-item-status' => 'publish',\n\t\t\t\t'menu-item-parent-id' => $example_pages_menu_item\n\t\t\t));\n\t\t\t\n\t\t\t$holding_page_menu_item = wp_update_nav_menu_item($menu->term_id, 0, array(\n\t\t\t\t'menu-item-title' => __('Demo Holding Page', THEMENAME),\n\t\t\t\t'menu-item-classes' => '',\n\t\t\t\t'menu-item-url' => home_url( '/' ).'example-pages/holding-page', \n\t\t\t\t'menu-item-status' => 'publish',\n\t\t\t\t'menu-item-parent-id' => $example_pages_menu_item\n\t\t\t));\n\t\t\t\n\t\t\t$left_hand_sidebar_menu_item = wp_update_nav_menu_item($menu->term_id, 0, array(\n\t\t\t\t'menu-item-title' => __('Left Hand Sidebar', THEMENAME),\n\t\t\t\t'menu-item-classes' => '',\n\t\t\t\t'menu-item-url' => home_url( '/' ).'example-pages/left-hand-sidebar', \n\t\t\t\t'menu-item-status' => 'publish',\n\t\t\t\t'menu-item-parent-id' => $example_pages_menu_item\n\t\t\t));\n\t\t\t\n\t\t\t$right_hand_sidebar_menu_item = wp_update_nav_menu_item($menu->term_id, 0, array(\n\t\t\t\t'menu-item-title' => __('Right Hand Sidebar', THEMENAME),\n\t\t\t\t'menu-item-classes' => '',\n\t\t\t\t'menu-item-url' => home_url( '/' ).'example-pages/right-hand-sidebar', \n\t\t\t\t'menu-item-status' => 'publish',\n\t\t\t\t'menu-item-parent-id' => $example_pages_menu_item\n\t\t\t));\n\t\t\t\n\t\t\t$no_sidebar_menu_item = wp_update_nav_menu_item($menu->term_id, 0, array(\n\t\t\t\t'menu-item-title' => __('No Sidebar - Full Width', THEMENAME),\n\t\t\t\t'menu-item-classes' => '',\n\t\t\t\t'menu-item-url' => home_url( '/' ).'example-pages/no-sidebar', \n\t\t\t\t'menu-item-status' => 'publish',\n\t\t\t\t'menu-item-parent-id' => $example_pages_menu_item\n\t\t\t));\n\t\t\t\n\t\t\t$slider_menu_item = wp_update_nav_menu_item($menu->term_id, 0, array(\n\t\t\t\t'menu-item-title' => __('Slider And Accordion', THEMENAME),\n\t\t\t\t'menu-item-classes' => '',\n\t\t\t\t'menu-item-url' => home_url( '/' ).'example-pages/slider-and-accordion', \n\t\t\t\t'menu-item-status' => 'publish',\n\t\t\t\t'menu-item-parent-id' => $example_pages_menu_item\n\t\t\t));\n\t\t\t\n\t\t\t\n\t\t\t$portfolio_menu_item = wp_update_nav_menu_item($menu->term_id, 0, array(\n\t\t\t\t'menu-item-title' => __('Portfolio', THEMENAME),\n\t\t\t\t'menu-item-classes' => '',\n\t\t\t\t'menu-item-url' => home_url( '/' ).'portfolio', \n\t\t\t\t'menu-item-status' => 'publish',\n\t\t\t\t'menu-item-parent-id' => 0\n\t\t\t));\n\t\t\t\n\t\t\t$featured_portfolio_menu_item = wp_update_nav_menu_item($menu->term_id, 0, array(\n\t\t\t\t'menu-item-title' => __('Featured Portfolio Item', THEMENAME),\n\t\t\t\t'menu-item-classes' => '',\n\t\t\t\t'menu-item-url' => home_url( '/' ).'portfolio/featured-portfolio-item', \n\t\t\t\t'menu-item-status' => 'publish',\n\t\t\t\t'menu-item-parent-id' => $portfolio_menu_item\n\t\t\t));\n\t\t\t\n\t\t\t$first_portfolio_menu_item = wp_update_nav_menu_item($menu->term_id, 0, array(\n\t\t\t\t'menu-item-title' => __('Example portfolio item', THEMENAME),\n\t\t\t\t'menu-item-classes' => '',\n\t\t\t\t'menu-item-url' => home_url( '/' ).'portfolio/portfolio-item-1', \n\t\t\t\t'menu-item-status' => 'publish',\n\t\t\t\t'menu-item-parent-id' => $portfolio_menu_item\n\t\t\t));\n\t\t\t\n\t\t\t$full_width_portfolio_menu_item = wp_update_nav_menu_item($menu->term_id, 0, array(\n\t\t\t\t'menu-item-title' => __('Full width with large slider', THEMENAME),\n\t\t\t\t'menu-item-classes' => '',\n\t\t\t\t'menu-item-url' => home_url( '/' ).'portfolio/full-width-with-large-slider', \n\t\t\t\t'menu-item-status' => 'publish',\n\t\t\t\t'menu-item-parent-id' => $portfolio_menu_item\n\t\t\t));\n\t\t\t\n\t\t\n\t\t //then you set the wanted theme location\n\t\t $locations = get_theme_mod('nav_menu_locations');\n\t\t \n\t\t $locations['main-menu'] = $menu->term_id;\n\t\t \n\t\t set_theme_mod( 'nav_menu_locations', $locations );\n\t\t\n\t\t // then update the menu_check option to make sure this code only runs once\n\t\t update_option('friendly_install_default_menu_items', true);\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "8480e10218724393f6e3bf586b3b4d46", "score": "0.58256584", "text": "function loja_pedidos_modifymenu() {\n\tadd_menu_page('pedidos', //page title\n\t'Pedidos', //menu title\n\t'manage_options', //capabilities\n\t'loja_pedidos_list', //menu slug\n\tloja_pedidos_list //function\n\t);\n\t\n\t//this is a submenu\n\tadd_submenu_page('loja_pedidos_list', //parent slug\n\t'Adicionar Pedido', //page title\n\t'Adicionar', //menu title\n\t'manage_options', //capability\n\t'loja_pedidos_create', //menu slug\n\t'loja_pedidos_create'); //function\n\t\n\t//this submenu is HIDDEN, however, we need to add it anyways\n\tadd_submenu_page(null, //parent slug\n\t'Update Pedidos', //page title\n\t'Update', //menu title\n\t'manage_options', //capability\n\t'loja_pedidos_update', //menu slug\n\t'loja_pedidos_update'); //function\n}", "title": "" }, { "docid": "9c97ff52f0e6eace1bb266444cabe2a0", "score": "0.58015853", "text": "function list_admin_nav_menus() {\n\tglobal $menu;\n\tglobal $submenu;\n\techo '<div style=\"margin-left:100px\">';\n\techo \"<pre>\";\n\tprint_r($menu);\n\tprint_r($submenu);\n\techo \"</pre>\";\n\techo '</div>';\n}", "title": "" }, { "docid": "c5dabc39aeafd51aac35f903c92ff8fb", "score": "0.57996434", "text": "function dw_getMenu() {\n $menu = [];\n $location = get_nav_menu_locations();\n\n foreach (wp_get_nav_menu_items($location['main']) as $post) {\n $item = new stdClass();\n var_dump($post);\n $item->label = $post->title;\n $item->url = $post->url;\n $item->children = [];\n\n if(!$post->menu_item_parent){\n $menu[$post->ID] = $item;\n\n }\n else {\n $menu[$post->menu_item_parent]->children[$post->ID] = $item;\n }\n var_dump($menu);\n }\n\n\n\n return $menu;\n //. définir ma function\n\n}", "title": "" }, { "docid": "5bc3b63d3743cef64244e720835173e5", "score": "0.57938963", "text": "function circularculture_menu_language_item( $items, $args ) {\n if ( class_exists( 'MslsOutput' ) && 'header-menu' == $args->theme_location ) {\n \n \t$display = 1;\n \t$exists = true;\n \t$obj = new MslsOutput();\n \tforeach ( $obj->get( $display, $exists ) as $link ) {\n\t \t$items.=\"<li>\".$link.\"</li>\";\n\t } \n }\n return $items;\n}", "title": "" }, { "docid": "30494688a046f0d54ff39007d4fb7c98", "score": "0.5789628", "text": "public function admin_menu(){\n add_submenu_page(\n $this->parent_menu_slug, \n $this->menu_label,\n $this->menu_label,\n $this->menu_capability, \n $this->menu_page_slug, \n [ $this, 'render_html' ] \n );\n }", "title": "" }, { "docid": "839afd0d33628f9c70250427ec32e45e", "score": "0.5786532", "text": "public function gai_add_admin_menu() { \n\t\tadd_options_page( __('Настройки плагина Groovy Admin Info', 'groovy-admin-info'), self::GAI_MENUTITLE, 'manage_options', self::GAI_SLUG, array(__CLASS__, 'gai_options_page') );\t\t\n\t}", "title": "" }, { "docid": "a51a6b682376b46704f81ef9ae4dd28a", "score": "0.57860047", "text": "function create_menu_1_21(){\r\n // ------------------------------------------------------------------------- INITIALIZE\r\n $status_id = '1';\r\n $dmha_id = '21';\r\n $parent_id = NULL;\r\n $tipe = '1';\r\n $urutan = '5';\r\n $nama = 'Admin Control';\r\n $link = 'javascript:;';\r\n $deskripsi = NULL;\r\n $has_sub = 'has-sub';\r\n $icon = '57';\r\n $css_js = NULL;\r\n $ui = NULL;\r\n $tipe_data = NULL;\r\n $form = NULL;\r\n $kategori = '3';\r\n $content = '0';\r\n $custom_css_js = '0';\r\n\r\n // ------------------------------------------------------------------------- ACTION\r\n // delete dmha yang sama\r\n daftar_multi_hak_akses::double_dmha_checking($dmha_id);\r\n\r\n // delete dmha yang sama\r\n app_list::double_app_list_checking($dmha_id);\r\n\r\n // insert dmha terbaru \r\n //full_insert($STATUS_ID,$DMHA_ID,$PARENT_ID,$TIPE,$URUTAN,$NAMA,$LINK,$DESKRIPSI,$HAS_SUB,$ICON,$CSS_JS,$UI,$TIPE_DATA,$FORM,$KATEGORI)\r\n daftar_multi_hak_akses::full_insert($status_id,$dmha_id,$parent_id,$tipe,$urutan,$nama,$link,$deskripsi,$has_sub,$icon,$css_js,$ui,$tipe_data,$form,$kategori,$content,$custom_css_js);\r\n\r\n // insert dmha terbaru\r\n app_list::full_insert($dmha_id);\r\n //////////////////////////////////////////////////////////////////////////// \r\n }", "title": "" }, { "docid": "0bf5656c00d841a3ed3c71051e5db223", "score": "0.577966", "text": "function agenti_customAdmin() {\n?>\n\n <?php\n $menu_bg = vp_option('agnet_branding.menu_bg');\n $text_color = vp_option('agnet_branding.text_color');\n?>\n\n <style type=\"text/css\">\n \n #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head, #adminmenu .wp-menu-arrow, #adminmenu .wp-menu-arrow div, #adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, .folded #adminmenu li.current.menu-top, .folded #adminmenu li.wp-has-current-submenu {\n background: <?php\n echo $menu_bg; ?>;\n color: #fff;\n }\n\n #adminmenu .wp-submenu a:focus, #adminmenu .wp-submenu a:hover, #adminmenu a:hover, #adminmenu li.menu-top>a:focus{\n color: <?php\n echo $text_color; ?> ;\n }\n #adminmenu li:hover div.wp-menu-image:before {\n color: <?php\n echo $text_color; ?> ;\n }\n #wpadminbar .ab-top-menu>li.hover>.ab-item, #wpadminbar .ab-top-menu>li:hover>.ab-item, #wpadminbar .ab-top-menu>li>.ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus{\n background: #333;\n color: <?php\n echo $text_color; ?>;\n\n }\n #wpadminbar>#wp-toolbar a:focus span.ab-label, #wpadminbar>#wp-toolbar li.hover span.ab-label, #wpadminbar>#wp-toolbar li:hover span.ab-label {\n color: <?php\n echo $text_color; ?>;\n }\n #wpadminbar .quicklinks .menupop ul li a:focus, #wpadminbar .quicklinks .menupop ul li a:focus strong, #wpadminbar .quicklinks .menupop ul li a:hover, #wpadminbar .quicklinks .menupop ul li a:hover strong, #wpadminbar .quicklinks .menupop.hover ul li a:focus, #wpadminbar .quicklinks .menupop.hover ul li a:hover, #wpadminbar li .ab-item:focus:before, #wpadminbar li a:focus .ab-icon:before, #wpadminbar li.hover .ab-icon:before, #wpadminbar li.hover .ab-item:before, #wpadminbar li:hover #adminbarsearch:before, #wpadminbar li:hover .ab-icon:before, #wpadminbar li:hover .ab-item:before, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus, #wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover {\n color: <?php\n echo $text_color; ?>;\n }\n .dash-logo{\n display: block;\n width: 90%;\n }\n <?php\n if (vp_option('agnet_branding.remove_wp_logo')): ?>\n #wp-admin-bar-wp-logo {\n display: none;\n }\n <?php\n endif; ?>\n </style>\n\n <?php\n}", "title": "" }, { "docid": "0ec679ecea4500e2e8e55ed063877225", "score": "0.57692295", "text": "function themename_configure_dashboard_menu() {\n global $menu,$submenu;\n\n global $current_user;\n get_currentuserinfo();\n\n // $menu and $submenu will return all menu and submenu list in admin panel\n \n // $menu[2] = \"\"; // Dashboard\n // $menu[5] = \"\"; // Posts\n // $menu[15] = \"\"; // Links\n // $menu[25] = \"\"; // Comments\n // $menu[65] = \"\"; // Plugins\n\n // unset($submenu['themes.php'][5]); // Themes\n // unset($submenu['themes.php'][12]); // Editor\n}", "title": "" }, { "docid": "9e4134db07f50b4b88e9914f5de2ff3c", "score": "0.5766275", "text": "function admin_menu() {\n\n\t\tadd_submenu_page( \n\t\t\t'socialflow',\n\t\t\t__( 'Category Routing', 'socialflow' ),\n\t\t\t__( 'Category Routing', 'socialflow' ),\n\t\t\t'manage_options',\n\t\t\t$this->slug,\n\t\t\tarray( $this, 'page' )\n\t\t);\n\t}", "title": "" }, { "docid": "09a3d554825644298c77184f1f2c9e0e", "score": "0.5764006", "text": "function ohlasky_menu(){\n add_menu_page( \n 'Ohlášky', \n 'Ohlášky', \n 'edit_posts', \n 'ohlasky_page', \n 'ohlasky_page_generate', \n 'dashicons-media-text', \n 5\n );\n // string $parent_slug, string $page_title, string $menu_title, string $capability, string $menu_slug, callable $function = '', int $position = null\n add_submenu_page( \n 'ohlasky_page', \n 'Den Páně', \n 'Den Páně', \n 'edit_posts', \n 'den_pane', \n 'den_pane_generate' \n );\n}", "title": "" }, { "docid": "6cd5ee35318d04d30b02c2824ce60407", "score": "0.5761922", "text": "function add_menu() {\n\t\t\tadd_submenu_page('themes.php', obt_translate('Configure %1',$this->infos['theme_name']), obt_translate('Configure %1',$this->infos['theme_name']), 2, 'theme-options.php', array(&$this,'admin_menu'));\n\t\t\t//add_theme_page(obt_translate('Configurar %1 (ADMIN)',$this->infos['theme_name']), obt_translate('Configurar %1 (ADMIN)',$this->infos['theme_name']), 'edit_themes', basename($this->file), array(&$this,'admin_menu'));\n\t\t\t/* Thank you MCincubus for opening my eyes on the last parameter :) */\n\t\t}", "title": "" }, { "docid": "0b99deea4ecb40f932856440047f5239", "score": "0.5755307", "text": "public function create_menupage() {\n\t\t\n\t}", "title": "" }, { "docid": "c374590f31bf0010c8038724289dd85f", "score": "0.57483894", "text": "function build_menu($type){\n\t\t$level = $this->ci->session->userdata('obj_level');\n $menu = array();\n\t\t$query = $this->ci->db->query(\"select * from vw_sys_usr_menu where obj_level = '\". $level . \"'\");\t\t\n\t\t//$query = $this->ci->db->query(\"select * from sys_menu\"); > ORI REMMED\n switch ($type){\n case 0: // 0 = top menu\n break; \n case 1: // 1 = horizontal menu\n $html_out = \"\\t\\t\".'<ul '.$this->class_menu.'>'.\"\\n\";\n break; \n case 2: // 2 = sidebar menu\n $html_out = \"\\t\\t\".'<ul '.$this->class_menu.'>'.\"\\n\";\n\t\t\t\tbreak;\n case 3: // 3 = footer menu\n break;\n default: // default = horizontal menu\n $html_out .= \"\\t\\t\".'<ul '.$this->class_menu.'>'.\"\\n\";\n break;\n }\n\t\tforeach ($query->result() as $row){\n\t\t\t$id = $row->id;\n\t\t\t$title = $row->title;\n\t\t\t$link_type = $row->link_type;\n\t\t\t$page_id = $row->page_id;\n\t\t\t$module_name = $row->module_name;\n\t\t\t$url = $row->url;\n\t\t\t$uri = $row->uri;\n\t\t\t$dyn_group_id = $row->dyn_group_id;\n\t\t\t$position = $row->position;\n\t\t\t$target = $row->target;\n\t\t\t$parent_id = $row->parent_id;\n\t\t\t$is_parent = $row->is_parent;\n\t\t\t$show_menu = $row->show_menu;\n\t\t\t$fa_icon = $row->fa_icon;\n\t\t\tif ($show_menu && $parent_id == 0){\n\t\t\t\tif($is_parent == 1){\n\t\t\t\t\t$html_out .= '<li>'.anchor($url, '<i class=\"'.$fa_icon.'\"></i> '.$title.\"<i class='fa fa-angle-left pull-right'></i>\", 'name=\"'.$title.'\" id=\"'.$id.'\" target=\"'.$target.'\"');\n\t\t\t\t\t$html_out .= $this->get_childs($id);\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$html_out .= '<li>'.anchor($url, '<i class=\"'.$fa_icon.'\"></i> '.$title, 'name=\"'.$title.'\" id=\"'.$id.'\" target=\"'.$target.'\"');\n\t\t\t\t\t$html_out .= $this->get_childs($id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$html_out .= '</li>'.\"\\n\";\n\t\t$html_out .= \"\\t\\t\".'</ul>' . \"\\n\";\n\t\treturn $html_out;\n\t}", "title": "" }, { "docid": "ef5b4da198a2efc8b61bd8db36d78d6f", "score": "0.5742213", "text": "public function add_menu_item () {\n\t\t$page = add_menu_page( __( 'Listeo Core Settings', 'listeo_core' ) , __( 'Listeo Core Settings', 'listeo_core' ) , 'manage_options' , 'listeo_core_settings' , array( $this, 'settings_page' ) );\n\t\t\t\tadd_submenu_page( 'listeo_core_settings', __( 'Listeo Core Settings', 'listeo_core' ), __( 'Listeo Core Settings', 'listeo_core' ),\t'manage_options', 'listeo_core_settings');\n\t\tadd_action( 'admin_print_styles-' . $page, array( $this, 'settings_assets' ) );\n\t}", "title": "" }, { "docid": "0f7f455e76afc8080036a9f56f60b627", "score": "0.57383215", "text": "function build_menu_items($level, $parentid)\r\n{\r\n\t$pages = Database::Singleton()->sql_select(array('id', 'title', 'page'), 'tbl_pages', array('parentid', 'visible', 'deleted'), array($parentid, '1', '0'), array('sort'));\r\n\treturn $pages;\r\n}", "title": "" }, { "docid": "0e8bc774c7d7710515a8253506b8408c", "score": "0.57362777", "text": "function ambil_menu($type_menu,$parent=0){\n\n\t\t\t\t\t\t$kondisi=array(\n\n\t\t\t\t\t\t\t\"menu_id\"=>$type_menu,\n\t\t\t\t\t\t\t\"menu_child_parent\" => $parent,\n\t\t\t\t\t\t\t\"aktif\" => \"Y\"\n\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t//query ke database\n\t\t\t\t\t\t$this->CI->db->order_by(\"posisi\",\"ASC\");\n\t\t\t\t\t\t$query= $this->CI->db->get_where(\"menu_child\",$kondisi);\n\n\t\t\t\t\t\t//cek apakah memiliki hasil\n\t\t\t\t\t\tif($query->num_rows()>0){\n\t\t\t\t\t\t\t$class=$parent==0?\"nav navbar-nav\":\"dropdown-menu\";\n\t\t\t\t\t\t\t$this->menu.=\"<ul class='$class'>\";\n\n\t\t\t\t\t\t\tforeach ($query->result_array() as $menu) {\n\t\t\t\t\t\t\t\t//cek apakah menu sekarang mempunyai submenu atau tidak\n\t\t\t\t\t\t\t\t$cek=$this->CI->db->get_where('menu_child',array('menu_child_parent'=>$menu['menu_child_id'],'aktif'=>'Y','menu_id'=>$type_menu));\n\n\t\t\t\t\t\t\t\t//jika terdapat sub menu\n\t\t\t\t\t\t\t\tif($cek->num_rows()>0){\n\n\t\t\t\t\t\t\t\t\t$this->menu.= \"<li class='dropdown'><a href='$menu[menu_child_url]' target='$menu[menu_child_target]' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'>$menu[menu_child_nama] <span class='caret'></span></a>\";\n\t\t\t\t\t\t\t\t\t//panggil ambil_menu() secara reqursive untuk mengambil sub-menu nya\n\t\t\t\t\t\t\t\t\t$this->ambil_menu($type_menu,$menu['menu_child_id']);\n\t\t\t\t\t\t\t\t\t$this->menu.= \"</li>\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//jika tidak memiliki sub menu\n\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t$this->menu.= \"<li><a href='$menu[menu_child_url]' target='$menu[menu_child_target]'>$menu[menu_child_nama]</a>\";\n\t\t\t\t\t\t\t\t\t$this->menu.= \"</li>\";\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->menu.=\"</ul>\";\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//jika tidak ada hasil.\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}", "title": "" }, { "docid": "6aaae2f9b9d83e4ddc55636d6cdc0597", "score": "0.5729398", "text": "function br_add_menu_paquetes() {\n\t//add_menu_page( 'Visibilidad de Paquetes', 'Visibilidad de Paquetes','manage_options', 'br_pack_settings', 'br_pack_settings_screen' );\n\tadd_submenu_page( 'ait-theme-options','Visibilidad de Paquetes', 'Visibilidad de Paquetes','manage_options', 'br_pack_display', 'br_pack_display_screen' );\n}", "title": "" }, { "docid": "820ca16b5efbf28ad1154117d9df2aae", "score": "0.57274854", "text": "function add_menu_item($items, $args){\n if (is_user_logged_in()&&$args->theme_location == ('main_nav'||'primary')) {\n $items .= '<li style=\"background:brown;\" class=\"menu-item\"><a href=\"/bookmarks/\">Bookmarks</a></li>';\n\t }\n return $items;\n }", "title": "" }, { "docid": "50bb4893196499253bb09279b6a9304e", "score": "0.57244915", "text": "public function breadCumbWriter($str_link=null) {\n \n $sql = \"SELECT b.name AS menu1,b.id AS menu1_id, a.name as menu2, a.id AS menu2_id\n FROM m_modules a\n LEFT JOIN m_modules b ON a.parent = b.id WHERE a.link = '{$str_link}' \";\n $menu = $this->obj->db->query($sql)->row_array();\n \n if ($menu) {\n \n //if only menu1 is availble\n if ($menu['menu1']) {\n \n $sql2 = \"SELECT DISTINCT a.name,a.link FROM m_modules a\n JOIN m_user_access b ON b.modul = a.const AND b.group_id = {$this->obj->session->userdata('group_id')}\n JOIN m_user c ON c.group_id = b.group_id\n WHERE a.parent = {$menu['menu1_id']} AND a.id <> {$menu['menu2_id']} AND\n b.view = 1 \";\n $anak= $this->obj->db->query($sql2)->result();\n $menu['child_menu'] = array();\n \n if ($anak) {\n \n foreach ($anak as $nk) {\n \n //re Check, only if it has Privilege\n \n array_push($menu['child_menu'], array(\n \n 'name' => $nk->name,\n 'link' => $nk->link\n ));\n \n }\n }\n }\n //print_r($menu);\n return $menu;\n }\n return null;\n \n }", "title": "" }, { "docid": "b9bca71175b4e2ad0630c80f4ad724e8", "score": "0.5720179", "text": "function initMenu()\n\t\t{\n\t\t\tif( !$this->checkCleioMenu() ){\n\t\t\t\tif( function_exists('add_object_page') ) add_object_page( \t__('Cleio', 'cleio'), __('Cleio', 'cleio'), 'administrator', 'cleio-base', array( &$this, 'contentAdminPage' ), 'dashicons-location', 6 );\n\t\t\t\telse add_menu_page( __('Cleio', 'cleio'), __('Cleio', 'cleio'), 'administrator', 'cleio-base', array( &$this, 'contentAdminPage' ), 'dashicons-location', 6 );\n\t\t\t\tadd_submenu_page( 'cleio-base', __('Cleio - Toolbox', 'cleio'), __('Cleio Toolbox', 'cleio'), 'administrator', 'cleio-base', array( &$this, 'contentAdminPage' ) );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tadd_submenu_page( 'cleio-base', __('Cleio - Toolbox', 'cleio'), __('Cleio Toolbox', 'cleio'), 'administrator', 'cleio-toolbox', array( &$this, 'contentAdminPage' ) );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "407761c51158488524ff67a92ca321ce", "score": "0.5719019", "text": "function admin_menu(){\n\t\t\tremove_menu_page('edit.php?post_type=space_survey');\n\n\t\t\tforeach( $this->getMenu() as $slug => $menu_item ){\n\n\t\t\t\t$menu_item['slug'] = $slug;\n\n\t\t\t\t// CHECK FOR MAIN MENU OR SUB MENU\n\t\t\t\tif( !isset( $menu_item['menu'] ) ){\n\t\t\t\t\tadd_menu_page( $menu_item['title'], $menu_item['title'], 'manage_options', $menu_item['slug'], array( $this, 'menu_page' ), $menu_item['icon'] );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tadd_submenu_page( $menu_item['menu'], $menu_item['title'], $menu_item['title'], 'manage_options', $menu_item['slug'], array( $this, 'menu_page' ) );\n\t\t\t\t}\n\n\t\t\t}\n\n\n\n\n\n\t\t}", "title": "" }, { "docid": "72929b1066d2ba9e68096fef7bb2aaa9", "score": "0.5716411", "text": "function multilevelMenu($table,$parentId,$blank, $count, $c, $catid)\n\n{\n\n if ($table == \"menyu\"){$selectData = \"`id`,`name`,`parent_id`,`type`\";}else{$selectData=\"`id`,`name`,`parent_id`\";}\n $parentcategoryfetch = prepare(\n\n $selectData, \"$table\", \"`parent_id`=? AND `status`=?\", [$parentId,\"1\"], \"`name`\", \"ASC\"\n\n );\n\n\n\n if ($c < $count) {\n\n $blank .= \"╚═ \";\n\n }\n\n $c = $count;\n\n $count++;\n\n\n\n while($parentcategory = fetch($parentcategoryfetch)) {\n\n if ($catid == $parentcategory['id']) {\n\n $selected = 'selected';\n\n } else {\n\n $selected = '';\n\n }\n\n if (get('id')!=$parentcategory['id'] AND intval($parentcategory['id']) > 0) {\n\n echo '<option value=\"' . $parentcategory['id'] . '\" ' . $selected . '>';\n\n echo $blank . $parentcategory['name'];\n\n if ($table==\"menyu\"){\n echo \" - [\".$parentcategory['type'].\" menyu]\";\n }\n\n echo '</option>';\n\n multilevelMenu($table, $parentcategory['id'], $blank, $count, $c, $catid);\n\n }\n\n }\n\n}", "title": "" }, { "docid": "5ab5ab6344f988599efcf4a59d338841", "score": "0.57138515", "text": "function xonly_custom_menu_item ( $items, $args ) {\n\t\t\t\t\t\t$home_hide = get_theme_mod(\"goodweb_home-hide\",FALSE);\n\t\t\t\t\t\tif(!$home_hide ) $items = '<li class=\"menu-item menu-item-type-post_type menu-item-object-page\"><a href=\"'.get_home_url().'\" class=\"current\">'.__(\"Home\",\"goodweb\").'</a></li>'.$items;\n\t\t\t\t\t $items = '<li class=\"header-menu-closer visible-phone visible-tablet\"><a><div class=\"menubutton txt-center\"><i class=\"icon-cancel\"></i></div></a></li>\n\t\t\t\t\t '.$items;\n\t\t\t\t\t return $items;\n\t\t\t\t\t}", "title": "" }, { "docid": "79fe7705f978730d1386e43f310c3a1c", "score": "0.57106686", "text": "function starter_menu_link(array $variables) {\n //clean up the classes\n\n $remove = array('first', 'last', 'leaf', 'collapsed', 'expanded', 'expandable');\n /*$remove = array();\n if(theme_get_setting('mothership_classes_menu_items_firstlast')){\n $remove[] .= \"first\";\n $remove[] .= \"last\";\n }\n if(theme_get_setting('mothership_classes_menu_leaf')){\n $remove[] .= \"leaf\";\n }\n if(theme_get_setting('mothership_classes_menu_collapsed')){\n $remove[] .= \"collapsed\";\n $remove[] .= \"expanded\";\n $remove[] .= \"expandable\";\n }\n\n if(theme_get_setting('mothership_classes_menu_items_active')){\n $remove[] .= \"active-trail\";\n $remove[] .= \"active\";\n }*/\n\n if(!empty($variables['element']['#attributes']['class'])){\n\n if($remove){\n $variables['element']['#attributes']['class'] = array_diff($variables['element']['#attributes']['class'],$remove);\n }\n\n //Remove thee menu-mlid-[NUMBER]\n if(TRUE /*theme_get_setting('mothership_classes_menu_items_mlid')*/){\n $variables['element']['#attributes']['class'] = preg_grep('/^menu-mlid-/', $variables['element']['#attributes']['class'], PREG_GREP_INVERT);\n }\n //if we wanna remove the class for realz so nozing passes\n if(FALSE /*theme_get_setting('mothership_classes_menu_items')*/){\n unset($variables['element']['#attributes']['class']);\n }\n\n //test if we even have to have class defined\n if(empty($variables['element']['#attributes']['class'])) {\n unset($variables['element']['#attributes']['class']);\n }\n }\n\n $element = $variables['element'];\n\n $sub_menu = '';\n\n if (!empty($element['#below'])) {\n $sub_menu = drupal_render($element['#below']);\n }\n// dpr($variables['element']['#attributes']);\n\n $output = l($element['#title'], $element['#href'], $element['#localized_options']);\n return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . \"</li>\\n\";\n}", "title": "" }, { "docid": "8f9a7572dc17f38029ded188ed46e47e", "score": "0.57102305", "text": "function UKMrekruttering_menu() {\n\tUKM_add_submenu_page('UKMmarketing','Rekruttering', 'Rekruttering', 'superadmin', 'UKMrekruttering','UKMrekruttering');#, 'http://ico.ukm.no/contact-menu.png', 11);\n\tUKM_add_scripts_and_styles('UKMrekruttering', 'UKMrekruttering_script' );\n}", "title": "" }, { "docid": "3f22572cf3c512a41a97e11aef7092ab", "score": "0.5709102", "text": "function i_world_map_create_menu() {\r\n\t//$capability = 'manage_options';\r\n\t$capability = apply_filters( 'i_world_map_capability', 'manage_options' ); \r\n\t\r\n\tif ( current_user_can( $capability)) {\r\n\t// Add the top-level admin menu\r\n $page_title = 'Interactive World Maps';\r\n $menu_title = 'Interactive Maps';\r\n\t\r\n\t\r\n $menu_slug = 'i_world_map_menu';\r\n $function = 'i_world_map_manage';\r\n $mainp = add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function,'','61.15' );\r\n\t\r\n\t//sub menu main \r\n\t$sub_menu_title = 'Manage Maps';\r\n $managep = add_submenu_page( $menu_slug, $page_title, $sub_menu_title, $capability, $menu_slug, $function);\r\n\t\r\n\t$submenu_page_title = 'Add New';\r\n $submenu_title = 'Add New Map';\r\n $submenu_slug = 'iwm_add';\r\n $submenu_function = 'i_world_map_add_new';\r\n $addp = add_submenu_page( $menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function);\r\n\t\r\n\t\r\n\t$submenu_page_title = 'Settings';\r\n $submenu_title = 'Settings';\r\n $submenu_slug = 'iwm_settings';\r\n $submenu_function = 'i_world_map_settings_page';\r\n $defaultp = add_submenu_page( $menu_slug, $submenu_page_title, $submenu_title, $capability, $submenu_slug, $submenu_function);\r\n\r\n\t\t\t\r\n\t//call register settings function\r\n\tadd_action( 'admin_init', 'register_i_world_map_settings' );\r\n\tadd_action( $addp, 'i_world_map_includes_add' );\r\n\tadd_action( $defaultp, 'i_world_map_includes_def' );\r\n\t}\r\n}", "title": "" }, { "docid": "6ef899c8aadc3bee55cb7e95b7774f21", "score": "0.5703981", "text": "protected function getMenu()\n {\n }", "title": "" }, { "docid": "782e17833a43873627f62359c452e799", "score": "0.57000464", "text": "private function createMenu()\r\n {\r\n $this->createMenuItem(array(\r\n 'label' => 'Yoochoose',\r\n 'class' => 'yoochoose_image',\r\n 'active' => 1,\r\n 'parent' => null,\r\n 'controller' => 'Yoochoose',\r\n 'action' => 'index',\r\n ));\r\n }", "title": "" }, { "docid": "b4060a80230c1e23278927dfb1b8d269", "score": "0.5698866", "text": "function odaa_menu_tree__menu_block__1($vars) {\n return '<ul class=\"unstyled\">' . $vars['tree'] . '</ul>';\n}", "title": "" }, { "docid": "cef7070faa27d04a04d1cf540e39212d", "score": "0.56957346", "text": "function woo_add_menu_in_admin() {\n\tadd_submenu_page(\n\t\t'edit.php?post_type=obituary',\n\t\t'Property Seting', /*page title*/\n\t\t'Settings', /*menu title*/\n\t\t'manage_options', /*roles and capabiliyt needed*/\n\t\t'OBL_setting',\n\t\t'OBL_setting' /*replace with your own function*/\n\t);\n}", "title": "" }, { "docid": "af63f2bc374db205b2fc8799818aedbd", "score": "0.56938344", "text": "public function getPromouterMenu()\n {\n }", "title": "" }, { "docid": "48755d38261f5a546fc0e439030ec9f5", "score": "0.56900114", "text": "function setup_theme_admin_menus() {\n\tadd_submenu_page('themes.php','Opcje motywu','lnbtheme - opcje','manage_options','lnbtheme_options','theme_options');\n\t/*generuje pozycje w menu głównym / odwołanie do pliku themes.php / tytuł na pasku / nazwa w menu / uprawnienia(manage) / identyfikator / funkcja do wyświetlania definiowana poniżej */\n}", "title": "" }, { "docid": "731ae199d595e36724dfc081e6dadb09", "score": "0.5689557", "text": "function my_wp_nav_menu_items( $items, $args ) {\n\n\n\n// echo '<pre>';\n// print_r($args);\n// echo '</pre>';\n\n// // get menu\n// $menu = wp_get_nav_menu_object($args->menu);\n//\n//\n// // modify primary only\n// if( $args->theme_location == 'top' ) {\n//\n// // vars\n// $logo = get_field('logo', $menu);\n// $color = get_field('color', $menu);\n//\n//\n// // prepend logo\n// $html_logo = '<li class=\"menu-item-logo\"><a href=\"'.home_url().'\"><img src=\"'.$logo['url'].'\" alt=\"'.$logo['alt'].'\" /></a></li>';\n//\n//\n// // append style\n// $html_color = '<style type=\"text/css\">.navigation-top{ background: '.$color.';}</style>';\n//\n//\n// // append html\n// $items = $html_logo . $items . $html_color;\n//\n// }\n\n\n // return\n //return $items;\n\n}", "title": "" }, { "docid": "6333524c7aaa07fbf4e7bce177b71c67", "score": "0.5689531", "text": "function create_named_sub_menu_1_21($NAMA,$STATUS){ \r\n // ------------------------------------------------------------------------- MAIN INITIALIZE\r\n $status_id = '1';\r\n $parent_id = '21';\r\n $tipe = '1';\r\n $urutan = '3';\r\n $deskripsi = 'Admin Control';\r\n $has_sub = NULL;\r\n $ui = '1';\r\n $content = '0';\r\n $custom_css_js = '0';\r\n\r\n // ------------------------------------------------------------------------- SUB INITIALIZE DATA\r\n $dmha_id = $parent_id.'01';\r\n $urutan ++;\r\n $nama = str_replace('_', ' ', $NAMA);\r\n $link = 'javascript:;';\r\n $icon = NULL;\r\n $css_js = NULL;\r\n $tipe_data = '6';\r\n $form = NULL;\r\n $kategori = '1';\r\n $temp_dmha = $dmha_id;\r\n\r\n // ------------------------------------------------------------------------- ACTION\r\n if(strtolower($STATUS) == 'new'){\r\n $dmha_id = $parent_id.count_sub_dmha($parent_id);\r\n }else{\r\n daftar_multi_hak_akses::double_dmha_checking($STATUS.'%');\r\n $dmha_id = $STATUS;\r\n }\r\n\r\n // insert dmha terbaru \r\n //full_insert($STATUS_ID,$DMHA_ID,$PARENT_ID,$TIPE,$URUTAN,$NAMA,$LINK,$DESKRIPSI,$HAS_SUB,$ICON,$CSS_JS,$UI,$TIPE_DATA,$FORM,$KATEGORI)\r\n daftar_multi_hak_akses::full_insert($status_id,$dmha_id,$parent_id,$tipe,$urutan,$nama,$link,$deskripsi,$has_sub,$icon,$css_js,$ui,$tipe_data,$form,$kategori,$content,$custom_css_js);\r\n\r\n // ------------------------------------------------------------------------- RE-SUB INITIALIZE DATA\r\n $parent_id = $dmha_id;\r\n $deskripsi .= ' '.$NAMA;\r\n $content = '4';\r\n $custom_css_js = '4';\r\n\r\n // ------------------------------------------------------------------------- SUB-SUB INITIALIZE DATA\r\n $dmha_id = $temp_dmha.'01';\r\n $urutan ++;\r\n $nama = 'Data';\r\n $link = str_replace(' ', '_', $nama.' '.$deskripsi);\r\n $icon = '40';\r\n $css_js = '3';\r\n $tipe_data = '7';\r\n $form = NULL;\r\n $kategori = '1';\r\n\r\n // ------------------------------------------------------------------------- ACTION\r\n if(strtolower($STATUS) == 'new'){\r\n $dmha_id = $parent_id.count_sub_dmha($parent_id);\r\n }else{\r\n daftar_multi_hak_akses::double_dmha_checking($STATUS.'%');\r\n $dmha_id = $STATUS;\r\n }\r\n\r\n // insert dmha terbaru \r\n //full_insert($STATUS_ID,$DMHA_ID,$PARENT_ID,$TIPE,$URUTAN,$NAMA,$LINK,$DESKRIPSI,$HAS_SUB,$ICON,$CSS_JS,$UI,$TIPE_DATA,$FORM,$KATEGORI)\r\n daftar_multi_hak_akses::full_insert($status_id,$dmha_id,$parent_id,$tipe,$urutan,$nama,$link,$deskripsi,$has_sub,$icon,$css_js,$ui,$tipe_data,$form,$kategori,$content,$custom_css_js);\r\n\r\n // ------------------------------------------------------------------------- SUB-SUB INITIALIZE ADD\r\n $dmha_id = $temp_dmha.'02';\r\n $urutan ++;\r\n $nama = 'Add';\r\n $link = str_replace(' ', '_', $nama.' '.$deskripsi);\r\n $icon = '75';\r\n $css_js = '4';\r\n $tipe_data = '1';\r\n $form = '1';\r\n $kategori = '1';\r\n $custom_css_js = '2';\r\n\r\n // ------------------------------------------------------------------------- ACTION\r\n if(strtolower($STATUS) == 'new'){\r\n $dmha_id = $parent_id.count_sub_dmha($parent_id);\r\n }else{\r\n daftar_multi_hak_akses::double_dmha_checking($STATUS.'%');\r\n $dmha_id = $STATUS;\r\n }\r\n\r\n // insert dmha terbaru \r\n //full_insert($STATUS_ID,$DMHA_ID,$PARENT_ID,$TIPE,$URUTAN,$NAMA,$LINK,$DESKRIPSI,$HAS_SUB,$ICON,$CSS_JS,$UI,$TIPE_DATA,$FORM,$KATEGORI)\r\n daftar_multi_hak_akses::full_insert($status_id,$dmha_id,$parent_id,$tipe,$urutan,$nama,$link,$deskripsi,$has_sub,$icon,$css_js,$ui,$tipe_data,$form,$kategori,$content,$custom_css_js);\r\n\r\n // ------------------------------------------------------------------------- SUB-SUB INITIALIZE EDIT\r\n $dmha_id = $temp_dmha.'03';\r\n $urutan ++;\r\n $nama = 'Edit';\r\n $link = str_replace(' ', '_', $nama.' '.$deskripsi);\r\n $icon = '71';\r\n $css_js = '4';\r\n $tipe_data = '2';\r\n $form = '1';\r\n $kategori = '2';\r\n\r\n // ------------------------------------------------------------------------- ACTION\r\n if(strtolower($STATUS) == 'new'){\r\n $dmha_id = $parent_id.count_sub_dmha($parent_id);\r\n }else{\r\n daftar_multi_hak_akses::double_dmha_checking($STATUS.'%');\r\n $dmha_id = $STATUS;\r\n }\r\n\r\n // insert dmha terbaru \r\n //full_insert($STATUS_ID,$DMHA_ID,$PARENT_ID,$TIPE,$URUTAN,$NAMA,$LINK,$DESKRIPSI,$HAS_SUB,$ICON,$CSS_JS,$UI,$TIPE_DATA,$FORM,$KATEGORI)\r\n daftar_multi_hak_akses::full_insert($status_id,$dmha_id,$parent_id,$tipe,$urutan,$nama,$link,$deskripsi,$has_sub,$icon,$css_js,$ui,$tipe_data,$form,$kategori,$content,$custom_css_js);\r\n\r\n /*\r\n\r\n // ------------------------------------------------------------------------- SUB-SUB INITIALIZE COPY\r\n $dmha_id = $temp_dmha.count_sub_dmha($parent_id);\r\n $urutan ++;\r\n $nama = 'Copy';\r\n $link = str_replace(' ', '_', $nama.' '.$deskripsi);\r\n $icon = '91';\r\n $css_js = '4';\r\n $tipe_data = '3';\r\n $form = '1';\r\n $kategori = '2';\r\n\r\n // ------------------------------------------------------------------------- ACTION\r\n if(strtolower($STATUS) == 'new'){\r\n $dmha_id = $parent_id.count_sub_dmha($parent_id);\r\n }else{\r\n daftar_multi_hak_akses::double_dmha_checking($STATUS.'%');\r\n $dmha_id = $STATUS;\r\n }\r\n\r\n // insert dmha terbaru \r\n //full_insert($STATUS_ID,$DMHA_ID,$PARENT_ID,$TIPE,$URUTAN,$NAMA,$LINK,$DESKRIPSI,$HAS_SUB,$ICON,$CSS_JS,$UI,$TIPE_DATA,$FORM,$KATEGORI)\r\n daftar_multi_hak_akses::full_insert($status_id,$dmha_id,$parent_id,$tipe,$urutan,$nama,$link,$deskripsi,$has_sub,$icon,$css_js,$ui,$tipe_data,$form,$kategori,$content,$custom_css_js);\r\n */\r\n\r\n // ------------------------------------------------------------------------- SUB-SUB INITIALIZE DELETE\r\n $dmha_id = $temp_dmha.'04';\r\n $urutan ++;\r\n $nama = 'Delete';\r\n $link = str_replace(' ', '_', $nama.' '.$deskripsi);\r\n $icon = '72';\r\n $css_js = '4';\r\n $tipe_data = '4';\r\n $form = '1';\r\n $kategori = '2';\r\n\r\n // ------------------------------------------------------------------------- ACTION\r\n if(strtolower($STATUS) == 'new'){\r\n $dmha_id = $parent_id.count_sub_dmha($parent_id);\r\n }else{\r\n daftar_multi_hak_akses::double_dmha_checking($STATUS.'%');\r\n $dmha_id = $STATUS;\r\n }\r\n\r\n // insert dmha terbaru \r\n //full_insert($STATUS_ID,$DMHA_ID,$PARENT_ID,$TIPE,$URUTAN,$NAMA,$LINK,$DESKRIPSI,$HAS_SUB,$ICON,$CSS_JS,$UI,$TIPE_DATA,$FORM,$KATEGORI)\r\n daftar_multi_hak_akses::full_insert($status_id,$dmha_id,$parent_id,$tipe,$urutan,$nama,$link,$deskripsi,$has_sub,$icon,$css_js,$ui,$tipe_data,$form,$kategori,$content,$custom_css_js);\r\n\r\n //////////////////////////////////////////////////////////////////////////// \r\n }", "title": "" }, { "docid": "adccc889231845979952d2ddc4841dc3", "score": "0.56879663", "text": "function attach_options_to_menu()\n\t\t{\t\n\t\t\tif(!isset($this->avia_superobject->option_pages)) return;\n\t\t\t\t\n\t\t\t$page_creation_method = 'add_object_page'; //deprecated since 4.5\n\t\t\tif(function_exists('add_menu_page')) { $page_creation_method = 'add_menu_page'; }\n\t\t \n\t\t\t\n\t\t\tforeach( $this->avia_superobject->option_pages as $key => $data_set )\n\t\t\t{\n\t\t\t\n\t\t\t\t//if its the very first option item make it a main menu with theme or plugin name, then as first submenu add it again with real menu name \n\t\t\t\tif($key === 0)\n\t\t\t\t{\t\n\t\t\t\t\t$the_title = apply_filters( 'avia_filter_backend_page_title', $this->avia_superobject->base_data['Title'] );\n\t\t\t\t\t$menu_title = apply_filters( 'avia_filter_backend_menu_title', $the_title );\n\t\t\t\t\t\n\t\t\t\t\t$top_level = $data_set['slug'];\n\t\t\t\t\t$avia_page = $page_creation_method(\t$the_title, \t\t\t\t\t\t\t\t\t// page title\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$menu_title, \t\t\t\t\t\t\t\t\t// menu title\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'manage_options', \t\t\t\t\t\t\t\t// capability\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$top_level, \t\t\t\t\t\t\t\t\t// menu slug (and later also database options key)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(&$this, 'render_page'),\t\t\t\t\t// executing function\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"dashicons-admin-home\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t26\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($data_set['parent'] == $data_set['slug'])\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t$avia_page = add_submenu_page(\t$top_level,\t\t\t\t\t\t\t\t// parent page slug to attach\n\t\t\t\t\t\t\t\t\t\t\t\t\t$data_set['title'], \t\t\t\t\t// page title\n\t\t\t\t\t\t\t\t\t\t\t\t\t$data_set['title'], \t\t\t\t\t// menu title\n\t\t\t\t\t\t\t\t\t\t\t\t\t'manage_options', \t\t\t\t\t\t// capability\n\t\t\t\t\t\t\t\t\t\t\t\t\t$data_set['slug'], \t\t\t\t\t\t// menu slug (and later also database options key)\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray(&$this, 'render_page'));\t\t\t// executing function\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!empty($avia_page))\n\t\t\t\t{\n\t\t\t\t\t//add scripts and styles to all avia options pages\n\t\t\t\t\tadd_action('admin_print_scripts-' . $avia_page, array(&$this, 'add_scripts'));\n\t\t\t\t\tadd_action('admin_print_styles-' . $avia_page, array(&$this, 'add_styles'));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "88a0f11a55fe5d34aff08dcff55ae939", "score": "0.56849664", "text": "function reg_admn_menu(){\n\t\tadd_menu_page(__(\"Html Social Share\", \"zm-sh\"), __(\"Html Social Share\", \"zm-sh\"),\"administrator\", \"zm_shbt_opt\",array($this,\"zm_sh_opt\"),\"\",\"59.679861\");\n\t}", "title": "" } ]
24f20b61d9fb52cb88f55d17c4da1eff
Bootstrap the application services.
[ { "docid": "c7ac7a9dc71ebd0689b10d7589727c74", "score": "0.0", "text": "public function boot()\n {\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/config.php' => config_path('laravel-form-template.php'),\n ], 'config');\n }\n }", "title": "" } ]
[ { "docid": "01810aad984fdd6ae47cc91f94b40072", "score": "0.7091475", "text": "public function boot()\n {\n $this->mergeConfigFrom(__DIR__ . '/config/services.php', 'services');\n }", "title": "" }, { "docid": "ad03878633aea6232296ce20727a7098", "score": "0.70126134", "text": "public function boot() // This method is called after all other service providers have been registered, meaning you have access to all other services that have been registered by the framework.\n {\n //\n }", "title": "" }, { "docid": "886b79c8ad1bf18e61d38bbef4d3b767", "score": "0.6987957", "text": "public function boot(): void\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'perspikapps');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'perspikapps');\n // $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n\n $this->registerMiddleware(InjectEnvRibbon::class);\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "106f9b660ee209e61b3863856f2081a4", "score": "0.69654787", "text": "public function boot()\n {\n //\n }", "title": "" } ]
7409e945f64f12f78d585ce1d2b6b44f
displays page for user to create a new group
[ { "docid": "11d5885062939a7fd2273b6a2b0fdfc6", "score": "0.7945814", "text": "public function pageNewGroup()\n {\n return view('newGroup');\n }", "title": "" } ]
[ { "docid": "fe3b118dda4fa5858607d567f65dc233", "score": "0.8010485", "text": "public function create_group()\n\t{\n redirect('admin/user/create_group', 'refresh');\n\t}", "title": "" }, { "docid": "9c9c75e9824c72254b2035b0fa5be98a", "score": "0.7955729", "text": "public function create()\n\t{\n $groups = \\Sentry::findAllGroups();\n $ar_groups = array();\n foreach($groups as $group) {\n $ar_groups[$group->id] = $group->name;\n }\n $this->layout->content = \\View::make('helles-manager::admin.user.create')\n ->with('user', new \\User())\n ->with('groups', $ar_groups);\n\t}", "title": "" }, { "docid": "f8b9429feb2bd2b2189177bd61121914", "score": "0.7901705", "text": "public function create()\n\t{\n\t\treturn view('groups.create');\n\t}", "title": "" }, { "docid": "8a36cb0815b4fd735c9a80987fec2d30", "score": "0.7803525", "text": "public function create()\n {\n return view('admin::modules.group.create');\n }", "title": "" }, { "docid": "6e44f92e68bbd1d00cc8e93478a4ad0e", "score": "0.7801713", "text": "public function create()\n {\n getAuthentication()->requireAuthentication();\n // TODO add crumb check\n $groupId = $this->group->create($_POST);\n\n if($groupId !== false)\n {\n $res = $this->api->invoke(sprintf('/%s/group/%s/view.json', $this->apiVersion, $groupId), EpiRoute::httpGet);\n if($res['code'] === 200)\n return $this->created('Groups for this user', $res['result']);\n }\n\n return $this->error('Could not create a group', false);\n }", "title": "" }, { "docid": "66464ba981769dfaa532a34f8475c64b", "score": "0.780043", "text": "function create_group()\n\t{\n\t\tif (!Modules::run('role/has_role', 'create_group')) {\n\t\t\tm('w', t('notAuthorized', t('createGroup')));\n\t\t\tredirect('/home');\n\t\t}\n\n\t\tif($this->input->post()){\n\t\t\t//validate form input\n\t\t\t$this->form_validation->set_rules('group_name', t('create_group_validation_name_label'), 'required|alpha_dash|xss_clean');\n\t\t\t$this->form_validation->set_rules('description', t('create_group_validation_desc_label'), 'xss_clean');\n\n\t\t\tif ($this->form_validation->run() == TRUE)\n\t\t\t{\n\t\t\t\t$new_group_id = $this->ion_auth->create_group($this->input->post('group_name', TRUE), $this->input->post('description', TRUE));\n\t\t\t\tif($new_group_id)\n\t\t\t\t{\n\t\t\t\t\tm('s', $this->ion_auth->messages());\n\t\t\t\t\tredirect(\"auth\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['message'] = m('en', validation_errors());\n\t\t\t}\n\t\t}\n\n\t\t$data['group_name'] = array(\n\t\t\t'name' => 'group_name',\n\t\t\t'id' => 'group_name',\n\t\t\t'type' => 'text',\n\t\t\t'value' => $this->form_validation->set_value('group_name'),\n\t\t);\n\t\t$data['description'] = array(\n\t\t\t'name' => 'description',\n\t\t\t'id' => 'description',\n\t\t\t'type' => 'text',\n\t\t\t'value' => $this->form_validation->set_value('description'),\n\t\t);\n\n\t\t//$this->_render_page('auth/create_group', $this->data);\n\t\t$data['active'] = \"users\";\n\t\t$this->template->title(t('create_group_title'));\n\t\t$this->template->build('v_create_group', $data);\n\t}", "title": "" }, { "docid": "d6f8e723667150dcc1c29634e6d48ff8", "score": "0.7777751", "text": "function create_group()\n {\n \t$this->data['title'] = $this->lang->line('create_group_title');\n\n \tif (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n \t{\n \t\tredirect('auth', 'refresh');\n \t}\n\n\t\t// validate form input\n \t$this->form_validation->set_rules('group_name', $this->lang->line('create_group_validation_name_label'), 'required|alpha_dash');\n\n \tif ($this->form_validation->run() == TRUE)\n \t{\n \t\t$new_group_id = $this->ion_auth->create_group($this->input->post('group_name'), $this->input->post('description'));\n \t\tif($new_group_id)\n \t\t{\n\t\t\t\t// check to see if we are creating the group\n\t\t\t\t// redirect them back to the admin page\n \t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n \t\t\tredirect(\"auth\", 'refresh');\n \t\t}\n \t}\n \telse\n \t{\n\t\t\t// display the create group form\n\t\t\t// set the flash data error message if there is one\n \t\t$this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n \t\t$this->data['group_name'] = array(\n \t\t\t'name' => 'group_name',\n \t\t\t'id' => 'group_name',\n \t\t\t'type' => 'text',\n \t\t\t'value' => $this->form_validation->set_value('group_name'),\n \t\t\t);\n \t\t$this->data['description'] = array(\n \t\t\t'name' => 'description',\n \t\t\t'id' => 'description',\n \t\t\t'type' => 'text',\n \t\t\t'value' => $this->form_validation->set_value('description'),\n \t\t\t);\n\n \t\t$this->_render_page('auth/create_group', $this->data);\n \t}\n }", "title": "" }, { "docid": "d794683d170801ef8658ef1e206be872", "score": "0.77573353", "text": "public function create()\n {\n return view('modules.admin.groups.create');\n }", "title": "" }, { "docid": "5c686c2c4a3419ce877f161696ddbf26", "score": "0.7742529", "text": "public function create()\n {\n return view('banners::admin.groups.create');\n }", "title": "" }, { "docid": "a7933018d27c885f35f0049db6718adc", "score": "0.7722321", "text": "public function create()\n {\n return view('admin.usergroup.create');\n }", "title": "" }, { "docid": "5f584bd5c1908c1c3bf347153bec34c3", "score": "0.7716107", "text": "public function create()\n { \n $gc = new generalContainer;\n $gc->create = true;\n $gc->select = true;\n $gc->form = true;\n $gc->date = true;\n $gc->url_base = \"groups\";\n $gc->page_name = \"Crear nuevo grupo de alumnos\";\n $gc->page_description = \"Inserte los campos requeridos\";\n $gc->entity_to_edit = new Group;\n $gc->breadcrumb('groups.create');\n return view('cms.groups.form', compact('gc'));\n }", "title": "" }, { "docid": "dd5a7297c4b311a42b1d4350d008d475", "score": "0.77159965", "text": "public function create()\n {\n \t$this->data['groups'] = Group::all();\n \treturn view('groups.create');\n }", "title": "" }, { "docid": "b63e2a4f313a15d05f0350fcd4d41e11", "score": "0.7695774", "text": "public function create() {\n \n return View::make('groups.create');\n \n }", "title": "" }, { "docid": "60891701299366150dd46bfafe905a51", "score": "0.76764214", "text": "public function create()\n {\n return view('backend.groups.create');\n }", "title": "" }, { "docid": "627b62a5549911877c86e9a605b63fd1", "score": "0.7652283", "text": "public function create()\n {\n $groups = $this->getGroups();\n return view('pages.groups.create', compact('groups'));\n }", "title": "" }, { "docid": "dfc517e6987a4698414238b662343cbc", "score": "0.7645471", "text": "public function create()\n {\n return view('groups/create-group');\n }", "title": "" }, { "docid": "f795fbd22e643a7fa0a82aeb337fcac0", "score": "0.76319265", "text": "public function create_group()\n {\n $this->data['title'] = $this->lang->line('create_group_title');\n\n if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin()) {\n redirect('auth', 'refresh');\n }\n\n // validate form input\n $this->form_validation->set_rules('group_name', $this->lang->line('create_group_validation_name_label'), 'required|alpha_dash');\n\n if ($this->form_validation->run() == TRUE) {\n $new_group_id = $this->ion_auth->create_group($this->input->post('group_name'), $this->input->post('description'));\n if ($new_group_id) {\n // check to see if we are creating the group\n // redirect them back to the admin page\n $this->session->set_flashdata('message', $this->ion_auth->messages());\n redirect(\"auth\", 'refresh');\n }\n } else {\n // display the create group form\n // set the flash data error message if there is one\n $this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n $this->data['group_name'] = array(\n 'name' => 'group_name',\n 'id' => 'group_name',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('group_name'),\n );\n $this->data['description'] = array(\n 'name' => 'description',\n 'id' => 'description',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('description'),\n );\n\n $this->_render_page('auth/create_group', $this->data);\n }\n }", "title": "" }, { "docid": "14a4ebd59ba3a4875266328166c550d7", "score": "0.76205075", "text": "public function create()\n {\n return view('admin.groups.create');\n }", "title": "" }, { "docid": "0cf4d5479aaf4c4ed35c848d6b078918", "score": "0.76167464", "text": "function create_group()\n\t{\n\t\t$this->data['title'] = $this->lang->line('create_group_title');\n\n\t\tif (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n\t\t{\n\t\t\t// redirect('auth', 'refresh');\n\t\t}\n\n\t\t//validate form input\n\t\t$this->form_validation->set_rules('group_name', $this->lang->line('create_group_validation_name_label'), 'required|alpha_dash|xss_clean');\n\t\t$this->form_validation->set_rules('description', $this->lang->line('create_group_validation_desc_label'), 'xss_clean');\n\n\t\tif ($this->form_validation->run() == TRUE)\n\t\t{\n\t\t\t$new_group_id = $this->ion_auth->create_group($this->input->post('group_name'), $this->input->post('description'));\n\t\t\tif($new_group_id)\n\t\t\t{\n\t\t\t\t// check to see if we are creating the group\n\t\t\t\t// redirect them back to the admin page\n\t\t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n\t\t\t\tredirect(\"auth\", 'refresh');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//display the create group form\n\t\t\t//set the flash data error message if there is one\n\t\t\t$this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n\t\t\t$this->data['group_name'] = array(\n\t\t\t\t'name' => 'group_name',\n\t\t\t\t'id' => 'group_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('group_name'),\n\t\t\t);\n\t\t\t$this->data['description'] = array(\n\t\t\t\t'name' => 'description',\n\t\t\t\t'id' => 'description',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('description'),\n\t\t\t);\n\n\t\t\t$this->_render_page('auth/create_group', $this->data);\n\t\t}\n\t}", "title": "" }, { "docid": "241dd6f3d00ae69f0406155b9d19607f", "score": "0.7581218", "text": "public function create()\n {\n $companies = Company::get(Company::MINIMAL_COLUMNS);\n $types = Group::getType();\n\n\n return view('pages.groups.creategroup', [\n 'companies' => $companies,\n 'types' => $types,\n ]);\n }", "title": "" }, { "docid": "fa209dcc208fccd88e66ce4ea2285aaa", "score": "0.7565016", "text": "public function create()\n {\n\n\n $view = view(\"groups.create\");\n return $view;\n\n\n }", "title": "" }, { "docid": "38a786e6e6fb6ae0d917372e7cdefd7d", "score": "0.75639623", "text": "public function create()\n {\n return view('groups.create');\n }", "title": "" }, { "docid": "9f02a9e51ef2b1b4ac8d8328bb76cfc9", "score": "0.75542456", "text": "public function create()\n {\n return View::make('admin.acl_groups.create')\n ->with('title', 'Novo Grupo');\n }", "title": "" }, { "docid": "ff979928cfc434a8bf2c1dae215a504a", "score": "0.7469893", "text": "public function create()\n {\n return view('group.create');\n }", "title": "" }, { "docid": "1dfe7b2eb7b80c3968c7a4e3ae4b6d46", "score": "0.7447377", "text": "function addGroup() {\n\t\t$adminGroup = new adminGroup;\n\t\t$template = new template;\n\t\t$template->assignClean('_TITLE', systemSettings::get('SITENAME').' Admin Groups');\n\t\t$template->assignClean('adminGroup', $adminGroup->fetchArray());\n\t\t$template->assignClean('accessSections', adminUser::$accessSections);\n\t\t$template->assignClean('groupAccess', $adminGroup->getAccess());\n\t\t$template->assignClean('propertyMenuItem', getRequest('propertyMenuItem'));\n\t\t$template->assignClean('mode', 'add');\n\t\t$template->assignClean('admin', adminCore::getAdminUser());\n\t\t$template->setSystemDataGateway();\n\t\t$template->getSystemMessages();\n\t\t$template->display('admin/adminGroupEdit.htm');\n\t}", "title": "" }, { "docid": "673ce156d19a4f8d5902622b739c3d86", "score": "0.7380101", "text": "public function actionCreate()\n\t{\n\t\t$model=new RbacGroup('create');\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['RbacGroup']))\n\t\t{\n\t\t\t$model->attributes=$_POST['RbacGroup'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('priviledge','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}", "title": "" }, { "docid": "06f40ecae78c441f58ad1659da9f641b", "score": "0.7370507", "text": "public function create()\n {\n $group = new Group();\n\n return view('groups.create', ['group' => $group]);\n }", "title": "" }, { "docid": "6cc19cd3342967cae44f41b58b835026", "score": "0.7370373", "text": "public function create_group()\n {\n $this->data['title'] = $this->lang->line('create_group_title');\n\n if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin()) {\n redirect('login', 'refresh');\n }\n\n //validate form input\n $this->form_validation->set_rules('group_name', $this->lang->line('create_group_validation_name_label'), 'required|alpha_dash');\n\n if ($this->form_validation->run() == true) {\n $new_group_id = $this->ion_auth->create_group($this->input->post('group_name'), $this->input->post('description'), array('visibility' => $this->input->post('visibility')));\n if ($new_group_id) {\n // check to see if we are creating the group\n // redirect them back to the admin page\n $this->session->set_flashdata('message', $this->ion_auth->messages());\n redirect(\"login\", 'refresh');\n }\n } else {\n //display the create group form\n //set the flash data error message if there is one\n $this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n $this->data['group_name'] = array(\n 'name' => 'group_name',\n 'id' => 'group_name',\n 'type' => 'text',\n \"class\" => \"form-control\",\n 'value' => $this->form_validation->set_value('group_name'),\n );\n $this->data['description'] = array(\n 'name' => 'description',\n 'id' => 'description',\n 'type' => 'text',\n \"class\" => \"form-control\",\n 'value' => $this->form_validation->set_value('description'),\n );\n $visibility = $this->form_validation->set_value('visibility');\n $this->data['visibility'] = ($visibility != '') ? $visibility : 0;\n\n $this->data['pageHeading'] = lang('create_group_heading');\n//\t\t\t$this->_render_page('login/create_group', $this->data);\n $this->template->load('main', 'login', 'create_group', $this->data);\n }\n }", "title": "" }, { "docid": "03cdc03fd2c4dbd7958eb278b269821c", "score": "0.7361203", "text": "public function actionCreate()\n {\n $user=\\common\\models\\User::find()\n ->where(['=', 'user.id', Yii::$app->user->id])\n ->one();\n $courses = \\common\\models\\Course::find()->where(['uni_id'=>$user->uni_id])->all();\n\n $model = new Group();\n if ($model->load(Yii::$app->request->post())) {\n $model->uni_id = $user->uni_id;\n $model->save();\n if ($model->save()){\n return $this->redirect(['faculty/student', 'group_id' => $model->id]);\n }\n }\n return $this->render('create', [\n 'model' => $model,\n 'courses' =>$courses,\n ]);\n }", "title": "" }, { "docid": "1dd7e8deafb20c3fd02001631e35249a", "score": "0.73555654", "text": "public function creerAction()\n\t{\n\t\t$groupe = new GroupeContacts();\n\t\t\n\t\t$contacts = array();\n\t\t\n\t\tfor ($i=0; $i<10; $i++) {\n\t \t$member = new User();\n\t\t\t$member->setLastname(\"Messi\".$i);\n\t\t\t$member->setFirstname(\"Louis\".$i);\n\t\t\t$member->setSexe(\"M\");\n\t\t\t$contacts[] = $member;\n\t\t}\n\t\t\n\t\t$groupeForm = $this->createForm(new GroupeType(), $groupe);\n\t\n\t\treturn $this->render(\n\t\t\t\tConstViews::VIEW_FORM_NEW_GROUP,\n\t\t\t\tarray(\n\t\t\t\t\t\t$this::ATTRIBUTE_FORM => $groupeForm->createView(),\n\t\t\t\t\t\t'contacts' => $contacts\n\t\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "f1f8522382d1992f815208f59a3ea43b", "score": "0.73091483", "text": "public function create()\n {\n Auth::user()->hasRole(['super_admin']);\n\n return view('user.group_admin.create');\n }", "title": "" }, { "docid": "d9cb36f11a8cb82027d035a75e1dbdef", "score": "0.7303003", "text": "public function create()\n {\n $classes=Classes::where('campus_id',Session::get('campus_id'))->get();\n return view('admin.group.create',compact('classes'));\n }", "title": "" }, { "docid": "adfcb18c2479604d83cf01bb25f1f5f1", "score": "0.73017913", "text": "public function create()\n {\n //读取分类信息和标签信息\n\t\t$cates=CatesController::getCates();\n\t\t//读取商品信息\n\t\t$products=ProductController::getProducts();\n\t\treturn view('admin.usergroup.add',['cates'=>$cates,'products'=>$products]);\n }", "title": "" }, { "docid": "3d607f4d440edeb1f62e091c1e5cae82", "score": "0.7299991", "text": "public function create()\n {\n return view('subs_groups.create');\n }", "title": "" }, { "docid": "6d1b488691aaaaab404e976ba04a3f0c", "score": "0.72965294", "text": "public function create_group()\n\t{\n\t\t$supervisor_id = $this->input->post('supervisor_id'); \n\t\t$title = $this->input->post('title');\n\t\t$detail = $this->input->post('detail');\n\n\t\tif($this->CustomModel->insertOngoingProject($_SESSION['u_id'], $supervisor_id, $title, $detail)) {\n\n\t\t\tif($this->CustomModel->insertOngoingProjectMembers($_SESSION['user_ids'])) {\n\n\t\t\t\t// empty user_id array to make room for next one\n\t\t\t\t$_SESSION['user_id'] = array();\n\t\t\t\techo 'success';\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "514d4d23eef4151e5ad5767d5df67ae3", "score": "0.72782403", "text": "public function create()\n {\n $grouplist = config('crm.group');\n return view('admin.crm.user.create', ['grouplist' => $grouplist]);\n }", "title": "" }, { "docid": "c637242cad49d3db42d914b783e42f49", "score": "0.72561365", "text": "public function create()\n {\n $rules=DB::table(\"admin_group_access\")->get();\n return view(\"admin.group.create\",compact(\"rules\"));\n }", "title": "" }, { "docid": "cb6789627bbf44c2bd32af7aed5a0b9f", "score": "0.7244781", "text": "public function getCreate()\n {\n return View::make('admin.usergroups.create');\n }", "title": "" }, { "docid": "b8408f7e83c82d498ee34b0b54b1563c", "score": "0.7244015", "text": "public function create()\n {\n //\n $menus = Modules::where('is_active',1)->orderBy('order')->get();\n return view('groups/create',compact('menus'));\n }", "title": "" }, { "docid": "2b504ba24e696845bf6a58306ab927f4", "score": "0.72406167", "text": "public function create()\n {\n\n $student = Student::all();\n return view('teacher.groups.create')->with('student', $student);\n }", "title": "" }, { "docid": "1819ed042d31e145c4e9ff426f55bf9d", "score": "0.7216521", "text": "public function createAction()\r\n {\r\n $entity = new ProjectGroup();\r\n $request = $this->getRequest();\r\n $form = $this->createForm(new ProjectGroupType(), $entity);\r\n $form->bindRequest($request);\r\n\r\n if ($form->isValid()) {\r\n $em = $this->getDoctrine()->getEntityManager();\r\n $em->persist($entity);\r\n $em->flush();\r\n\r\n return $this->redirect($this->generateUrl('projectgroup_show', array('id' => $entity->getId())));\r\n \r\n }\r\n\r\n return $this->render('ArmdProjectBundle:ProjectGroup:new.html.twig', array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView()\r\n ));\r\n }", "title": "" }, { "docid": "5eb58afd955aa7487501d7bff27b47e1", "score": "0.7190503", "text": "public function addNewGroup()\n {\n $h_id = $this->input->post('hid');\n $group_name = $this->input->post(\"txtGroupName\");\n $attr = array(\n \"ORG_ID\" => $h_id,\n \"USERGRP_NAME\" => $group_name,\n \"ACTIVE_STATUS\" => isset($_POST['ACTIVE_STATUS']) ? 1 : 0,\n \"CRE_BY\" => $this->user_session[\"FLD_USER_ID\"],\n );\n $rs = $this->utilities->insertData($attr, \"sa_user_group\");\n if ($rs == TRUE) {\n $this->session->set_flashdata('success',$this->lang->line('group').' '.$this->lang->line('cre_success'));\n redirect(\"AccessControl/allGroup\");\n } else {\n $this->session->set_flashdata('Error', 'User Group Create Failled.');\n redirect(\"AccessControl/allGroup\");\n }\n }", "title": "" }, { "docid": "a1ca1f2488451c7066d346b215bc4855", "score": "0.7189515", "text": "function procMemberAdminInsertGroup()\n\t{\n\t\t$args = Context::gets('title','description','is_default','image_mark');\n\t\t$output = $this->insertGroup($args);\n\t\tif(!$output->toBool()) return $output;\n\n\t\t$this->add('group_srl','');\n\t\t$this->add('page',Context::get('page'));\n\t\t$this->setMessage('success_registed');\n\n\t\t$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminGroupList');\n\t\t$this->setRedirectUrl($returnUrl);\n\t}", "title": "" }, { "docid": "e0b6029a2096c877b5fdbea04eb710dd", "score": "0.7169451", "text": "public function create()\n {\n return view('admin.grupo.create');\n }", "title": "" }, { "docid": "4a34acfa637c413061f0d48386090032", "score": "0.71614605", "text": "public function addgroup()\n {\n $this->form_validation->set_error_delimiters('<div class=\"alert alert-danger\">', '</div>');\n $this->form_validation->set_rules('group_name', 'Group Name', 'trim|required|min_length[4]|max_length[50]|callback_numGroups|xss_clean');\n $this->form_validation->set_rules('group_description', 'Group Description', 'trim|max_length[150]|xss_clean');\n\n if ($this->form_validation->run() == FALSE) {\n $this->_render();\n } else {\n $this->datamod->addGroup($this->session->userdata('id'), set_value('group_name'), set_value('group_description'));\n $this->session->set_flashdata('result', message('You have successfully created the group <strong>' . set_value('group_name') . '</strong>! Your group code is <strong>' . $this->datamod->getGroupCode(set_value('group_name')) . '</strong>.', 1)); //groupcreate\n redirect(base_url('profile'));\n }\n }", "title": "" }, { "docid": "b013060944f311e1264543e66be2c873", "score": "0.7153199", "text": "public function insert_group()\n\t{\n\t\t$name = trim($this->request->getPost('name'));\n\t\t$description = trim($this->request->getPost('description'));\n\t\tif (!($name) || empty($name)) return redirect()->to(base_url('/admin/groups'));\n\n\t\t$init = new admin_model();\n\t\t$query = $init->createGroup([$name, $description]);\n\n\t\tif ($query) {\n\t\t\tsession()->setFlashdata('status', \"<script>Swal.fire({icon: 'success',title: 'Success',text: 'Group added successfully',showConfirmButton: false,timer: 2500})</script>\");\n\t\t} else {\n\t\t\tsession()->setFlashdata('status', \"<script>Swal.fire({icon: 'info',title: 'Oops',text: 'Something went wrong',showConfirmButton: false,timer: 2500})</script>\");\n\t\t}\n\t\treturn redirect()->to(base_url('/admin/groups'));\n\t}", "title": "" }, { "docid": "8af736ddbfebf27bdf0893b3ef6890b4", "score": "0.71339947", "text": "public function create()\n {\n $specialties = CollegeSpecialty::all();\n $departments = CollegeDepartment::all();\n return view('admin.college.groups.create', compact('specialties', 'departments'));\n }", "title": "" }, { "docid": "c8b9147c0e78216da3d5ffb0968b244f", "score": "0.7116945", "text": "public function create()\n {\n $modules = Module::all()->sortBy('module_order');\n $submodules = Submodule::all()->sortBy('order_number');\n $modulegroups = Modulegroup::all();\n $accessmodule = Accessmodule::all();\n return view('admin.settings.add-module-group',compact('modules','submodules','modulegroups','accessmodule'));\n }", "title": "" }, { "docid": "4577915e31cbc61711c4cc0a4ac95c98", "score": "0.71089214", "text": "public function groupModal()\n {\n $hid = $data[\"hid\"] = $this->input->post('hid');\n $data['group_list'] = $this->accessControl_model->findUserGroupList($hid);\n echo $this->load->view(\"accessControl/create_group\", $data, true);\n }", "title": "" }, { "docid": "11ea6611f80c0150ac8b0a5314413653", "score": "0.71018547", "text": "public function add_group()\n\t{\n\t\tcek_session_admin();\n\t\t$this->load->library('form_validation');\n\t\t$this->form_validation->set_error_delimiters('<div class=\"alert alert-error\"><a class=\"close\" data-dismiss=\"alert\" href=\"#\">×</a>', '</div>');\n\t\t$this->form_validation->set_rules('name', 'Name', 'required|trim');\n\n\t\tif ($this->form_validation->run() === FALSE) {\n\t\t\t$data['title'] = 'Add slide group';\n\t\t\t//$this->load->view('slide/group/add', $data);\n\t\t\t// $this->template->load('administrator/template', 'group/add', $data);\n\t\t\t$this->template->content->view('group/add', $data);\n\t\t\t$this->template->publish();\n\t\t} else {\n\t\t\t$this->slide_list->add_group($this->input->post());\n\n\t\t\tredirect('slide');\n\t\t}\n\t}", "title": "" }, { "docid": "ba46d5e8902b85a589fb099b0cc5dc32", "score": "0.709347", "text": "public function newAction(Request $request)\n {\n \t$groupManager = $this->get('fos_user.group_manager');\n $group = $groupManager->createGroup('');\n\n $form = $this->createForm('blog_user_group', $group);\n\n $form->handleRequest($request);\n\n \tif ($form->isValid()) {\n\t\t $em = $this->getDoctrine()->getManager();\n\t\t $group->setSlug(strtolower(str_replace(\" \", \"-\", $form->get('name')->getData())));\n\t\t $em->persist($group);\n\t\t $em->flush();\n\n\t\t return $this->redirectToRoute('listGroupPage');\n\t\t}\n\n return $this->render('BlogUserBundle:Group:new.html.twig', array(\n 'form' => $form->createview(),\n ));\n }", "title": "" }, { "docid": "c7e0ef4a251e7353342bd6515ab20cfa", "score": "0.70922047", "text": "function saveGroup() {\n\t\t$adminGroup = new adminGroup;\n\t\t$adminGroup->set('name', getPost('name'));\n\t\tif ($adminGroup->save()) {\n\t\t\taddSuccess('Group saved successfully');\n\t\t\t$access = getPost('access');\n\t\t\t$adminGroup->setAccess($access);\n\t\t\tif (haveErrors() || getRequest('submit') == 'Add and Edit') {\n\t\t\t\teditGroup($adminGroup->get('adminGroupID'));\n\t\t\t} else {\n\t\t\t\taddGroup();\n\t\t\t}\n\t\t\texit;\n\t\t} else {\n\t\t\taddError('An error occurred while saving the group');\n\t\t\t$adminGroup->updateSystemMessages();\n\t\t}\n\t\t$template = new template;\n\t\t$template->assignClean('_TITLE', systemSettings::get('SITENAME').' Admin Groups');\n\t\t$template->assignClean('adminGroup', $adminGroup->fetchArray());\n\t\t$template->assignClean('accessSections', adminUser::$accessSections);\n\t\t$template->assignClean('groupAccess', $adminGroup->getAccess());\n\t\t$template->assignClean('propertyMenuItem', getRequest('propertyMenuItem'));\n\t\t$template->assignClean('mode', 'add');\n\t\t$template->assignClean('admin', adminCore::getAdminUser());\n\t\t$template->setSystemDataGateway();\n\t\t$template->getSystemMessages();\n\t\t$template->display('admin/adminGroupEdit.htm');\n\t}", "title": "" }, { "docid": "302ad844906b76cf14625f05fc80de08", "score": "0.708892", "text": "static function showAddGroupUsersForm() {\n echo __(\"Group\").\" : <br>\";\n\n $condition = ['is_task' => 1];\n // filter groups\n if (!Session::haveRight('planning', self::READALL)) {\n $condition['id'] = $_SESSION['glpigroups'];\n }\n\n Group::dropdown([\n 'entity' => $_SESSION['glpiactive_entity'],\n 'entity_sons' => $_SESSION['glpiactive_entity_recursive'],\n 'condition' => $condition\n ]);\n echo \"<br /><br />\";\n echo Html::hidden('action', ['value' => 'send_add_group_users_form']);\n echo Html::submit(_sx('button', 'Add'));\n }", "title": "" }, { "docid": "4bdda1aef24bf0308a20746f7208bb4f", "score": "0.7083268", "text": "public function create()\n {\n\n //get custom fields\n return view('beneficiary.group.create', compact(''));\n }", "title": "" }, { "docid": "da2270cf6c471811641819808647d3a1", "score": "0.70792127", "text": "public function create()\n {\n $courses=Course::all();\n $users=User::all();\n return view('addGroup', [\n 'courses'=>$courses,\n 'users'=>$users\n ]);\n }", "title": "" }, { "docid": "4d8160e4fcce82a0d6bb2b702830ea8c", "score": "0.7073298", "text": "public function create()\n\t{\n\t\treturn \\View::make('materialadmin::user.create')->with('permission_groups', PermissionGroup::getSelectOptions());\n\t}", "title": "" }, { "docid": "1db28847f13736428979daf60e34e7c2", "score": "0.70669854", "text": "function addNew()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n else\n {\n \n $data = array();\n $this->global['pageTitle'] = ': Add New groups';\n $data['languages'] = $this->groups_model->Listing_foreign('languages');\n $data['users'] = $this->groups_model->Listing_foreign_users('users');\n $this->loadViews(\"admin/groups/add\", $this->global, $data, NULL);\n }\n }", "title": "" }, { "docid": "3f7706c7a3e63357f1ae515550bb6365", "score": "0.702398", "text": "public function create()\n {\n //Valida se usuário possui permissão para acessar esta opção\n if(App\\Models\\User::getPermission('blocked_groups_add',Auth::user()->user_type_code)){\n\n return view('products.blocked_groups.create');\n\n }else{\n //Sem permissão\n Flash::error(Lang::get('validation.permission'));\n return redirect(route('blocked_groups.index'));\n }\n }", "title": "" }, { "docid": "1d44c83111cac5adabf888d2b3847c62", "score": "0.70199275", "text": "public function create()\n {\n $pageConfigs = [\n 'mainLayoutType' => 'vertical',\n 'pageName' => 'Nuevo Grupo'\n ];\n \n $clientes = Client::doesntHave('grupo')->where('status', '<>', 'Archivado')->get();\n\n return view('/grupos/create', compact('pageConfigs', 'clientes'));\n }", "title": "" }, { "docid": "d88bc04207bd6976ffd0c8612a30893a", "score": "0.70179105", "text": "public function createGroup(Request $request){\n $groupName = $request->groupName;\n $newGroup = new Group();\n $newGroup->group_name = $groupName;\n $newGroup->admin_id = Auth::id();\n $newGroup->save();\n return Redirect::back();\n// return \"Group created successfully\"; //TODO replace by returning error message to view\n }", "title": "" }, { "docid": "1dc8210a4a7ddba45737781129f15d7b", "score": "0.70083046", "text": "public function create()\n {\n return view('pages.admin.service-group.create');\n }", "title": "" }, { "docid": "5cda24a78b1d3980e9acd81f073889a0", "score": "0.69903713", "text": "public function actionCreate()\n {\n $model = new QueGroups();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => (string)$model->_id]);\n \n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "3dfa090d81a2d5379776d00d9e126a75", "score": "0.6984531", "text": "public function create()\n {\n return view('frontend.leave_group.create');\n }", "title": "" }, { "docid": "99021e5eff7ea8949cf9545eaf78fc09", "score": "0.6974803", "text": "function api_create_group($instructions) \r\n \t{\r\n \t\t\r\n \t\t$group_order = $this->EE->db->count_all('template_groups') + 1;\r\n \t\t\r\n\t\t$data = array(\t'site_id'\t\t\t=> $this->DEFAULT_SITE_ID,\r\n\t\t\t\t\t\t'group_name'\t\t=> $instructions->group_name,\r\n\t\t\t\t\t\t'group_order'\t\t=> $group_order,\r\n\t\t\t\t\t\t'is_site_default' \t=> 'n');\r\n\t\t\t\t\t\t\r\n\t\t$this->EE->db->insert('template_groups',$data);\t\t\t\t\t\t\r\n\t\t\r\n\t\t$this->data[\"group_id\"] = $this->EE->db->insert_id();\r\n\t\t$this->data[\"success\"] = True;\t\t\t\t\t\t\t\t\t\t\t\r\n \t}", "title": "" }, { "docid": "b92f29fee419d9ea9a24a7696b006bed", "score": "0.6971579", "text": "public function create()\n {\n $data['permissions']=Permission::all();\n $data['userPermissions']=array();\n $data['listbtn']=Permission::hasPermission('groups.index');\n return view('groups.form',$data);\n }", "title": "" }, { "docid": "2dff5f806dccfe550415d32702774be0", "score": "0.6966914", "text": "public function buat_group(){\n\t\t//$this->data['title'] = $this->lang->line('create_group_title');\n\n\t\tif (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin()){\n\t\t\tredirect('/', 'refresh');\n\t\t}\n\n\t\t// validate form input\n\t\t$this->form_validation->set_rules('group_name', 'Nama Grup', 'required|alpha_dash');\n\n\t\tif ($this->form_validation->run() == TRUE){\n\t\t\t$new_group_id = $this->ion_auth->create_group($this->input->post('group_name'), $this->input->post('description'));\n\t\t\tif($new_group_id){\n\t\t\t\t// check to see if we are creating the group\n\t\t\t\t// redirect them back to the admin page\n\t\t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n\t\t\t\tredirect(\"crud\", 'refresh');\n\t\t\t}\n\t\t}else{\n\t\t\t// display the create group form\n\t\t\t// set the flash data error message if there is one\n\t\t\t$this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n\t\t\t$data['group_name'] = array(\n\t\t\t\t'name' => 'group_name',\n\t\t\t\t'id' => 'group_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('group_name'),\n\t\t\t);\n\t\t\t$data['description'] = array(\n\t\t\t\t'name' => 'description',\n\t\t\t\t'id' => 'description',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('description'),\n\t\t\t);\n\n\t\t\t$this->load->view('buat_group', $data);\n\t\t}\n\t}", "title": "" }, { "docid": "3ff9e1245f31b40876bb58b9521f0335", "score": "0.69623035", "text": "public function getCreate()\n {\n return view('core.grupos.create');\n }", "title": "" }, { "docid": "235db36b10bc451eebb9b3779eedc1b1", "score": "0.695979", "text": "public function create(Request $request)\n {\n return view('Groups.groupCreate');\n }", "title": "" }, { "docid": "858d93309b95aa8b8a7e3c27a4582139", "score": "0.69554484", "text": "public function add()\n {\n $group = new Group($this->mysql());\n if ($group->add()) {\n $this->successMessage('Группа добавлена');\n } else {\n $this->setErrorComment($group->error());\n switch ($group->error()) {\n case Group::GROUP_EXIST:\n $this->failMessage('Группа с таким имененм уже имеется');\n break;\n default:\n $this->failMessage('Не удалось добавить группу');\n }\n\n }\n $this->setRedirect($this->request->makeUrl('sys/group'));\n }", "title": "" }, { "docid": "7eb0e582158f1e0620e5f30549c4ad81", "score": "0.69401723", "text": "public function create(Request $request) {\n //查询所有的分组\n $groups = DB::table(\"admin_auth_group\")->get();\n return view(\"admin.user.create\",compact(\"groups\"));\n }", "title": "" }, { "docid": "efe282c586fcb0be0f7c8fe16dcff2b9", "score": "0.69332063", "text": "public function new_grup(){\n\t\t$this->load->model('m_pengguna','ma');\n\t\t$this->ma->get_privilege();\n\t\t$this->load->view('pengguna/gruppengguna/new_grup',$this->data);\t\n\t}", "title": "" }, { "docid": "b349db8b2a1ffee5481c5b37d61bf22f", "score": "0.6921616", "text": "static function showAddGroupForm() {\n\n $condition = ['is_task' => 1];\n // filter groups\n if (!Session::haveRight('planning', self::READALL)) {\n $condition['id'] = $_SESSION['glpigroups'];\n }\n\n echo __(\"Group\").\" : <br>\";\n Group::dropdown([\n 'entity' => $_SESSION['glpiactive_entity'],\n 'entity_sons' => $_SESSION['glpiactive_entity_recursive'],\n 'condition' => $condition\n ]);\n echo \"<br /><br />\";\n echo Html::hidden('action', ['value' => 'send_add_group_form']);\n echo Html::submit(_sx('button', 'Add'));\n }", "title": "" }, { "docid": "e748a8e271efef2b38296775381ca85d", "score": "0.692015", "text": "public function create()\n\t{\n\t\t//\n\t\t$modules = Module::where('id', '<>', 1)->get();\n\t\t$this->layout->content = View::make('secure.users.create')->with('modules', $modules);\n\t\t\n\t}", "title": "" }, { "docid": "dcdcf415a063bed6d38870c561c7de05", "score": "0.69087213", "text": "public function create()\n {\n $groups=$this->groupRepository->all();\n return view('backend.exams.create', compact('groups'));\n }", "title": "" }, { "docid": "8548c555468c088a8fcd5bdb5ae24a6d", "score": "0.6895071", "text": "public function createGroupPage($page_owner, $group_id, $requestParams);", "title": "" }, { "docid": "503a5d88938ab158bb9d7f6c58168590", "score": "0.6889476", "text": "public function create()\n {\n\t\t$auth = Authgroup::all();\n\t\treturn view('admin.add',['auth'=>$auth->toArray()]);\n }", "title": "" }, { "docid": "e58036cde18a5942f4b263f23b563651", "score": "0.6875647", "text": "public function create()\n {\n $makers = Maker::get();\n return view('admin.pages.category_group.create', compact('makers'));\n }", "title": "" }, { "docid": "1188d984aeaaa041179fe975da5d9bbd", "score": "0.6861219", "text": "public function create()\n {\n $group_list = StudyGroup::all();\n $district_list = District::districtDropdown();\n $member_list = Member::memberDropdown(true);\n return view('study_group.create',compact('group_list','district_list','member_list'));\n }", "title": "" }, { "docid": "dcd4024183d0ea58f3a399a7e6cf3c44", "score": "0.6860268", "text": "public function create()\n\t{\n\t\tif( \\Sentry::getUser()->inGroup( \\Sentry::findGroupByName('root') ) \n\t\t\t|| \\Sentry::getUser()->inGroup( \\Sentry::findGroupByName('human_resources') ) ){\n\t\t\t\treturn view(\"Users::create\", ['request' => $this->request, 'ru' => $this->ru]);\t\n\t\t}\n\t}", "title": "" }, { "docid": "4846fdd3dae6564dca4ff15d6d0f17f2", "score": "0.6852104", "text": "public function getAdd()\n\t\t{\n\t\t\t$group_details = array('group_name'=>'');\n\t\t\t//Set meta details\n\t\t\t$this->header->setMetaTitle(trans('meta.create_group_title'));\n\t\t\treturn View::make('admin.addGroup', compact('group_details'));\n\t\t}", "title": "" }, { "docid": "184303719e4593a0290cdd6f10d8a0ce", "score": "0.6848987", "text": "public function create(Group $group)\n {\n $users = $this->userRepository->all();\n\n return view('admin.group.members.create', ['group' => $group, 'users' => $users]);\n }", "title": "" }, { "docid": "5e33254ea23bcd9dc2f5a62baed5fbf0", "score": "0.68471676", "text": "public function createUser(Request $request): View\n {\n $dm = $this->get('doctrine_mongodb.odm.default_document_manager');\n\n $group = new Group();\n $group->setName($request->request->get('name', ''));\n\n $dm->persist($group);\n $dm->flush();\n\n return View::create($group, Response::HTTP_CREATED);\n }", "title": "" }, { "docid": "2e14af510d9b5c2ed698332a7d8b696e", "score": "0.6843657", "text": "function add_group() {\n if (!$this->ion_auth->logged_in()) {\n redirect();\n } else {\n $data['quiz_id'] = $this->input->post('id_choice', true);\n $data['title'] = $this->input->post('title', true);\n $data['description'] = $this->input->post('description', true);\n $data['status'] = 1;\n $data['deleted'] = 0;\n $today = getdate();\n $temp_time = date_create($today['year'] . '-' . $today['mon'] . '-' . $today['mday']);\n $data['date_create'] = date_format($temp_time, 'Y-m-d');\n\n $this->model_quiz->insert_group($data);\n }\n }", "title": "" }, { "docid": "e608beefd97bb9eff1fefb37ee890d26", "score": "0.68436223", "text": "public function newAction()\r\n {\r\n $entity = new ProjectGroup();\r\n $form = $this->createForm(new ProjectGroupType(), $entity);\r\n\r\n return $this->render('ArmdProjectBundle:ProjectGroup:new.html.twig', array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView()\r\n ));\r\n }", "title": "" }, { "docid": "8b016844d1f814f3319adf850894dca5", "score": "0.68342805", "text": "public function testCreateAGroup()\n {\n $this->actingAs($this->user)\n ->json('POST', '/api/group', $this->newGroup())\n ->seeJsonContains($this->newGroup());\n }", "title": "" }, { "docid": "196c950628fe3151f11e08d51730b0ff", "score": "0.6824695", "text": "public function create()\n {\n\n //$groups = Group::all();\n\n $groups = Group::pluck('name', 'group_id');\n $areaPrograms = AreaProgram::pluck('name', 'area_program_id')->all();\n\n //return view('groups.create', ['groups' => $dbGroups]);\n return view('groups.create', compact('groups', 'areaPrograms'));\n }", "title": "" }, { "docid": "0515c2f853bc98bc499fff39c8e80a38", "score": "0.68236274", "text": "public function actionCreate()\n {\n $model = new NotificationGroup;\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 }", "title": "" }, { "docid": "a3b9297228cd016d4aa4119741909ad6", "score": "0.6820715", "text": "public function create(): View\n {\n $userOptions = User::orderBy('name')->pluck('name', 'id');\n\n return view('groups.create')->with(compact(['userOptions']));\n }", "title": "" }, { "docid": "7048d629301a7f3fa2db29ed2c6ceb9f", "score": "0.6820189", "text": "public function create()\n {\n return view(\"pages.domaingroup.domaingroup-add\");\n }", "title": "" }, { "docid": "357966492e9f8bf518056014f398a532", "score": "0.6810368", "text": "public function actionCreate()\n {\n $model = new Group;\n $searchModel = new GroupSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n if ($model->load(Yii::$app->request->post())) {\n $model->id_game = Game::find()\n ->select('id')\n ->where(['ilike', 'name', $model->game_name])\n ->scalar();\n if ($model->save()) {\n $model->refresh();\n $admin = new Member;\n $admin->id_group = $model->id;\n $admin->id_user = Yii::$app->user->id;\n $admin->accepted = true;\n $admin->admin = true;\n $admin->save();\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('index', [\n 'model' => $model,\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }\n } else {\n return $this->render('index', [\n 'model' => $model,\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }\n }", "title": "" }, { "docid": "211da84e88d8b39e2722e44c7e3b04cf", "score": "0.68052953", "text": "public function create()\n {\n $selectCategories = $this->productCategoryRepository->getAllForSelect();\n\n return view('admin.catalog.groups.create', compact('selectCategories'));\n }", "title": "" }, { "docid": "87ef4ae29d7ea6a7e52f1cf315c38d4b", "score": "0.6796483", "text": "public function create()\n {\n $user = Auth()->User();\n $campaigns['data'] = Campaign::orderby('name', 'asc')->select('id', 'name')->get();\n return view(\n 'panel.groups.create',\n [\n 'user' => $user,\n 'campaigns' => $campaigns\n ]\n );\n }", "title": "" }, { "docid": "8703aa0ac3cb24e592b16e73291e5c18", "score": "0.6789911", "text": "public function create()\n {\n $projectgroup = new Projectgroup();\n $projects = Project::withSprints()->get();\n\n return view('projectgroup.create', ['projectgroup' => $projectgroup, 'projects' => $projects]);\n }", "title": "" }, { "docid": "3d2398b30d92f6b6abee9b2125828e80", "score": "0.67805326", "text": "public function newUserForm(){\n if(Session::has('user')){\n $group_options = DB::table('groups')->orderBy('group_name', 'asc')->lists('group_name', 'group_id');\n return View::make('new_user', array('group_options' => $group_options));\n }else{\n return Redirect::to('/');\n }\n }", "title": "" }, { "docid": "e281aa36cae35a13f414add76769970f", "score": "0.67793757", "text": "private function _addNewGroupMarkup()\n\t\t{\n\n\t\t\tglobal $current_screen;\n\n\t\t\tif( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'add-user-group' ){\n\t\t\t\tdo_action( 'studiorum_user_groups_add_new_group_submitted' );\n\t\t\t}\n\n\t\t\tif( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'edit-user-group' ){\n\t\t\t\tdo_action( 'studiorum_user_groups_edit_group_submitted' );\n\t\t\t}\n\n\t\t\tif( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'edited-user-group' ){\n\t\t\t\tdo_action( 'studiorum_user_groups_edited_group_submitted' );\n\t\t\t}\n\n\t\t\t// Preload some values, but if we're editing, we grab them\n\t\t\t$titleValue = '';\n\t\t\t$userGroupValue = '';\n\t\t\t$editingGroup = '';\n\t\t\t$disabled = '';\n\n\t\t\t$submitButtonText = __( 'Add User Group', 'studiorum-user-groups' );\n\n\t\t\t$formAction = 'add-user-group';\n\n\t\t\tif( $this->editingGroup )\n\t\t\t{\n\n\t\t\t\t// Which group are we editing\n\t\t\t\t$editingGroup = isset( $_REQUEST['user-group'] ) ? sanitize_title_with_dashes( $_REQUEST['user-group'] ) : false;\n\n\t\t\t\t$titleValue \t= $this->processEditData( $editingGroup, 'group-title' );\n\t\t\t\t$userGroupValue = $this->processEditData( $editingGroup, 'group-users' );\n\n\t\t\t\t$formAction = 'edited-user-group';\n\n\t\t\t\t$disabled = 'disabled=\"disabled\"';\n\n\t\t\t\t$submitButtonText = __( 'Edit User Group', 'studiorum-user-groups' );\n\n\n\n\t\t\t}\n\n\t\t\t?>\n\n\t\t\t<div class=\"form-wrap\">\n\n\t\t\t\t<h3><?php __( 'Add New Group', 'studiorum-user-groups' ); ?></h3>\n\n\t\t\t\t<?php do_action( 'studiorum_user_groups_add_new_group_before_form' ); ?>\n\n\t\t\t\t<form id=\"add-user-group\" method=\"post\" action=\"\" class=\"validate\">\n\n\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"<?php echo $formAction; ?>\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"screen\" value=\"<?php echo esc_attr( $current_screen->id ); ?>\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"editGroupID\" value=\"<?php echo esc_attr( $editingGroup ); ?>\" />\n\n\t\t\t\t\t<?php wp_nonce_field( 'add-user-group', '_wpnonce_add-user-group' ); ?>\n\n\t\t\t\t\t<?php do_action( 'studiorum_user_groups_add_new_group_form_start' ); ?>\n\n\t\t\t\t\t<div class=\"form-field form-required\">\n\t\t\t\t\t\t<label for=\"group-title\"><?php _ex( 'Title', 'User Group Title' ); ?></label>\n\t\t\t\t\t\t<input name=\"group-title\" id=\"group-title\" type=\"text\" value=\"<?php echo $titleValue; ?>\" size=\"40\" aria-required=\"true\" <?php echo $disabled; ?> />\n\t\t\t\t\t\t<p><?php _e( 'A recognizable title. This is non-editable after creation.', 'studiorum-user-groups' ); ?></p>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"form-field form-required\">\n\t\t\t\t\t\t<label for=\"group-users\"><?php _ex( 'Users', 'Users List Title' ); ?></label>\n\t\t\t\t\t\t<input name=\"group-users\" id=\"group-users\" type=\"text\" value=\"<?php if( $userGroupValue != '' ){ echo implode( ',', $userGroupValue ); } ?>\" size=\"40\" aria-required=\"true\" />\n\t\t\t\t\t\t<p><?php _e( 'Select the users you want in this group.', 'studiorum-user-groups' ); ?></p>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<?php do_action( 'studiorum_user_groups_add_new_group_form_end' ); ?>\n\n\t\t\t\t\t<?php submit_button( $submitButtonText ); ?>\n\n\t\t\t\t\t<?php do_action( 'studiorum_user_groups_add_new_group_form_after_submit' ); ?>\n\n\t\t\t\t</form>\n\n\t\t\t</div>\n\n\t\t\t<?php do_action( 'studiorum_user_groups_add_new_group_after_form' ); ?>\n\n\t\t\t<?php\n\n\t\t}", "title": "" }, { "docid": "092673c3c778ec0b1ae812a6728ecf90", "score": "0.67714685", "text": "public function create()\n {\n return view('miembro.create', compact('grupo'));\n }", "title": "" }, { "docid": "c9df414a526d173468938173b752c204", "score": "0.67568034", "text": "function addMeetupGroup()\n {\n if (!$_SESSION[\"validUser\"] || $_SERVER['REQUEST_METHOD'] != 'POST'){\n return;\n }\n\n $groupName = $_POST['new-group'];\n\n //Create a URL\n $meetupLink = str_replace('placeholder', $groupName, self::MEETUP_API_URL);\n\n //If the entry does not already exist, add to db\n if (!$this->_htmlContentDb->apiSourceNameDoesExist(self::MEETUP_DOMAIN, $groupName)\n && (new Validator($this->_f3))->isValidUrl($meetupLink)) {\n\n // Error if not successful insert\n if (!$this->_htmlContentDb->addApiSourceName(self::MEETUP_DOMAIN,$groupName)) {\n echo \"Error: $groupName could not be saved\";\n }\n } else {\n echo \"Error: The following group name is either invalid or already is added: $groupName\";\n }\n }", "title": "" }, { "docid": "426c8a1951667f2f6fc005757c94c931", "score": "0.6749691", "text": "public function create()\n {\n return view('itemgroup.create');\n }", "title": "" }, { "docid": "dcba2ae243d537dd88c81613086a8bbd", "score": "0.67487437", "text": "public function create()\n {\n $this->authorize('create', Student::class);\n $teacher = Teacher::where('user_id', Auth::id())->first();\n $groups = \\App\\Models\\Group::where('teacher_id',$teacher->id)->get(); \n return view('students.create', compact('groups'));\n }", "title": "" }, { "docid": "11e6d929a57cec3a647cecf390ce5f5b", "score": "0.6741657", "text": "public function create(Group $groupid)\n {\n //\n //echo $groupid;\n \n return view('peoples.create',compact('groupid'));\n\n }", "title": "" } ]
baa7b18bed09e0b336ea8c9ac7c53cc0
/ All element that doesn't need to be wrapped in HTML prints the options page title
[ { "docid": "ec85e448b9a91eae434e61b642baa4eb", "score": "0.0", "text": "function section ($item) {\r\n echo '<h3><i class=\"fa ' . $item['icon'] . '\"></i> ' . $item['name'] . '</h3>';\r\n if (isset($item['desc'])) echo '<p>' . $item['desc'] . '</p>';\r\n \r\n }", "title": "" } ]
[ { "docid": "c1fa3779e38157fe70b96e08884feda7", "score": "0.68302786", "text": "function renderGeneralSettingsOptionHeader() {\n\t\techo __( 'General plugin settings', 'stampd' );\n\t}", "title": "" }, { "docid": "411658437fd41e0fac87a4bd61d5b68e", "score": "0.6739583", "text": "public function toString()\n {\n return 'Option title is correct on product view page.';\n }", "title": "" }, { "docid": "7e4a2d30498a6de067c73e86ad91d531", "score": "0.6662808", "text": "function get_add_html() {\r\n\r\n\t\t$this->html .= $this->show_title;\r\n\t}", "title": "" }, { "docid": "72d028d9322dc4e57c6377b3938edf4c", "score": "0.6603117", "text": "public function outputOptionsPage()\n {\n ?>\n <div class=\"wrap\">\n <h2><?= $this->pageArguments['page_title']; ?></h2>\n <h2 class=\"nav-tab-wrapper\">\n <?php $this->tabLinks($_GET[\"tab\"] ?? NULL); ?>\n </h2>\n <form method=\"post\" action=\"options.php\">\n <?php\n if (!isset($_GET['tab'])) {\n reset($this->tabs);\n $firstTabKey = key($this->tabs);\n $firstTab = $this->tabs[$firstTabKey];\n settings_fields( $firstTab ); // Must be the option group defined with `register_setting()`\n do_settings_sections( $this->pageArguments['unique_page_slug'] );\n } else {\n foreach ($this->tabs as $tab) {\n if ( $_GET['tab'] == $tab ) {\n settings_fields( $tab ); // Must be the option group defined with `register_setting()`\n do_settings_sections( $this->pageArguments['unique_page_slug'] );\n }\n }\n }\n submit_button();\n ?>\n </form>\n </div> <?php\n }", "title": "" }, { "docid": "676e2942e100d2dcf189b4ae8bdf6710", "score": "0.6581034", "text": "function acf_html_header_options(){\n\t\t\tob_start();\n\t\t\t?>\n\t\t\t<div class=\"header-options\">\n\t\t\t\t<div class=\"logo\"></div>\n\n\t\t\t\t<div class=\"path\"><?php echo esc_html__( 'Theme options', 'xkit' ); ?></div>\n\n\t\t\t\t<div class=\"save-submit\"><button><?php echo esc_html__( 'Save Settings', 'xkit' ); ?></button></div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\treturn ob_get_clean();\n\t\t}", "title": "" }, { "docid": "161c4e3e1f67480e705507758006565f", "score": "0.65649503", "text": "public function display() {\r\n\t\tif ( ! empty( $this->settings['name'] ) ) {\r\n\r\n\t\t\t$this->echoOptionHeader();\r\n\t\t\techo $this->settings['custom'];\r\n\t\t\t$this->echoOptionFooter( false );\r\n\r\n\t\t} else {\r\n\r\n\t\t\t$this->echoOptionHeaderBare();\r\n\t\t\techo $this->settings['custom'];\r\n\t\t\t$this->echoOptionFooterBare( false );\r\n\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6f73d3ee6376b40246845628904e2878", "score": "0.6559101", "text": "function getOptionDescription()\n {\n return $this->translate(\"Byte Generic HTML Banner\");\n }", "title": "" }, { "docid": "232c3514bb8ab8c6908e220b5f4baaa6", "score": "0.65355724", "text": "public function optionsPage() {\n\t\t$title = CS()->common()->properTitle();\n\t\tadd_options_page( $title, $title, 'manage_options', 'cornerstone', array( $this, 'renderOptionsPage' ) );\n\t}", "title": "" }, { "docid": "d4c61fe971842dac08c0063259644d80", "score": "0.6451165", "text": "public function pageoptionshtml()\n {\n\n // Disabled, because it often does not work for hidden elements, and even if so, the shadow does not appear or on the wrong place :s\n //Wi3::inst()->plugins->load(\"plugin_jquery_dropshadow\"); // Make dropshadows available\n //$ret = \"<script>\\$('#wi3_add_pages > a').next().show(); \\$(function(){\\$('.pagefiller_default_dropzonepreview').dropshadow();}); </script>\";\n\n // Include javascript file that handles some addpageoptions-refresh stuff\n $this->javascript(\"pageoptionshtml.js\");\n\n return $this->pageoptionshtmlfortemplate(NULL, NULL);\n }", "title": "" }, { "docid": "5c2748f97aa25f026d9cf0ec6cfee6ef", "score": "0.64377946", "text": "function admin_head(){\n\t\t\n\t\tdo_action('nhp-opts-admin-head', $this);\n\t\t\n\t\tdo_action('nhp-opts-admin-head-'.$this->args['opt_name'], $this);\n\t\t\n\t}", "title": "" }, { "docid": "3adfb0548b492e720d962e0f68df8816", "score": "0.6418318", "text": "function getTitle($options);", "title": "" }, { "docid": "7b1127fe05b12638edc67a53cd55211d", "score": "0.64066553", "text": "function PrintAdminOptions() {\n\t\tglobal $group_id, $forum_id;\n\t\techo html_e('p', array(), util_make_link('/forum/admin/?group_id='.$group_id.'&add_forum=1', _('Add Forum')).\n\t\t\t' | '.util_make_link('/forum/admin/pending.php?action=view_pending&group_id='.$group_id, _('Manage Pending Messages')).'<br />');\n\t}", "title": "" }, { "docid": "8e7c8a24ae1c84da2233bdaaf17fc608", "score": "0.6398427", "text": "public function getOptionsHtml()\n {\n return $this->getChildHtml('options');\n }", "title": "" }, { "docid": "7f8d3f062497feef679e54c0115c422f", "score": "0.63668144", "text": "public function plugin_general_options_ballback() {\n\n\t\t$html = '<h4>' . __( 'General Options', 'aus-basic' ) . '</h4>';\n\t\t//echo $html;\n\n\t}", "title": "" }, { "docid": "87cb6161b3e89bb674fc4181bf3d9556", "score": "0.63432753", "text": "function xpent_wc_show_page_title() {\n\treturn ;\n}", "title": "" }, { "docid": "aee19187d5ff48d744e5c5a86101cc01", "score": "0.63220143", "text": "function printMenu()\n {\n global $stats;\n print \" <option value=\\\"-\\\" selected>---</option>\\r\\n\";\n foreach($stats as $i => $value)\n {\n print \" <option value=\\\"$i\\\">\" . $value[\"name\"] . \"</option>\\r\\n\";\n }\n }", "title": "" }, { "docid": "c70dd22808fbb35d60fc8970d4f73aaf", "score": "0.6312409", "text": "function show_options_page_subheading()\n\t{\n\t\techo '<p>Voor de optie \"(floating button) Icoon\" kan het icoon in de floating button worden aangepast. De lijst met beschikbare iconen kan worden geraadpleegd op <a href=\"https://fontawesome.com/v4.7.0/cheatsheet/\" target=\"_blank\">Font Awesome 4.7</a></p>';\n\t\techo '<i>Bij problemen met de recensie manager, neem contact op met Remco Kersten</i>';\n\t}", "title": "" }, { "docid": "7ce633d9a36c756cea031acfdaa6a2d8", "score": "0.63112044", "text": "function render_blank_plugin_settings_markup(){\n if(!current_user_can('manage_options')){\n return;\n }\n else {\n ?>\n <?php $options = get_option('blankPlugin_option_2')?>\n <div class=\"wrap\">\n <h1><?php esc_html_e(get_admin_page_title())?></h1>\n <p><?php esc_html_e(\"Blank plugin setup\")?></p>\n <p><strong><?php esc_html_e(get_option('blankPlugin_option', 'No value exists'))?></strong></p>\n <div>\n <?php if(array_key_exists('name', $options)) :?>\n <h2>Name of Plugin: <?php esc_html_e($options['name'])?></h2>\n <?php endif?>\n </div>\n <ul>\n <?php foreach($options as $o) : ?>\n <li><?php echo $o;?></li>\n <?php endforeach; ?> \n </ul>\n <?php include(BLANK_PLUGIN_DIR . 'templates/admin/options-form.php');?>\n </div>\n <?php \n }\n}", "title": "" }, { "docid": "ca1b2a97e037d83b371a3c332733cac5", "score": "0.6294319", "text": "public function options_page_description() {\n\t\t$options = $this->get_options();\n\t\tparent::options_page_description( __( 'Preserve Code Formatting Settings', $this->textdomain ) );\n\t\techo '<p>' . __( 'Preserve formatting for text within &lt;code> and &lt;pre> tags (other tags can be defined as well). Helps to preserve code indentation, multiple spaces, prevents WP\\'s fancification of text (ie. ensures quotes don\\'t become curly, etc).', $this->textdomain ) . '</p>';\n\t\techo '<p>' . __( 'NOTE: Use of the visual text editor will pose problems as it can mangle your intent in terms of &lt;code> tags. I do not offer any support for those who have the visual editor active.', $this->textdomain ) . '</p>';\n\t}", "title": "" }, { "docid": "9413959d932ac6209a44bdd2ba41d519", "score": "0.62813586", "text": "function _title($params) {\n if(isset($params['pv']) && $params['pv'] > 0) {\n return;\n }\n echo '<h2>'.$GLOBALS['Language']->getText('plugin_docman', 'new_fldsel_title').'</h2>';\n }", "title": "" }, { "docid": "9c2545a17deb8ff22434231c1b11564f", "score": "0.62734824", "text": "public function SummaryOfOptions() {\n\t\t$options = $this->Options();\n\t\t$options->sort('AttributeID');\n\t\t\n\t\t$temp = array();\n\t\t$summary = '';\n\t\tif ($options && $options->exists()) foreach ($options as $option) {\n\t\t\t$temp[] = '<strong>' . $option->Attribute()->Title . ':</strong> ' . $option->Title;\n\t\t} \n\t\t$summary = implode('<br /> ', $temp);\n\t\treturn $summary;\n\t}", "title": "" }, { "docid": "50be22f6ef8508187d77ee4ea3272087", "score": "0.6267643", "text": "public function getOptionGroupTitle()\n {\n return '';\n }", "title": "" }, { "docid": "36e19766f69c39e790b1c781e206eafe", "score": "0.62612414", "text": "function osbcs_options_page() {\n add_options_page(\n\t'One Stop Background Color Shop!', \n\t'One Stop Background Color Shop', \n\t'manage_options', \n\t'one-stop-bg-color-shop', \n\t'osbcs_option_page_html'\n );\n}", "title": "" }, { "docid": "8a77b0b4693055396d841abfc00c11f7", "score": "0.6232065", "text": "function Return_Title ($showtitle='') {\r\n\r\n\t\t$arg = strtoupper($showtitle);\r\n\t\t$ret = $this->n.'<ul style = \"width:'.$this->resize_width.'px;\">';\r\n\t\t$sep = ', ';\r\n\t\twhile ($arg <>'') :\r\n\r\n\t\t\tif (strlen($arg)==1) $sep = '';\r\n\t\t\t$option = substr($arg, 0, 1);\r\n\t\t\t$ret .= $this->Return_TitleOption ($option, $sep);\r\n\t\t\t$arg = substr($arg, 1);\r\n\r\n\t endwhile;\r\n\r\n\t\t$ret .= $this->n.'</ul>';\r\n\t\t\r\n\t\treturn $ret;\r\n\r\n\t}", "title": "" }, { "docid": "f5808b7097de393d18ffc7b1cd08d018", "score": "0.6230681", "text": "public function defineOptionsPage() {\n\n add_options_page(\n __( $this->pageArguments['page_title'], 'textdomain' ), // Page Title\n __( $this->pageArguments['menu_title'], 'textdomain' ), // Menu Title\n $this->pageArguments['capability'], // Capability\n $this->pageArguments['unique_page_slug'], // ! Menu slug !\n [$this, 'outputOptionsPage'] // Callback to render form\n );\n\n }", "title": "" }, { "docid": "f73dc43a2e9973541381a2075fd41232", "score": "0.62286335", "text": "static function display_setting__headline($args){\n echo '';\n }", "title": "" }, { "docid": "4d0770ab352f3f7941b81cc41147c84d", "score": "0.6226202", "text": "public function toHTML(){\n\n\t\tforeach($this->options as $op=>$val){\n\t\t\tif( isset($_GET['a']) && $_GET['a'] == $op){\n\t\t\t\t$class = \"menu_item selected\";\n\t\t\t}else{\n\t\t\t\t$class = \"menu_item\";\n\t\t\t}\n \t\t\techo \"<div class='$class'>\\n\";\n\t\t\techo \"<div class='menu_title'>\\n\";\n\t\t\techo \"<a href='?t=Adm&a=$op'>$val</a>\";\n\t\t\techo \"</div>\\n</div>\\n\";\n \t\t}\n\t\techo \"<div class='menu_item'>\\n\";\n\t\techo \"<div class='menu_title'>\\n\";\n\t\techo \"<a href='.'>\".Settings::_(\"adminmenu\",\"back\").\"</a>\";\n\t\techo \"</div>\\n</div>\\n\";\n\n \t}", "title": "" }, { "docid": "8fd07c4ca62b8cbfa1f714f8b1cd26e0", "score": "0.6226176", "text": "function start_el(&$output, $item, $depth, $args){\n\t\t\t\t\t\t $item->title = str_repeat(\"&nbsp;- \", $depth).$item->title;\n\t\n\t\t\t\t\t\t parent::start_el($output, $item, $depth, $args);\n\t\n\t\t\t\t\t\t $href =! empty( $item->url ) ? ' value=\"' . esc_attr( $item->url ) .'\"' : '#';\n\t\n\t\t\t\t\t\t // no point redefining this method too, we just replace the li tag...\n\t\t\t\t\t\t $output = str_replace('<li', '<option '.$href, $output);\n\t\t\t\t\t\t}", "title": "" }, { "docid": "caaf36e6a8965496e3841b61243551e5", "score": "0.6211644", "text": "function qode_title_text() {\n\t\techo qode_get_title_text();\n\t}", "title": "" }, { "docid": "e3c952b8edf7a2d1dc11dff761199cf6", "score": "0.6202777", "text": "function options_page() {\n\t\t?> \n\t\t<div class=\"wrap\">\n\t\t\t<div class=\"icon32\" id=\"icon-options-general\"><br/></div>\n\n\t\t\t<h2><?php _e('Documentation Redux Options', 'docredux-theme') ?></h2>\n\n\t\t\t<form action=\"options.php\" method=\"post\">\n\n\t\t\t\t<?php settings_fields( $this->options_group ); ?>\n\t\t\t\t<?php do_settings_sections( $this->settings_page ); ?>\n\n\t\t\t\t<p class=\"submit\"><input name=\"submit\" type=\"submit\" class=\"button-primary\" value=\"<?php esc_attr_e('Save Changes'); ?>\" /></p>\n\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "c3dacb53a0f57fe7055616101fa0703d", "score": "0.61892605", "text": "protected function _buildTitle()\n\t{\n\t\tif (!$this->_title)\n\t\t{\n\t\t\t$this->_title = Lang::txt(strtoupper($this->_option)) . ': ' . Lang::txt(strtoupper($this->_option . '_' . $this->_controller));\n\t\t}\n\t\tDocument::setTitle($this->_title);\n\t}", "title": "" }, { "docid": "2b7cf2b0800831ffa2ad005bf1655e7b", "score": "0.6188327", "text": "public function html() {\n\n\t\t$this->args['class'] .= ' cmb_text_small';\n\n\t\tparent::html();\n\n\t}", "title": "" }, { "docid": "eb9e1a246103a9d5a14fdc462db8bf21", "score": "0.6186488", "text": "function rew_d_show_all_options() {\n $alloptions = wp_load_alloptions();\n return '<pre>' . print_r($alloptions, true) . '</pre>';\n\n}", "title": "" }, { "docid": "3711fc2011300ac1e6d785989f8d2f40", "score": "0.61853176", "text": "public function getTitle()\n {\n return $this->getOption('title', '');\n }", "title": "" }, { "docid": "ba487f515e25d033e8df8106f579623a", "score": "0.6162914", "text": "function api_display_tool_title($titleElement)\r\n{\r\n\tif (is_string($titleElement))\r\n\t{\r\n\t\t$tit = $titleElement;\r\n\t\tunset ($titleElement);\r\n\t\t$titleElement['mainTitle'] = $tit;\r\n\t}\r\n\techo '<h3>';\r\n\tif (!empty($titleElement['supraTitle']))\r\n\t{\r\n\t\techo '<small>'.$titleElement['supraTitle'].'</small><br>';\r\n\t}\r\n\tif (!empty($titleElement['mainTitle']))\r\n\t{\r\n\t\techo $titleElement['mainTitle'];\r\n\t}\r\n\tif (!empty($titleElement['subTitle']))\r\n\t{\r\n\t\techo '<br><small>'.$titleElement['subTitle'].'</small>';\r\n\t}\r\n\techo '</h3>';\r\n}", "title": "" }, { "docid": "00ca581fe41bc8a9a27a050cc057183b", "score": "0.61534566", "text": "function adminOptionsPage() { ?>\n\t\t\t\t<div id=\"hc_nurseedi\">\n\t\t\t\t<h2>(NurseEDI) - HotChalk, Inc. v<?php echo HC_NURSEEDI_VERSION; ?></h2>\n\t\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t<?php settings_fields('hcNurseEdiOptions'); ?>\n\t\t\t\t<?php do_settings_sections('hc-nurseedi'); ?>\n\t\t\t\t</form></div>\n\t\t\t\t<?php\n\t\t\t}", "title": "" }, { "docid": "30c7cd00521cf442381d3c2cf2c6fb40", "score": "0.6144498", "text": "public function getAddShazamOptions() {\n\t if (empty($this->available_descriptive_fields)) $this->getAvailableDescriptiveFields();\n\n\t $html = '';\n\t foreach ($this->available_descriptive_fields as $field_name => $label) {\n\t // $label = preg_replace('/[\\W+ ]/',\"_\",$label);\n\t // $label = preg_replace('/[\\n\\r]'/, \"<br>\", $label);\n\t $html .= \"<a class='dropdown-item' data-field-name='$field_name' href='#'>[$field_name] \" . $label . \"</a>\";\n }\n $html .= \"<div class='dropdown-divider'></div>\";\n\t\t$html .= \"<div class='dropdown-header shazam-descriptive'>Create a new descriptive field for it to appear here</div>\";\n return $html;\n }", "title": "" }, { "docid": "38b32f44a0dec3325decd552feaa185b", "score": "0.6138684", "text": "public function get_content_option() {\n\t\t\tob_start();\n\t\t\techo '<h3>' . esc_html( sprintf( __( 'Key: %s', 'wpglobus-plus' ), $this->option_key ) ) . '</h3>';\n\t\t\t$opts = get_option( $this->option_key );\n\t\t\tif ( $opts ) {\n\t\t\t\techo '<pre>' . esc_html( print_r( $opts, true ) ) . '</pre>';\n\t\t\t} else {\n\t\t\t\tesc_html_e( 'Not found in the options table.', 'wpglobus-plus' );\n\t\t\t}\n\t\t\t$this->content = ob_get_clean();\n\t\t}", "title": "" }, { "docid": "bd371e53fc1dc9357207dc7cbae45535", "score": "0.6119675", "text": "function london_entrepreneurship_display_options_page() {\n\t\tget_template_part( 'admin/options' );\t\n\t}", "title": "" }, { "docid": "da03a0aef28058e4a86fa1ec7c3dabee", "score": "0.6111825", "text": "function zero_theme_create_subpage_settings(){\n\techo \"<h1>Zero Setting Options </h1>\";\n}", "title": "" }, { "docid": "06b3ae373a3cecdfc9f1788f3ff9dcdc", "score": "0.6096572", "text": "public function renderOptionsPage() {\n\n\t\t$title = CS()->common()->properTitle();\n\t\t$info_items = apply_filters( 'cornerstone_options_info_items', include(CS()->path() . 'includes/admin/info-items.php') );\n\n\t\t/* Let's call this class just for this option page */\n\t\t$this->settings = new Cornerstone_Settings_Handler;\n\n\t\tinclude CS()->path() . 'includes/admin/views/options-page.php';\n\t}", "title": "" }, { "docid": "f6da1e51118885aab8ec0ae49f9668bd", "score": "0.6090144", "text": "function virtual_deals_type_options() {\n\t?>\n\t<div id=\"virtual_deals_options\">\n\t\t<?php\n\t\t\t_e('Virtual deals have no specific options.', 'cmdeals');\n\t\t?>\n\t</div>\n\t<?php\n}", "title": "" }, { "docid": "2ee090119d076d1cd79b6194d5d471b7", "score": "0.60835254", "text": "public function vaasco_title_cb() {\n\t\t$title = isset(get_option('vaasco_options')[$this->option_name . '_title']) \n\t\t\t? get_option('vaasco_options')[$this->option_name . '_title'] : '';\n\n\t\tif (isset(get_option('vaasco_options')[$this->option_name . '_title'])) {\n\t\t\t$title = get_option('vaasco_options')[$this->option_name . '_title'];\n\t\t}\n\t\t?>\n \t\t<input type=\"text\" class=\"widthMedium\" name=\"vaasco_options[<?php echo $this->option_name . '_title' ?>]\" id=\"<?php echo $this->option_name . '_title' ?>\" value=\"<?php echo $title ?>\">\n\t\t<?php\n\t}", "title": "" }, { "docid": "e28712fddec84a0b74b0e123e351a0a7", "score": "0.607488", "text": "public function html() {\n\t\t$options = $this->get_options();\n\t\t$settings = $this->get_settings();\n\t\t$value = $this->get_value();\n\n\t\t// Override selected setting with\n\t\t// database value if not empty.\n\t\tif ( ! papi_is_empty( $value ) ) {\n\t\t\t$settings->selected = $value;\n\t\t}\n\n\t\t?>\n\t\t<select class=\"papi-vendor-select2 papi-fullwidth\" name=\"<?php echo $options->slug; ?>\">\n\t\t\t<?php\n\t\t\tforeach ( $settings->items as $key => $value ):\n\t\t\t\tif ( is_numeric( $key ) ) {\n\t\t\t\t\t$key = $value;\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t<option\n\t\t\t\t\tvalue=\"<?php echo $value; ?>\" <?php echo $value == $settings->selected ? 'selected=\"selected\"' : ''; ?>><?php echo $key; ?></option>\n\t\t\t<?php endforeach; ?>\n\t\t</select>\n\t<?php\n\t}", "title": "" }, { "docid": "facb187b2543bbcdc6b5eaa30fe827b9", "score": "0.6064059", "text": "function _cb_output_html(): void {\n\t$inst = _get_instance();\n\t?>\n\t<div class=\"wrap\">\n\t\t<h2><?php echo esc_html( $inst->page_title ); ?></h2>\n\t\t<form method=\"post\" action=\"options.php\">\n\t<?php\n\t\t\tsettings_fields( $inst->slug );\n\t\t\tdo_settings_sections( $inst->slug );\n\t\t\tsubmit_button();\n\t?>\n\t\t</form>\n\t</div>\n\t<?php\n}", "title": "" }, { "docid": "31e53581ea11860812e5c0b5659f091c", "score": "0.6062041", "text": "public function display_options_page() {\n\t\tinclude_once 'partials/vaasco-admin-display.php';\n\t}", "title": "" }, { "docid": "576ca66ef73850aae8649586a474b538", "score": "0.6057582", "text": "function shoestrap_empty_page_title() {}", "title": "" }, { "docid": "09b2018792d8f147f95e42a75c06a479", "score": "0.60532063", "text": "function custom_rpg_dashboard_page(){\n\t\t$opt_html_val = get_option(RPG_ADMINPG_SCREEN_HTML_NAME);\n\n\t\t//SET DEFAULT PAGE CONTENT\t\n\t\tif ($opt_html_val==''){\n\t\t\t$opt_html_val = '<div><h1>*** Sample RPG Admin Page ***</h1><p><strong>Note:</strong> To add bespoke html code to this page visit <em>\"RPG Admin Page\"</em> found under the Settings admin menu.</p></div>';\n\t\t}\n\t\n\t\techo str_replace('\\\\', '', $opt_html_val);\n\t}", "title": "" }, { "docid": "487e2d43e07ddf2e9ddbf538f269ac89", "score": "0.60496205", "text": "function options_summary(&$categories, &$options) {\n // It is very important to call the parent function here:\n parent::options_summary($categories, $options);\n\n $categories['page']['title'] = t('Data export settings');\n\n $options['use_batch'] = array(\n 'category' => 'page',\n 'title' => t('Batched export'),\n 'value' => ($this->get_option('use_batch') == 'batch' ? t('Yes') : t('No')),\n );\n \n if (!$this->is_compatible() && $this->get_option('use_batch')) {\n $options['use_batch']['value'] .= ' <strong>' . t('(Warning: incompatible)') . '</strong>';\n }\n }", "title": "" }, { "docid": "fae82963e2e2535a71399b0ead5ee34e", "score": "0.60472345", "text": "function twfy_options_page_html() {\n \n // Check this user has adequate privileges.\n if ( ! current_user_can( 'manage_options' ) ) {\n return;\n }\n \n // Show any error/update messages.\n settings_errors( 'twfy_messages' );\n ?>\n <div class=\"wrap\">\n\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n \n <form action=\"options.php\" method=\"post\">\n <?php\n \n // Output security fields for the registered setting \"twfy\".\n settings_fields( 'twfy' );\n \n // Output setting sections and their fields.\n do_settings_sections( 'twfy' );\n \n // Output save settings button.\n submit_button( 'Save Settings' );\n\n ?>\n </form>\n </div>\n <?php\n}", "title": "" }, { "docid": "04d21726b8af9a917dccc7b0e3e6bb6a", "score": "0.60018015", "text": "public function toBrowser()\r\n {\r\n \techo \"<OPTION \";\r\n \tparent::toBrowser();\r\n\t\t//elimino las comillas dobles de las variables\r\n \tif ((string)$this->text != (string)$this->value) \r\n \t\techo \" value=\\\"\".str_replace('\"',\"\", $this->value).\"\\\"\";\r\n \tif ($this->selected)\r\n \t\techo \" selected\";\r\n \techo \">\";\r\n \techo $this->text;\r\n \techo \"</OPTION>\";\r\n\r\n }", "title": "" }, { "docid": "ec511a6f5bb607859347e42c484970e3", "score": "0.59866166", "text": "function render_options_page() {\n $context = array(\n 'title' => 'SoundCloud Options',\n 'settings_section' => 'soundcloud',\n 'settings_field' => 'soundcloud'\n );\n\n Timber::render('admin/options_page.twig', $context);\n }", "title": "" }, { "docid": "b2327621c7a55e8452afdae6ebe61925", "score": "0.5985891", "text": "function web_paypal_control()\r\n{\r\n\tglobal $wpdb;\r\n\t$options = get_option('web_paypal');\r\n\r\n\tif ( $_POST['paypal-submit'] )\r\n {\r\n \t$options['title'] = strip_tags(stripslashes($_POST['paypal-title']));\r\n\t\tupdate_option('web_paypal', $options);\r\n\t}\r\n\r\n\t$title = htmlspecialchars($options['title'], ENT_QUOTES);\r\n\r\n\t// The Box content\r\n\techo '<p style=\"text-align:right;\"><label for=\"paypal-title\">' . __('Title:') . ' <input style=\"width: 200px;\" id=\"paypal-title\" name=\"paypal-title\" type=\"text\" value=\"'.$title.'\" /></label></p>';\r\n\techo '</select></p>';\r\n\techo '<input type=\"hidden\" id=\"paypal-submit\" name=\"paypal-submit\" value=\"1\" />';\r\n}", "title": "" }, { "docid": "de9464eac56569f27b28b9a8f47a1570", "score": "0.5985257", "text": "function Return_TitleOption ($option, $sep) {\r\n\r\n\t\tswitch ($option) :\r\n\t\t\tcase 'A':\r\n\t\t\t\tif ($this->default_author == '')\r\n\t\t\t\t\t$ret = $this->nt.'<li>'.get_author_name($this->post->post_author).$sep.'</li>';\r\n\t\t\t\telse\r\n\t\t\t\t\t$ret = $this->nt.'<li>'.$this->default_author.$sep.'</li>';\r\n\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\tcase 'D':\r\n\t\t\t\tif ($this->default_date == '')\r\n\t\t\t\t\t$ret = $this->nt.'<li>'.substr($this->post->post_date, 0, 10).$sep.'</li>';\r\n\t\t\t\telse\r\n\t\t\t\t\t$ret = $this->nt.'<li>'.substr($this->default_date, 0, 10).$sep.'</li>';\r\n\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\tcase 'E':\r\n\t\t\t\t$ret = $this->nt.'<li>'.excerpt_revisited($this->post->post_content, 40, $this->post_url).$sep.'</li>';\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'T':\r\n\t\t\t\t$ret = $this->nt.'<li><a href=\"'.$this->post_url.'\">'.$this->title.'</a>'.$sep.'</li>';\r\n\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\tendswitch;\r\n\r\n\t\treturn $ret;\r\n\t}", "title": "" }, { "docid": "704bca58e8b8646d305e375895275b5d", "score": "0.5984932", "text": "function build_optionsPage() {\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\twp_die( __( 'You do not have sufficient permissions to access this page.', MFP_TEXT_DOMAIN ) );\n\t\t}\n\t\t?>\n\n\t\t<div class=\"wrap\" id=\"theme-options-wrap\">\n\t\t\t<div class=\"icon32\" id=\"icon-themes\"><br /></div>\n\t\t\t<h2><?php _e( 'flickr Photostream Options', MFP_TEXT_DOMAIN ); ?></h2>\n\t\t\t\n\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t<?php settings_fields( 'mflickrphotostream_options' ); ?>\n\t\t\t\t<?php do_settings_sections( basename( __FILE__ ) ); ?>\n\t\t\t\t<p class=\"submit\"><input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"<?php esc_attr_e( 'Save Changes', MFP_TEXT_DOMAIN ); ?>\" /></p>\n\t\t\t</form>\n\t\t</div>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "960ed289d228479e02ff8cdf6b3445da", "score": "0.597384", "text": "function displayOptions(){\n }", "title": "" }, { "docid": "9f7fa808830fc5905f99d8562fb81f61", "score": "0.59704226", "text": "function optinforms_form4_hide_title() {\n\tglobal $optinforms_form4_hide_title;\n\treturn $optinforms_form4_hide_title;\n}", "title": "" }, { "docid": "3b1da4ad0bd92b33924532e5ce51f4ac", "score": "0.5962866", "text": "public function admin_options() {\n ?>\n <h3><?php _e( 'Billplz Online Payment', 'exn-wc-billplz' ); ?></h3>\n <p><?php _e( 'Billplz Online Payment works by sending the user to Billplz to enter their payment information.', 'exn-wc-billplz' ); ?></p>\n <table class=\"form-table\">\n <?php $this->generate_settings_html(); ?>\n </table><!--/.form-table-->\n <?php\n }", "title": "" }, { "docid": "139ea505fc84806157329aed19b65371", "score": "0.5944877", "text": "function get_field_option($element_title){\n\t\treturn \"\\n\\t\\t`\" . str_replace(' ', '_', $element_title) . \"`.`option` AS `\" . str_replace(' ', '_', $element_title) .\"`\";\n\t}", "title": "" }, { "docid": "3ed4e09f54cdb995bd6c81a7b5f46c18", "score": "0.59346604", "text": "public function twabc_settings_behaviour_header() {\r\n echo '<p>'.__('Basic setup of how each Carousel will function, what controls will show and which images will be displayed.', 'twabc-settings').'</p>';\r\n\t}", "title": "" }, { "docid": "d0f9bb83e9eae228690aabf99fcba63b", "score": "0.59322953", "text": "public function admin_options() {\t\n \t ?>\n \t <style type=\"text/css\">\n .form-table tr{display:block;}\n </style>\n <h3><?php echo ( ! empty( $this->title ) ) ? $this->title : __( 'Settings') ; ?></h3>\n <?php echo ( ! empty( $this->description ) ) ? wpautop( $this->description ) : ''; ?>\n \n <?php do_action('wshop_admin_options_header_'.$this->id)?>\n \n <input type=\"hidden\" name=\"action\" value=\"<?php print esc_attr($this->id)?>\"/>\n <table class=\"form-table\">\n \t\t\t<?php $this->generate_settings_html(); ?>\n \t\t</table>\n \t\t<?php\n\t}", "title": "" }, { "docid": "b916d522754f80916234c1ceba86e13c", "score": "0.59320927", "text": "public function rba_wt_document_title_display_input() {\n\t\tprintf(\n\t\t\t'<input type=\"checkbox\" id=\"document_title_display\" name=\"rba_wt_page_parameters_DBoptions[document_title_display]\" value=\"1\"' . checked( 1, $this->page_parameter_options['document_title_display'], false ) . ' />'\n\t\t);\n\t}", "title": "" }, { "docid": "4166949aed28559a66be2ceab24e800f", "score": "0.5926925", "text": "public function admin_options() {\n echo '<h2>' . __( 'Neuralab\\'s WSPay Payment Gateway', 'wcwspay' ) . '</h2>';\n echo '<table class=\"form-table\">';\n $this->generate_settings_html();\n echo '</table>';\n }", "title": "" }, { "docid": "4403e10f50669618c688f7f7c3a65194", "score": "0.592683", "text": "public function me_display_menu_options()\n {\n include_once('view/options.php');\n }", "title": "" }, { "docid": "49861f6e0e57196705b5e7b3db4a0185", "score": "0.59262866", "text": "function COPTHTML($optname) {\r\n $optval = $this->g_opt[$optname];\r\n switch ($optname) {\r\n case 'mamo_excludedpaths':\r\n return $this->WhitespaceToLinebreak($optval);\r\n case 'mamo_pagetitle':\r\n return htmlspecialchars(stripslashes($optval));\r\n case 'mamo_pagemsg':\r\n return htmlspecialchars(stripslashes($optval));\r\n default:\r\n return $optval;\r\n } // switch\r\n }", "title": "" }, { "docid": "fb8d772041b6971d30c9f311990a593f", "score": "0.59232026", "text": "public function ap_option_view() {\n ?>\n <div class=\"wrap<?= ( !empty( $this->wrapper_class ) ? ' ' . $this->wrapper_class : '' ) ?>\">\n <?php if ( $this->use_title ) { ?>\n <?php screen_icon( $this->screen_icon ); ?>\n <h2><?= $this->page_title ?></h2>\n <br/>\n <?php } ?>\n <?php if ( !empty( $this->use_meta_box ) ) { ?>\n <div class=\"metabox-holder\">\n <?php\n add_meta_box( $this->slug . '_metabox', $this->settings_title, array( $this, 'ap_do_option_view' ), $this->slug, $this->meta_position );\n do_meta_boxes( $this->slug, 'left', $this );\n ?>\n </div>\n <?php } else { ?>\n <?php ap_do_option_view(); ?>\n <?php } ?>\n </div>\n <?php\n }", "title": "" }, { "docid": "993840da5f4120c2b192c60d2d30dce7", "score": "0.5914153", "text": "function printHelpBox() {\n\tprint '<div id=\"hap4nfsen_ip_chooser_help\" style=\"display:none;width:95%;border:1px solid gray;padding: 8px; background: none repeat scroll 0% 0% rgb(216, 233, 232);\" >';\n print '<h3>Help</h3>';\n print '<h4>HAP4NfSen IP Chooser</h4>';\n print 'The IP Chooser provides an additional entry point for NetFlow analysis with the HAP4NfSen plugin.<br/>';\n print 'The graph visualises interaction between the hosts listed on the NfSen details page. The direction of the connecting arrows indicates the direction of communication between hosts.<br/>';\n print 'Clicking one of the graphs nodes opens a HAP graphlet with the selected IP as local IP.<br/>';\n\tprint 'The current version of the IP Chooser supports only a few of the aggregations available on the NfSen details page.';\n\tprint '<h4>Summarisation Modes</h4>';\n\tprint 'The IP Chooser offers two different display modes for the selected data. The default mode aggregates hosts using their IP address and port. The alternative mode aggregates on IP only.</br>';\n\tprint 'A button at the bottom of the screen allows to toggle between the two modes.';\n\tprint '<h4>ICMP Control Message Types</h4>';\n\tprint 'The HAP4NfSen plugin does not support ICMP Control Message Type handling. The IP Chooser therefore ignores this information (displayed as port on the NfSen details page) when aggregating IP addresses and ports.';\n print '</div>';\n}", "title": "" }, { "docid": "dbde68dc2ee3687a9320bf80c7d37895", "score": "0.5897309", "text": "public function option_page() {\n\t\tglobal $catpdf_templates,$catpdf_data;\n // Set options\n $data['options'] = $catpdf_data->get_options();\n // Get templates\n $data['templates'] = $catpdf_templates->get_template();\n // Display option form\n $this->view(CATPDF_PATH . '/includes/views/options.php', $data);\n }", "title": "" }, { "docid": "24b98b2f456c66bcc51d703f8c6b1875", "score": "0.5893571", "text": "function create_options_page() {\n\tadd_menu_page(\n\t\t__( 'Relative Sharer', 'relative-sharer' ),\n\t\t__( 'Relative Sharer', 'relative-sharer' ),\n\t\t'manage_options',\n\t\t'relative-sharer',\n\t\t__NAMESPACE__ . '\\\\output_options_page',\n\t\t'dashicons-screenoptions'\n\t);\n}", "title": "" }, { "docid": "c00fb3a73cf7cf97c6cc228075de969f", "score": "0.589129", "text": "protected function settingsHtml()\n {\n return null;\n }", "title": "" }, { "docid": "7d6e4fa937f4ec1ec532f3271a933822", "score": "0.58899045", "text": "private function _adminGeneralOptions() {\n\t\t/*\n\t\t * If the user is logged in, display admin controls\n\t\t */\n\t\tif (isset($_SESSION['user'])) {\nreturn <<<ADMIN_OPTIONS\n<div class=\"container\">\n\t<div class=\"row\">\n\t\t<div class=\"col-md-12\">\n\t\t\t<a href=\"addevent.php\" class=\"admin btn btn-primary\">+ Add a new Event</a>\n\t\t</div>\n\t</div>\n</div>\nADMIN_OPTIONS;\n\t\t} else {\n\t\t\treturn <<<ADMIN_OPTIONS\n\t\t\t\t\t\t<a href=\"login.php\">Log In</a>\nADMIN_OPTIONS;\n\t\t}\n\t}", "title": "" }, { "docid": "f9a8d6de3e1c4a87d32238f19a9e5f26", "score": "0.5887756", "text": "function ad_reachppc_option_page() {\r\n if (function_exists('add_options_page')) {\r\n add_options_page('ReachPPC Link Unit', 'ReachPPC Link Unit', 8, __FILE__, 'ad_insertion_options_page');\r\n }\r\n}", "title": "" }, { "docid": "afb64268bb593e005f2a56ed3f190346", "score": "0.5871429", "text": "public function pageHtml() {\n\t\techo '<h2>WE MADE A SUB PAGE</h2>';\n\t\techo 'Running version: ' . $this->pluginVersion;\n\t}", "title": "" }, { "docid": "b02c56c14d655dcc9d6924787be23338", "score": "0.5865565", "text": "protected function _buildTitle()\n\t{\n\t\t//set title used in view\n\t\t$this->_title = Lang::txt(strtoupper($this->_option));\n\n\t\tif ($this->course->exists())\n\t\t{\n\t\t\t$this->_title .= ': ' . stripslashes($this->course->get('title'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($this->_task && $this->_task != 'intro')\n\t\t\t{\n\t\t\t\t$this->_title .= Lang::txt(strtoupper($this->_option . '_' . $this->_task));\n\t\t\t}\n\t\t}\n\n\t\t//set title of browser window\n\t\t\\Document::setTitle($this->_title);\n\t}", "title": "" }, { "docid": "93d039912bd7f65b5c973657f25bddc2", "score": "0.5865433", "text": "function feedback_banner_options_page()\n{\n add_options_page(\n 'Feedback Banner',\n 'Feedback Banner',\n 'manage_options',\n 'feedback_banner_settings',\n 'feedback_banner_options_page_html'\n );\n}", "title": "" }, { "docid": "1587c5cdb3b9dc31b0b1ae5360ae791e", "score": "0.58612436", "text": "function optinforms_form5_hide_title() {\r\n\tglobal $optinforms_form5_hide_title;\r\n\treturn $optinforms_form5_hide_title;\r\n}", "title": "" }, { "docid": "5059d1bcb17fa04af66aaf764209909f", "score": "0.5859969", "text": "function options_html() {\r\n\t?>\r\n\t<div class=\"wrap\">\r\n\t\t<h2>Advanced Header Options</h2>\r\n\t\tEnter the URL of a header image into the forms below for each respective category. They will show up on all pages pertaining to that category. \r\n\t\t<form action=\"\" method=\"POST\">\r\n\t\t\t<table class=\"form-table\">\r\n\t\t\t\t<tr valign=\"top\">\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t<?php $this->category_header_display();?>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\r\n\t\t\t</table>\r\n\t\t\t<p class=\"submit\">\r\n\t\t\t\t<input type=\"submit\" name=\"submit\" value=\"Update Headers\" class=\"button-primary\" />\r\n\t\t\t</p>\r\n\t\t\t<input type=\"hidden\" name=\"submitted\" value=\"update-headers\" />\r\n\t\t</form>\r\n\t\t\r\n\t</div>\r\n\t<?php \r\n\t}", "title": "" }, { "docid": "d6d931b31b735d0ff07dfee44d3ce43e", "score": "0.58568585", "text": "function PrintOptions() {\n\t\t$session = &GetSession();\n\t\t$session->Remove('ExportSettings');\n\t\t$session->Remove('StatsExported');\n\t\t$session->Remove('StatsTotals');\n\t\t$session->Remove('ExportCampaignCost');\n\t\t$session->Set('ExportCampaignCost', 0);\n\n\t\tif (isset($_POST['Calendar'])) {\n\t\t\t$this->SetupCalendar(null, $_POST['Calendar']);\n\t\t} else {\n\t\t\t$this->SetupCalendar();\n\t\t}\n\t\t$this->ParseTemplate('Export');\n\t}", "title": "" }, { "docid": "cdcfa4f172a98794a2360b6516722711", "score": "0.58559585", "text": "public function page_render() {\n $this->options = get_option('plugin_boilerplate_option');\n ?>\n <div class=\"wrap\">\n <h2>Plugin Options</h2>\n <form method=\"post\" action=\"options.php\">\n <?php\n // Output nonce, action, and option_page fields.\n // Use the name of the appropriate options group.\n settings_fields('plugin_boilerplate_options_group');\n // Prints settings section.\n // Use the slug name of the page whose settings sections you want to output.\n // This should match the page name used in add_settings_section().\n do_settings_sections('plugin_boilerplate');\n // Submit button\n submit_button('Save');\n ?>\n </form>\n </div>\n <?php\n }", "title": "" }, { "docid": "a01dc68797e128b891f39baa7c2b7d8f", "score": "0.5849326", "text": "public function admin_options(){\n echo '<h3>'.__('CCAvenue Payment Gateway', 'mrova').'</h3>';\n echo '<p>'.__('CCAvenue is most popular payment gateway for online shopping in India').'</p>';\n echo '<table class=\"form-table\">';\n $this -> generate_settings_html();\n echo '</table>';\n\n }", "title": "" }, { "docid": "5f3bfb9ed89fb548fb1af7067e0d1e36", "score": "0.58429074", "text": "public function display_general() {\n\n\t\techo '<p>These settings manaage the behavior and appearance of your Daily Blank site. There are quite a few of them!</p>';\n\t}", "title": "" }, { "docid": "f2363c3c6d31517ec8402860b88ab519", "score": "0.584099", "text": "function settings_home_description_option() {\n\t\t\n\t\t$options = $this->options;\n\t\t$allowed_tags = htmlentities( '<b><strong><em><i><span><a><br>' );\n\n\t\techo '<textarea id=\"home_description\" name=\"' . $this->options_group_name . '[home_description]\" cols=\"80\" rows=\"6\">';\n\t\tif ( isset( $options['home_description'] ) && $options['home_description'] ) {\n\t\t\techo $options['home_description'];\n\t\t}\n\t\techo '</textarea>';\n\t\techo '<p class=\"description\">The following tags are permitted: ' . $allowed_tags . '</p>';\n\t\t\n\t}", "title": "" }, { "docid": "b4fd9407172b10fbf4dbf34ab782b009", "score": "0.58306396", "text": "public function set_title($title){\n\t\t\t$this->options['title']=$title;\n\t\t\tif($this->rendered)\n\t\t\t\techo $this->mtd('setTitle',array($title)).';'.CRLF;\n\t\t}", "title": "" }, { "docid": "7b698f9765a1cabdd7828d1cb2ec6ab6", "score": "0.5824489", "text": "public function step2CustomTitle()\n\t{\n\t\treturn \"Removing orphaned member theme preferences\";\n\t}", "title": "" }, { "docid": "c0526da01669c8010e12f1a0a601a21e", "score": "0.58224887", "text": "function options_page() {\n\t\t\tAA_G404D_F && ISCLOG::ti();\n\n\t\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\t\twp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );\n\t\t\t}\n\n\n\t\t\techo '<div class=\"wrap\" id=\"ag4\">';\n\n\t\t\tif ( function_exists( 'screen_icon' ) ) {\n\t\t\t\tscreen_icon();\n\t\t\t}\n\n\t\t\techo '<h2>' . $this->plugin['plugin-name'] . '</h2>';\n\t\t\techo '<form action=\"' . admin_url( $this->plugin['action'] ) . '\" method=\"post\" id=\"ag4_form\">';\n\n\t\t\t//ISCLOG::pdh( $this->options );\n\n\t\t\t// print form nonce\n\t\t\techo '<p style=\"display:none;\"><input type=\"hidden\" id=\"_' . $this->plugin['nonce'] . '\" name=\"_' . $this->plugin['nonce'] . '\" value=\"' . wp_create_nonce( $this->plugin['nonce'] ) . '\" />';\n\t\t\techo '<input type=\"hidden\" name=\"_wp_http_referer\" value=\"' . ( esc_attr( $_SERVER['REQUEST_URI'] ) ) . '\" /></p>';\n\n\n\t\t\t$section_names = array(\n\t\t\t\t'general' => 'General',\n\t\t\t\t'output' => '404 Output Options',\n\t\t\t\t'tracking' => 'Tracking/Logging',\n\t\t\t\t'css' => 'CSS Editor',\n\t\t\t\t'html' => 'HTML Editor',\n\t\t\t);\n\t\t\techo '<div id=\"ag4-tabs\" class=\"ui-tabs ui-widget ui-widget-content ui-corner-all\">';\n\t\t\t?><ul id=\"ag4_tabs_ul\" class=\"hide-if-no-js\" style=\"display:none\"><?php foreach ( $section_names as $section_id => $section_name ) {\n\t\t\t\tprintf( '<li><a href=\"#section-%s\">%s</a></li>', esc_attr( $section_id ), $section_name );\n\t\t\t} ?></ul><?php\n\n\t\t\techo '<div id=\"section-general\" class=\"ag4-section\"><h3 class=\"hide-if-js\">General</h3>';\n\t\t\techo '<table class=\"form-table\"><tbody><tr><th scope=\"row\">Enable/Disable Plugin</th><td><fieldset><legend class=\"screen-reader-text\"><span>Enable/Disable handling errors</span></legend>';\n\t\t\techo '<label for=\"ag4_enabled\" style=\"font-weight:bold\" title=\"Handle Erorrs\"><input type=\"radio\"' . checked( $this->options['enabled'], '1', false ) . ' value=\"1\" name=\"ag4_enabled\" id=\"ag4_enabled_on\" /> Enable plugin to handle 404s, immediately</label><br />';\n\t\t\techo '<label for=\"ag4_enabled\" title=\"Turn off this plugin\"><input type=\"radio\"' . checked( $this->options['enabled'], '0', false ) . ' value=\"0\" name=\"ag4_enabled\" id=\"ag4_enabled_off\" /> Disable this plugin from handling 404s</label><br />';\n\t\t\techo '</fieldset></td></tr>';\n\n\t\t\techo '<tr><th scope=\"row\">404.php Template File</th><td>';\n\t\t\techo '<fieldset><legend class=\"screen-reader-text\"><span>404.php Template File</span></legend>';\n\n\t\t\t$error_templates = array(\n\t\t\t\t__DIR__ . '/404.php',\n\t\t\t\tget_404_template(),\n\t\t\t\tTEMPLATEPATH . '/404.php',\n\t\t\t\tdirname( TEMPLATEPATH ) . '/default/404.php',\n\t\t\t\t'Custom File Location',\n\t\t\t);\n\n\t\t\t$error_templates = array_unique( $error_templates );\n\t\t\t$can_edit = current_user_can( 'edit_files' );\n\n\t\t\tforeach ( $error_templates as $v => $k ) {\n\t\t\t\tif ( $k === 'Custom File Location' ) {\n\t\t\t\t\techo '<label for=\"ag4_404_handler\" title=\"' . $k . '\"><input type=\"radio\"' . checked( $this->options['404_handler'], $k, false );\n\t\t\t\t\techo ' value=\"' . $k . '\" name=\"ag4_404_handler\" id=\"ag4_other_file\" /> ';\n\t\t\t\t\techo '<input type=\"text\" value=\"Custom File Location\" class=\"code\" id=\"ag4_404_choose_file\" style=\"min-width:35em;\" name=\"ag4_404_choose_file\" title=\"File Path\"></label><br />';\n\t\t\t\t} elseif ( file_exists( $k ) ) {\n\t\t\t\t\techo '<label for=\"ag4_404_handler\" title=\"' . $k . '\"><input type=\"radio\"' . checked( $this->options['404_handler'], $k, false );\n\t\t\t\t\techo ' value=\"' . $k . '\" name=\"ag4_404_handler\" id=\"ag4_404_handler_' . $v . '\" /> <code>' . $k . '</code> ';\n\t\t\t\t\techo ( $can_edit ? '<a href=\"' . admin_url( \"theme-editor.php?file={$k}\" ) . '\">(EDIT)</a>' : '' ) . '</label><br />';\n\t\t\t\t}\n\t\t\t}\n\t\t\techo '</fieldset></td></tr></tbody></table>';\n\t\t\techo '<p class=\"binfo\">Add to existing 404.php theme file';\n\t\t\techo ' in your template directory: <br />Add <code style=\"font-size:11px;\">if ( function_exists( \\'aa_google_404\\' ) ) { aa_google_404(); }</code> in the body and save as';\n\t\t\techo ' 404.php in your template folder.<br /> - See the included 404.php file for a simple working example.</p>';\n\n\n\t\t\t/*$this->form_field( 2, 'Google API Key <a href=\"http://code.google.com/apis/ajaxsearch/signup.html\">Get One</a>', 'api_key', 'This identifies your blog to Google.' );\n\t\t\techo '<p class=\"binfo\">You need a Google API Key for this site to display the ajax results. Go ahead and add your AdSense ID as future versions of this plugin will allow you to incorporate AdSense setups compliant with Google Guidelines.</p>';\t\t\t*/\n\n\n\t\t\techo '</div><!--section-->';\n\n\n\n\n\n\t\t\techo '<div class=\"ag4-section\" id=\"section-output\"><h3 class=\"hide-if-js\">404 Output Options</h3>';\n\n\t\t\t$this->form_field( 1, 'Show Recent Posts', 'recent_posts', 'Displays List of Recent Posts' );\n\t\t\t$this->form_field( 3, 'Recent Posts # to Show', 'recent_num', 'How many recent posts to show..' );\n\t\t\techo '<p class=\"binfo\">Shows a list of Recent Posts on your blog.</p>';\n\n\t\t\t$this->form_field( 1, 'Show Popular Tag Cloud', 'tag_cloud', 'Displays Popular Tag Cloud' );\n\t\t\t$this->form_field( 3, 'Tag # to Use', 'tag_cloud_num', 'How many tags to use, otherwise ALL tags..' );\n\t\t\techo '<p class=\"binfo\">Displays a tag cloud (heatmap) from provided data. of your popular tags where each tag is displayed with a font-size showing how popular the tag is, more popular tags are larger.</p>';\n\n\n\n\t\t\t$this->form_field( 1, 'Add <a target=\"_blank\" href=\"http://www.askapache.com/seo/updated-robotstxt-for-wordpress.html\">robots meta</a> to prevent indexing', 'robots_meta', 'Prevent 404 pages from being indexed. This prevents your error pages from being indexed by Google and other search engines, which saves your PageRank for your non-error pages. Highly recommended, Google recommended.' );\n\t\t\t$this->form_field( 2, 'Robots meta tag value <a target=\"_blank\" href=\"http://www.askapache.com/seo/updated-robotstxt-for-wordpress.html\">(?)</a>', 'robots_tag', 'Value of robots meta tag.' );\n\t\t\techo '</div><!--section-->';\n\n\n\n\n\t\t\techo '<div class=\"ag4-section\" id=\"section-tracking\"><h3 class=\"hide-if-js\">404 Tracking/Logging</h3>';\n\n\t\t\techo '<p class=\"binfo\">Use Google Analytics to <a target=\"_blank\" href=\"http://www.askapache.com/seo/tip-google-analytics-404-error-page.html\">Track/Log Errors</a>.</p>';\n\t\t\t$this->form_field( 1, '<a href=\"http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=86927\">Track</a> <a target=\"_blank\" href=\"http://www.google.com/support/forum/p/Google+Analytics/thread?tid=09386ba811b3e7d8&hl=en\">Errors</a> with Google Analytics', 'analytics_log', 'Use Google Analytics to Track/Log Errors' );\n\n\t\t\t$this->form_field( 2, 'Google Analytics Key <small>UA-733153-7</small> <a target=\"_blank\" href=\"https://www.google.com/adsense/support/bin/answer.py?answer=45465\">Get One</a>', 'analytics_key', 'The tracking ID for this site.' );\n\n\t\t\techo '<p class=\"binfo\">This is clever as instead of using your server and database to store 404s, which results in crazy additional server-load, this method uses javascript so google machines will do all the work. <code>\"/404.html?page=\" + document.location.pathname + document.location.search + \"&amp;from=\" + document.referrer</code></p>';\n\t\t\t$this->form_field( '2j', 'Tracking URL for reports <a target=\"_blank\" href=\"http://www.google.com/support/googleanalytics/bin/answer.py?answer=75129\">Get One</a>', 'analytics_url', 'Lets you view errors in analytics!' );\n\n\t\t\t$this->form_field( 2, 'Your Google CSE ID <small>partner-pub-4356884677303281:hcqlgw-sn16</small> <a target=\"_blank\" href=\"https://support.google.com/adsense/answer/1055578?hl=en\">(?)</a>', 'cse_id', 'Get one using AdSense account or a CSE' );\n\t\t\techo '</div><!--section-->';\n\n\n\n\t\t\techo '<div class=\"ag4-section\" id=\"section-html\"><h3 class=\"hide-if-js\">HTML Editor</h3>';\n\t\t\t$this->form_field( 5, '', 'html','This controls the output of the plugin. Move stuff around, change what you want, and load the default if you mess up too much.' );\n\t\t\techo '<p class=\"binfo\">This lets you determine the placement and any extra html you want output by this plugin.<br /><br /><code>%google%</code> - required! This will be the search box and search results<br /><code>%error_title%</code> - replaced with the status code and error phrase - 404 Not Found<br /><code>%tag_cloud%</code> - replaced with your tag cloud if enabled<br /><code>%recent_posts%</code> - replaced with the recent posts html if enabled</p>';\n\t\t\techo '</div><!--section-->';\n\n\n\n\t\t\techo '<div class=\"ag4-section\" id=\"section-css\"><h3 class=\"hide-if-js\">CSS Editor</h3>';\n\t\t\t$this->form_field( 5, '', 'css','The css that controls the google ajax search results.. (and anything else on the page)' );\n\t\t\techo '<p class=\"binfo\">Modify the css that is output (inline) on your 404 error pages. Changes the appearance of, well, everything.</p>';\n\t\t\techo '</div><!--section-->';\n\n\t\t\techo '</div><!--ag4-tabs-->';\n\n\n\t\t\techo '<p class=\"submit hide-if-js\"><input type=\"submit\" class=\"button-primary\" name=\"ag4_action_save\" id=\"ag4_action_save\" value=\"Save Changes &raquo;\" /> <br /><br /><br /><br />&nbsp;&nbsp;&nbsp;&nbsp;';\n\t\t\techo '<input type=\"submit\" class=\"button button-primary button-large\" name=\"ag4_action_reset\" id=\"ag4_action_reset\" value=\"Revert to Defaults &raquo;\" /></p>';\n\t\t\techo '</form><br style=\"clear:both;\" />';\n\n\n\t\t\t// just a temp solution.. will be cleaned for next release\n\t\t\techo \"<form style='display: none' method='post' action='\" . admin_url( $this->plugin['action'] ) . \"' id='ag4_reset'><p>\";\n\t\t\techo \"<input type='hidden' name='ag4_action_reset' id='ag4_action_reset' value='\" . wp_create_nonce( 'ag4_action_reset_nonce' ) . \"' /></p></form>\";\n\n\n\n\t\t\techo \"<p><a id='aamainsubmit' title='Save Changes' href='#' class='button button-primary button-large hide-if-no-js ag4submit aasubmit-button'>Save</a><br /><br /><br /><br /></p>\";\n\n\n\t\t\techo '<p class=\"hide-if-no-js\">';\n\t\t\techo \"<a title='Reset all options EXCEPT CSE ID and Analytics KEY - including code to the default values' href='#' class='ag4reset'><em class='aasubmit-b'>RESET TO DEFAULTS</em></a>\";\n\t\t\techo '</p><hr style=\"margin-top:2em;\" />';\n\n\n\n\t\t\techo '<div style=\"width:300px;float:left;\"><p><br class=\"clear\" /></p>\n\t\t\t<h3>Articles from AskApache</h3>';\n\t\t\techo '<ul><li><a target=\"_blank\" href=\"http://www.askapache.com/seo/seo-secrets.html\">SEO Secrets of AskApache.com</a></li>';\n\t\t\techo '<li><a target=\"_blank\" href=\"http://www.askapache.com/seo/seo-advanced-pagerank-indexing.html\">Controlling Pagerank and Indexing</a></li>';\n\t\t\techo '<li><a target=\"_blank\" ref=\"http://www.askapache.com/htaccess/htaccess.html\">Ultimate .htaccess Tutorial</a></li>';\n\t\t\techo '<li><a target=\"_blank\" href=\"http://www.askapache.com/seo/updated-robotstxt-for-wordpress.html\">Robots.txt Info for WordPress</a></li></ul></div>';\n\n\t\t\techo '</div>';\n\n\t\t\tAA_G404D_F && ISCLOG::ti();\n\t\t}", "title": "" }, { "docid": "1ab3b87c94a76a20f5704bffa638c193", "score": "0.5821539", "text": "function googanalytics_theme_options_render_page() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<?php screen_icon(); ?>\n\t\t\t<h2><?php _e( 'Google Analytics', 'googanalytics' ); ?></h2>\n\n\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t<?php\n\t\t\t\t\tsettings_fields( 'googanalytics_options' );\n\t\t\t\t\tdo_settings_sections( 'googanalytics_theme_options' );\n\t\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "ea91d5644b66c22ba2cc58f77cc37421", "score": "0.5813338", "text": "private function showAvailableOptions()\n {\n $console = $this->getConsole();\n $console->writeLine($this->promptText);\n foreach ($this->options as $k => $v) {\n $console->writeLine(' ' . $k . ') ' . (in_array($v, $this->checkedOptions) ? '[X] ' : '[ ] ') . $v);\n }\n }", "title": "" }, { "docid": "f2b0a408937ce3b07f5bada76006587c", "score": "0.581259", "text": "function ct_builder_wp_title( $title = array() ) {\n \t$title['title'] = __( 'Oxygen Visual Editor', 'component-theme' ).(isset($title['title'])?' - '.$title['title']:'');\n return $title;\n}", "title": "" }, { "docid": "dfc13afbd4ae4e09b4286ca50ebd2f65", "score": "0.58120465", "text": "function ucu_show_um_profile_nav_titles() {\n\tif ( get_option( 'ucu_show_um_profile_nav_titles' ) !== 'on' ) {\n\t\treturn false;\n\t}\n\t?>\n\t<style>\n\t.um-page-user .um-profile-nav-item .title {\n\t\tdisplay: block !important;\n\t}\n\t</style>\n\t<?php\n}", "title": "" }, { "docid": "874f46ba85f4d8b465ae8f7c64aad62a", "score": "0.5811935", "text": "function add_options_page() {\n\t\t\tif (function_exists('add_options_page')) {\n\t\t\t\tadd_options_page('WRAP Authentication', 'WRAP Authentication', 9, __FILE__, array(&$this, '_display_options_page'));\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a96dac354c645f373c3329ffc075c7d5", "score": "0.5803841", "text": "public function display_options_page() {\n\t\tinclude_once 'partials/wplibcalhours-admin-display.php';\n\t}", "title": "" }, { "docid": "556740004875b975f11852fc3212bae6", "score": "0.5800517", "text": "function asideshop_create_options_page()\n{\n\tadd_options_page('AsideShop', 'AsideShop', 9, basename(__FILE__), 'asideshop_conf');\n}", "title": "" }, { "docid": "d1cc6e8f5c62ac757ba28771a2124261", "score": "0.58001924", "text": "function title($goBack) {\r\n // echo <<<HTML\r\n // <div class=\"col col-sm-8\">\r\n // HTML;\r\n // echo \"<h1><a href='\".$goBack.\"index.php' title='Alternanza Scuola-lavoro'> Piattaforma Alternanza Scuola-Lavoro</a></h1>\";\r\n // echo <<<HTML\r\n // </div>\r\n // \techo <<<HTML\r\n // <div class=\"col col-sm-12\">\r\n // <div id=\"logo\">\r\n // HTML;\r\n // echo \"<a href='\".$goBack.\"' title='Stage Manager'>\";\r\n // echo \"<img src='\".$goBack.\"media/img/logo_stage_manager.png' alt='Stage Manager'></a>\";\r\n // echo <<<HTML\r\n // </div>\r\n // </div>\r\n // HTML;\r\n }", "title": "" }, { "docid": "00bbfd3be422510053d27d0f97ae91ea", "score": "0.57988393", "text": "public function soliloquy_plugin_settings() {\n \t\t\n\t\techo '<div class=\"wrap soliloquy-settings\">';\n\t\t\tscreen_icon( 'radium_pricetables' );\n\t\t\techo '<h2 class=\"soliloquy-settings-title\">' . esc_html( get_admin_page_title() ) . '</h2>';\n \t\techo '</div>';\n\n\t}", "title": "" }, { "docid": "7fda1f935b2427afbc1bcb54cac28d82", "score": "0.57966125", "text": "public function display_options_page()\n {\n ?>\n <div class=\"wrap\">\n <h1>Kml Options</h1>\n <form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">\n <?php settings_fields('kml_plugin_options'); ?>\n <?php do_settings_sections(__FILE__); ?>\n\n <p class=\"submit\">\n <input type=\"submit\" name=\"submit\" id=\"submit\" class=\"button button-primary\" value=\"Save Changes\">\n </p>\n </form>\n </div>\n <?php\n }", "title": "" }, { "docid": "cb89c56ee570060b17f2e84513921f5f", "score": "0.5792423", "text": "function section_intro()\n\t{\n\t\t// echo \"<pre>\";\n\t\t// print_r(get_option('bd_paypal_settings'));\n\t\t// echo \"</pre>\";\n\t}", "title": "" }, { "docid": "109471f2db3a3841e533ff06c21a7afd", "score": "0.5791985", "text": "function print_section_info() {\n echo '<p class=\"description\">'.__('Enter here some settings', 'FatFishLP').'</p>';\n }", "title": "" }, { "docid": "b9a0532be2fda1764f59378b31ef0e90", "score": "0.5788321", "text": "public static function render_options_page() {\n\t\tPartials::load( 'options_page' );\n\t}", "title": "" }, { "docid": "a0fb0291f2f2e5dd951a1a22bc3eb6eb", "score": "0.57871604", "text": "function lco_title_indent(){\n\tglobal $thesis_design;\n\tif ($thesis_design->display['header']['title']){ //only if title is set to be shown\n\t\techo '<style type=\"text/css\"> #logo a { text-indent: 0; } </style>';\n\t}\n}", "title": "" }, { "docid": "f901e07f4ab2374af79ada9c01151ed6", "score": "0.5786839", "text": "public function get_title ()\n {\n if (!$this->active)\n return $this->title . ' ['.dgettext('phpwsbb', 'Hidden').']';\n return $this->title;\n }", "title": "" }, { "docid": "9b2b2d4925b97b0e782806633661c8a6", "score": "0.5786838", "text": "public static function ninja_form_option() {\n\n $options = '';\n\n if (self::is_ninja_three()) {\n\n $forms = Ninja_Forms()->form()->get_forms();\n foreach ($forms as $form) {\n $options .= '<option value=\"' . $form->get_id() . '\">' . $form->get_setting('title') . '</option>';\n }\n } else {\n\n $nf_forms = new NF_Forms;\n $ninja_forms = $nf_forms->get_all();\n\n\n foreach ($ninja_forms as $form_id) {\n $title = Ninja_Forms()->form($form_id)->get_setting('form_title');\n\n $options .= '<option value=\"' . $form_id . '\">' . $title . '</option>';\n }\n }\n return $options;\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "ee7bd1bf35ddc99690c5f88cb0417d86", "score": "0.0", "text": "public function create()\n {\n $this->authorize('admin.example.create');\n $sliders = Slider::all();\n $checkboxes = Checkbox::all();\n $experiments = Experiment::where('type', 'comparison')->get();\n $schemes = ComparisonExperiment::all();\n\n return view('admin.example.create', [\n 'sliders' => $sliders,\n 'checkboxes' => $checkboxes,\n 'experiments' => $experiments,\n 'schemes' => $schemes\n ]);\n }", "title": "" } ]
[ { "docid": "cb267e3ebbd54b9945858b4232a6e394", "score": "0.7781188", "text": "public function create()\n {\n return view('admin.resource.create');\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.7725258", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "64a6a51cb4e4b962408e448d0c1399e9", "score": "0.74678856", "text": "public function actionCreate()\r\n {\r\n $model = new Resource();\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 }", "title": "" }, { "docid": "4c4b7c47a2d71e26b29b9caea091a07c", "score": "0.73932904", "text": "public function showCreateForm()\n {\n $this->authorize('create', Project::class);\n\n return view('project.create', [\n 'action' => 'create',\n ]);\n }", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7389879", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "4734584f2f8340a42973a0d555da6c67", "score": "0.7327888", "text": "public function create()\n {\n return view(\"superadmin.form\");\n }", "title": "" }, { "docid": "10d532d72b585493a6ca515a12bc3a2c", "score": "0.73214245", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/IAS/create');\n\n\t}", "title": "" }, { "docid": "9332c37244dbc51a6ec587579d9cd246", "score": "0.72870517", "text": "public function create()\n {\n //\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.7279612", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.7279612", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.7279612", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "78824716ffe303654b7c00562ec87847", "score": "0.7272328", "text": "public function create() {\n $viewData = $this->getDefaultFormViewData();\n $viewData[\"mode\"] = \"create\";\n $viewData[\"supplier\"] = new Supplier();\n\n $viewData[\"supplier\"]->supplier_number = NumberSeries::getNextNumber(Supplier::MODULE_CODE);\n\n return view(\"{$this->viewPath}.form\", $viewData);\n }", "title": "" }, { "docid": "aa37b9385ad38984404b3f4097565c00", "score": "0.72510415", "text": "public function newAction()\n {\n $request = $this->container->get('request');\n $options = $request->get('options');\n $alias = $request->get('alias');\n\n $metadata = $this->getMetadata($options['class']);\n $entity = $this->newEntityInstance($metadata);\n\n $fields = $this->getFields($metadata, $options, 'new');\n $type = $this->getCustomFormType($options, 'new');\n\n $form = $this->createCreateForm($entity, $alias, $fields, $type);\n\n return $this->render(\n 'SgDatatablesBundle:Crud:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'list_action' => DatatablesRoutingLoader::PREF . $alias . '_index',\n 'heading' => $this->getHeading()\n )\n );\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.7218858", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "56ed6a0676abf46597af78526cddcbf9", "score": "0.7215098", "text": "public function create()\n {\n return view( 'forms/car' );\n }", "title": "" }, { "docid": "7e6cbda13a4d6999c8e363f25258eeb1", "score": "0.72084343", "text": "public function showCreateForm()\n {\n return view('user.create');\n }", "title": "" }, { "docid": "570432e9bac5bbbd5f03f49d8c84f384", "score": "0.71771365", "text": "public function create()\n {\n return view('core.admin.form.create');\n }", "title": "" }, { "docid": "ca8a62edbc9efc96246dc89065570720", "score": "0.7162148", "text": "public function newAction()\n {\n $this->loggerStdout->log('UsersController: display the creation form');\n\n\n }", "title": "" }, { "docid": "7cda6fe62fc1ec4947ab520926c7eca6", "score": "0.7147961", "text": "public function create()\n {\n return View::make(self::CID.'.form');\n }", "title": "" }, { "docid": "95739848366d87216fcc63cf6199aa8c", "score": "0.7140321", "text": "public function create()\n {\n \treturn view('form');\n }", "title": "" }, { "docid": "56dd0677c79549ae44b2b1cc8d7bd0db", "score": "0.7137166", "text": "public function create()\n {\n return view('backEnd.formisian.create');\n }", "title": "" }, { "docid": "53163536d5d151380894ed516baf152c", "score": "0.7132318", "text": "public function actionCreate() {\n $this->render('create');\n }", "title": "" }, { "docid": "7d27d715128bcec59bea3173b77f3e80", "score": "0.71298736", "text": "public function create()\n {\n \n return view('admin.forms.create');\n }", "title": "" }, { "docid": "8e8000021c431ea72dcb74907ce2583e", "score": "0.7115529", "text": "public function create()\n {\n return view('crud.new');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7115064", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7115064", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "f26dda2bfcba89d5cc0857ab1ea11689", "score": "0.7114045", "text": "public function create()\n {\n return view($this->sPath.'/form', ['sPageTitle' => $this->sName]);\n }", "title": "" }, { "docid": "74cc4ed8fa057c0f0734c751db297540", "score": "0.71065503", "text": "public function create()\n {\n return view('curso.form');\n }", "title": "" }, { "docid": "76b4745b537106a5513b06d8ab3e4928", "score": "0.70735455", "text": "public function create()\n {\n //\n return view('submit.create');\n }", "title": "" }, { "docid": "7545e6950b9a4b4ee7a1ca28789b55aa", "score": "0.707173", "text": "public function createAction ()\n\t{\n\t\t$this->view->form = $this->_form;\n\t\t$this->view->render('signin', 'create');\n\t}", "title": "" }, { "docid": "856274cb86788ad9604003f12dd5060c", "score": "0.707161", "text": "public function create()\n {\n return view('carusel.new');\n }", "title": "" }, { "docid": "0f2dac59601869fb2c54ce811c4650aa", "score": "0.70662445", "text": "public function create()\n {\n return view('pages.forms.addProduct');\n }", "title": "" }, { "docid": "cd26d7c620bd493d734a18664ac56a6d", "score": "0.70440876", "text": "public function create()\n\t{\n\t\treturn view('formation/create');\n\t}", "title": "" }, { "docid": "a23e51d12b5252adcb8123deec223f18", "score": "0.70390344", "text": "public function create()\n {\n $this->data['titlePage'] = trans('admin.obj_new',['obj' => trans('admin.'.$this->titleSingle)]);\n $breadcrumbs = array();\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconNew ];\n $this->data['breadcrumbs'] = $breadcrumbs;\n\n return view(GetViewAdminResource($this->resourceView, 'create'))->with($this->data);\n }", "title": "" }, { "docid": "40e93c68e66b0c86108e5ae59cc176d2", "score": "0.7020387", "text": "public function newAction()\n {\n $this->view->setVar('form', new ClientForm(null, ['edit' => false]));\n }", "title": "" }, { "docid": "59db2ec2bb6338f023d72461ca432a6e", "score": "0.70132947", "text": "public function create()\n {\n //form showing by modal, without controller or ajax\n }", "title": "" }, { "docid": "b7740989974ec89d90c4ded59d8de5c3", "score": "0.7007752", "text": "public function create()\n {\n \n return view ('studentform');\n }", "title": "" }, { "docid": "06f183ff6cd0bb720144b6bfd1f60c58", "score": "0.7003692", "text": "public function create()\n {\n return view('admin.catalog.edit_form', [\n 'route_base_url' => 'catalog',\n 'model_name' => '\\App\\Models\\Catalog'\n ]);\n }", "title": "" }, { "docid": "67dbcb9d8cbfbf80f7870af19e54acc7", "score": "0.69971824", "text": "public function create()\n {\n return view('student_form');\n }", "title": "" }, { "docid": "753f9bd767a3748b9d6409cb957dc41f", "score": "0.69926226", "text": "public function createAction()\n {\n $action = $this->view->url(['action' => 'save'], 'controllers');\n $this->view->projectForm = $this->service->getFormForCreating($action);\n }", "title": "" }, { "docid": "7fdab24f12d98bab46a40db3c2f06831", "score": "0.69871885", "text": "public function create()\n\t{\n\t\treturn View::make('back_setup/ProductForm');\n\t}", "title": "" }, { "docid": "e58f17523277fc6c291ecbf3f817eb22", "score": "0.6984684", "text": "public function create()\n {\n return view('radars.create');\n }", "title": "" }, { "docid": "3dc360473dabcb08b5169d4443b754b3", "score": "0.6982808", "text": "public function create()\n {\n $form = $this->form;\n $route = $this->route;\n return view($this->rCreate,compact('form','route'));\n }", "title": "" }, { "docid": "d992b460ca7fa75fae06c92431ea0040", "score": "0.69759697", "text": "public function create()\n {\n View::share(\"pageTitle\", $this->pageTitle);\n View::share(\"pageUrl\", $this->pageUrl);\n View::share(\"formTitle\", \"Create category\");\n View::share(\"formFields\", $this->form->getFields());\n return View::make('admin.form.form');\n }", "title": "" }, { "docid": "8d7b1185b59117c1c7138b85525adfa3", "score": "0.6974966", "text": "public function create()\n {\n return view(\"add\");\n }", "title": "" }, { "docid": "faad50701ca209b09853100eea7791d6", "score": "0.6966013", "text": "public function ShowForm()\n\t{\n\t\treturn view('marcas.new');\n\t}", "title": "" }, { "docid": "f15b831e674279eeed6c926d7fc775f4", "score": "0.696425", "text": "public function showForm()\n {\n return view('backend.employee.new');\n\n }", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69628406", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69628406", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "94b9216c661234b749248be69f855da2", "score": "0.6962067", "text": "public function makeCreateForm()\n {\n return View::make('backend.role.create')\n ->with('module', $this->module);\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6960561", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "57611366e6e3194f52047893b6a260ec", "score": "0.6956752", "text": "public function create()\n {\n \tAppGranted::grantedAccess('add', true);\n $data['module_title'] = \"Role\";\n $data['action'] = route('kantor.store');\n $data['action_type'] = \"add\";\n\n $data['breadcrumb'] = [ \n ['title' => 'Master Data','url' => '#'],\n ['title' => 'Kantor','url' => 'kantor'],\n ['title' => 'form','url' => 'form']\n ];\n\n $data['redirect'] = route(\"kantor.create\");\n \n return view('kantor::kantor_form',$data);\n }", "title": "" }, { "docid": "ec1387b33a439043065a5a57c6b204dc", "score": "0.6954698", "text": "public function create()\n {\n $title = trans('student.new');\n $this->generateParams();\n $custom_fields = CustomFormUserFields::getCustomUserFields('student');\n return view('layouts.create', compact('title', 'custom_fields'));\n }", "title": "" }, { "docid": "f0a4e435f6bebfce6162cc1be7c7ee0f", "score": "0.6953382", "text": "public function create()\n {\n return view('conceptos.create');\n }", "title": "" }, { "docid": "f0580571ff41736a9b6d64685969976e", "score": "0.69519913", "text": "public function create()\n {\n return view('forms.addJobForm');\n\n }", "title": "" }, { "docid": "7b8c9d5cbe582eab2f28c216421a2719", "score": "0.6949087", "text": "public function create()\n {\n return view('proyek.add');\n }", "title": "" }, { "docid": "234165e0547ce18212545035d0a268e8", "score": "0.69381595", "text": "public function create()\r\n {\r\n return view('backend/frame_management/create_form');\r\n }", "title": "" }, { "docid": "ba70ddc190000d3806bc08fdef63dba4", "score": "0.69362134", "text": "public function create()\n {\n return view('news.forms.create');\n }", "title": "" }, { "docid": "a9ea97d1b5f9c3b156c14f4c667cf591", "score": "0.69339746", "text": "public function create()\n {\n $data = array();\n $data['btn'] = trans('main.save');\n return view('employee.form', $data);\n }", "title": "" }, { "docid": "04fb02f1ffa4d6ad9db381edaa1ef950", "score": "0.6933839", "text": "public function create()\n {\n return view('marketing.eduzz.form',[\n 'title_postfix' => $this->configs['new'],\n 'navigation' => $this->navigation,\n ]);\n }", "title": "" }, { "docid": "353155b973a25b62f33cce0b6600b99c", "score": "0.6932775", "text": "public function create()\n {\n $data = array(\n 'title' => 'Ingreso de un nuevo Sector',\n 'message' => 'return confirm(\"¿Esta seguro que desea guardar el sector?\")',\n 'method' => 'POST',\n );\n return view('sector.form')\n ->with('data', $data);\n }", "title": "" }, { "docid": "70b9293351aa11656c59414a77fe44bf", "score": "0.6922181", "text": "public function create()\n {\n\t $title = 'TITC - Payment Receipts Form';\n\n return view('layouts.register', compact( 'title' ) );\n }", "title": "" }, { "docid": "38a6849d5b56a77b178a1fc8297c2e4e", "score": "0.69199556", "text": "public function create()\n\t{\n\t\treturn view('information.create');\n\t}", "title": "" }, { "docid": "a59dfad08f7be5f4bb5d898d16a6d3a3", "score": "0.691865", "text": "public function newAction()\n {\n $entity = new Rector();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ColegioAdminBundle:Rector:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "005d56adb8003598d74448ff694072a8", "score": "0.69178826", "text": "public function showNewForm()\n {\n return view('admin.user_new_form');\n }", "title": "" }, { "docid": "4bf33424414f342096092b367153c3ff", "score": "0.69172204", "text": "public function create()\n {\n return view('webinars.create');\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.69171804", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "bfe25b751c8db9345d0c10f2b43ea766", "score": "0.69148874", "text": "public function create()\n {\n //the create form\n return view('cmsCRUD.create');\n }", "title": "" }, { "docid": "a56ae1a4e831d9137638253cc26e259a", "score": "0.69132966", "text": "public function create()\n {\n return view('supir.create');\n }", "title": "" }, { "docid": "e90d65170f9bc3dd1e2b969826600c53", "score": "0.6912325", "text": "public function create()\n {\n return view('ekskul.create');\n }", "title": "" }, { "docid": "92df450167a97fdf17ebd5b83c28b09a", "score": "0.691161", "text": "public function create()\n\t{\n\t\t\n\t\treturn View::make('back.Conceptos.create');\n\t}", "title": "" }, { "docid": "a8868117c6271a1bf9acf9032ad876bd", "score": "0.6906484", "text": "public function create()\n {\n return view('admin.new');\n }", "title": "" }, { "docid": "d440c94efd1950e00b13ca9c0042a9b5", "score": "0.6903161", "text": "public function create()\n\t{\n\t\treturn View::make('furnizori.create');\n\t}", "title": "" }, { "docid": "50b63a26044f8f6e8ce183a0f169edb5", "score": "0.68982154", "text": "public function create()\n {\n //Form in views\\forms\\add-teacher\n }", "title": "" }, { "docid": "fe5a9905dc7a54f058401299c6181831", "score": "0.6896897", "text": "public function create() {\n return view(\"create\");\n }", "title": "" }, { "docid": "c17c042b94a24f7301adf6c1bccdccb4", "score": "0.6896344", "text": "public function create()\n {\n return view('akun.form');\n }", "title": "" }, { "docid": "3da29d431813cb53ced72193b8b7a8b3", "score": "0.68946326", "text": "public function create()\n {\n return view('info_bank_forms.create');\n }", "title": "" }, { "docid": "7851cc68e170265f04d4bef0fc5bc722", "score": "0.689347", "text": "public function create()\n {\n $this->data['mode'] = 'create';\n $this->data['headline'] = 'Create New Product';\n $this->data['button'] = 'Save';\n\n $this->data['categories'] = Category::arrayForSelect();\n \n return view('products.form',$this->data);\n }", "title": "" }, { "docid": "6df26b4d414a58d611f86b22b775e1e1", "score": "0.689027", "text": "public function create(){\n\t\treturn view('person.new');\n\t}", "title": "" }, { "docid": "8f40254b10bc1c3e9879e99a307263d1", "score": "0.68873906", "text": "public function create()\n {\n return view(\"contratistas.create\");\n }", "title": "" }, { "docid": "a951f648a57c67c0069eeda1c6d6aa92", "score": "0.68865997", "text": "public function create()\n\t{\t\t\n\t\treturn view('syllabi.create');\n\t}", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68864834", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "f77ac1ad153be30f346944682eb2f804", "score": "0.6883537", "text": "public function create()\n {\n return view('programas.form');\n }", "title": "" }, { "docid": "4e920599445d082e866e30214e83ff15", "score": "0.68826294", "text": "public function create()\n {\n return view('company.create'); //return empty form\n }", "title": "" }, { "docid": "0c01c590097437f9d4700db1096060fa", "score": "0.68781114", "text": "public function create()\n {\n return view($this->view_path.'.form',['form_type' => 'create']);\n }", "title": "" }, { "docid": "b65c57b64c6e408c0c27dff7f53b5b58", "score": "0.68766594", "text": "public function create()\n {\n return view('pemilih::create');\n }", "title": "" }, { "docid": "47e62b5d5e96751bc9e8ab90f94e7ea4", "score": "0.68743825", "text": "public function create()\n {\n return view('manager.new');\n }", "title": "" }, { "docid": "3557ca31989d52aabfc94b29a8b4779e", "score": "0.68732125", "text": "public function create()\n {\n return view('hari.create');\n }", "title": "" }, { "docid": "aba2162f4c6ac04e84bdec140bd9b6d8", "score": "0.6872612", "text": "public function create()\n {\n return view('vitri.create');\n }", "title": "" }, { "docid": "e893ea639bb3313c113e9ac5cb2ad8d1", "score": "0.68697333", "text": "public function actionCreate()\n {\n $model = new ResourceManagement();\n $transaction = Yii::$app->getDb()->beginTransaction();\n if (Yii::$app->request->isPost) {\n try{\n if (!$model->load(Yii::$app->request->post()) || !$model->save()) {\n throw new Exception(Yii::t('app', $model->getFirstErrorMessage()));\n }\n $transaction->commit();\n return $this->redirect(['view', 'id' => $model->id]);\n }catch (Exception $e) {\n $transaction->rollBack();\n Helper::Alert(Yii::t('app', $e->getMessage()));\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "0262071f01deb3bd4ca7aa624b922b9c", "score": "0.686943", "text": "public function newAction()\n {\n if(!$this->get('security.context')->isGranted('ROLE_ADMIN')){\n throw new AccessDeniedException('Accès limité aux administrateurs!');\n }\n\n $entity = new Associate();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MPTimeSheetBundle:Associate:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "1fc26c3847b4a579aa5212f09fb5a3ad", "score": "0.68674636", "text": "public function create()\n {\n //\n return view(\"pages.buku.form\");\n }", "title": "" }, { "docid": "2a2d5c7decbde95e55524a71972f118f", "score": "0.6867051", "text": "public function createAction() : object\n {\n // $userSecurity = new UserSecurity($this->di);\n // $userSecurity->auth();\n $page = $this->di->get(\"page\");\n $form = new CreateForm($this->di);\n $form->check();\n\n $page->add(\"question/crud/create\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Ask a question\",\n ]);\n }", "title": "" }, { "docid": "e8a872ac2676790caa81e881be3f96da", "score": "0.6864957", "text": "public function create()\n\t{\n\t\t\n\t\treturn view('arbitro.create');\n\t}", "title": "" }, { "docid": "0c86a3bb52729202de25828ebfccd4f9", "score": "0.6859967", "text": "public function create()\n {\n return view('honnbus.create');\n }", "title": "" }, { "docid": "60bdecfc6ffd19a36bc113519ea81603", "score": "0.6858997", "text": "public function create()\n {\n //\n return view('products.form');\n }", "title": "" }, { "docid": "f7d9d429540409085821ae3a8cc377e9", "score": "0.6858929", "text": "public function create()\n {\n //\n\treturn view ('rumah.create');\n }", "title": "" }, { "docid": "451c07a3106f3c6e3d62757717bfa763", "score": "0.68588245", "text": "public function create()\n\t{\n\t\treturn view('horas.create');\n\t}", "title": "" }, { "docid": "3d7bc8bb3b893c8acc93454aa41e36a4", "score": "0.6857611", "text": "public function create()\n\t{\n\n\t\treturn view('admin.oficinas.create');\n\t}", "title": "" }, { "docid": "5ac05ec4af3247a2fffa1aede51592e8", "score": "0.68569374", "text": "public function create()\n {\n return view('ringan.create');\n }", "title": "" }, { "docid": "17dc479c63e9567096e96d737df7c124", "score": "0.6856256", "text": "public function create() {\n $data = [\n 'title' => 'site_name',\n 'page_title' => 'add_admin',\n 'type' => 'add',\n 'form_title' => 'admin_form',\n 'submit_button' => 'save',\n ];\n return view(AD . '.brands_form')->with($data);\n }", "title": "" } ]
1b222f22593a30d7ade6e2948567db36
Find the location of library JS and CSS files.
[ { "docid": "268514e07d138f8bab6a886176f315f5", "score": "0.57450217", "text": "function janrain_capture_get_library_path($name) {\n $lib_paths = &drupal_static(__FUNCTION__, array());\n if (!isset($lib_paths[$name])) {\n $cid = 'janrain_capture_libraries';\n $cache = cache_get($cid);\n\n if (!empty($cache->data)) {\n $lib_paths = $cache->data;\n if (isset($lib_paths[$name])) {\n return $lib_paths[$name];\n }\n }\n\n // Use Libraries module, if available, to find the correct path.\n if (function_exists('libraries_get_path')) {\n $lib_path = libraries_get_path($name);\n if (!empty($lib_path)) {\n $lib_paths[$name] = $lib_path;\n }\n }\n\n // If we still haven't found a path, assume it's at sites/all/libraries\n if (!isset($lib_paths[$name])) {\n $lib_paths[$name] = 'sites/all/libraries/' . $name;\n }\n cache_set($cid, $lib_paths);\n }\n return $lib_paths[$name];\n}", "title": "" } ]
[ { "docid": "11e5e4277328b7d223c8f25b31daa434", "score": "0.6650996", "text": "public function getLibsPath();", "title": "" }, { "docid": "660d26903f2453e14243b6ec551754ad", "score": "0.6493439", "text": "function library_path() {\n return $GLOBALS['PATH']['library'];\n}", "title": "" }, { "docid": "d945e0ded8d0a238d2c8bbd82a4e1cc4", "score": "0.64814544", "text": "public function getLibraryPath()\n {\n if (null == $this->libraryPath) {\n // Fallback to ExtJS CDN\n $this->libraryPath = 'http://cdn.sencha.io/ext-4.1.1-gpl';\n }\n\n return $this->libraryPath;\n }", "title": "" }, { "docid": "a53fc91ed8779010c53b0adaafd127fb", "score": "0.6377002", "text": "static public function getJsPath(){\n $class_name = __CLASS__;\n\n // находим папку, в которой лежит класс компонента\n $reflector = new \\ReflectionClass($class_name);\n $class_file_name = $reflector->getFileName();\n\n return dirname($class_file_name) . '/scripts.js';\n }", "title": "" }, { "docid": "f5489f44c7bd755e600689689c0c977d", "score": "0.6239621", "text": "private static function get_requirejs_path()\r\n {\r\n if(self::config_has(\"use_min_require\") && self::config_get(\"use_min_require\"))\r\n {\r\n return Bundle::assets(\"requirejs\").\"require.js\";\r\n }\r\n\r\n return Bundle::assets(\"requirejs\").\"require-min.js\";\r\n }", "title": "" }, { "docid": "64b69086478801227c7686a802d5dafc", "score": "0.62062144", "text": "function js_path()\n{\n return Assets::assets_url('js');\n}", "title": "" }, { "docid": "d5c7c66fd30994b314b7e84cef919e6e", "score": "0.616236", "text": "function loadLibsLocally()\n{\n\te107::js('footer', '{e_PLUGIN}livetime/js/libs/moment/min/moment.min.js', 'jquery', 1);\n\te107::js('footer', '{e_PLUGIN}livetime/js/libs/livestamp/livestamp.min.js', 'jquery', 1);\n}", "title": "" }, { "docid": "f5bad06d033c2cb8c2f8d6daa8861147", "score": "0.615186", "text": "public static function getLibInstallPath(){\n\t\tif(is_dir(ELoader::$config_path) and !ELoader::$setted_config){\n\t\t\tELoader::$subsite_path = str_replace(ELoader::$prev_path,'',getcwd());\n\t\t\tELoader::$config_path = getcwd().\"/\".ELoader::$config_path;\n\t\t\tELoader::$controllers_path = getcwd().\"/\".ELoader::$controllers_path;\n\t\t\tELoader::$models_path = getcwd().\"/\".ELoader::$models_path;\n\t\t\tELoader::$views_path = getcwd().\"/\".ELoader::$views_path;\n\t\t\tELoader::$locallibs_path = getcwd().\"/\".ELoader::$locallibs_path;\n\t\t\tELoader::$setted_config = true;\n\t\t}\n\t\tif(is_dir(\"gfx3\")){\n\t\t\tELoader::$cache_path = getcwd().\"/\".ELoader::$cache_path;\n\t\t\tELoader::$libs_path = getcwd().\"/\".ELoader::$libs_path;\n\t\t\treturn getcwd().\"/\".ELoader::$source_path;\n\t\t} else {\n\t\t\tchdir(\"..\");\n\t\t\treturn ELoader::getLibInstallPath();\n\t\t}\n\t}", "title": "" }, { "docid": "03203ae4bdb256cfd05cb8c0e942524c", "score": "0.6061961", "text": "function javascript_path( $source )\n{\n\treturn compute_public_path( $source, 'javascripts', 'js' );\n}", "title": "" }, { "docid": "8be92e4f7f94881cf3671a795f839bdf", "score": "0.6039184", "text": "public static function getLibraryDirectory()\n\t{\n\t\treturn self::$_libDir;\n\t}", "title": "" }, { "docid": "cdd0ae9040d468a250fb85e4911606eb", "score": "0.600942", "text": "function getDistributorLibrariesFolder() {\n\t\treturn $this->getOption(self::OPTION_DISTRIBUTOR_WEBSITE_LIBRARIES_FOLDER, 'libraries');\n\t}", "title": "" }, { "docid": "395c7705f005f2d6c102a2f20ee9a7ae", "score": "0.59921724", "text": "protected static function jsPath() {\n\t\t$scriptPath = 'scripts/pages/';\n\t\t$scriptPath .= str_replace('\\\\', '/', ltrim(strtolower(static::class), 'controllers\\\\')) . '/';\n\t\treturn $scriptPath;\n\t}", "title": "" }, { "docid": "8ba2c19ce84ca37a855e6f1b9463b3a6", "score": "0.59871083", "text": "function beaver_extender_get_custom_js_path() {\r\n \r\n return beaver_extender_get_stylesheet_location( 'path' ) . 'custom-scripts.js';\r\n \r\n}", "title": "" }, { "docid": "eec44baf2ccbe242d06d75c29704ac2b", "score": "0.5966031", "text": "public function getJsLibrary();", "title": "" }, { "docid": "46c6cc801a32704b232d92f9f6c289e5", "score": "0.59579617", "text": "private static function _getJSFiles()\n {\n include_once 'Libs/FileSystem/FileSystem.inc';\n $root = BaseSystem::getSystemRootPath();\n $systemsPath = $root.'/Systems';\n $guiWebPath = $systemsPath.'/GUI/Web';\n\n // First get the GUI and DfxJSLib, these need to come first.\n $guiJSFiles = FileSystem::listDirectory($guiWebPath, array('.js'));\n\n // Rest of the JS files.\n $jsFiles = FileSystem::listDirectory($systemsPath, array('.js'));\n\n $allFiles = array_merge($guiJSFiles, $jsFiles);\n $allFiles = array_unique($allFiles);\n\n // Remove the mysource.js not needed in Framework.\n foreach ($allFiles as $i => $file) {\n if (basename($file) === 'mysource.js') {\n unset($allFiles[$i]);\n break;\n }\n }\n\n return $allFiles;\n\n }", "title": "" }, { "docid": "7218fbdfb9f0bbfd13a75c7fe35181ae", "score": "0.59402", "text": "function js_path($file = NULL, $module = NULL, $absolute = NULL)\n{\n\t$CI = _get_assets();\n\treturn $CI->asset->js_path($file, $module, $absolute);\n}", "title": "" }, { "docid": "d201361df5ec2103fee0aaa8781e45dc", "score": "0.5937049", "text": "function js_path($filename){\n return _path($filename, 'js');\n }", "title": "" }, { "docid": "d12a3138e58f0f47d7ddd9c5b52ac995", "score": "0.5918176", "text": "private function loadLib() {\n\t\t$this->load->library('javascript');\n\n\t\t$this->load->helper('url');\n\t\t$this->load->helper('html');\n\t}", "title": "" }, { "docid": "1388b8992678b12e7a1a6d8431231e0a", "score": "0.5910978", "text": "public static function getScriptPath()\n {\n $extension = self::_isDevMode() ? 'dev' : 'min';\n\n return self::getPath(\"js/hbg-prime.$extension.js\");\n }", "title": "" }, { "docid": "73c82670c3f45949d167d00d9411898d", "score": "0.58785546", "text": "public function corePluginsPath(){\n $bowerComponent=\"\".$this->getBase_url().\"assets/global/plugins/bower_components/\";\n $js =' <script src=\"'.$bowerComponent.'jquery/dist/jquery.min.js\"></script>\n <script src=\"'.$bowerComponent.'jquery-cookie/jquery.cookie.js\"></script>\n <script src=\"'.$bowerComponent.'bootstrap/dist/js/bootstrap.min.js\"></script>\n <script src=\"'.$bowerComponent.'typehead.js/dist/handlebars.js\"></script>\n <script src=\"'.$bowerComponent.'typehead.js/dist/typeahead.bundle.min.js\"></script>\n <script src=\"'.$bowerComponent.'jquery-nicescroll/jquery.nicescroll.min.js\"></script>\n <script src=\"'.$bowerComponent.'jquery.sparkline.min/index.js\"></script>\n <script src=\"'.$bowerComponent.'jquery-easing-original/jquery.easing.1.3.min.js\"></script>\n <script src=\"'.$bowerComponent.'ionsound/js/ion.sound.min.js\"></script>\n <script src=\"'.$bowerComponent.'bootbox/bootbox.js\"></script>\n <script src=\"'.$bowerComponent.'retina.js/dist/retina.min.js\"></script>';\n return $js;\n }", "title": "" }, { "docid": "a75f4960c8013893e13a0dfa6f01735f", "score": "0.58765113", "text": "public function getJsFiles()\n{\n\t$this->otxt['js_files'] = '';\n\tforeach($this->js_files as $v) $this->otxt['js_files'] .= '<script type=\"text/javascript\" src=\"js/'.$v.'?v='.self::_version.'\"></script>'.PHP_EOL;\n}", "title": "" }, { "docid": "5ccb5a7370aa493bbb52b7bbea97bae7", "score": "0.58530456", "text": "function module_js_path()\n{\n return Assets::assets_url('js', true);\n}", "title": "" }, { "docid": "8dd09fa4668257754a7e90825b328c66", "score": "0.58148164", "text": "protected function _getImageLibraryPath()\n {\n $imgFolder = 'uploads/img-library';\n return $this->get('kernel')->getRootDir() . '/../web/' . $imgFolder;\n }", "title": "" }, { "docid": "d4df2cb9aade39f7e23f9926a14cf48d", "score": "0.57960105", "text": "private function getJsCss (){\n // Add some local CSS resources\n\n // And some local JavaScript resources\n $this->assets->addJs(WEB_URL.'/assets/backend/js/modules/dashboard/index.js?v='.VS_SCRIPT);\n }", "title": "" }, { "docid": "a835821bfd2edf887259f1ff68e5d4c4", "score": "0.5784442", "text": "function getCssImports(){\n\t\t\t\n\t\t\techo '<link rel=\"stylesheet\" href=\"' . substr(dirname(__FILE__), strlen($_SERVER['DOCUMENT_ROOT'])) . '\\css\\jquery.mobile-1.4.3.min.css\">';\n\t\t\techo '<link rel=\"stylesheet\" href=\"' . substr(dirname(__FILE__), strlen($_SERVER['DOCUMENT_ROOT'])) . '\\css\\jqm-demos.css\">';\n\n\t\t}", "title": "" }, { "docid": "8fb3a0af41d74239559c7bf3da6792d0", "score": "0.57331884", "text": "public function getScriptPaths() {\n return $this->getTemplateRepositories();\n }", "title": "" }, { "docid": "0a3de12a8ee1eaefaa80457354c738b0", "score": "0.57309663", "text": "function get_the_js_urls() {\n\n md_get_the_js_urls();\n \n }", "title": "" }, { "docid": "1da80719f5d1384ae1c826f22ae22540", "score": "0.57192886", "text": "protected function getAssetExtjs()\n\t{\n\t\treturn $this->get('path.extjs');\n\t}", "title": "" }, { "docid": "49d4de807c8cd5bb5ea9bcc231d386a4", "score": "0.5718998", "text": "public abstract function getJSFiles();", "title": "" }, { "docid": "030d0952274c953d3b00ab20dda8fb28", "score": "0.56986487", "text": "public function corePluginsCalendarPath(){\n $bowerComponent=\"\".$this->getBase_url().\"assets/global/plugins/bower_components/\";\n $js =' <script src=\"'.$bowerComponent.'jquery/dist/jquery.min.js\"></script>\n <script src=\"'.$bowerComponent.'jquery-cookie/jquery.cookie.js\"></script>\n <script src=\"'.$bowerComponent.'underscore/underscore-min.js\"></script>\n <script src=\"'.$bowerComponent.'bootstrap/dist/js/bootstrap.min.js\"></script>\n <script src=\"'.$bowerComponent.'typehead.js/dist/handlebars.js\"></script>\n <script src=\"'.$bowerComponent.'typehead.js/dist/typeahead.bundle.min.js\"></script>\n <script src=\"'.$bowerComponent.'jquery-nicescroll/jquery.nicescroll.min.js\"></script>\n <script src=\"'.$bowerComponent.'jquery.sparkline.min/index.js\"></script>\n <script src=\"'.$bowerComponent.'jquery-easing-original/jquery.easing.1.3.min.js\"></script>\n <script src=\"'.$bowerComponent.'ionsound/js/ion.sound.min.js\"></script>\n <script src=\"'.$bowerComponent.'bootbox/bootbox.js\"></script>\n <script src=\"'.$bowerComponent.'retina.js/dist/retina.min.js\"></script>';\n return $js;\n }", "title": "" }, { "docid": "cc3c347fabe1e99238f4e9a3e0c7e3c8", "score": "0.5646492", "text": "function getJavascriptImports(){\n\t\t\t\n\t\t}", "title": "" }, { "docid": "fc80b1d262bf7bbfaad3d479f592d5e6", "score": "0.5627362", "text": "function path_js_assets(string $file) : string {\n\t\treturn path_assets(\"js/\".$file.\".js\");\n\t}", "title": "" }, { "docid": "8122bb43a893f46a3a684d1a5fa44a1c", "score": "0.5618372", "text": "function js_get_asset_path($filename){\r\n return get_stylesheet_directory() . \"/\" . THEME_ASSET_DIR . \"/\" . $filename;\r\n}", "title": "" }, { "docid": "3ff4829b78434a46ffbbb60d0eb24e4d", "score": "0.56180984", "text": "function getResourceDirectory();", "title": "" }, { "docid": "f7800521e9e32a69050a556ccd212958", "score": "0.5614188", "text": "protected function getScriptsPath() {\n return $this->getProjectRoot() . '/scripts';\n }", "title": "" }, { "docid": "35969d03cb9acdaa562ef4a89cf91b9e", "score": "0.55956113", "text": "public function getLibPath(): string\n {\n if ($this->name === BBN_APP_NAME) {\n return \\bbn\\Mvc::getLibPath();\n } elseif ($content = $this->getEnvironment()) {\n return $content['lib_path'] . 'bbn\\/';\n }\n\n throw new \\Exception(X::_(\"Impossible to find the libraries path for %s\", $this->name));\n }", "title": "" }, { "docid": "ac8e55a2ffffb485c27da5917adc1320", "score": "0.5590197", "text": "public function getAssetsPath()\n {\n return dirname(__FILE__) . '/assets';\n }", "title": "" }, { "docid": "2fc63aa64a926514449f6b85df1349af", "score": "0.55747086", "text": "public function libraries () : array {\n\t\tforeach ($this->views as $view) {\n\t\t\tforeach ($view->components () as $comp) {\n\t\t\t\t$this->_libraries = array_unique (array_merge ($this->_libraries, $comp->libraries ()));\n\t\t\t}\n\t\t}\n\t\tforeach ($this->_libraries as &$lib) {\n\t\t\t$lib = \\Lib::checkExtension ($lib, 'js');\n\t\t} return $this->_libraries;\n\t}", "title": "" }, { "docid": "7a866388aa7b31e22aa721a7cf00e725", "score": "0.55533206", "text": "function theme_js_files_cool()\n{\n global $_CONF;\n\n return array(\n array(\n 'file' => '/vendor/uikit/js/uikit.js',\n 'footer' => true, // Not required, default = true\n 'priority' => 100 // Not requred, default = 100\n ),\n \n array(\n 'file' => '/layout/' . $_CONF['theme_default'] . '/javascript/script.js',\n 'footer' => true, // Not required, default = true\n 'priority' => 100 // Not required, default = 100\n )\n );\n}", "title": "" }, { "docid": "fb059505015e71f1ec22fa3f7a1a3f5e", "score": "0.5549145", "text": "protected function getScriptPath()\n\t{\n\t\treturn\n\t\t\t$this->getRoot() .\n\t\t\t'/accounts/' . $this->getAccountIniValue('country') .\n\t\t\t'/' . $this->getAccountIniValue('provider') .\n\t\t\t'/main.js'\n\t\t;\n\t}", "title": "" }, { "docid": "85470b98bc00509547329b10e47489d1", "score": "0.55373615", "text": "private function getVendors()\n {\n return trim_directory_path(scandir(base_path('plugins')));\n }", "title": "" }, { "docid": "8a077e569c5ef741db8f0efe990763e8", "score": "0.55255914", "text": "public function scriptPath();", "title": "" }, { "docid": "3265be629785ed5b4041284a71319fb1", "score": "0.55208284", "text": "public static function getCommonFiles()\n {\n return [\n \\XLite\\View\\AView::RESOURCE_JS => ['js/jquery-ui-i18n.min.js'],\n ];\n }", "title": "" }, { "docid": "e72b5f347a23b949026af2485451762b", "score": "0.55186754", "text": "protected function getCommonAssetDir(){\n return dirname(__FILE__) . \"/../common/assets/common\";\n }", "title": "" }, { "docid": "a002019180588dc1299043067c1980f6", "score": "0.5516103", "text": "private function loadLibs()\r\n {\r\n $libFiles = array_slice(scandir(libs_path), 2);\r\n\r\n foreach($libFiles as $lib) {\r\n require libs_path . $lib;\r\n }\r\n }", "title": "" }, { "docid": "b0eb413e3a0b6e359778eb55b942a354", "score": "0.5495108", "text": "function css_path()\n{\n return Assets::assets_url('css');\n}", "title": "" }, { "docid": "930db6c1e8e8ddda824060c6faa4772c", "score": "0.5491952", "text": "public static function getLangJsFileUri(): string {\n\t\tif(self::getLanguage() === null)\n\t\t\tself::init();\n\n\t\treturn self::getLanguageJsDir() . basename(self::getCurrentLanguageFileName()) . '.js';\n\t}", "title": "" }, { "docid": "eea62607e6a3eee96831171a38b1fbca", "score": "0.5489192", "text": "private function after_set_theme()\n {\n if (!defined(\"JS_PATH\")) define(\"JS_PATH\", THEMES_DIR . $this->theme . DS . \"js\");\n if (!defined(\"CSS_PATH\")) define(\"CSS_PATH\", THEMES_DIR . $this->theme . DS . \"css\");\n }", "title": "" }, { "docid": "c3a899aaac3d01f7226f6de522adcfd3", "score": "0.5488566", "text": "private function _get_theme_js() {\n\t\t// Get the path to the JS folder. Store both public (0) and server (1) paths for error checking.\n\t\t$path[0] = $this->_get_theme_url() . \"js/\";\n\t\t// Server path.\n\t\t$path[1] = $this->_get_theme_url(TRUE) . \"js/\";\n\t\t// Compression enabled?\n\t\tif($this->CI->config->board->compression->js) {\n\t\t\t// Compression enabled, we'll be using the master.php file. If it exists.\n\t\t\t// Does it?\n\t\t\tif(file_exists($path[1] . \"master.php\")) {\n\t\t\t\t// Return the public path in an array.\n\t\t\t\treturn array(array(\"BOARD_THEME_JS.URL\" => $path[0] . \"master.php\"));\n\t\t\t} else {\n\t\t\t\t// Error out. This file can't be downgraded to default theme.\n\t\t\t\t$this->CI->error->show('template_js_not_compressible', $this->CI->config->board->themes->name);\n\t\t\t}\n\t\t} else {\n\t\t\t// Compression disabled, use the normal javascript files file.\n\t\t\t// PENDING: Fix it so that it detects plugins.\n\t\t\treturn array(\n\t\t\t\tarray(\"BOARD_THEME_JS.URL\" => $path[0] . \"jquery.js\"),\n\t\t\t\tarray(\"BOARD_THEME_JS.URL\" => $path[0] . \"plugins/jquery.login.js\")\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "bc62be8243c3ae1c02b051c373797c10", "score": "0.5488533", "text": "public static function js_url() {\n\t\tif ( self::$js_url ) {\n\t\t\treturn self::$js_url;\n\t\t}\n\n\t\treturn self::$js_url = self::assets_url().'js/';\n\t}", "title": "" }, { "docid": "22f3cee5d80e9036e9624a30a8fc0e68", "score": "0.54801977", "text": "public function getLibBaseDir(){\n\t\treturn __DIR__;\n\t}", "title": "" }, { "docid": "979df4496e56afc9de4c2b746fdc5a2d", "score": "0.54701644", "text": "function css_path($file = NULL, $module = NULL, $absolute = NULL)\n{\n\t$CI = _get_assets();\n\treturn $CI->asset->css_path($file, $module, $absolute);\n}", "title": "" }, { "docid": "5849008472c58b8959c0d624c06b634a", "score": "0.54373235", "text": "public function CssJsFileUrl ($path = '') {\n\t\t$result = '';\n\t\tif (static::$assetsUrlCompletion) {\n\t\t\t// for static::$app->GetCompiled() equal to: 'PHAR', 'SFU', 'PHP_STRICT_PACKAGE', 'PHP_PRESERVE_PACKAGE', 'PHP_PRESERVE_HDD'\n\t\t\t$result = $this->view->AssetUrl($path);\n\t\t} else {\n\t\t\t// for static::$app->GetCompiled() equal to: '' (development), 'PHP_STRICT_HDD'\n\t\t\t$result = static::$basePath . $path;\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "461d011671270558f58b88c556e9d36b", "score": "0.5432387", "text": "public function setupAssetPaths()\n {\n $addons = array( /*'Block', 'Extension', 'FieldType', */\n 'Module', /*'Tag', */\n 'Theme'\n );\n\n foreach ($addons as $addon) {\n $manager = '\\\\' . $addon;\n\n foreach ($manager::getAll()->active() as $addon) {\n \\Assets::addPaths($addon->loaderNamespace, $addon->path);\n }\n }\n }", "title": "" }, { "docid": "c5263c8e22e65f409eb836ed43cd6e25", "score": "0.54315054", "text": "function get_view_tpl_yui_libs() {\r\n // make html for css and javascript includes\r\n $html = '<script type=\"text/javascript\" src=\"'.$this->cfg->wwwroot.'/lib/yui/yahoo-dom-event/yahoo-dom-event.js\"></script>'.\"\\n\";\r\n $html .= '<script type=\"text/javascript\" src=\"'.$this->cfg->wwwroot.'/lib/yui/dragdrop/dragdrop-min.js\"></script>'.\"\\n\";\r\n $html .= '<script type=\"text/javascript\" src=\"'.$this->cfg->wwwroot.'/lib/yui/utilities/utilities.js\"></script>';\r\n\r\n return $html;\r\n }", "title": "" }, { "docid": "5fcc614f4b1806c852aefada5895061f", "score": "0.54273444", "text": "public function includeJsCssFiles()\n {\n $this->getView()->layoutHeadScript()->appendFile($this->getView()->layoutAsset('jquery.rss.js'));\n }", "title": "" }, { "docid": "78a7590143747feb97894b12634799df", "score": "0.54116994", "text": "public function getAssetsDir()\n\t{\n\t\t$default = $this->getDefaultTheme();\n\t\tif(!$default) {\n\t\t\tthrow new ThemeNotFound(\"Default theme not found.\");\n\t\t}\n\t\treturn $default->getAssetsDir();\n\t}", "title": "" }, { "docid": "acbae303bd888d9008bc78d1087d66fd", "score": "0.5406629", "text": "function loadLibsGlobally()\n{\n\te107::library('load', 'moment.js', 'minified');\n\te107::library('load', 'livestamp.js', 'minified');\n}", "title": "" }, { "docid": "b5f5cf1d9bc1e1d090c98612db19b21b", "score": "0.5396608", "text": "function loadImageLibrary()\n{\n $resources = dirlist(IMAGE_FOLDER_PATH, \"dirs\");\n return $resources;\n}", "title": "" }, { "docid": "991e7e53f7583d324d3cf32a8da37894", "score": "0.5382129", "text": "function library_path($path = '')\n {\n return config('library.scanner.folder').($path ? DIRECTORY_SEPARATOR.$path : $path);\n }", "title": "" }, { "docid": "8e196432f0a3b9e9e2175eeafe5dd7b3", "score": "0.5380356", "text": "public static function jsPath($fileName = '')\n {\n return base_path('themes/'.self::getActiveTheme().'/assets/js').($fileName ? '/'.$fileName : \"\");\n }", "title": "" }, { "docid": "eb2e6fcb3cf5740d2f323e4a66f8c4db", "score": "0.537944", "text": "public function getJavaScripts()\n {\n return array(\n '/ullCorePlugin/js/jq/jquery-min.js', \n '/ullCorePlugin/js/jq/jquery-ui-min.js'\n ); \n }", "title": "" }, { "docid": "548f92da829aeee749f27618eb534664", "score": "0.5356325", "text": "public static function getWidgetFiles()\n\t{\n\t\treturn array(\n\t\t\t'css' => array(\n\t\t\t\t'bootstrap.css',\n\t\t\t\t'font-awesome.css',\n\t\t\t\t'Element/Pagination.css'\n\t\t\t),\n\t\t\t'js' => array(\n\t\t\t\t'libs/jquery-2.0.2.min.js',\n\t\t\t\t'Element/Pagination.js'\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "a7375755ad1b4e9b4e0f2db3616048e0", "score": "0.5355154", "text": "public static function getJavaScriptPath($javaScript = \"\") {\n if($javaScript == \"\") {\n return self::getAssetsPath(\"js\");\n } else {\n return self::getAssetsPath(\"js\").$javaScript.\".js\";\n }\n }", "title": "" }, { "docid": "fb0f971214386e6733c298981a875252", "score": "0.53454226", "text": "function module_css_path()\n{\n return Assets::assets_url('css', true);\n}", "title": "" }, { "docid": "0b4ee6d612f6e8e05b4e97f98e002b23", "score": "0.53358805", "text": "function get_admin_js()\n\t{\n\t\t$scripts = \"\";\n\t\tforeach($this->_admin_js as $js)\n\t\t{\n\t\t\tforeach($this->_hierarchy_theme_abs as $key => $value)\n\t\t\t{\n\t\t\t\tif(file_exists($value.'/'.$this->_default[\"asset\"][\"admin\"].\"js/\".$js))\n\t\t\t\t{\n\t\t\t\t\t$scripts .= '<script type=\"application/javascript\" src=\"'.$this->_cdn_url.$this->_hierarchy_theme_rel[$key].'/'.$this->_default[\"asset\"][\"admin\"].'js/'.$js.'\"></script>';\n\t\t\t\t\tbreak; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tforeach($this->_admin_embd_js as $key => $value)\n\t\t{\n\t\t\t$scripts .= preg_match($this->_script_pattern, $value) ? $value : '<script type=\"application/javascript\" id=\"'.$key.'\">'.$value.'</script>';\n\t\t}\n\t\techo $scripts;\t\t\n\t}", "title": "" }, { "docid": "de1d2fe22cd8fbb361b2b59d701e45b2", "score": "0.53276753", "text": "protected function get_file_locations() {\n\t\t$locations_in_scope = apply_filters( 'as3cf_assets_locations_in_scope_to_scan', array(\n\t\t\t'admin',\n\t\t\t'core',\n\t\t\t'themes',\n\t\t\t'plugins',\n\t\t\t'mu-plugins',\n\t\t) );\n\n\t\t$locations = array();\n\n\t\t// wp-admin directory\n\t\tif ( in_array( 'admin', $locations_in_scope ) ) {\n\t\t\t$locations[] = array(\n\t\t\t\t'path' => ABSPATH . 'wp-admin',\n\t\t\t\t'url' => site_url( '/wp-admin' ),\n\t\t\t\t'type' => 'admin',\n\t\t\t\t'object' => '',\n\t\t\t\t'exclude' => apply_filters( 'as3cf_assets_admin_exclude_dirs', $this->get_exclude_dirs() ),\n\t\t\t);\n\t\t}\n\n\t\t// wp-includes directory\n\t\tif ( in_array( 'core', $locations_in_scope ) ) {\n\t\t\t$locations[] = array(\n\t\t\t\t'path' => ABSPATH . WPINC,\n\t\t\t\t'url' => site_url( '/' . WPINC ),\n\t\t\t\t'type' => 'core',\n\t\t\t\t'object' => '',\n\t\t\t\t'exclude' => apply_filters( 'as3cf_assets_core_exclude_dirs', $this->get_exclude_dirs() ),\n\t\t\t);\n\t\t}\n\n\t\t// Active theme(s)\n\t\tif ( in_array( 'themes', $locations_in_scope ) ) {\n\t\t\t$themes = $this->get_active_themes();\n\t\t\t$locations = array_merge( $locations, $themes );\n\t\t}\n\n\t\t// Active plugins\n\t\tif ( in_array( 'plugins', $locations_in_scope ) ) {\n\t\t\t$plugins = $this->get_plugins();\n\t\t\t$locations = array_merge( $locations, $plugins );\n\t\t}\n\n\t\t// MU plugins\n\t\tif ( file_exists( WPMU_PLUGIN_DIR ) && in_array( 'mu-plugins', $locations_in_scope ) ) {\n\t\t\t$locations[] = array(\n\t\t\t\t'path' => WPMU_PLUGIN_DIR,\n\t\t\t\t'url' => WPMU_PLUGIN_URL,\n\t\t\t\t'type' => 'mu-plugins',\n\t\t\t\t'object' => '',\n\t\t\t\t'exclude' => apply_filters( 'as3cf_assets_mu_plugin_exclude_dirs', $this->get_exclude_dirs() ),\n\t\t\t);\n\t\t}\n\n\t\treturn apply_filters( 'as3cf_assets_locations_to_scan', $locations );\n\t}", "title": "" }, { "docid": "9baec6bab581bdb84a677e733245e8c6", "score": "0.53251016", "text": "protected function loadDependencyAssets()\n {\n $this->addJs('vendor/[email protected]/min/emmet-monaco.min.js');\n $this->addJs('vendor/[email protected]/min/vs/loader.js');\n $this->addJsBundle('js/modelreference.js', 'core');\n $this->addJsBundle('js/modeldefinition.js', 'core');\n }", "title": "" }, { "docid": "6da176ad34ef77bf769d16bffc3d31ac", "score": "0.5324978", "text": "public function includeLibraries(){\r\n\t\t/*JHTML::script( 'custom/prototype/prototype-1.6.0.3.js' );\r\n\t JHTML::script( 'custom/jquery/jquery-1.4.2.min.js' );\r\n\t\tJHTML::script( 'custom/jquery/jquery-ui-1.8.2.custom.min.js' );\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\t//JHTML::stylesheet( 'custom/tablehelper.css' );\r\n\t\t\r\n\t\t//Uploadify\r\n\t\t//JHTML::script( 'custom/uploadify/swfobject.js' );\r\n\t\t//JHTML::script( 'custom/uploadify/jquery.uploadify.v2.1.0.min.js' );\r\n\r\n\t\t\r\n \r\n\t\t\r\n $document->addCustomTag( '<script type=\"text/javascript\">jQuery.noConflict();</script>' );\t\t\r\n\t}", "title": "" }, { "docid": "72660b6e73594cd0ce993c9ae77732c1", "score": "0.53241074", "text": "function plugin_path() {\n return $GLOBALS['PATH']['plugins'];\n}", "title": "" }, { "docid": "2ea1a1b09b3f684c5e03726287da71d8", "score": "0.53216344", "text": "private function register_scripts_and_styles() {\n\t\tif ( is_admin() ) {\n\t\t\t$this->load_file( self::slug . '-admin-script', '/js/admin.js', true );\n\t\t\t$this->load_file( self::slug . '-admin-style', '/css/admin.css' );\n\t\t} else {\n\t\t\t$this->load_file( self::slug . '-script', '/assets/owl.carousel.min.js', true );\n\t\t\t$this->load_file( self::slug . '-style', '/assets/owl.carousel.css' );\n\t\t\t$this->load_file( self::slug . '-style2', '/assets/owl.theme.default.min.css' );\n\t\t} // end if/else\n\t}", "title": "" }, { "docid": "ae2c7f32cc886b5b5550c00be4a1bc23", "score": "0.53185093", "text": "function js_init(){\n //to make inserting the variables easier, I will give them a direct name now\n $url = app(\"lib_url\");\n \n $appurl = app(\"app_url\");\n echo \"\n <script src='$url/scripts/jquery-2.1.0.min.js'></script>\n <script src='$url/scripts/jquery-ui-1.10.4/ui/minified/jquery-ui.min.js'></script>\t\t\n <script src='$url/scripts/jquery.livequery.min.js'></script>\n <script src='$url/scripts/tablesorter/js/jquery.tablesorter.min.js'></script>\n <script src='$url/scripts/tablesorter/js/jquery.tablesorter.widgets.min.js'></script>\n <script src='$url/scripts/tablesorter/addons/pager/jquery.tablesorter.pager.min.js'></script> \t\t\n <script src='$url/scripts/jquery.validate.min.js'></script>\n <script src='$url/scripts/jquery-ui-timepicker-addon.js'></script>\n <script src='$url/scripts/mousetrap.min.js'></script>\n <script src='$url/scripts/core.js'></script>\n <script src='$url/scripts/busy-indicator/busy_indicator.js'></script>\n <script src='$appurl/scripts/jSignature/jSignature.min.js'></script> \n \";\n }", "title": "" }, { "docid": "7db5d361eac9a05027f3451e7180e718", "score": "0.53183657", "text": "private function includeJsFiles(){\n\t\tYii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/testengine.js');\n\t\tYii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/TE_update.js');\n\t\tYii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/TE_render.js');\n\t\tYii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/calculation.js');\n\t\tYii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/TestRunDelegator.js');\n\t\tYii::app()->clientScript->registerCoreScript('jquery');\n\t}", "title": "" }, { "docid": "6eee48d7f2282a3d2cda082866c929a1", "score": "0.5312872", "text": "function renderJsCss() {\n\t\t$path = $_SERVER['REQUEST_URI'];\n\t\tif (! preg_match('/\\/albums\\/.+/', $path)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$js_path = $this->get_path() . '/js/plugin.js';\n\n\t\techo <<<HTML\n\t<koken:if true=\"settings.use_lightgallery\">\n\t\t<script src=\"$js_path\"></script>\n\t</koken:if>\nHTML;\n\t}", "title": "" }, { "docid": "b3c4861ee1c7d8616a8286ee5562457b", "score": "0.5311629", "text": "public function getContentJSPath() {\n $route = get_called_class()::route();\n $route = preg_replace('/:\\\\w*\\\\/?/', '', $route);\n \n $l = strrpos($route, '/');\n if ($l == strlen($route) - 1) $route = substr($route, 0, $l);\n return $route . \"/src\";\n }", "title": "" }, { "docid": "febfcd794dd1df68783cf7a615823a96", "score": "0.53070354", "text": "public static function getViewScriptDirectory()\n\t{\n\t\treturn self::$_viewScriptDir;\n\t}", "title": "" }, { "docid": "fcb8ed5f80e12c7f419ea21fe350396f", "score": "0.5300269", "text": "function get_arrange_tpl_yui_libs() {\r\n // get libpath and resizelib\r\n if (file_exists(\"{$this->cfg->libdir}/yui/resize/resize-min.js\")) {\r\n $libdir = $this->cfg->wwwroot.\"/lib\";\r\n $resizelib = \"resize-min.js\";\r\n }\r\n else {\r\n // this is for the yui beta version included in this question type\r\n $libdir = $this->cfg->wwwroot.\"/question/type/\".$this->ddqtype->name();\r\n $resizelib = \"resize-beta-min.js\";\r\n }\r\n // make html for css and javascript includes\r\n $html = '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$libdir.'/yui/resize/assets/skins/sam/resize.css\" />'.\"\\n\";\r\n $html .= '<script type=\"text/javascript\" src=\"'.$libdir.'/yui/utilities/utilities.js\"></script>'.\"\\n\";\r\n $html .= '<script type=\"text/javascript\" src=\"'.$libdir.'/yui/dragdrop/dragdrop-min.js\"></script>'.\"\\n\";\r\n $html .= '<script type=\"text/javascript\" src=\"'.$libdir.'/yui/resize/'.$resizelib.'\"></script>';\r\n\r\n return $html;\r\n }", "title": "" }, { "docid": "42e4b641c2b13f010fd11d3e53d4eed7", "score": "0.5298", "text": "function js_get_asset_uri($filename){\r\n return get_stylesheet_directory_uri() . \"/\" . THEME_ASSET_DIR . \"/\" . $filename;\r\n}", "title": "" }, { "docid": "6a2dd9f0b2d6ef5692e17d903cab0cc1", "score": "0.52929366", "text": "protected function _getImageLibraryUrl()\n {\n $imgFolder = 'uploads/img-library';\n return $this->container->get('templating.helper.assets')->getUrl($imgFolder);\n }", "title": "" }, { "docid": "40bb326ae997441782bf54c3ed07b2ff", "score": "0.5291227", "text": "public function libPath(): ?string\n {\n return $this->_current['lib_path'] ?? null;\n }", "title": "" }, { "docid": "f66b9a9395cc7cf50479099b7bcce05a", "score": "0.5288706", "text": "public function getLibraries();", "title": "" }, { "docid": "6aa7be03b561f32b7f04971f2a6dd6bf", "score": "0.5277807", "text": "static public function getJS(){\n \t\t$js = \"<script language='javascript' src='/js/window_lib.js'></script> \".\n \"<script language='javascript' src='/js/window_ext.js'></script> \" .\n \"<script language='javascript' src='/js/photos.js'></script>\" .\n \"<script type='text/javascript' src='/js/swfupload/swfupload.js'></script>\".\n\t\t\"<script type='text/javascript' src='/js/swfupload/handlers.js'></script>\" ;\n\t\treturn $js;\n }", "title": "" }, { "docid": "f56c77d09836f264625afa3ca38ba82c", "score": "0.5272134", "text": "protected function getJSPath(){\n return $this->jsPath;\n }", "title": "" }, { "docid": "3613b52804e9502e276b696a75394ad0", "score": "0.5270283", "text": "function diy_base_assets() {\n\t\treturn diy_config('baseURL') . '/' . diy_config('base_template') . '/' . diy_config('template');\n\t}", "title": "" }, { "docid": "dcc429afed16e4b64ae6a921a5b72f0b", "score": "0.52693623", "text": "protected function registerJsFiles() {\n foreach( $this->assetsInfo as $info ){\n $jsFile = $info['name'];\n if (substr($jsFile, -strlen(\".js\")) == \".js\"){\n $jsPath = $info['publishPath'] . \"/\" . $jsFile;\n Yii::app()->getClientScript()->registerScriptFile($jsPath, $this->jsPublishPosition);\n }\n }\n }", "title": "" }, { "docid": "6f605825bac7a0cfd237d749edae9e87", "score": "0.5238891", "text": "protected function get_js_path() {\n\t\tglobal $woocommerce;\n\t\t// @var array An array of WooCommerce version => path pairs. The path will\n\t\t// be used to load the appropriate scripts for the active WooCommerce version\n\t\t$js_paths = array(\n\t\t\t'2.3' => 'WC23',\n\t\t\t'2.4' => 'WC24',\n\t\t);\n\n\t\tkrsort($js_paths);\n\n\t\t$result = null;\n\t\tforeach($js_paths as $wc_version => $path) {\n\t\t\tif(version_compare($woocommerce->version, $wc_version, '>=')) {\n\t\t\t\t$result = $path;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "4d942a068aeb3151b9402313436700c7", "score": "0.52286273", "text": "protected function getDest($path='')\n {\n return resource_path(\"js/$path\");\n }", "title": "" }, { "docid": "80576f648f9424f2d07de04c8f9eed00", "score": "0.522441", "text": "function stylesheet_path( $source )\n{\n\treturn compute_public_path( $source, 'stylesheets', 'css' );\n}", "title": "" }, { "docid": "1e0caafc3b9c2eea4b44f7306a14e7ce", "score": "0.52233946", "text": "private function register_scripts_and_styles() {\n\t\tif ( is_admin() ) {\n\t\t\t$this->load_file( self::slug . '-admin-script', '/js/admin.js', true );\n\t\t\t$this->load_file( self::slug . '-admin-style', '/css/admin.css' );\n\t\t} else {\n\t\t\t$this->load_file( self::slug . '-script', '/js/widget.js', true );\n\t\t\t$this->load_file( self::slug . '-style', '/css/widget.css' );\n\t\t} // end if/else\n\t}", "title": "" }, { "docid": "440baf30a14bdfc45339177c206edb6a", "score": "0.5216801", "text": "function beaver_extender_get_stylesheet_location( $type, $root = false ) {\r\n \r\n\t$uploads = wp_upload_dir();\r\n\r\n if ( beaver_extender_get_settings( 'protocol_relative_urls' ) ) {\r\n \r\n $base_url = $uploads['baseurl'];\r\n $base_dir = $uploads['basedir'];\r\n $dir = ( 'url' == $type ) ? str_replace( 'http:', '', $base_url ) : $base_dir;\r\n \r\n } else {\r\n \r\n $dir = ( 'url' == $type ) ? $uploads['baseurl'] : $uploads['basedir'];\r\n \r\n }\r\n \r\n\t$sub_dir = $root ? '/beaver-extender/' : '/beaver-extender/plugin/';\r\n\r\n\treturn apply_filters( 'beaver_extender_get_stylesheet_location', $dir . $sub_dir );\r\n\t\r\n}", "title": "" }, { "docid": "126c7339cf0367821a2c43f0ecc3193c", "score": "0.52129304", "text": "function laragon_install_path() {\n\treturn laragon_toolkit_paths( 'laragon_install_path' );\n}", "title": "" }, { "docid": "9fe746fa5c9c4a626979a9b28497d0c5", "score": "0.52123684", "text": "public function getPaths()\n\t{\n\t\t$paths = array();\n\t\t$baseDir = $this->kernel->getThemeDir();\n\t\t$themes = $this->getThemeHierachy();\n\t\tforeach ($themes as $theme)\n\t\t{\n\t\t\t$paths[] = $baseDir . $theme . \"/\";\n\t\t}\n\t\treturn $paths;\n\t}", "title": "" }, { "docid": "ccac40e62872c26752404466287fcc0c", "score": "0.5198023", "text": "private function includeDropZoneAssets()\n {\n $css = 'assets/dropzone/' . $GLOBALS['TL_ASSETS']['DROPZONE'] . '/css/dropzone.min.css|static';\n $javascript = 'assets/dropzone/' . $GLOBALS['TL_ASSETS']['DROPZONE'] . '/js/dropzone.min.js|static';\n\n $GLOBALS['TL_CSS'][md5($css)] = $css;\n\n $GLOBALS['TL_JAVASCRIPT'][md5($javascript)] = $javascript;\n\n Controller::loadLanguageFile('tl_files');\n }", "title": "" }, { "docid": "99136aeb07146d793e65b0a14cdbbe36", "score": "0.5197734", "text": "public function cssSearchPath(){\n $adminCSS=\"\".$this->getBase_url().\"assets/admin/css/\";\n $css =' <link href=\"'.$adminCSS.'reset.css\" rel=\"stylesheet\">\n <link href=\"'.$adminCSS.'layout.css\" rel=\"stylesheet\">\n <link href=\"'.$adminCSS.'components.css\" rel=\"stylesheet\">\n <link href=\"'.$adminCSS.'plugins.css\" rel=\"stylesheet\">\n <link href=\"'.$adminCSS.'themes/php.theme.css\" rel=\"stylesheet\" id=\"theme\">\n <link href=\"'.$adminCSS.'pages/search-basic.css\" rel=\"stylesheet\">\n <link href=\"'.$adminCSS.'custom.css\" rel=\"stylesheet\">';\n return $css;\n }", "title": "" }, { "docid": "0b8951af106fba3683818563cf04ce98", "score": "0.5196068", "text": "function set_plugin_path() {\n\t$plugin_path = plugins_url();\n\techo '<script type=\"text/javascript\">' . 'set_plugin_path(\\'' . $plugin_path . '\\');' .'</script>';\n}", "title": "" }, { "docid": "51cbf39603cbfaf24f976f22b81e318d", "score": "0.5194258", "text": "function loadLibraries() {\r\n\t\tglobal $clientMode;\r\n\t\tglobal $config;\t\t\r\n\t\tglobal $workingFolder;\r\n\r\n\t\tswitch ($clientMode) {\r\n\r\n\t\t\tcase 'rest_api':\r\n\t\t\tdefault:\r\n\t\t\t\t$libList\t= (isset($config['resi']['library']))\r\n\t\t\t\t\t? $config['resi']['library']\r\n\t\t\t\t\t: array()\r\n\t\t\t\t;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t$ext \t= (isset($libList['ext']))\r\n\t\t\t? $libList['ext']\r\n\t\t\t: 'php'\r\n\t\t;\r\n\r\n\t\t$folder = (isset($libList['folder']))\r\n\t\t\t? $workingFolder.'/sys/'.$libList['folder']\r\n\t\t\t: null\r\n\t\t;\r\n\r\n\t\tif (isset($libList['ext'])) \tunset($libList['ext']);\r\n\t\tif (isset($libList['folder']))\tunset($libList['folder']);\r\n\r\n\t\tksort($libList);\r\n\r\n\t\tforeach ($libList as $lib) {\r\n\t\t\t$path \t\t\t= realpath(\"$folder/$lib.$ext\");\r\n\t\t\tif (!$path) \tcontinue;\r\n\r\n\t\t\t$included\t\t= include($path);\r\n\t\t\tif (!$included)\tcontinue;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "7b26209e53f1c930a62e960f7beddcf6", "score": "0.5193263", "text": "public function getJavaScripts()\n {\n $js = array(\n $this->getOption('uploadify_path') . '/swfobject.js',\n $this->getOption('uploadify_path') . '/jquery.uploadify.v2.1.0.min.js'\n );\n\n if($this->getOption('include_jquery'))\n $js[] = \"http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js\";\n \n return $js;\n }", "title": "" }, { "docid": "887cf9d1b475b287a72ba8de12a55b0b", "score": "0.5185207", "text": "private function _javascripts() {\n $login_javascripts = \"\\n\";\n //$this->_browser_specific_stylesheet();\n\n $javascripts .= '<script type=\"text/javascript\">var BASEURL = \"' . BASEURL . '\"; </script>' . \"\\n\";\n\n foreach ($this->javascripts as $name => $file) {\n $javascripts .= '<script src=\"' . $this->javascript_path . $file . '\" type=\"text/javascript\" charset=\"utf-8\"></script>' . \"\\n\";\n }\n if (count($this->external_js) > 0) {\n foreach ($this->external_js as $name => $url) {\n $javascripts .= '<script type=\"text/javascript\" id=\"' . $name . '\" src=\"' . $url . '\"></script>' . \"\\n\";\n }\n }\n\n return $javascripts;\n }", "title": "" }, { "docid": "fe5222f0ca58bbb3804613ac85c977f2", "score": "0.51725996", "text": "public static function runtimeScriptUrls(): array {\n\t\treturn [\"js/TabbedView.js\"];\n\t}", "title": "" }, { "docid": "0dfa2b2cec7124816576d9a34a38a33e", "score": "0.5171005", "text": "protected function importJsCss()\n {\n // JS\n $this->externalJS('//img.echosting.cafe24.com/js/suio.js');\n $this->externalJS('//img.echosting.cafe24.com/js/calendar/dateUtil.js');\n $this->UIPackage->addPlugin('calendar');\n $this->importJS('app');\n\n // CSS\n $this->externalCSS('//img.echosting.cafe24.com/css/suio.css');\n $this->importCSS('app');\n }", "title": "" } ]
26cf1facd314ae8e38c2d931f682598d
/ Minimize button using id
[ { "docid": "9ee2bf6f3c959f6c93483cdae8f6bb41", "score": "0.67477375", "text": "function minimizeButton($id, $title = null)\n{\n return '<div class=\"input-group pull-right\"><button type=\"button\" class=\"btn btn-default btn-xs showToolTip focusInput\" title=\"Show/Hide ' . $title . '\" data-target=\"#' . $id . '\" data-toggle=\"collapse\" ><span class=\"glyphicon glyphicon-menu-down\"></span></button></div><div class=\"clearfix\"></div>';\n}", "title": "" } ]
[ { "docid": "9c0631d9f0bfb6af93d7028f29488a38", "score": "0.5209292", "text": "function tm_dismiss_button($id) {\n\n echo \"<input type=\\\"button\\\" onclick=\\\"document.getElementById('\".$id.\"').style.display = 'none';\\\" value=\\\"Dismiss\\\" />\";\n}", "title": "" }, { "docid": "20adacd424838e42bfa88ba2f9c9accf", "score": "0.4987056", "text": "public function small()\n {\n $this->mSmall = true;\n $this->mClasses[] = 'btn-xs';\n return $this;\n }", "title": "" }, { "docid": "1660043e6ed45e0a026b9c97e6cf8082", "score": "0.49050757", "text": "public function maximizeWindow($name = null)\n {\n throw new UnsupportedDriverActionException('Window maximize is not supported by %s', $this);\n }", "title": "" }, { "docid": "a09e4cf083b3a4176f72c4d539df6cdb", "score": "0.4886068", "text": "public function setFocus($id) {\n $this->addAction(array('action' => 'FOCUS', 'id' => $id));\n }", "title": "" }, { "docid": "6b517269363b48a6ae3e24575acfc2e3", "score": "0.48453605", "text": "public function page_header_mobile_button() {\n\t\t?>\n\t\t<button class=\"top-page__mobile-button c-mobile-btn\">\n\t\t\t<span class=\"c-mobile-btn\">\n\t\t\t\t<span class=\"c-mobile-btn__line\"></span>\n\t\t\t</span>\n\t\t</button>\n\t\t<?php\n\t}", "title": "" }, { "docid": "43e3e4f6dad92722974ced1d57563884", "score": "0.48212948", "text": "public function getWysiwygElementHtml($id)\r\n {\r\n $html = Mage::getSingleton('core/layout')\r\n ->createBlock('adminhtml/widget_button', '', array(\r\n 'label' => Mage::helper('catalog')->__('Show / Hide Editor'),\r\n 'type' => 'button',\r\n 'class' => 'scalable show-hide',\r\n 'onclick' => 'wysiwygToggle(\\''.$id.'\\')'\r\n ))->toHtml();\r\n \r\n return $html;\r\n }", "title": "" }, { "docid": "398ef530d09b4a0d9523a806986c377f", "score": "0.47722566", "text": "function collapse_icon( $p_name ) {\r\n\t\tif ( OFF == config_get( 'use_javascript' ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tglobal $g_open_collapse_section;\r\n\r\n\t\tif ( $g_open_collapse_section === true ) {\r\n\t\t\t$t_icon = 'minus.png';\r\n\t\t\t$t_alt = '-';\r\n\t\t} else {\r\n\t\t\t$t_icon = 'plus.png';\r\n\t\t\t$t_alt = '+';\r\n\t\t}\r\n\r\n\t\techo \"<a href=\\\"\\\" onclick=\\\"ToggleDiv( '$p_name', g_div_$p_name ); return false;\\\"\r\n\t\t\t><img border=\\\"0\\\" src=\\\"images/$t_icon\\\" alt=\\\"$t_alt\\\" /></a>&nbsp;\";\r\n\t}", "title": "" }, { "docid": "6fc7f3a921aa15d802d00b4e150fe6fb", "score": "0.47539034", "text": "function storefront_child_primary_navigation_mini_menu() { ?>\n\t\t<button class=\"menu-toggle\" aria-controls=\"site-navigation\" aria-expanded=\"false\"><span><?php echo esc_attr( apply_filters( 'storefront_menu_toggle_text', __( 'Menu', 'Storefront-Child' ) ) ); ?></span></button>\n\t<?php\n\t}", "title": "" }, { "docid": "9a868cc4c3f651df0f7fc549c4be9aeb", "score": "0.47313148", "text": "public final function setUpdate()\n {\n $this->_buttonName = 'update';\n }", "title": "" }, { "docid": "f600ad9d06a09145f8539cd390667944", "score": "0.47178227", "text": "public function edit($id)\n {\n $txt = 'DASHBOARD - Управление персоналом - Редактирование должности с id='.$id;\n echo '<b>' .$txt. '</b>';\n echo '</BR></BR>' . __METHOD__;\n }", "title": "" }, { "docid": "e39e39f8ed1e565123995be0217bb6ed", "score": "0.46861866", "text": "function display_button($id)\r\n {\r\n echo \"<input type='button' value='Search' id='$id'>\";\r\n }", "title": "" }, { "docid": "e81d8f3e21f44c260a57bc4af948e849", "score": "0.46673164", "text": "public abstract function obtnEsquemas();", "title": "" }, { "docid": "2c44ffbfed5b05e0b79e0327aee2cd09", "score": "0.4666304", "text": "public final function setEdit()\n {\n $this->_buttonName = 'edit';\n }", "title": "" }, { "docid": "761cf96b8dbb1941783c0713043b2a9b", "score": "0.46616006", "text": "public function windowsAction()\n {\n $pageId = \"windows\";\n }", "title": "" }, { "docid": "ada6a7d395612bbc897f956e5b963292", "score": "0.4649085", "text": "function SW_ButtonWidget() {\n parent::WP_Widget(false, $name = 'Push通知ボタン');\n }", "title": "" }, { "docid": "383a8f2360907dd3cf0e2e3cfc228242", "score": "0.46463284", "text": "function registerApprove($id = 0) {\n $this->modal(\"approveRegisterModal\");\n }", "title": "" }, { "docid": "2ce2eba9df4a15dbccfe4924290d20c1", "score": "0.4637747", "text": "public function admin_view($id){\n\t\t$this->layout = 'FancyBox/fancy_box_popup';\n\t\t$reqArr = $this->PremiumRequest->findById($id);\n\t\t$this->set('requestArr', $reqArr);\n\n\t\t//change the viewed status\n\t\tif($reqArr['PremiumRequest']['viewed'] == '0'){\n\t\t\t$saveData['id'] = $reqArr['PremiumRequest']['id'];\n\t\t\t$saveData['viewed'] = '1';\n\t\t\t$this->PremiumRequest->save($saveData, false);\n\t\t}\n\t}", "title": "" }, { "docid": "5792e04340e9ea9ea0d905e8928354bd", "score": "0.46215737", "text": "public function setButtonEvent($id){\n\t\t$this->btnExeUpload = $id;\n\t}", "title": "" }, { "docid": "bb12cadfea96485f0e098c12a970a3a1", "score": "0.4570977", "text": "function display_edit_button($admin)\n{\n\tif ($admin == TRUE) {\n\t\t?>\n\t\t\t<span id=\"edit-button\" onclick=\"window.location.href='admin-edit-project.php?id=<?php echo $_GET['id'] ?>'\">\n\t\t\t\tEdit\n\t\t\t\t<img src=\"data/home/edit.png\" style=\"width:20px\"></span>\n\t\t<?php\n\t}\n}", "title": "" }, { "docid": "049a22828bb10e3a6dcece69ed21c4d0", "score": "0.45640698", "text": "public function show(Button $button)\n {\n //\n }", "title": "" }, { "docid": "049a22828bb10e3a6dcece69ed21c4d0", "score": "0.45640698", "text": "public function show(Button $button)\n {\n //\n }", "title": "" }, { "docid": "c9b2addc3f42e554505d7bfc9e6f552a", "score": "0.45488444", "text": "function addFinishButton(){\n\t\t$this->finish=$this->addButton('Finish');\n\t}", "title": "" }, { "docid": "96529f4c1046bfaec760da6cade154e9", "score": "0.4545868", "text": "public function updateShowModal($id)\n {\n $this->resetValidation();\n $this->limpiar();\n $this->modalId = $id;\n $this->modalFormVisible = true;\n $this->loadModel();\n }", "title": "" }, { "docid": "9ce4800b3eb957a17b17724823d72687", "score": "0.45318818", "text": "private function Minimize_Image($pathToImages, $fname, $thumb = \"150\", $choice ='width', $thumbnail = false)\n {\n\n if ($fname == '') return;\n if (!is_writeable($pathToImages))\n {\n echo \"<script> alert('Error - Path #1 is not writeable! Exiting now');</script>\\n\";\n exit;\n }\n $thumbClass = new Thumbnail($pathToImages.$fname);\n if ($thumbnail === true)\n {\n $pathToImages = str_replace('\\/\\/', '\\/', $pathToImages.DS.'thumbnails');\n if (!is_writeable($pathToImages))\n {\n echo \"<script> alert('Error - Thumbnail Path is not writeable! Exiting now');</script>\\n\";\n exit;\n }\n }\n $height = $thumbClass->getCurrentHeight();\n $width = $thumbClass->getCurrentWidth();\n // echo \"height is $height and width is $width\"; exit;\n // calculate thumbnail size\n if ($choice == 'width') {$new_width = $thumb;\n $new_height = floor( $height * ( $thumb / $width ) );}\n else {$new_height = $thumb;\n $new_width = floor( $width * ( $thumb / $height ) );}\n $thumbClass->resize($new_width, $new_height);\n $thumbClass->save($pathToImages.$fname, 100);\n\n}", "title": "" }, { "docid": "5920b9a01c77669279f265bf34c17090", "score": "0.4519575", "text": "public function addMuutWidgetsHelpAction() {\n\t\t\tadd_action('admin_head', array( $this, 'addMuutWidgetsHelp' ) );\n\t\t}", "title": "" }, { "docid": "e1c8e48bd56669ebfee9e47c9a338248", "score": "0.45081636", "text": "function setFocus($id) {\n\tprint(\"<script type=\\\"text/javascript\\\">\\n\");\n\tprint(\"//<![CDATA[\\n\");\n\tprint(\"document.getElementById(\\\"$id\\\").focus();\\n\");\n\tprint(\"//]]>\\n\");\n\tprint(\"</script>\\n\");\n}", "title": "" }, { "docid": "081a64d89c91bd90a02d4c8b46816ac7", "score": "0.45041126", "text": "protected function addToolBar() \n\t{\n\t\n\t\t$jinput = JFactory::getApplication()->input;\n $jinput->set('hidemainmenu', true);\n $jinput->set('pid', $this->project_id);\n \n $isNew = $this->item->id ? $this->title = JText::_('COM_SPORTSMANAGEMENT_ROUND_EDIT') : $this->title = JText::_('COM_SPORTSMANAGEMENT_ROUND_NEW');\n $this->icon = 'round';\n \n\tparent::addToolbar();\n \n\n\t}", "title": "" }, { "docid": "aebd757fedbfb32c79dda30d42b75ac5", "score": "0.44943103", "text": "function jbst_wpec_view_switch_button() {\r\n\t\tif (!is_product()){\r\n\t\t\techo '\r\n\t\t\t<div id=\"product-view-switch\" class=\"btn-group pull-right\">\r\n\t\t\t\t<a id=\"product-list-view\" class=\"btn btn-default btn-large active\" rel=\"tooltip\" title=\"List View\"><i class=\"glyphicon glyphicon-list\"></i></a>\r\n\t\t\t\t<a id=\"product-grid-view\" class=\"btn btn-default btn-large\" rel=\"tooltip\" title=\"Grid View\" ><i class=\"glyphicon glyphicon-th\"></i></a>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"clear\"></div>\r\n\t\t\t<script>\r\n\t\t\tjQuery(document).ready(function($) {\r\n\t\t\t$(\"#product-list-view\").click(function() {\r\n\t\t\t $(\"#default_products_page_container\").addClass(\"jbst-list-view\");\r\n\t\t\t $(\"#default_products_page_container\").removeClass(\"jbst-grid-view\");\r\n\t\r\n\t\t\t $(\"#product-list-view\").addClass(\"active\");\r\n\t\t\t $(\"#product-grid-view\").removeClass(\"active\");\r\n\t\t\t});\r\n\t\t\t$(\"#product-grid-view\").click(function() {\r\n\t\t\t $(\"#default_products_page_container\").addClass(\"jbst-grid-view\");\r\n\t\t\t $(\"#product-grid-view\").addClass(\"active\");\r\n\t\t\t $(\"#product-list-view\").removeClass(\"active\");\r\n\t\t\t \t var highestCol = Math.max($(\".jbst-grid-view .prodtitle\").height(),$(\".jbst-grid-view .prodtitle\").height());\r\n\t\t $(\".jbst-grid-view .prodtitle\").height(highestCol);\r\n\t\t\t});\r\n\t\t\t});\r\n\t\t\t</script>\r\n\t\t\t<style>\r\n\t\t\t#product-view-switch {margin-bottom:30px;}\r\n\t\t\t.jbst-grid-view .default_product_display .imagecol {float:none;margin-left:0;}\r\n\t\t\t\r\n\t\t\t.jbst-grid-view .default_product_display {width:32%;margin-right:2%;float:left;border-bottom:0px;}\r\n\t\t\t.jbst-grid-view .default_product_display:nth-child(3n+3) {margin-right:0;float:left;}\r\n\t\r\n\t\t\t.jbst-grid-view.two-column .default_product_display {width:49%;margin-right:2%;float:left;border-bottom:0px;}\r\n\t\t\t.jbst-grid-view.two-column .default_product_display:nth-child(2n+2) {margin-right:0;float:left;}\r\n\t\t\t\r\n\t\t\t.jbst-grid-view.four-column .default_product_display {width:23.5%;margin-right:2%;float:left;border-bottom:0px;}\r\n\t\t\t.jbst-grid-view.four-column .default_product_display:nth-child(4n+4) {margin-right:0;float:left;}\r\n\t\t\t\r\n\t\t\t.jbst-grid-view.five-column .default_product_display {width:18.4%;margin-right:2%;float:left;border-bottom:0px;}\r\n\t\t\t.jbst-grid-view.five-column .default_product_display:nth-child(5n+5) {margin-right:0;float:left;}\r\n\t\r\n\t\t\t.jbst-grid-view .productcol {display:none;}\r\n\t\t\t.jbst-grid-view .default_product_display h2.prodtitle {margin-bottom: 10px;margin-left: 4px;font-size:16px;margin-bottom:6px;line-height:1;}\r\n\t\t\t</style>\r\n\t\t\t';\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "11a9e86e70423a9e4ef2bb05c141981c", "score": "0.4489957", "text": "public function edit($id)\n {\n // No GUI available\n }", "title": "" }, { "docid": "d26389a1cf632e490d2ca6ef1736e35d", "score": "0.44889107", "text": "function Image_Button_Widget(){\n\t\n\t\t/* Check if Hybrid-core framework is active */\n\t\tif( class_exists( 'Hybrid' ) ){\n\t\t\t/* Set the widget prefix */\n\t\t\t$this->prefix = hybrid_get_prefix();\n\t\t\t\n\t\t\t/* Set the widget textdomain. */\n\t\t\t$this->textdomain = hybrid_get_parent_textdomain();\n\t\t} else {\n\t\t\t$this->prefix = 'mobility21';\n\t\t\t$this->textdomain = 'mobility21';\n\t\t}\n\t\t\n\t\t$widget_options = array(\n\t\t\t\t\t\t'classname' => 'image-button',\n\t\t\t\t\t\t'description' => esc_html__( 'Displays an image button and can link to a URL when clicked.', $this->textdomain ) \n\t\t\t\t\t);\n\t\t\n\t\t$control_options = array(\n\t\t\t\t\t\t'height' => '300',\n\t\t\t\t\t\t'width' => '250',\n\t\t\t\t\t\t'id_base' => \"{$this->prefix}-image-button\", esc_attr__( 'Image Button', $this->textdomain )\n\t\t\t\t\t);\n\t\t\n\t\t$this->WP_Widget( \"{$this->prefix}-image-button\", esc_attr__( 'Mobility Image Button', $this->textdomain ), $widget_options, $control_options );\n\t}", "title": "" }, { "docid": "caf15b1c4b4f50a18c1c0a27718151c9", "score": "0.44850096", "text": "function ChangePlan($intId) {\n\t\t$this->strContextMenuLabel = \"\";\n\n\t\t// Setup data to send\n\t\t$arrData['Service']['Id'] = $intId;\n\n\t\t// Convert to JSON notation\n\t\t$strJsonCode = Json()->encode($arrData);\n\n\t\treturn \"javascript:Vixen.Popup.ShowAjaxPopup(\\\"ChangePlanPopupId\\\", \\\"medium\\\", null, \\\"Service\\\", \\\"ChangePlan\\\", $strJsonCode)\";\n\t}", "title": "" }, { "docid": "8fa6f5074017e7a5c0713a07800b53a4", "score": "0.4484332", "text": "public function layoutShow(){\n\t\t$this->layout_on = true;\n\t}", "title": "" }, { "docid": "b070b462c9499cd7b5c78a33b34891c6", "score": "0.44811013", "text": "function wpg1_g1button($size = 'standart', $pid = NULL)\n{\n global $post;\n if(substr($pid, 0, 4) == 'http') {\n $plink = $pid;\n } else {\n if($pid) $plink = get_permalink($pid);\n else $plink = get_permalink($post->ID);\n }\n return '<g:plusone size=\"'.$size.'\" href=\"'.$plink.'\"></g:plusone>';\n}", "title": "" }, { "docid": "20b344090a1ef4c98344c7cc39c0487b", "score": "0.44755557", "text": "function smarty_cms_function_startExpandCollapse($params, &$smarty)\n{\n\tstatic $firstExpandCollapse = true;//only gets set one time per page\n\t\n\tglobal $gCms;\n\t$config = $gCms->GetConfig();\n\n\tif (!empty($params['id']) && !empty($params['title'])) {\n\t\t$id = $params['id'];\n\t\t$title = $params['title'];\n\t}\n\telse {\n\t\techo 'Error: The expand/collapse plugin requires that both parameters (id,title) are used.';\n\t\treturn;\n\t}\n\n\tif ($firstExpandCollapse) {\n\t\techo '<script type=\"text/javascript\" language=\"javascript\" src=\"'.$config['root_url'].'/lib/helparea.js\"></script>';\n\t\t$firstExpandCollapse = false;\n\t}\n\t$url = cms_htmlentities($_SERVER['REQUEST_URI']);\n\t$url = str_replace('&amp;','***',$url);\n\t$url = str_replace('&', '&amp;', $url);\n\t$url = str_replace('***','&amp;',$url);\n\t//$url = str_replace('&', '&amp;', $_SERVER['REQUEST_URI']);\n\techo '<a href=\"'. $url .'#'. $id .'\" onclick=\"expandcontent(\\''.$id.'\\')\" style=\"cursor:hand; cursor:pointer\">'.$title.'</a><br />\n\t<div id=\"'.$id.'\" class=\"expand\">';\n}", "title": "" }, { "docid": "81bd6926a9baa3b4228389a4a1faa46f", "score": "0.44753847", "text": "public function windowsselectionAction()\n {\n $pageId = \"windowsselection\";\n }", "title": "" }, { "docid": "cf1b09ae18f3caef182688f833c12dae", "score": "0.44751036", "text": "function shortcode_insert_button()\n\t\t\t{\n\t\t\t\t$this->config['name']\t\t= '1/1';\n\t\t\t\t$this->config['icon']\t\t= AviaBuilder::$path['imagesURL'].\"sc-full.png\";\n\t\t\t\t$this->config['tab']\t\t= __('Layout Elements', 'avia_framework' );\n\t\t\t\t$this->config['order']\t\t= 100;\n\t\t\t\t$this->config['target']\t\t= \"avia-section-drop\";\n\t\t\t\t$this->config['shortcode'] \t= 'av_one_full';\n\t\t\t\t$this->config['html_renderer'] \t= false;\n\t\t\t\t$this->config['tinyMCE'] \t= array('instantInsert' => \"[av_one_full first]Add Content here[/av_one_full]\");\n\t\t\t\t$this->config['tooltip'] \t= __('Creates a single full width column', 'avia_framework' );\n\t\t\t\t$this->config['drag-level'] = 2;\n\t\t\t\t$this->config['drop-level'] = 2;\n\t\t\t\t}", "title": "" }, { "docid": "46373181757c8ecac0020805d666f1a3", "score": "0.4473324", "text": "function msv_admin_editbtn($selector, $section, $table) {\n if (!msv_check_accessuser(\"admin\")) return false;\n\n\n\n $edit_mode = msv_get_config(\"edit_mode\");\n if (!$edit_mode) return false;\n\n msv_include_js(\"\n$(document).ready(function() {\n $('\".$selector.\"').hover(function() {\n $(this).addClass('editor-inline-block').prepend('<a href=\\\"/admin/?section=\".$section.\"&table=\".$table.\"&edit='+$(this).attr('data-id')+'\\\" id=\\\"admin-edit-btn\\\">\"._t(\"btn.click_to_edit\").\"</a>');\n $('#admin-edit-btn').addClass('admin-edit-overlay btn btn-danger').on('click', function(e){\n });\n }, function() {\n $(this).removeClass('editor-inline-block');\n $('#admin-edit-btn').remove();\n });\n});\n\");\n\n // TODO: finish this feature\n // this is not yet working\n return true;\n\n msv_include_js(\"\n$(document).ready(function() {\n $('\".$selector.\"').hover(function() {\n $(this).addClass('editor-inline-block').prepend('<a href=\\\"/api/form/?section=\".$section.\"&table=\".$table.\"&edit='+$(this).attr('data-id')+'\\\" id=\\\"admin-edit-btn\\\">\"._t(\"btn.click_to_edit\").\"</a>');\n $('#admin-edit-btn').addClass('admin-edit-overlay btn btn-danger').on('click', function(e){\n e.preventDefault();\n $('#adminModal').modal('show').find('#modal-frame').attr('src', $(this).attr('href'));\n });\n }, function() {\n $(this).removeClass('editor-inline-block');\n $('#admin-edit-btn').remove();\n });\n});\n\");\n\n return true;\n}", "title": "" }, { "docid": "cbaedd43334fd1f841950bd517d4d1dd", "score": "0.44721517", "text": "public function actionButtonSelected($id_selected,$button_name) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "cbaedd43334fd1f841950bd517d4d1dd", "score": "0.44721517", "text": "public function actionButtonSelected($id_selected,$button_name) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "cbaedd43334fd1f841950bd517d4d1dd", "score": "0.44721517", "text": "public function actionButtonSelected($id_selected,$button_name) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "6c8a1598c4fa183dc4b35acff42484bf", "score": "0.44697833", "text": "function print_scale_menu_helpbutton($courseid, $scale) {\n/// scale is an object\n\n global $CFG;\n\n $strscales = get_string(\"scales\");\n $helpicon = \"$CFG->pixpath/help.gif\";\n $linkobject = \"<img align=\\\"absmiddle\\\" border=\\\"0\\\" height=\\\"17\\\" width=\\\"22\\\" alt=\\\"$scale->name\\\" src=\\\"$helpicon\\\" />\";\n link_to_popup_window (\"/course/scales.php?id=$courseid&amp;list=true&amp;scale=$scale->id\", \"ratingscale\",\n $linkobject, 400, 500, $scale->name);\n}", "title": "" }, { "docid": "d3293e98221c474c8bb59c2a2aa504bb", "score": "0.44623443", "text": "function setFocus($id) {\n\tprint(\"<script type='text/javascript'>\\n\");\n\tprint(\"//<![CDATA[\\n\");\n\tprint(\"document.getElementById('$id').focus();\\n\");\n\tprint(\"//]]>\\n\");\n\tprint(\"</script>\\n\");\n}", "title": "" }, { "docid": "3b1620f0ed37790d37763f294a0e60da", "score": "0.44542196", "text": "function showAction(){\n }", "title": "" }, { "docid": "e965946d15c0bebd5d446fe515ec0546", "score": "0.44511613", "text": "function shortcode_insert_button()\n\t\t\t{\n\t\t\t\t$this->config['self_closing']\t=\t'no';\n\t\t\t\t\n\t\t\t\t$this->config['name']\t\t\t= __('Icon Box', 'avia_framework' );\n\t\t\t\t$this->config['tab']\t\t\t= __('Content Elements', 'avia_framework' );\n\t\t\t\t$this->config['icon']\t\t\t= AviaBuilder::$path['imagesURL'].\"sc-icon_box.png\";\n\t\t\t\t$this->config['order']\t\t\t= 90;\n\t\t\t\t$this->config['target']\t\t\t= 'avia-target-insert';\n\t\t\t\t$this->config['shortcode'] \t\t= 'av_icon_box';\n\t\t\t\t$this->config['tooltip'] \t = __('Creates a content block with icon to the left or above', 'avia_framework' );\n\t\t\t\t$this->config['preview'] \t= 1;\n\t\t\t}", "title": "" }, { "docid": "7dd0c953c37607b39c633ac7c9b528ec", "score": "0.44494322", "text": "function createButton(){\n\t//set the button ID at execution (vs in index file) to prevent possible redundancy\n\t\t$db_create = new db_connection();\n\t\t$db_create->exec(\"insert into buttons (demo_id) values(null);\");\n\t\t$db_create->disconnect();\n\t\t$db_create2 = new db_connection();\n\t\t$db_create2->exec(\"select max(id) as id from buttons;\");\n\t\t$db_create2->disconnect();\n\t\tif(!isset($this->id)){\n\t\t\t$this->id = $db_create2->response[0][0];\n\t\t}\n\t\t$this->routeEditButtonPage();\n\n\t}", "title": "" }, { "docid": "095f60af67ed2c999d8b12977cfe8de6", "score": "0.4446908", "text": "function draw_adopt_button(){ ?>\n\n <button id=\"adoptButton\" class=\"adopt-button-container\">Adopt this pet</button>\n\n<?php }", "title": "" }, { "docid": "f89706b3afe5703a2f7ab81371ac50d1", "score": "0.4432463", "text": "function setClick($id)\r\n {\r\n echo '图书点击量<hr>';\r\n }", "title": "" }, { "docid": "733d3ad3523852239c3d5ec27ab09d71", "score": "0.44238526", "text": "public function actionWindow($win, $id=NULL, $mainid=NULL)\n {\n $winparams = explode('_',$win);\n $modelClassName = '\\\\app\\\\modules\\\\dms\\\\models\\\\'.ucfirst($winparams[0]);\n $model = new $modelClassName;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $mainid]);\n } \n else \n {\n if($winparams[1]=='delete' || $winparams[1]=='onlineview')\n {\n $model->id = $id;\n }\n $showform = 'windows/_'.$winparams[1];\n return $this->renderPartial('windows/base_window',[\n 'model' => $model,\n 'showform' => $showform\n ]);\n }\n }", "title": "" }, { "docid": "6af2369641efeec0a0dad8b706288f3a", "score": "0.44206727", "text": "public function setCloseWindow() {\n $this->addAction(array('action' => 'CLOSEWINDOW'));\n }", "title": "" }, { "docid": "4aa6d431df3664e046e1ec3ad8d93a2e", "score": "0.44205528", "text": "public function updateShowModal($id)\n {\n $this->resetValidation();\n $this->resetVars();\n $this->modelId = $id;\n $this->modalFormVisible = true;\n $this->loadModel();\n }", "title": "" }, { "docid": "b52d2e46d73df12cd09de19cac65e698", "score": "0.44084325", "text": "protected function editInlineButton() {\n\t\t//However if not, then it needs to click the \"Create a Draft\" button on the admin toolbar, reload the page then click this button again.\n\t\treturn '\n\t\t\thref=\"#\"\n\t\t\tid=\"'. $this->containerId. '_edit_inline\"\n\t\t\tonclick=\"'. $this->editInlineButtonOnClick(). '\"';\n\t}", "title": "" }, { "docid": "827b255f290e38b6353b61cb702a1498", "score": "0.4402784", "text": "function oos_image_swap_button($id, $image, $alt = '', $params = '') {\n return oos_image_swap($id, OOS_IMAGES . 'buttons/' . $_SESSION['language'] . '/' . $image, $alt, '', '', $params);\n }", "title": "" }, { "docid": "6201b2d96f6deeb42bc4b73cbca12c5b", "score": "0.4402086", "text": "public function manage_size($id='')\n {\n if($id > 0){\n $res = Size::where('id',$id)->get();\n $Arr['size_id'] = $res[0]->id;\n $Arr['size'] = $res[0]->size;\n return view('admin/attributes/size/size_manage',$Arr);\n }\n $Arr['size_id'] = 0;\n $Arr['size'] = '';\n return view('admin/attributes/size/size_manage',$Arr);\n }", "title": "" }, { "docid": "34bc3fcc4b2e6d333a8249b29a0ab6e2", "score": "0.43950832", "text": "public function setToggleClass($id, $class = '') {\n $this->addAction(array('action' => 'TOGGLECLASS', 'id' => $id, 'class' => $class));\n }", "title": "" }, { "docid": "7f766227ef6f2eea98d698932d3e073c", "score": "0.4392983", "text": "private function dsplayTitleBarEditMode(){\n\t\t$divCkEditor = \"CkEditorTitleArticle\".$this->instance;\n\t\t$classDivIcone = 'fa '.$this->icone;\n\n\t\t$functionToCall = \"javascript:setArticleDivEditable ('\".$divCkEditor.\"', '\".$this->fieldNameTitre.\"', 'MyToolbar_article_title', '\".$this->id.\"', '#btnSave_\".$this->zone.\"', '\".$this->categorie.\"'); return false;\";\n\n\t\t$titre = $this->titre;\n\t\tif($this->titre ==\"\") $titre = \"...\";\n\n\t\t$icone = '';\n\t\t$icone .= '\t<div class=\"icone\">';\n\t\tif($this->show_icone) {\n\t\t\t$icone .= '\t\t<div class=\"'.$classDivIcone.'\"></div>';\n\t\t}\n\t\t$icone .= '\t</div>';\n\n\t\t$titleBar = '';\n\t\t\n\t\tif ($this->id ==0 ) { $titleBar .= $this->drawNewButtonsPanel(); }\n\t\tif ($this->id !=0 ) { $titleBar .= $this->drawIcones(); } \n\t\t\n\t\t$titleBar .= '\t<div class=\"header\">';\t\n\t\t\n\t\tif ($this->id !=0 ) { $titleBar .= $icone; }\n\t\t\n\t\t$titleBar .= '\t<div class=\"vide\"></div>';\n\n\t\t$titleBar .= '\t<div id=\"'.$divCkEditor.'\" contenteditable=false class=\"texteTitre\" onclick=\"'.$functionToCall.'\">';\n\t\t$titleBar .= \t\t\t$titre;\n\t\t$titleBar .= '\t</div>';\t\n\n\t\t$titleBar .= '\t</div>';\n\t\t\n\t\t\n\t\treturn ($titleBar);\n\t}", "title": "" }, { "docid": "1ac0c2e50384944f11b22a2cb8acfd82", "score": "0.43880856", "text": "public function setId($id)\r\n\t{\r\n\t\tif ($this->_parent)\r\n\t\t{\r\n\t\t\t if ($this->_parent->_controls_index[$this->_id])\r\n\t\t\t \tunset($this->_parent->_controls_index[$this->_id]);\r\n\t\t\t \t\r\n\t\t\t $this->_parent->_controls_index[$id] = $this;\r\n\t\t}\r\n\t\t\r\n\t\t$this->_id = $id;\r\n\t}", "title": "" }, { "docid": "17c57da01601643439f8dd5ca7a3d54b", "score": "0.4387649", "text": "function mmmButton() {global $inlibrary;?><div class=\"dbutton\">\n<a class=\"dlink\" href=\"http://ebook.3m.com/library/mfreglib/\" onClick=\"javascript: pageTracker._trackPageview('/outgoing/<?=($inlibrary?'i':'o');?>l/3m');\"><span class=\"divspanner\"></span></a>\n<!--<a href=\"http://www.mfrl.org/wp/?p=\" class=\"helplink\"><img src=\"/images/icons/help.png\" alt=\"Emily's Reference Guide\" title=\"Emily's Reference Guide\"></a> -->\n<h2 class=\"buttontitle\"><span class=\"pagename\">eBooks</span></h2>\n<h2>3M Cloud Library</h2>\n<p>Browse, borrow and read e-books!<br>\n\t\n<a class=\"sublink mmmpic\" href=\"http://ebook.3m.com/library/mfreglib/\" onClick=\"javascript: pageTracker._trackPageview('/outgoing/<?=($inlibrary?'i':'o');?>l/3m');\"><img src=\"/images/3mbutton.png\" alt=\"3M Cloud Library\" title=\"3M Cloud Library\"></a>\n</p>\n</div><?}", "title": "" }, { "docid": "78a18124fcc34482a140573824f38126", "score": "0.43775102", "text": "public function massEdit()\n {\n $this->pressButton('Mass Edit');\n }", "title": "" }, { "docid": "61e1840be1058a800ffa1df0de4e383b", "score": "0.436516", "text": "function tombolCustomers(){\r\n $title1 = Yii::t('app', 'Customers');\r\n $options1 = [ 'id'=>'setting',\r\n //'data-toggle'=>\"modal\",\r\n // 'data-target'=>\"#\",\r\n //'class' => 'btn btn-default',\r\n 'style' => 'text-align:left',\r\n ];\r\n $icon1 = '<span class=\"fa fa-cogs fa-md\"></span>';\r\n $label1 = $icon1 . ' ' . $title1;\r\n $url1 = Url::toRoute(['/master/customers/esm-index']);//,'kd'=>$kd]);\r\n $content = Html::a($label1,$url1, $options1);\r\n return $content;\r\n}", "title": "" }, { "docid": "a1f8f358d00a19521eccd33fa385ddd1", "score": "0.43647927", "text": "public function enableWidgetLayout($id){\n\n\t\t$this->db->query(\"UPDATE \" . DB_PREFIX . \"circloid_widget_layout SET enabled = '0' WHERE enabled = '1'\");\n\n\t\t$this->db->query(\"UPDATE \" . DB_PREFIX . \"circloid_widget_layout SET enabled = '1' WHERE id = '\" . (int)$id . \"'\");\n\n\t\t// Check if the table has been updated and return true\n\n\t\t$query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"circloid_widget_layout WHERE id = '\" . (int)$id . \"' AND enabled = '1'\");\n\n\t\tif($query->row){\n\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\n\t}", "title": "" }, { "docid": "8ab519c7e766f34c4a34a20a750603e7", "score": "0.4364709", "text": "public function clickMassActionGoButton () {\n $this->click (\"dom=document.querySelector ('.x2-dialog-go-button')\");\n }", "title": "" }, { "docid": "7eee2aa1140918f9a934444234406320", "score": "0.43644622", "text": "public function actionButtonSelected($id_selected,$button_name) {\n\t //Your code here\n\t \n\t }", "title": "" }, { "docid": "7eee2aa1140918f9a934444234406320", "score": "0.43644622", "text": "public function actionButtonSelected($id_selected,$button_name) {\n\t //Your code here\n\t \n\t }", "title": "" }, { "docid": "7eee2aa1140918f9a934444234406320", "score": "0.43644622", "text": "public function actionButtonSelected($id_selected,$button_name) {\n\t //Your code here\n\t \n\t }", "title": "" }, { "docid": "7eee2aa1140918f9a934444234406320", "score": "0.43644622", "text": "public function actionButtonSelected($id_selected,$button_name) {\n\t //Your code here\n\t \n\t }", "title": "" }, { "docid": "7eee2aa1140918f9a934444234406320", "score": "0.43644622", "text": "public function actionButtonSelected($id_selected,$button_name) {\n\t //Your code here\n\t \n\t }", "title": "" }, { "docid": "4f5041027b2afdac3de105533caae07c", "score": "0.4358469", "text": "function show_editbutton($url, $label, $attributes = array('class' => 'mdl-right')) {\n global $OUTPUT;\n echo html_writer::start_tag('div', $attributes);\n echo html_writer::tag('a', $OUTPUT->pix_icon('t/editstring', '') . ' ' . $label, array('href' => $url->out(false)));\n echo html_writer::end_tag('div');\n}", "title": "" }, { "docid": "6bd01eb30d748ddab15498669cc2818b", "score": "0.43581113", "text": "function id()\n {\n return 'add-mirror-wizard';\n }", "title": "" }, { "docid": "ce3fecb06a0b8d28f34d085aa20164f2", "score": "0.4348672", "text": "function create_editbutton($url, $action = 'edit', $id) {\n global $OUTPUT;\n \n $stredit = get_string('edit');\n return html_writer::link(\n new moodle_url($url, array('action'=>$action, 'id'=>$id)), \n html_writer::empty_tag('img', array('src'=>$OUTPUT->pix_url('t/editstring'), 'alt'=>$stredit, 'class'=>'iconsmall')), \n array('title'=>$stredit)\n );\n}", "title": "" }, { "docid": "82f0a74f095ece37c444343187168756", "score": "0.43462473", "text": "function semplice_editor_button($wp_admin_bar) {\n\n\t// post & screen\n\tglobal $post;\n\n\tif(isset($post) && !is_admin()) {\n\t\tif(get_post_type($post->ID) === 'page' && get_field('use_semplice') === 'active' || get_post_type($post->ID) === 'work') {\n\t\t\t$args = array(\n\t\t\t\t'id' => 'semplice-editor',\n\t\t\t\t'title' => 'Content Editor',\n\t\t\t\t'href' => get_edit_post_link($post->id) . '&smp_ce=true',\n\t\t\t\t'meta' => array( 'class' => 'semplice-editor-button' )\n\t\t\t);\n\t\t\t$wp_admin_bar->add_node($args);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "bd69b7e99794109c62dfac246e19288e", "score": "0.43354344", "text": "public function updateShowModal($id)\n {\n $this->resetValidation();\n $this->reset();\n $this->dataId = $id;\n $this->modalFormVisible = true;\n $this->loadModel();\n }", "title": "" }, { "docid": "2367ea25ed80a20a5a11e3bdfaa2c6b1", "score": "0.43160242", "text": "public function nilai_min($id){\n $stmt = $this->db->prepare(\"SELECT nik, MIN(c1), MIN(c2), MIN(c3), MIN(c4), MIN(c5), MIN(c6), MIN(c7), MIN(c8), MIN(c9), MIN(c10), MIN(c11), MIN(c12), MIN(c13), MIN(c14), MIN(c15), MIN(c16), MIN(c17), MIN(c18), MIN(c19), MIN(c20), MIN(c21), MIN(c22), MIN(c23), MIN(c24), MIN(c25) AS min FROM matrix_table WHERE nik='$id' GROUP BY nik\");\n $lihatdb->execute();\n return $lihatdb;\n }", "title": "" }, { "docid": "955eed88ca5291165c6a4c133a9c877e", "score": "0.43153685", "text": "public function setTabFocus($id) {\n $this->addAction(array('action' => 'TABFOCUS', 'id' => $id));\n }", "title": "" }, { "docid": "a6ffba0f64e15dd0804a0e373010f218", "score": "0.43128335", "text": "function show_char_create_buttons()\n{\n}", "title": "" }, { "docid": "d9fe93241bf753207bdab99744d7bc90", "score": "0.43124387", "text": "function add_wowcd_button()\r\n\t{\r\n\t\t$this -> path = WP_PLUGIN_URL . '/wow-character-display/tinymce/';\r\n\r\n\t\t// Modify the version when tinyMCE plugins are changed.\r\n\t\tadd_filter( 'tiny_mce_version', array( &$this, 'change_tinymce_version' ) );\r\n\r\n\t\t// init process for button control\r\n\t\tadd_action( 'init', array( &$this, 'addbuttons' ) );\r\n\t}", "title": "" }, { "docid": "8e3f5af8d69cc2f3d8ae284d2600279e", "score": "0.4310433", "text": "function jumpstart_option_id( $id ) {\n return 'jumpstart';\n}", "title": "" }, { "docid": "63fba41389d678fa47b4f5fd2cf1fdb2", "score": "0.43098027", "text": "public function showAction($id) {\n return parent::showAction($id);\n }", "title": "" }, { "docid": "a983bac714bcce3be3b3980a70aa33aa", "score": "0.43095908", "text": "public function ShowNewEntryButton()\n {\n return true;\n }", "title": "" }, { "docid": "f5cf8276221905a1bea2f639019aedb2", "score": "0.4306931", "text": "public function add_shortcode_button( $page = null, $target = null ) {\r\n\t\t?>\r\n\t\t<a href=\"#TB_inline?width=753&amp;height=573&amp;inlineId=cpsh-wrap\" class=\"thickbox button\" title=\"<?php _e( 'Select shortcode', 'column-shortcodes' ); ?>\" data-page=\"<?php echo $page; ?>\" data-target=\"<?php echo $target; ?>\">\r\n\t\t\t<img src=\"<?php echo $this->get_url() . \"/assets/images/shortcode.png\"; ?>\" alt=\"\"/>\r\n\t\t</a>\r\n\t\t<?php\r\n\t}", "title": "" }, { "docid": "0cd9d639c40969867b909689a60a46b9", "score": "0.4304343", "text": "public function getRenameButton()\n {\n return $this->getChildHtml('rename_button');\n }", "title": "" }, { "docid": "2c0657cdbfab99980f4f6fc890a90edb", "score": "0.43016773", "text": "function closeSettingsTable($writeable = true) {\n\t\t echo '<tr><td colspan=\"2\">';\n\t\t echo '<table align=\"center\"><tr width=\"50%\"><td>';\n\t\t if ($writeable) {\n\t\t echo '<input type=\"submit\" class=\"jz_submit\" name=\"update_postsettings\" value=\"Update\">';\n\t\t } else {\n\t\t echo \"&nbsp;\";\n\t\t }\n\t\t echo '</td><td width=\"50%\">';\n\t\t //echo '<input type=\"submit\" value=\"Close\" name=\"close\" onClick=\"window.close();opener.location.reload(true);\" class=\"jz_submit\">';\n\t\t echo \"&nbsp;\";\n\t\t echo '</td></tr></table></tr>';\n\t\t echo '</form></table>'.\"\\n\";\n\t\t}", "title": "" }, { "docid": "dfa25ce7c0c3227d498460aca1df8ae8", "score": "0.42976475", "text": "function export_large_projects_generate_button($pid, $external_module_obj, $fields_per_batch, $max_execution_time) {\n $url = $external_module_obj->getUrl(\"includes/index.php\") \n . \"&fields_per_batch=\" . $fields_per_batch . \"&max_execution_time=\" . $max_execution_time;\n $str = \"<button class - \\\"jqbuttonmed ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only\\\" \"\n . \"style=\\\"display: block; margin-top: 10px;\\\" \" . \"onclick=\\\"window.location.href = '\" \n . $url\n .\"'\\\" role=\\\"button\\\"><span class=\\\"ui-button-text\\\">\"\n . \"<img src=\\\"\" . APP_PATH_WEBROOT . \"Resources/images/go-down.png\\\" style=\\\"vertical-align:middle;\\\">\"\n . \"<span style=\\\"vertical-align:middle;\\\"> Export Large Projects</span>\"\n . \"</span></button>\";\n return $str;\n}", "title": "" }, { "docid": "e60527e683ae090d54f85e47895d27ee", "score": "0.4295424", "text": "public function mostrar($id)\n {\n //\n }", "title": "" }, { "docid": "41b947c4d294486413284637400073c0", "score": "0.42922482", "text": "function proyecto__celda_memoria_popup()\r\n\t{\r\n\t\t$sql = array();\r\n\t\t//Vinculos en Cuadros\r\n\t\t$sql[] = \"UPDATE \tapex_objeto_ei_cuadro_columna SET vinculo_celda = 'popup' \r\n\t\t\t\tWHERE \tobjeto_cuadro_proyecto = '{$this->elemento->get_id()}'\r\n\t\t\t\tAND \tvinculo_celda IS NULL\r\n\t\t\t\tAND\t\tvinculo_popup = '1';\";\r\n\t\t\r\n\t\t//Vinculos en Formularios/CI\r\n\t\t$sql[] = \"UPDATE\tapex_objeto_eventos SET accion_vinculo_celda = 'popup'\r\n\t\t\t\tWHERE \tproyecto = '{$this->elemento->get_id()}'\r\n\t\t\t\tAND \taccion_vinculo_celda IS NULL\r\n\t\t\t\tAND \taccion_vinculo_popup = '1';\";\r\n\t\t$this->elemento->get_db()->ejecutar($sql);\r\n\t}", "title": "" }, { "docid": "a4cc223d6e2863a7734646ccbef13cf1", "score": "0.42918062", "text": "public static function EDIT_MENU() {\r\n\t\tmosMenuBar::startTable();\r\n\t\tmosMenuBar::save('saveclient');\r\n\t\tmosMenuBar::cancel('cancelclient');\r\n\t\tmosMenuBar::endTable();\r\n\t}", "title": "" }, { "docid": "adea2c97dde0c4a51ef153b3795769b1", "score": "0.42913777", "text": "public function show($id)\n {\n $txt = 'DASHBOARD - Управление персоналом - Должность с id='.$id;\n echo '<b>' .$txt. '</b>';\n echo '</BR></BR>' . __METHOD__;\n }", "title": "" }, { "docid": "85133347572f95946f116ecf45b55216", "score": "0.42888185", "text": "public function move_action($id)\n {\n $scm = new ScmTabEntry($id);\n if (!$scm->isNew() && $scm->range_id == $GLOBALS['SessSemName'][1]){\n $query = \"UPDATE scm_tabs\n SET position = position + 1\n WHERE range_id = :range_id AND position < :position\";\n $statement = DBManager::get()->prepare($query);\n $statement->bindValue(':range_id', $scm->range_id);\n $statement->bindValue(':position', $scm->position);\n $statement->execute();\n\n $scm->position = 0;\n if ($scm->store()) {\n PageLayout::postMessage(MessageBox::success(_('Der Eintrag wurde an die erste Position verschoben.')));\n }\n }\n $this->redirect('show/' . $id);\n }", "title": "" }, { "docid": "5d574e12ea138ca93f612dae905dda4a", "score": "0.42860645", "text": "function mmc_modify_toolbar( $wp_admin_bar ){\n\t$wp_admin_bar->remove_node( 'wp-logo' );\n\n\t//add our own \"contact me\" button\n\t$wp_admin_bar->add_node( array(\n\t\t'id' \t=> 'mmc-contact',\n\t\t'title' => 'Contact Melissa',\n\t\t'href'\t=> 'http://melissacabral.com/get-in-touch',\n\t\t'meta'\t=> array( \n\t\t\t'target' => '_blank', \n\t\t),\n\t\t'parent' => 'top-secondary', //go to the right\n\t) );\n}", "title": "" }, { "docid": "d7aa5fb3b2548258e7284a6e4c4a9857", "score": "0.42843682", "text": "function xtogglepublish() {\n\n\t\t$id=$this->getArgument(1);\n\t\t$model=$this->getArgument(3);\n\n\t\tif (!$model){\n\t\t\t/* get our last accessed model */\n\t\t\t$model = $this->session->get('lastModel','','default');\n\t\t}\n\t\t$row=$this->getModel($model);\n\n\t\t/* set this rows published state */\n\t\t$hasPublished = array_key_exists( 'published', $row );\n\t\tif ($hasPublished){\n\t\t\t$row->publish($id);\n\t\t}\n\n\t\t/* Set layout to be a single xAJAX request: text */\n\t\t$this->setLayout('text');\n\n\t\t/* Set the innerHTML of the target div */\n\t\t$this->setMessage(bfHTML::publishInformationDiv($id));\n\t\t$this->setXajaxAction('addassign');\n\t\t$this->setXajaxTarget('pub'.$id);\n\n\t\t/* needed to fool back to form_element model after\n\t\ttoggle of sub-index of validations */\n\t\tif ($model=='element_validation'){\n\t\t\t$fool =& $this->getModel('form_element');\n\t\t}\n\t}", "title": "" }, { "docid": "e8bec34b3055502da2849bdde1b5b31f", "score": "0.42835218", "text": "public function activar($id) {\n require 'modelos/materialModelo.php';\n\n //Creamos una instancia de nuestro \"modelo\"\n $items = new materialModelo();\n\n $estado = $items->activarDesactivarMaterial($id, 1);\n echo $estado;\n }", "title": "" }, { "docid": "072365804377ece34194308783bd9b89", "score": "0.42827985", "text": "public function edit($id)\n {\n //\n return view('dashboard.ministries.edit',['article' => Ministries::find($id),'articlesCount'=> Ministries::count()]);\n }", "title": "" }, { "docid": "f1ce7ad41fc7f4476f204c9c1fda921a", "score": "0.42824695", "text": "public function set_minsidebar($minsidebar)\n\t{\n\t\t$this->minsidebar = $minsidebar;\n\t\t$this->header['minsidebar'] = $this->get_minsidebar();\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d71a907e50ac9c19c99ebb25c7a9cb68", "score": "0.42806304", "text": "function w3tc_mh_settings_menu(){\n add_menu_page( 'W3TC Minify Helper Settings', 'W3TC Minify Helper', 'manage_options', 'W3TC-Minify-Helper', 'w3tcmh_init' );\n}", "title": "" }, { "docid": "612342f3e653f0a3eaf0f1ca4588b620", "score": "0.42789474", "text": "public function ExpandColClick($param)\n\t{\n\t\t$this->ExpandColClick = $param; return $this;\n\t}", "title": "" }, { "docid": "48ee1e8c692af62a58012012eaed2875", "score": "0.4278507", "text": "public function setMediaMinimized($mediaMinimized) {\n $this->mediaMinimized = $mediaMinimized;\n }", "title": "" }, { "docid": "4e1c7e56b48d38fa40447c1eb3bbfe21", "score": "0.42753562", "text": "function get_buttons($id)\n{\n if(is_integer($id))\n {\n \t$html = 'Y - '.$id;\n }else\n {\n \t$html = 'N - '.$id;\n }\n\n return $html;\n}", "title": "" }, { "docid": "4d7a9b2b0d4b89816fff912d85a6b333", "score": "0.42704868", "text": "function optimizer_register_mce_button( $buttons ) {\r\n\tarray_push( $buttons, 'optimizer_mce_button' );\r\n\treturn $buttons;\r\n}", "title": "" }, { "docid": "18479390b3b4ba1c8bbb9ea2a2e4c881", "score": "0.42696887", "text": "public function chasil_controlPanel(){\n add_menu_page('Size Table', 'Size Table', 'manage_options', 'chasil_sizeTableMenu', array($this, 'chasil_panelView'));\n }", "title": "" }, { "docid": "e1be8afb46d7d913615fed87be3746a9", "score": "0.42696297", "text": "public function remove_panel( $id );", "title": "" }, { "docid": "03893dee3584c65a4284170d50c10808", "score": "0.42687994", "text": "public function edit($id)\n {\n return Size::find($id);\n }", "title": "" } ]
ccbac23fe5060d65630b19e5693a41e9
Get the validation rules that apply to the request.
[ { "docid": "54231af4d7672263e5a14ca169bde0ac", "score": "0.0", "text": "public function rules()\n {\n return [\n //\n 'current_rating' => 'required|numeric|min:75|max:97',\n 'goals' => 'required|numeric',\n 'position' => 'required',\n 'pace' => 'required|numeric|min:75|max:97',\n 'shoot' => 'required|numeric|min:75|max:97',\n 'passe' => 'required|numeric|min:75|max:97',\n 'dribble' => 'required|numeric|min:75|max:97',\n 'defense' => 'required|numeric|min:75|max:97',\n 'physique' => 'required|numeric|min:75|max:97',\n 'strong_foot' => 'required',\n 'skill' => 'required',\n ];\n }", "title": "" } ]
[ { "docid": "8471abd4d4d51c54ba74e3101f64df6f", "score": "0.8117761", "text": "public function getValidationRules()\n {\n return $this->validationRules;\n }", "title": "" }, { "docid": "589b81ca576a51a780af7376ebf94d19", "score": "0.81061023", "text": "public static function rules()\n {\n return []; // return nothing, since automatic FormRequest validation has been override via customRules().\n }", "title": "" }, { "docid": "18c36eaf26480ae97537e30df90d11d8", "score": "0.80716956", "text": "public function getValidationRules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "18c36eaf26480ae97537e30df90d11d8", "score": "0.80716956", "text": "public function getValidationRules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "74547c5f4add13c5f8ff64d12a139065", "score": "0.79930794", "text": "public function rules()\n {\n $validation = app(Validation::class);\n\n return $validation->getRules();\n }", "title": "" }, { "docid": "2e57695d9533f1db057256ec3dc34778", "score": "0.7991769", "text": "public function rules()\n {\n $rules = [\n 'login' => ['required'],\n ];\n\n // reCAPTCHA\n $rules = $this->recaptchaRules($rules);\n\n return $rules;\n }", "title": "" }, { "docid": "42ddf2329ef6468be80a76cd7016be8a", "score": "0.7903675", "text": "public function rules()\n {\n\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n {\n return [\n 'name' => 'required',\n 'contact_number' => 'required',\n 'email' => 'required|email',\n 'message' => 'required',\n 'g-recaptcha-response' => 'required',\n ];\n }\n case 'PUT':\n case 'PATCH':\n {\n return [\n 'name' => 'required',\n 'contact_number' => 'required',\n 'email' => 'required|email',\n 'message' => 'required',\n 'g-recaptcha-response' => 'required',\n ];\n }\n default:break;\n }\n }", "title": "" }, { "docid": "18ef5d485b924571aadc7e6fe94f6b87", "score": "0.7899661", "text": "public function getValidationRules(): array\n {\n return $this->rules();\n }", "title": "" }, { "docid": "4ee83541664d425cbdc963003687addf", "score": "0.7874405", "text": "public function rules()\n {\n $rules = [];\n $this->endpoint = $this->path();\n $this->verb = $this->getMethod();\n\n if($this->verb == 'POST') {\n $rules = [\n 'customer_id' => 'required|numeric',\n 'product_id' => 'required|numeric',\n ];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "4badec4bc5e96ca4a68c3d1a1abd5b60", "score": "0.78742826", "text": "protected function getQueryValidationRules()\n {\n if (! ($formRequestReflection = $this->getFormRequestClassReflection())) {\n return [];\n }\n\n $className = $formRequestReflection->getName();\n\n /** @var FormRequest $formRequest */\n $formRequest = new $className;\n $formRequest->setContainer(app());\n\n if($formRequestReflection->hasMethod('validator')) {\n $factory = app()->make(ValidationFactory::class);\n $validator = app()->call([$formRequest, 'validator'], [$factory]);\n\n $property = (new ReflectionClass($validator))->getProperty('initialRules');\n $property->setAccessible(true);\n\n $rules = $property->getValue();\n } else {\n $rules = app()->call([$formRequest, 'rules']);\n }\n\n $rules = array_map(function($rule) {\n if (is_string($rule)) {\n return explode('|', $rule);\n } elseif (is_object($rule)) {\n return [strval($rule)];\n } else {\n return array_map(function($rule) {\n return is_object($rule) ? strval($rule) : $rule;\n }, $rule);\n }\n }, $rules);\n\n return $rules;\n }", "title": "" }, { "docid": "fc70c22f8ac8037812951fd1c354c00a", "score": "0.7860726", "text": "public static function getValidationRules() \n\t{\n\t\treturn [\n\t\t 'discount' => 'required|integer|max:100',\n\t\t 'max_discount' => 'required|integer',\n\t\t 'validity_radius' => 'required|integer',\n\t\t 'validity_radius_unit' => Rule::in(['kms', 'miles']),\n\t\t 'expires_in' => 'required|integer'\n\t\t];\n\t}", "title": "" }, { "docid": "0ee92c08b23861e231ac7fed2822d241", "score": "0.78328764", "text": "public function getValidationRules()\n {\n return array();\n }", "title": "" }, { "docid": "872255aaf33b54ed67b98b5355ad8637", "score": "0.78309286", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n {\n $rules = [];\n $rules['program.name'] = 'required|max:50';\n $rules['program.organization_id'] = 'required';\n $rules['program.date_added'] = 'required|date';\n return $rules;\n }\n case 'PUT':\n {\n $rules = [];\n $rules['program.name'] = 'required|max:50';\n $rules['program.organization_id'] = 'required';\n return $rules;\n }\n default:break;\n }\n }", "title": "" }, { "docid": "a2c886705fb1f4ceac89b484c243e399", "score": "0.7820226", "text": "public function rules()\n {\n $method = $this->method();\n $action = $this->getAction();\n\n $validate_arr = [];\n\n if ($method == 'GET') {\n $validate_arr = [\n 'page_number' => 'integer|min:1',\n 'page_size' => 'integer|min:1|max:100'\n ];\n }\n\n if ($method == 'POST' || $method == 'DELETE') {\n $validate_arr = [\n 'vpc_id' => 'required',\n 'instance_id' => 'required',\n 'port' => 'required|integer'\n ];\n\n if ($method == 'POST') {\n $validate_arr['name'] = 'required';\n }\n }\n\n return $validate_arr;\n }", "title": "" }, { "docid": "d65e3c9d04c591ec878898ecb1b6814d", "score": "0.7796381", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n {\n return [\n 'name' => 'required',\n 'email' => 'required|email',\n 'phone' => 'required',\n 'street' => 'required',\n ];\n }\n default:break;\n }\n }", "title": "" }, { "docid": "69b0fb4d5f81fc199db366129ecb28ff", "score": "0.77879775", "text": "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n \n }\n return $rules;\n }", "title": "" }, { "docid": "a67df9bab17643a18eb5e0451b936de8", "score": "0.77628785", "text": "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "title": "" }, { "docid": "f634fdf337b5bf564e898d3194856894", "score": "0.77404886", "text": "public function getRules()\n\t{\n\t\t$rules = self::$validationRules->all();\n\t\t\n\t\treturn $rules;\n\t}", "title": "" }, { "docid": "72452ea65b5fc6ae128152692ef84034", "score": "0.7736417", "text": "public static function getRules(){\n $rules = array(\n 'servName' => 'required',\n 'event_date' => 'required',\n 'participants' => 'required',\n 'units' => 'required'\n );\n return $rules;\n }", "title": "" }, { "docid": "022a3c553f7a964dffb55b6743276605", "score": "0.7717732", "text": "private function getValidatorRules()\n {\n $validation_rules = [\n 'name' => ['required', 'min:1', 'max:100', 'string'],\n 'description' => ['nullable', 'min:10', 'max:500'],\n 'price' => ['required', 'between:0,99999.99', 'numeric'],\n 'cover' => ['nullable', 'max:2000']\n ];\n\n return $validation_rules;\n }", "title": "" }, { "docid": "b4a28a7ad0e90eacdeb8fc2aee33eafb", "score": "0.77175415", "text": "public function rules()\n {\n $rules = $this->rules;\n\n if ($this->method() == 'POST')\n {\n $rules['file'] = 'required';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "addd2ef66b0bec2c6e84b4c5f9f32192", "score": "0.771562", "text": "public function rules() {\n $rules = [];\n switch ($this->getScence()) {\n case 'data_count':\n $rules = [\n 'limit' => 'numeric|min:1|max:5',\n ];\n break;\n case 'paginate':\n $rules = [\n 'page' => 'numeric|min:1',\n 'pageSize' => 'numeric|min:1',\n ];\n break;\n case 'mp_login':\n $rules = [\n 'code' => 'required',\n ];\n break;\n }\n\n return $rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "1d0f59d1d5d090c1c823880d19a56605", "score": "0.7678777", "text": "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_ImapServerID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Name' => array(\n\t\t\t\t'string' => array(),\n\t\t\t),\n\t\t\t'_SenderEmail' => array(\n\t\t\t\t'string' => array(),\n\t\t\t),\n\t\t\t'_SenderPassword' => array(\n\t\t\t\t'string' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_UpdateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "cc0ecea4c11e991154e2f601cf4a1ff5", "score": "0.76663595", "text": "public function getRules()\n\t{\n\t\t$rules['date'] = ['required', 'date'];\n\t\t$rules['at'] \t = ['required', 'string'];\n\t\t$rules['status'] = ['required', 'string'];\n\t\t$rules['is_in_office']\t\t = ['required', 'boolean'];\n\t\t$rules['org_id']\t\t \t = ['required', 'integer', 'exists:'. app()->make(\\App\\Org::class)->getTable() . ',id'];\n\t\t$rules['user_id']\t\t \t = ['required', 'integer', 'exists:'. app()->make(\\App\\User::class)->getTable() . ',id'];\n\t\t$rules['geolocation']\t\t = ['required', 'array'];\n\t\t\n\t\treturn $rules;\n\t}", "title": "" }, { "docid": "484a3dc730124f5fc9d5db22007fc353", "score": "0.7661976", "text": "public function rules()\n {\n\n $rules = [];\n\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n break;\n }\n case 'POST':\n {\n $rules = [\n 'business_name' => 'required',\n 'business_type' => '',\n 'contact_first_name' => '',\n 'contact_last_name' => '',\n 'currency' => '',\n 'phone' => 'required|regex:/^([0-9\\s\\-\\+\\(\\)]*)$/|digits_between:9,12',\n 'email' => 'nullable|email',\n 'country' => '',\n 'county' => '',\n 'town' => '',\n 'physical_address' => '',\n 'postal_address' => '',\n 'postal_code' => '',\n 'logo' => '',\n 'favicon' => '',\n ];\n\n break;\n }\n case 'PUT':\n case 'PATCH':\n {\n $rules = [\n\n ];\n break;\n }\n default:break;\n }\n\n return $rules;\n\n }", "title": "" }, { "docid": "9dce42c574aac545d07c692e9e7b21ef", "score": "0.7657698", "text": "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "title": "" }, { "docid": "fffa3a763e7d86c3ce5a060efd0595bd", "score": "0.76520365", "text": "public function getValidationRules()\n {\n $rules = [\n 'genre' => 'required',\n 'title' => 'required|max:200',\n 'uploadfile' => 'required',\n 'price' => 'numeric|max:850000',\n 'days' => 'numeric|max:25'\n ];\n\n $messages = [\n\n ];\n\n return [$rules, $messages];\n }", "title": "" }, { "docid": "3a5049f7dcf1710da7f2ae879c1d8e98", "score": "0.76427263", "text": "public function rules()\n {\n return $this->getRules();;\n }", "title": "" }, { "docid": "c2b9ebbb443abda61f636f58022e1609", "score": "0.76310307", "text": "public function rules()\n {\n $comment = $this->route('comment');\n\n $rules = [];\n\n if ($this->isStore()) {\n // validation rule for create request.\n }\n\n if ($this->isUpdate()) {\n // Validation rule for update request.\n }\n\n if ($this->isStore() || $this->isUpdate()) {\n\n }\n return $rules;\n }", "title": "" }, { "docid": "6bdcb82da03520cab033145fb0dc1c94", "score": "0.7606768", "text": "public function rules()\n {\n switch ($this->getMethod()) {\n\n case 'POST':\n\n return [\n 'demand_id' => 'required|integer|exists:demands,id',\n 'rating' => ['required', 'integer', Rule::in(Review::RATINGS)],\n 'comment' => 'required|string|max:2048',\n ];\n\n case 'GET':\n\n return [\n 'user_id' => 'required|integer|exists:users,id',\n ];\n }\n }", "title": "" }, { "docid": "9590f1fc2f37a02de265b680bd591672", "score": "0.76059854", "text": "public function rules()\n {\n $rules = [\n 'measured_at' => 'required|numeric',\n 'value' => 'required|numeric',\n 'sensor_id' => 'required|min:1|max:999',\n 'isActive' => 'required|boolean'\n ];\n\n switch ($this->getMethod())\n {\n case 'POST':\n return $rules;\n default:\n return null;\n }\n }", "title": "" }, { "docid": "5fd01dbbd4ae37c1c4f693224d641939", "score": "0.75983995", "text": "public function rules()\n {\n $rules = $this->rules;\n\n return $rules;\n }", "title": "" }, { "docid": "a44fb2ad2f1d29766a5762b482d8f838", "score": "0.75791496", "text": "public function rules()\n {\n $rule = [\n 'client_id' => 'required',\n 'offer_range' => 'required',\n ];\n switch (strtolower($this->method())) {\n case 'post':\n {\n return $rule;\n }\n case 'patch':\n {\n return array_merge($rule, [\n 'items' => 'required',\n ]);\n }\n }\n\n }", "title": "" }, { "docid": "6d39c99b812f97b6c43cf67d35ab0648", "score": "0.7576643", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n case 'PUT': {\n return [\n 'cost' => 'required|numeric',\n 'notes' => 'string',\n 'created_at' => 'required',\n 'customer_id' => [\n 'required',\n Rule::exists('customers', 'id')\n ],\n 'payment_method_id' => [\n 'required',\n Rule::exists('payment_methods', 'id')\n ],\n ];\n }\n }\n }", "title": "" }, { "docid": "7ee4ec71711c87a8dc475ac1b566679c", "score": "0.7571088", "text": "public function rules()\n\t{\n\t\treturn $this->rules;\n\t}", "title": "" }, { "docid": "a31ae9b25b8e7eb26cffbee1a618acd1", "score": "0.7569198", "text": "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Queued' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'inArray' => array('values' => array(self::STATUS_HOLD, self::STATUS_QUEUED, self::STATUS_PROCESSING, self::STATUS_SENT, self::STATUS_FAILED),),\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "ec5d08f96b99d33fed46b639b84696c7", "score": "0.7551423", "text": "public function validationRules()\n {\n return [];\n }", "title": "" }, { "docid": "ec5d08f96b99d33fed46b639b84696c7", "score": "0.7551423", "text": "public function validationRules()\n {\n return [];\n }", "title": "" }, { "docid": "e4c4d2c1d1529f95ff05a6c1793f715d", "score": "0.7543202", "text": "public function getRules()\n {\n $rules = [\n 'iAlwaysFail' => 'alwaysfails',\n 'iShouldStartAndEndWithADot' => 'startsandendswithdot',\n 'iAmBeingSubvalidated' => 'usessubvalidation'\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "2c5e58280ecb5f90b4633ea631beb28c", "score": "0.753339", "text": "public function rules()\n {\n return array_merge(parent::rules(), $this->getInboxRequestRules());\n }", "title": "" }, { "docid": "f37c9eb96bdc9a86606936df89a879c4", "score": "0.753256", "text": "public function rules() {\r\n\t\treturn $this->_rules;\r\n\t}", "title": "" }, { "docid": "41ed1eb55e8d35995003123f334d0bae", "score": "0.75070274", "text": "public function rules()\n {\n\n $rules = [];\n\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [];\n break;\n }\n case 'POST':\n {\n $rules = [\n 'protocol' => '',\n 'smpt_host' => '',\n 'smpt_username' => '',\n 'smpt_password' => '',\n 'smpt_port' => '',\n 'mail_gun_domain' => '',\n 'mail_gun_secret' => '',\n 'mandrill_secret' => '',\n 'from_name' => '',\n 'from_email' => ''\n ];\n\n break;\n }\n case 'PUT':\n case 'PATCH':\n {\n $rules = [\n 'protocol' => '',\n 'smpt_host' => '',\n 'smpt_username' => '',\n 'smpt_password' => '',\n 'smpt_port' => '',\n 'mail_gun_domain' => '',\n 'mail_gun_secret' => '',\n 'mandrill_secret' => '',\n 'from_name' => '',\n 'from_email' => ''\n ];\n break;\n }\n default:\n break;\n }\n\n return $rules;\n\n }", "title": "" }, { "docid": "e6de1edf668d2476f99589cc345637c3", "score": "0.75036335", "text": "final public function getValidationRules(): array\n {\n return array_merge(\n array_values($this->getBuiltInValidationRules()),\n array_values(($this->format ? $this->format->getValidationRules() : [])),\n array_values($this->validationRules)\n );\n }", "title": "" }, { "docid": "54f9ee983a52bcc7c4a14ed2cb7a21b0", "score": "0.7503358", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n return $this->getRules();\n\n case 'POST':\n return $this->postRules();\n\n case 'PUT':\n return $this->putRules();\n\n case 'DELETE':\n return $this->deleteRules();\n\n default:\n return $this->postRules();\n }\n }", "title": "" }, { "docid": "baec20bc9276d4fdf11af6ea60d2cb01", "score": "0.7496147", "text": "public function rules()\r\n\t{\t\r\n\t\tswitch($this->method())\r\n\t\t{\r\n\t\t\tcase 'GET':\r\n\t\t\tcase 'DELETE':\r\n\t\t\t{\r\n\t\t\t\treturn [];\r\n\t\t\t}\r\n\t\t\tcase 'POST':\r\n\t\t\t{\r\n\t\t\t\treturn [\r\n\t\t\t\t\t'lv_totaldays' => 'required',\r\n\t\t\t\t\t'lv_start_date' => 'required|date_format:m/d/Y',\r\n\t\t\t\t\t'lv_end_date' => 'required|date_format:m/d/Y',\r\n\t\t\t\t\t'lv_reason' => 'required|max:1500'\r\n\t\t\t\t];\r\n\t\t\t}\r\n\t\t\tcase 'PUT':\r\n\t\t\tcase 'PATCH':\r\n\t\t\t{\r\n\t\t\t\treturn [\r\n\t\t\t\t\t'lv_totaldays' => 'required',\r\n\t\t\t\t\t'lv_start_date' => 'required|date_format:m/d/Y',\r\n\t\t\t\t\t'lv_end_date' => 'required|date_format:m/d/Y',\r\n\t\t\t\t\t'lv_reason' => 'required|max:1500'\t\t \r\n\t\t\t\t];\r\n\t\t\t}\r\n\t\t\tdefault:break;\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "50e12b159f9140054cf352dc4fea9272", "score": "0.7490797", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'POST':\n $this->errorBag = 'examPost';\n return [\n 'name' => 'required|min:6',\n 'stop_at' => 'required|time_greater_than:start_at',\n 'start_at' => 'required'\n ];\n break;\n case 'PATCH':\n $this->errorBag = 'examPatch';\n return [\n 'name' => 'required|min:6',\n 'stop_at' => 'required|time_greater_than:start_at',\n 'start_at' => 'required'\n ];\n break;\n default:\n\n break;\n }\n }", "title": "" }, { "docid": "62168d58dcc9e700df79efe6d26abf88", "score": "0.7490034", "text": "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'remark':\n return [\n 'remark' => 'required|string|max:1024',\n ];\n break;\n case 'hold':\n return [\n 'hold_reason' => 'required|integer|in:' . implode(',', array_keys(Withdrawal::$holdReasons)),\n ];\n break;\n case 'reject':\n return [\n 'reject_reason' => 'required|integer|in:' . implode(',', array_keys(Withdrawal::$rejectReasons)),\n ];\n break;\n case 'escalate':\n return [\n 'escalate_reason' => 'required|integer|in:' . implode(',', array_keys(Withdrawal::$escalateReasons)),\n ];\n break;\n case 'addRecords':\n return [\n 'records' => 'array',\n 'records.*.company_bank_account_code' => 'required|exists:company_bank_accounts,code',\n 'records.*.amount' => 'required|numeric|min:0',\n 'records.*.fee' => 'required|numeric|min:0|max:20',\n ];\n break;\n case 'image':\n return [\n 'image' => 'required|image|mimes:jpeg,bmp,png,gif',\n ];\n break;\n case 'index':\n return [\n 'filter.user_name' => 'required|exists:users,name'\n ];\n break;\n }\n }", "title": "" }, { "docid": "16dad2585aef61d8549a582e3b7d9dbd", "score": "0.7487347", "text": "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $locale = Locale::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'locale');\n $this->rules = array_add($this->rules, 'locale', 'required|size:2|unique:locales,locale,' . $locale->id);\n }\n\n return $this->rules;\n }", "title": "" }, { "docid": "0f3dad5bf9b8a2f02e1e770ea25e0ebf", "score": "0.74869245", "text": "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'code' => 'required|string',\n\t\t\t\t\t\t'name' => 'required|string',\n\t\t\t\t\t\t'display_name' => 'required|string',\n\t\t\t\t\t\t'extension' => 'required|string|max:10',\n\t\t\t\t\t\t'google_analytics' => 'nullable|string',\n\t\t\t\t\t\t'google_webmastertool' => 'nullable|string',\n\t\t\t\t\t\t'google_maps' => 'nullable|string',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'code' => 'required|string',\n\t\t\t\t\t\t'name' => 'required|string',\n\t\t\t\t\t\t'display_name' => 'required|string',\n\t\t\t\t\t\t'extension' => 'required|string|max:10',\n\t\t\t\t\t\t'google_analytics' => 'nullable|string',\n\t\t\t\t\t\t'google_webmastertool' => 'nullable|string',\n\t\t\t\t\t\t'google_maps' => 'nullable|string',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "title": "" }, { "docid": "3c1e0b676e681a468d4acbffdb1ad28a", "score": "0.7484899", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'year' => 'required|numeric',\n 'number' => 'required',\n 'name' => 'required|regex:/^[a-zA-Z0-9\\s]+$/|max:100',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'year' => 'required|numeric',\n 'number' => 'required',\n 'name' => 'required|regex:/^[a-zA-Z0-9\\s]+$/|max:100',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "title": "" }, { "docid": "7a262ba8b0ffc679be355f2718ad48d5", "score": "0.74720335", "text": "public function rules()\n {\n $rules = [\n 'client' => 'required|integer',\n 'credit' => 'int',\n 'fromdate' => 'required|date',\n 'todate' => 'required|date',\n 'balance' => 'required|decimal|min:0',\n 'status' => 'required|integer'\n ];\n\n switch ($this->getMethod())\n {\n case 'POST':\n return $rules;\n case 'PUT':\n return [\n 'id' => 'required|integer|exists:accounts,id'\n ] + $rules; // и берем все остальные правила\n // case 'PATCH':\n case 'DELETE':\n return [\n 'id' => 'required|integer|exists:accounts,id'\n ];\n }\n }", "title": "" }, { "docid": "040cb9a6fc34518d974196b78e901a8f", "score": "0.74614424", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|min:4|max:100',\n 'birthday' => 'required|date_format:d/m/Y',\n 'gender' => 'required|boolean',\n 'address' => 'required|max:255',\n 'phone_number' => 'required|max:15|regex:/^\\+?\\d+?$/',\n 'role_id' => 'required|integer|between:2,3',\n ];\n case 'POST':\n return [\n 'name' => 'required|max:100',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|max:32|min:6|confirmed',\n 'password_confirmation' => 'required|max:32|min:6',\n 'role_id' => 'required|integer|between:2,3',\n ];\n default:\n return [];\n }\n }", "title": "" }, { "docid": "4515d7ca8d6c4f25847f50fff3f5732a", "score": "0.7459925", "text": "public function rules()\n {\n $routeName = $this->route()->getName();\n switch ($routeName) {\n case \"api.material.store\":\n $rule = [\n \"name\" => \"required\",\n \"brand\" => \"required\",\n \"model\" => \"required\",\n \"unit\" => \"required|integer|in:0,1,2\",\n ];\n break;\n case \"api.material.delete\":\n $rule = [\n \"ids\" => \"required\",\n ];\n break;\n case \"api.material.detail\":\n $rule = [\n \"id\" => 'required_without:name',\n \"name\" => 'required_without:id'\n ];\n break;\n };\n\n return $rule;\n }", "title": "" }, { "docid": "6c07dd58089dee72a542e651dfcbc2f6", "score": "0.74588656", "text": "public function rules()\n {\n $routeName = $this->route()->getName();\n switch ($routeName) {\n case \"api.delivery-manage.store\":\n $rule = [\n 'member_name'\t => \"required\",\n 'bed_name'\t => \"required\",\n 'eat_time' => \"required\",\n 'meal_times'\t => \"required\",\n 'dishes_name' => \"required\",\n 'dining_style' => \"required\",\n\n ];\n break;\n case \"\":\n $rule = [];\n break;\n };\n\n return $rule;\n }", "title": "" }, { "docid": "b8b4d60de77aac20446ecff5d73d4ec0", "score": "0.7458674", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n case 'PATCH': {\n return [\n 'name' => 'required|min:3|max:255'\n ];\n }\n case 'DELETE':\n default: return [];\n }\n }", "title": "" }, { "docid": "f12d462947a2a50ce011fcd6bf1f47d8", "score": "0.7456638", "text": "public static function getValidationRules(): array;", "title": "" }, { "docid": "07bb6e4c7e8919d4d4637d5377b145d9", "score": "0.74563336", "text": "private function getFormValidationRules() {\n return array(\n 'name' => 'required|max:99',\n 'image' => 'image',\n );\n }", "title": "" }, { "docid": "ebb5f02546f16bf2439aff219fd13585", "score": "0.74541306", "text": "public function rules()\n {\n $languages = resolve(LanguageOptions::class)->keys();\n $activity = $this->route('activity');\n\n return [\n 'title' => 'required|max:255',\n 'difficulty_level' => 'required|integer|between:1,3',\n 'playing_time' => 'required|integer|min:0',\n 'language' => 'required|in:' . implode(',', $languages),\n 'contact_information' => 'max:255',\n 'featured_image' => 'image|mimes:jpeg,jpg,png',\n 'zoo' => ( $activity && auth()->user()->cannot('changeZoo', $activity) ) ? 'in:1,2,3' : 'required|in:1,2,3',\n 'proximity_check' => 'integer|in:1',\n 'proximity_radius' => 'integer|between:25,100',\n ];\n }", "title": "" }, { "docid": "948bb254fb4233d26d5fd248b26372f1", "score": "0.7447661", "text": "private function getValidationRules() {\n return [\n 'team1' => 'required|string|min:2|max:255',\n 'team2' => 'required|string|min:2|max:255',\n 'point1' => 'required|integer|min:0|max:100',\n 'point2' => 'required|integer|min:0|max:100',\n 'result' => 'required|boolean',\n ];\n }", "title": "" }, { "docid": "efc43253c4303ce4e89535600152cdac", "score": "0.74442357", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n ];\n case 'PUT':\n case 'PATCH':\n case 'GET':\n case 'DELETE':\n default:\n {\n return [];\n }\n }\n }", "title": "" }, { "docid": "f701869ae7fc9d8c13d78d7c3d2905f7", "score": "0.7440865", "text": "public function rules()\n {\n $rules = $this->rules;\n \n if(Request::isMethod('PATCH')){\n $rules['vipName'] = 'required|max:12';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "a16294606724f9e8280176c71c161be3", "score": "0.74363554", "text": "public function rules()\n {\n $rules = [\n 'andProcess' => 'required|boolean',\n ];\n\n if ($this->request->has('assessment')) {\n $rules['assessment.assessment_date'] = 'required|date';\n $rules['assessment.assessor_name'] = 'required';\n $rules['assessment.homeowner_name'] = 'required';\n $rules['assessment.homeowner_email'] = 'required|email';\n $rules['assessment.homeowner_phone'] = 'required';\n $rules['assessment.homeowner_address'] = 'required';\n }\n\n if ($this->request->has('improvements')) {\n foreach($this->request->get('improvements') as $key => $imp) {\n $rules['improvements.'.$key.'.improvement_id'] = 'required|integer';\n if (isset($imp['value'])) {\n $rules['improvements.'.$key.'.value'] = Rule::in(['have', 'need', 'n/a']);\n }\n if (isset($imp['comment'])) {\n $rules['improvements.'.$key.'.comment'] = 'string|nullable';\n }\n }\n }\n\n return $rules;\n }", "title": "" }, { "docid": "50faa08937cf913264c54657247df529", "score": "0.7433532", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n //\n \"name\" => \"required\",\n \"email\" => 'required|email|unique:users,email|max:50',\n \"type\" => \"required\",\n \"status\" => \"required\",\n \"password\" => 'required|min:6|confirmed',\n \"password_confirmation\" => \"required\"\n ];\n\n break;\n\n case 'PATCH' :\n return [\n //\n \"name\" => \"required\",\n \"type\" => \"required\",\n \"status\" => \"required\",\n ];\n break;\n \n default:\n # code...\n break;\n }\n \n }", "title": "" }, { "docid": "adca33d17bf1de7cd881a4e37dc30198", "score": "0.74313587", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'Sgd_GroupID' => 'required',\n 'Sgd_SubscriberID' => 'required|array'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'Sgd_GroupID' => 'required',\n 'Sgd_SubscriberID' => 'required'\n ];\n }\n }", "title": "" }, { "docid": "7747cb9b500024f3248fd9e17b891ffd", "score": "0.7419565", "text": "public function rules()\n {\n $rules = array();\n\n $rules['imagen'] = $this->validarImagen();\n $rules['nombre'] = $this->validarNombre();\n $rules['email'] = $this->validarEmail();\n $rules['especialidad'] = $this->validarEspecialidad();\n// $rules['clinicas'] = $this->validarClinicas();\n $rules['num_colegiado'] = $this->validarNumColegiado();\n $rules['curriculum'] = $this->validarCurriculum();\n\n return $rules;\n }", "title": "" }, { "docid": "55b8a444999979a0599a5b40913c09b6", "score": "0.7416542", "text": "public function rules()\n {\n $rules = [];\n switch (\\request()->getPathInfo()){\n case '/user/cooks':\n if (\\request()->isMethod('POST')){\n $rules['title'] = 'required';\n $rules['category_ids'] = 'required';\n $rules['introduction'] = 'required';\n $rules['ingredients'] = 'required';\n }\n break;\n }\n return $rules;\n }", "title": "" }, { "docid": "20034c828782eb3c046f6515ee910583", "score": "0.7410075", "text": "public function rules()\n {\n\n $rules = [];\n\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [];\n break;\n }\n case 'POST':\n {\n $rules = [\n 'branch_id' => 'required|exists:branches,id',\n 'method_id' => 'required|exists:payment_methods,id',\n 'amount' => 'required',\n 'capital_date' => 'required',\n 'fiscal_period_id' => '',\n 'description' => ''\n ];\n break;\n }\n case 'PUT':\n case 'PATCH':\n {\n $rules = [\n 'branch_id' => 'required|exists:branches,id',\n 'method_id' => 'required|exists:payment_methods,id',\n 'amount' => 'required',\n 'capital_date' => 'required',\n 'fiscal_period_id' => '',\n 'description' => ''\n ];\n break;\n }\n default:\n break;\n }\n\n return $rules;\n\n }", "title": "" }, { "docid": "5f73049522945f727f6a4e9e79ff0b38", "score": "0.7409256", "text": "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email|string',\n 'email_type' => 'string|nullable',\n 'status' => 'required|string|in:pending,subscribed,unsubscribed,cleaned',\n 'merge_fields' => 'array|nullable',\n 'interests' => 'array|nullable',\n 'language' => 'string|nullable',\n 'vip' => 'boolean|nullable',\n 'location.latitude' => 'nullable|integer',\n 'location.longitude' => 'nullable|integer',\n 'marketing_permissions.marketing_permission_id' => 'string|nullable',\n 'marketing_permissions.enabled' => 'boolean|nullable',\n 'list_id' => 'required|string'\n ];\n }", "title": "" }, { "docid": "9813a70dff92f57eb4afe944434d9444", "score": "0.740211", "text": "public function rules()\n {\n $id = $this->route()->parameter('user');\n\n $rules = [\n 'name' => 'required|between:4,16',\n 'role_id' => 'required',\n ];\n\n if (request()->method() == 'POST') {\n $rules['password'] = 'required';\n $rules['email'] = 'required|email|unique:' . (new User)->getTable();\n\n } else {\n $rules['email'] = 'required|email|unique:' . (new User)->getTable() . ',email,' . $id . ',id';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "ba1b123fa0db336dbac5cea37651575f", "score": "0.73996425", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'POST': // CREATE\n case 'PUT': // UPDATE\n case 'PATCH': // UPDATE\n {\n return [\n 'title' => 'required|min:3',\n 'content' => 'required|min:3',\n 'course_id' => 'required|numeric',\n 'chapter_id' => 'required|numeric',\n ];\n }\n case 'GET':\n case 'DELETE':\n default:\n {\n return [];\n };\n }\n }", "title": "" }, { "docid": "69ad1f6e2877cf8c0a785769c78ef420", "score": "0.73994297", "text": "public function rules()\n {\n return array_merge(\n $this->getRulesForTranslation(\n 'name',\n 'required|string'\n ),\n $this->getRulesForTranslation(\n 'preview',\n 'string'\n ),\n $this->getRulesForTranslation(\n 'text',\n 'string'\n ),\n $this->getBaseRules()\n );\n }", "title": "" }, { "docid": "173fd60dbc4d9b838e212c6eed8f39d0", "score": "0.73979235", "text": "public function rules()\n {\n $rules = [];\n if($this->method() == 'POST'){\n $rules = [\n 'title' => 'required|string',\n 'slug' => 'required|string',\n 'content' => 'required|string|max:255',\n 'is_published' => 'nullable|boolean',\n ];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "ae084bf530fa9aeaef41de86e3c06312", "score": "0.73949116", "text": "protected function getValidationRules(Request $request)\n {\n return array_merge(\n $this->filteredFields($request)\n ->reduce(function ($rules, Field $field) use ($request) {\n $rules[$field->name] = $this->resourceModel->id === null\n ? $field->getCreationRules()\n : $field->getUpdateRules();\n\n return $rules;\n }, []),\n $this->additionalValidationRules\n );\n }", "title": "" }, { "docid": "5988f5548a36ad0e7be54161ba920923", "score": "0.73914737", "text": "public function rules()\n {\n $rules = [\n\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "a0bbfdc301943bb21e2b5d010394d28b", "score": "0.73877305", "text": "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'alarmMessage':\n return [\n 'client_id' => 'required|string|max:125',\n 'ip' => 'required|ip',\n 'type' => 'required|string|max:64',\n 'event_num' => 'required|numeric',\n 'hex_data' => 'required|string|max:255',\n 'serial_number' => 'required|string|max:255',\n 'check_sum' => 'required|string|max:255',\n ];\n default:\n {\n return [];\n }\n }\n }", "title": "" }, { "docid": "1b764fba45c61f0a5f6fbf9a4afe7bba", "score": "0.73850024", "text": "public function rules(): array\n {\n switch($this->getMethod())\n {\n // CREATE\n case 'POST':\n return [\n 'username'=> ['required','between:4,15'],\n 'password'=> ['required','between:4,15'],\n 'status'=> ['required','numeric'],\n 'mobile'=>['required','numeric'],\n 'email'=>['email'],\n 'roleIdList'=>['required','array'],\n ];\n case 'PUT':\n return [\n 'user_id' => ['required',Rule::exists('sys_user','user_id')],\n 'username'=> ['required','between:4,15'],\n 'password'=> ['required','between:4,15'],\n 'status'=> ['required','numeric'],\n 'mobile'=>['required','numeric'],\n 'email'=>['email'],\n 'roleIdList'=>['required','array'],\n ];\n case 'GET':\n return [\n 'id' => ['required',Rule::exists('sys_user','user_id')],\n ];\n case 'DELETE':\n return [\n 'id' => ['required'],\n ];\n default:\n {\n return [];\n };\n }\n }", "title": "" }, { "docid": "691d91fc250201b09de7602365ebc05c", "score": "0.73779774", "text": "public function rules()\n {\n $rules = [\n 'first_name'=> 'required',\n 'last_name' => 'required',\n 'email' => 'required|email',\n 'mobile' => 'required',\n ];\n\n if ($this->method() == 'POST') {\n $rules['photo'] = 'required';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "78f1562fcadfcee36397fa4b0a8d4e5d", "score": "0.7377877", "text": "public function rules()\n {\n $rules = parent::rules();\n $rules = array_merge($rules, [\n ]);\n\n return $rules;\n }", "title": "" }, { "docid": "c1862e318496c0ac08c9b8a95f87506c", "score": "0.73763937", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required|string|max:20',\n 'avatar' => 'required|url',\n ];\n\n switch ($this->method()) {\n case 'POST':\n $rules['email'] = 'required|email|unique:users,email';\n $rules['password'] = 'required|min:6|max:20|confirmed';\n break;\n case 'PUT':\n $rules['email'] = ['required', 'email', Rule::unique('users')->ignore($this->route('user'))];\n $rules['password'] = 'nullable|min:6|max:20|confirmed';\n $rules['avatar'] = 'nullable|url';\n break;\n default:\n return [];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "2afb7b5260c95dd3ff8db07af4f73030", "score": "0.73760486", "text": "public function rules()\n {\n foreach ($this->request as $key => $value) {\n if (strpos($key,'content') !== false ) {\n $rules[$key] = 'bail|required|string|max:160';\n }\n if(strpos($key,'answer') !== false ){\n $rules[$key] = 'in:yes,no';\n }\n }\n\n return $rules;\n }", "title": "" }, { "docid": "65bcf02cd8955f76b3d7b6b2b14bae1c", "score": "0.7372523", "text": "public function rules()\n {\n $rules = [\n 'role_id' => 'required|string',\n 'redirect' => 'nullable|string',\n 'block' => [\n 'required',\n Rule::in(0,1)\n ],\n 'reset_password' => [\n 'required',\n Rule::in(0,1)\n ],\n\n ];\n return array_merge($rules, parent::rules());\n }", "title": "" }, { "docid": "0ed5bb8726138ff8ade4932de26d834a", "score": "0.73713684", "text": "public static function getRules()\n {\n return [\n 'name' => 'required|min:3|max:60',\n\n 'email' => 'required|email|max:60',\n 'comment' => 'required|min:2',\n\n 'news_id' => 'required|exists:news,id',\n// 'subscribe_news' => 'boolean',\n// 'subscribe_comments' => 'boolean'\n ];\n }", "title": "" }, { "docid": "19dde850a1b161dd4251a7b96efcc20c", "score": "0.7369564", "text": "public function rules()\n {\n $rules = array_merge($this->generalRules, $this->customRules);\n\n return $rules;\n }", "title": "" }, { "docid": "c176259133123d825902de45f8d6462d", "score": "0.7368879", "text": "public function rules()\n {\n $rules = array();\n if($this->exists('nombre')){\n $rules['nombre'] = $this->validarNombre();\n }\n if($this->exists('equipamiento')) {\n $rules['equipamiento'] = $this->validarEquipamiento();\n }\n\n return $rules;\n }", "title": "" }, { "docid": "e95a42fbdd38296d8be13f5f9a672373", "score": "0.7364651", "text": "public function rules()\n {\n $rules = [];\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n 'invitation_text' => 'required',\n 'invitation_subject' => 'required',\n 'friends' => 'required',\n 'friends.*.email' => 'required|email',\n 'friends.*.name' => 'required',\n ]);\n }\n\n return $rules;\n }", "title": "" }, { "docid": "9a9e4e383984fa4172db516fb7e97f3a", "score": "0.73587877", "text": "protected function rules(): array\n {\n return $this->rules;\n }", "title": "" }, { "docid": "3df493909a246230d592f77b6dc50255", "score": "0.7350071", "text": "public function rules()\n {\n\n // store => post\n\n switch ($this->getMethod()) {\n case Request::METHOD_POST:\n return $this->postRule();\n default:\n return [];\n }\n }", "title": "" }, { "docid": "08c8727b581426b1bc4e5a6545bd2dc1", "score": "0.73455524", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required|max:255',\n ];\n\n if ($this->request->get('password')) {\n $rules['old_password'] = 'required|min:3|old_password';\n $rules['password'] = 'required|min:3|confirmed';\n $rules['password_confirmation'] = 'required';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "d04a249d08672e78eefcbf2b5d3dda78", "score": "0.73448825", "text": "public function defineValidationRules()\n {\n return [];\n }", "title": "" }, { "docid": "0c9e10f71e8f798faa5a1848e10486b2", "score": "0.73438406", "text": "public function rules(): array\n {\n switch ($this->getMethod())\n {\n case 'POST':\n $rules = [\n 'title' => 'required|string|between:2,50',\n 'description' => 'required|string|between:2,1000',\n 'price' => 'required|numeric',\n 'stock' => 'required|integer|min:0',\n ];\n return $rules;\n break;\n case 'PATCH':\n $rules = [\n 'title' => 'nullable|string|between:2,50',\n 'description' => 'nullable|string|between:2,1000',\n 'price' => 'nullable|numeric',\n 'stock' => 'required|integer|min:0',\n ];\n return $rules;\n break;\n case 'DELETE':\n return [\n\n ];\n\n }\n }", "title": "" }, { "docid": "cc8493476388572dc13608b52564bda2", "score": "0.7341267", "text": "public function rules()\n {\n $rules = [\n \n ];\n\n return $rules;\n }", "title": "" }, { "docid": "58ce3a44cc1f8b15269ae603c08aff8b", "score": "0.7338834", "text": "public function rules()\n {\n $argumentName = $this->getLastPathElement();\n\n if ($argumentName == 'email'){\n return [\n 'email' => [\n 'required',\n 'email',\n Rule::unique('users')->ignore(Auth::id()),\n Rule::unique('athletes'),\n Rule::unique('contacts')\n ],\n ];\n }\n\n elseif ($argumentName == 'password'){\n return [\n 'current_password' => [\n 'required',\n new MatchPassword(),\n ],\n 'password' => $this->baseRules['conf_password'],\n ];\n }\n\n else {\n return response('Bad Request', 400);\n }\n }", "title": "" }, { "docid": "cf1b12a529f1cf84562f7537326495fb", "score": "0.73375714", "text": "public function rules()\n\t{\n\t\tif (request()->method() == \"POST\") {\n\t\t\t$rule = [\n\t\t\t\t'email' => [\n\t\t\t\t\t'required', 'string', 'unique:users',\n\t\t\t\t],\n\t\t\t\t'mobile' => [\n\t\t\t\t\t'required', 'min:7', 'numeric', 'unique:users',\n\t\t\t\t],\n\t\t\t];\n\t\t} else {\n\t\t\t$rule = [\n\t\t\t\t'email' => [\n\t\t\t\t\t'required', 'string', 'unique:users,email,' . request()->user->id,\n\t\t\t\t],\n\t\t\t\t'mobile' => [\n\t\t\t\t\t'required', 'min:10', 'numeric', 'unique:users,mobile,' . request()->user->id,\n\t\t\t\t],\n\t\t\t];\n\t\t}\n\n\t\tif (request()->filled('password')) {\n\t\t\t$rule['password'] = [ 'required', 'string', 'min:6' ];\n\t\t}\n\n\t\t$validation = [\n\t\t\t'name' => [\n\t\t\t\t'required', 'string', 'max:50',\n\t\t\t],\n\t\t\t'dob' => [\n\t\t\t\t'nullable', 'date_format:Y-m-d',\n\t\t\t],\n\t\t\t'country' => [\n\t\t\t\t'nullable', 'string', 'max:50',\n\t\t\t],\n\t\t];\n\n\t\treturn $rule + $validation;\n\t}", "title": "" }, { "docid": "09fb2136482ceafdbc35887e4cac1896", "score": "0.7334593", "text": "public function rules()\n {\n $rules = Jalur::$rules;\n \n return $rules;\n }", "title": "" }, { "docid": "f1c60203277310309ae318018bcc6b98", "score": "0.732523", "text": "public function rules()\n {\n $rules = [];\n return $rules;\n }", "title": "" }, { "docid": "3f42cf99344deab8326d11e92fc21b93", "score": "0.7323703", "text": "public function rules(Request $request)\n {\n return $this->getRulesByRequestMethods($request->method());\n }", "title": "" } ]
7b38b6b71ae0233865577f8e2058128c
TODO: Set based version
[ { "docid": "9ccf81529e04d5010723109c5ba8a508", "score": "0.0", "text": "function groupBy($f, $ls){\r\n $d = [];\r\n foreach($ls as $x){\r\n $v = $f($x);\r\n if(isKey($v, $d)) $d[$v][] = $x;\r\n else $d[$v] = [$x];\r\n }\r\n return $d;\r\n }", "title": "" } ]
[ { "docid": "e625db85e3a1c9839a8a8eeb66ba0805", "score": "0.8075103", "text": "public abstract function version();", "title": "" }, { "docid": "f3b24e8230d23429fb375a1bcaa07000", "score": "0.79260504", "text": "public function version();", "title": "" }, { "docid": "f3b24e8230d23429fb375a1bcaa07000", "score": "0.79260504", "text": "public function version();", "title": "" }, { "docid": "f3b24e8230d23429fb375a1bcaa07000", "score": "0.79260504", "text": "public function version();", "title": "" }, { "docid": "f3b24e8230d23429fb375a1bcaa07000", "score": "0.79260504", "text": "public function version();", "title": "" }, { "docid": "0a8cd481e0a46edbe564659f84394a57", "score": "0.7838104", "text": "public function version() {}", "title": "" }, { "docid": "0a8cd481e0a46edbe564659f84394a57", "score": "0.7838104", "text": "public function version() {}", "title": "" }, { "docid": "0bf24e7f16bf0ba00cb0b757f4b20296", "score": "0.7608087", "text": "protected function assignVersion()\n {\n\n }", "title": "" }, { "docid": "39f94a4bc0794799836b7172bd453886", "score": "0.75465226", "text": "public function version()\n {\n // Implement version\n }", "title": "" }, { "docid": "67d045a1cd807abc161275a048e369bc", "score": "0.7530258", "text": "public function version_1_0()\n {\n //TODO\n }", "title": "" }, { "docid": "7733971f10fdf5406ebecff986618c24", "score": "0.74878687", "text": "public static function getVersion () {}", "title": "" }, { "docid": "b36e42968cafcc97fdcaf8e7c5fcf0de", "score": "0.7447683", "text": "function setVersion($version);", "title": "" }, { "docid": "8bbb452f54f67e7e494a7ac8da1351dd", "score": "0.74392354", "text": "public function setVersion($var) {}", "title": "" }, { "docid": "99c9593041655b435716a24fb78f44ca", "score": "0.7415654", "text": "public function getVersion() {\n\t}", "title": "" }, { "docid": "108c5c2e6378c8a82fb314e8a9993cd2", "score": "0.7412846", "text": "protected function setVersion()\n\t{\n\t\t$this->version = \\SocialCuratorGrid\\Helpers::version();\n\t}", "title": "" }, { "docid": "00b02ac5a59ca08db669068ca2da0859", "score": "0.7392149", "text": "public function getVersion() {}", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.73539186", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.73539186", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.73539186", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.73539186", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.73539186", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.73539186", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.73539186", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.73539186", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.73539186", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.73539186", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.73539186", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.73539186", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.73539186", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.73539186", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.73539186", "text": "public function getVersion();", "title": "" }, { "docid": "8681401c8fe71d3a1b858b061bff7f00", "score": "0.7310121", "text": "function getVersion();", "title": "" }, { "docid": "00c1d4255f4868eb6a1c30f292f1cdfe", "score": "0.7293457", "text": "public function __construct(){\n $this->version = $this->getCurrentVersion();\n\t\t\n }", "title": "" }, { "docid": "79ce04f7cfff1ce1f4376c03d0ce3f92", "score": "0.726261", "text": "public function __construct(){\n $version = \"1.0.0\";\n }", "title": "" }, { "docid": "b7a0c0d798a67dbe552def785b7410e7", "score": "0.72538775", "text": "function getVersion()\r\n\t{\r\n\t\treturn '1.0.1';\r\n\t}", "title": "" }, { "docid": "b8b9336682d155929a89a3e674df7486", "score": "0.7243865", "text": "public static function getVersion();", "title": "" }, { "docid": "b644253408477c0539cab2850508a8b2", "score": "0.7171424", "text": "function getVersion()\r\n\t{\r\n\t\treturn '1.0.0';\r\n\t}", "title": "" }, { "docid": "2bcd1d279febc3100a9e7d4f630fe1db", "score": "0.71179026", "text": "function GetVersion()\r\n\t{\r\n\t\treturn \"0.7.2.1\";\r\n\t}", "title": "" }, { "docid": "4accfacdf5d55abdd7aa4bd2cc1b72b3", "score": "0.70862204", "text": "function version(){\n\t\treturn $this->version;\n\t}", "title": "" }, { "docid": "a81d8e05fc311e9d72d1f1f4222a0559", "score": "0.70652443", "text": "public function setVersion($version);", "title": "" }, { "docid": "a81d8e05fc311e9d72d1f1f4222a0559", "score": "0.70652443", "text": "public function setVersion($version);", "title": "" }, { "docid": "645f7af1c35a55742909fc38ea5e6925", "score": "0.7045171", "text": "function getVersion()\r\n\t{\r\n\t\treturn \"-\";\r\n\t}", "title": "" }, { "docid": "cb8287daebba11bfa4dfa407a39340eb", "score": "0.69985104", "text": "abstract public function getLocalVersion(): int;", "title": "" }, { "docid": "89c755b28e3ee339839b5fe2c35404b0", "score": "0.6956112", "text": "public function getCurrentVersion();", "title": "" }, { "docid": "c883d9a4d3fc9630b83ba8d510ceba17", "score": "0.68368477", "text": "public function updateVersion()\n {\n switch ($this->version) {\n case null:\n $this->settings['version'] = '1.0.6';\n $this->settings['retries'] = 0;\n break;\n case '1.0.6':\n $this->settings['version'] = '1.1.0';\n $this->meta = [];\n break;\n case '1.1.0':\n $this->settings['version'] = '1.2.0';\n $this->settings['handler'] = null;\n break;\n }\n }", "title": "" }, { "docid": "67f0d9f6590e45df549d6637576021ad", "score": "0.6816215", "text": "public function biffVersion()\n\t{\n\t}", "title": "" }, { "docid": "81b07970cd0946f4f927d00cea909266", "score": "0.67812586", "text": "static function version()\r\n\t\t{\r\n\t\t\treturn '1.0 Beta2';\r\n\t\t}", "title": "" }, { "docid": "24f64bb7447b0c7fe88ef263dc0b2410", "score": "0.6752565", "text": "function get_version() {\n return self::VERSION;\n }", "title": "" }, { "docid": "86c2de839010616f5fefb2908c9b7066", "score": "0.6742854", "text": "function bbp_version_updater()\n{\n}", "title": "" }, { "docid": "b260559a25f0c16ed2561422d4e4d3fa", "score": "0.6732635", "text": "public function version(): Version;", "title": "" }, { "docid": "8ca82916edf3382514d2b06492e05521", "score": "0.6718671", "text": "static public function set($version)\n {\n self::$version = $version;\n }", "title": "" }, { "docid": "7b789420dcdd651eb1026cd4846dee43", "score": "0.6684948", "text": "function version()\r\n\t{\r\n\t\treturn $this->version;\r\n\t}", "title": "" }, { "docid": "a244da2dafbf4ee7d101d5bf7db62015", "score": "0.6671444", "text": "function bbp_get_version()\n{\n}", "title": "" }, { "docid": "45e12b00ca2483078dd8c0881dfd27e5", "score": "0.66688", "text": "abstract public function getServerVersion();", "title": "" }, { "docid": "d3a0b8c4d9a383a39aecbb1e42b58c96", "score": "0.66672426", "text": "function get_version() {\n return self::VERSION;\n }", "title": "" }, { "docid": "28d8972f7afba1068b7696a40d9ae581", "score": "0.66473246", "text": "public function setVersion($version): self;", "title": "" }, { "docid": "38b20c4a0d9f3327336a667bd725715c", "score": "0.6641042", "text": "public static function version(): string {\n return '0.1';\n }", "title": "" }, { "docid": "61ef85e61c7ed5c8df9553c4cbca22c3", "score": "0.6627081", "text": "function getVersion() {\n\t\treturn '0.6'; \n\t}", "title": "" }, { "docid": "6386beab8711a5441db959702c29f693", "score": "0.66255397", "text": "public static function version()\n\t{\n\t\treturn '1.0';\n\t}", "title": "" }, { "docid": "f20c993b5b51cacf6f5397de536dadb3", "score": "0.6624695", "text": "protected abstract function getExpectedVersion();", "title": "" }, { "docid": "3295775773527f179cc63e4f5c97cc8e", "score": "0.66196465", "text": "public function getVersionNumber();", "title": "" }, { "docid": "a13d8a13e77ba34cde503fc89e1c8695", "score": "0.660557", "text": "function version($params = \"\")\n {\n return array ( \"version\" => \"beta\" );\n }", "title": "" }, { "docid": "b31a38d7b6d7a1bb0bc58398d794a791", "score": "0.6589561", "text": "public function version() { return $this->_m_version; }", "title": "" }, { "docid": "79f5a7f3b5254d1e47e1478d4fb5b830", "score": "0.6573876", "text": "function isVersionable() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "81847b0afc270ddd369153d5ee5311b2", "score": "0.656686", "text": "public function get_version() {\n return $this->version;\n }", "title": "" }, { "docid": "e42253b94d0b5c7b729de488769b7788", "score": "0.65423983", "text": "public function version() \n\t{\n\t\treturn $this->version;\t\n\t}", "title": "" }, { "docid": "8d63eb6afa642933837b30df025b1ef8", "score": "0.6526468", "text": "function getVersionField() {\n\t\ttrigger_error('Versionable is not implemented in driver formDB');\n\t}", "title": "" }, { "docid": "2833110cfa19183614c4ef0d18cc89aa", "score": "0.6521658", "text": "public function getStartingVersion();", "title": "" }, { "docid": "2ea6a3afaa36acdb95293b60065453d6", "score": "0.6519162", "text": "private function SetVersion($version){\n\t\t$this->version = $version;\n\t}", "title": "" }, { "docid": "a342d7fde6d84b5ceb1764381314461a", "score": "0.651451", "text": "private function getVersion()\n {\n return $this->version;\n }", "title": "" }, { "docid": "2752230d6878bac062fc60d80ba594c4", "score": "0.6505918", "text": "public function version() {\n return $this->version;\n }", "title": "" }, { "docid": "e86b74694069b8c50594bc9986ff6927", "score": "0.6485404", "text": "public function getVersion() { return $this->_version; }", "title": "" }, { "docid": "ae84cb4a59d4e4eee6fc25d9df62a9bf", "score": "0.64848053", "text": "public function version(): string;", "title": "" }, { "docid": "5dc73f2803a806022a9cb4f05458c57d", "score": "0.6483417", "text": "abstract function getApiVersion();", "title": "" }, { "docid": "6ca323b2327a430fceadd1c5b1ef8b7d", "score": "0.6483389", "text": "public static function getVersion()\n {\n \treturn self::MAJOR_VERSION . self::MINOR_VERSION . self::REVISION;\n }", "title": "" }, { "docid": "d2f8516ebef1f7f7025c611bc47f9d89", "score": "0.6479422", "text": "private function _log_version_number() {\n\t\tupdate_option( $this->_token . '_version', $this->_version );\n\t}", "title": "" }, { "docid": "9f470fb718b1f5b4da52be6da0494df0", "score": "0.6478847", "text": "public function getVersion(): string;", "title": "" }, { "docid": "9f470fb718b1f5b4da52be6da0494df0", "score": "0.6478847", "text": "public function getVersion(): string;", "title": "" }, { "docid": "877683fc5fc80d9b7b5b8869573234b1", "score": "0.646138", "text": "public function version()\r\n\t{\r\n\t\treturn '0';\r\n\t}", "title": "" }, { "docid": "6a691b474783943b58f63abb9baad4ad", "score": "0.64598715", "text": "public function getVersion(): int;", "title": "" }, { "docid": "6a691b474783943b58f63abb9baad4ad", "score": "0.64598715", "text": "public function getVersion(): int;", "title": "" }, { "docid": "5a0a544d90e11e95b7f4b7c5dd0ee1ed", "score": "0.6443769", "text": "public function getTargetVersion();", "title": "" }, { "docid": "62657820b5c83edefbb42aae14b4fa62", "score": "0.64319927", "text": "public static function getVersion()\r\n {\r\n return '0.0.1';\r\n }", "title": "" }, { "docid": "89c3abc7bfecb26a194c0f0449ee2a9a", "score": "0.64247525", "text": "private function changeVersion(): void\n {\n if (!$this->versionAlreadyChanged) {\n $this->version = Uuid::uuid4()->toString();\n $this->versionAlreadyChanged = true;\n }\n }", "title": "" }, { "docid": "972e9e828a316458bc9ce5891ad58baf", "score": "0.64221615", "text": "public function getVersion()\n {\n return '1.0.1';\n }", "title": "" }, { "docid": "5afe8c4142885219e6e04db05ccd23a8", "score": "0.64043814", "text": "private function _log_version_number()\n {\n update_option($this->_token . '_version', $this->_version);\n }", "title": "" }, { "docid": "d2ee799fe75c384e87d05364008e02cb", "score": "0.63948125", "text": "public function set_version_number() {\n\t\t$current_version = get_option('fsn_current_version');\n\t\tif (empty($current_version) || $current_version != FSN_VERSION) \t{\n\t\t\tupdate_option('fsn_current_version', FSN_VERSION);\n\t\t}\n\t}", "title": "" }, { "docid": "247944da00716134171632324d870cd1", "score": "0.63892", "text": "public static function getVersion()\n {\n return '0.2.1';\n }", "title": "" }, { "docid": "b11a07178f73c16e36740ad5fc817505", "score": "0.6384665", "text": "private function _log_version_number() {\n update_option($this->_token . '_version', $this->_version);\n }", "title": "" }, { "docid": "84e46c14e169f103019320ee58e31770", "score": "0.63800544", "text": "public static function getVersion()\n {\n return '1.1.0';\n }", "title": "" }, { "docid": "bcdeb655f661c4a9d05d09fbc42f9900", "score": "0.6365229", "text": "public function getVersion()\n {\n return '1.0';\n }", "title": "" }, { "docid": "1c3f39701d30d1c382b9e69596117306", "score": "0.63643116", "text": "public function testGetVersion()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "d4e42839041d72aea42baa115c64f582", "score": "0.6362837", "text": "function versions()\n{\n return array('4.2', '4.1', '4.0', '3.7', '3.6', '3.5', '3.4', '3.3', '3.2', '3.1', '3.0',\n '2.3', '2.2', '2.1', '2.0');\n}", "title": "" }, { "docid": "c7568cbb96aa74be47e36dec311dd9bd", "score": "0.6356242", "text": "public function getVersion()\n\t{\n\t\treturn '1.0.0';\n\t}", "title": "" }, { "docid": "3a5d63e65ccc9f7402ba4df8a2ac006d", "score": "0.6346269", "text": "public function get_version()\n {\n return $this->version;\n }", "title": "" }, { "docid": "3a5d63e65ccc9f7402ba4df8a2ac006d", "score": "0.6346269", "text": "public function get_version()\n {\n return $this->version;\n }", "title": "" }, { "docid": "7b8abde97d5d689da9a12aa314577403", "score": "0.6340677", "text": "public function testSetVersion()\n {\n $newVersion = 'abc';\n $this->helper->setVersion($newVersion);\n\n $contents = file_get_contents(sys_get_temp_dir() . '/composer.json');\n $this->assertContains('\"version\": \"abc\"', $contents);\n }", "title": "" }, { "docid": "cca3c0af4f6fe79bd154e705f12ce3c8", "score": "0.6327745", "text": "function bbp_version_bump()\n{\n}", "title": "" }, { "docid": "ec2116d9026ea215bdb4471b37c662ef", "score": "0.6326058", "text": "public function get_version() {\n\t\treturn $this->version;\n\t}", "title": "" }, { "docid": "ec2116d9026ea215bdb4471b37c662ef", "score": "0.6326058", "text": "public function get_version() {\n\t\treturn $this->version;\n\t}", "title": "" }, { "docid": "ec2116d9026ea215bdb4471b37c662ef", "score": "0.6326058", "text": "public function get_version() {\n\t\treturn $this->version;\n\t}", "title": "" } ]
10b6cb33b504ede99c692cf3b866faf8
get username and password passed
[ { "docid": "8e3e89b09e673c81ba973f6790850477", "score": "0.0", "text": "function processData(){\n global $bad_chars;\n $params = array();\n $params[] = trim(str_replace($bad_chars, \"\",$_POST['username'])); #0\n $params[] = trim(str_replace($bad_chars, \"\",$_POST['pass'])); #1\n\n return $params;\n}", "title": "" } ]
[ { "docid": "ab64b86de90de998361e898f341c085f", "score": "0.7313699", "text": "function getCredentials();", "title": "" }, { "docid": "1178789e0245fbccf1388c7af35a45d5", "score": "0.7305958", "text": "function getPassword();", "title": "" }, { "docid": "0b158dddf04143b9f923b16836ef117f", "score": "0.71294636", "text": "public function get_auth_string() {\n\t\treturn $this->user . ':' . $this->pass;\n\t}", "title": "" }, { "docid": "6c0a8b4299ca623fcb2004198db39a29", "score": "0.7025016", "text": "public function userlogin($username,$password);", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.69539213", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.69539213", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.69539213", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.69539213", "text": "public function getPassword();", "title": "" }, { "docid": "509cfbb7d0f6ed1542360f09b96bd483", "score": "0.6950457", "text": "public function authenticateByPassword($username, $password);", "title": "" }, { "docid": "67e57183ba56d5b84fbacc65c09e5d27", "score": "0.69027835", "text": "public function getCredentials();", "title": "" }, { "docid": "67e57183ba56d5b84fbacc65c09e5d27", "score": "0.69027835", "text": "public function getCredentials();", "title": "" }, { "docid": "2c857df9e7da14041527409dbf9e949a", "score": "0.6898644", "text": "function getPassword($user);", "title": "" }, { "docid": "e95a7f88996be48e9b165877715df451", "score": "0.6857594", "text": "public function doLogin($username, $password);", "title": "" }, { "docid": "06369442acbc3f94c67680594af3493a", "score": "0.68341976", "text": "function getAuthUsernamePassword() {\n $authName = findAuthJson();\n $auth = json_decode(file_get_contents($authName), true);\n $up = $auth[\"http-basic\"][\"repo.magento.com\"];\n return $up;\n}", "title": "" }, { "docid": "d9d54c638adc768c6325a7a728bed311", "score": "0.68286103", "text": "private function get_password() {\n\t\treturn $this->get_standard();\n\t}", "title": "" }, { "docid": "3cc91e65e43eb078e9ef46216f6a75bc", "score": "0.6787457", "text": "public function loginPost($username, $password);", "title": "" }, { "docid": "4acc487d9fa7e94ca9b2fb6d35c38da4", "score": "0.67865354", "text": "public function getCredentials()\n {\n return $this->getUser()->getPassword();\n }", "title": "" }, { "docid": "69163841e9ec4e09c78406a075e083f5", "score": "0.6766286", "text": "public function user_passwd()\n {\n $query = 'SELECT * FROM user_db WHERE login=:log';\n $stmt = $this->db_con->prepare($query);\n $stmt->execute(array(\n \":log\" => $this->login\n ));\n $fetch = $stmt->fetch(PDO::FETCH_ASSOC);\n return $fetch['password'];\n }", "title": "" }, { "docid": "e27cac7f7bd3941621ded54a70085f1d", "score": "0.6765963", "text": "public function getLogin();", "title": "" }, { "docid": "e27cac7f7bd3941621ded54a70085f1d", "score": "0.6765963", "text": "public function getLogin();", "title": "" }, { "docid": "18ef62cc4060b4c0a2a73369d29ca00b", "score": "0.6723631", "text": "public static function getUsername();", "title": "" }, { "docid": "ef7dad337eda9107d39c9b3038096db8", "score": "0.6712546", "text": "function login($usr, $password){\n\t\n}", "title": "" }, { "docid": "e1a405ae0ad75bc62881f50289efcf53", "score": "0.66898", "text": "public function getCredentials() : string;", "title": "" }, { "docid": "ecf90c14c1350692b1e7972ca63ce93b", "score": "0.66408134", "text": "public function getPassword():string;", "title": "" }, { "docid": "6495cb142674eba11bd03f397da15003", "score": "0.6632194", "text": "public function getAuthPassword()\n {\n }", "title": "" }, { "docid": "b7cbc44c129d4b17dee9bef66b9b5604", "score": "0.66154975", "text": "public function getLogin(){\r\n \r\n if( !$this->hasLogin() ){\r\n throw new \\Exception( 'This URL doesn\\'t have a login.' );\r\n }\r\n \r\n if( $this->hasPassword() ){\r\n return $this->getUser() . ':' . $this->getPassword();\r\n }else{\r\n return $this->getUser();\r\n }\r\n \r\n }", "title": "" }, { "docid": "dce23bf70a1fe558eb3f4b5de3240203", "score": "0.6564729", "text": "function authenticate(){\n\t$username = $_REQUEST['username'];\n\t$password = $_REQUEST['password'];\t\n\tif(!empty($username) && !empty($password)){\t\n\t\t$row = getDetails($username,'halls');\n\t\tif($row['password'] == md5($password)){\t\n\t\t\techo \"true\";\n\t\t}else{\n\t\t\techo \"false\";\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d045e9086f739676f45c6575c957b66c", "score": "0.6547236", "text": "public function getLogin()\n\t{\n\t}", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.6518178", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.6518178", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.6518178", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.6518178", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.6518178", "text": "public function getUsername();", "title": "" }, { "docid": "e8456933475dba17eabf301a0fe18463", "score": "0.6507399", "text": "public function getCredential();", "title": "" }, { "docid": "f50c1704237a9226f62eedf1e05795a0", "score": "0.6485376", "text": "public function getPassword()\n\t{\n\t}", "title": "" }, { "docid": "3397a447d52e536885b5027a23ef4096", "score": "0.64666295", "text": "private function getPassword($username) {\n\t\t$params = array('username'=>$username);\n\t\t$result = $this->objDBConnection->row(\"SELECT `password` FROM `mytrend_users` WHERE `role`=:username\",array(),$params);\n\t\treturn $result['password'];\n\t}", "title": "" }, { "docid": "005585b6f5edae13100c6b35e48efbdd", "score": "0.64522207", "text": "public function Authtentication($username, $userPasword)\n {\n\n\n }", "title": "" }, { "docid": "538fc5380552a7d3c83abc804dde67e9", "score": "0.6442792", "text": "public function getLogin() { }", "title": "" }, { "docid": "4627a23ad39c923f52b82e1e31dd2b8e", "score": "0.64332044", "text": "public function getAuthPassword(){\n\t\treturn $this->session_pw;\n\t}", "title": "" }, { "docid": "f885a24f6b15e563c65fc27432cbd7d9", "score": "0.6424805", "text": "function getPassword() {\r\n global $dbase, $dbaseUserData, $leagueID;\r\n\r\n $uid = $this->getUserID();\r\n\r\n $query = \"select password from $dbaseUserData where lid='$leagueID' and userid='$uid'\";\r\n $res = $dbase->query($query);\r\n $line = mysql_fetch_array($res);\r\n $pwd = $line[\"password\"];\r\n return $pwd;\r\n }", "title": "" }, { "docid": "3023604fa48ed7521fab0e0acb3f7a75", "score": "0.64243567", "text": "protected static function password(): mixed\n\t{\n\t\treturn self::$query->password;\n\t}", "title": "" }, { "docid": "307baedf5a0ee4de2cdf0e6efdd834ae", "score": "0.64181197", "text": "public function get_credentials() {\n \treturn $this->credentials;\n\t}", "title": "" }, { "docid": "2be66f5957e7fc6959b84624eb2f73ab", "score": "0.6412003", "text": "function user_login($username, $password) {\n // This plugin doesn't use usernames and passwords\n return false;\n }", "title": "" }, { "docid": "4948187a29dfaad03deb461c46f623a1", "score": "0.6409867", "text": "public function setAuth($username, $password);", "title": "" }, { "docid": "d0d6f91ae6d0adbfcdaf1935334c53b8", "score": "0.63994014", "text": "public function getUsername()\n {\n return $this->getParameter('username');\n }", "title": "" }, { "docid": "8b236aac2a40115ceb0dcc6754a32b30", "score": "0.6398784", "text": "public function getAuth($user=''){\n\t\t$authentication = '';\n\t\t// if no system user given, let the user choose one\n\t\tif ($user == ''){\n\t\t\tif (!isset($_SESSION['current_sysuser'])){\n\t\t\t\t$authentication.= '<h2>'.ENTER_USER_AND_PASSOWRD.'</h2><hr />';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// if the user has already tried to log in, try again for this user \n\t\t\t\t$user = $_SESSION['current_sysuser'];\n\t\t\t\t$authentication.= '<h2>'.ERROR_SSH_LOGIN_TRY_AGAIN.'</h2><hr />';\n\t\t\t}\n\t\t\t$authentication.= '<label>'.LABEL_SYS_USER.' :</label><input type=\"text\" name=\"current_sysuser\" id=\"current_sysuser\" value=\"'.$user.'\" /><br/>';\n\t\t}\n\t\t// if sysuser given by \"getAuth(sysuser)\", let only the password entry\n\t\telse {\n\t\t\t$session = $this->getSession($user);\n\t\t\tif (!$session->userLogged && $session->userPassword !='') {\n\t\t\t\t$authentication.= '<h2>'.ERROR_SSH_LOGIN_TRY_AGAIN.'</h2><hr />';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$authentication.= '<h2>'.ENTER_PASSWORD_FOR_USER.' '.$user.'</h2><hr />';\n\t\t\t}\n\t\t\t$authentication.= '<input type=\"hidden\" name=\"current_sysuser\" id=\"current_sysuser\" value=\"'.$user.'\" />';\n\t\t}\n\t\t$authentication.= '<label>'.LABEL_PASSWORD.' :</label><input type=\"password\" name=\"password\" id=\"password\" /><br/>\n\t\t\t\t<input type=\"submit\" value=\"'.BUTTON_LOGIN.'\" onclick=\"formSubmit(\\'login\\',\\''.$user.'\\');\" /><br />';\n\t\treturn $authentication;\n\t}", "title": "" }, { "docid": "9bfee187bdd0f985b89bf61772a1f0b4", "score": "0.6394808", "text": "public function getPassword() {\n if (isset($_REQUEST['password']))\n return $_REQUEST['password'];\n else\n return false;\n }", "title": "" }, { "docid": "9bfee187bdd0f985b89bf61772a1f0b4", "score": "0.6394808", "text": "public function getPassword() {\n if (isset($_REQUEST['password']))\n return $_REQUEST['password'];\n else\n return false;\n }", "title": "" }, { "docid": "dc4c945148dd982e042f0a696faf6821", "score": "0.6393687", "text": "public function password($username)\r\n\t{\r\n\t\treturn $this->_session->get($this->_db_password_session_key);\r\n\t}", "title": "" }, { "docid": "fa8674232e2f129f4ea71524a4f8fd06", "score": "0.6393302", "text": "public function login();", "title": "" }, { "docid": "fa8674232e2f129f4ea71524a4f8fd06", "score": "0.6393302", "text": "public function login();", "title": "" }, { "docid": "1e4919da674c9ab5784c821c077ba75b", "score": "0.63887095", "text": "public function getUsername():string;", "title": "" }, { "docid": "ff07dc246ef16a7e24b7226d607399b5", "score": "0.6375782", "text": "public static function getUser();", "title": "" }, { "docid": "e15b7783ad32da36be2ca2711eb1684c", "score": "0.6372627", "text": "function get_pass()\n{\n if (isset($_POST[\"pass\"])) {\n $pass = $_POST['pass'];\n }\n elseif (isset($_GET[\"pass\"])) {\n $pass = $_GET['pass'];\n }\n\telse\n {\n $pass = \"\";\n }\n\n return $pass;\n}", "title": "" }, { "docid": "65f16c2fff24396abcee8b51036fd235", "score": "0.6365423", "text": "public function getPassword()\n {\n }", "title": "" }, { "docid": "65f16c2fff24396abcee8b51036fd235", "score": "0.6365423", "text": "public function getPassword()\n {\n }", "title": "" }, { "docid": "65f16c2fff24396abcee8b51036fd235", "score": "0.6365423", "text": "public function getPassword()\n {\n }", "title": "" }, { "docid": "65f16c2fff24396abcee8b51036fd235", "score": "0.6365423", "text": "public function getPassword()\n {\n }", "title": "" }, { "docid": "9f578705ed7688dd98da832d5d1780b7", "score": "0.6362656", "text": "public function get_user($arg){\n $usr = $this->user_info($arg);\n if($usr != false){\n if(isset($usr->pass) && password_verify($arg['pass'], $usr->pass)){\n return $usr;\n }\n }\n return false;\n }", "title": "" }, { "docid": "fe98e3b93f25f763333e6ebaed202a35", "score": "0.63620895", "text": "function getPassword($username) {\n try {\n return $this -> findUser($username)['password'];\n }\n catch(PDOException $e) {\n echo $e -> getMessage();\n }\n }", "title": "" }, { "docid": "5c9346667fe995049826588c9d06cf29", "score": "0.63571393", "text": "public function readParameters() {\n\t\tif (isset($_POST['username'])) $this->username = trim($_POST['username']);\n\t\tif (isset($_POST['email'])) $this->email = trim($_POST['email']);\n\t\tif (isset($_POST['confirmEmail'])) $this->confirmEmail = trim($_POST['confirmEmail']);\n\t\tif (isset($_POST['password'])) $this->password = $_POST['password'];\n\t\tif (isset($_POST['confirmPassword'])) $this->confirmPassword = $_POST['confirmPassword'];\n\t\tif (isset($_POST['groups']) && is_array($_POST['groups'])) $this->groups = $_POST['groups'];\n\t}", "title": "" }, { "docid": "81bd3e1c4ac1005c3d7003fa7d10fdb3", "score": "0.63485473", "text": "public function getAuthPassword() {\n //return $this->USUARIO_EMP_senha;\n return $this->password;\n\n }", "title": "" }, { "docid": "31b5273e3e921b44a69b21042bce3d2b", "score": "0.63466084", "text": "function get_user ($infos){\n\t\t$request = get_db() -> prepare(\"SELECT * FROM user WHERE usr_login=:usr_login and usr_password=:usr_password\");\n\t\t$request->bindValue(\"usr_login\", $infos['login'], PDO::PARAM_STR);\n\t\t$request->bindValue(\"usr_password\", $infos['password'], PDO::PARAM_STR);\n\t\t$request->execute();\n\t\treturn $request;\n\t}", "title": "" }, { "docid": "c77e68c8eb6d6ef14d8de301d7d0bfa2", "score": "0.63452107", "text": "public function getPassword()\r\n\t{\r\n\t\treturn $this->_pass ?: '';\r\n\t//\treturn empty($this->userInfo) ? '' : (($pos = strpos($this->userInfo, ':')) === false ? '' : substr($this->userInfo, $pos + 1));\r\n\t}", "title": "" }, { "docid": "d917911f26b085a2c5f04989b980b997", "score": "0.6340619", "text": "public function read_login() {\n //Creaza query - Create query\n $query = 'SELECT name, password FROM ' . $this->table_name ;\n\n //Pregateste statement - Prepare statement\n $stmt = $this->conn->prepare($query);\n\n //Executa query - Execute query\n $stmt->execute();\n\n return $stmt;\n }", "title": "" }, { "docid": "21c56ee8b6193e062d02bc7aac3ce80a", "score": "0.6337478", "text": "function getPassword() \n {\n return $this->viewerManager->getPassword();\n \n }", "title": "" }, { "docid": "a5a96efb6f1404d9ef81beda99930675", "score": "0.6330983", "text": "public function getUserByUsernameAndPassword($username, $password) {\r\n \r\n $stmt = $this->conn->prepare(\"SELECT * FROM users_tb WHERE username = ?\");\r\n \r\n $stmt->bind_param(\"s\", $username);\r\n \r\n if ($stmt->execute()) {\r\n $user = $stmt->get_result()->fetch_assoc();\r\n $stmt->close();\r\n \r\n // verifying user password\r\n \r\n $password_tb = $user['password'];\r\n if ($password == $password_tb) {\r\n // user authentication details are correct\r\n return $user;\r\n }\r\n } else {\r\n return NULL;\r\n }\r\n }", "title": "" }, { "docid": "c4f14df4e4c92d4a34ac95e66be03945", "score": "0.63242024", "text": "public function getAuth($username) {\n $db = $this->dbConnect();\n $req = $db->prepare('SELECT username, password, role FROM users WHERE username = ?');\n $req->execute(array($username));\n\n return $req->fetch();\n }", "title": "" }, { "docid": "926cf0b26466f738b3a905f064973177", "score": "0.6321508", "text": "public function get_password(){\n return $this->password;\n }", "title": "" }, { "docid": "a2aacdd85d5c59a80205171cfde55fe0", "score": "0.6321143", "text": "function login(){\n // http://www.php.net/manual/en/session.examples.basic.php\n $hashedpass = hash('SHA256',$_POST['password']);\n $params = array(':username' => $_POST['username'],\n ':passhash' => $hashedpass);\n $this->set('user', $this->Account->query('SELECT * FROM Account WHERE Username = :username AND passhash = :passhash', $params));\n }", "title": "" }, { "docid": "0a543a384f45627d022a02523eb3c5c8", "score": "0.6320999", "text": "public function getUser($username) {\n\t\t$this->stmt = $this->conn->prepare(\"SELECT \".self::$usernameField.\", \".self::$passwordField.\" FROM \".self::$table.\" WHERE \".self::$usernameField.\" = ?\");\n\t\tif ($this->stmt === FALSE) {\n\t\t\tthrow new Exception($this->conn->error);\n\t\t}\n\t\t$this->stmt->bind_param('s', $username);\n\t\t$this->stmt->execute();\n\t $this->stmt->bind_result($name, $pass);\n\t\t$this->stmt->store_result();\n\n\t\t// Fulhack\n\t\tif ($this->stmt->num_rows() == 1) {\n\t\t\t$this->stmt->fetch();\n\t\t\treturn array($name, $pass);\n\t\t}\n\t}", "title": "" }, { "docid": "687a39474a78b9a0c867a2ead1bdc1d4", "score": "0.63151234", "text": "public abstract function getUsername();", "title": "" }, { "docid": "3caa10f0fdb3cb661e2f42b7d0d257ed", "score": "0.63145185", "text": "function getUserInfoByCredential($user_name,$password){\n checkConnectivity();\n\n $query =sprintf(\"select * from user where user_name = '%s' AND password ='%s'\",$user_name,$password);\n $result =mysqli_query($GLOBALS['connection_link'],$query);\n if ($row = mysqli_fetch_assoc($result)) {\n return $row;\n }\n return false;\n\n }", "title": "" }, { "docid": "c0ab2e32355c3e2671c12be6dfec339c", "score": "0.63113487", "text": "function getInfo( $username, $field )\r\n\t{\r\n\t\tif( $field == 'password' )\r\n\t\t{\r\n\t\t\t$this->last_error = \"Cannot retrive restricted field.\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->ci->db->select($field);\r\n\t\t\t$query = $this->ci->db->getwhere('users',array('username'=>$username));\r\n\t\t\tforeach ($query->result() as $row)\r\n\t\t\t{\r\n\t\t\t\treturn $row->$field;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "60a28856dd82895732d94d3684c2ad6b", "score": "0.630981", "text": "abstract public function login();", "title": "" }, { "docid": "96706a5bc0741abd53929dd1ff4553d2", "score": "0.63064647", "text": "public function getCredentials(): mixed;", "title": "" }, { "docid": "b8e1dd54ff59c1e50e6915897ed6014e", "score": "0.63046867", "text": "public function username();", "title": "" }, { "docid": "261868a16e3b6604e514e4ff842eee2a", "score": "0.6302727", "text": "function Authenticate($username=false, $password=false) {\n\t\tif (!$username || !$password) return false;\n\t\t$qry = \"SELECT userid FROM \" . TRACKPOINT_TABLEPREFIX . \"users WHERE username='\" . addslashes($username) . \"' AND password='\" . addslashes(md5($password)) . \"' AND status=1\";\n\n\t\t$result = $this->Db->Query($qry);\n\t\tif (!$result) {\n\t\t\treturn false;\n\t\t}\n\t\t$details = $this->Db->Fetch($result);\n\t\treturn $details;\n\t}", "title": "" }, { "docid": "665e4b10bac670c44fcc7768224524d7", "score": "0.6297336", "text": "public function user_passwd_not_empty(){\n\n $username=Request::get('username');\n $password=Request::get('password');\n\n if ($username != \"\" && $password != \"\") {\n return ['status' => 0, 'msg' => 'ok', 'username' => $username, 'password' => $password];\n } elseif ($username == \"\") {\n return ['status' => 1, 'msg' => 'username empty'];\n } else {\n return ['status' => 2, 'msg' => 'password empty'];\n }\n }", "title": "" }, { "docid": "c44c844516169690c50df9a647c48d3a", "score": "0.6296575", "text": "public function _get_password() {\n\t\treturn $this->_password;\n\t}", "title": "" }, { "docid": "5c98b8d8b5bee8871f6dd12be625b086", "score": "0.6295935", "text": "function local_login($username, $password) {\r\n\t$user_info = get_login_info($username);\r\n\r\n\tif (isset($user_info) && is_array($user_info)) {\r\n\t\t$out_info = $user_info['data'];\r\n\t\t$out_info['success'] = ($user_info['password'] === $password || $user_info['password'] === md5($password));\r\n\t\t\t\r\n\t\treturn $out_info;\r\n\t}\r\n\t\r\n\treturn array('success' => false);\r\n}", "title": "" }, { "docid": "a1a6bb2809882882aa44f77f6dfda764", "score": "0.62929183", "text": "function auth_user($username,$password){\n\t\t$query=$this->db->query(\"SELECT * FROM tb_pengunjung WHERE username='$username' AND password=MD5('$password') LIMIT 1\");\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "a172044934edc63bd61a14ae6d6ed867", "score": "0.62862736", "text": "public function getUsername() {\n if (isset($_REQUEST['username']))\n return $_REQUEST['username'];\n else\n return false;\n }", "title": "" }, { "docid": "a172044934edc63bd61a14ae6d6ed867", "score": "0.62862736", "text": "public function getUsername() {\n if (isset($_REQUEST['username']))\n return $_REQUEST['username'];\n else\n return false;\n }", "title": "" }, { "docid": "72157089630710b55d55a92cbeba0230", "score": "0.628371", "text": "public function determineUsername();", "title": "" }, { "docid": "2a4d191531b21b416177a0e88cb613fb", "score": "0.628232", "text": "function logIn($username, $password)\n{\n //cek apakah user ada\n $id = getUserIdbyUsername($username);\n if ($id) {\n //cek apakah password benar\n $user_details = getUserbyId($id);\n if ($password == $user_details[\"password\"]) {\n return $user_details;\n } else {\n return false;\n }\n }\n return false;\n}", "title": "" }, { "docid": "4527a9432ac8aa3b7db5eb9cb3c53b7b", "score": "0.62770253", "text": "public function getCredential ()\n\t{\n\t\t$retVal = null;\n\t\tif ($this->isSecure()) {\n\t\t\t$userForm = $this->getUserDetails();\n\t\t}\n\t\treturn $retVal;\n\t}", "title": "" }, { "docid": "4dee2d1aa002f3e591e395adcf27e1c1", "score": "0.62727827", "text": "public function get_http_auth_creds()\r\n\t{\r\n\t\t// Since PHP saves the HTTP Password in a bunch of places, we have to be able to test for all of them\r\n\t\t$username = NULL;\r\n\t\t$password = NULL;\r\n\t\t\r\n\t\t// mod_php\r\n\t\tif (isset($_SERVER['PHP_AUTH_USER'])) \r\n\t\t{\r\n\t\t $username = (isset($_SERVER['PHP_AUTH_USER'])) ? $_SERVER['PHP_AUTH_USER'] : NULL;\r\n\t\t $password = (isset($_SERVER['PHP_AUTH_PW'])) ? $_SERVER['PHP_AUTH_PW'] : NULL;\r\n\t\t}\r\n\r\n\t\t// most other servers\r\n\t\telseif ($_SERVER['HTTP_AUTHENTICATION'])\r\n\t\t{\r\n\t\t\tif (strpos(strtolower($_SERVER['HTTP_AUTHENTICATION']),'basic') === 0)\r\n\t\t\t{\r\n\t\t\t\tlist($username,$password) = explode(':',base64_decode(substr($_SERVER['HTTP_AUTHENTICATION'], 6)));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check them - if they're null a/o empty, they're invalid.\r\n\t\tif ( is_null($username) OR is_null($password) OR empty($username) OR empty($password))\r\n\t\t\treturn FALSE;\r\n\t\telse\r\n\t\t\treturn array('username' => $username, 'password' => $password);\r\n\t}", "title": "" }, { "docid": "90c1c3a9e32a3f57730a772023e65981", "score": "0.627235", "text": "function authenticate_v2($username='', $password='') {\n global $db;\n $username = $db->escape($username);\n $password = $db->escape($password);\n $sql = sprintf(\"SELECT id,username,password,user_level FROM users WHERE username ='%s' LIMIT 1\", $username);\n $result = $db->query($sql);\n if($db->num_rows($result)){\n $user = $db->fetch_assoc($result);\n $password_request = sha1($password);\n if($password_request === $user['password'] ){\n return $user;\n }\n }\n return false;\n }", "title": "" }, { "docid": "90c1c3a9e32a3f57730a772023e65981", "score": "0.627235", "text": "function authenticate_v2($username='', $password='') {\n global $db;\n $username = $db->escape($username);\n $password = $db->escape($password);\n $sql = sprintf(\"SELECT id,username,password,user_level FROM users WHERE username ='%s' LIMIT 1\", $username);\n $result = $db->query($sql);\n if($db->num_rows($result)){\n $user = $db->fetch_assoc($result);\n $password_request = sha1($password);\n if($password_request === $user['password'] ){\n return $user;\n }\n }\n return false;\n }", "title": "" }, { "docid": "90c1c3a9e32a3f57730a772023e65981", "score": "0.627235", "text": "function authenticate_v2($username='', $password='') {\n global $db;\n $username = $db->escape($username);\n $password = $db->escape($password);\n $sql = sprintf(\"SELECT id,username,password,user_level FROM users WHERE username ='%s' LIMIT 1\", $username);\n $result = $db->query($sql);\n if($db->num_rows($result)){\n $user = $db->fetch_assoc($result);\n $password_request = sha1($password);\n if($password_request === $user['password'] ){\n return $user;\n }\n }\n return false;\n }", "title": "" }, { "docid": "7bd1e4bd7a6ccf1b4db6537c4694d4e9", "score": "0.6270585", "text": "public function getAuthPassword(): string\n {\n return $this->PASSWORD;\n }", "title": "" }, { "docid": "75096631accae6b9e0d08b061ff0cdd9", "score": "0.62689", "text": "function getUser();", "title": "" }, { "docid": "75096631accae6b9e0d08b061ff0cdd9", "score": "0.62689", "text": "function getUser();", "title": "" }, { "docid": "8d5b78da1218d9ac97c757d02af1f619", "score": "0.6255093", "text": "public function getUserName();", "title": "" }, { "docid": "8d5b78da1218d9ac97c757d02af1f619", "score": "0.6255093", "text": "public function getUserName();", "title": "" }, { "docid": "1fa6fbb6d4ed4a453b57f6dbe78a0d25", "score": "0.62544096", "text": "public static function Login($username, $password)\n {\n \n }", "title": "" }, { "docid": "90093206899a097f70b86801af9b5e27", "score": "0.62471557", "text": "function checkBasicGetAuth()\n\t{\n\t\tif (isset($_GET['usr']) && $_GET['pwd'] && $this->checkBasicUser($_GET['usr'], $_GET['pwd']))\n\t\t\treturn true;\n\t}", "title": "" }, { "docid": "65d54bf237b954b26b1e0eb64d1dfcc7", "score": "0.62395173", "text": "public function get_password() {\r\n return $this->password;\r\n }", "title": "" }, { "docid": "72600e3b68e3c18d318732af03400dd6", "score": "0.6238841", "text": "function authenticate($username='', $password='') {\n global $db;\n $username = $db->escape($username);\n $password = $db->escape($password);\n $sql = sprintf(\"SELECT id,username,password,user_level FROM users WHERE username ='%s' LIMIT 1\", $username);\n $result = $db->query($sql);\n if($db->num_rows($result)){\n $user = $db->fetch_assoc($result);\n $password_request = sha1($password);\n if($password_request === $user['password'] ){\n return $user['id'];\n }\n }\n return false;\n }", "title": "" }, { "docid": "72600e3b68e3c18d318732af03400dd6", "score": "0.6238841", "text": "function authenticate($username='', $password='') {\n global $db;\n $username = $db->escape($username);\n $password = $db->escape($password);\n $sql = sprintf(\"SELECT id,username,password,user_level FROM users WHERE username ='%s' LIMIT 1\", $username);\n $result = $db->query($sql);\n if($db->num_rows($result)){\n $user = $db->fetch_assoc($result);\n $password_request = sha1($password);\n if($password_request === $user['password'] ){\n return $user['id'];\n }\n }\n return false;\n }", "title": "" } ]
feb18e25155b7c9e5e95b9c01c7712ce
What article section are they requesting
[ { "docid": "538dfb686290fd7d0a72831227cebfab", "score": "0.0", "text": "public function segment()\n\t{\n\t\t$segment = $this->uri->segment(3);\n\t\t\n\t\t// RSS data\n\t\t// Holds data for output on RSS\n\t\t$data = array();\n\t\t\n\t\t// Get all articles\n\t\t$this->db->select('a.id, a.title, a.url_title, a.short_content, a.created_at, a.updated_at');\n\t\t$this->db->select('s.name AS section_name, s.url_name AS section_url');\n\t\t$this->db->from('articles a');\n\t\t$this->db->join('article_sections s', 'a.section_id = s.id', 'left');\n\t\t$this->db->where('a.status', 'published');\n\t\t$this->db->where('s.url_name', $segment);\n\t\t$this->db->order_by('a.created_at', 'desc');\n\t\t$this->db->limit(50);\n\t\t\n\t\t$query = $this->db->get();\n\t\t\n\t\tif($query->num_rows() === 0)\n\t\t{\n\t\t\tshow_404();\n\t\t}\n\t\t\n\t\tforeach($query->result() as $row)\n\t\t{\n\t\t\t// Get category\n\t\t\t$this->db->select('ac.name as category_name, ac.url_name as category_url');\n\t\t\t$this->db->from('article_categories ac');\n\t\t\t$this->db->join('article_categories_map acm', 'acm.category_id = ac.id', 'left');\n\t\t\t$this->db->where('acm.article_id', $row->id);\n\t\t\t$this->db->limit(1);\n\t\t\t\n\t\t\t$query = $this->db->get();\n\t\t\t\n\t\t\t$row->category_name = 'unknown';\n\t\t\t$row->category_url = 'unknown';\n\t\t\t\n\t\t\tif($query->num_rows() > 0)\n\t\t\t{\n\t\t\t\t$row->category_name = $query->row()->category_name;\n\t\t\t\t$row->category_url = $query->row()->category_url;\n\t\t\t}\n\t\t\t\n\t\t\t// Replace all crappy entities\n\t\t\t$short_content = $this->clean_text($row->short_content);\n\t\t\t\n\t\t\t// Build data to output\n\t\t\t$add = array(\n\t\t\t\t'title' => $row->title,\n\t\t\t\t'pubDate' => date(\"r\", $row->created_at),\n\t\t\t\t'link' => site_url('articles/'.$row->section_url.'/'.$row->category_url.'/'.$row->id.'/'.$row->url_title),\n\t\t\t\t'guid' => site_url('articles/'.$row->section_url.'/'.$row->category_url.'/'.$row->id.'/'.$row->url_title)\n\t\t\t);\n\t\t\t\n\t\t\tif(strlen(trim($short_content)) > 0)\n\t\t\t{\n\t\t\t\t$add['description'] = html_entity_decode(strip_tags($short_content));\n\t\t\t}\n\t\t\t\n\t\t\t$data[] = $add;\n\t\t}\n\t\t\n\t\t// Output\n\t\t$segment = str_replace('-', ' ', $segment);\n\t\t\n\t\t$this->output($data, ucwords($segment));\n\t}", "title": "" } ]
[ { "docid": "b7707e2bc19d6e880713b56a1d4d2f66", "score": "0.6597544", "text": "public function getSection(): string;", "title": "" }, { "docid": "aa664e7f9b0954253d0333c3ebec34ab", "score": "0.6471807", "text": "public function getSections();", "title": "" }, { "docid": "33e21dd4043b874daf2f19dc5924d5f0", "score": "0.63114417", "text": "function display_section_emporterpage_info(){}", "title": "" }, { "docid": "6278b22ebb31ecfeb40790f0144f05c2", "score": "0.62477845", "text": "public function get_section($section)\n {\n }", "title": "" }, { "docid": "e5cf2057b5f64d86c3c19d241f175294", "score": "0.6240839", "text": "public function getSection(): string\n {\n return $this->section;\n }", "title": "" }, { "docid": "1ab69b0672c12b8e3888f133f439fc60", "score": "0.6236683", "text": "public function pintSection(){\r\n return $this->section;\r\n }", "title": "" }, { "docid": "9400b44fbc3f0e114d5c90ec963f6f60", "score": "0.62277955", "text": "public function section(): string;", "title": "" }, { "docid": "560dd32da00623aedb9277ecd5be6135", "score": "0.6201577", "text": "public function getSections()\n {\n return $this->sections_info;\n }", "title": "" }, { "docid": "2d1edbdd5f8383c1560c086a2d5c16be", "score": "0.61451656", "text": "public function getSection () {\n return $this->section;\n }", "title": "" }, { "docid": "2d1edbdd5f8383c1560c086a2d5c16be", "score": "0.61451656", "text": "public function getSection () {\n return $this->section;\n }", "title": "" }, { "docid": "eeb611e9be8adba5291181d676b0e59e", "score": "0.6082479", "text": "function athen_blog_entry_meta_sections() {\n\n\t// Default sections\n\t$sections = array( 'date', 'author', 'categories', 'comments' );\n\n\t// Get Sections from Customizer\n\t$sections = athen_get_mod( 'blog_entry_meta_sections', $sections );\n\n\t// Apply filters for easy modification\n\t$sections = apply_filters( 'athen_blog_entry_meta_sections', $sections );\n\n\t// Turn into array if string\n\tif ( $sections && ! is_array( $sections ) ) {\n\t\t$sections = explode( ',', $sections );\n\t}\n\n\t// Return sections\n\treturn $sections;\n\n}", "title": "" }, { "docid": "edda0b814024f7879cba4e8cd97b04f1", "score": "0.6025711", "text": "public function getSection() {\n\t\treturn $this->section;\n\t}", "title": "" }, { "docid": "78e3680840d502560c0b88e61fa570c6", "score": "0.5995821", "text": "public function section()\n {\n return $this->sections->current();\n }", "title": "" }, { "docid": "7500752ca09cca1a824c4d2735032f45", "score": "0.59675485", "text": "function getSection($key);", "title": "" }, { "docid": "a1ab0f2192966c5084a6b99c259c58e2", "score": "0.59374106", "text": "abstract public function section($title);", "title": "" }, { "docid": "3f927a7d921b935c6626fe1f1fe79404", "score": "0.59175944", "text": "public function getSections() : array;", "title": "" }, { "docid": "0ed5158da39474310f8c7f7a898034b9", "score": "0.5862777", "text": "function athen_blog_single_meta_sections() {\n\n\t// Default sections\n\t$sections = array( 'date', 'author', 'categories', 'comments' );\n\n\t// Get Sections from Customizer\n\t$sections = athen_get_mod( 'blog_post_meta_sections', $sections );\n\n\t// Apply filters for easy modification\n\t$sections = apply_filters( 'athen_blog_single_meta_sections', $sections );\n\n\t// Turn into array if string\n\tif ( $sections && ! is_array( $sections ) ) {\n\t\t$sections = explode( ',', $sections );\n\t}\n\n\t// Return sections\n\treturn $sections;\n\n}", "title": "" }, { "docid": "7c9bd42d16913ce7169f148127e47aeb", "score": "0.5849765", "text": "private function getSections() {\n return $this->sections;\n }", "title": "" }, { "docid": "2337d89b1265a25574e85c3f06671c73", "score": "0.5840603", "text": "public function getPersonalSections(): array;", "title": "" }, { "docid": "de81afb46a191d2450484254ab39486e", "score": "0.58228225", "text": "public function get_section_id() {\r\n return $this->section_id;\r\n }", "title": "" }, { "docid": "227859ace8b6ef3b5825307c873a804d", "score": "0.5795189", "text": "function author_main_section(){\t\n\t\techo sprintf( '<p>%s</p>', __( \"This belongs to a section\", \"abbey-author-profile\" ) );\n\t \n\t}", "title": "" }, { "docid": "99db1c1abc62d3d02c998280fa0399e4", "score": "0.57102835", "text": "public function print_section_info() {\n\t\tprint 'Zoek ff het ID van je kanaal:';\n\t}", "title": "" }, { "docid": "dc9f75f7c0d58faa6cf2b53e000e3296", "score": "0.56033534", "text": "public function getArticle()\r\n {\r\n return $this->article;\r\n }", "title": "" }, { "docid": "1315283448f62756a8bc1ab68a091c80", "score": "0.55981344", "text": "public function articleSection($articleSection)\n {\n return $this->setProperty('articleSection', $articleSection);\n }", "title": "" }, { "docid": "44ac374786c7a9fb6e8449bcc0ffd245", "score": "0.5582285", "text": "public function getSection()\n\t{\n\t\tif ($this->sectionId)\n\t\t{\n\t\t\treturn craft()->sections->getSectionById($this->sectionId);\n\t\t}\n\t}", "title": "" }, { "docid": "ba13f28248584ce0e1ed5f2349000bb7", "score": "0.55735767", "text": "public function get_sections_html($courseid) {\n global $DB, $PAGE;\n if ($PAGE->course->id == $courseid) {\n $mycm = get_coursemodule_from_instance('unilabel', $this->unilabeltyperecord->unilabelid);\n $mysection = $DB->get_record('course_sections', array('id' => $mycm->section));\n }\n\n if (!$course = $DB->get_record('course', array('id' => $courseid))) {\n return array();\n }\n $sections = $this->get_sections_from_course($courseid);\n $courseformat = course_get_format($course->id);\n\n $sectionsoutput = array();\n $courserenderer = $PAGE->get_renderer('core', 'course');\n $counter = 0;\n foreach ($sections as $s) {\n if (!empty($mysection)) {\n if ($mysection->id == $s->id) {\n continue;\n }\n }\n $section = new \\stdClass();\n $section->name = get_section_name($course, $s);\n $section->section = $s->section;\n $section->viewurl = $courseformat->get_view_url($s->section);\n\n $context = \\context_course::instance($s->course);\n $summarytext = file_rewrite_pluginfile_urls($s->summary, 'pluginfile.php',\n $context->id,\n 'unilabeltype_topicteaser',\n 'section', $s->id);\n\n $options = new \\stdClass();\n $options->noclean = true;\n $options->overflowdiv = true;\n\n $section->summary = format_text($summarytext, $s->summaryformat, $options);\n\n $section->cmlist = $courserenderer->course_section_cm_list($course, $s->section);\n $section->nr = $counter;\n\n if ($counter == 0) {\n $section->first = true;\n }\n\n $sectionsoutput[] = $section;\n $counter++;\n\n }\n\n return $sectionsoutput;\n }", "title": "" }, { "docid": "996d110883c200bb6a2fe45e00948b93", "score": "0.55660665", "text": "function display_section_horaire(){}", "title": "" }, { "docid": "36d675395eb8d4e999298c72d8f93c4c", "score": "0.55640894", "text": "private function _sections(){\r\n\t\t$this->sections = $this->controller->CmsSection->find('all',\r\n\t\t\tarray(\r\n\t\t\t\t'conditions'=>\r\n\t\t\t\t\tarray('CmsSection.cms_id = '=>$this->page['Cm']['id'])\r\n\t\t\t\t,'fields'=>$this->cms_section_files\r\n\t\t\t));\r\n\t\treturn (is_array($this->sections) && !empty($this->sections)) ? $this->sections : false;\r\n }", "title": "" }, { "docid": "78341766a191eee9dff44b959a216001", "score": "0.5541612", "text": "public function inSection( array $params = null )\n {\n $this->searchEntities($params, 'section');\n }", "title": "" }, { "docid": "bc248b84ac27e2aaf7df2c0ebcc24cf1", "score": "0.55382854", "text": "function get_articles_by_section($section, $cid, $callback, $start, $offset) {\n global $conn;\n \n $query = \"select * from articles where section='$section' and client_id='\" . $cid . \"' order by id desc limit $start, $offset\"; \n $res = $conn->db_query($query);\n \n /*if ($section == 2) {*/\n $json = $callback . '({\n \"proposals\": \n ';\n \n $json .= build_json_array($res);\n \n $json .= '})';\n \n return $json;\n /* }\n else{ \n return build_json_array($res);\n } */\n}", "title": "" }, { "docid": "585ae4e73e886a46309095dbb6867704", "score": "0.5536838", "text": "public function getSection() {\r\n\t\treturn $this->curSection;\r\n\t}", "title": "" }, { "docid": "84b5f623d14e7280ac0bec1c9d451312", "score": "0.55294275", "text": "public function pageSections()\n {\n if( have_rows('our_team') ):\n $data = array();\n // loop through the rows of data\n while ( have_rows('our_team') ) : the_row();\n $post_id = get_sub_field('team')[0];\n $size = 'medium'; // (thumbnail, medium, large, full or custom size)\n\n if(has_excerpt($post_id)){\n $post_excerpt = get_the_excerpt($post_id);\n }else{\n $post_excerpt = \"\";\n }\n\n\n $section = array(\n 'post_title' => get_the_title($post_id),\n 'post_thumbnail' => get_the_post_thumbnail($post_id, $size),\n 'post_excerpt' => $post_excerpt,\n 'name' => get_field( \"name\", $post_id ),\n 'description' => get_field( \"description\", $post_id ),\n 'profile' => get_field( \"profile\", $post_id ),\n 'post_permalink' => get_the_permalink($post_id)\n );\n\n $data[] = $section;\n\n endwhile;\n\n else :\n $data[] = \"Contents not found\";\n\n endif;\n return($data);\n }", "title": "" }, { "docid": "b1c757b3c24e0206b28d21aee4d83887", "score": "0.5528967", "text": "public function getArticle()\n {\n return $this->article;\n }", "title": "" }, { "docid": "b1c757b3c24e0206b28d21aee4d83887", "score": "0.5528967", "text": "public function getArticle()\n {\n return $this->article;\n }", "title": "" }, { "docid": "013af01e6076e5912ebabfd8a4b00dee", "score": "0.55204743", "text": "private function get_content_sections() {\n\t\t$content_sections = array( $this->get_content_meta_section() );\n\n\t\t// Check if social_admin is an instance of WPSEO_Social_Admin.\n\t\tif ( $this->social_admin instanceof WPSEO_Social_Admin ) {\n\t\t\t$content_sections[] = $this->social_admin->get_meta_section();\n\t\t}\n\n\t\tif ( WPSEO_Capability_Utils::current_user_can( 'wpseo_edit_advanced_metadata' ) || WPSEO_Options::get( 'disableadvanced_meta' ) === false ) {\n\t\t\t$content_sections[] = $this->get_advanced_meta_section();\n\t\t}\n\n\t\tif ( ! defined( 'WPSEO_PREMIUM_FILE' ) ) {\n\t\t\t$content_sections[] = $this->get_buy_premium_section();\n\t\t}\n\n\t\tif ( has_action( 'wpseo_tab_header' ) || has_action( 'wpseo_tab_content' ) ) {\n\t\t\t$content_sections[] = $this->get_addons_meta_section();\n\t\t}\n\n\t\treturn $content_sections;\n\t}", "title": "" }, { "docid": "544b18cf0231065a9d1d8b40e2ca77e2", "score": "0.5520089", "text": "public function getSections()\n {\n return $this->sections;\n }", "title": "" }, { "docid": "544b18cf0231065a9d1d8b40e2ca77e2", "score": "0.5520089", "text": "public function getSections()\n {\n return $this->sections;\n }", "title": "" }, { "docid": "6b7489a77424d6d492d4fdca5a2da6a3", "score": "0.54893893", "text": "protected function _handleSection($data) {\n\t\t$section = 'Articles'; // Default\n\t\tif (isset($data['section'])) $section = $data['section'];\n\n\t\t// Page 1\n\t\t$this->waitForElementPresent('id=sectionId');\n\t\t$this->select('id=sectionId', 'label=' . $this->escapeJS($section));\n\t}", "title": "" }, { "docid": "d7c9b29839cd979fa5af1affe4780938", "score": "0.548029", "text": "public function getNum_article()\n {\n return $this->num_article;\n }", "title": "" }, { "docid": "db1e51b77249b777cc31a663f8736806", "score": "0.54764795", "text": "public function getSectionName();", "title": "" }, { "docid": "ca45126a1e7b4164ba18c4e31ab14fd6", "score": "0.5467496", "text": "function display_section_emporterpage_buffet(){}", "title": "" }, { "docid": "bc1ea9ccee7432d25f559d2a9b30c3be", "score": "0.54660845", "text": "public function getSectionInfo(Request $r, int $id){\n\n $content = Section::find($id);\n if(is_null($content)){\n return response()->json([\"error\"=>\"Section not found\"], 404);\n }\n\n $data = [\n \"id\"=>$content->id,\n \"name\"=>$content->name,\n \"image\"=>$content->image,\n \"color\"=>$content->color,\n \"categoryId\"=>$content->category_id\n ];\n\n return response()->json($data, 200);\n }", "title": "" }, { "docid": "42e1875b4221d5af7facff6a11a306e2", "score": "0.54628086", "text": "public function isSection()\n {\n return false;\n }", "title": "" }, { "docid": "ffe8758455a709016f370d1ba1a22bef", "score": "0.5442032", "text": "public function author_sub_section(){\n\t\t$section = array(\n\t\t\t'sub_elements' => array(\n\t\t\t\t$this->_author_image(),\n\t\t\t\t$this->_author_bio(),\n\t\t\t\t$this->_author_sidebar(),\n\t\t\t),\n\t\t\t'sub_content_options' => array(\n\t\t\t\t'class' => 'sectionAuthor borderBottom',\n\t\t\t\t'sub_elements_div' => array(\n\t\t\t\t\t'class' => 'control-group'\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\treturn $section;\n\t}", "title": "" }, { "docid": "f5a362cd947543891d76503784674204", "score": "0.5440183", "text": "public function isSection()\n {\n return $this->type == 'section';\n }", "title": "" }, { "docid": "68296c918bc081dde9ed4de1a87c2d03", "score": "0.54312056", "text": "protected function listSectioningAttributes()\n {\n\t\n $this->attr['address'] = array();\n $this->attr['article'] = array();\n $this->attr['aside'] = array(); \n $this->attr['body'] = array('onafterprint','onbeforeprint','onbeforeunload','onhashchange','onmessage','onoffline','ononline','onpopstate','onredo','onstorage','onundo','onunload');\n $this->attr['h1'] = array();\n $this->attr['h2'] = array();\n $this->attr['h3'] = array();\n $this->attr['h4'] = array();\n $this->attr['h5'] = array();\n $this->attr['h6'] = array();\n $this->attr['header'] = array();\n $this->attr['footer'] = array();\n $this->attr['main'] = array();\n $this->attr['nav'] = array();\n $this->attr['section'] = array();\n \n return $this; \n\t \n }", "title": "" }, { "docid": "79d4b7330a28c73af85c87ff79e37aac", "score": "0.5428246", "text": "public function get_current_section() {\n\t\treturn $this->current_section;\n\t}", "title": "" }, { "docid": "785f5d58a3734fa1392e8d079d9ba05c", "score": "0.54269004", "text": "public function get_sections() {\n\t\treturn $this->sections;\n\t}", "title": "" }, { "docid": "ae742874841dbb2b5a6cc10dcf9ba3da", "score": "0.5411418", "text": "function ciniki_sponsors_wng_sections(&$ciniki, $tnid, $args) {\n\n //\n // Check to make sure the module is enabled\n //\n if( !isset($ciniki['tenant']['modules']['ciniki.sponsors']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sponsors.33', 'msg'=>\"I'm sorry, the section you requested does not exist.\"));\n }\n\n $sections = array();\n\n //\n // Load the list of levels\n //\n $strsql = \"SELECT id, name \"\n . \"FROM ciniki_sponsor_levels \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"ORDER BY sequence, name \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.sponsors', array(\n array('container'=>'levels', 'fname'=>'id', 'fields'=>array('id', 'name')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sponsors.44', 'msg'=>'Unable to load ', 'err'=>$rc['err']));\n }\n $levels = isset($rc['levels']) ? $rc['levels'] : array();\n\n //\n // Display sponsors\n //\n if( ciniki_core_checkModuleFlags($ciniki, 'ciniki.sponsors', 0x01) && count($levels) > 0 ) {\n $sections['ciniki.sponsors.level'] = array(\n 'name'=>'Images',\n 'module' => 'Sponsors',\n 'settings'=>array(\n 'title' => array('label' => 'Title', 'type' => 'text'),\n 'level-id' => array('label' => 'Level', 'type' => 'select',\n 'complex_options' => array('value'=>'id', 'name'=>'name'),\n 'options' => $levels,\n ),\n 'layout' => array('label' => 'Layout', 'type' => 'toggle', 'default'=>'imagebuttons',\n 'toggles' => array('imagebuttons' => 'Image Buttons', 'flexcards' => 'Flex Cards'),\n ),\n ),\n );\n }\n\n\n //\n // Sponsorship packages\n //\n if( ciniki_core_checkModuleFlags($ciniki, 'ciniki.sponsors', 0x10) ) {\n $sections['ciniki.sponsors.packages'] = array(\n 'name'=>'Sponsorship Packages',\n 'module' => 'Sponsors',\n 'settings'=>array(\n 'title' => array('label' => 'Title', 'type' => 'text'),\n ),\n );\n }\n\n\n\n return array('stat'=>'ok', 'sections'=>$sections);\n}", "title": "" }, { "docid": "83ddd2abffc3c0df2c3d8be40a375771", "score": "0.5404412", "text": "function upfw_sections_callback( $section_passed ) {\n\tglobal $up_tabs;\n\tforeach ( $up_tabs as $tabname => $tab ) {\n\t\t$tabsections = $tab['sections'];\n\t\tforeach ( $tabsections as $sectionname => $section ) {\n\t\t\tif ( 'upfw_' . $sectionname . '_section' == $section_passed['id'] ) {\n\t\t\t\t?>\n\t\t\t\t<p><?php echo $section['description']; ?></p>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "91d481edc3e9f355b7391c5183aab159", "score": "0.53974026", "text": "protected function _getSectionStruct()\n {\n // Retrieving section structure is moved to separate method because it is required\n // for validation of multiple entity parts but its local caching into static\n // variable is not always possible (e.g. when validating \"translation\" entity part without\n // prior validation of \"text\" part).\n static $sections = array();\n\n $id = $this->_entity->section;\n if (!array_key_exists($id, $sections)) {\n $sections[$id] = Rx_ModelManager::get('translate_sections')->getItem($id);\n }\n return ($sections[$id]);\n }", "title": "" }, { "docid": "ac74550c46512b55c19fc42fcae6260e", "score": "0.53955024", "text": "function mai_get_sections( $sections, $post_id = '' ) {\n\n\tif ( ! $post_id ) {\n\t\t$post_id = get_the_ID();\n\t}\n\n\t$html = '';\n\t$has_banner = mai_is_banner_area_enabled();\n\t$has_h1 = mai_sections_has_h1( $post_id );\n\n\t$valid = array(\n\t\t'align',\n\t\t'align_content',\n\t\t'bg',\n\t\t'class',\n\t\t'content_width',\n\t\t'context',\n\t\t'text_size',\n\t\t'height',\n\t\t'id',\n\t\t'inner',\n\t\t'overlay',\n\t\t'title',\n\t);\n\n\t/**\n\t * Filter to allow new settings to get passed to mai_get_section() function.\n\t *\n\t * @access private\n\t *\n\t * @since 1.7.0\n\t */\n\t$valid = apply_filters( 'mai_valid_section_args', $valid );\n\n\t// Loop through each section.\n\tforeach ( $sections as $section ) {\n\n\t\t// Reset args.\n\t\t$args = array();\n\n\t\t// Set the args.\n\t\tforeach ( $valid as $setting ) {\n\t\t\t$args[ $setting ] = isset( $section[ $setting ] ) ? $section[ $setting ] : '';\n\t\t}\n\n\t\t// Unset context if empty, this allows the defaults to be set in the Mai_Section class.\n\t\tif ( isset( $args['context'] ) && empty( $args['context'] ) ) {\n\t\t\tunset( $args['context'] );\n\t\t}\n\n\t\t// Set the bg image.\n\t\t$args['image'] = isset( $section['image_id'] ) ? $section['image_id'] : '';\n\n\t\t// Set the content.\n\t\t$content = isset( $section['content'] ) ? trim( $section['content'] ) : '';\n\n\t\t// Skip if no title and no content and no image.\n\t\tif ( empty( $args['title'] ) && empty( $args['image'] ) && empty( $content ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// If no banner area.\n\t\tif ( ! $has_banner ) {\n\n\t\t\t/**\n\t\t\t * Check content first, so there is more manual control over h1.\n\t\t\t * If no h1 yet, and we have content, check it for an h1.\n\t\t\t */\n\t\t\tif ( ! $has_h1 && ! empty( $content ) ) {\n\t\t\t\tif ( false !== strpos ( $content, '<h1' ) ) {\n\t\t\t\t\t$has_h1 = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * If no h1 yet, and we have a section title, make it an h1.\n\t\t\t */\n\t\t\tif ( ! $has_h1 && ! empty( $section['title'] ) ) {\n\t\t\t\t$args['title_wrap'] = 'h1';\n\t\t\t\t$has_h1 = true;\n\t\t\t}\n\t\t}\n\n\t\t$html .= mai_get_section( $content, $args );\n\t}\n\n\treturn $html;\n}", "title": "" }, { "docid": "97d3813c5dc038ff4a697e2d26e61216", "score": "0.5395321", "text": "function parseSection($node) {\n\t\t$deployment = $this->getDeployment();\n\t\t$context = $deployment->getContext();\n\n\t\t// Create the data object\n\t\t$sectionDao = DAORegistry::getDAO('SectionDAO');\n\t\t$section = $sectionDao->newDataObject();\n\t\t$section->setContextId($context->getId());\n\t\t$section->setReviewFormId($node->getAttribute('review_form_id'));\n\t\t$section->setSequence($node->getAttribute('seq'));\n\t\t$section->setEditorRestricted($node->getAttribute('editor_restricted'));\n\t\t$section->setMetaIndexed($node->getAttribute('meta_indexed'));\n\t\t$section->setMetaReviewed($node->getAttribute('meta_reviewed'));\n\t\t$section->setAbstractsNotRequired($node->getAttribute('abstracts_not_required'));\n\t\t$section->setHideAuthor($node->getAttribute('hide_author'));\n\t\t$section->setHideTitle($node->getAttribute('hide_title'));\n\t\t$section->setAbstractWordCount($node->getAttribute('abstract_word_count'));\n\n\t\t$unknownNodes = array();\n\t\tfor ($n = $node->firstChild; $n !== null; $n=$n->nextSibling) {\n\t\t\tif (is_a($n, 'DOMElement')) {\n\t\t\t\tswitch ($n->tagName) {\n\t\t\t\t\tcase 'id':\n\t\t\t\t\t\t// Only support \"ignore\" advice for now\n\t\t\t\t\t\t$advice = $n->getAttribute('advice');\n\t\t\t\t\t\tassert(!$advice || $advice == 'ignore');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'abbrev':\n\t\t\t\t\t\tlist($locale, $value) = $this->parseLocalizedContent($n);\n\t\t\t\t\t\tif (empty($locale)) $locale = $context->getPrimaryLocale();\n\t\t\t\t\t\t$section->setAbbrev($value, $locale);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'policy':\n\t\t\t\t\t\tlist($locale, $value) = $this->parseLocalizedContent($n);\n\t\t\t\t\t\tif (empty($locale)) $locale = $context->getPrimaryLocale();\n\t\t\t\t\t\t$section->setPolicy($value, $locale);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'title':\n\t\t\t\t\t\tlist($locale, $value) = $this->parseLocalizedContent($n);\n\t\t\t\t\t\tif (empty($locale)) $locale = $context->getPrimaryLocale();\n\t\t\t\t\t\t$section->setTitle($value, $locale);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$unknownNodes[] = $n->tagName;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!$this->_sectionExist($section)) {\n\t\t\t$sectionId = $sectionDao->insertObject($section);\n\t\t\tif (count($unknownNodes)) {\n\t\t\t\tforeach ($unknownNodes as $tagName) {\n\t\t\t\t\t$deployment->addWarning(ASSOC_TYPE_SECTION, $sectionId, __('plugins.importexport.common.error.unknownElement', array('param' => $tagName)));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$deployment->addProcessedObjectId(ASSOC_TYPE_SECTION, $sectionId);\n\t\t}\n\t}", "title": "" }, { "docid": "b9b33f047982369718b13863188a5abc", "score": "0.53887206", "text": "public function get_active_section() {\n\t\t$sections = $this->get_sections();\n\n\t\tif ( ! $sections ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$section = ! empty( $_REQUEST['section'] ) ? $_REQUEST['section'] : false;\n\t\tif ( ! $section || empty( $sections[ $section ] ) ) {\n\t\t\t$section_keys = array_keys( $sections );\n\t\t\t$section = reset( $section_keys );\n\t\t}\n\n\t\treturn $section;\n\t}", "title": "" }, { "docid": "bbdc2e7de548ff50fa74a3634a53e7d1", "score": "0.5385978", "text": "public function getSections() {\n return $this->sections;\n }", "title": "" }, { "docid": "e094baf74d6f0931e0e3955779443fca", "score": "0.5378169", "text": "public function getSections(): array\n {\n return $this->sections;\n }", "title": "" }, { "docid": "5d2633425508d379dea347dc5cc2df26", "score": "0.53746754", "text": "function display_section_emporterpage_commander(){}", "title": "" }, { "docid": "1597a280df2a34b773584235f585ebc6", "score": "0.5350455", "text": "public function present_sections() {\n\t\treturn $this->sections->present();\n\t}", "title": "" }, { "docid": "6a16ba04693b98252301b133373cc416", "score": "0.5346576", "text": "private function check_section() {\n $cond = NULL;\n if($this->type_post != 'add') {\n $cond = \"AND sec_id != {$this->get_id}\";\n }\n $ch = $this->select(\"*\", \"works_sections\", \"WHERE sec_unique = ? {$cond}\");\n $ch->execute(array($this->name_unique));\n $info = $ch->rowCount();\n if($info > 0) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "eeb719bee3ff7e98335104bc85b90d70", "score": "0.5337025", "text": "function get_main_section_id() {\n\treturn key( get_sections() );\n}", "title": "" }, { "docid": "a05d8f4219da575eb190453a8c26e4b4", "score": "0.5324691", "text": "public function getIdSection(){\n return $this->id_Section;\n }", "title": "" }, { "docid": "9b07a2a10a0d592e658e1a4fc26b054a", "score": "0.53226227", "text": "private function section() {\n $in_section = false;\n $section_name = '';\n $section_lines = 0;\n $on_line = 0;\n $section_content = array();\n \n if($this->fh === false) {\n return false;\n }\n \n while(($line = fgets($this->fh)) !== false) {\n $line = trim($line);\n if($this->comment($line)) {\n continue;\n }\n \n if($in_section) {\n if(strpos($line,'END_'.$section_name) === 0) {\n return array(\n 'name' => $section_name,\n 'lines' => $section_lines,\n 'content' => $section_content\n );\n }else if($on_line <= $section_lines) {\n array_push($section_content,$line);\n $on_line++;\n continue;\n }else {\n $this->lastError = 'Section Can Not Find Ending';\n return false;\n }\n }\n \n if(strpos($line,'BEGIN_') === 0) {\n $in_section = true;\n $section_info = explode(' ',$line);\n $section_name = substr($section_info[0],6);\n $section_lines = $section_info[1];\n $on_line = 0;\n $section_content = array();\n continue;\n }\n }\n return false;\n }", "title": "" }, { "docid": "562ddd4d389ecee5bb10ff2755de8aff", "score": "0.5320063", "text": "public function section()\n {\n return $this->belongsTo('App\\Section', 'section_id')->get();\n }", "title": "" }, { "docid": "5a5187ad6521c554b77d1e547765fea5", "score": "0.53198606", "text": "public function getIdSection() {\n\t\treturn $this->idSection;\n\t}", "title": "" }, { "docid": "5b409b73b1599b670a492d8defb581bf", "score": "0.53096336", "text": "private function checkIsArticlePageForSection(tx_newspaper_CachablePage $page) {\r\n $this->checkSectionMatches($page);\r\n\r\n $pagetype = $page->getNewspaperPage()->getPageType();\r\n $this->assertTrue((bool)$pagetype->getAttribute('is_article_page'), 'Page is article page: ' . print_r($pagetype, 1));\r\n }", "title": "" }, { "docid": "60a685eef6b422e8395a9746f69a6038", "score": "0.5307974", "text": "private function Articles() {\n\t\t$this->title_caption = \"Kosmeyin - Articles\";\n\t\t$this->GetHeader($this->title_caption); \n\t\tinclude(\"views/article.php\"); \n\t\t$this->GetFooter(); \n\t}", "title": "" }, { "docid": "bfd9ee34557beb1456075dde94856a2b", "score": "0.53063923", "text": "function front_getBannerInfo(&$category_id, &$banner_section) {\r\n $alias_names[LISTING_FEATURE_FOLDER] = ALIAS_LISTING_MODULE;\r\n $alias_names[EVENT_FEATURE_FOLDER] = ALIAS_EVENT_MODULE;\r\n $alias_names[ARTICLE_FEATURE_FOLDER] = ALIAS_ARTICLE_MODULE;\r\n $alias_names[PROMOTION_FEATURE_FOLDER] = ALIAS_PROMOTION_MODULE;\r\n $alias_names[CLASSIFIED_FEATURE_FOLDER] = ALIAS_CLASSIFIED_MODULE;\r\n $alias_names[BLOG_FEATURE_FOLDER] = ALIAS_BLOG_MODULE;\r\n \r\n /**\r\n * Getting URL to do correct include\r\n */\r\n $aux_array_url = explode(\"/\", $_SERVER[\"REQUEST_URI\"]);\r\n \r\n if (EDIRECTORY_FOLDER) {\r\n $auxFolder = explode(\"/\", EDIRECTORY_FOLDER);\r\n $searchPos = count($auxFolder);\r\n } else {\r\n $searchPos = 1;\r\n }\r\n \r\n $searchPos_2 = 2;\r\n $searchPos_3 = 3;\r\n $searchPos_4 = 4;\r\n\r\n if (EDIRECTORY_FOLDER) {\r\n $auxFolder = explode(\"/\", EDIRECTORY_FOLDER);\r\n $searchPos = count($auxFolder) - 1;\r\n $searchPos_2 += $searchPos;\r\n $searchPos_3 += $searchPos;\r\n $searchPos_4 += $searchPos;\r\n }\r\n \r\n $module_key = array_search($aux_array_url[$searchPos], $alias_names);\r\n \r\n if ($module_key) {\r\n $banner_section = $module_key;\r\n \r\n if ($_GET[\"category_id\"]) {\r\n $category_id = $_GET[\"category_id\"];\r\n } elseif (($aux_array_url[$searchPos_2] == ALIAS_CATEGORY_URL_DIVISOR) && $aux_array_url[$searchPos_3]) {\r\n $_GET[\"url_full\"] = DEFAULT_URL.str_replace(EDIRECTORY_FOLDER, \"\", $_SERVER[\"REQUEST_URI\"]);\r\n include(EDIR_CONTROLER_FOLDER.\"/\".constant(strtoupper($module_key).\"_FEATURE_FOLDER\").\"/rewrite.php\");\r\n $category_id = $_GET[\"category_id\"];\r\n }\r\n }\r\n }", "title": "" }, { "docid": "5ed94f68aa99e9a7f3fefd9f7ae9d786", "score": "0.53054404", "text": "function displaysection($ar) {\n $p = new XParam($ar, array(\"level\"=>1,\"tplentry\"=>\"it\",\n\t\t\t \"toc\"=>\"1\",\"maxlevel\"=>1));\n $tplentry = $p->get(\"tplentry\");\n $oidsection = $p->get(\"oidsection\");\n\n $lang = XShell::getLangData();\n $tab= XDataSource::objectFactoryHelper8('BCLASS=XDSTable&SPECS='.$oidsection);\n if($tplentry==TZR_RETURN_DATA)\n return $tab->display(array(\"oid\"=>$oidsection, \"tplentry\"=>TZR_RETURN_DATA));\n else\n $tab->display(array(\"oid\"=>$oidsection, \"tplentry\"=>$tplentry));\n }", "title": "" }, { "docid": "1e09c7fddaae3ff3999db28fc2fc0ae8", "score": "0.53045106", "text": "function getConfig() \n {\n return $this->sections;\n }", "title": "" }, { "docid": "769f152b4d73e1bda7b04ed30bd13193", "score": "0.53035784", "text": "public function show() {\n\t\tif (!isset($this->request->arguments[2])) {\n\t\t\t$this->index();\n\t\t} else {\n\t\t\t\n\t\t\t// Controller helper\n\t\t\t$this->viewHelper = new View_Articles_Helper($this->request->baseUrl);\t\n\t\t\t// The sidebar\n\t\t\t$this->data['view_article_sidebar'] = $this->viewHelper->articleSidebar();\n\t\n\t\t\t// Try to fetch the requested article\n\t\t\t$this->articles = new Article(Database::Instance());\n\t\t\t$article = $this->articles->getByLink($this->request->arguments[2]);\n\n\t\t\tif (!empty($article)) {\n\t\t\t\t// The main View\n\t\t\t\t$this->data['view_article'] = $this->viewHelper->articleView($article);\n\t\t\t\n\t\t\t\t// Ugly hack to make up for html in post...\n\t\t\t\tif ($this->request->arguments[2]==\"begravningsseder-och-bruk\") {\n\t\t\t\t\t$this->data['pageStyle'] = \"article.articles { width: 100%; } aside.begravning-right { background: white; float: right; width: 35%; } aside.begravning-right figure { margin: 20px 0 20px 40px; }\";\n\t\t\t\t\t$this->data['pageStyle'] .= \" div.primary { width: 80%; } div.secondary { display: none; } article.begravning-left { width: 65%; float: left; } \";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// The related images \n\t\t\t\t\t$this->data['view_images'] = $this->viewHelper->articleImages($this->request->arguments[2]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->data['view_article'] = \"<p>Artikeln hittades inte</p>\";\n\t\t\t}\n\n\t\t}\n\t}", "title": "" }, { "docid": "166eda6a032e0994e8b0d61165355c1c", "score": "0.5300101", "text": "function display_section_emporterpage_message(){}", "title": "" }, { "docid": "a1759f3523ade7d307bf1127f3f141bb", "score": "0.52968556", "text": "public function get_section( $section ){\r\n\t \t\t$query = \"SELECT * from tblAppSecao \" ;\r\n\t \t\t$query .= \"where idSecao = $section \" ;\r\n\t \t\t$query .= ' AND ' . util::get_site_id_name() . ' = ' . SITE_ID ;\r\n\r\n\t \t\t$result = mysqli_query($this->configs, $query ) ;\r\n\r\n\t \t\t$rows = array();\r\n\r\n\t \t\twhile( $r = mysqli_fetch_assoc( $result ) ) {\r\n\t \t\t\t$rows[] = $r;\r\n\t \t\t}\r\n\r\n\t \t\treturn $rows ;\r\n\t \t}", "title": "" }, { "docid": "5453343721d175f07850fcbd60da2a82", "score": "0.52966076", "text": "function diy_section_callback() { }", "title": "" }, { "docid": "412187a577bc1ebb25aa2bc2e0f4d9ac", "score": "0.52961326", "text": "public function getSection()\n {\n if (array_key_exists(\"section\", $this->_propDict)) {\n if (is_a($this->_propDict[\"section\"], \"\\Beta\\Microsoft\\Graph\\Model\\EducationSynchronizationCustomization\") || is_null($this->_propDict[\"section\"])) {\n return $this->_propDict[\"section\"];\n } else {\n $this->_propDict[\"section\"] = new EducationSynchronizationCustomization($this->_propDict[\"section\"]);\n return $this->_propDict[\"section\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "dd1b83654453eb7261c92231f32b688f", "score": "0.529515", "text": "public function getCurrentSiteSection(): SiteSectionInterface;", "title": "" }, { "docid": "74f9ba56a15ed18a30037a8acbe4f33f", "score": "0.5288021", "text": "protected function section($page)\n {\n return $this->didNotRequestSection()\n ? null\n : $this->guessSection($page);\n }", "title": "" }, { "docid": "d0e0313209e8d8f79670dd2e4d76aced", "score": "0.5285002", "text": "public function describe()\n {\n if (isset($this->request->getGet()[\"id\"])) { /* si il y a un identifiant */\n $article = (new ArticleBd())->eagerSelectOne((int)$this->request->getGet()['id']);\n if (!$article) { /* article inexistant => redirection vers l'accueil avec notification pour aider\n l'utilisateur*/\n $_SESSION['error'] = \"L'article demandé n'existe pas\";\n header('Location: index.php');\n exit();\n } else { /* article existe => affichage de l'article */\n if (($article->getPublicationStatus() == \"publie\") ||\n $this->roleManager->renderAccessDenied($this, array('ROLE_ADMIN', 'ROLE_EDITOR'))) {\n $this->render(\"article/vOneArticle.html.twig\", array(\"article\" => $article));\n }\n }\n } else { /* id non renseigné => redirection vers l'accueil*/\n $_SESSION['error'] = \"Aucun article demandé\";\n header('Location: index.php');\n exit();\n }\n }", "title": "" }, { "docid": "745c8bccb70c955653da7dd0252ab826", "score": "0.5283662", "text": "function section()\n\t{\n\t\treturn new \\OpenTHC\\CRE\\OpenTHC\\Section($this);\n\t}", "title": "" }, { "docid": "ad8290d4c4519e3fa6e63b56823ed931", "score": "0.52820057", "text": "function get_html_articles_by_section($section, $cid, $start, $offset) {\n global $conn;\n \n $start = ($start*$offset);\n \n $query = \"select *, GROUP_CONCAT(a.cat_name SEPARATOR ', ') category_name \n from (\n select articles_html.id, title, image, client_id, added_by, date_added, views, pg_rated_id, section, \n updated_date, updated_by, categories.name cat_name, categories.id cat_is\n from articles_html \n inner join article_categories on article_categories.aid = articles_html.id\n inner join categories on categories.id = article_categories.cid\n where section='$section' and client_id='\" . $cid . \"' order by id desc) a\n group by a.id order by a.id desc limit $start, $offset\"; \n // echo($query);\n $res = $conn->db_query($query);\n \n $helper_obj = new Helper();\n \n $all_articles = array();\n \n $count = $start;\n \n //while($row = $conn->db_fetch_array($res)) { \n while($row = $res->fetch_assoc()){\n $row['date_added'] = \"منذ \" . $helper_obj->time_elapsed_string(($row['date_added'])); \n \n $row['num_comments'] = get_num_of_comments($row['id']);\n \n $row['image'] = str_replace(\"new.bab.com\", \"www.bab.com\", $row['image']);\n \n /*if($cid == 45){ //tech\n if($count == 0){ \n $row['image'] = 'video_images_feature/'.$row['image']; \n }\n else{\n $row['image'] = 'video_images_thumbnail/'.$row['image']; \n }\n } */\n \n $count++;\n \n $row['count'] = $count;\n \n $all_articles[] = $row;\n }\n // pr($all_articles);\n /*if ($section == 2) {*/\n /*if ($sencha) {\n $json = $callback . '({\n \"proposals\": \n ';\n \n $json .= json_encode($all_articles);\n \n $json .= '})';\n }\n else{ */\n $json = json_encode($all_articles); \n /* } */\n \n return $json;\n /* }\n else{ \n return build_json_array($res);\n } */\n}", "title": "" }, { "docid": "d1f994d1171f9ddd15fce21de9d50537", "score": "0.526574", "text": "function getNumSections() {\n\t\treturn count( $this->sections->byIndex );\n }", "title": "" }, { "docid": "0095080e753e0186f55d9f135924fe94", "score": "0.5261074", "text": "public function print_section_info()\r\n {\r\n // print 'Enter your settings below:';\r\n }", "title": "" }, { "docid": "4de83f5ffc8bb53a80f86e2488d34d69", "score": "0.526086", "text": "public function getResume_article()\n {\n return $this->resume_article;\n }", "title": "" }, { "docid": "ad954a303930d6ceddede0c871a8bc1b", "score": "0.52608055", "text": "function getExampleSection($id)\n{\n global $sections;\n foreach ($sections as $title => $spec) {\n if (strncmp($spec['basename'], $id, strlen($spec['basename'])) === 0) {\n return $title;\n }\n }\n return false;\n}", "title": "" }, { "docid": "cb0d17736ceb22d0d1b3606b9ac1bd44", "score": "0.52569604", "text": "function __invoke() {\n\t\treturn $this->getAllSections( false, self::SECTIONLIST_BY_NAME );\n }", "title": "" }, { "docid": "cb064ab8ec791a8e935328da9856b6a0", "score": "0.5249532", "text": "public function getSections(Request $r){\n $page = $r->has(\"page\") && $r->input(\"page\") > 0 ? $r->input(\"page\") : 1;\n $quantity = $r->has(\"quantity\") ? $r->input(\"quantity\") : 15;\n $quantity = min(max($quantity, 1), 100);\n\n $sections = DB::table(\"sections\");\n if($r->has(\"category-id\") && is_numeric($r->input(\"category-id\"))){\n $sections = $sections->where(\"category_id\",\"=\",$r->input(\"category-id\"));\n }\n $total = $sections->count();\n $sections = $sections->limit($quantity)->offset(($page-1)*$quantity)->get();\n\n $data = [\n \"total\" => $total,\n \"content\" => []\n ];\n $user = Auth::user();\n foreach($sections as $index=>$content){\n $section = Section::find($content->id);\n $isRead = !$user? true : $section->isReadBy($user->id);\n $data[\"content\"][$index] = [\n \"id\"=>$content->id,\n \"name\"=>$content->name,\n \"image\"=>$content->image,\n \"color\"=>$content->color,\n \"categoryId\"=>$content->category_id,\n \"isRead\"=>$isRead\n ];\n }\n\n return response()->json($data, 200);\n }", "title": "" }, { "docid": "33b9445495af1dd3b90c44efdda704a1", "score": "0.52425617", "text": "protected function sections()\n {\n return array_filter(explode(',', $this->option('only') ?? ''));\n }", "title": "" }, { "docid": "99190202689154ba627a4261e988fcfe", "score": "0.52361345", "text": "public function getSectionRef()\n {\n return $this->sectionRef;\n }", "title": "" }, { "docid": "2f5ca980c2b89399dcf92533c41eb3a1", "score": "0.52347577", "text": "public function print_section_info()\n {\n _e('Enter your settings below:', 'deliver-with-econt');\n }", "title": "" }, { "docid": "5cc849d8768e75b9fe65cd0c00e27bbe", "score": "0.5224729", "text": "public function get_section_list() {\r\n $this->db->select('*');\r\n $this->db->from('tbl_section');\r\n $query = $this->db->get();\r\n return $query->result();\r\n }", "title": "" }, { "docid": "06aa451d44d2dc7c19b3ad4c246698b3", "score": "0.52205503", "text": "public function getContenu_article()\n {\n return $this->contenu_article;\n }", "title": "" }, { "docid": "d8f1c4a0b64ee8e9271597f9e91c8ee0", "score": "0.5219725", "text": "public function getSection($name)\n\t{\n\t\treturn isset($this->sections[$name]) ? $this->sections[$name] : NULL;\n\t}", "title": "" }, { "docid": "9369b93d96ddb2465f53475768a873ac", "score": "0.5217322", "text": "public function testGetSection()\n {\n // Lets create some models to test\n $cat = \\Phoenix\\Models\\Unit\\Documentation\\Category::create(['name' => 'Basic Training', 'order'=> 1]);\n $section = $cat->sections()->create(['name' => 'First Steps', 'order' => 1]);\n\n // Actual Test\n $this->json('GET','api/documentation/categories/'.$cat->id.'/sections/'.$section->id)->seeJson(['name'=> 'First Steps']);\n }", "title": "" }, { "docid": "46b2517213a7c9c38c85a5996a80c061", "score": "0.521402", "text": "public function print_section_info() {\n\t //print 'Enter your settings below:';\n\t }", "title": "" }, { "docid": "13b94ff6cddf09bfd4e70459572d3dab", "score": "0.52041847", "text": "function wpc_custom_front_sections( $num_sections )\n\t{\n\t\treturn 4; //Change this number to change the number of the sections.\n\t}", "title": "" }, { "docid": "a28fcab7ab12abb009f382aea82b6e51", "score": "0.5202531", "text": "public function sections()\n {\n $this->sections_info = array();\n\n // If there are more than one same course in single term, such as 'PHYS 172000',\n // then additional array for each course is wrapped.\n if ($this->countCourses() > 1) {\n for ($i = 0; $i < $this->countCourses(); $i++) {\n foreach ($this->class_info[$i] as $class) {\n array_push($this->sections_info, [\n 'CourseIndex' => $i,\n 'Sections' => $class['Sections']\n ]);\n }\n }\n } else {\n foreach ($this->class_info as $class) {\n array_push($this->sections_info, $class['Sections']);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "f44dfe9c994c98b2cf4484b2d67d7c1e", "score": "0.5196527", "text": "function getSections()\n {\n // If the file is not loaded yet...\n if(!($this->loaded))\n {\n // ...load it to memory\n $this->loadFile();\n }\n\n return isset($this->results) ? array_keys($this->results) : array();\n }", "title": "" }, { "docid": "b2ed8e9c6dd2e3c4a3ef3b86fbe83059", "score": "0.519345", "text": "public function getSectionName()\n {\n return $this->sectionName;\n }", "title": "" }, { "docid": "e3bc4791207d8406f97edb7de3ae1c30", "score": "0.51930916", "text": "function page_section($pagetitle)\n\t\t{\n\t\t$page = $this->db\n\t\t\t->select('\n\t\t\t\tid,\n\t\t\t\tname,\n\t\t\t\turl_name,\n\t\t\t\ttext,\n\t\t\t\tcontainer_name,\n\t\t\t\tlang,\n\t\t\t\tside_top,\n\t\t\t\tslide_id,\n\t\t\t\tside_bottom,\n\t\t\t\tcontent_top,\n\t\t\t\tcontent_bottom,\n\t\t\t\tmeta_desc,\n\t\t\t\tmeta_keywords,\n\t\t\t\thide,\n\t\t\t\trestrict_access,\n\t\t\t\tuser_group\n\t\t\t')\n\t\t\t->where('url_name', $pagetitle)\n\t\t\t->where('lang', $this->config->item('language_abbr'))\n\t\t\t->get('pages');\n\t\treturn $page;\n\t\t}", "title": "" }, { "docid": "88e36ff85f705d71de051763acb262bf", "score": "0.5192414", "text": "public function __invoke()\n {\n return $this->getAllSections(false, self::SECTIONLIST_BY_NAME);\n }", "title": "" }, { "docid": "04fb9eac551435fa9740b5e8f33f8b3c", "score": "0.51824415", "text": "function moduleContent() {\r\n\t\t\t\t\tglobal $LANG;\r\n\r\n\t\t\t\t\t/// check if at least one section page type and page zone type are available. if not, this module is senseless.\r\n\t\t\t\t\tif (!tx_newspaper_DB::getInstance()->atLeastOneRecord('tx_newspaper_section')) {\r\n\t\t\t\t\t\tdie($LANG->sL('LLL:EXT:newspaper/mod3/locallang.xml:message_section_placement_no_section_available', false));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!tx_newspaper_DB::getInstance()->atLeastOneRecord('tx_newspaper_pagetype')) {\r\n\t\t\t\t\t\tdie($LANG->sL('LLL:EXT:newspaper/mod3/locallang.xml:message_section_placement_no_pagetype_available', false));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!tx_newspaper_DB::getInstance()->atLeastOneRecord('tx_newspaper_pagezonetype')) {\r\n\t\t\t\t\t\tdie($LANG->sL('LLL:EXT:newspaper/mod3/locallang.xml:message_section_placement_no_pagezonetype_available', false));\r\n\t\t\t\t\t}\r\n\r\n//global $BE_USER; debug(array('section id' => $BE_USER->getModuleData(\"tx_newspaper/mod3/index.php/section_id\"), 'page type id' => $BE_USER->getModuleData(\"tx_newspaper/mod3/index.php/page_type_id\"), 'pagezone type id' => $BE_USER->getModuleData(\"tx_newspaper/mod3/index.php/pagezone_type_id\")));\r\n\t\t\t\t\t$this->readUidList(); // get ids for section, page and pagezone\r\n//debug(array('section id' => $this->section_id, 'page type id' => $this->page_type_id, 'pagezone type id' => $this->pagezone_type_id, 'page id' => $this->page_id, 'pagezone id' => $this->pagezone_id));\r\n//debug($_REQUEST);\r\n\r\n\t\t\t\t\tif (!$this->section_id) {\r\n\t\t\t\t\t\tif (tx_newspaper_DB::getInstance()->atLeastOneRecord('tx_newspaper_section')) {\r\n\t\t\t\t\t\t\t/// check if at least one section exists\r\n\t\t\t\t\t\t\t$this->content .= $LANG->sL('LLL:EXT:newspaper/mod3/locallang.xml:message_section_placement_no_section_available', false);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t/// no section id found, just display message to choose a section from the section tree\r\n\t\t\t\t\t\t\t$this->content .= $LANG->sL('LLL:EXT:newspaper/mod3/locallang.xml:message_section_placement_no_section_chosen', false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (!$this->page_id) {\r\n\t\t\t\t\t\t/// no page has been activated for given section\r\n\t\t\t\t\t\t$this->content .= $LANG->sL('LLL:EXT:newspaper/mod3/locallang.xml:message_section_placement_no_page_available_for_section', false);\r\n\t\t\t\t\t} else if (!$this->pagezone_id) {\r\n\t\t\t\t\t\t/// no pagezone has been activated for given page for given section\r\n\t\t\t\t\t\t$this->content .= $LANG->sL('LLL:EXT:newspaper/mod3/locallang.xml:message_section_placement_no_pagetype_available_for_page', false);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t/// render form for pagezone\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t$content = tx_newspaper_BE::renderBackendPageZone(\r\n\t\t\t\t\t\t\t\ttx_newspaper_PageZone_Factory::getInstance()->create(intval($this->pagezone_id)),\r\n\t\t\t\t\t\t\t\t$this->show_levels_above\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t} catch(tx_newspaper_PathNotFoundException $e) {\r\n\t\t\t\t\t\t\t// \\todo localization\r\n\t\t\t\t\t\t\tdie('Templates could\\'t be found. Is TSConfig newspaper.defaultTemplate set to the correct path?');\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$this->content .= $this->doc->section('', $content, 0, 1);\r\n\r\n\t\t\t\t}", "title": "" }, { "docid": "758ff81b28c85856c1f691f4eec660b5", "score": "0.5177016", "text": "protected function section($name = '')\n {\n return isset($this->sectionData[$name]) ? $this->sectionData[$name] : '';\n }", "title": "" } ]
c419365bf2e509ba38e31a8dfcf39c74
Fetch all your eshops in account
[ { "docid": "efc690919631e69521ea15054b59165c", "score": "0.7395745", "text": "public function fetchAllEshops()\n {\n $response = $this->client->request('GET', 'eshops', $this->createHeaders());\n return json_decode($response->getBody()->getContents());\n }", "title": "" } ]
[ { "docid": "77ea7ccf59de6c9525a8a71c2c4929bd", "score": "0.61317676", "text": "public function getAllShops() {\n $result = $this->getData([\"sh.addid\" => \"ad.addid\"]);\n return $result;\n }", "title": "" }, { "docid": "7570e3be8c040cb4601d71e3fba1ac48", "score": "0.5998621", "text": "public function fetchList()\n {\n $list = $this->client->getAccountList();\n array_walk($list, function ($account) {\n YysAccountRepository::save($account);\n });\n\n return $list;\n }", "title": "" }, { "docid": "08351ce3484481b218b79d681f7a483b", "score": "0.5937158", "text": "public function getall()\n {\n $client = new Client();\n\n $this->auth();\n\n $res = $client->get( $this->url.\"GetAllAccounts/\".$this->token);\n\n\n\n return $res->getBody()->getContents();\n }", "title": "" }, { "docid": "9343b4ab1f2afd68e73dd58c9f8e7c62", "score": "0.5873891", "text": "public function index()\n {\n if (isset(Auth::User()->shopId)) {\n $shopTypeId = ShopInformation::where('shopInfoId',Auth::User()->shopId)->first()->shopTypeId;\n $shopEmployeeList = ShopEmployeeEntry::with('shopEmployeeTypes','JobDepartments')->where('shopId',Auth::User()->shopId)->where('shopTypeId',$shopTypeId)->latest()->paginate(20);\n return ['employeeList' => $shopEmployeeList];\n }\n else {\n $shopEmployeeList = ShopEmployeeEntry::with('shopEmployeeTypes','JobDepartments')->where('createBy',Auth::User()->id)->latest()->paginate(20);\n return ['employeeList' => $shopEmployeeList];\n }\n }", "title": "" }, { "docid": "5dc5f79e3db7264bad54b68e8f5066c7", "score": "0.5873061", "text": "public function getAccounts();", "title": "" }, { "docid": "2ff03703f3f1ff93885e0a6a2ab55498", "score": "0.58402836", "text": "function list_whm_accounts()\n {\n if (!empty ($this->whm_password))\n {\n $whm_url = $this->proto . $this->whm_user . \":\" . $this->whm_password . \"@\" . $this->whm_server . \":\" . $this->whm_port . \"/scripts2/listaccts?nohtml=1&viewall=1\";\n ob_start();\n $response = file_get_contents($whm_url,FALSE,NULL,0,99999);\n ob_end_clean();\n }\n elseif (!empty ($whm_hash))\n {\n $response = $this->whm_request(\"/scripts2/listaccts?nohtml=1&viewall=1\");\n }\n //echo $whm_url.\"<br />\".$response;\n $page = split(\"\\n\",strip_tags($response));\n foreach ($page as $line)\n {\n @list($acct,$contents) = @split(\"=\", $line);\n if ($acct != \"\")\n {\n $allc = split(\",\", $contents);\n $accts[$acct] = $allc;\n }\n }\n $this->result = $accts;\n return $this->result;\n }", "title": "" }, { "docid": "5f36c62a9ec92c7c4dfb6d0b62e1a084", "score": "0.5821764", "text": "public function findAll() {\n $this->totalCount = $this->getTotalCount();\n\n $currentCount = 1;\n $i = 1; // how many records\n while ($currentCount < $this->totalCount) {\n\n $url = $this->getFetchResultsUrl($currentCount);\n $this->oauth->fetch($url);\n //get response in XML\n $response = new SimpleXMLElement($this->oauth->getLastResponse());\n\n //reset the count of the returned results\n $newCount = $response->QueryResponse->{$this->name}->count();\n $currentCount += $newCount;\n\n foreach ($response->QueryResponse->{$this->name} as $obj) {\n $this->objectStorage[] = $obj;\n }\n }\n }", "title": "" }, { "docid": "ce4741f27344dc650c3f0d966ed51b2e", "score": "0.5821146", "text": "function showAllAccounts(){\n $sql = \"SELECT * FROM accounts\";\n return $this->arrayBuilder($sql);\n }", "title": "" }, { "docid": "a8c245da67ab3716733e7eefefc71f95", "score": "0.57572633", "text": "public function getAllServices()\n\t{\n\t\t\t\n\t\t$req=$this->conn->prepare(\"SELECT * FROM service\");\n\t\t$req->execute();\n\t $result=$req->get_result(); \n\t $req->close(); \n\t return $result;\n\t}", "title": "" }, { "docid": "c314c4def0a545312b13aadceab66270", "score": "0.57304627", "text": "function sso_get_all_data_by_login ( $param ) {\n\t\t\n\t\tglobal $sso, $sso_client_title, $sso_client;\n \n $res = $sso->GetAllDataByLogin( $param );\n \n return $res;\n \n\n\t}", "title": "" }, { "docid": "633f86c88702710a513219f2755dfa20", "score": "0.56981695", "text": "public function index()\n {\n $shops = auth()->user()->role == 'seller' ? $shops = auth()->user()->shops() : Shop::query();\n\n return $this->responseSuccess($shops->paginate(3), 'Shops retrieved successfully');\n }", "title": "" }, { "docid": "f7a2eb30565ae43013f203a69196d10d", "score": "0.56682235", "text": "public function index()\n {\n //\n $essay = Essay::all();\n if ($essay){\n return EssayResource::collection($essay);\n }\n }", "title": "" }, { "docid": "e0b1f51a901242b2640209ab02d4a9fa", "score": "0.56675845", "text": "public function cgetUsersAction(){\n $repository = $this->getDoctrine()->getRepository('AppBundle:User');\n $query = $repository->createQueryBuilder('u')->select('u')->getQuery();\n $result = $query->getResult(Query::HYDRATE_ARRAY);\n $view = $this->view($result, 200);\n return $this->handleView($view);\n }", "title": "" }, { "docid": "306a87e6e1d9690fb256bcefeaba1986", "score": "0.56584007", "text": "function get_all()\n {\n $clients = $this->query(\"SELECT * FROM clients WHERE admin_id='\" .$_SESSION['auth_id']. \"'\");\n\t\t\n return $clients;\n }", "title": "" }, { "docid": "eea3f29e4d2ff81bdf43c467925ef44f", "score": "0.56278056", "text": "public function getAllService();", "title": "" }, { "docid": "a62e1054a9845a2c5113564e2cadd7bc", "score": "0.56186837", "text": "public function listpoboxAction()\n {\n $em = $this->getDoctrine()->getManager();\n $user = $this->getUser(); \n $maincompany = $user->getMaincompany();\n $entities = $em->getRepository('NvCargaBundle:Account')->findBy(['isactive'=>TRUE, 'maincompany'=>$maincompany]);\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "55994a021ca7d5e4a4515139e24b7955", "score": "0.5614111", "text": "public function list()\n {\n try\n {\n $data = array();\n $data['page'] = 1;\n $data['per_page'] = 30;\n $data['filters']['sale_system'] = 'Marketplace';\n $data['filters']['statuses'][] = 'pending';\n \n //executar CURL\n $response = $this->api->call(\"orders\", $data, \"GET\")->debug();\n \n //verificar se retornou algum erro\n $this->checkHttpResponse();\n \n return $response;\n \n } catch( \\Exception $e ){\n \n throw new \\Exception($e->getMessage(), $e->getCode());\n \n }\n }", "title": "" }, { "docid": "79aefcdbb756f532f14cad66c27466d5", "score": "0.56115997", "text": "public static function fetchAll() {\n $db = new PDO(DB_SERVER, DB_USER, DB_PW);\n // 2. Prepare the query\n $sql = 'SELECT * FROM emmissions';\n $statement = $db->prepare($sql);\n // 3. Run the query\n $success = $statement->execute();\n // 4. Handle the results\n $arr = [];\n while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n $theClient = new Emmissions($row);\n array_push($arr, $theClient);\n }\n return $arr;\n }", "title": "" }, { "docid": "4db3d3fbbb27aa42a4bff8a7fae2e1f2", "score": "0.5596728", "text": "public function getSiteAccounts()\n { \n\n $accounts = fetch_all(\"SELECT `id`, `label`, `user`,\n `api_key`, `logo_path`, `is_live`, `has_cc`, `type`\n FROM `pmt_account`\n WHERE `user` != '' \n AND `api_key` != '' \n AND `is_live` = '\".((!empty($this->productionMode)) ? self::FLAG_YES : self::FLAG_NO).\"'\");\n\n $this->hasAccounts = !empty($accounts);\n\n return $accounts;\n }", "title": "" }, { "docid": "67592e7f7b732f0fcf056b57e7ae502f", "score": "0.55907893", "text": "public function getUsersAction()\n {\n // Load user repository\n $repository = Shopware()->Models()->getRepository(\\Shopware\\Models\\User\\User::class);\n $builder = $repository->createQueryBuilder('user');\n $fields = [\n 'id' => 'user.id',\n 'roleId' => 'user.roleId',\n 'username' => 'user.username',\n 'password' => 'user.password',\n 'localeId' => 'user.localeId',\n 'sessionId' => 'user.sessionId',\n 'lastLogin' => 'user.lastLogin',\n 'name' => 'user.name',\n 'email' => 'user.email',\n 'active' => 'user.active',\n 'failedLogins' => 'user.failedLogins',\n 'lockedUntil' => 'user.lockedUntil',\n ];\n $builder->select($fields);\n\n $builder->addFilter($this->Request()->getParam('filter', []));\n $builder->addOrderBy($this->Request()->getParam('sort', []));\n\n $builder->setFirstResult($this->Request()->getParam('start'))\n ->setMaxResults($this->Request()->getParam('limit'));\n\n $query = $builder->getQuery();\n\n // Get total result of the query\n $total = Shopware()->Models()->getQueryCount($query);\n\n // Select all shop as array\n $data = $query->getArrayResult();\n\n // Return the data and total count\n $this->View()->assign(['success' => true, 'data' => $data, 'total' => $total]);\n }", "title": "" }, { "docid": "098e6af930ce91c4888f725324e7b7a7", "score": "0.55671436", "text": "public function getAllSalesOfficers() {\n $sql = \"select * from tbl_sales_officer where status = 1\";\n return $this->db->mod_select($sql);\n }", "title": "" }, { "docid": "50f3f60198f50635dde278a0be8c0153", "score": "0.55521905", "text": "public static function get_accounts(){\n\t\t\n\t\t\n\t\t// $access_token = FB_lib::get_access_token();\n\t\t$oauth_token = FB_lib::$oauth_token;\n\t\t\n\t\tif( !self::$accounts['data'] ){\n\t\t\t\n\t\t\ttry{\n\t\t\t\tself::$accounts = FB_lib::$facebook->api( '/me/accounts?access_token=' . $oauth_token );\n\t\t\t\n\t\t\t\tself::remove_applications();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\tforeach( self::$accounts['data'] as $k=>$page ){\n\t\t\t\t\t// self::fix_wayward_sort_orders( self::$accounts['data'][$k]['id'] );\n\t\t\t\t}\n\t\t\t\n\t\t\t\tself::reorder_accounts_array();\n\t\t\t\tself::get_app_installed_and_link();\n\t\t\t\n\t\t\t\t// moved this to FB_view::display_new_admin to defer until after add/delete/order functions\n\t\t\t\t// are called otherwise, shops are fetched and put into the FB_lib::$accounts array\n\t\t\t\t// before user actions are performed\n\t\t\t\t// self::get_page_stores();\n\t\t\t} catch (FacebookApiException $ex) {\n\t\t\t\t// mpuke( $ex );\n\t\t\t}\n\t\t}\n\t\t\n\t\t// mpuke( self::$accounts['data'] );\n\t\t\n\t}", "title": "" }, { "docid": "3c3c61fa4f37433fc62533d91c2fe861", "score": "0.5547103", "text": "public function getAllByUser();", "title": "" }, { "docid": "d5b0d4612315824ea90ddcaa315033bb", "score": "0.55458844", "text": "function sso_get_all_data ( $param ) {\n\t\t\n\t\tglobal $sso, $sso_client_title, $sso_client;\n \n\t\t$param['client'] = $sso_client;\n $param['client_title'] = $sso_client_title;\t\n \n //var_dump_pre($param,'param['.__LINE__.']');\n \n $out = $sso -> GetDataAll( $param );\n \n return $out;\n \n\n\t}", "title": "" }, { "docid": "33bc8a0dcf2ad48f0588321af1c4f2e9", "score": "0.553083", "text": "public function getAccountOperations(){\n //if id is on url\n if(isset($_GET[\"id\"])){\n $id = htmlspecialchars($_GET[\"id\"]);\n }\n\n $query = $this->db->prepare(\n 'SELECT a.id AS a_id , a.amount AS a_amount, a.account_type, o.id AS o_id, o.operation_type, o.amount AS o_amount, o.label, o.account_id\n FROM Account AS a\n INNER JOIN Operation AS o\n ON a.id = o.account_id\n AND o.account_id = :id\n ');\n \n $query->execute([\n \"id\" => $id\n ]);\n \n if($query === false){\n var_dump($pdo->errorInfo());\n die('erreur SQL');\n }\n return $query->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "faaf58369743e77409688f0998349895", "score": "0.5511501", "text": "public function index()\n {\n return AccountResource::collection(Account::paginate());\n }", "title": "" }, { "docid": "3d9ed558d75b66b0c64541fdaaaa97bf", "score": "0.551", "text": "public function allGet();", "title": "" }, { "docid": "6b307a3a1d3a2d58720129ede2cd353e", "score": "0.5494639", "text": "function getSistemsAction() {\r\n \t$idsistema = '10000000002';\r\n \t$certificate = '11000000001';\r\n \t$entity = '100000001';\r\n \t$objcertificado = new SegCertificado();\r\n $datos = $objcertificado->verificarcertificado($certificate); \r\n $idusuario = $datos[0]->idusuario;\r\n if($idusuario) {\r\n \t$rol = DatEntidadSegUsuarioSegRol::obtenerrol($idusuario,$entity);\r\n \t$result = DatSistema::cargarsistemasdelrol($idsistema,$rol[0]->idrol);\r\n }\r\n echo '<pre>';print_r($result);die;\r\n }", "title": "" }, { "docid": "4abfd3c737d1a0679869afbf883184b2", "score": "0.5481329", "text": "public function getAllClientesSarlaft() {\n $sql = \"SELECT * FROM clientes_sarlaft\";\n\n $result = $this->_db->prepare($sql);\n $result->execute();\n\n if(!is_null($result->errorInfo()[2]))\n return $result->errorInfo()[2];\n else\n return $result->fetchAll(PDO::FETCH_ASSOC); \n }", "title": "" }, { "docid": "f944345a1b5fc1bbde7ee78ac9840586", "score": "0.5479411", "text": "public function showAllAuthList()\n\t{\n\t\t$ossbss=new Ossbss();\n\t\t$inputs['offset']=0;\n\t\t$inputs['limit']=$this->_perNums;\n\t\t$result=$ossbss->getInfo('trunks.selectAuthList',$inputs);\n\t\t$result=unsetParam($result,\"msg\");\n\t\treturn json_encode($result);\n\t}", "title": "" }, { "docid": "6ca421323275850a2d7bb74cbd6c9092", "score": "0.54776317", "text": "public function getServicesAction()\n {\n $services = $this->getServiceRepository();\n\n $services->createCurrentQueryBuilder('s');\n\n // Filter\n $filter = $this->getRequest()->get('filter');\n if ($filter) {\n $services->filter($this->cleanFilter($filter, $this->allowed_filter));\n }\n\n // Scope by current user\n if (!isset($filter['user'])) {\n $services->scopeByField('user', $this->getCurrentUser()->getId());\n }\n\n // Sort by name\n $services->getCurrentQueryBuilder()->addOrderBy('s.name', 'ASC');\n\n // Pagination\n return $this->paginate($services->getCurrentQueryBuilder(),\n $this->getRequest()->get('limit'),\n $this->getRequest()->get('offset')\n );\n }", "title": "" }, { "docid": "2552ad8b009587c3aa21fd8be1d337df", "score": "0.54745615", "text": "public function getCentralList(){\n $this->authenticate(Permission::CENTRAL); //Authenticate with permission\n $page = $this->request->getUrlParams()->page;\n $rows = 15;\n $offset = ($page * $rows) - $rows;\n if(strcasecmp($this->request->getUrlParams()->office, 'all') === 0){\n if(!empty($this->request->getUrlParams()->query)){\n $where = [\n \"MATCH\" => [\n \"columns\" => [\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::ACCOUNT_NO,\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::STATUS,\n ],\n \"keyword\" => $this->request->getUrlParams()->query,\n \n // [optional] Search mode\n \"mode\" => \"natural\"\n ],\n 'ORDER'=>SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::ACCOUNT_NO,\n 'LIMIT'=>[$offset,$rows]\n ];\n \n }\n else{\n $where = [\n 'ORDER'=>SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::ACCOUNT_NO,\n 'LIMIT'=>[$offset,$rows]\n ];\n }\n }\n else{\n if(!empty($this->request->getUrlParams()->query)){\n $where = [\n \"MATCH\" => [\n \"columns\" => [\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::ACCOUNT_NO,\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::STATUS,\n ],\n \"keyword\" => $this->request->getUrlParams()->query,\n \n // [optional] Search mode\n \"mode\" => \"natural\"\n ],\n 'AND'=>[SavingsAccountModel::DB_TABLE.'.office'=>$this->request->getUrlParams()->office],\n 'ORDER'=>SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::ACCOUNT_NO,\n 'LIMIT'=>[$offset,$rows]\n ];\n }\n else{\n $where = [\n 'AND'=>[SavingsAccountModel::DB_TABLE.'.office'=>$this->request->getUrlParams()->office],\n 'ORDER'=>SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::ACCOUNT_NO,\n 'LIMIT'=>[$offset,$rows]\n ];\n }\n }\n //fetch customers with $where clause\n $data = $this->db->select(SavingsAccountModel::DB_TABLE,[\n \"[>]offices\"=>[\"office\"=>\"id\"],\n \"[>]customers\"=>[\"account_no\"=>\"account_no\"]\n ],[\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::ACCOUNT_NO,\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::PLAN,\n 'offices.description',\n 'offices.location',\n CustomerModel::DB_TABLE.'.'.CustomerModel::BIO_DATA,\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::BALANCE,\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::STATUS,\n ],$where);\n if(empty($data)){\n $this->response->addMessage('Savings account record is empty, add some new customers and see them appear here');\n $this->response->jsonResponse(null,400);\n }\n else{\n $this->response->addMeta([\n 'balance'=>$this->getCentralBalance($where),\n 'total'=>$this->getCentralTotal($where),\n 'list_total'=>($rows * ($page - 1)) + count($data)]);\n $this->response->jsonResponse($this->response->NormalizeMysqlArray($data));\n }\n }", "title": "" }, { "docid": "a678794a8e034d728bc4f54a5da9513d", "score": "0.5472591", "text": "public function getAccounts(){\n\t\t$accounts = Auth::user()->accounts->groupBy('access_token');\n\n\t\t$resp = view('account.ac_getAll')->with('accounts', $accounts);\n\t\treturn ($resp);\n\t}", "title": "" }, { "docid": "b616a4219d416549a369e1b5fd13d343", "score": "0.5462975", "text": "public function searchServiceByEntity(){\n $conn=Yii::app()->db;\n $sql=\"select sr.id_service,sr.service_name,sr.service_code from public.user as us \"\n . \"left join entity_person as ep on ep.id_person=us.id_person \"\n . \"left join entity as et on et.id_entity=ep.id_entity \"\n . \"left join entity_service as se on se.id_entity=et.id_entity \"\n . \"left join service as sr on sr.id_service=se.id_service \"\n . \"where us.username=:username\";\n $query=$conn->createCommand($sql);\n $username=Yii::app()->user->getId();\n $query->bindParam(\":username\",$username);\n $read=$query->query();\n $res=$read->readAll();\n $read->close();\n return $res;\n }", "title": "" }, { "docid": "29497b5ca4ee57d26eb8e82e71ad82a0", "score": "0.5461235", "text": "public function getList(){\n $this->authenticate(Permission::DEFAULT); //Authenticate with permission\n //check if query was sent with the request\n if(!empty($this->request->getUrlParams()->query)){\n $page = $this->request->getUrlParams()->page;\n $rows = 15;\n $offset = ($page * $rows) - $rows;\n $data = $this->db->select(SavingsAccountModel::DB_TABLE,[\n \"[>]offices\"=>[\"office\"=>\"id\"],\n \"[>]customers\"=>[\"account_no\"=>\"account_no\"]\n ],[\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::ACCOUNT_NO,\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::PLAN,\n 'offices.description',\n 'offices.location',\n CustomerModel::DB_TABLE.'.'.CustomerModel::BIO_DATA,\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::BALANCE,\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::STATUS,\n ],[\n \"MATCH\" => [\n \"columns\" => [\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::ACCOUNT_NO,\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::STATUS,\n ],\n \"keyword\" => $this->request->getUrlParams()->query,\n \n // [optional] Search mode\n \"mode\" => \"natural\"\n ],\n 'ORDER'=>SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::ACCOUNT_NO,\n 'LIMIT'=>[$offset,$rows]\n ]);\n if(empty($data)){\n $this->response->addMessage('There is no account/customer record associated with this keyword in our database');\n $this->response->jsonResponse(null,400);\n }\n else{\n $this->response->addMessage('Search Result for keyword: '.$this->request->getUrlParams()->query);\n $this->response->addMeta([\n 'total'=>$this->getTotal($this->request->getUrlParams()->query),\n 'list_total'=>($rows * ($page - 1)) + count($data)]);\n $this->response->jsonResponse($this->response->NormalizeMysqlArray($data));\n }\n }\n else{\n $page = $this->request->getUrlParams()->page;\n $rows = 15;\n $offset = ($page * $rows) - $rows;\n $data = $this->db->select(SavingsAccountModel::DB_TABLE,[\n \"[>]offices\"=>[\"office\"=>\"id\"],\n \"[>]customers\"=>[\"account_no\"=>\"account_no\"]\n ],[\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::ACCOUNT_NO,\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::PLAN,\n 'offices.description',\n 'offices.location',\n CustomerModel::DB_TABLE.'.'.CustomerModel::BIO_DATA,\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::BALANCE,\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::STATUS,\n ],[\n SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::OFFICE=>Session::get('office'),\n 'ORDER'=>SavingsAccountModel::DB_TABLE.'.'.SavingsAccountModel::ACCOUNT_NO,\n 'LIMIT'=>[$offset,$rows]\n ]);\n if(empty($data)){\n $this->response->addMessage('Savings account record is empty, add some new customers and see them appear here');\n $this->response->jsonResponse(null,400);\n }\n else{\n $this->response->addMeta([\n 'total'=>$this->getTotal(),\n 'list_total'=>($rows * ($page - 1)) + count($data)]);\n $this->response->jsonResponse($this->response->NormalizeMysqlArray($data));\n }\n }\n }", "title": "" }, { "docid": "f3d162b1c9868362630f59319cc15b2e", "score": "0.5455197", "text": "public function index()\n {\n return Services::all();\n }", "title": "" }, { "docid": "4da0ce11c117f335e003553c727aafd7", "score": "0.54509914", "text": "public function all() {\n\t\treturn $this->api->get( $this->_endpoint, array( 'count' => 100 ) );\n\t}", "title": "" }, { "docid": "c58db444705ef22de4fc7b98e27bb9d9", "score": "0.54419816", "text": "public function retrieveAllUsers();", "title": "" }, { "docid": "5e92f9f4fd182cc931e3715310b926de", "score": "0.5439254", "text": "public function index()\n {\n \n return $this->customerRepo->all();\n }", "title": "" }, { "docid": "8cf0c3d03c10d18c93cafb32007c4f2a", "score": "0.5432369", "text": "protected function retrieveAccounts()\n {\n return $this->getModel()->accounts;\n }", "title": "" }, { "docid": "ec14492764a9bd3a5c9f4d21a3f3b99e", "score": "0.5424065", "text": "public function read_all_guestuser(){\n $query = \"select `ct_bookings`.`order_id`,`ct_order_client_info`.*\nfrom `ct_bookings`,`ct_order_client_info`\nwhere\n`ct_bookings`.`client_id` = 0\nand\n`ct_bookings`.`order_id` =`ct_order_client_info`.`order_id`\nGROUP BY `ct_bookings`.`order_id`, `ct_order_client_info`.`id`, `ct_order_client_info`.`order_id`, `ct_order_client_info`.`client_name`, `ct_order_client_info`.`client_email`, `ct_order_client_info`.`client_phone`, `ct_order_client_info`.`client_personal_info` ORDER by `ct_bookings`.`order_id`\";\n $result=mysqli_query($this->conn,$query);\n return $result;\n }", "title": "" }, { "docid": "96b1afbb9f418cfbf39945a197236838", "score": "0.5407583", "text": "public function fetchCustomers(): array;", "title": "" }, { "docid": "d49430292de4b5ad7eae2beb8dcc85db", "score": "0.54074824", "text": "public function fetchOrders(): array;", "title": "" }, { "docid": "22269a3c170dcb7a01fa4a63a097c59b", "score": "0.540591", "text": "public function index()\n {\n // return as a collection\n return $this->service->fetchResources(Seller::class, 'sellers');\n }", "title": "" }, { "docid": "3c26593866e5fe4e5bf3fdf7a79fbfee", "score": "0.5404874", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM opinion_serie';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "3451d797433f272835f29b8799be2d8d", "score": "0.54024935", "text": "public function all()\n {\n return $this->client->get(self::ENDPOINT);\n }", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.54014844", "text": "public function getAll();", "title": "" }, { "docid": "afeb234afd8e3267ed047b0eb0efb766", "score": "0.5396708", "text": "public function index(){\n\n $sqlQuery = \"Select * from sog WHERE is_trashed='NO'\";\n\n\n $sth = $this->dbh->query($sqlQuery);\n\n $sth->setFetchMode(PDO::FETCH_OBJ);\n\n $allData = $sth->fetchAll();\n\n return $allData;\n }", "title": "" }, { "docid": "0f6d4f92795ca6c5f5d37c16ee041665", "score": "0.53963923", "text": "public function getAllAccounts()\n { \n\n $accounts = fetch_all(\"SELECT `id`, `label`, `user`,\n `api_key`, `logo_path`, `is_live`, `has_cc`, `type`\n FROM `pmt_account`\n WHERE 1\n ORDER BY `is_live` DESC\");\n\n $this->hasAccounts = !empty($accounts);\n\n return $accounts;\n }", "title": "" }, { "docid": "ea4161adcdcf2a840f52e1771e6ed3ad", "score": "0.53890496", "text": "public function getListOfServices()\n {\n $mysql = new MysqlConnector();\n $mysqlObject = $mysql->getMySQLObject();\n $query = \"SELECT * FROM phpDev_service\";\n $statement = $mysqlObject->prepare($query);\n $result = $mysql->select($statement);\n $mysql->closeConnection();\n return $result;\n }", "title": "" }, { "docid": "5ac23bdb87a3ff1ac9679520258cd179", "score": "0.53853804", "text": "public function index()\n {\n $shops = Shop::get();\n return response(['data'=>$shops],Response::HTTP_OK);\n }", "title": "" }, { "docid": "9c1c814772170093b9e0f5db1d66817a", "score": "0.5384487", "text": "public function index()\n {\n if( auth()->user()->is_admin ) {\n return Service::orderBy('created_at', 'desc')\n ->paginate(10);\n }\n return Service::where('is_active', 1)\n ->orderBy('created_at', 'desc')\n ->paginate(10);\n }", "title": "" }, { "docid": "cd35f09d3e63e1925925690adf62a402", "score": "0.5375377", "text": "public function get_all ();", "title": "" }, { "docid": "2f6dc815c051ed6f980971889866d168", "score": "0.5370228", "text": "public function getActiveShops()\n {\n $data = self::where('status', 1)\n\t\t\t\t->orderBy('name', 'desc')\n\t\t\t\t->get();\n\t\t\t\t\n\t\treturn $data;\n }", "title": "" }, { "docid": "ce77a4553bfdf37129c677c5989cad68", "score": "0.5368901", "text": "public function indexAction() {\n\t\t/**@var $response \\Phalcon\\Http\\Client\\Response*/\n\t\t$response = $this->httpClient->get('shops');\n\n\t\tif($this->responseValidator->isSuccessfulResponse($response)){\n\t\t\t$shops = $this->transformer->jsonToObject($response->body, new Shop());\n\t\t}else{\n\t\t\t$this->flashSession->error(\"Error fetching shops data\");\n\t\t\t$shops = [];\n\t\t}\n\n\t\t$this->view->setVar('shops', $shops);\n\t}", "title": "" }, { "docid": "e7de0a7b908fd7229067aa65f65c4882", "score": "0.5359966", "text": "public function index()\n {\n return SellResource::collection(Sell::orderBy('id','DESC')->get());\n }", "title": "" }, { "docid": "700569d18562e7ef472fbee94ab04872", "score": "0.5359713", "text": "public function getserviceAction(){ \n\t $services = $this->ModelObj->getServiceList();\n\t echo $services;die;\n\t}", "title": "" }, { "docid": "ccfe87660b7a406646771e419036e4e2", "score": "0.53527766", "text": "function getServiceList() \n\t{\n\t\t\n\t}", "title": "" }, { "docid": "5cfc8bd5f4fbaf296a21b7263cceafef", "score": "0.53517604", "text": "public function getAllServices()\n\t{\n\t\treturn $this->select('id', 'name')->get();\n\t}", "title": "" }, { "docid": "d6481a6dcf6f147179358732d2c1d287", "score": "0.53497124", "text": "public function getUsersAction(){\n\n \t$userRepository = $this->getDoctrine()->getRepository(\"InternationsUsersBundle:User\");\n\n $users = $userRepository->createQueryBuilder(\"u\")\n \t->where(\"u.status = 1\")\n \t->getQuery();\n\n return array('user' => $users->getResult());\n }", "title": "" }, { "docid": "83799b9d4574008d273b370ddfa9a81a", "score": "0.5338468", "text": "public function getAllClientes(){\n $beans = R::findAll('cliente');\n R::close();\n return $beans;\n }", "title": "" }, { "docid": "df62d1a69c425d35d620706f71358292", "score": "0.5337877", "text": "public function index()\n {\n $shopTypeId = ShopInformation::where('shopInfoId',Auth::user()->shopId)->first()->shopTypeId;\n $salesProductLists = SalesProductEntry::with('productName','brandName','unitName')->where('shopTypeId',$shopTypeId)->where('shopId',Auth::user()->shopId)->get();\n $discountPriceLists = SalesProductDiscountPriceEntry::where('shopTypeId',$shopTypeId)->where('shopId',Auth::user()->shopId)->get();\n return ['salesProductLists' => $salesProductLists,'discountPriceLists' => $discountPriceLists];\n }", "title": "" }, { "docid": "7445baa6d401ccbfdc80e4a373c1623d", "score": "0.5337472", "text": "function getUsersInAccount(){\n\n $data = array('apiKey' => $this->api_key);\n $result = $this->client->getUsersInAccount($data);\n\n return $result;\n\n }", "title": "" }, { "docid": "6d572ada7dab3f8fae4b9528abf13388", "score": "0.53370893", "text": "function get_all_sites()\n {\n return $this->aqprodDB->get('ins112_aq2e_site')->result_array();\n }", "title": "" }, { "docid": "4a53009bcce950df5c1da950451ecec9", "score": "0.53309727", "text": "function sso_get_all_data_by_oauth_id ( $param ) {\n\t\t\n\t\tglobal $sso, $sso_client_title, $sso_client;\n \n $res = $sso -> GetAllDataByOauth( $param );\n\t\t\n if ( $res -> success ){\n\t\t\treturn $res;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "9f2cf90c0a19f844271615a676e79841", "score": "0.53285384", "text": "public function listaServicios(){\n $query = \"SELECT * \n FROM servicio\n WHERE estado_servicio=1\";\n return $this->mysql->query($query);\n }", "title": "" }, { "docid": "78eca476bf31c879face26701229bc49", "score": "0.5319546", "text": "public function listAction()\n {\n /* @orderProvider PandaGroup_Customer_Model_Provider_Order */\n $orderProvider = Mage::getModel('pandagroup_customer/provider_order');\n\n /* @$sessionProvider PandaGroup_Customer_Model_Provider_Session */\n $sessionProvider = Mage::getModel('pandagroup_customer/provider_session');\n\n $orders = [];\n $orderId = (int) $this->getRequest()->getParam('orderId');\n\n if($sessionProvider->customerIsLogged()){\n $customerId = $sessionProvider->getCusotmerId();\n $orders = $orderProvider->loadByCustomerId($customerId);\n if($orderId > 0){\n $orders = $orders->orderId($orderId);\n }\n }\n $this->loadLayout();\n $this->getLayout()->getBlock('main')->assign('orders', $orders->getResult());\n $this->renderLayout();\n }", "title": "" }, { "docid": "30915c6841dadcb515fcde69755128ae", "score": "0.53173876", "text": "function all()\n\t{\n\t $this->rest->initialize(array('server' => REST_SERVER));\n\t $this->rest->option(CURLOPT_PORT, REST_PORT);\n\t return $this->rest->get('/supplies');\n\t}", "title": "" }, { "docid": "ec61de2d0b651dea82208984be2002b8", "score": "0.5313097", "text": "public function index()\n {\n // return as a collection\n return $this->service->fetchResources(User::class, 'users');\n }", "title": "" }, { "docid": "4412ace77144880cc42fd177c7719694", "score": "0.5309596", "text": "public function gets() {\n\n $debug = false;\n\n $results = [];\n $results['code'] = 200;\n $results['message'] = 'OK';\n $results['errors'] = '';\n $results['results'] = [];\n \n $organization_id = $this->_user->organization->id;\n\n /*\n * se filtro per produttore verifico chi gestisce il listino\n * se il produttore visualizzo le categorie del produttore\n */\n $search_order_id = $this->request->getData('search_order_id');\n if(!empty($search_order_id)) {\n $where = [];\n $where = ['Orders.id' => $search_order_id,\n 'Orders.organization_id' => $this->_user->organization->id\n ];\n $ordersTable = TableRegistry::get('Orders');\n \n $order = $ordersTable->find()\n ->where($where)\n ->first();\n // se e' socialmarket puo' essere null\n if(!empty($order) && $order->owner_organization_id!=$this->_user->organization->id)\n $organization_id = $order->owner_organization_id;\n }\n \n $search_supplier_organization_id = $this->request->getData('search_supplier_organization_id');\n if(!empty($search_supplier_organization_id)) {\n $where = [];\n $where = ['SuppliersOrganizations.id' => $search_supplier_organization_id,\n 'SuppliersOrganizations.organization_id' => $this->_user->organization->id\n ];\n $suppliersOrganizationsTable = TableRegistry::get('SuppliersOrganizations');\n \n $suppliers_organization = $suppliersOrganizationsTable->find()\n ->where($where)\n ->first();\n\n if($suppliers_organization->owner_organization_id!=$this->_user->organization->id)\n $organization_id = $suppliers_organization->owner_organization_id;\n } // end if(!empty($search_supplier_organization_id))\n\n /* \n * estraggo i CategoriesArticles\n */\n $categoriesArticlesTable = TableRegistry::get('CategoriesArticles'); \n $categoriesArticles = $categoriesArticlesTable->find('treeList', \n ['spacer' => ' ', \n 'conditions' => ['organization_id' => $organization_id],\n 'order' => ['CategoriesArticles.name' => 'asc']]);\n\n $results['results'] = $categoriesArticles;\n\n /*\n * il json viene ordinato per id\n * debug($categoriesSuppliersResults->toArray());\n */\n return $this->_response($results);\n }", "title": "" }, { "docid": "346574b6db988f7a4cf05130407ea312", "score": "0.53034", "text": "public function getUsers();", "title": "" }, { "docid": "456aa4c9824e38ec0da23afc8fd513e2", "score": "0.52997214", "text": "public function account_index()\n {\n $user = Auth::user();\n //$tickets = Auth::user()->has('tickets');\n $tickets = $user->tickets()->\n with(['ticket_type' => function ($q) {\n $q->withTrashed()->with(['festival' => function ($q) {\n $q->withTrashed();\n }]);\n }])->paginate(9);\n //$tickets = Auth::user()->with(['tickets'])->withTrashed()->paginate(9);\n return TicketResource::collection($tickets);\n }", "title": "" }, { "docid": "8206094c3a29febadf9c28c97587e7bd", "score": "0.52986765", "text": "function get_clients($token)\n {\n $uri = \"https://\" . get_hostname($token) . \"/sf/v3/Accounts/GetClients\";\n echo \"GET \" . $uri . \"\\n\";\n\n $headers = get_authorization_header($token);\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $uri);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_VERBOSE, FALSE);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\n $curl_response = curl_exec($ch);\n\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $curl_error_number = curl_errno($ch);\n $curl_error = curl_error($ch);\n\n //echo $curl_response.\"\\n\"; // output entire response\n echo \"http code: \" . $http_code . \"\\n\"; // output http status code\n\n curl_close($ch);\n\n $clients = json_decode($curl_response);\n //print_r($response); // print entire json response\n if ($clients->value != NULL) {\n foreach ($clients->value as $client) {\n echo \"Client ID: \" . $client->Id . \" Client Email: \" . $client->Email . \"\\n\";\n }\n }\n }", "title": "" }, { "docid": "52bd3d2bafeb160d1ab2684120764058", "score": "0.5298603", "text": "public function fetch_all(){\n $sql = $this->db->prepare(\"SELECT * FROM caja ORDER BY id DESC\");\n $sql->execute();\n $cajas_db = $sql->fetchAll(PDO::FETCH_ASSOC);\n\n $cashes = array();\n\n foreach ($cajas_db as $cash) {\n array_push($cashes, new Cash($cash[\"id\"], $cash[\"efectivo_inicial\"], $cash[\"cantidad\"],$cash[\"efectivo_final\"], $cash[\"tipo\"],$cash[\"descripcion\"],$cash[\"pago_id\"],$cash[\"fecha\"]));\n }\n return $cashes;\n }", "title": "" }, { "docid": "d6092d91fa3b8f670dacf93fd13fd934", "score": "0.5298456", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('TecnokeyShopBundle:Shop\\Order')->findAll();\n\n return array('entities' => $entities);\n }", "title": "" }, { "docid": "9f28aded2a712d1f8a2db17964bbefd7", "score": "0.5295681", "text": "public function index()\n {\n return SubServicesApi::collection($this->sub->whereNull('deleted_at')->get());\n\n }", "title": "" }, { "docid": "efc46ae9b696a27d5415c965bf3d4672", "score": "0.5295359", "text": "public function index()\n {\n $eshop=Eshop::leftJoin('users','eshop_list.fk_user_id','users.id')->leftJoin('users as approve','eshop_list.approved_by','approve.id')->select('users.name','users.email','users.mobile','approve.name as approver_name','eshop_list.*')->orderBy('eshop_list.id','DESC')->paginate(20);\n \n return view('backend.eshop.index',compact('eshop'));\n }", "title": "" }, { "docid": "0fbbcf2848420f08aa698e9ee44a01bd", "score": "0.5295122", "text": "public function getShops()\n {\n $shops = array();\n $sql = 'SELECT id_shop, name FROM ' . _DB_PREFIX_ . 'shop WHERE active = 1';\n try {\n $collection = Db::getInstance()->ExecuteS($sql);\n } catch (PrestaShopDatabaseException $e) {\n $collection = array();\n }\n foreach ($collection as $row) {\n $shops[] = array('id' => $row['id_shop'], 'text' => $row['name']);\n }\n return $shops;\n }", "title": "" } ]
aa86b6f06e772e838ab6c2bb1cf3d8a4
Output the data with new line.
[ { "docid": "4c34d9d09a6334bd533001b82f3ecb43", "score": "0.0", "text": "function n($data, $return = false)\n{\n if (version_compare(phpversion(), '5.3.0') >= 0) {\n $data = nl2br($data, false);\n } else {\n $data = nl2br($data);\n }\n\n if ($return) {\n return $data;\n } else {\n echo $data;\n }\n}", "title": "" } ]
[ { "docid": "b4d47e5479e57406e0eb64f36a32d97b", "score": "0.7357053", "text": "protected function _writeNewLine()\n {\n $this->write(\"\\n\");\n }", "title": "" }, { "docid": "b356776ebdb9a9690d5ea0783c3a10c1", "score": "0.7215334", "text": "function linebreak() {\n $this->cdata(DOKU_LF);\n }", "title": "" }, { "docid": "71a2d4bf2ceea2e7c5f8fd3deb6bdffd", "score": "0.70960397", "text": "function nl() {\r\n\t\t$this->data .= $this->tag(\"br\");\r\n\t}", "title": "" }, { "docid": "a0186f0a26379a9fdd40d7f217be929e", "score": "0.6792342", "text": "static function newLine() : void\n {\n echo \"\\r\\n\";\n }", "title": "" }, { "docid": "5897f190111a774e5f8597489f200a42", "score": "0.66336006", "text": "public function print_line($data) {\n $pad = STR_PAD_RIGHT;\n foreach ($this->widest as $key => $len) {\n echo $this->mb_str_pad($data[$key], $len + 1, ' ', $pad) . ' ';\n $pad = STR_PAD_LEFT;\n\n }\n echo PHP_EOL;\n }", "title": "" }, { "docid": "32befc17b77117c68cd3701ca49be174", "score": "0.6588859", "text": "function addEmptyLine() {\n $this->content .= \"\\n\";\n }", "title": "" }, { "docid": "89b4fddef9020100f43f7bebc0ff657d", "score": "0.65846694", "text": "public function write($data)\n {\n $this->output .= $data;\n }", "title": "" }, { "docid": "6334d52dcf650d225a6e122b81987b0e", "score": "0.6488215", "text": "public static function write($data)\n {\n echo $data;\n }", "title": "" }, { "docid": "b212236f4b25db85ad40e79d93c50969", "score": "0.6349043", "text": "public function newLine($count = 1)\n {\n $this->getOutput()->write(str_repeat(\"\\n\", $count));\n }", "title": "" }, { "docid": "185e8dfbbe6a1efde638daa2f077e7de", "score": "0.63154656", "text": "function loggerNewLine() {\n\t\techo \"\\n\";\n\t}", "title": "" }, { "docid": "f5882567ef895ed9f6a86cf40d2ec738", "score": "0.63018006", "text": "public function newline($text = '')\n {\n $this->output->newline();\n if (! $text == '') {\n $this->line($text);\n }\n }", "title": "" }, { "docid": "60fe5f32cfa4adad43f489d8b92b8199", "score": "0.623299", "text": "public function newline()\n {\n $this->append('');\n return $this;\n }", "title": "" }, { "docid": "1eb5ad8c75cd60d3a119dd14783393a0", "score": "0.61918306", "text": "protected function afterLineProcess() {\r\n\t$this->output(\"<pre>\");\r\n $this->output(\"\\n\");\r\n\t$this->output(\"changeCount: \" . $this->changeCount . \"\\n\");\r\n\t$this->output(\"noChangeCount: \" . $this->noChangeCount . \"\\n\");\r\n $this->output(\"specialPriceCount: \" . $this->specialPriceCount . \"\\n\");\r\n\t$this->output(\"disabledCount: \" . $this->disabledCount . \"\\n\");\r\n\t$this->output(\"skuNotFound: \" . $this->skuNotFound . \"\\n\");\r\n\t$this->output(\"</pre>\");\r\n}", "title": "" }, { "docid": "9622722a8f9e918ed39dca6935d09511", "score": "0.61828995", "text": "public function newLine() {\n return 'hi';\n }", "title": "" }, { "docid": "370c7b1a520bac41fb0f44913ac04052", "score": "0.6147429", "text": "public function newline()\n {\n $this->append('');\n\n return $this;\n }", "title": "" }, { "docid": "176855d24d85518701e9a8af9c030481", "score": "0.6085787", "text": "function sp() {\r\n\t\t$this->data .= ' ';\r\n\t}", "title": "" }, { "docid": "5fe4fe6f4334132cc73ffd987094b687", "score": "0.6039789", "text": "public function write($data)\n\t{\n\t\t$lines = '';\n\t\tforeach($data as $d) {\n\t\t\t$d = trim($d);\n\t\t\t$lines .= (is_array($d)) ? implode('|', $data).\"\\n\" : $d.\"\\n\";\n\t\t}\n\t\tfile_put_contents($this->getPath(), $lines);\n\t}", "title": "" }, { "docid": "84eac6a3b44e388e7f4f68ee4e249e0c", "score": "0.60001266", "text": "function displayOutput($text, $newline = true)\r\n\t\t{\r\n\t\t\t$this->out($text, $newline);\r\n\t\t\t\r\n\t\t\tif ($this->keepBuffer)\r\n\t\t\t{\r\n\t\t\t\t$this->buffer .= ($newline) ? \"{$text}\\n\" : $text;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "6fae6054599aff495cfd49481ae2fdce", "score": "0.5940153", "text": "abstract public function carriageReturn();", "title": "" }, { "docid": "2821d459c22a108b7adf7100cad0c941", "score": "0.5886248", "text": "public function writeChunk($data = '') {\n $this->write(dechex(strlen($data)).$this->_lineBreak);\n $this->write($data.$this->_lineBreak);\n }", "title": "" }, { "docid": "9fbb73b3de1d469e812ca63138e467b4", "score": "0.5878584", "text": "public function newLine($number = 1)\n {\n for ($i = 0; $i < $number; $i++) {\n $this->write('');\n }\n }", "title": "" }, { "docid": "5654bf6fd51bd9ded3cbed9f9b7d44ae", "score": "0.58600783", "text": "protected function _out()\n\t{\n\t\t$data = $this->_getNextInstruction();\n\t\techo chr($data);\n\t}", "title": "" }, { "docid": "d51ffd4c038dd6f9f17a91e39e09955a", "score": "0.5827248", "text": "public function writeln($message, bool $newLine = true);", "title": "" }, { "docid": "85bfe6916475bf153b6bb22aacd66593", "score": "0.58258086", "text": "public function export()\n {\n $this->sendHeader();\n\n foreach ($this->_values as $value) {\n $line = $this->_formatLine($value, $this->_deliminator);\n echo $line.\"\\n\";\n }\n\n }", "title": "" }, { "docid": "d389dcd5f918bbfa011e11ddf77f243a", "score": "0.5814647", "text": "public function line($text = '')\n {\n $this->output->writeln($text);\n }", "title": "" }, { "docid": "4ef3e0178ed94bcc88c399b752cba124", "score": "0.5811837", "text": "function writeLine($data)\n {\n if (!is_resource($this->fp)) {\n return $this->raiseError('not connected');\n }\n\n return fwrite($this->fp, $data . \"\\r\\n\");\n }", "title": "" }, { "docid": "4ef3e0178ed94bcc88c399b752cba124", "score": "0.5811837", "text": "function writeLine($data)\n {\n if (!is_resource($this->fp)) {\n return $this->raiseError('not connected');\n }\n\n return fwrite($this->fp, $data . \"\\r\\n\");\n }", "title": "" }, { "docid": "f4bfb044df83a6ebe25057d77703b064", "score": "0.5792202", "text": "public function newLine()\n {\n $this->pattern[] = \"\\n\";\n return $this;\n }", "title": "" }, { "docid": "cc36093ac43bba51bf8a9ec8eba9521b", "score": "0.5773762", "text": "protected function outputLine($text)\n {\n if ($this->output) {\n $this->output->writeln($text);\n }\n }", "title": "" }, { "docid": "0206fb1ccb911e5774a692189ae633a2", "score": "0.57446986", "text": "public function php()\n {\n echo \"<pre>\";\n if (is_array($this->data) || is_object($this->data)) {\n print_r($this->data, true);\n } else {\n print($this->data);\n }\n echo \"</pre>\";\n }", "title": "" }, { "docid": "86d7ba20c0ee569f3a783bbad630e079", "score": "0.5735012", "text": "public function writeLine($output) {\n\t $this->write($output . \"\\n\");\n\t}", "title": "" }, { "docid": "2d7db0da4787f3d478ded3b5c65fe690", "score": "0.5721831", "text": "function flushOutput(){\n\t\tflush(); echo str_repeat(\"\\n\",256); flush();\n\t}", "title": "" }, { "docid": "d308ac863c248804c0e5a5cd7c4ab840", "score": "0.57009673", "text": "function output($data)\n\t\t{\n\t\t\techo \"[\".date(\"h:i:s\").\"]\";\n\t\t}", "title": "" }, { "docid": "fd3b40ce04b91bb65c8c98108fef22ea", "score": "0.5662879", "text": "public function render($newLine = true)\n\t{\n\t\t// Make sure there is something there\n\t\tif (isset($this->response) && count($this->response) > 0)\n\t\t{\n\t\t\techo json_encode($this->response);\n\n\t\t\t// Reset response\n\t\t\t$this->response = array();\n\t\t}\n\t}", "title": "" }, { "docid": "93682717db54182bce27441c0bbe0280", "score": "0.56533813", "text": "protected function writeln($str){\n\t\t$this->write($str.\"\\r\\n\");\n\t}", "title": "" }, { "docid": "2b167045936bbf0adcf6258dd2d8a5c6", "score": "0.56485224", "text": "private function sendOutput()\n {\n echo $this->content;\n }", "title": "" }, { "docid": "6c97e3c381d8e5d6be1544e800bc3a7c", "score": "0.56472725", "text": "public function output() {\n\n\t\t}", "title": "" }, { "docid": "5cc0b86e2ca291578f8cf2bffb2fbf16", "score": "0.56455374", "text": "public function send($data) {\n\t\tob_get_clean();\n\t\techo $this->_mProcessName.\"|\".preg_replace(\"/[\\n]/\", \"\", $data).PHP_EOL;\n\t\tob_start();\n\t}", "title": "" }, { "docid": "81939de4b7490a9cca57279b950198b4", "score": "0.56251264", "text": "public function flush() {\n $this->output();\n parent::flush();\n }", "title": "" }, { "docid": "dfb95988874983b2d41ffb5a0741e9aa", "score": "0.56216514", "text": "public function writeln(string $buffer): void\n {\n $this->output->writeln($buffer);\n }", "title": "" }, { "docid": "1828066a5327a2aa06b45ba97e488d8d", "score": "0.56084114", "text": "function out($string = '', $newline = true)\n\t{\n return parent::out(' ' . $string, $newline);\n\t}", "title": "" }, { "docid": "71ab8f2cb4aba5ad581948de5e09c2fb", "score": "0.5605334", "text": "public function output() {\n\t\tprint_r(json_encode($this->output_array));\n\t}", "title": "" }, { "docid": "608133716d5e4c2043fc6834ed9cd820", "score": "0.5588709", "text": "function printDataLine($d, $p)\r\n\t{\r\n\t\t$txtstr = \"\";\r\n\t\r\n\t\t$values = $d->getValues();\r\n\t\t// don't think we need this, Sunbird does not like it in the EXDATE field\r\n\t\t//$values = str_replace(\",\", \"\\\\,\", $values);\r\n\r\n\t\t$line = $d->getName() . $p . \":\" . $values;\r\n\t\t$line = str_replace(array(\"<br>\",\"<BR>\",\"<br/>\",\"<BR/\"),\"\\\\n\",$line);\r\n\t\t$line = str_replace(array(\"\\r\\n\",\"\\n\\r\",\"\\n\",\"\\r\"),'\\n',$line);\r\n\t\t//$line = str_replace(array(',',';','\\\\'), array('\\\\,','\\\\;','\\\\\\\\'),$line);\r\n\t\t//$line =strip_tags($line);\r\n\t\t$linecount = 0;\r\n\t\twhile (strlen($line) > 0) {\r\n\t\t\t$linewidth = ($linecount == 0? 75 : 74);\r\n\t\t\t$linesize = (strlen($line) > $linewidth? $linewidth: strlen($line));\r\n\t\t\tif($linecount > 0)\r\n\t\t\t\t$txtstr .= \" \";\r\n\t\t\t$txtstr .= substr($line,0,$linesize) . \"\\r\\n\";\r\n\t\t\t$linecount += 1;\r\n\t\t\t$line = substr($line,$linewidth);\r\n\t\t}\r\n\t\treturn $txtstr;\r\n\t}", "title": "" }, { "docid": "e06fef06f06b988d8c0bc6fae03bfb87", "score": "0.55847937", "text": "public function writeText() {\n\t}", "title": "" }, { "docid": "85594a4c0f63177d36bcffc1a08aa335", "score": "0.5546325", "text": "protected function outLn($string)\n {\n\n echo $string . \"\\n\";\n }", "title": "" }, { "docid": "fc5efd3dc1a8ecbf22194f526a456906", "score": "0.55415297", "text": "function newline() {\r\n\techo \"\\n\";\r\n}", "title": "" }, { "docid": "c16f307bfde18790652e674c096adf97", "score": "0.55227095", "text": "public function writeChunkEnd() {\n $this->write('0'.$this->_lineBreak.$this->_lineBreak);\n }", "title": "" }, { "docid": "0e8f6c2449d5c9b8a5fc5aba8b2b3b45", "score": "0.5516177", "text": "public function getNewline(): string\n {\n return $this->newline;\n }", "title": "" }, { "docid": "aad653eb2560394d97e30e2ea17d27a7", "score": "0.55029005", "text": "protected function print_data() {\n\n $row = 1;\n\n if (empty($this->data[0])) {\n return;\n }\n\n if (empty($this->datadesc[0]['columns'])) {\n return;\n }\n\n foreach (array_values($this->data[0]) as $datarow) {\n $i = 0;\n $dataarr = (array)$datarow;\n foreach ($this->datadesc[0]['columns'] as $col) {\n $isnumber = false;\n if ($col['width'] == 0) {\n continue;\n }\n if ($col['format'] == 'float') {\n $isnumber = true;\n $col['format'] = 'smalltext';\n }\n if ($col['format'] == 'date') {\n $isnumber = false;\n if ($dataarr[$col['name']]) {\n $dataarr[$col['name']] = date('Y/m/d h:m', $dataarr[$col['name']]);\n }\n }\n if ($col['format'] == 'time') {\n if ($dataarr[$col['name']]) {\n $dataarr[$col['name']] = userdate($dataarr[$col['name']]);\n } else {\n $dataarr[$col['name']] = '---';\n }\n }\n if ($isnumber) {\n $this->worksheets[0]->write_number($row, $i, $dataarr[$col['name']], $this->xlsformats[$col['format']]);\n } else {\n $this->worksheets[0]->write_string($row, $i, $dataarr[$col['name']], $this->xlsformats[$col['format']]);\n }\n $i++;\n }\n $row++;\n }\n }", "title": "" }, { "docid": "cc772baa9f7143296d6ad526814e8063", "score": "0.54997945", "text": "public function output()\n\t{\n\t\theader('Content-type: '.$this->getMimeType());\n\t\techo $this->getBytes();\n\t\texit;\n\t}", "title": "" }, { "docid": "3f276c6be64a503ae5813bcf646044dc", "score": "0.5498602", "text": "public function writeLine($text= '') {\n $this->stream->write(($text instanceof String || $text instanceof Character\n ? $text->getBytes($this->charset)\n : iconv(xp::ENCODING, $this->charset, $text)\n ).$this->newLine);\n }", "title": "" }, { "docid": "194a4d3584e8df2f63e815fd316ba771", "score": "0.5497364", "text": "public function printOut()\r\n {\r\n echo $this->result;\r\n }", "title": "" }, { "docid": "5c3c6dfca11634703251f7c779b6de2f", "score": "0.54868174", "text": "public static function NEW_LINE($numberOfTimes = 1) {\n\t\t$r = '';\n\t\tfor($x = 1; $x<=$numberOfTimes; $x++) {\n\t\t\tif(qsys::getServerType() == qsys::SERVERTYPE_LINUX) {\n\t\t\t\t$r .= \"\\n\";\n\t\t\t} else {\n\t\t\t\t$r .= \"\\r\\n\";\n\t\t\t}\n\t\t}\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "7c90050165457d3912ed1b0940d6cf70", "score": "0.5474858", "text": "public static function writeLn($text) {\r\n\t\t$stdout = fopen(\"php://stdout\", 'w');\r\n\t\tfwrite($stdout, self::getString($text));\r\n\t\tfclose($stdout);\r\n\t}", "title": "" }, { "docid": "28a8d5bd3f2a041a1f0df789b5f869db", "score": "0.5473059", "text": "public function getNewLine() {\n return $this->newLine;\n }", "title": "" }, { "docid": "a98ded7e0baf52535f2ba8f4d337b0d8", "score": "0.5446055", "text": "public function newLine($count = 1) {\n\n // send out any escaping to implement anything sitting in the desired state\n $this->outputEscapeSequence();\n\n // if the $count is greater than one\n if (is_int($count) && $count > 1) {\n\n // send out the \\n $count times\n for ($i=0; $i<$count; ++$i) {\n\n // echo the newline character\n $this->output(\"\\n\");\n }\n\n } else {\n // the parameter might be one or something crazy, just output one\n // echo the new line character\n $this->output(\"\\n\");\n }\n\n // fire the handler that indicates the cursor is sent to the left margin\n $this->carriageReturn();\n\n // chaining\n return $this;\n }", "title": "" }, { "docid": "1f77204d28a8268ccc1cc60679e857bb", "score": "0.5444915", "text": "public function output() {\r\n }", "title": "" }, { "docid": "6ae230c1ba4137db61c0d6dcf7fe75e2", "score": "0.543587", "text": "function out($string = '', $newline = true) {\n\techo $string.($newline ? PHP_EOL : '');\n}", "title": "" }, { "docid": "353eb6a191ab7e5cec533ddbc47063de", "score": "0.5430875", "text": "public static function printr($data){\n \techo '<pre>';\n print_r($data);\n echo '</pre>';\n\t}", "title": "" }, { "docid": "193a17e9b7598d22d0c81bec5a3f86ce", "score": "0.5413345", "text": "function hr() {\n $this->cdata(DOKU_LF.'----------'.DOKU_LF);\n }", "title": "" }, { "docid": "efc051b18a4c1f7ea8a9cae0e9d38056", "score": "0.5404344", "text": "public function send_linebreak($type = null){\n $this->send(sprintf(\n \"%s--------------------------------------------%s\",\n PHP_EOL, PHP_EOL\n ), $type);\n }", "title": "" }, { "docid": "fa14c53cee3be3131bb0df7c728ef549", "score": "0.540004", "text": "public static function fixNewLines( $data ) {\n\t\t$data = str_replace( \"\\r\\n\", \"\\n\", $data );\n\t\t$data = str_replace( \"\\r\", \"\\n\", $data );\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "cb471a87952e5531bcd6078078f0fbbc", "score": "0.53984195", "text": "static function outp($msg,$newline=true) {\n\t\tglobal $ADODB_FLUSH,$ADODB_OUTP;\n\n\t\tif (defined('ADODB_OUTP')) {\n\t\t\t$fn = ADODB_OUTP;\n\t\t\t$fn($msg,$newline);\n\t\t\treturn;\n\t\t} else if (isset($ADODB_OUTP)) {\n\t\t\t$fn = $ADODB_OUTP;\n\t\t\t$fn($msg,$newline);\n\t\t\treturn;\n\t\t}\n\n\t\tif ($newline) {\n\t\t\t$msg .= \"<br>\\n\";\n\t\t}\n\n\t\tif (isset($_SERVER['HTTP_USER_AGENT']) || !$newline) {\n\t\t\techo $msg;\n\t\t} else {\n\t\t\techo strip_tags($msg);\n\t\t}\n\n\n\t\tif (!empty($ADODB_FLUSH) && ob_get_length() !== false) {\n\t\t\tflush(); // do not flush if output buffering enabled - useless - thx to Jesse Mullan\n\t\t}\n\n\t}", "title": "" }, { "docid": "02ca6699ce3e3cbd3430e578b1fb1d33", "score": "0.5396637", "text": "function echoLine($line){\r\n echo $line.\"\\n\";\r\n }", "title": "" }, { "docid": "90f8fe2334e5d978319c38973ac2463e", "score": "0.539294", "text": "public function printData() {\r\n print(\"\\n\");\r\n $this->printStudentData();\r\n print(\"\\n\");\r\n $this->printInternalMatrix();\r\n print(\"\\n\");\r\n $this->printTechMatrix();\r\n print(\"\\n\");\r\n }", "title": "" }, { "docid": "448da771e786f70c6db6c41913c33720", "score": "0.53819793", "text": "function display(){\n $this->clean_up();\n echo $this->output;\n flush();\n //ob_end_flush();\n }", "title": "" }, { "docid": "5db7415364638caa82ea6da090dd9232", "score": "0.53744036", "text": "public function getNewLine()\n {\n return $this->new_line;\n }", "title": "" }, { "docid": "8541db97adeddf58366d7212644660c2", "score": "0.53648156", "text": "public function nl() {\n return ncurses_nl();\n }", "title": "" }, { "docid": "a3964a0c90d958266d9e7a64cf18eed1", "score": "0.5362667", "text": "function listo_open() {\n $this->cdata(DOKU_LF);\n }", "title": "" }, { "docid": "d2bec770edf205bdaf334d75a28e5538", "score": "0.53511816", "text": "static function format_view_data_with_line_breaks($data_to_be_splitted){\r\n\t\r\n\t\t$splitted_data = \"\";\r\n\t\tfor($n=0; $n<strlen($data_to_be_splitted); $n++){\r\n\t\t\tif (($n == 15) || ($n == 25) || ($n == 35) || ($n == 45) || ($n == 55)){\r\n\t\t\t\t$splitted_data .= \"<br />\";\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t$splitted_data .= $data_to_be_splitted[$n];\t\r\n\t\t}\r\n\t\treturn $splitted_data;\t\t\r\n\t}", "title": "" }, { "docid": "3aedf366bee0c9e473a8a855e36f2d8e", "score": "0.53488094", "text": "public function genRow($data = [])\n {\n return implode(',', $data) . PHP_EOL;\n }", "title": "" }, { "docid": "538d46fcf14adbc772bf5772cb64d8ec", "score": "0.5339249", "text": "public static function printer($data){\n echo '<pre>';\n if($data) print_r($data);\n else var_dump ($data);\n echo '</pre>';\n }", "title": "" }, { "docid": "05f5f2205d0daae1a4788d68d4f43de4", "score": "0.5333964", "text": "public function write($data)\n\t{\n\t\t$this->buffer .= $data;\n\t}", "title": "" }, { "docid": "b02afd42704b21514b0071a27afd44d3", "score": "0.5329289", "text": "private function write_lines($array)\n\t\t{\n\t\t \t$handle = fopen($this->filename, 'w');\n\t\t\t$list = implode(PHP_EOL, $array);\n\t\t\tfwrite($handle, $list);\n\t\t\tfclose($handle);\n\t\t}", "title": "" }, { "docid": "184e625e3ceeca3ff46189b54e66f07a", "score": "0.5328984", "text": "private function addBlankLine()\n {\n $this->getFileWriter()->appendToFile($this->buildDocblockLine());\n }", "title": "" }, { "docid": "6b0a5156b8e58ea66e7298d6687e8d5b", "score": "0.5327665", "text": "abstract function printdata();", "title": "" }, { "docid": "e385a155f4b840cab46ce73448890cfd", "score": "0.5324481", "text": "public function flush()\n {\n $this->output = '';\n }", "title": "" }, { "docid": "a129c654126be299d72487253f8e73d2", "score": "0.53119737", "text": "public function outputBody()\n {\n echo $this->getBody();\n }", "title": "" }, { "docid": "6307026eb81ad5baf6ac40e681b392f6", "score": "0.53084284", "text": "public function writeln($message = '')\n {\n if (!$this->_enabled) {\n return;\n }\n $this->write($message . \"\\n\");\n $this->_needLf = false;\n }", "title": "" }, { "docid": "174cd9f01c9e1ba2b647384405936b08", "score": "0.530738", "text": "public function write_lines(){\n\t\t$handle = fopen($this->filename, \"w\");\n $item = implode(\"\\n\", $this->items);\n fwrite($handle, $item);\n fclose($handle);\n return $items;\n }", "title": "" }, { "docid": "a44fa6dc900839ef1bb588851ff5f03f", "score": "0.52981764", "text": "function printOutput()\n {\n $this->flush();\n if (\"HTML5DRAFT\" == $_REQUEST['xjxstreaming']) {\n\n $response = \"\";\n $response .= \"Event: xjxendstream\\n\";\n $response .= \"data: done\\n\";\n $response .= \"\\n\";\n print $response;\n\n }\n }", "title": "" }, { "docid": "2434527cb88f345f9a6b7120943ec18c", "score": "0.52965635", "text": "protected function beginRawOutput() {\n\t\t$this->session->close(); // we ain't want session to block it all\n\n\t\t// do not buffer!\n\t\twhile(ob_get_level() > 0) ob_end_flush();\n\t\tob_implicit_flush(true);\n\n\t\techo '<pre>';\n\t}", "title": "" }, { "docid": "219e6e9c44e47acfc78c47dd229027e3", "score": "0.5293069", "text": "public function output()\n {\n echo '声筒输出的声音-----呵呵'.PHP_EOL;\n }", "title": "" }, { "docid": "214aab369ca58278b6cfe6a59dc2d1fd", "score": "0.5291604", "text": "public function _echo($data) {\n return self::_post('/api/v1/echo/', $data);\n\t\t}", "title": "" }, { "docid": "29646dd118c01e8d316d702586f80532", "score": "0.5285653", "text": "function crlf_encode($data) {\n $data .= \"\\n\";\n $data = str_replace(\"\\n\",\"\\r\\n\", str_replace(\"\\r\", \"\", $data));\n $data = str_replace(\"\\n.\\r\\n\", \"\\n. \\r\\n\", $data);\n \n return $data;\n}", "title": "" }, { "docid": "f5616817085406d3f05f5575212591ec", "score": "0.52812195", "text": "final protected function writeln($text, $breakAfter = false, $breakBefore = false) {\n $indent = ($this->indent > 0) ? $this->indent : 0;\n $text = sprintf('%s%s', str_repeat(' ', 4 * $indent), $text);\n if (true === $breakAfter) $text = sprintf(\"%s\\r\\n\", $text);\n if (true == $breakBefore) $text = sprintf(\"\\r\\n%s\", $text);\n $this->output->writeln($text);\n }", "title": "" }, { "docid": "084a2f2a1d21bbac510e43f81a451f82", "score": "0.5279701", "text": "public function writelines(array $newLines)\n {\n $this->content = implode($this->lineBreak, $newLines);\n }", "title": "" }, { "docid": "fc1f08030bd056c4afcbc2c51ba7f456", "score": "0.5267211", "text": "public function output(){\n $data = \"<p>This out in AyudaVistas</p>\";\n #$data = \"<p>\" . $this->model->tstring .\"</p>\";\n #require_once($this->model->template);\n\t\t#folder_data\n }", "title": "" }, { "docid": "341b03c3dfe7df238a5db195a40adf43", "score": "0.5265731", "text": "protected function beforeLineProcess() {\r\n $this->outputCsv(\r\n str_pad('Rec Number', 10)\r\n . ',' . str_pad('Result', 20)\r\n . ',' . str_pad('Product Id', 20)\r\n . ',' . str_pad('SKU', 30)\r\n . ',' . str_pad('Old price', 10)\r\n . ',' . str_pad('New price', 10)\r\n . ',' . str_pad('Old availability', 30)\r\n . ',' . str_pad('New availability', 30)\r\n . ',' . str_pad('Old cost', 10)\r\n . ',' . str_pad('New cost', 10)\r\n . ',' . str_pad('Old qty', 10)\r\n . ',' . str_pad('New qty', 10)\r\n . ',' . str_pad('Old status', 10)\r\n . ',' . str_pad('New status', 10)\r\n . \"\\n\"\r\n ); \r\n}", "title": "" }, { "docid": "2b460040692d2313d92764a2a2b84031", "score": "0.5263352", "text": "public function writeln($messages);", "title": "" }, { "docid": "af19137ea00ebde1767ff724852d5007", "score": "0.52588457", "text": "public function testExistingNewlines(){\n $this->assertEquals(6, $this->object->Add(\"1\\n2,3\"));\n }", "title": "" }, { "docid": "883d7d6321139a29b6ef1782ae84060d", "score": "0.5257422", "text": "function printLine($num = 1) {\n $string = \"\";\n\n if($num < 1) {\n $string .= \"\\n\";\n } else {\n for($i = 0; $i < $num; $i++) {\n $string .= \"\\n\";\n } // for\n } // if\n\n $this->log_output ? Logger::log($string) : print $string;\n }", "title": "" }, { "docid": "dc8ca57abe8bb96ce5ea8b7a35b055c2", "score": "0.5250322", "text": "function Text($data) \n\t{\n\t\t$this->View('plain');\n\t\tforeach($data as $message)\n\t\t\techo $message;\n\t\texit();\n\t}", "title": "" }, { "docid": "cdc5686ed8b2cb04e9ec61366474220d", "score": "0.5250277", "text": "public function insertEmptyLine()\n {\n $this->resetColumn();\n $this->addNextLine(null);\n }", "title": "" }, { "docid": "4a2119b53321fb390de53e7b856a2203", "score": "0.5249512", "text": "function response() {\r\n\r\n global $connection, $log;\r\n\r\n $res = '';\r\n\r\n while ($str = fgets($connection, 256)) {\r\n $res .= $str;\r\n $log .= 'S : '.$str;\r\n\r\n //<space> after three digit code indicates this is last line of data (\"-\" for more lines)\r\n if (strpos($str, ' ') == 3) {\r\n break;\r\n }\r\n }\r\n\r\n return $res;\r\n}", "title": "" }, { "docid": "ca6b348ccc93012ba0d5d61f1ebb558d", "score": "0.52327055", "text": "public function output(/* void */){\n\t\treturn $this -> string;\n\t}", "title": "" }, { "docid": "6db383ae2c01f944c114a39d168804ae", "score": "0.5223945", "text": "public function log($data)\n {\n if (!$this->verbose) return;\n \n $this->output($data);\n }", "title": "" }, { "docid": "a4f8b7d2ab685151ac237cc188182488", "score": "0.52191395", "text": "public function affiche() {\n\t\tprint(\" id=\" . $this->id() );\n\t\tprint(\" type=\" . $this->type() );\n\t\tprint(\" nom=\" . $this->nom() );\n\t\tprint(\" numero=\" . $this->numero() );\n\t\tprint(\" unite=\" . $this->unite() );\n\t\tprint(\"<br>\");\n\t}", "title": "" }, { "docid": "5513625ef4e575beb99b182587b36eae", "score": "0.5219106", "text": "public function lf()\n {\n $this->chars .= '\\\\n';\n return $this;\n }", "title": "" }, { "docid": "27fe3b06085c1ad34252e7e62ea43b69", "score": "0.5211409", "text": "public function output(): void\n {\n $results = $this->get();\n $this->info('Time: '.$results['time']);\n $this->info('Memory: '.$results['memory']);\n $this->info('Peak: '.$results['peak']);\n\n foreach ($this->customs as $custom) {\n $this->info($custom['results']);\n }\n }", "title": "" }, { "docid": "3ef555be14735972dd61d5349adb3f09", "score": "0.5207969", "text": "protected function outputResponse(string $data, array $headers): void\n {\n echo $data;\n }", "title": "" } ]
1f73d74253c73a7d2da28fdcda725e1a
Set the model to add unique identifier to rules when performing validation.
[ { "docid": "b5a40a9aa4be1e4c9e13af658c41856f", "score": "0.0", "text": "public function setInjectUniqueIdentifier($value)\n {\n $this->injectUniqueIdentifier = (boolean) $value;\n }", "title": "" } ]
[ { "docid": "0673fa460794ac78d5ff2d4472c64d3b", "score": "0.6313156", "text": "public function uniqueFor(Model $model)\n {\n $this->model = $model;\n\n return $this;\n }", "title": "" }, { "docid": "fc068556c4508fbc920da2c10a41bc4f", "score": "0.6262025", "text": "function _setValidation(&$model, $rules) {\n\t\t$rule = array_shift($rules);\n\t\t$this->__oldRules[$model->name] = $model->validate;\n\t\t$model->validate = $model->validationSets[$rule];\n }", "title": "" }, { "docid": "ba457a012972d31aafff170a0ba700e2", "score": "0.61904216", "text": "public function updateRulesUniques()\n {\n $rules = $this->getRules();\n\n $this->setRules($this->injectUniqueIdentifierToRules($rules));\n }", "title": "" }, { "docid": "14ce5b15fa57389ced328a5b9bca647b", "score": "0.6097994", "text": "protected function setValidatorRules()\n {\n Validator::addGlobalRule('unique_category_label', function($fields, $value, $params) {\n return Category::findBy(['label' => $value, 'NOT id' => $this->id])->count() === 0;\n });\n }", "title": "" }, { "docid": "b86e77446f9b24f465ee476236cbc98d", "score": "0.60629976", "text": "public function setIdValidationRule()\n {\n $this->rules[self::$ID_KEY] = ['required', 'integer', 'exists:experiment_sessions'];\n }", "title": "" }, { "docid": "4c48b5b730d08da4941898bf149c640e", "score": "0.6030283", "text": "function setValidation(&$model) {\n\t\t$rules = func_get_args();\n\t\tarray_shift($rules);\n\t\t$rulesCount = count($rules);\n\t\tif($rulesCount >= 1) {\n\t\t\t$this->_setValidationSets($model, $rules);\n\t\t}\n }", "title": "" }, { "docid": "685d1d702b08f2b1e9122f76942e7d35", "score": "0.59836096", "text": "public static function bootHashID()\n {\n static::creating(function ($model) {\n $id = self::createHash($model);\n $model->id = $id;\n if (auth()->check()) {\n $model->user_id = auth()->user() ? auth()->user()->id : null;\n } \n });\n }", "title": "" }, { "docid": "2e0ebda85c04e1c3e746cf7f44af0934", "score": "0.59623134", "text": "public function setModelForId(string $key, Model $model): static;", "title": "" }, { "docid": "6fc12e33cd8757b1c8a82bd3e84de2f9", "score": "0.5929066", "text": "public static function bootUuidModel()\n {\n static::creating(function (Model $model) {\n $model->setAttribute($model->uuidAttributeName ?? $model->getKeyName(), uuid());\n });\n }", "title": "" }, { "docid": "00af2190a3efcd9fe8fbfb03ee875e3a", "score": "0.58917725", "text": "public function setValidationRules()\n\t{\n\t\tForm::setValidationRules(static::validationRules((int) $this->id));\n\t}", "title": "" }, { "docid": "304123b1a54aab4471ef748d0ed5536c", "score": "0.5844522", "text": "private function setIdProcesado($model)\r\n\t\t{\r\n\t\t\t$this->_models[] = $model->toArray();\r\n\t\t}", "title": "" }, { "docid": "00776c8dafb486d53338762927c94a51", "score": "0.57854915", "text": "protected function setModel()\n {\n $this->model = User::class;\n }", "title": "" }, { "docid": "bd12a0d5069c49b9e68de14c96bbb5ae", "score": "0.57792646", "text": "public function setModel($model);", "title": "" }, { "docid": "bd12a0d5069c49b9e68de14c96bbb5ae", "score": "0.57792646", "text": "public function setModel($model);", "title": "" }, { "docid": "3e0b255ca82de6fd42699cd6f743e77c", "score": "0.5768239", "text": "public function setModel($model) {\n // to the $carModel property \n if(in_array($model,$this->allowedModels)) \n { \n $this->model = $model; \n } \n }", "title": "" }, { "docid": "fd387957b4c269aa188e32920a06c925", "score": "0.5741236", "text": "public function setModel(Model $model);", "title": "" }, { "docid": "fd387957b4c269aa188e32920a06c925", "score": "0.5741236", "text": "public function setModel(Model $model);", "title": "" }, { "docid": "996ed137e3c3e8474be9849713ba270d", "score": "0.57253635", "text": "public function setModel($model)\n {\n /** @type Model $model */\n $model = parent::setModel($model);\n\n foreach ($model as $rule) {\n $this->addRule($rule['rule'], $rule['target'], explode(',', $rule['params']));\n }\n\n // @todo Consider to return $model instead of $this like we do in setModel method of all other classes\n return $this;\n }", "title": "" }, { "docid": "25ee7b4a343b59f0f14c848a188ee2a8", "score": "0.56881493", "text": "protected function setModel()\n {\n $this->model = Unit::class;\n }", "title": "" }, { "docid": "abdfa948f869daa78964f2f75bf6f58d", "score": "0.56747425", "text": "function set_unique_id() {\n\t\t// valid HTML id attribute\n\t\t$this->unique_id = 'i' . md5 ( uniqid ( rand (), true ) );\n\t}", "title": "" }, { "docid": "e7a23012fb2d92c25b0d66ec8c2d4898", "score": "0.56703955", "text": "public static function boot()\n {\n parent::boot();\n self::creating(function ($model) {\n $model->id = (string) Uuid::generate(4);\n });\n }", "title": "" }, { "docid": "e7a23012fb2d92c25b0d66ec8c2d4898", "score": "0.56703955", "text": "public static function boot()\n {\n parent::boot();\n self::creating(function ($model) {\n $model->id = (string) Uuid::generate(4);\n });\n }", "title": "" }, { "docid": "e7a23012fb2d92c25b0d66ec8c2d4898", "score": "0.56703955", "text": "public static function boot()\n {\n parent::boot();\n self::creating(function ($model) {\n $model->id = (string) Uuid::generate(4);\n });\n }", "title": "" }, { "docid": "4bbc366708a1c0019baa9555a69fe83e", "score": "0.565091", "text": "public static function bootUuidForKey()\n {\n static::creating(function ($model) {\n $model->incrementing = false;\n $model->attributes[$model->getKeyName()] = Uuid::uuid4()->toString();\n });\n }", "title": "" }, { "docid": "41c1d9e024afe9223ae9c72f60fae1ee", "score": "0.56329495", "text": "protected function defineModel() {\n $this->model = null;\n }", "title": "" }, { "docid": "38399223d2fcab9aec442cba5c36e0e8", "score": "0.56286824", "text": "public function setModel($model)\n {\n $this -> model = $model;\n }", "title": "" }, { "docid": "e339e15f34633798b2c50b3f17fea7fe", "score": "0.5625929", "text": "public function setModel();", "title": "" }, { "docid": "7459c1c314dba62d1b47f7715672c0aa", "score": "0.5606358", "text": "function restoreValidation(&$model) { \n $model->validate = $this->__oldRules[$model->name]; \n }", "title": "" }, { "docid": "db4cd7528a8253402ce98dfe24301f8e", "score": "0.5605006", "text": "function restoreDefaultValidation(&$model) { \n $model->validate = $this->__defaultRules[$model->name]; \n }", "title": "" }, { "docid": "aafb80ac3ae9ce8a75abfc17e4b4d2b3", "score": "0.5602068", "text": "public function rules()\n {\n /*$persona = $this->route('persona');\n return [\n 'carnet_identidad'=>'unique:personas,carnet_identidad,'.$this->persona.'|required',\n 'nombre'=>\"required|string|max:60\",\n 'apellidos'=>\"required|string|max:60\",\n 'telefono'=>\"nullable\",\n 'direccion'=>\"nullable|string|max:100\",\n 'email'=>'unique:personas,email,'.$this->persona.'|required'\n ];*/\n\n return [\n 'carnet_identidad'=>\"required|unique:personas,carnet_identidad,\".$this->route('id'),\n 'nombre'=>\"required|string|max:60\",\n 'apellidos'=>\"required|string|max:60\",\n 'telefono'=>\"nullable\",\n 'direccion'=>\"nullable|string|max:100\",\n 'email'=>\"required|unique:personas,email,\".$this->route('id')\n ];\n }", "title": "" }, { "docid": "3674d224acef60a8399f34920381b08e", "score": "0.56000453", "text": "protected function setModel(): void\n {\n $this->model = AppointmentChangeLog::class;\n }", "title": "" }, { "docid": "293a6361037c467bdc313d8283c7368b", "score": "0.5597441", "text": "public function setModel($model)\n {\n\n $this->model = $model;\n \n if ($this->model->access)\n $this->access = $this->model->access;\n \n }", "title": "" }, { "docid": "74b1386f4e5afaa61d74972e2267c6ee", "score": "0.5592456", "text": "public static function setModelValidator($validator)\n {\n static::$validator = $validator;\n }", "title": "" }, { "docid": "fee9829b746e8b4083cb97cb8c8e6728", "score": "0.5589434", "text": "public function setModel($model)\n {\n $this->model = $model;\n }", "title": "" }, { "docid": "12b3408e20330a8c71233b167dc18d37", "score": "0.5574396", "text": "public function _mergeValidation(&$model, $_rule) {\n\t\t$rule = $model->validationSets[$_rule];\n\t\t$model->validate = array_merge($model->validate, $rule);\n\t}", "title": "" }, { "docid": "6dac10b82d73def4217d201f912504b0", "score": "0.55647457", "text": "public function setModel($model){\n $this->model = $model;\n }", "title": "" }, { "docid": "a33e66ca85429d02f5179fa640c1254b", "score": "0.5555834", "text": "public function makeUnique()\n {\n //Note that at the time of the makeUnique call (within initialize), this rule\n //(the caller) does not exist in the rules list\n foreach ($this->parent_feed->rules as $rule) {\n if ($rule->name == $this->name) {\n $rule->enabled = false;\n }\n }\n\n }", "title": "" }, { "docid": "2cae15ece552cc2deb87a1995db90388", "score": "0.5551189", "text": "public static function bootUniqueIDFormat()\n {\n static::created(function ($model) {\n $old = AuditableObserver::$restoring;\n AuditableObserver::$restoring = true;\n $propName = $model->getFormatColumnName();\n $model->{$propName} = $model->getUniqueIDFormat($model->getKey());\n $model->save();\n AuditableObserver::$restoring = $old;\n });\n }", "title": "" }, { "docid": "20653c75852cead7d490c897750eea0f", "score": "0.55436903", "text": "public static function bootUuidModelTrait()\n {\n static::creating(function ($model) {\n // Only generate UUID if it wasn't set by already.\n if (!isset($model->attributes[$model->getKeyName()])) {\n // This is necessary because on \\Illuminate\\Database\\Eloquent\\Model::performInsert\n // will not check for $this->getIncrementing() but directly for $this->incrementing\n $model->incrementing = false;\n $uuidVersion = (!empty($model->uuidVersion) ? $model->uuidVersion : 4); // defaults to 4\n $uuid = Uuid::generate($uuidVersion);\n $model->attributes[$model->getKeyName()] = $uuid->string;\n }\n }, 0);\n }", "title": "" }, { "docid": "d2c719af1fe165bfaf194a280b22b870", "score": "0.553828", "text": "protected function setModel() {\n\t\t$this->model = new Moondee_Opinion_Model_Opinion();\n\t}", "title": "" }, { "docid": "dc60e31c3ccc8c6078a252fa178554f2", "score": "0.5537225", "text": "public function updateRulesUniques();", "title": "" }, { "docid": "4b95f8dae731a37865cb3c52ead561f8", "score": "0.5513079", "text": "public function setUserModel($model)\n {\n $this -> models[$this -> userModelLookupKey] = $model;\n }", "title": "" }, { "docid": "687d2462c85d2e982e1b0806c1f6f961", "score": "0.5508679", "text": "function setModel($new_model)\n {\n $this->make_model = $new_model;\n }", "title": "" }, { "docid": "8a65640a4f5682b324d2df138a0a3d7a", "score": "0.5507816", "text": "private function setOrganizationIdOnModel(&$model,$organizationId){\n\n if(isset($model->data['organization_id']))\n unset($model->data['organization_id']);\n\n $model->data[$model->alias]['organization_id'] = $organizationId;\n }", "title": "" }, { "docid": "ad960f75029008c98b15f4a557750866", "score": "0.5504851", "text": "protected function setModel()\n {\n $this->model = TruckType::class;\n }", "title": "" }, { "docid": "3c4a45fb0ad4761fd1f9be742b648ff6", "score": "0.55043334", "text": "public static function bootHasRandomId(): void\n {\n static::saving(function ($model) {\n if (empty($model->{$model->getRandomIdKeyName()})) {\n $model->generateRandomId();\n }\n });\n }", "title": "" }, { "docid": "351705bc47b3f25902ae0f6b49641969", "score": "0.5502678", "text": "public function setModel($model)\r\n{\r\n$this -> model = $model;\r\n}", "title": "" }, { "docid": "215e807687706ea4975000e2c1c107df", "score": "0.5502191", "text": "public function rules()\n {\n return [\n 'tenThietBi' => 'required|unique:bangthietbihong,tenThietBi',\n 'serial' => 'required',\n 'model' => 'required',\n ];\n }", "title": "" }, { "docid": "da45a82a220a2628adc8bee09eef8b60", "score": "0.55017155", "text": "public static function bootUuidModel()\n {\n static::creating(function ($model) {\n // Don't let people provide their own UUIDs, we will generate a proper one.\n $model->uuid = Str::uuid(); ;\n//Uuid::uuid4()->toString();\n });\n\n static::saving(function ($model) {\n // What's that, trying to change the UUID huh? Nope, not gonna happen.\n\n /********** TODO\n\n @todo Turn this back on for security in the future\n */\n $original_uuid = $model->getOriginal('uuid');\n\n if ($original_uuid !== $model->uuid) {\n $model->uuid = $original_uuid;\n }\n /*\n *****/\n /*******************\n // if we run accross a model that does not have a uuid.\n // this way, we can populate by loading and saving every object\n // in the collection\n print(\"[\" . $original_uuid . \"]\") ;\n if (strlen ( $original_uuid ) <2 ) {\n print(\"Frack\") ;\n $model->uuid = Str::uuid(); ;\n print($model->uuid) ;\n $model->save() ;\n print(\"\\n\") ;\n print(\"\\n\") ;\n\n }\n ********************/\n });\n }", "title": "" }, { "docid": "c5cb66bc0c545e19687fb8061aaeef6b", "score": "0.5500813", "text": "public function rules()\n {\n return [\n 'name' => 'required|min:3|max:100|unique:manufacturers,name,' . $this->id,\n 'country' => 'required|min:3|max:100',\n 'description' => 'required|min:50|max:500',\n ];\n }", "title": "" }, { "docid": "9ecff72012bd69a9b2c9e526e14ba87c", "score": "0.5497138", "text": "protected static function normalizeId($model)\n {\n return $model instanceof Model ? $model->getKey() : $model;\n }", "title": "" }, { "docid": "e6250199101cc5c47062233cf8e97609", "score": "0.5491628", "text": "protected function setmodelNM() {\n\t\t$this->modelNM = substr(get_class($this), 7);\n\t}", "title": "" }, { "docid": "d30b39a176b7527af5a003b2bfa58935", "score": "0.54861027", "text": "protected function setModel()\n {\n $this->model = Voucher::class;\n }", "title": "" }, { "docid": "9fce6c4a8153fba36811da3fb59b61ab", "score": "0.54851204", "text": "public function rules()\n {\n return [\n \"directorioSerie\" => \"required|string|max:85\",\n \"codigoSerie\" => \"required|string|max:10|unique:serie,codigoSerie,\".$this->get('idSerie') .\",idSerie\",\n \"nombreSerie\" => \"required|string|max:80\"\n\n ]; \n }", "title": "" }, { "docid": "04ca16a4e43f52c5221572ccf908e970", "score": "0.5483545", "text": "public static function bootSetsUuidWhenCreating()\n {\n static::creating(function ($model) {\n\n if ($model->incrementing != false) {\n throw new InvalidModelConfigurationException('Set $incrementing = false in your Model');\n }\n if ($model->keyType != 'string') {\n throw new InvalidModelConfigurationException('Set $keytype = \\'string\\' in your Model');\n }\n\n $potentiallySuppliedIdentifier = $model->{$model->getKeyName()};\n\n // if the ID has been supplied, validate it's a version 4 uuid\n if ($potentiallySuppliedIdentifier && Uuid::import($potentiallySuppliedIdentifier)->version !== 4) {\n throw new InvalidUuidSuppliedException('Supplied identifier is invalid');\n }\n\n $model->{$model->getKeyName()} = $potentiallySuppliedIdentifier ?? Uuid::generate(4)->string;\n });\n }", "title": "" }, { "docid": "331204d45a418da853b0e7070dac01e8", "score": "0.547484", "text": "public function rules()\n {\n return [\n\n 'idRiesgo' => 'unique:analisis_rs'\n ];\n }", "title": "" }, { "docid": "d4fbcbb506919dabb36241b9076bb3b5", "score": "0.5470143", "text": "public function rules()\n {\n return [\n 'title' => ['required' , (new VerifyUniqueField())->setPrimarId($this->id)->setModel('image_galleries')]\n\n ];\n }", "title": "" }, { "docid": "ce6f47167d6b3debcaaa88f22a5d3067", "score": "0.5466228", "text": "public function setModel($model)\n\t{\n\t\t$this->model = $model;\n\t}", "title": "" }, { "docid": "5006355263fe3c6ce5c8f910c24552f1", "score": "0.5463993", "text": "public static function bootUsesUuid()\n {\n static::creating(function ($model) {\n\n $model->attributes[$model->uuidColumn] = Str::orderedUuid()->toString();\n });\n }", "title": "" }, { "docid": "dcdb0a9e981db8a498c189b65f4cc8b6", "score": "0.545532", "text": "public function setRuleId($value);", "title": "" }, { "docid": "f72d27983b1236540b6572af2a453834", "score": "0.5454181", "text": "public function rules()\n {\n return [\n 'codIdentificacion_Empresa' => 'required|unique:Empresas,codIdentificacion_Empresa,'.$this->id,\n 'nombre_Empresa' => 'required',\n\n ];\n }", "title": "" }, { "docid": "d9b3dd1e7504cb26e1297bc0afade8e9", "score": "0.54516697", "text": "public static function boot()\n {\n static::creating(function ($model) {\n $model->{$model->getKeyName()} = Str::uuid();\n });\n\n parent::boot();\n }", "title": "" }, { "docid": "67322b64ea2f2d3d2f66714172e3f687", "score": "0.5450618", "text": "private function set_validation_rules($id = NULL) {\n $this->load->library('form_validation');\n\n $this->form_validation->set_rules(\"name\", $this->lang->line('field_item_name'), 'required');\n\n // If new item or if inventory_number has been changed, check if it's unique\n if (is_null($id) || $_POST['inventory_number'] != $this->item_model->get($id)->inventory_number) {\n $this->form_validation->set_rules(\"inventory_number\", $this->lang->line('field_inventory_number'),\n 'required|is_unique[item.inventory_number]',\n array('is_unique' => $this->lang->line('msg_err_inventory_used')));\n } else {\n $this->form_validation->set_rules(\"inventory_number\", $this->lang->line('field_inventory_number'), 'required');\n }\n }", "title": "" }, { "docid": "fac4bad40e2d2c1e047d6f885db852de", "score": "0.5448784", "text": "public function rules()\n {\n return [\n 'ci' => 'required|integer|digits_between:6,9|unique:persons,ci,'.$this->get(\"id\").\",id\",\n 'expedido' => 'required',\n 'names' => 'required|max:250',\n 'last_name_f' => 'required|max:250',\n 'last_name_m' => 'max:250',\n 'career' => 'max:250',\n 'phone' => 'digits_between:7,10',\n 'phone_cel' => 'digits_between:7,10',\n 'address' => 'max:250',\n 'email' => 'email'\n ];\n }", "title": "" }, { "docid": "675589bed0a979e698f787fd70d6cccc", "score": "0.54411185", "text": "public function setModel($model): void\n {\n $this->model = $model;\n }", "title": "" }, { "docid": "19bc80ccf4624bf10781f10bb4db2165", "score": "0.5430339", "text": "public function rules() {\n $id = $this->has('id');\n return [\n 'name' => 'required|max:255|unique_with:common_attributes,type,slug'.$id,\n 'description' => 'required',\n //'parent_id' => 'required',\n 'is_active' => 'required',\n 'meta_title' => 'required|max:255',\n 'meta_keywords' => 'required|max:255',\n 'meta_description' => 'required|max:255',\n ];\n }", "title": "" }, { "docid": "b61130429c821e4ad7388e3605e793d5", "score": "0.5396379", "text": "private function __construct($model, $rules) {\n $this->model = self::flatten($model);\n $this->rules = $this->normalizeRules($rules);\n $this->context = new ValidatorContext($this);\n }", "title": "" }, { "docid": "68c2043d8d9a84f524016fc4843af910", "score": "0.539562", "text": "public function rules()\n {\n return [\n 'identification' => ['required', 'string', 'max:10', 'unique:tables,identification'],\n ];\n }", "title": "" }, { "docid": "248f976744ab0a0495f13b5884881d6a", "score": "0.53948027", "text": "protected static function boot()\n {\n parent::boot();\n\n static::creating(function ($model) {\n if(!$model->{$model->getKeyName()})\n $model->{$model->getKeyName()} = Uuid::generate()->string;\n });\n }", "title": "" }, { "docid": "3448ff7a94051d08ed61d52f39813df4", "score": "0.53874356", "text": "public function setId() {\n\t\t$this -> id = genUuid();\n\t\t$this -> save();\n\t}", "title": "" }, { "docid": "3bc4535dce3340f490904437ee69275f", "score": "0.5386769", "text": "public function setCarModelIdAttribute($input)\n {\n $this->attributes['car_model_id'] = $input ? $input : null;\n }", "title": "" }, { "docid": "9764bb6112ef0cc21a86042913eefd87", "score": "0.5382699", "text": "public function creating($model)\n {\n $model->number = Keygen::numeric(7)->prefix('#')->generate(true);\n }", "title": "" }, { "docid": "dcf50ec9ae0bb6022c337ac7fc4386ae", "score": "0.53768826", "text": "protected function setModel()\n {\n $this->model = InvoiceDetail::class;\n }", "title": "" }, { "docid": "bbf0ebaf2f27dc574b987a1254f8cff8", "score": "0.53712404", "text": "public static function bootUuid()\n {\n static::creating(function ($model) {\n $uuidFieldName = $model->getUuidFieldName();\n if (empty($model->$uuidFieldName)) {\n $model->$uuidFieldName = static::generateUUID();\n }\n });\n }", "title": "" }, { "docid": "6d48f2f20d3621fc4f6826a1d8e82a54", "score": "0.5355796", "text": "public function setParticipantModel($model)\n {\n $this -> models[Participant::class] = $model;\n }", "title": "" }, { "docid": "dcb87eb74102ffe9d0f797e6d3ccce44", "score": "0.5352036", "text": "public static function unsetModelValidator()\n {\n static::$validator = null;\n }", "title": "" }, { "docid": "dbe8c0a2ca61d1b97a98e37eb1f24580", "score": "0.5345237", "text": "function setModelName($model);", "title": "" }, { "docid": "600618570805be4cfab69d108e15719e", "score": "0.5340972", "text": "protected static function boot()\n {\n parent::boot();\n\n static::creating(function ($model) {\n /* Create id unique code */\n $model->{$model->getKeyName()} = Str::uuid()->toString();\n });\n }", "title": "" }, { "docid": "b1cdfe09ebad2eb9b74289bf1945c0f9", "score": "0.5339192", "text": "public static function boot()\n {\n parent::boot();\n self::creating(function ($model) {\n $model->id = (string)Uuid::generate(4);\n });\n }", "title": "" }, { "docid": "a47b0a58cc6475e52325917a988772fb", "score": "0.53384274", "text": "public function init()\n {\n if ($this->hasModel() && !isset($this->options['id'])) {\n $this->options['id'] = Html::getInputId($this->model, $this->attribute);\n }\n parent::init();\n }", "title": "" }, { "docid": "b670d244923b3f6d26dd689d04f913e5", "score": "0.5316988", "text": "public final function SetModel($model){\n\t\tif (is_object($model)) {\n\t\t\t$this->model = $model;\n\t\t\tif($this->error == 20304){\n\t\t\t\t$this->error = 0;\n\t\t\t}\n\t\t} else {\n\t\t$model = str_replace(S,DS,$model);\n\t\tif($this->Inc($model)){\n\t\t\t$stack = explode(DS,$model);\n\t\t\t$end = end($stack);\n\t\t\tif(!class_exists($end)) return NULL;\n\t\t\t\t$this->model = new $end;\n\t\t\t\tif($this->error == 20304){\n\t\t\t\t$this->error = 0;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c0c8f41469f1bc24024f71438f8cb7b8", "score": "0.530688", "text": "public function rules()\n {\n return [\n // 'title' => ['required' , Rule::unique('todos')->ignore($this->todo)],\n // unique:<table name >,<column name>,' . $this-><Model name **model not Model**>\n 'title' => 'required|unique:todos,title,' . $this->todo,\n 'desc' => 'required'\n ];\n }", "title": "" }, { "docid": "436dc57011a0a915ba8fb02542379f0a", "score": "0.53051597", "text": "public function rules()\n {\n return [\n 'client_id' => 'required' ,\n 'party' => 'required' ,\n 'name' => 'required|unique:feeds,name,'.$this->input('id') ,\n 'short_name' => 'required' ,\n 'status' => 'required' ,\n 'vertical_id' => 'required' ,\n 'frequency' => 'required' ,\n 'type_id' => 'required' ,\n 'country_id' => 'required|integer'\n ];\n }", "title": "" }, { "docid": "256b169f55fcd4055098aa316a0798bf", "score": "0.53036803", "text": "public function uniquenessValidation(&$validation){\n\n $metaData = $this->getModelsMetaData();\n $attributesUniqueness = $metaData->getIdentityField($this);\n if (is_array($attributesUniqueness) && !empty($attributesUniqueness)) {\n foreach ($attributesUniqueness as $key => $attr) {\n $validation->add($attr, new Uniqueness());\n }\n }\n\n return;\n }", "title": "" }, { "docid": "de10b9377995a7a788e8074dac3ea953", "score": "0.5301797", "text": "public function rules()\n {\n return [\n 'name' => 'required|unique:country,name,' . ($this->id ?? ''),\n ];\n }", "title": "" }, { "docid": "ca3daf4861170eddc4a52095fd7a8bc6", "score": "0.5298436", "text": "public function setAutoModel($autoModel) { $this->autoModel = $autoModel ; }", "title": "" }, { "docid": "45f7b0eb0971b223643f9863eaefcd6f", "score": "0.5297935", "text": "protected function __construct() {\n $this->_model = 'ezmvc\\model\\\\' . $this->_model;\n }", "title": "" }, { "docid": "84d2c8258c09dd8d33cc04cfd85e2a14", "score": "0.5279086", "text": "public function rules()\n {\n return [\n// 'name' => 'required',\n 'serial_number' => 'unique:all_assets,serial_number,'.$this->route('all_asset'),\n// 'imei'=>'unique:all_assets,imei'.$this->route('allasset'),\n// client data shows inmotion IMEIs are not unique\n// need to figure out which IMEIs are unique\n\n ];\n }", "title": "" }, { "docid": "9f376636eb2d6882344da387be268232", "score": "0.5278288", "text": "public function __construct($model) {\r\n $this->model = $model;\r\n }", "title": "" }, { "docid": "9f376636eb2d6882344da387be268232", "score": "0.5278288", "text": "public function __construct($model) {\r\n $this->model = $model;\r\n }", "title": "" }, { "docid": "99f7e7944316ade10859693d96652c9a", "score": "0.5274823", "text": "private function setRules() {\n\n $this->requestRules = [\n 'name' => [\n 'required',\n 'max:255'\n ],\n 'first_name' => [\n 'required',\n 'max:255'\n ],\n 'email' => [\n 'required',\n 'max:255',\n 'email',\n 'unique:users,email,' . $this->modelId . ',id'\n ],\n 'login' => [\n 'required',\n 'max:255',\n 'unique:users,login,' . $this->modelId . ',id'\n ],\n 'password' => [\n $this->setRule('required', 'nullable'),\n 'min:8',\n 'max:120',\n 'confirmed',\n 'regex:/^.*(?=.{8,120})(?=.*[a-z])(?=.*[A-Z])(?=.*[\\d])(?=.*[^a-zA-Z\\d\\s]).*$/'\n ],\n 'theme' => [\n 'boolean'\n ]\n ];\n }", "title": "" }, { "docid": "3a4ba70be8cb290f706ad4573cf92278", "score": "0.5273675", "text": "protected function prepareForValidation()\n {\n $this->merge([\n 'identifier' => Str::slug($this->identifier),\n ]);\n }", "title": "" }, { "docid": "66691c4c8bbd17f12dc1e8bc65f41007", "score": "0.52730626", "text": "public function rules()\n {\n return [\n 'user_id' => 'required|numeric|unique:users,provider_id'\n ];\n }", "title": "" }, { "docid": "5234269150d870f2ecc57b0ef2d5a61c", "score": "0.5273027", "text": "public static function bootUuid()\n {\n static::creating(function ($model) {\n if (empty($model->attributes[$model->getKeyName()])) {\n $uuid = $model->generateUuid();\n\n $model->attributes[$model->getKeyName()] = $uuid;\n }\n });\n }", "title": "" }, { "docid": "1d36aff3930d42a07b82498c41b2f4ef", "score": "0.5271477", "text": "public function setModel($model)\n {\n $this->_model = Unus_Model::getInstance()->getData('registry')->getModel($model);\n return $this;\n }", "title": "" }, { "docid": "5e70b281f871e715b40b25549ecea542", "score": "0.5270559", "text": "public function setModel($Model){\n $this->Model = $Model;\n }", "title": "" }, { "docid": "6bc81249746a4cce4a5e4c7bfc4f1f2d", "score": "0.52695256", "text": "private function makeUnique(): string\r\n {\r\n /* @var $model yii\\db\\BaseActiveRecord */\r\n $hash = '';\r\n $isHashUnique = false;\r\n $model = clone $this->owner;\r\n $validator = Yii::createObject(['class' => UniqueValidator::class]);\r\n\r\n while (!$isHashUnique) {\r\n $hash = Yii::$app->security->generateRandomString(6);\r\n $model->clearErrors();\r\n $model->{$this->attribute} = $hash;\r\n $validator->validateAttribute($model, $this->attribute);\r\n $isHashUnique = !$model->hasErrors();\r\n }\r\n\r\n return $hash;\r\n }", "title": "" }, { "docid": "4fbbebcd4cbbc5267c5818edc8abcc1a", "score": "0.52667266", "text": "protected function __setupModel() {\r\n\t\t\t$this->setTableName('Role');\r\n\t\t\t$this->setColumn('id', 'ID', BaseDbTypes::INTEGER, true, false, false, false, true);\r\n\t\t\t$this->setColumn('name', 'Name', BaseDbTypes::STRING, false, true, true);\r\n\r\n\t\t\t$this->id = 0;\r\n\t\t\t$this->name = null;\r\n\r\n\t\t\treturn;\r\n\t\t}", "title": "" }, { "docid": "2e77420abbab4640bab59215bb24edc6", "score": "0.5264953", "text": "public function rules()\n {\n return [ \n 'id_persona' => 'required|unique:tbl_doctor,id_persona,' . $this->route('doctor')->id . '|max:255',\n 'especialidad' => 'required', \n ];\n }", "title": "" }, { "docid": "6b8ba6e6e3e39a82b7ed8169fdc7db5e", "score": "0.5263767", "text": "public function setModel(Model $model)\n {\n $this->model = $model;\n }", "title": "" }, { "docid": "6b8ba6e6e3e39a82b7ed8169fdc7db5e", "score": "0.5263767", "text": "public function setModel(Model $model)\n {\n $this->model = $model;\n }", "title": "" } ]
149f41a745a40b6c797a7386afae2cfc
Render pagesize dropdown list
[ { "docid": "d489fd355d85c59c069a449bd4fc856b", "score": "0.80241215", "text": "public function renderPageSize()\n {\n if (is_null($this->pageSize))\n $this->pageSize = reset($this->availablePageSizes);\n\n $pagination = $this->dataProvider->getPagination();\n\n // create url\n $params=$pagination->params===null ? $_GET : $pagination->params;\n\n unset($params[$pagination->pageVar]);\n\n $content = '\n\t\t\t<div class=\"elements_on_page drop_down\">\n\t\t\tНа странице <span class=\"exp_current\">'.$this->availablePageSizes[$this->pageSize].'<i></i></span>\n\t\t\t<ul>';\n\n foreach ($this->availablePageSizes as $key => $value) {\n $params[$this->pageSizeVar] = $key;\n $content .= CHtml::tag('li', array('data-value' => $key, 'onclick' => '\n\t\t\t\tdocument.location = \"'.$this->getController()->createUrl($pagination->route, $params).'\"\n\t\t\t'), $value);\n }\n\n $content .= '\n\t\t\t</ul>\n\t\t</div>';\n\n return $content;\n }", "title": "" } ]
[ { "docid": "8c2934f3eb013053f276e2cfcda8d259", "score": "0.6725056", "text": "public function menuNumEntries()\n {\n\n ///@todo extend this\n //wcm wcm_req_page '.$this->searchForm\n // $S(\\'form#'.$this->searchForm.'\\').data(\\'size\\',$S(this).val());\n\n //$onchange = 'onchange=\"$S(\\'form#'.$this->searchForm.'\\').data(\\'qsize\\',$S(this).val());$R.form(\\''.$this->searchForm.'\\');\"';\n $onchange = 'onchange=\"$S(\\'table#'.$this->id.'_table\\').grid(\\'pageSize\\', \\''.$this->searchForm.'\\',this)\"';\n\n if (!$sizes=Conf::status('ui.listing.numEntries'))\n $sizes = array(10,25,50,100,250,500);\n\n $menu = '<select class=\"wgt-no-save small\" '.$onchange.' >';\n\n foreach ($sizes as $size) {\n $selected = ($size==$this->stepSize)?'selected=\"selected\"':'';\n $menu .= '<option value=\"'.$size.'\" '.$selected.' >'.$size.'</option>';\n }\n\n $menu .= '</select>';\n\n return $menu;\n\n }", "title": "" }, { "docid": "c92ab2b8441d5beb91faf8040e23a274", "score": "0.6637326", "text": "public function renderSizeBlock()\n {\n /** @var string $url Address of async collection renderer with page size GET parameter */\n $url = url()->build($this->renderer->id.'/collection').'?pagerSize=';\n\n /** @var string $options HTML content of options */\n $options = '';\n\n /** @var int $total Collection items count */\n $total = $this->pager->page_size * $this->pager->total;\n\n if ($this->pager->rows_count > $this->pagerSizes[0]) {\n foreach ($this->pagerSizes as $optValue) {\n // Show default option as selected\n $optSelected = $this->pager->page_size == $optValue ? 'selected' : '';\n\n // Is necessary to show current option\n $options .= $total >= $optValue\n ? $this->renderer->view('collection/sizeblock_option')\n ->optVal($optValue)\n ->optSelected($optSelected)\n ->output()\n : '';\n }\n }\n\n // Show block only if we have some options\n return $options != ''\n ? $this->renderer->view('collection/sizeblock')->url($url)->options($options)->output()\n : '';\n }", "title": "" }, { "docid": "55e118ea991560b18b12001fb8369133", "score": "0.65633273", "text": "function create_select()\n {\n $output = '';\n\t $CI =& get_instance();\n if($this->select_perpage_open && $this->select_perpage_close && $CI->config->item('select_per_page')) {\n $curr = $CI->session->userdata('perpage');\n $output.= $this->select_perpage_open; \n foreach($CI->config->item('select_per_page') as $np){\n //$output.='<option value=\"'.$this->base_url.'1/'.$np.$this->get_param.'\">'.$np.'</option>';\n $output.='<option value=\"'.$np.'\" '.( ($np==$curr)? 'selected=\"selected\"': '' ).'>'.$np.'</option>';\n }\n $output .= $this->select_perpage_close;\n return $output;\n }\n return '';\n }", "title": "" }, { "docid": "c6dec0cb02225602a981fdf428c1ed5e", "score": "0.65200156", "text": "public function renderPageSizeWidget()\n {\n if (!empty($this->sizes)) {\n $sizesKeys = array_keys($this->sizes);\n\n return PageSize::widget([\n 'encodeLabel' => false,\n 'label' => Yii::t('vendor/voskobovich/yii2-advanced-grid/interface/common', 'Size:') . '&nbsp;',\n 'labelOptions' => [\n 'class' => 'control-label',\n 'style' => 'font-weight: normal'\n ],\n 'template' => Html::tag('div', '{label}{list}',\n ['class' => 'form-group']),\n 'options' => [\n 'class' => 'form-control input-sm',\n ],\n 'defaultPageSize' => $sizesKeys[0],\n 'sizes' => $this->sizes,\n ]);\n }\n\n return '';\n }", "title": "" }, { "docid": "1d36eea40e2ed869851ed09ab0e465b7", "score": "0.6193024", "text": "function manage_multiple_choices_options() {\n $page_data['number_of_options'] = $this->input->post('number_of_options');\n $this->load->view('backend/admin/manage_multiple_choices_options', $page_data);\n }", "title": "" }, { "docid": "edd8d33d26295447379e04c1f18ef2d5", "score": "0.61713743", "text": "public function paginLimit(){\n if(empty($this->paginParams['count'])){\n return;\n }\n $options = array(\n array('name' => 5, 'value' => 5),\n array('name' => 10, 'value' => 10),\n array('name' => 15, 'value' => 15),\n array('name' => 20, 'value' => 20),\n array('name' => 25, 'value' => 25),\n array('name' => 30, 'value' => 30),\n array('name' => 35, 'value' => 35),\n array('name' => 50, 'value' => 50),\n array('name' => 100, 'value' => 100),\n array('name' => 'همه', 'value' => $this->paginParams['count']),\n );\n \n $select = $this->Form->select('limit',$options,array(\n 'id' => 'limit',\n 'value' => $this->paginParams['limit'],\n 'empty' => false,\n ));\n $label = $this->Html->tag('label','نمایش');\n $div = $this->Html->div('page-limit form-filter',$label.$select);\n return $div.$this->__limitScript();\n }", "title": "" }, { "docid": "125fd58fe5c0cfbfba3d8b03463c2ecb", "score": "0.60825473", "text": "private function get_limit_options() {\n $number_of_posts = isset( $this->slide_settings['number_of_posts'] ) ? $this->slide_settings['number_of_posts'] : 3;\n\n $html = \"<input value='{$number_of_posts}' type='number' step='1' min='1' max='30' name='attachment[{$this->slide->ID}][settings][number_of_posts]'>\";\n\n return $html;\n }", "title": "" }, { "docid": "f09878688adc64e79e9188b2d1942df1", "score": "0.6063868", "text": "public function renderPagesizer()\r\n {\r\n $pagination = $this->dataProvider->getPagination();\r\n if ($pagination === false || $this->dataProvider->getCount() <= 0) {\r\n return '';\r\n }\r\n /* @var $class PageSizer */\r\n $pageSizer = $this->pageSizer;\r\n $class = ArrayHelper::remove($pageSizer, 'class', PageSizer::className());\r\n $pageSizer['pagination'] = $pagination;\r\n $pageSizer['view'] = $this->getView();\r\n return $class::widget($pageSizer);\r\n }", "title": "" }, { "docid": "44b5b05a57e8543a39abd143455c2cd4", "score": "0.5998055", "text": "public function limit_select($list = null) {\r\n\t\t$form = $this->_context->form;\r\n\t\t$ret = $form->create(null, array('id' => 'pagination-form', 'method' => 'GET'));\r\n\t\t$query = $this->_context->request()->query;\r\n\t\tforeach (array('sort', 'dir') as $field)\r\n\t\t\tif (isset($query[$field]))\r\n\t\t\t\t$ret .= $form->hidden($field, array('value' => $query[$field], 'id' => 'pagination-'.$field));\r\n\t\tif ($list == null)\r\n\t\t\t$list = array(\r\n\t\t\t\t'Page Count',\r\n\t\t\t\t5 => 'Five',\r\n\t\t\t\t10 => 'Ten',\r\n\t\t\t\t25 => '25',\r\n\t\t\t\t50 => 'Fifty'\r\n\t\t\t);\r\n\t\t$ret .= $form->select('limit', $list, array(\r\n\t\t\t'id' => 'pagination-limit',\r\n\t\t\t'onchange' => 'submit()'\r\n\t\t));\r\n\t\t$ret .= $form->end();\r\n\t\treturn $ret;\r\n\t}", "title": "" }, { "docid": "9cc5fa0bd22fb0e8f02fa63f15b67308", "score": "0.59439313", "text": "public function render()\n {\n // try to update pagination one mor time for cases when not configured pagination was used and later configured.\n // (in this case we need to rewrite page_size again)\n $this->paginationControl && $this->updatePagination();\n $this->setViewData();\n return parent::render();\n }", "title": "" }, { "docid": "245ebfd28aacf3734182277afc7052df", "score": "0.5925326", "text": "function ml_per_page_field() {\n\tml_text_field('ml_per_page', '', 2);\n}", "title": "" }, { "docid": "de74551f4f47827270c4fbcf7e00d9aa", "score": "0.58784914", "text": "protected function getLimitBox() {\n\t\t$limits = array();\n\t\t$limit = $this->getModel ()->getState ( 'limit' );\n\t\n\t\t// Make the option list.\n\t\tfor ($i = 5; $i <= 30; $i += 5)\n\t\t{\n\t\t\t$limits[] = JHtml::_('select.option', \"$i\");\n\t\t}\n\t\n\t\t$limits[] = JHtml::_('select.option', '50', JText::_('J50'));\n\t\t$limits[] = JHtml::_('select.option', '100', JText::_('J100'));\n\t\t$limits[] = JHtml::_('select.option', '200', JText::_('J200'));\n\t\t$limits[] = JHtml::_('select.option', '500', JText::_('J500'));\n\t\t$limits[] = JHtml::_('select.option', '1000', '1000');\n\t\t$limits[] = JHtml::_('select.option', '2000', '2000');\n\t\t$limits[] = JHtml::_('select.option', '5000', '5000');\n\t\t$limits[] = JHtml::_('select.option', '0', JText::_('JALL'));\n\t\n\t\t$selected = $limit == 0 ? 0 : $limit;\n\t\n\t\t// Build the select list.\n\t\t$html = JHtml::_(\n\t\t\t\t'select.genericlist',\n\t\t\t\t$limits,\n\t\t\t\t'limit',\n\t\t\t\t'class=\"inputbox input-small\" size=\"1\" onchange=\"Joomla.submitform();\"',\n\t\t\t\t'value',\n\t\t\t\t'text',\n\t\t\t\t$selected\n\t\t);\n\t\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "6b8f55de9cd7b6964f74f9f59ae63d29", "score": "0.5875846", "text": "public function getPageList($input)\n {\n //exit(\"inside\");\n //echo \"getparam \".Yii::app()->request->getParam('page').\"<br/>\";\n //echo \"get\".$_GET['page'].\"<br/>\";\n $currentPage=Yii::app()->request->getParam('page',10);\n //exit;\n /*echo \"page value \".Yii::app()->config->getData('CONFIG_WEBSITE_ITEMS_PER_PAGE_ADMIN');\n echo $currentPage;\n exit;*/\n $pageValues=array('5'=>'5','10'=>'10','30'=>'30','50'=>'50','100'=>'100','200'=>'200');\n if(min($pageValues)<$input['totalItemCount']):\n echo 'List '.CHtml::dropDownList('no-width','page',$pageValues,\n array('options' => array(Yii::app()->config->getData('CONFIG_WEBSITE_ITEMS_PER_PAGE_ADMIN')=>array('selected'=>true)),'class'=>'no-bg-color',\n 'onchange'=>\"if(this.value!='')\". \" {\". \" href=window.location.href; if(href.search('\".Yii::app()->getController()->getId().\"/index')=='-1')\"\n . \"{url=href.replace('/page/\".$currentPage.\"','')+'/index/page/'+this.value;}else { url=href.replace('/page/\".$currentPage.\"','')+'/page/'+this.value;} \"\n . \"window.location=url;}\")\n );\t \n endif;\n }", "title": "" }, { "docid": "37e5e698d6fa7adaa1152d5108cd170e", "score": "0.58075583", "text": "public function renderOptions()\n\t{\n\t\t$tpl = $this->template;\n\t\t$tpl->setFile(__DIR__ . '/options.phtml');\n\n\t\t$tpl->render();\n\t}", "title": "" }, { "docid": "3c3ea7d7cbe3293fabf852b1db54ee8f", "score": "0.5784247", "text": "function createSelectMenu($name, $maxsize, $items){\n\n if (count($items)<$maxsize) $maxsize = count($items);\n printf(\"<select name=\\\"\".$name.\"\\\"size=\\\"\".$maxsize.\"\\\" multiple>\");\n\n for ($i=0; $i<count($items); $i++){\n printf(\"<option value=\\\"\".$items[$i][0].\"\\\">\" . $items[$i][1] . \"</option>\");\n }\n printf(\"</select>\");\n\n}", "title": "" }, { "docid": "13061faab1e438985811c545ca0c0c70", "score": "0.57771355", "text": "function renderProductQuantityDropdown() {\n $html = '<select name=\"quantity\">';\n // MAX_AMOUNT_PER_PRODUCT_IN_CART is ergens gevuld met de waarde 10.\n for($i = 0; $i < MAX_AMOUNT_PER_PRODUCT_IN_CART; $i += 1) {\n $html .= '<option value=\"' . ($i + 1) . '\">' . ($i + 1) . '</option>';\n }\n $html .= '</select';\n return $html;\n}", "title": "" }, { "docid": "d135378c6d5ce95e981fb35bf034880f", "score": "0.5756444", "text": "public function short_page_link()\n {\n \n $pagination = '';\n if($this->num_per_page == 0){\n return $pagination;\n }\n $totalpage = ceil($this->total_rows / $this->num_per_page);\n if ($totalpage >= 1) {\n $pagination = '<div class=\"pull-right\">\n <div class=\"form-inline\" id=\"pagingControl\">\n \t <div class=\"form-group\">\n <label for=\"Page\">' . __('Page: ', 'includes') . '</label>\n <select class=\"form-control\" data-url=\"' . admin_url($this->param_name . '=') . '&'.$this->param_name.'=\" onchange=\"window.location=$(this).data(\\'url\\')+$(this).val();\">';\n for ($i = 1; $i <= $totalpage; $i++) {\n if ($this->page == $i) {\n $pagination .= '<option value=\"' . $i . '\" selected=\"selected\">' . $i . '</option>';\n } else {\n $pagination .= '<option value=\"' . $i . '\">' . $i . '</option>';\n }\n }\n $pagination .= ' </select>\n </div>\n \t </div>\n </div>';\n }\n return $pagination;\n }", "title": "" }, { "docid": "caabf1e56a0860257c9a5d3d4a7ad659", "score": "0.5697387", "text": "function size_select_options($size_compare)\n{\n\tglobal $user;\n\n\t$size_types_text = array($user->lang['BYTES'], $user->lang['KIB'], $user->lang['MIB']);\n\t$size_types = array('b', 'kb', 'mb');\n\n\t$s_size_options = '';\n\n\tfor ($i = 0, $size = sizeof($size_types_text); $i < $size; $i++)\n\t{\n\t\t$selected = ($size_compare == $size_types[$i]) ? ' selected=\"selected\"' : '';\n\t\t$s_size_options .= '<option value=\"' . $size_types[$i] . '\"' . $selected . '>' . $size_types_text[$i] . '</option>';\n\t}\n\n\treturn $s_size_options;\n}", "title": "" }, { "docid": "0fa1e754f01df2882b3b898ba8323ad8", "score": "0.5689868", "text": "protected function getHeaderCellLabel()\n {\n return 'Show: '.Html::dropDownList('pageSize', 10,\n [10 => 10, 20 => 20, 50 => 50, 100 => 100, 1000 => 1000],\n ['id' => 'pageSize','class'=>'form-control']\n );\n }", "title": "" }, { "docid": "2cd617a1992af2c691e2a6040b79f970", "score": "0.5645888", "text": "public function limitAndPaginate(){\n return $this->Html->div('clearfix','').$this->paginLimit().$this->paginator();\n }", "title": "" }, { "docid": "387e0ad4f6be6e126650a361d1c80687", "score": "0.56249726", "text": "function show(){\r\n echo \"\r\n\t <select id = '\" .$this->NAME .\"' name=\" .$this->NAME .\" size='\" .$this->SIZE .\"' \";\r\n\t\r\n\tif($this->MULTIPLE_SELECTION){\r\n\t\techo \" multiple \";\r\n\t} \r\n\t \r\n\techo \"> \r\n\t\";\r\n foreach($this->OBJECTS as $name => $wert){\r\n echo \"<option value='\" .$wert .\"'>\" .$name .\"</option>\r\n \";\r\n }\r\n\r\n echo \"\r\n\t </select> \r\n \";\r\n\r\n }", "title": "" }, { "docid": "82a7e45e42bfaaebe774efc3d2e4402c", "score": "0.5605649", "text": "function render(){\n\t\t$attr\t=\t$this->_attr;\n\t\t$value\t=\t$attr['value'];\n\t\tunset($attr['value']);\n\n\t\t# Mark selected options\n\t\t$this->select_active($value);\n\n\t\t$options\t=\t'';\n\t\tforeach($this->options as $option)\n\t\t\t$options\t.=\t$option->render();\n\n\t\t$this->innerHTML\t=\t$options;\n\t\treturn parent::render();\n\t}", "title": "" }, { "docid": "79dd3dedc2bfc846902ae43ccd29e93a", "score": "0.5601619", "text": "public function nbrObjects() {\r\n\t\t\r\n\t\t// Check if we chose something from the dropdownlist\r\n\t\tif (isset ( $_POST [\"select_value\"] )) {\r\n\t\t\t\r\n\t\t\t$this->defaultLimit = $_POST [\"select_value\"];\r\n\t\t\t\r\n\t\t\t// Put the value in Session to use when the page refreshes\r\n\t\t\t$this->Session->write ( 'session', $this->defaultLimit );\r\n\t\t\t\r\n\t\t\t// Display with the value sent by the dropdownlist\r\n\t\t\t$this->paginate = array (\r\n\t\t\t\t\t'Company' => array (\r\n\t\t\t\t\t\t\t'limit' => $this->defaultLimit \r\n\t\t\t\t\t) \r\n\t\t\t);\r\n\t\t\t// Check if there's something in the session\r\n\t\t} else if ($this->Session->check ( 'session' )) {\r\n\t\t\t\r\n\t\t\t// Put the value as defaultLimit when the page refreshes\r\n\t\t\t$this->defaultLimit = $this->Session->read ( 'session' );\r\n\t\t\t\r\n\t\t\t// Display with session value\r\n\t\t\t$this->paginate = array (\r\n\t\t\t\t\t'Company' => array (\r\n\t\t\t\t\t\t\t'limit' => $this->defaultLimit \r\n\t\t\t\t\t) \r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\t// Display with default value\r\n\t\t\t$this->paginate = array (\r\n\t\t\t\t\t'Company' => array (\r\n\t\t\t\t\t\t\t'limit' => $this->defaultLimit \r\n\t\t\t\t\t) \r\n\t\t\t);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ba4167819585006093fe8883c2f9ed32", "score": "0.55825824", "text": "public function getSizeWithPaginate()\n {\n return Size::orderBy('id', 'desc')->paginate(config('define.paginate.limit_rows'));\n }", "title": "" }, { "docid": "0dfeb31af5da9dfde94f1d6ea917ac53", "score": "0.5581358", "text": "public function render_content() {\n\n\t\t\tif ( empty( $this->choices ) ) return; ?>\n\t\t\t<label>\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<select <?php $this->link(); ?> multiple=\"multiple\" style=\"height: 100%;\">\n\t\t\t\t\t<?php\n\t\t\t\t\tforeach ( $this->choices as $value => $label ) {\n\t\t\t\t\t\t$selected = is_array( $this->value() ) ? in_array( $value, $this->value(), true ) ? selected( 1, 1, false ) : '' : '';\n\t\t\t\t\t\techo '<option value=\"' . esc_attr( $value ) . '\"' . esc_attr( $selected ) . '>' . esc_attr( $label ) . '</option>';\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</label>\n\t\t\t<?php\n\t\t}", "title": "" }, { "docid": "282f691d872a88d26904192f302831c6", "score": "0.55796194", "text": "function theme_page_dropdown( $theme, $rr_name = NULL, $settings = array() ) {\n\t\t$output = \"\";\n\t\t$current = $theme->page;\n\t\t$items_per_page = isset( $theme->posts->get_param_cache['limit'] ) ?\n\t\t\t$theme->posts->get_param_cache['limit'] :\n\t\t\tOptions::get( 'pagination' );\n\t\t$total = Utils::archive_pages( $theme->posts->count_all(), $items_per_page );\n\n\t\t// Make sure the current page is valid\n\t\tif ( $current > $total ) {\n\t\t\t$current = $total;\n\t\t}\n\t\telse if ( $current < 1 ) {\n\t\t\t$current = 1;\n\t\t}\n\n\t\t$output = '<select onchange=\"location.href=options[selectedIndex].value\">';\n\t\tfor ( $page = 1; $page < $total; ++$page ) {\n\t\t\t$settings[ 'page' ] = $page;\n\t\t\t$caption = ( $page == $current ) ? $current : $page;\n\t\t\t// Build the path using the supplied $settings and the found RewriteRules arguments.\n\t\t\t$url = URL::get( $rr_name, $settings, false, false, false );\n\t\t\t// Build the select option.\n\t\t\t$output .= '<option value=\"' . $url . '\"' . ( ( $page == $current ) ? ' selected=\"selected\"' : '' ) . '>' . $caption . '</option>' . \"\\n\";\n\t\t}\n\t\t$output .= \"</select>\";\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "fee878777567d15de204ca88367e81f7", "score": "0.5552987", "text": "function writeLimitBox() {\r\n\t\techo mosPageNav::getLimitBox();\r\n\t}", "title": "" }, { "docid": "b63ff26da97dd3328894ec98b6d3f688", "score": "0.5549602", "text": "function renderOptionsPage()\n {\n // Invoke the action hook for saving the options page.\n do_action('ideascale_save_options');\n\n // Register the in_admin_footer action hook. This is done here so that\n // it only gets registered for the options page for this plugin, and\n // not every plugin.\n add_action('in_admin_footer', array(&$this, 'renderAdminFooter'));\n\n $view = new IdeaScale_Structure_View('options-page.phtml');\n $view->set('heading' , sprintf(__('%s Settings', 'ideascale'), 'IdeaScale'));\n $view->set('nonce_action', 'update-options');\n $view->set('plugin_label', 'ideascale');\n\n $view->set('inline-code' , stripslashes($this->getOption('inline-code')));\n $view->set('icon-code' , stripslashes($this->getOption('icon-code')));\n\n $view->render();\n }", "title": "" }, { "docid": "42a771a17d96a4a8cd8efd91b540ef2f", "score": "0.5543325", "text": "public function index()\n {\n $size = Size::where('status',1)->latest()->paginate(10);\n return \\view('admin.pages.size.index',\\compact('size'));\n }", "title": "" }, { "docid": "dfb207080c7c7d2092fb53b189daf63e", "score": "0.553793", "text": "public function getStatusOptions()\n {\n //Static data for the Combobox\n $this->RequestHandler->renderAs($this, 'json');\n $this->loadModel('Status');\n $query = $this->paginate($this->Status);\n\n $this->set('listOptions', $query);\n $this->set('_serialize', ['listOptions']);\n }", "title": "" }, { "docid": "afa58a836645bd82fa5a874dd6d3bc84", "score": "0.5525253", "text": "public function pagesize() { return 15; }", "title": "" }, { "docid": "849196bf730bc71971206e16a8f1695d", "score": "0.5521746", "text": "function WriteSelectCountRows( $display, $script, $rows=NULL,$ajax=false)\n {\n if( $display>0 AND $display<10 ) $arr[$display] = $display;\n $arr[10]=10;\n $arr[20]=20;\n $arr[30]=30;\n $arr[50]=50;\n $arr[60]=60;\n $arr[70]=70;\n $arr[80]=80;\n $arr[90]=90;\n $arr[100]=100;\n if( $rows ) $arr[$rows] = $rows;\n\n //echo '$arr='; print_r($arr);\n //echo '<br> $rows='.$rows.' $display='.$display;\n ?>\n <?\n if(!$ajax){\n ?>\n <select name=\"display\" onChange='location=\"<?=$script?>\"+\"&start=0&display=\"+this.value'>\n <?\n }else{\n ?>\n <select name=\"display\" onChange='reloadCatalogInner(\"\",\"<?=$script?>\"+\"&start=0&display=\"+this.value);'>\n <?\n }\n $key = array_keys($arr);\n $size = sizeOf($key);\n for ($i=0; $i<$size; ++$i)\n {\n echo '$el[key]=',$key[$i],' $rows=',$rows,' $display=',$display;\n if( $key[$i] <= $rows ){\n if( $key[$i]==$display ) $selected = 'selected'; //echo '<option value=\"'.$el['key'].'\" selected>'.$el['value'].'</option>';\n elseif( $display>$rows AND $key[$i]== $rows ) $selected = 'selected';\n else $selected = '';\n echo '<option value=\"',$key[$i],'\" ',$selected,'>',$arr[$key[$i]],'</option>';\n }\n }\n ?></select><?\n }", "title": "" }, { "docid": "2c3c146fbf1df6e3bc4277e767f86f86", "score": "0.5519515", "text": "public function getSizechartSelection()\n {\n\t\t$result['data']=$this->AdminModel->getCategories();\n\t\t$this->load->view('admin_size_add',$result);\n\t}", "title": "" }, { "docid": "9511ee6c2933b304c6cc829e794baac0", "score": "0.55117154", "text": "public function index()\n {\n // return Size::with('size_group')->latest()->get()[0]->size_group->size;\n \n return view('panel.size', [\n 'sizes' => Size::with('size_group')->latest()->get(),\n 'page_name' => 'size',\n 'page_title' => 'ثبت سایز',\n 'options' => $this->options(['site_name', 'site_logo'])\n ]);\n }", "title": "" }, { "docid": "d29670fc61e5ab5394e4df5cb3544b4f", "score": "0.5473086", "text": "function paginador() {\n\t\tif ( $this->limit != 0 ) {\n\t\t\t$ctrl = $this->controller_values();\n\t\t\t$all_list = num_rows( $this->sql(true) );\n\t\t\t$pages = ceil($all_list/$this->limit);\n\t\t\t\n\t\t\t$show_pages = 14;\n\t\t\t$start = ($ctrl['offset']/$this->limit) > ($show_pages/2) ? ($ctrl['offset']/$this->limit)-($show_pages/2) : 0; \n\t\t\t$finish = $start+$show_pages > $pages ? $pages : $start+$show_pages;\n\t\t\t$start = $finish-$show_pages < 0 ? 0 : $finish-$show_pages;\n\t\t\t\n\t\t\tif ( $pages > 1 ) {\n\t\t\t\techo '<div class=\"'.$this->paginator_css_class.'\">';\n\t\t\t\techo '<a style=\"margin-right: 5px;\" href=\"javascript:void(0);\" title=\"Ir a primera p&aacute;gina\" onclick=\"document.'.$this->id.'_controller.'.$this->id.'_offset.value=\\'0\\'; document.'.$this->id.'_controller.submit();\">Primera p&aacute;gina</a>';\n\t\t\t\tfor ($i=$start; $i<$finish; $i++) {\n\t\t\t\t\t$this_page = $i+1;\n\t\t\t\t\t$this_offset=$i*$this->limit;\n\t\t\t\t\t$class = ( $this_offset == $ctrl['offset'] ) ? 'class=\"selected\"' : '' ;\n\t\t\t\t\techo '<a '.$class.' href=\"javascript:void(0);\" title=\"P&aacute;gina '.$this_page.'\" onclick=\"document.'.$this->id.'_controller.'.$this->id.'_offset.value=\\''.$this_offset.'\\'; document.'.$this->id.'_controller.submit();\">'.$this_page.'</a>';\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$this_last_offset = ($pages-1) * $this->limit;\n\t\t\t\t\n\t\t\t\tif($pages > 14){\n\t\t\t\t\techo '<a style=\"margin-left: 5px;\" href=\"javascript:void(0);\" title=\"Ir a &uacute;ltima p&aacute;gina\" onclick=\"document.'.$this->id.'_controller.'.$this->id.'_offset.value=\\''.$this_last_offset.'\\'; document.'.$this->id.'_controller.submit();\">&Uacute;ltima p&aacute;gina</a>';\n\t\t\t\t}\n\t\t\t\techo '</div>';\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "04921619e269970498f910cd14ec5407", "score": "0.5470092", "text": "public function buildAdminTableOptionsPageHtml()\n {\n AdminController::getInstance()->view(\n 'admin/AdminTableOptionsPage', [\n 'language_domain' => MgTestSettings::LANGUAGE_DOMAIN,\n 'admin_options_page_slug' => $this::ADMIN_OPTIONS_PAGE_SLUG,\n 'settings_group_name' => $this::ADMIN_MENU_GROUP\n ]\n );\n }", "title": "" }, { "docid": "4bd966af2ae8ede721fea7be1504e720", "score": "0.5466961", "text": "function render()\r\n {\r\n $e = '<select style=\"visibility:hidden; display:none;\"';\r\n $e .= 'id=\"' . $this->name . '\" ';\r\n //$e .= ($this->multiple) ? ('name=\"' . $this->name . '[]\" ') :('name=\"' . $this->name . '[]\" ');\r\n $e .= 'name=\"' . $this->name . '[]\" ';\r\n $e .= ($this->multiple) ? ('multiple=\"multiple\" ') : '';\r\n $e .= ($this->size) ? ('size=\"' . $this->size . '\" ') : '';\r\n $e .= ' >';\r\n\r\n while (list($key, $item) = each($this->items)) {\r\n //echo \"<pre>\" . print_r($item) . \"</pre>\";\r\n if (is_array($this->selected)) {\r\n if (!in_array($key, $this->selected)) {\r\n $e .= '<option value=\"' . $key . '\">' . $item[0][0] . '</option>';\r\n } else {\r\n $e .= '<option selected=\"selected\" value=\"' . $key . '\">' . $item[0][0] . '</option>';\r\n }\r\n } else {\r\n if ($this->selected == $key) {\r\n $e .= '<option value=\"' . $key . '\" selected=\"selected\">' . $item[0][0] . '</option>';\r\n } else {\r\n $e .= '<option value=\"' . $key . '\">' . $item[0][0] . '</option>';\r\n }\r\n }\r\n }\r\n reset($this->items);\r\n $e .= '</select>';\r\n\r\n // create iframe\r\n $e .= '<iframe id=\"' . $this->name . '\" name=\"' . $this->name . '_iframe\" ';\r\n $e .= ($this->cssClass) ? ('class=\"' . $this->cssClass . '\" ') : '';\r\n $e .= '></iframe>';\r\n\r\n // css for iframe\r\n $css_table = $this->iframecss['table'];\r\n $css_link = $this->iframecss['link'];\r\n $css_row = $this->iframecss['row'];\r\n $css_altrow = $this->iframecss['altrow'];\r\n $css_cell = $this->iframecss['cell'];\r\n $css_altcell = $this->iframecss['altcell'];\r\n\r\n // create html to write in iframe\r\n $w .= '<link rel=\"stylesheet\" href=\"' . $css_link . '\" type=\"text/css\">';\r\n $w .= '<table class=\"' . $css_table . '\">';\r\n $idxr = 0;\r\n $maxcells = $this->maxCells($this->items); // max num of cells in any row\r\n while (list($key, $data) = each($this->items)) {\r\n\r\n // write row\r\n $w .= ($idxr % 2) ? ('<tr class=\"' . $css_altrow . '\">') : ('<tr class=\"' . $css_row . '\">');\r\n\r\n // selection mode\r\n $mode = ($this->multiple) ? ('checkbox') : ('radio');\r\n $suffix = ($this->multiple) ? (\"_chk[$idx]\") : '';\r\n\r\n // cell with checkbox/radio\r\n if (is_array($this->selected)) {\r\n if (in_array($key, $this->selected)) {\r\n $w .= '<td width=\"20\"><input type=\"' . $mode . '\" name=\"' . $this->name . $suffix . '\" onclick=\"window.parent.' . $this->name . \"_toggle(this.checked, $idxr)\\\" checked=\\\"checked\\\"></td>\";\r\n } else {\r\n $w .= '<td width=\"20\"><input type=\"' . $mode . '\" name=\"' . $this->name . $suffix . '\" onclick=\"window.parent.' . $this->name . \"_toggle(this.checked, $idxr)\\\"></td>\";\r\n }\r\n } else {\r\n if ($this->selected == $key) {\r\n $w .= '<td width=\"20\"><input type=\"' . $mode . '\" name=\"' . $this->name . $suffix . '\" onclick=\"window.parent.' . $this->name . \"_toggle(this.checked, $idxr)\\ selected=\\\"selected\\\"></td>\";\r\n } else {\r\n $w .= '<td width=\"20\"><input type=\"' . $mode . '\" name=\"' . $this->name . $suffix . '\" onclick=\"window.parent.' . $this->name . \"_toggle(this.checked, $idxr)\\\"></td>\";\r\n }\r\n }\r\n\r\n $idxr++;\r\n\r\n // write cell data\r\n $idxc = 0;\r\n $cellcount = sizeof($data);\r\n $rcount = 0;\r\n while (list($junk, $cell) = each($data)) {\r\n $item = $cell[0];\r\n $attrs = $cell[1];\r\n\r\n $w .= '<td ';\r\n $w .= ($idxc % 2) ? ('class=\"' . $css_cell . '\" ') : ('class=\"' . $css_altcell . '\" ');\r\n $idxc++;\r\n\r\n if ($this->fill) {\r\n $w .= ($idxc == $cellcount) ? ('width=\"100%\"') : '';\r\n }\r\n\r\n\r\n // attributes for cell\r\n if (is_array($attrs)) {\r\n while (list($attr, $val) = each($attrs)) {\r\n $w .= \"$attr=\\\"$val\\\" \";\r\n }\r\n }\r\n\r\n $w .= \">$item</td>\";\r\n $rcount++;\r\n }\r\n\r\n // if num of cells in this row < max, add remaining cells\r\n if ($rcount < $maxcells) {\r\n for ($c = 0; $c < ($maxcells - $rcount); $c++) {\r\n $td_class = ($idxc % 2) ? ('class=\"' . $css_cell . '\" ') : ('class=\"' . $css_altcell . '\" ');\r\n $w .= '<td ' . $td_class . '>&nbsp;</td>';\r\n $idxc++;\r\n }\r\n }\r\n\r\n // close row\r\n $w .= '</tr>';\r\n\r\n\r\n }\r\n reset($this->items);\r\n $w .= '</table>';\r\n\r\n // script that does the actual writing to iframe\r\n $e .= \"<script>\\n\";\r\n $e .= 'function ' . $this->name . '_load()';\r\n $e .= \"{\\n \";\r\n $e .= \"window.frames['\" . $this->name . \"_iframe'].document.open();\\n\";\r\n $e .= \"window.frames['\" . $this->name . \"_iframe'].document.write(\\\"<html><body>\\\");\\n\";\r\n $e .= \"window.frames['\" . $this->name . \"_iframe'].document.write(\\\"\" . addslashes($w) . \"\\\");\\n\";\r\n $e .= \"window.frames['\" . $this->name . \"_iframe'].document.write(\\\"</body></html>\\\");\\n\";\r\n $e .= \"window.frames['\" . $this->name . \"_iframe'].document.close();\\n\";\r\n $e .= \"}\\n\";\r\n $e .= \"function \" . $this->name . \"_toggle(state, key)\\n\";\r\n $e .= \"{\\n\";\r\n $e .= \"if(state)\\n\";\r\n $e .= \"{\\n\";\r\n $e .= \"document.getElementById('\" . $this->name . \"').options[key].selected = true;\\n\";\r\n $e .= \"}\\n\";\r\n $e .= \"else\\n\";\r\n $e .= \"{\\n\";\r\n $e .= \"document.getElementById('\" . $this->name . \"').options[key].selected = false;\\n\";\r\n $e .= \"}\\n\";\r\n $e .= \"}\\n\";\r\n $e .= $this->name . \"_load();\\n\";\r\n $e .= \"</script>\\n\";\r\n\r\n return $e;\r\n }", "title": "" }, { "docid": "8cb3c83089ba3bbeb33591a69b3b1835", "score": "0.54631585", "text": "public function displayOptions()\n {\n require_once 'wpop.php';\n WPop::call( 'wpop_page_theme_options', $this );\n }", "title": "" }, { "docid": "a9b53805f097547903259372ea4717b8", "score": "0.54564035", "text": "function get_options_for_display($options, $select_size) {\n\n global $checkit;\n global $selected;\n\n $is_select = (($options & HAS_DD_OPTION) ? $checkit:'');\n $is_private = (($options & ISPRIVATE) ? $checkit:'');\n $is_page_fold = (($options & PAGE_FOLDING) ? $checkit:'');\n $has_page_return = (($options & ADD_PAGE_RETURN) ? $checkit:'');\n $show_breadcrumbs = (($options & ADD_BREADCRUMBS) ? $checkit:'');\n $show_debug = (($options & SHOW_DEBUG) ? $checkit: '');\n\n $html = \"<div class='groupname'>\".__('Group Name', 'navt_domain') .\": \".\n \"<input id='option-name' class='tbox' name='group_options[name]' type='text' value='@GROUPNAME@' \". \"maxlength='\".MAX_LEN.\"' size='15' />\".\n \"<div class='rename-errormsg'></div></div>\" .\n \"<ul>\" .\n\n \"<li><input id='option-fold' class='cbox' name='group_options[fold_pages]' type='checkbox' $is_page_fold value='1' /> \" .\n __('Show only top-level anchors on page (hide hierarchy)', 'navt_domain') . '&nbsp;&nbsp;' .\n \"<input id='option-page-return' class='cbox' name='group_options[add_page_return]' type='checkbox' $has_page_return value='1' /> \" .\n \"<span id='option-page-return-label'>\" . __('Add page return to list', 'navt_domain') . \"</span>\" .\n \"</li>\" .\n\n \"<li><input id='show-breadcrumbs' class='cbox' name='group_options[show_breadcrumbs]' type='checkbox' $show_breadcrumbs value='1' /> \" .\n __('Show breadcrumb navigation', 'navt_domain') . \"</li>\" .\n\n \"<li><input id='option-select' class='cbox' name='group_options[use_select]' type='checkbox' $is_select value='1' /> \" .\n __('Create navigation list using HTML select.', 'navt_domain') .\n \"<p id='select-size-label-1' class='label'> \" . __('Display', 'navt_domain') .\": \" .\n \"<input id='select-size' class='tbox' name='group_options[select_size]' type='text' size='2' value='$select_size'/></p> \" .\n \"<p id='select-size-label-2' class='label'>\".__('item(s) in list', 'navt_domain') . \"</p><br/>\" .\n \"</li>\" .\n\n \"<li><input id='option-private' class='cbox' name='group_options[is_private]' type='checkbox' $is_private value='1' /> \".\n __('Set navigation group to private (visible only when users are signed in)', 'navt_domain').\"</li>\" .\n\n \"<li><input id='option-debug' class='cbox' name='group_options[show_debug]' type='checkbox' $show_debug value='1' /> \".\n __('Show debug as comments in HTML source code', 'navt_domain').\"</li>\" .\n\n \"</ul>\";\n\n $html = str_replace('\"', \"&quot;\", $html);\n\n return($html);\n }", "title": "" }, { "docid": "d9f6f8692911f4df0c15443dfe3215d5", "score": "0.5454064", "text": "public function index()\n {\n $Options = Option::paginate(20);\n return view('backend.options.list', [\n 'list' => $Options\n ]);\n }", "title": "" }, { "docid": "cd332596e5fbb16c9487ad994f1a7d84", "score": "0.54405636", "text": "public function renderWidget()\n {\n $this->htmlAttributes['name'] = $this->name.\"[]\";\n $this->htmlAttributes['id'] = $this->getId();\n\n $output = '<select ';\n $output .= $this->renderHtmlAttributes();\n $output .= '>';\n foreach ($this->options as $key => $value) {\n if (is_array($value)) {\n $output .= $this->renderOptGroup($key, $value);\n } else {\n $output .= $this->renderOptions($key, $value);\n }\n }\n $output .= '</select>';\n\n return $output;\n }", "title": "" }, { "docid": "4e901425698b677e685c11ddf8e1d8a4", "score": "0.5434562", "text": "public function register_option() {\n\t\tregister_setting( 'bsr_settings_fields', 'bsr_page_size', 'absint' );\n\t}", "title": "" }, { "docid": "c8da75ab2a1df2db3327cb231b0d9cb3", "score": "0.5426039", "text": "public function menuTableSize()\n {\n\n ///@todo extend this\n return '<input class=\"fparam-'.$this->searchForm.' valid-number\" name=\"offset\" type=\"text\" value=\"0\" style=\"width:40px;\" />&nbsp;&nbsp;'\n .'<span> / <strong class=\"wgt-num-entry\" >'\n .$this->dataSize.'</strong> '\n .$this->i18n->l('Entries','wbf.label')\n .'</span>';\n\n }", "title": "" }, { "docid": "ff6c27765730b1f8b5aeb0ab17a47088", "score": "0.54053974", "text": "private function listOptions() {\n\t\t\n\t\t// get all of the options\n\t\t$options = Config::getOptions();\n\t\t\n\t\t// sort 'em alphabetically\n\t\tksort($options);\n\t\t\n\t\t// find length of longest option\n\t\t$this->lengthLong = 0;\n\t\tforeach ($options as $optionName => $optionValue) {\n\t\t\t$this->lengthLong = (strlen($optionName) > $this->lengthLong) ? strlen($optionName) : $this->lengthLong;\n\t\t}\n\t\t\n\t\t$this->writeOutOptions($options);\n\t\t\n\t}", "title": "" }, { "docid": "d5f21dcdfb40a38a8e64051c07827ce9", "score": "0.5400544", "text": "function snax_admin_setting_callback_new_post_items_limit() {\n\t$limit = snax_get_new_post_items_limit();\n\t?>\n\n\t<select name=\"snax_new_post_items_limit\" id=\"snax_new_post_items_limit\">\n\t\t<option value=\"10\" <?php selected( 10, $limit ) ?>><?php esc_html_e( '10 items', 'snax' ) ?></option>\n\t\t<option value=\"20\" <?php selected( 20, $limit ) ?>><?php esc_html_e( '20 items', 'snax' ) ?></option>\n\t\t<option value=\"-1\" <?php selected( -1, $limit ) ?>><?php esc_html_e( 'unlimited items', 'snax' ) ?></option>\n\t</select>\n\t<span><?php esc_html_e( 'while creating a new list/gallery. Applies also to Story format images.', 'snax' ); ?></span>\n\t<?php\n}", "title": "" }, { "docid": "0aab6185e88699ea20b0002bccbce1ed", "score": "0.53721595", "text": "public function toHtml() {\n\t\techo '<option '.$this->getAttributes().'>'.$this->renderChildren().'</option>';\n\t}", "title": "" }, { "docid": "51bbb7b4ad1cd525bc01374fd5e3a9d6", "score": "0.536824", "text": "function buildShirtSizeList($sizes){\n $sizeList = \"<select id='shirt_size_id' name='shirt_size_id'>\";\n $sizeList .= \"<option value='' selected disabled>Select a Size</option>\";\n foreach ($sizes as $size) {\n \n $sizeList .= \"<option value='$size[id]'>$size[size]</option>\";\n }\n $sizeList .= \"</select>\";\n return $sizeList;\n }", "title": "" }, { "docid": "b52fef074568c00d6d732a0ed05379cb", "score": "0.5361475", "text": "public function pageLimiter()\n {\n\n $this->limitSelect = \" LIMIT 0, 10\";\n\n $begin = $this->page * $this->rowsPerPage;\n\n $end = $this->rowsPerPage;\n\n $this->limitSelect = \" LIMIT \".$begin.\", \".$end.\"\";\n\n }", "title": "" }, { "docid": "066da2e1ef88535a8dbf3f6753ccb141", "score": "0.53561", "text": "public function showPagination() {\n\t\t$recordset = count($this->list);\n\t\tif($recordset > 1) {\n\t\t\techo '<ul class=\"pagination\">';\n\t\t\techo '<li><a href=\"?page=list&amp;recordset=1\">First page</a></li>';\n\t\t\tfor($i=1; $i <= $recordset ; $i++) {\n\t\t\t\techo '<li><a href=\"?page=list&amp;recordset='.$i.'\">Page '.$i.'</a></li>';\n\t\t\t}\n\t\t\techo '<li><a href=\"?page=list&amp;recordset='.$recordset.'\">Last page</a></li>';\n\t\t\techo '</ul>';\n\t\t}\n\t}", "title": "" }, { "docid": "12b650674abba0f40978922d712b65d0", "score": "0.53542393", "text": "public function render() {\n $paginator = $this->getPaginator();\n\n // this has to be done already here (and in the parent call again :-( )\n if ($this->searchTerm) {\n $this->dataSource->applyFilter($this->searchTerm);\n }\n $count = $this->getCount();\n $this->getPaginator()->itemCount = $count;\n /*\n * Credits David Grudl.\n * @see http://addons.nette.org/cs/visualpaginator\n */\n $page = $paginator->page;\n if ($paginator->pageCount < 2) {\n $steps = array($page);\n } else {\n $arr = range(max($paginator->firstPage, $page - 3), min($paginator->lastPage, $page + 3));\n $count = 4;\n $quotient = ($paginator->pageCount - 1) / $count;\n for ($i = 0; $i <= $count; $i++) {\n $arr[] = round($quotient * $i) + $paginator->firstPage;\n }\n sort($arr);\n $steps = array_values(array_unique($arr));\n }\n $this->getComponent('paginator')->getTemplate()->steps = $steps;\n\n parent::render();\n }", "title": "" }, { "docid": "fa734ae8041df73204ee8d33016a0693", "score": "0.533493", "text": "public function listPagesSelectAdmin( $iPageSelected ){\n global $config;\n\n if( isset( $iPageSelected ) && $iPageSelected > 0 && isset( $bMainOnly ) ){\n $oSql = Sql::getInstance( );\n if( $oSql->getColumn( 'SELECT iPage FROM pages WHERE iPage = \"'.$iPageSelected.'\" AND iPageParent > 0 AND sLang = \"'.$config['language'].'\"' ) == $iPageSelected )\n $bMainOnly = null;\n }\n\n $content = null;\n if( isset( $this->sSelects ) ){\n $content = $this->sSelects;\n }\n else{\n $oSql = Sql::getInstance( );\n foreach( $config['pages_menus'] as $iMenu => $sMenu ){\n $oQuery = $oSql->getQuery( 'SELECT iPage, sName FROM pages WHERE iPageParent = 0 AND sLang = \"'.$config['language'].'\" AND iMenu = \"'.$iMenu.'\" ORDER BY iPosition ASC' );\n $i = 0;\n while( $aData = $oQuery->fetch( PDO::FETCH_ASSOC ) ){\n if( $i == 0 )\n $content .= '<option value=\"0\" disabled=\"disabled\" style=\"color:#999;\">'.$config['pages_menus'][$iMenu].'</option>';\n $content .= '<option value=\"'.$aData['iPage'].'\">'.$aData['sName'].'</option>';\n $content .= $this->listSubPagesSelectAdmin( $iPageSelected, $aData['iPage'] );\n $i++;\n } // end while\n } // end foreach\n $this->sSelects = $content;\n }\n \n if( isset( $content ) ){\n if( isset( $iPageSelected ) && $iPageSelected > 0 )\n return str_replace( 'value=\"'.$iPageSelected.'\"', 'value=\"'.$iPageSelected.'\" selected=\"selected\"', $content );\n else\n return $content;\n }\n }", "title": "" }, { "docid": "37c50479f4bf2337f66282ad5c4ae182", "score": "0.532616", "text": "static public function image_sizes_dropdown($args = \"\")\n {\n global $wp_properties;\n\n $defaults = array(\n 'name' => 'wpp_image_sizes',\n 'selected' => 'none',\n 'blank_selection_label' => ' - '\n );\n\n extract(wp_parse_args($args, $defaults), EXTR_SKIP);\n $blank_selection_label = isset($blank_selection_label) ? $blank_selection_label : ' - ';\n $selected = isset($selected) ? $selected : 'none';\n\n if (empty($id) && !empty($name)) {\n $id = $name;\n }\n\n $image_array = get_intermediate_image_sizes();\n\n ?>\n <select id=\"<?php echo $id ?>\" name=\"<?php echo $name ?>\">\n <option value=\"\"><?php echo $blank_selection_label; ?></option>\n <?php\n foreach ($image_array as $name) {\n $sizes = WPP_F::image_sizes($name);\n\n if (!$sizes) {\n continue;\n }\n\n ?>\n <option value='<?php echo $name; ?>' <?php if ($selected == $name) echo 'SELECTED'; ?>>\n <?php echo $name; ?>: <?php echo $sizes['width']; ?>px by <?php echo $sizes['height']; ?>px\n </option>\n <?php } ?>\n </select>\n\n <?php\n }", "title": "" }, { "docid": "a841a861eb2661dd9a2a5e69cf62577c", "score": "0.5307835", "text": "static function pages( $number = false ){\r\n\t\t$number = self::countval( $number );\r\n\r\n\t\tif ( $number == self::listlength() ) {\r\n\t\t\tstatic $options_pages_default = array();\r\n\t\t\tif ( empty( $options_pages_default ) )\r\n\t\t\t\t$options_pages_default = self::get_pages( $number, 'page' );\r\n\t\t\treturn $options_pages_default;\r\n\t\t}\r\n\r\n\t\telseif ( empty( $number ) ) {\r\n\t\t\tstatic $options_pages = array();\r\n\t\t\tif ( empty( $options_pages ) )\r\n\t\t\t\t$options_pages = self::get_pages( $number, 'page' );\r\n\t\t\treturn $options_pages;\r\n\t\t}\r\n\r\n\t\telse\r\n\t\t\treturn self::get_pages( $number, 'page' );\r\n\r\n\t}", "title": "" }, { "docid": "07fb68fd0432138aa37f7b2fea1e17b5", "score": "0.5302309", "text": "public function render() {\n $element[] = '<select '.$this->getAttributesAsHTML(array('label', 'validate', 'required', 'options', 'type', 'selected_value')) .'>';\n if (count($this->options) > 0) {\n $arrOptions = array();\n\n foreach ($this->options as $option) {\n $opt = '<option value=\"'.$option['value'].'\"';\n if (is_array($this->selected_value)===TRUE) {\n if (in_array($option['value'], $this->selected_value) === TRUE) {\n $opt .= ' selected=\"selected\"';\n }\n } else {\n if ($this->selected_value == $option['value']) {\n $opt .= ' selected=\"selected\"';\n }\n }\n $opt .= '>'.$option['label'].'</option>';\n $arrOptions[] = $opt;\n unset($opt);\n }\n $element[] = implode(PHP_EOL, $arrOptions);\n }\n $element[] = '</select>';\n return \"\\n\" . implode(PHP_EOL, $element);\n }", "title": "" }, { "docid": "aabda9ec5f2c874ad1d190131ed5a347", "score": "0.5295339", "text": "public function create()\n {\n return \\view('admin.pages.size.create');\n }", "title": "" }, { "docid": "ed9ba0e0ff547031ad78edc5fcbdeeb4", "score": "0.52942693", "text": "function ck_font_field_render() { \n\t\t$options = get_option( 'ck_options_settings' );\n\t\t?>\n\t\t<select name=\"ck_options_settings[ck_font_field]\">\n\t\t\t<option value=\"10px\" <?php if (isset($options['ck_font_field'])) selected( $options['ck_font_field'], \"Dark Blue\" ); ?>>S font size</option>\n\t\t\t<option value=\"20px\" <?php if (isset($options['ck_font_field'])) selected( $options['ck_font_field'], \"white\" ); ?>>M font size</option>\n\t\t\t<option value=\"30px\" <?php if (isset($options['ck_font_field'])) selected( $options['ck_font_field'], \"Dark Pink\" ); ?>>L font size</option>\n\t\t\t<option value=\"40px\" <?php if (isset($options['ck_font_field'])) selected( $options['ck_font_field'], \"Black\" ); ?>>XL font size</option>\n\t\t</select>\n\t<?php\n\t}", "title": "" }, { "docid": "36eac836f2fa3673827ea75eb7153803", "score": "0.5284506", "text": "public function curated_feed_options_render_page() {\n\t\t$options = postmedia_get_curated_feed_options();\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<?php screen_icon(); ?>\n\t\t\t<h2><?php echo get_admin_page_title(); ?></h2>\n\t\t\t<?php settings_errors(); ?>\n\n\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t<?php\n\t\t\t\t\tsettings_fields( 'postmedia_curated_feed_options' );\n\t\t\t\t\tdo_settings_sections( 'postmedia_curated_feed_options' );\n\t\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "fdab2a0a9d46801e498aad846af667dc", "score": "0.52785784", "text": "public function getDetailsPageOptions()\n {\n return Page::sortBy('baseFileName')->lists('baseFileName', 'baseFileName');\n }", "title": "" }, { "docid": "92826e13398e719f25b6d667085ab5ca", "score": "0.52716637", "text": "public function render()\n\t{\n\t\t$this->calculate();\n\t\treturn $this->build_html_pagination();\n\t}", "title": "" }, { "docid": "2f2d6adc29836dd5763aef5888ef0a06", "score": "0.5264037", "text": "static function setPagerBarSize($size){\r\n\t\t$_SESSION[\"Pager\"][\"classSize\"]=intval($size);\r\n\t\tself::_computeValues();\r\n\t}", "title": "" }, { "docid": "17c0a6f90aaf465fbeae5d027cf88c5b", "score": "0.52574617", "text": "public function getPagingHTMLByNum($intCurrPage, $intResultsInOnePage, $intTotalResult, $jsFuncName)\n\t{\n\t\t//echo 'current: '.$intCurrPage;\n\t\tif ($intTotalResult<=$intResultsInOnePage)\n\t\t\treturn \"\";\n\t\t$strPages = \"<div class='paging-dropdown'>\";\n\t\t$strPages .= \"<input type=\\\"hidden\\\" id=\\\"txtPage\\\" name=\\\"txtPage\\\" value=\\\"\".($intCurrPage?$intCurrPage:1).\"\\\" />\";\n\t\t//$strPages .= \"\\n<b>Page &nbsp;&nbsp;</b>\";\n\t\t$i = $intCurrPage;\t\n\t\t$intMaxPages = ceil($intTotalResult/$intResultsInOnePage);\n\t\t\n\t\t// previous\n\t\tif($intCurrPage > 1)\n\t\t{\n\t\t\t$strPages.= \"<a href='javascript:$jsFuncName(1);' >First</a>\" . \"&nbsp;&nbsp;&nbsp;&nbsp;\";\n\t\t\t$strPages.= \"<a href='javascript:$jsFuncName(\". ($intCurrPage - 1) .\");' >Prev</a>\" . \"&nbsp;&nbsp;\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$strPages.= \"\\nFirst &nbsp;&nbsp; Prev &nbsp;&nbsp;\";\n\t\t}\n\t\t//page\n\t\t$strPages.= \"<select id=\\\"txtCurrPage\\\" name=\\\"txtCurrPage\\\" onchange=\\\"$jsFuncName(this.value);\\\" style=\\\"width:50px; margin-left:20px;\\\"> \";\n\t\t$i = 1;\n\t\twhile($i <= $intMaxPages && ($i - 1) * $intResultsInOnePage < $intTotalResult)\n\t\t{\t\t\t\t\n\t\t\tif($intCurrPage == $i)\n\t\t\t{\n\t\t\t\t$strPages.= \"<option value=\\\"$i\\\" selected=\\\"selected\\\">\".$i.\"</option>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$strPages.= \"<option value=\\\"$i\\\">\".$i.\"</option>\";\n\t\t\t}\n\t\t\t\n\t\t\t$i++;\n\t\t}\n\t\t$strPages.= \"</select> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;\";\n\t\t//last\n\t\tif($intCurrPage < $intMaxPages)\n\t\t{\n\t\t\t$strPages.= \"<a href='javascript:$jsFuncName(\".($intCurrPage + 1).\");' >Next</a>\" . \"&nbsp;&nbsp;&nbsp;&nbsp;\";\n\t\t\t$strPages.= \"<a href='javascript:$jsFuncName(\".$intMaxPages.\");' >Last</a>\" . \"&nbsp;&nbsp;\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$strPages.= \"Next &nbsp;&nbsp; Last &nbsp;&nbsp;\";\n\t\t}\n\t\t$strPages .= \"</div>\";\n\t\t/*\n\t\t$strPages.= \"<b> Of Total Page: $intMaxPages &nbsp;&nbsp;Start Row: \";\n\t\t$strPages.= ((($intCurrPage-1)*$intResultsInOnePage)+1).\"&nbsp;====>&nbsp;\";\n\t\t$strPages.= (($intCurrPage*$intResultsInOnePage)>$intTotalResult)?$intTotalResult:($intCurrPage*$intResultsInOnePage);\n\t\t$strPages.= \" Of Total Row: $intTotalResult</b>\";\n\t\t*/\n\t\treturn $strPages;\n\t}", "title": "" }, { "docid": "ecbefb1c76a2d7b815ffef59f9015e3b", "score": "0.5256686", "text": "public function getSizechart()\n {\n\t\t$result['data']=$this->AdminModel->getSizechart();\n\t\t$this->load->view('admin_sizechart',$result);\n\t}", "title": "" }, { "docid": "4318d31890fdd75993ee59210360bdde", "score": "0.5254534", "text": "function paging_part_2($ajax=false, $lu_paging=false, $upper_br, $lower_br, $type=\"1\"){\n // (4) display paging line\n $text = \"\";\n // $param1 = \"document.getElementById('hdnProvince').value\";\n // $param2 = \"document.getElementById('selCity').value\"; \n // $param6 = \"'1'\";\n// $param7 = \"'asc'\"; \n// $onClick = \"onClick=\\\"xajax_fillDepartments($param1, $param2, $param6, $param7, $this->page_current, $this->req_page_size); return false; \\\"\";\n if($this->pages_total > 1){\n $href_string = $this->combine_url(\"view\");\n $this->setUrlStringSorting($href_string);\n $this->setUrlStringFiltering($href_string); \n $text .= \"<script type='text/JavaScript'>\";\n $text .= \"function setPageSize\".$type.\"(){document.location.href = '$href_string&page_size='+document.frmPaging$this->unique_extention\".$type.\".page_size\".$type.\".value;}\";\n $text .= \"</script>\";\n $href_string .= \"&page_size=\".$this->req_page_size;\n $text .= \"<form name='frmPaging$this->unique_extention\".$type.\"'>\";\n if($lu_paging['results'] || $lu_paging['pages'] || $lu_paging['page_size']) if($upper_br) $text .= \"\"; //<br>\n $text .= \"<table dir='\".$this->direction.\"' align='\".$this->tblAlign[$this->mode].\"' width='\".$this->tblWidth[$this->mode].\"' border='0' >\";\n $text .= \"<tr><td align='\".$lu_paging['results_align'].\"' nowrap>\";\n if($lu_paging['results']){\n $text .= \"&nbsp;Results:&nbsp;\";\n if(($this->page_current * $this->req_page_size) <= $this->rows) $total = ($this->page_current * $this->req_page_size);\n else $total = $this->rows;\n $text .= ($this->page_current * $this->req_page_size - $this->req_page_size + 1).\" - \".$total;\n $text .= \"&nbsp;of about:&nbsp;\";\n $text .= $this->rows;\n $text .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"; \n }\n $text .= \"</td><td align='\".$lu_paging['pages_align'].\"' nowrap>\";\n if($lu_paging['pages']){\n $text .= \"&nbsp;Pages:&nbsp;\";\n $text .= \"&nbsp;<a title='first' class='class_a' style='text-decoration: none;' href='$href_string&p=1'>|<<</a>\";\n if($this->page_current > 1) $text .= \"&nbsp;<a class='class_a' style='text-decoration: none;' title='previous' href='$href_string&p=\".($this->page_current - 1).\"'><<</a>\";\n else $text .= \"&nbsp;<a class='class_a' style='text-decoration: none;' title='previous' href='$href_string&p=\".$this->page_current.\"'><<</a>\";\n $text .= \"&nbsp;\";\n $low_window_ind = $this->page_current - 3;\n $high_window_ind = $this->page_current + 3;\n if($low_window_ind > 1){ $start_index = $low_window_ind; $text .= \"...\"; }\n else $start_index = 1;\n if($high_window_ind < $this->pages_total) $end_index = $high_window_ind;\n else $end_index = $this->pages_total;\n for($ind=$start_index; $ind <= $end_index; $ind++){\n if($ind == $this->page_current) $text .= \"&nbsp;<a class='class_a' style='text-decoration: underline;' title='current' href='$href_string&p=\".$ind.\"'><b><u>\" . $ind . \"</u></b></a>\";\n else $text .= \"&nbsp;<a class='class_a' style='text-decoration: none;' href='$href_string&p=\".$ind.\"'>\".$ind.\"</a>\";\n if($ind < $this->pages_total) $text .= \",&nbsp;\";\n else $text .= \"&nbsp;\";\n }\n if($high_window_ind < $this->pages_total) $text .= \"...\";\n if($this->page_current < $this->pages_total) $text .= \"&nbsp;<a class='class_a' style='text-decoration: none;' title='next' href='$href_string&p=\".($this->page_current + 1).\"'>>></a>\";\n else $text .= \"&nbsp;<a class='class_a' style='text-decoration: none;' title='next' href='$href_string&p=\".$this->page_current.\"'>>></a>\";\n $text .= \"&nbsp;<a class='class_a' style='text-decoration: none;' title='last' href='$href_string&p=\".$this->pages_total.\"'>>>|</a>\";\n }\n $text .= \"</td><td align='\".$lu_paging['page_size_align'].\"' nowrap>\"; \n if($lu_paging['page_size']){\n $text .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"; \n $text .= \"&nbsp;Page size:&nbsp;\"; \n $text .= \"<select name='page_size\".$type.\"' onChange='setPageSize\".$type.\"()'>\"; \n $text .= \"<option value='10' \"; if($this->req_page_size == 10) $text .= \"selected\"; $text .= \">10</option>\";\n $text .= \"<option value='25' \"; if($this->req_page_size == 25) $text .= \"selected\"; $text .= \">25</option>\";\n $text .= \"<option value='50' \"; if($this->req_page_size == 50) $text .= \"selected\"; $text .= \">50</option>\";\n $text .= \"<option value='100' \"; if($this->req_page_size == 100) $text .= \"selected\"; $text .= \">100</option>\";\n $text .= \"<option value='250' \"; if($this->req_page_size == 250) $text .= \"selected\"; $text .= \">250</option>\";\n $text .= \"<option value='500' \"; if($this->req_page_size == 500) $text .= \"selected\"; $text .= \">500</option>\";\n $text .= \"<option value='1000' \"; if($this->req_page_size == 1000) $text .= \"selected\"; $text .= \">1000</option>\";\n $text .= \"</select>\";\n }\n $text .= \"</td></tr>\"; \n $text .= \"</table>\";\n $text .= \"</form>\";\n if($lu_paging['results'] || $lu_paging['pages'] || $lu_paging['page_size']) if($lower_br) $text .= \"\"; //<br>\n if($ajax) return $text;\n else echo $text;\n } \n }", "title": "" }, { "docid": "6d3c56580453c8af7aad00ba373b8ae1", "score": "0.52519435", "text": "public function renderWidget()\n {\n $content = '';\n foreach ( $this->params['choices'] as $key => $name )\n {\n if ( $this->getValue() == $key )\n {\n $content .= HtmlToolkit::buildTag( 'option', array(\n 'value' => $key,\n 'selected' => 'selected'\n ), false, $name );\n }\n else\n {\n $content .= HtmlToolkit::buildTag( 'option', array(\n 'value' => $key\n ), false, $name );\n }\n }\n\n return HtmlToolkit::buildTag( 'select', $this->attr, false, $content );\n }", "title": "" }, { "docid": "a73c943d8d6bcdae75bb197b703ae44a", "score": "0.5249949", "text": "function order_select_list( $count ) {\n\t\t$form = '';\n\t\tfor( $q = 1; $q <= 127; $q++ ) {\n\t\t\tif( $q == $count ) {\n\t\t\t\t$form .= '<option value=\"'.$q.'\" selected=\"selected\"> '.$q.' </option>\n\t\t\t\t\t\t\t\t\t\t';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$form .= '<option value=\"'.$q.'\"> '.$q.' </option>\n\t\t\t\t\t\t\t\t\t\t';\n\t\t\t}\n\t\t}\n\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "e853afc19c7463eb7288006aa01c0444", "score": "0.5244885", "text": "function class_amount ()\n {\n echo '<select name=\"classamount\" style=\"width: 145px;\" id=\"specialboxes\">\n\t<option value=\"0\" style=\"color: gray;\">( amount )</option>';\n $i = 1;\n while ($i < 51)\n {\n print '' . '<option value=' . $i . '>' . $i . ' GB</option>\n';\n ++$i;\n }\n\n echo '</select>';\n }", "title": "" }, { "docid": "b9f8a099735cb0ec3ff02ba56acbc139", "score": "0.5220621", "text": "public function render()\n {\n return view('components.select-list');\n }", "title": "" }, { "docid": "029f7dfc547c9657a66d9da154b07c0d", "score": "0.5219819", "text": "public function index()\n {\n //\n $packageoptions = PackageOption::latest()->paginate(5);\n return view('admin.package-options.index',compact('packageoptions'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "f28bdca220c1cedcb5568068c48d2cea", "score": "0.52121913", "text": "function getPageList($cp){\r\n\t\t\t$str=\"\";\r\n\t\t\t$strq=\"\";\r\n\t\t\t$pos =0;\r\n\t\t\t$np=ceil($cp/$this->maxnumpage);\r\n\t\t\t$self = $_SERVER['PHP_SELF'];\r\n\t\t\t$parametri=$_SERVER['QUERY_STRING'];\r\n\t\t\t$spar=\"\";\r\n\t\t\t$lenstr = 0;\r\n\t\t\tif ($parametri!=\"\"){\r\n\t\t\t\t$arr=split(\"&\",$parametri);\r\n\t\t\t\t$spar=\"\";\r\n\t\t\t\tif (sizeof($arr)>1){\r\n\t\t\t\t\t$newindex=1;\r\n\t\t\t\t\tif (substr($arr[0],0,4)==\"page\")\r\n\t\t\t\t\t\t$newindex=2;\r\n\t\t\t\t\t$spar=$arr[$newindex-1];\r\n\t\t\t\t\tfor ($i=$newindex;$i<sizeof($arr);$i++)\r\n\t\t\t\t\t\t$spar=$spar.\"&\".$arr[$i];\r\n\t\t\t\t}\r\n\t\t\t\telseif ((sizeof($arr)==1)and(substr($arr[0],0,4)!=\"page\"))\r\n\t\t\t\t\t$spar=$arr[0];\r\n\t\t\t}\r\n\t\t\tif($spar!=\"\")\r\n\t\t\t\t$spar=\"&\".$spar;\r\n\t\t\t\r\n\t\t\tif ($cp<=($this->maxnumpage*$np)){\r\n\t\t\t\t$from=(($this->maxnumpage*$np)-$this->maxnumpage)+1;\r\n\t\t\t\tif ($np*$this->maxnumpage<=$this->numpage)\r\n\t\t\t\t\t$to=$np*$this->maxnumpage;\r\n\t\t\t\telse\r\n\t\t\t\t\t$to=$this->numpage;\r\n\t\t\t}\r\n\t\t\tif (($cp!=1) && ($np!=1))\r\n\t\t\t\t$str=\"<a href=\\\"$self?page=1$spar\\\"> <<</a> <a href=\\\"$self?page=\".($from-1).\"$spar\\\"> <</a>\".$str;\r\n\t\t\t\t\r\n\t\t\tfor ($i=$from;$i<=$to;$i++)\r\n\t\t\t\tif ($i!=$cp)\r\n\t\t\t\t\t$str=$str.\" \".\"<a href=\\\"$self?page=$i$spar\\\">\".$i.\"</a>\";\r\n\t\t\t\telse\r\n\t\t\t\t\t$str=$str.\" <span id='select'>\".$i.\"</span>\";\r\n\t\t\t\t\r\n\t\t\tif ($to<$this->numpage)\r\n\t\t\t\t$str=$str.\" <a href=\\\"$self?page=\".($to+1) .\"$spar\\\"> ></a> <a href=\\\"$self?page=\".$this->numpage.\"$spar\\\">>> </a>\";\r\n\r\n\t\t\treturn $str;\r\n\t\t}", "title": "" }, { "docid": "c8697911ee24f607301173983f8f0252", "score": "0.5205898", "text": "function paginated($page_size=null) {\n if ($page_size) {\n $this->_options['page_size'] = $page_size;\n }\n\n $this->_paginate = true;\n $this->_sql = null;\n return $this;\n }", "title": "" }, { "docid": "e1c402585038061f60326b784bb409c4", "score": "0.51993173", "text": "function slider_pager()\n{\n\t$options = get_option( 'bx_slider_options' );\n\t$slider_pager = $options['slider_pager'];\n\t/* Echo the field. */\n\techo \"<select id='slider_pager' name='bx_slider_options[slider_pager]'>\";\n\techo '<option value=\"true\" ' . selected( $slider_pager, 'true', false ) . ' >' . __( 'True', 'bx-slider' ) . '</option>';\n\techo '<option value=\"false\" ' . selected( $slider_pager, 'false', false ) . ' >' . __( 'False', 'bx-slider' ) . '</option>';\n\techo '</select>'; \n\t?><span class=\"description\"><?php _e( 'If true, a pager will be added', 'bx-slider' ); ?></span><?php\n}", "title": "" }, { "docid": "a24396b8d5b183118c8bba2eed8ccf88", "score": "0.5197979", "text": "public function index()\n {\n $sizes = ProductSize::latest()->paginate(6);\n return view('admin.pages.Store Section.Size.index', compact('sizes'));\n }", "title": "" }, { "docid": "9e4201b86863a0e5c8b8e33529016001", "score": "0.51953757", "text": "public function buildPagination() {\n $pagination = $this->discuss->hooks->load('pagination/build',array(\n 'count' => !empty($this->list) ? $this->list['total'] : 0,\n 'id' => $this->board->get('id'),\n 'view' => 'board',\n 'limit' => $this->list['limit'],\n 'param' => $this->modx->getOption('discuss.page_param',$this->scriptProperties,'page'),\n 'showPaginationIfOnePage' => $this->getOption('showPaginationIfOnePage',true,'isset'),\n ));\n $this->setPlaceholder('pagination',$pagination);\n }", "title": "" }, { "docid": "7f35be5ee6f42d67235b85d6f6aff2f9", "score": "0.51906943", "text": "function list_display_limiter(){\n\treturn array(\n\t\"10\" => \"10\",\n\t\"30\" => \"30\",\n\t\"50\" => \"50\",\n\t\"100\" => \"100\",\n\t\"150\" => \"150\",\n\t\"200\" => \"200\");\n}", "title": "" }, { "docid": "52218d17efa3f227f618205701015ad1", "score": "0.51874423", "text": "public function setting_dropdown_fn() {\n\t\t$options = get_option('plugin_options');\n\t\t$items = array(\"1 Month\", \"2 Months\", \"3 Months\", \"4 Months\", \"5 Months\", \"6 Months\", \"7 Months\", \"8 Months\", \"9 Months\", \"10 Months\", \"11 Months\", \"1 Year\");\n\t\techo \"<select id='drop_down1' name='plugin_options[dropdown1]'>\";\n\t\tforeach($items as $item) {\n\t\t\t$selected = ($options['dropdown1']==$item) ? 'selected=\"selected\"' : '';\n\t\t\techo \"<option value='$item' $selected>$item</option>\";\n\t\t}\n\t\techo \"</select>\";\n\t}", "title": "" }, { "docid": "9b0e1ae4ec06e1e5e6c9ffa4a4bb30f2", "score": "0.5186498", "text": "function LimitBox($name='LimitBox',$option='',$link=false) {\n\t\t// if data is empty return nothing\n\t\tif ($this->total == 0 || $this->limit == 0)\n\t\t\treturn '';\n\t\t\n\t\t// Only if limit shown on URL\n\t\tif ($this->show_limit) {\n\t\t\t// page options\n\t\t\tfor($o=0;$o<$this->total_page;$o++){\n\t\t\t\t$options[($o+1)] = ($o+1);\n\t\t\t}\n\t\t\t\n\t\t\t// if total data less than or equal 200 or data limit is 200 that's mean show all\n\t\t\t//if ($this->total <= 200 || $this->limit == 200)\n\t\t\t\t//$options[200] = 'ALL';\n\t\t\t\n\t\t\t// set new option if the given limit is not on the list\n\t\t\t//if (!in_array($this->limit, $options) && $this->limit != 200)\n\t\t\t\t//$options[$this->limit] = $this->limit;\n\t\t\t\n\t\t\t$plus='';\n\t\t\tif($link){\n\t\t\t\t// make sure the last character of link is /\n\t\t\t\t$link = base_url().rtrim($link, '/').'/';\n\t\t\t\t$plus = 'onchange=\"window.location=\\''.$link.PAGENAV_PAGE.'/\\' + this.value;\"';\n\t\t\t}\n\t\t\t$plus .=' page=\"'.PAGENAV_PAGE.'\"';\n\t\t\t\n\t\t\t$output = form_dropdown($name,$options,$this->curpage,$plus.' '.$option);\n\t\t\t\n\t\t\treturn $output;\n\t\t}\n\t\t\n\t\treturn '';\n\t}", "title": "" }, { "docid": "037c9526f14aadf899f8d25274c41ccd", "score": "0.51843554", "text": "function woocommerce_products_per_page_dropdown_get_fix(){\n\t$method = in_array( get_option( 'wppp_method', 'post' ), array( 'post', 'get' ) ) ? get_option( 'wppp_method', 'post' ) : 'post';\n\n\tif($method === 'get'){\n\t\t$filters = $_GET;\n\t\tif(isset($filters) && !empty($filters)){\n\t\t\tforeach($filters as $key => $value){\n\t\t\t\tif(substr($key, 0, 6) === 'filter') {\n\t\t\t\t\techo '<input type=\"hidden\" name=\"'.$key.'\" value=\"'.$value.'\">';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "7a8ad1f6fb37c591ef2f1d656c3c1cac", "score": "0.51823986", "text": "public function index()\n {\n $sizes = Size::all();\n\n return view('admin.pages.size.index',compact('sizes'));\n }", "title": "" }, { "docid": "64ec3f131e757166d44f2bfd78bc70aa", "score": "0.5180948", "text": "public function home_page_options_render_page() {\n\t\t$options = postmedia_get_home_page_options();\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<?php screen_icon(); ?>\n\t\t\t<h2><?php echo get_admin_page_title(); ?></h2>\n\t\t\t<?php settings_errors(); ?>\n\n\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t<?php\n\t\t\t\t\tsettings_fields( 'postmedia_home_page_options' );\n\t\t\t\t\tdo_settings_sections( 'postmedia_home_page_options' );\n\t\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "bf7371058a717a173eae68d878e16aa5", "score": "0.5174139", "text": "function blog_options() {\n ?>\n <div class=\"tab-container clearfix\">\n <ul class='etabs clearfix'>\n <li class=\"tab\"><a href=\"#tabs-layout\"><i class=\"fa fa-server\"></i><?php _e('Layout', 'creativ'); ?></a></li>\n </ul>\n <div class='panel-container'>\n <div id=\"tabs-layout\">\n <?php\n zo_options(array(\n 'id' => 'blog_layout',\n 'label' => __('Layout', 'creativ'),\n 'type' => 'select',\n 'options' => array(\n '' => 'Default',\n 'style1' => 'Full width',\n )\n ));\n ?>\n </div>\n </div>\n </div>\n <?php\n }", "title": "" }, { "docid": "6ebdbe4e36df39e9742b5c25549094d3", "score": "0.5165148", "text": "function _display_dropdown(){\n\t\t$data['query'] = $this-> get('id');\n\t\t$this->load->view('Display_dropdown', $data);\n\t}", "title": "" }, { "docid": "ca1d47788617b53359a2c4e721bee83c", "score": "0.5164715", "text": "function setPageSize($value)\n {\n $this->_pageSize = $value;\n }", "title": "" }, { "docid": "1fe403516d2a66369a6ed46195910b89", "score": "0.5159769", "text": "function dropdown($element_name,$current_value, $max_value)\n{\n\tglobal $onchange;\n\t$i = $current_value;\n\t$dropdownvar = \"<select size='1' name='$element_name'\";\n\t$dropdownvar = \"$dropdownvar ONCHANGE=\\\"countTotal()\\\">\\n\";\n\twhile ($i <= $max_value)\n\t{\n\t\tif ($current_value == $i)\n\t\t{\n\t\t\t$dropdownvar = \"$dropdownvar\t\t<option value='$i' selected>$i</option>\\n\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$dropdownvar = \"$dropdownvar\t\t<option value='$i'>$i</option>\\n\";\n\t\t}\n\t\t$i++;\n\t}\n\t$dropdownvar = \"$dropdownvar\t </select>\\n\";\n\treturn $dropdownvar;\n}", "title": "" }, { "docid": "d372df13950a4a6026dabbf3b59b672d", "score": "0.5156382", "text": "function get_page_size()\n\t{\n\t\t//default from the config\n\t\t$limit=($this->config->item(\"catalog_records_per_page\")===FALSE) ? 15 : $this->config->item(\"catalog_records_per_page\");\n\n\t\t//check from querystring\n\t\t$ps=(int)$this->input->get_post(\"ps\");\n\n\t\tif (is_numeric($ps))\n\t\t{\n\t\t\t$limit=$ps;\n\t\t}\n\n\t\t//check cookie\n\t\tif(is_numeric($cookie_ps=$this->input->cookie('ps',TRUE)))\n\t\t{\n\t\t\t$limit= $cookie_ps;\n\t\t}\n\n\t\tif (!is_numeric($limit) || $limit<=0)\n\t\t{\n\t\t\treturn 15;\n\t\t}\n\n\t\t//set max size limit\n\t\tif($limit>50000)\n\t\t{\n\t\t\treturn 50000;\n\t\t}\n\n\t\treturn $limit;\n\t}", "title": "" }, { "docid": "af1ff15b725375d7fe9038f1ad46343f", "score": "0.514992", "text": "protected function _getViewListSize()\n {\n return $this->_getUserDefListSize();\n }", "title": "" }, { "docid": "7ece2ed858af15624127be1ee3355e01", "score": "0.51489234", "text": "protected function dropDownList()\n {\n echo $this->getLabel();\n echo '<div class=\"controls\">';\n echo $this->getPrepend();\n echo $this->form->dropDownList($this->model, $this->attribute, $this->data, $this->htmlOptions);\n echo $this->getAppend();\n echo $this->getError() . $this->getHint();\n echo '</div>';\n }", "title": "" }, { "docid": "35e3a24603e98d72389a2522c3bd4a96", "score": "0.5148389", "text": "function renderNumericOptions($min, $max) {\n $options = \"\";\n\n for ($i = $min; $i <= $max; $i++) {\n if ($i < 10) { $i = \"0\" . strval($i); }\n $options .= \"<option value=\\\"{$i}\\\">{$i}</option>\";\n if ($i != $max) {\n $options .= \"\\n\\t\\t\\t\\t\\t\";\n }\n }\n\n return $options;\n}", "title": "" }, { "docid": "3b7dc4a427890a0ff58cbcf0ae02e698", "score": "0.5146368", "text": "public function index()\n {\n return view('admin.product_accessories.size.index')\n ->with('sizes', SysProductSize::all());\n }", "title": "" }, { "docid": "e3c03cdf92568c0955ebcf37fa76723e", "score": "0.5137482", "text": "protected function getOptions()\r\n\t{\r\n\t\t$sizes = array();\r\n\t\t$sizes[] = JHTML::_('select.option', 'input-mini');\r\n\t\t$sizes[] = JHTML::_('select.option', 'input-small');\r\n\t\t$sizes[] = JHTML::_('select.option', 'input-medium');\r\n\t\t$sizes[] = JHTML::_('select.option', 'input-large');\r\n\t\t$sizes[] = JHTML::_('select.option', 'input-xlarge');\r\n\t\t$sizes[] = JHTML::_('select.option', 'input-xxlarge');\r\n\t\t$sizes[] = JHTML::_('select.option', 'input-block-level');\r\n\t\t$sizes[] = JHTML::_('select.option', 'span1');\r\n\t\t$sizes[] = JHTML::_('select.option', 'span2');\r\n\t\t$sizes[] = JHTML::_('select.option', 'span3');\r\n\t\t$sizes[] = JHTML::_('select.option', 'span4');\r\n\t\t$sizes[] = JHTML::_('select.option', 'span5');\r\n\t\t$sizes[] = JHTML::_('select.option', 'span6');\r\n\t\t$sizes[] = JHTML::_('select.option', 'span7');\r\n\t\t$sizes[] = JHTML::_('select.option', 'span8');\r\n\t\t$sizes[] = JHTML::_('select.option', 'span9');\r\n\t\t$sizes[] = JHTML::_('select.option', 'span10');\r\n\t\t$sizes[] = JHTML::_('select.option', 'span11');\r\n\t\t$sizes[] = JHTML::_('select.option', 'span12');\r\n\r\n\t\treturn $sizes;\r\n\t}", "title": "" }, { "docid": "e2c192f7acc552e48bb81edca05403fb", "score": "0.51293975", "text": "public function orderOptionsAction() {\n $this->loadLayout();\n $this->renderLayout();\n }", "title": "" }, { "docid": "9ac6f2330c63a67b2c784cdbc174f122", "score": "0.51290494", "text": "public function drawSelect(){\n $clCarrera = new carrera();\n $data = $clCarrera->getList();\n \n $options = array();\n \n foreach ($data as $item){\n $options[] = array( 'value' => $item['carrera'],\n 'selected'=> '0',\n 'label' => $item['nombre'],\n );\n }\n \n if ( isset($options) ){\n \n $clControl = new inputSelect('lsCarrera');\n $html = $clControl->draw($options);\n }\n return $html;\n }", "title": "" }, { "docid": "d99f7171b817ddcd539fb3b571b8897f", "score": "0.5128627", "text": "public function set_vlv_page($page, $size = 10)\n {\n $this->list_page = $page;\n $this->page_size = $size;\n }", "title": "" }, { "docid": "df0a6970b4a098db3fdd94fb749b8612", "score": "0.5113293", "text": "function uri_pages_options(){\n\t$path = GSDATAPAGESPATH;\n\t$dir_handle = @opendir($path) or die('Unable to open ' . $path);\n\t$filenames = array();\n\twhile ($filename = readdir($dir_handle)) {\n\t\t$filenames[] = $filename;\n\t}\n\tclosedir($dir_handle);\n\n\t$pagesArray = array();\n\t$count = 0;\n\tif (count($filenames) != 0) {\n\t\tforeach ($filenames as $file) {\n\t\t\tif ($file == '.' || $file == '..' || is_dir($path . $file) || $file == '.htaccess') {\n\t\t\t\t// not a page data file\n\t\t\t} else {\n\t\t\t\t$data = getXML($path . $file);\n\t\t\t\tif ($data->private != 'Y') {\n\t\t\t\t\t$pagesArray[$count]['parent'] = $data->parent;\n\t\t\t\t\t$pagesArray[$count]['title'] = stripcslashes($data->title);\n\t\t\t\t\t$pagesArray[$count]['url'] = $data->url;\n\t\t\t\t\t$pagesArray[$count]['sort'] = $data->parent .' - '. stripcslashes($data->title);\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Sort the pagesArray by the 'sort' key created above\n\t$pagesSorted = subval_sort($pagesArray,'sort');\n\t\n\t//Need to sort by title within each parent here.\n\t\n\t$options = '<option value=\"\">-'. i18n_r('uri_redirect_plus/SELECT_PAGE') .'-</option>';\n\tforeach ($pagesSorted as $page) {\n\t\t$options .= '<option value=\"' . $page[title] . '|||' . $page[url] . '|||' . $page[parent] . '\">';\n\t\tif ($page['parent'] != '') {\n\t\t\t$options .= $page[parent];\n\t\t}\n\t\t$options .= ' - '. $page[title] . '</option>';\n\t}\n\techo $options;\n}", "title": "" }, { "docid": "ed4b0ab60850d43e28afe81a33cb6f72", "score": "0.5109322", "text": "public function \\Wh::getPagesize()\n {\n return $this->page_size;\n }", "title": "" }, { "docid": "a337162c419a4a1d71b44f8aa40ced76", "score": "0.5106996", "text": "public function renderPagesForm()\n {\n $pages = $this->loadConfigPages();\n echo $this->twig->render('admin/project_config_pages.twig', array(\n \"projectSlug\" => _PROJECT_SLUG_,\n \"pages\" => $pages\n ));\n }", "title": "" }, { "docid": "318e71f23174b47ede70622362e50e08", "score": "0.51064605", "text": "public function renderPager();", "title": "" }, { "docid": "e0233032da79646d16a50454ad74998a", "score": "0.51000696", "text": "protected function getOptions()\n {\n return apply_filters(\n 'fp_page_format_options',\n array(\n array(\n \"label\" => \"Default\",\n \"value\" => \"default\",\n ),\n array(\n \"label\" => \"Section\",\n \"value\" => \"section\",\n ),\n array(\n \"label\" => \"Non-Menu\",\n \"value\" => \"nonmenu\"\n )\n )\n );\n }", "title": "" }, { "docid": "989eec8a0ab2c98193bcbef2beb2ec06", "score": "0.5097578", "text": "function Paginate($delta,$page,$size,$searchTag,$bottomPart){\n$pageIterator = new Paginator($delta,$page,$size,$searchTag);\n\n$cur_page_number = $pageIterator->getCurrentPageNumber();\n$itemsQuantity = $pageIterator->getItemsQuantity();\n$delta = $pageIterator->getDelta();\n$total_pages = $itemsQuantity/$delta+1;\n\n\t$beg_itemNumber = ($cur_page_number - 1) * $delta + 1;\n\tif ($beg_itemNumber + $delta > $itemsQuantity){\n\t\t$end_itemNumber = $itemsQuantity + 1;\n\t}else{\n\t\t$end_itemNumber = $beg_itemNumber + $delta;\n\t}\n?>\n\n<div class=\"ui-paginator\">\n\t<div class=\"pag-header\"> <!--navbar-fixed-top-->\n\t<?php if (!$bottomPart) \n\t{ ?>\n\t\t\t<div class=\"search-tag\">\n\t\t\t\t<span>\n\t\t\t\t\t<?php echo $pageIterator->getSearchTag().\" (\".$itemsQuantity.\")\";?>\t\t\t\t\t\n\t\t\t\t</span>\n\t\t\t</div><?php\n\t} ?>\n\t\t\t<div class=\"pag-header-menu\">\n\t\t\t<form class=\"pag-form\">\n\t\t\t\t<select size=\"1\" name=\"delta\" class=\"pag-delta\" style=\"visibility:hidden;\">\n\t\t\t\t\t<option>10</option>\n\t\t\t\t\t<option>25</option>\n\t\t\t\t\t<option>50</option>\n\t\t\t\t\t<option>100</option>\n\t\t\t\t</select>\n\t\t\t</form>\n\t\t\n\t\t\t\t<div class=\"pag-numbers\">\n\t\t\t\t\t<?php \n\t\t\t\t\t\techo \"<span style='margin-right:10px;'>с \".$beg_itemNumber.\" по \".$end_itemNumber.\" </span>\";\n\t\t\t\t\t\tif ($cur_page_number < 3)\n\t\t\t\t\t\t\t$beginPageNumber = 1;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$beginPageNumber = $cur_page_number -2 ;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t/*if ($cur_page > 1){\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<a href=\"<?php echo \"/\".($beginPageNumber-1); ?>\"> < Prev </a>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}*/\n\t\t\t\t\t\t$count_params = explode('/',$_GET[\"param\"]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$params = urldecode($_SERVER['REQUEST_URI']);//$_GET[\"param\"];\n\t\t\t\t\t\tif (count($count_params) > 2){\n\t\t\t\t\t\t\t$temp_slash_pos = strrpos($params, '/', -1);\n\t\t\t\t\t\t\t$cur_page = substr($params, 0, $temp_slash_pos);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$temp_slash_pos = count($params);\n\t\t\t\t\t\t\t$cur_page = $params;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor ($i = max(1, $beginPageNumber - 2) ; $i <= min($beginPageNumber + 5, $total_pages ); $i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( $cur_page_number == $i ){\n\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<span>\n\t\t\t\t\t\t\t\t<?php echo $i;?>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$next_page = $cur_page.\"/\".$i;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( $i == 1 ){\n\t\t\t\t\t\t\t\t$next_page = $cur_page;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<a href=\"<?php echo $next_page?>\"> <?php echo $i;?> </a>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*\n\t\t\t\t\t\tif ($cur_page +1 <= $itemsQuantity/$delta){\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<a href=\"<?php echo $ROOT.\"/\".$next_page?>\"> > Next </a>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t\t*/\n\t\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t</div>\n</div>\n<?php\n}", "title": "" }, { "docid": "e428411e2a597eeede9bc9cf74794485", "score": "0.5095756", "text": "function renderFullNav($Start,$PerPage) {\r\n\t\tif ($this->page == 0)\r\n\t\t\t$PerPageFrom = 1;\r\n\t\telse\r\n\t\t\t$PerPageFrom = ($Start+1);\r\n\t\t\r\n\t\tif($this->page == 0) {\r\n\t\t\t$col = '#212121';\r\n\t\t} else {\r\n\t\t\t$col = '#428bca';\r\n\t\t}\r\n\t\t\r\n\t\tif (($this->page+1) == $this->max_pages) {\r\n\t\t\t$PerPageTo = $this->total_rows;\r\n\t\t\t$col1 = '#212121';\r\n\t\t} else {\r\n\t\t\t$PerPageTo = $PerPageFrom+$PerPage-1;\r\n\t\t\t$col1 = '#428bca';\r\n\t\t}\r\n\r\n\t\tif($_SESSION['supMenu'] == 5) {\r\n\t\t\t$typePage = \"files\";\r\n\t\t} else { \r\n\t\t\t$typePage = \"results\";\r\n\t\t}\t\r\n\t\t\r\n\t\tif ($this->max_pages == 1) {\r\n\t\t\tif($this->total_rows > 0) {\r\n\t\t\t\t$intPerPage ='<div class=\"col-lg-12\">';\r\n\t\t\t\t$intPerPage.='<div class=\"col-lg-6\">';\r\n\t\t\t\t$intPerPage.=\"<table width='100%' border='0' cellspacing='0' cellpadding='0' align='right'><tr><td class='admin_href_txt1' style='font-size: 13px;color:#212121;' nowrap width='10%' >\"; // align=left\r\n\t\t\t\t$intPerPage.=\"&nbsp;\".\"Showing $PerPageFrom to $PerPageTo of \".$this->total_rows.' '.$typePage;\r\n\t\t\t\t$intPerPage.=\"</td>\";\r\n\t\t\t\t$intPerPage.=\"</tr>\";\r\n\t\t\t\t$intPerPage.=\"</table>\";\r\n\t\t\t\t$intPerPage.='</div><div class=\"col-lg-6\">';\r\n\t\t\t\t/*$intPerPage.=\"<table border='0' cellspacing='0' cellpadding='0' align='right' class='table-bordered' style='font-size:16px;'><tr><td>\";\r\n\t\t\t\t$intPerPage.= '<ul style=\"float: left; list-style-type: none; margin:0px!important; padding:0px !important;\">';\r\n\t\t\t\t$intPerPage.= $this->renderNav(); \r\n\t\t\t\t$intPerPage.= '</ul>';\r\n\t\t\t\t$intPerPage.=\"</td></tr></table>\";*/\r\n\t\t\t\t$intPerPage.='</div>';\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif($this->total_rows > 0) {\r\n\t\t\t\t$intPerPage ='<div class=\"col-lg-12\">';\r\n\t\t\t\t$intPerPage.='<div class=\"col-lg-6\">';\r\n\t\t\t\t$intPerPage.=\"<table width='100%' border='0' cellspacing='0' cellpadding='0' align='right'><tr><td style='font-size: 13px;color:#212121;' class='admin_href_txt1' nowrap width='10%' >\"; // align=left\r\n\t\t\t\t$intPerPage.=\"&nbsp;\".\"Showing $PerPageFrom to $PerPageTo of \".$this->total_rows.' '.$typePage;\r\n\t\t\t\t$intPerPage.=\"</td>\";\r\n\t\t\t\t$intPerPage.=\"</tr>\";\r\n\t\t\t\t$intPerPage.=\"</table>\";\r\n\t\t\t\t$intPerPage.='</div><div class=\"col-lg-6\">';\r\n\t\t\t\t$intPerPage.=\"<table border='0' cellspacing='0' cellpadding='0' align='right' style='font-size:16px;'><tr><td>\";\r\n\t\t\t\t$intPerPage.='<div>';\r\n\t\t\t\t$intPerPage.= '<ul style=\"float: left; list-style-type: none; margin:0px!important; padding:0px !important;\" class=\"pagenav\">';\r\n\t\t\t\tif($this->max_pages > 10) {\r\n\t\t\t\t$intPerPage.= '<li style=\"float:left; border-top: 1px solid #ddd; border-left: 1px solid #ddd; border-bottom: 1px solid #ddd; padding: 4px 8px 4px 8px;\">'.$this->renderFirst().'</li>'; \r\n\t\t\t\t}\r\n\t\t\t\t$intPerPage.= '<li style=\"float:left; border-top: 1px solid #ddd; border-left: 1px solid #ddd; border-bottom: 1px solid #ddd; padding: 4px 10px 4px 10px;\">'.$this->renderPrev().'</li>'; \r\n\t\t\t\t$intPerPage.= $this->renderNav(); \r\n\t\t\t\tif($this->max_pages > 10) {\r\n\t\t\t\t\t$intPerPage.= '<li style=\"float:left; border-top: 1px solid #ddd; border-left: 1px solid #ddd; border-bottom: 1px solid #ddd; padding: 4px 10px 4px 10px;\">'.$this->renderNext().'</li>'; \r\n\t\t\t\t\t$intPerPage.= '<li style=\"float:left; border: 1px solid #ddd; padding: 4px 8px 4px 8px;\"\">'.$this->renderLast().'</li>'; \r\n\t\t\t\t} else {\r\n\t\t\t\t\t$intPerPage.= '<li style=\"float:left; border: 1px solid #ddd; padding: 4px 10px 4px 10px;\">'.$this->renderNext().'</li>'; \r\n\t\t\t\t}\r\n\t\t\t\t$intPerPage.= '</ul><br>';\r\n\t\t\t\t$intPerPage.=\"<table border='0' cellspacing='0' cellpadding='0' width='100%' align='right' style='font-size:13px; '><tr><td style='width:50%; color:\".$col.\";'>\";\r\n\t\t\t\tif ($this->page == 0 || $this->page == '') {\r\n\t\t\t\t\t$intPerPage.=\"Start\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$intPerPage.=\"<a href='javascript:ShiftPage(0);'>Start</a>\";\r\n\t\t\t\t}\r\n\t\t\t\t$intPerPage.=\"</td><td align='right' style='color: \".$col1.\";'>\";\r\n\t\t\t\t\r\n\t\t\t\tif($this->max_pages > 0) {\r\n\t\t\t\t\tif (($this->page+1) == $this->max_pages) {\r\n\t\t\t\t\t\t$intPerPage.='End';\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$intPerPage.='<a href=\"javascript:ShiftPage('.($this->max_pages-1).');\" style=\"color:#3c8dbc\">End</a>&nbsp;';\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$intPerPage.= 'End';\r\n\t\t\t\t}\r\n\t\t\t\t//$intPerPage.=\"End\";\r\n\t\t\t\t$intPerPage.=\"</td></tr></table>\";\r\n\t\t\t\t$intPerPage.='</div>';\r\n\t\t\t\t$intPerPage.=\"</td></tr></table>\";\r\n\t\t\t\t$intPerPage.='</div>';\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\treturn $intPerPage;\r\n\t}", "title": "" }, { "docid": "b46d6ca3a1efbb32d4ffb8be8a8ee918", "score": "0.50924385", "text": "public function run()\n\t{\n\t\t/* if(($pageCount=$this->getPageCount())<=1)\n\t\t\treturn;\n\t\t$pages=array();\n\t\tfor($i=0;$i<$pageCount;++$i)\n\t\t\t$pages[$this->createPageUrl($i)]=$this->generatePageText($i);\n\t\t$selection=$this->createPageUrl($this->getCurrentPage());\n\t\techo $this->header;\n\t\techo CHtml::dropDownList($this->getId(),$selection,$pages,$this->htmlOptions);\n\t\techo $this->footer; */\n\t\t\n\t\t$this->registerClientScript();\n\t\t$buttons=$this->createPageButtons();\n\t\t//var_dump($this);exit;\n\t\t//$buttons[] = CHtml::tag('span', array('style'=>'height:25px;width:100px;text-align:center;line-height:25px;margin-left:148px;'),'共'.$this->getPageCount().'页');\n\t\t//$buttons[] = CHtml::tag('span', array('style'=>'height:25px;line-height:25px;margin-left:30px;'), '前往第 '.CHtml::textField('pageNumber', '', array('style'=>'border:1px solid #717071;width:42px;height:21px;text-align:center',)).CHtml::tag('span',array('id'=>'gotoBtn'),'确定').' 页');\n\t\tif(empty($buttons))\n\t\t\t\treturn;\n\t\techo $this->header;\n\t\techo CHtml::tag('div',$this->htmlOptions,implode(\"\\n\",$buttons));\n\t\techo $this->footer;\n\t\t\n\t\t\n\t}", "title": "" } ]
079dce8f6abfd6ffb9a108aba7aa76da
Test sample from RFC.
[ { "docid": "1f9bd24445c648c4e8624422c316f717", "score": "0.5601004", "text": "public function testParseHeaderRfcSample1(): void\n {\n $types = [\n new AcceptMediaType(0, 'audio', '*', null, 0.2),\n new AcceptMediaType(1, 'audio', 'basic'),\n ];\n\n /** @var AcceptMediaTypeInterface[] $types */\n usort($types, AcceptMediaType::getCompare());\n\n $this->checkSorting(\n [\n 'audio/basic',\n 'audio/*',\n ],\n $types\n );\n }", "title": "" } ]
[ { "docid": "24316466995e4087b42053d56d91753b", "score": "0.6205121", "text": "public function testCreateSample()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "4649d3e95524fff97625e7aafcf21a4a", "score": "0.6200465", "text": "public function test_sample() {\n\t\t// Replace this with some actual testing code.\n\t\t$this->assertTrue(true);\n\t}", "title": "" }, { "docid": "264b3503bdfd73eeab27f41b28fac4f2", "score": "0.5898896", "text": "public function testDisplaySample()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "7d981552a944a119a44fb40c244e9d89", "score": "0.5893094", "text": "public function testChallengeRead()\n {\n }", "title": "" }, { "docid": "23ba255631f88aebeb0c10928d747786", "score": "0.58098394", "text": "public function sample ($sample)\n {\n $this->sample = $sample;\n }", "title": "" }, { "docid": "c6f4820a7b08d851fe8f8a8bf6bdaf5c", "score": "0.5688316", "text": "function getSample($length);", "title": "" }, { "docid": "0fa0f8bd213b4ec1cfa540e1dcaada06", "score": "0.56366575", "text": "function testSample() {\n\t\t$this->assertTrue( true );\n\t}", "title": "" }, { "docid": "67667245d484368277657fe19aca5e30", "score": "0.56167597", "text": "function _sample_dispatch() {\n if ($this->has_arg('sid')) $this->_view_sample();\n else $this->_samples();\n }", "title": "" }, { "docid": "9b7c0ce73500487c749bd8461b7b7b79", "score": "0.54804015", "text": "function callSample(): void\n{\n $configLanguageCode = '[LANGUAGE_CODE]';\n\n recognize_sample($configLanguageCode);\n}", "title": "" }, { "docid": "c9469f7c8d179be14883ed80c3e360be", "score": "0.54612094", "text": "public function testGetGs1128TemplateByFilter()\n {\n }", "title": "" }, { "docid": "35fb1c80d5b205179705d67122c6a30c", "score": "0.54216427", "text": "function callSample(): void\n{\n $name = '[NAME]';\n $formattedTopic = SubscriberClient::topicName('[PROJECT]', '[TOPIC]');\n\n create_subscription_sample($name, $formattedTopic);\n}", "title": "" }, { "docid": "6650bf938e3ab95ce52129867d5f149d", "score": "0.541551", "text": "public function testRandom()\n\t{\n\t}", "title": "" }, { "docid": "0b15864147f133b277e52d846eab8104", "score": "0.5360863", "text": "public function testMediaDataSampling() {\n $report = $this->container->get('sampler.reporter')\n ->anonymize(FALSE)\n ->collect()\n ->getReport();\n\n $mediaReport = $report['media'];\n\n $this->assertEquals('test', $mediaReport['bundle']['test']['source']['plugin_id']);\n }", "title": "" }, { "docid": "c79017506f2a7b880c8f44af950d0775", "score": "0.5333166", "text": "public function testCaptures(){\n\t\t\t$this->assertEquals(\"test\", $this->get_data('/captures/test', array('pass' => true)));\n\t\t}", "title": "" }, { "docid": "3ed840da6f62c873ba1a66b00d91e9af", "score": "0.53113335", "text": "public function getSampleData();", "title": "" }, { "docid": "9a5369e3e5edc3484d4cf46e58c364ba", "score": "0.5260873", "text": "public function test_filter() {\n $client = new Socrata(\"soda.demo.socrata.com\", getenv(\"APP_TOKEN\"));\n $response = $client->get(\"6yvf-kk3n\", array(\"\\$limit\" => 5, \"source\" => \"ak\"));\n\n // Do we get a result set of size 5?\n $this->assertCount(5, $response);\n\n // Verify the sources are all AK\n foreach($response as $quake) {\n $this->assertEquals(\"ak\", $quake[\"source\"]);\n }\n }", "title": "" }, { "docid": "f7966c192a8d080a33ebbd4daa46fb78", "score": "0.5246491", "text": "function test_sample() {\n\t\t$this->assertTrue( true );\n\t}", "title": "" }, { "docid": "ec6f249ae399b022f03949020958fdc0", "score": "0.52263415", "text": "public function testViewSample()\n {\n // TODO: implement\n //$this->markTestIncomplete('Not implemented');\n $items = [];\n $items[] = new \\OpenAPI\\Client\\Model\\ViewSampleItems(['name' => 'Johnny', 'age' => 32]);\n $items[] = new \\OpenAPI\\Client\\Model\\ViewSampleItems(['name' => 'Nancy', 'age' => 29]);\n $items[] = new \\OpenAPI\\Client\\Model\\ViewSampleItems(['name' => 'Baby', 'age' => 1]);\n $data = [\n 'limit' => 100,\n 'offset' => 0,\n 'order' => '',\n 'filter' => [],\n 'count' => count($items),\n 'items' => $items,\n\t];\n $expected = new \\OpenAPI\\Client\\Model\\ViewSample($data);\n $result = true;\n $apiInstance = new \\OpenAPI\\Client\\Api\\SampleApi(\n // If you want use custom http client, pass your client which implements `GuzzleHttp\\ClientInterface`.\n // This is optional, `GuzzleHttp\\Client` will be used as default.\n //new GuzzleHttp\\Client()\n );\n $limit = 100; // int | Number of items to return\n $offset = 0; // int | Offset to start items from\n $order = array('order_example'); // string[] | Property to sort on and optional -direction (comma separated)\n $filter = array('filter_example'); // string[] | Filters to be applied. Each filter consists of a property, an operator and a value (comma separated)\n \n try {\n //$result = $apiInstance->viewSample($limit, $offset, $order, $filter);\n $result = $apiInstance->viewSample();\n print_r($result);\n } catch (\\Exception $e) {\n echo 'Exception when calling SampleApi->viewSample: ', $e->getMessage(), PHP_EOL;\n }\n $this->assertEquals($expected, $result);\n }", "title": "" }, { "docid": "ed7eea2dacffe833f620eb8fece01a8f", "score": "0.52172863", "text": "public function testGetIssuedDocumentPreCreateInfo()\n {\n $stream = '{\"data\":{\"numerations\":{\"2018\":{\"AB123\":2},\"2019\":{\"123\":null},\"2020\":{\"ABC\":2},\"2021\":{\"rec123\":2}},\"dn_numerations\":{\"2017\":{\"\":1000},\"2018\":{\"\":112},\"2019\":{\"\":526},\"2020\":{\"\":11},\"2021\":{\"\":110}},\"default_values\":{\"template\":{\"id\":111,\"type\":\"standard\",\"name\":\"Light Smoke\"},\"dn_template\":{\"id\":222,\"type\":\"delivery_note\",\"name\":\"DDT 1\"},\"ai_template\":{\"id\":333,\"type\":\"accompanying_invoice\",\"name\":\"FT Accompagnatoria 1\"},\"notes\":\"\",\"rivalsa\":0,\"cassa\":0,\"withholding_tax\":0,\"withholding_tax_taxable\":100,\"other_withholding_tax\":0,\"use_gross_prices\":false,\"payment_method\":{\"id\":123321,\"name\":\"Bonifico bancario\",\"is_default\":true,\"details\":[{\"title\":\"Banca\",\"description\":\"Indesa\"},{\"title\":\"IBAN\",\"description\":\"IT17QA12345600000003498936\"},{\"title\":\"Intestatario\",\"description\":\"Mario Rossi\"}],\"bank_iban\":\"IT17QA12345600000003498936\",\"bank_name\":\"Indesa\",\"bank_beneficiary\":\"Mario Rossi\",\"ei_payment_method\":\"MP05\"},\"show_payment_method\":true,\"ei_cassa_type\":null,\"ei_withholding_tax_causal\":\"B\",\"ei_other_withholding_tax_type\":null,\"ei_other_withholding_tax_causal\":null,\"ei_default_document_type\":\"TD01\"},\"extra_data_default_values\":{\"ts_communication\":false,\"ts_tipo_spesa\":\"SR\",\"ts_flag_tipo_spesa\":0,\"ts_pagamento_tracciato\":false},\"items_default_values\":{\"vat\":{\"id\":0,\"value\":22,\"description\":\"\",\"notes\":\"\",\"e_invoice\":true,\"ei_type\":\"0\",\"ei_description\":\"\",\"is_disabled\":false,\"editable\":false,\"default\":true}},\"countries_list\":[\"Italia\",\"Afghanistan\",\"Albania\",\"Algeria\",\"Andorra\",\"Angola\",\"Anguilla\",\"Antartide\",\"Antigua e Barbuda\",\"Antille Olandesi\",\"Arabia Saudita\",\"Argentina\",\"Armenia\",\"Aruba\",\"Australia\",\"Austria\",\"Azerbaigian\",\"Bahamas\",\"Bahrain\",\"Bangladesh\",\"Barbados\",\"Belgio\",\"Belize\",\"Benin\",\"Bermuda\",\"Bhutan\",\"Bielorussia\",\"Bolivia\",\"Bosnia ed Erzegovina\",\"Botswana\",\"Brasile\",\"Brunei\",\"Bulgaria\",\"Burkina Faso\",\"Burundi\",\"Cambogia\",\"Camerun\",\"Canada\",\"Capo Verde\",\"Ciad\",\"Cile\",\"Cina\",\"Cipro\",\"Citt\\u00e0 del Vaticano\",\"Colombia\",\"Comore\",\"Corea del Nord\",\"Corea del Sud\",\"Costa Rica\",\"Costa d\\'Avorio\",\"Croazia\",\"Cuba\",\"Danimarca\",\"Dominica\",\"Ecuador\",\"Egitto\",\"El Salvador\",\"Emirati Arabi Uniti\",\"Eritrea\",\"Estonia\",\"Etiopia\",\"Fiji\",\"Filippine\",\"Finlandia\",\"Francia\",\"Gabon\",\"Gambia\",\"Georgia\",\"Georgia del Sud e isole Sandwich\",\"Germania\",\"Ghana\",\"Giamaica\",\"Giappone\",\"Gibilterra\",\"Gibuti\",\"Giordania\",\"Grecia\",\"Grenada\",\"Groenlandia\",\"Guadalupa\",\"Guam\",\"Guatemala\",\"Guernsey - Channel Islands\",\"Guinea\",\"Guinea Equatoriale\",\"Guinea-Bissau\",\"Guyana\",\"Guyana Francese\",\"Haiti\",\"Heard Island e McDonald Islands\",\"Honduras\",\"Hong Kong\",\"India\",\"Indonesia\",\"Iran\",\"Iraq\",\"Irlanda\",\"Islanda\",\"Isola Bouvet\",\"Isola Christmas\",\"Isola di Man\",\"Isola Norfolk\",\"Isole Canarie (Spagna)\",\"Isole Cayman\",\"Isole Cocos e Keeling\",\"Isole Cook\",\"Isole Falkland\",\"Isole F\\u00e6r \\u00d8er\",\"Isole Marianne Settentrionali\",\"Isole Marshall\",\"Isole Minori Esterne degli USA\",\"Isole Pitcairn\",\"Isole Salomone\",\"Isole Vergini Americane\",\"Isole Vergini Britanniche\",\"Isole \\u00c5land\",\"Israele\",\"Jersey - Channel Islands\",\"Kazakistan\",\"Kenia\",\"Kirghizistan\",\"Kiribati\",\"Kosovo\",\"Kuwait\",\"Laos\",\"Lesotho\",\"Lettonia\",\"Libano\",\"Liberia\",\"Libia\",\"Liechtenstein\",\"Lituania\",\"Lussemburgo\",\"Macao\",\"Macedonia\",\"Macedonia del Nord\",\"Madagascar\",\"Malawi\",\"Malaysia\",\"Maldive\",\"Mali\",\"Malta\",\"Marocco\",\"Martinica\",\"Mauritania\",\"Mauritius\",\"Mayotte\",\"Messico\",\"Micronesia\",\"Moldavia\",\"Monaco\",\"Mongolia\",\"Montenegro\",\"Montserrat\",\"Mozambico\",\"Myanmar\",\"Namibia\",\"Nauru\",\"Nepal\",\"Nicaragua\",\"Niger\",\"Nigeria\",\"Niue\",\"Norvegia\",\"Nuova Caledonia\",\"Nuova Zelanda\",\"Oman\",\"Paesi Bassi\",\"Pakistan\",\"Palau\",\"Panama\",\"Papua Nuova Guinea\",\"Paraguay\",\"Per\\u00f9\",\"Polinesia Francese\",\"Polonia\",\"Porto Rico\",\"Portogallo\",\"Qatar\",\"Regno Unito\",\"Repubblica Ceca\",\"Repubblica Centrafricana\",\"Repubblica Democratica del Congo\",\"Repubblica Dominicana\",\"Repubblica del Congo\",\"Riunione\",\"Romania\",\"Ruanda\",\"Russia\",\"Sahara Occidentale\",\"Saint Barthelemy\",\"Saint Kitts e Nevis\",\"Saint Pierre e Miquelon\",\"Saint Vincent e Grenadine\",\"Samoa\",\"Samoa Americane\",\"San Marino\",\"Sant\\'Elena\",\"Santa Lucia\",\"Senegal\",\"Serbia\",\"Seychelles\",\"Sierra Leone\",\"Singapore\",\"Siria\",\"Slovacchia\",\"Slovenia\",\"Somalia\",\"Spagna\",\"Sri Lanka\",\"Stato di Palestina\",\"Stati Uniti\",\"Sudafrica\",\"Sud Sudan\",\"Sudan\",\"Suriname\",\"Svalbard e Jan Mayen\",\"Svezia\",\"Svizzera\",\"Swaziland\",\"S\\u00e3o Tom\\u00e9 e Pr\\u00edncipe\",\"Tagikistan\",\"Taiwan\",\"Tanzania\",\"Terre australi e ant. francesi\",\"Terr. Britannico dell\\'Oc. Ind.\",\"Thailandia\",\"Timor Est\",\"Togo\",\"Tokelau\",\"Tonga\",\"Trinidad e Tobago\",\"Tunisia\",\"Turchia\",\"Turkmenistan\",\"Turks e Caicos\",\"Tuvalu\",\"Ucraina\",\"Uganda\",\"Ungheria\",\"Uruguay\",\"Uzbekistan\",\"Vanuatu\",\"Venezuela\",\"Vietnam\",\"Wallis e Futuna\",\"Yemen\",\"Zambia\",\"Zimbabwe\"],\"currencies_list\":[{\"id\":\"AED\",\"symbol\":\"AED\",\"html_symbol\":\"AED\",\"exchange_rate\":\"4.09500\"},{\"id\":\"ALL\",\"symbol\":\"ALL\",\"html_symbol\":\"ALL\",\"exchange_rate\":\"121.50000\"},{\"id\":\"AUD\",\"symbol\":\"AUD\",\"html_symbol\":\"AUD\",\"exchange_rate\":\"1.62094\"},{\"id\":\"AZN\",\"symbol\":\"AZN\",\"html_symbol\":\"AZN\",\"exchange_rate\":\"2.00130\"},{\"id\":\"BGN\",\"symbol\":\"\\u043b\\u0432\",\"html_symbol\":\"BGN\",\"exchange_rate\":\"1.95583\"},{\"id\":\"BRL\",\"symbol\":\"R$\",\"html_symbol\":\"R$\",\"exchange_rate\":\"4.50410\"},{\"id\":\"BYN\",\"symbol\":\"BYN\",\"html_symbol\":\"BYN\",\"exchange_rate\":\"2.41000\"},{\"id\":\"CAD\",\"symbol\":\"CAD\",\"html_symbol\":\"CAD\",\"exchange_rate\":\"1.49841\"},{\"id\":\"CFA\",\"symbol\":\"CFA\",\"html_symbol\":\"CFA\",\"exchange_rate\":\"656.68000\"},{\"id\":\"CHF\",\"symbol\":\"Fr.\",\"html_symbol\":\"Fr.\",\"exchange_rate\":\"1.12559\"},{\"id\":\"CNY\",\"symbol\":\"CNY\",\"html_symbol\":\"CNY\",\"exchange_rate\":\"7.70160\"},{\"id\":\"CRC\",\"symbol\":\"\\u20a1\",\"html_symbol\":\"₡\",\"exchange_rate\":\"659.17000\"},{\"id\":\"CZK\",\"symbol\":\"K\\u010d\",\"html_symbol\":\"CZK\",\"exchange_rate\":\"25.80600\"},{\"id\":\"DKK\",\"symbol\":\"kr.\",\"html_symbol\":\"kr.\",\"exchange_rate\":\"7.46750\"},{\"id\":\"DOP\",\"symbol\":\"DOP\",\"html_symbol\":\"DOP\",\"exchange_rate\":\"56.50000\"},{\"id\":\"DZD\",\"symbol\":\"DZD\",\"html_symbol\":\"DZD\",\"exchange_rate\":\"134.28300\"},{\"id\":\"EGP\",\"symbol\":\"EGP\",\"html_symbol\":\"EGP\",\"exchange_rate\":\"18.98030\"},{\"id\":\"EUR\",\"symbol\":\"\\u20ac\",\"html_symbol\":\"€\",\"exchange_rate\":\"1.00000\"},{\"id\":\"GBP\",\"symbol\":\"\\u00a3\",\"html_symbol\":\"£\",\"exchange_rate\":\"0.88096\"},{\"id\":\"GHS\",\"symbol\":\"GHS\",\"html_symbol\":\"GHS\",\"exchange_rate\":\"5.45834\"},{\"id\":\"HKD\",\"symbol\":\"HK$\",\"html_symbol\":\"HK$\",\"exchange_rate\":\"8.75450\"},{\"id\":\"HRK\",\"symbol\":\"HRK\",\"html_symbol\":\"HRK\",\"exchange_rate\":\"7.42640\"},{\"id\":\"HUF\",\"symbol\":\"HUF\",\"html_symbol\":\"HUF\",\"exchange_rate\":\"326.24000\"},{\"id\":\"ILS\",\"symbol\":\"\\u20aa\",\"html_symbol\":\"₪\",\"exchange_rate\":\"4.02680\"},{\"id\":\"INR\",\"symbol\":\"INR\",\"html_symbol\":\"INR\",\"exchange_rate\":\"77.76050\"},{\"id\":\"ISK\",\"symbol\":\"ISK\",\"html_symbol\":\"ISK\",\"exchange_rate\":\"135.94600\"},{\"id\":\"JPY\",\"symbol\":\"\\u00a5\",\"html_symbol\":\"¥\",\"exchange_rate\":\"123.05800\"},{\"id\":\"KRW\",\"symbol\":\"KRW\",\"html_symbol\":\"KRW\",\"exchange_rate\":\"1329.20000\"},{\"id\":\"MAD\",\"symbol\":\"MAD\",\"html_symbol\":\"MAD\",\"exchange_rate\":\"10.78900\"},{\"id\":\"MKD\",\"symbol\":\"MKD\",\"html_symbol\":\"MKD\",\"exchange_rate\":\"61.36700\"},{\"id\":\"MXN\",\"symbol\":\"Mex$\",\"html_symbol\":\"Mex$\",\"exchange_rate\":\"21.17900\"},{\"id\":\"MYR\",\"symbol\":\"MYR\",\"html_symbol\":\"MYR\",\"exchange_rate\":\"4.67310\"},{\"id\":\"NGN\",\"symbol\":\"NGN\",\"html_symbol\":\"NGN\",\"exchange_rate\":\"405.17000\"},{\"id\":\"NIS\",\"symbol\":\"NIS\",\"html_symbol\":\"NIS\",\"exchange_rate\":\"4020.00000\"},{\"id\":\"NOK\",\"symbol\":\"kr\",\"html_symbol\":\"kr\",\"exchange_rate\":\"9.76270\"},{\"id\":\"NZD\",\"symbol\":\"NZD\",\"html_symbol\":\"NZD\",\"exchange_rate\":\"1.71687\"},{\"id\":\"OMR\",\"symbol\":\"OMR\",\"html_symbol\":\"OMR\",\"exchange_rate\":\"0.42950\"},{\"id\":\"PEN\",\"symbol\":\"PEN\",\"html_symbol\":\"PEN\",\"exchange_rate\":\"3.73400\"},{\"id\":\"PLN\",\"symbol\":\"z\\u0142\",\"html_symbol\":\"PLN\",\"exchange_rate\":\"4.30330\"},{\"id\":\"QAR\",\"symbol\":\"QAR\",\"html_symbol\":\"QAR\",\"exchange_rate\":\"4.06270\"},{\"id\":\"RON\",\"symbol\":\"RON\",\"html_symbol\":\"RON\",\"exchange_rate\":\"4.66891\"},{\"id\":\"RSD\",\"symbol\":\"RSD\",\"html_symbol\":\"RSD\",\"exchange_rate\":\"117.39414\"},{\"id\":\"RUB\",\"symbol\":\"\\u20bd\",\"html_symbol\":\"₽\",\"exchange_rate\":\"71.70370\"},{\"id\":\"SAR\",\"symbol\":\"SAR\",\"html_symbol\":\"SAR\",\"exchange_rate\":\"4.18520\"},{\"id\":\"SEK\",\"symbol\":\"SEK\",\"html_symbol\":\"SEK\",\"exchange_rate\":\"10.73374\"},{\"id\":\"SGD\",\"symbol\":\"SGD\",\"html_symbol\":\"SGD\",\"exchange_rate\":\"1.53800\"},{\"id\":\"THB\",\"symbol\":\"THB\",\"html_symbol\":\"THB\",\"exchange_rate\":\"35.56400\"},{\"id\":\"TND\",\"symbol\":\"TND\",\"html_symbol\":\"TND\",\"exchange_rate\":\"3.34010\"},{\"id\":\"TRY\",\"symbol\":\"TRY\",\"html_symbol\":\"TRY\",\"exchange_rate\":\"6.81590\"},{\"id\":\"TWD\",\"symbol\":\"TWD\",\"html_symbol\":\"TWD\",\"exchange_rate\":\"35.14200\"},{\"id\":\"UAH\",\"symbol\":\"UAH\",\"html_symbol\":\"UAH\",\"exchange_rate\":\"29.31490\"},{\"id\":\"USD\",\"symbol\":\"$\",\"html_symbol\":\"$\",\"exchange_rate\":\"1.11570\"},{\"id\":\"VND\",\"symbol\":\"\\u20ab\",\"html_symbol\":\"₫\",\"exchange_rate\":\"26100.00000\"},{\"id\":\"ZAR\",\"symbol\":\"R\",\"html_symbol\":\"R\",\"exchange_rate\":\"16.03080\"}],\"templates_list\":[{\"id\":10,\"name\":\"New Standard S1\"},{\"id\":11,\"name\":\"New Standard S2\"},{\"id\":12,\"name\":\"New Professionisti P1\"},{\"id\":13,\"name\":\"New Buste\"},{\"id\":14,\"name\":\"New Professionisti P2\"},{\"id\":101,\"name\":\"Clear lines\"},{\"id\":106,\"name\":\"Minimalist\"},{\"id\":107,\"name\":\"Squared\"},{\"id\":108,\"name\":\"Modern\"},{\"id\":150,\"name\":\"Bright Colors\"},{\"id\":681,\"name\":\"Modern Spese di trasporto\"},{\"id\":682,\"name\":\"Modern ciao\"},{\"id\":2821,\"name\":\"Light Smoke\"},{\"id\":2823,\"name\":\"IDEAVERDE\"},{\"id\":2824,\"name\":\"LS problem\"},{\"id\":2825,\"name\":\"Light Smoke 2nd CASSA\"},{\"id\":2826,\"name\":\"LIGHT NUOVO\"},{\"id\":2827,\"name\":\"STAND\"}],\"dn_templates_list\":[{\"id\":660,\"name\":\"DDT 1\"},{\"id\":680,\"name\":\"DDT Prova\"}],\"ai_templates_list\":[{\"id\":663,\"name\":\"FT Accompagnatoria 1\"}],\"payment_methods_list\":[{\"id\":555,\"name\":\"Rimessa diretta\",\"is_default\":false,\"details\":[],\"bank_iban\":null,\"bank_name\":null,\"bank_beneficiary\":null,\"ei_payment_method\":null},{\"id\":123321,\"name\":\"Bonifico bancario\",\"is_default\":true,\"details\":[{\"title\":\"Banca\",\"description\":\"Indesa\"},{\"title\":\"IBAN\",\"description\":\"IT17QA12345600000003498936\"},{\"title\":\"Intestatario\",\"description\":\"Mario Rossi\"}],\"bank_iban\":\"IT17QA12345600000003498936\",\"bank_name\":\"Indesa\",\"bank_beneficiary\":\"Mario Rossi\",\"ei_payment_method\":\"MP05\"}],\"payment_accounts_list\":[{\"id\":21,\"name\":\"Indesa - Carta conto\"},{\"id\":287,\"name\":\"Bonifico_Bancario\"}],\"vat_types_list\":[{\"id\":1409,\"value\":15,\"description\":\"ALIQUOTA #1234#\",\"ei_type\":\"0\",\"is_disabled\":false},{\"id\":1332,\"value\":0,\"description\":\"Non imp. art. 17 c. 6 lett. A TER DPR 633\\/72\",\"ei_type\":\"0\",\"is_disabled\":false}],\"measures_list\":[\"pezzi\",\"kg\",\"litri\",\"ore\",\"giorni\",\"km\",\"mesi\"],\"languages_list\":[{\"code\":\"it\",\"name\":\"Italiano\"},{\"code\":\"en\",\"name\":\"Inglese\"},{\"code\":\"de\",\"name\":\"Tedesco\"},{\"code\":\"fr\",\"name\":\"Francese\"},{\"code\":\"es\",\"name\":\"Spagnolo\"},{\"code\":\"pt\",\"name\":\"Portoghese\"},{\"code\":\"el\",\"name\":\"Greco\"},{\"code\":\"pl\",\"name\":\"Polacco\"},{\"code\":\"sl\",\"name\":\"Sloveno\"}],\"ei_structure\":{\"FatturaElettronicaHeader\":{\"idx\":1,\"children\":{\"DatiTrasmissione\":{\"idx\":1,\"children\":{\"ContattiTrasmittente\":{\"idx\":5,\"children\":{\"Telefono\":{\"idx\":1,\"type\":\"text\",\"length\":[5,12]},\"Email\":{\"idx\":2,\"type\":\"text\",\"length\":[7,256]}}}}},\"CedentePrestatore\":{\"idx\":2,\"children\":{\"DatiAnagrafici\":{\"idx\":1,\"children\":{\"Anagrafica\":{\"idx\":3,\"children\":{\"CodEORI\":{\"idx\":5,\"type\":\"text\",\"length\":[13,17]}}},\"AlboProfessionale\":{\"idx\":4,\"type\":\"text\",\"length\":[1,60]},\"ProvinciaAlbo\":{\"idx\":5,\"type\":\"text\",\"length\":2},\"NumeroIscrizioneAlbo\":{\"idx\":6,\"type\":\"text\",\"length\":[1,60]},\"DataIscrizioneAlbo\":{\"idx\":7,\"type\":\"date\",\"length\":10}}},\"Sede\":{\"idx\":2,\"children\":{\"NumeroCivico\":{\"idx\":2,\"type\":\"text\",\"length\":[1,8]}}},\"StabileOrganizzazione\":{\"idx\":3,\"children\":{\"Indirizzo\":{\"idx\":1,\"type\":\"text\",\"length\":[1,60]},\"NumeroCivico\":{\"idx\":2,\"type\":\"text\",\"length\":[1,8]},\"CAP\":{\"idx\":3,\"type\":\"text\",\"length\":5},\"Comune\":{\"idx\":4,\"type\":\"text\",\"length\":[1,60]},\"Provincia\":{\"idx\":5,\"type\":\"text\",\"length\":2},\"Nazione\":{\"idx\":6,\"type\":\"text\",\"length\":2}}},\"Contatti\":{\"idx\":5,\"children\":{\"Telefono\":{\"idx\":1,\"type\":\"text\",\"length\":[5,12]},\"Fax\":{\"idx\":2,\"type\":\"text\",\"length\":[5,12]},\"Email\":{\"idx\":3,\"type\":\"text\",\"length\":[7,256]}}},\"RiferimentoAmministrazione\":{\"idx\":6,\"type\":\"text\",\"length\":[1,20]}}},\"CessionarioCommittente\":{\"idx\":4,\"children\":{\"DatiAnagrafici\":{\"idx\":1,\"children\":{\"Anagrafica\":{\"idx\":3,\"children\":{\"Nome\":{\"idx\":2,\"type\":\"text\",\"length\":[2,50]},\"Cognome\":{\"idx\":3,\"type\":\"text\",\"length\":[2,50]},\"Titolo\":{\"idx\":4,\"type\":\"text\",\"length\":[2,10]},\"CodEORI\":{\"idx\":5,\"type\":\"text\",\"length\":[13,17]}}}}},\"StabileOrganizzazione\":{\"idx\":3,\"children\":{\"Indirizzo\":{\"idx\":1,\"type\":\"text\",\"length\":[1,60]},\"NumeroCivico\":{\"idx\":2,\"type\":\"text\",\"length\":[1,8]},\"CAP\":{\"idx\":3,\"type\":\"text\",\"length\":5},\"Comune\":{\"idx\":4,\"type\":\"text\",\"length\":[1,60]},\"Provincia\":{\"idx\":5,\"type\":\"text\",\"length\":2},\"Nazione\":{\"idx\":6,\"type\":\"text\",\"length\":2}}},\"RappresentanteFiscale\":{\"idx\":4,\"children\":{\"IdFiscaleIVA\":{\"idx\":1,\"children\":{\"IdPaese\":{\"idx\":1,\"type\":\"text\",\"length\":2},\"IdCodice\":{\"idx\":2,\"type\":\"text\",\"length\":[1,28]}}},\"Denominazione\":{\"idx\":2,\"type\":\"text\",\"length\":[1,80]},\"Nome\":{\"idx\":3,\"type\":\"text\",\"length\":[1,60]},\"Cognome\":{\"idx\":4,\"type\":\"text\",\"length\":[1,60]}}}}}}},\"FatturaElettronicaBody\":{\"idx\":2,\"children\":{\"DatiGenerali\":{\"idx\":1,\"children\":{\"DatiGeneraliDocumento\":{\"idx\":1,\"children\":{\"TipoDocumento\":{\"idx\":1,\"type\":\"select\",\"options\":{\"TD01\":\"TD01 - fattura\",\"TD02\":\"TD02 - acconto\\/anticipo su fattura\",\"TD03\":\"TD03 - acconto\\/anticipo su parcella\",\"TD04\":\"TD04 - nota di credito\",\"TD05\":\"TD05 - nota di debito\",\"TD06\":\"TD06 - parcella\",\"TD16\":\"TD16 - integrazione fattura reverse charge interno\",\"TD17\":\"TD17 - integrazione\\/autofattura per acquisto servizi dall\\'estero\",\"TD18\":\"TD18 - integrazione per acquisto di beni intracomunitari\",\"TD19\":\"TD19 - integrazione\\/autofattura per acquisto di beni ex art.17 c.2 DPR 633\\/72\",\"TD20\":\"TD20 - autofattura per regolarizzazione e integrazione delle fatture (art.6 c.8 d.lgs. 471\\/97 o art.46 c.5 D.L. 331\\/93)\",\"TD21\":\"TD21 - autofattura per splafonamento\",\"TD22\":\"TD22 - estrazione beni da Deposito IVA\",\"TD23\":\"TD23 - estrazione beni da Deposito IVA con versamento dell\\'IVA\",\"TD24\":\"TD24 - fattura differita di cui all\\'art. 21, comma 4, lett. a)\",\"TD25\":\"TD25 - fattura differita di cui all\\'art. 21, comma 4, terzo periodo, lett. b)\",\"TD26\":\"TD26 - cessione di beni ammortizzabili e per passaggi interni (ex art.36 DPR 633\\/72)\",\"TD27\":\"TD27 - fattura per autoconsumo o per cessioni gratuite senza rivalsa\"}},\"Arrotondamento\":{\"idx\":10,\"type\":\"text\",\"format\":\"decimal\",\"length\":[4,15]},\"Causale\":{\"idx\":11,\"array\":true,\"type\":\"text\",\"length\":[1,200]},\"Art73\":{\"idx\":12,\"type\":\"select\",\"options\":{\"SI\":\"Si\"}}}},\"DatiOrdineAcquisto\":{\"idx\":2,\"array\":true,\"children\":{\"RiferimentoNumeroLinea\":{\"idx\":1,\"type\":\"text\",\"array\":true,\"length\":[1,4]},\"IdDocumento\":{\"idx\":2,\"type\":\"text\",\"length\":[1,20]},\"Data\":{\"idx\":3,\"type\":\"date\",\"length\":10},\"NumItem\":{\"idx\":4,\"type\":\"text\",\"length\":[1,20]},\"CodiceCommessaConvenzione\":{\"idx\":5,\"type\":\"text\",\"length\":[1,100]},\"CodiceCUP\":{\"idx\":6,\"type\":\"text\",\"length\":[1,15]},\"CodiceCIG\":{\"idx\":7,\"type\":\"text\",\"length\":[1,15]}}},\"DatiContratto\":{\"idx\":3,\"array\":true,\"children\":{\"RiferimentoNumeroLinea\":{\"idx\":1,\"type\":\"text\",\"array\":true,\"length\":[1,4]},\"IdDocumento\":{\"idx\":2,\"type\":\"text\",\"length\":[1,20]},\"Data\":{\"idx\":3,\"type\":\"date\",\"length\":10},\"NumItem\":{\"idx\":4,\"type\":\"text\",\"length\":[1,20]},\"CodiceCommessaConvenzione\":{\"idx\":5,\"type\":\"text\",\"length\":[1,100]},\"CodiceCUP\":{\"idx\":6,\"type\":\"text\",\"length\":[1,15]},\"CodiceCIG\":{\"idx\":7,\"type\":\"text\",\"length\":[1,15]}}},\"DatiConvenzione\":{\"idx\":4,\"array\":true,\"children\":{\"RiferimentoNumeroLinea\":{\"idx\":1,\"type\":\"text\",\"array\":true,\"length\":[1,4]},\"IdDocumento\":{\"idx\":2,\"type\":\"text\",\"length\":[1,20]},\"Data\":{\"idx\":3,\"type\":\"date\",\"length\":10},\"NumItem\":{\"idx\":4,\"type\":\"text\",\"length\":[1,20]},\"CodiceCommessaConvenzione\":{\"idx\":5,\"type\":\"text\",\"length\":[1,100]},\"CodiceCUP\":{\"idx\":6,\"type\":\"text\",\"length\":[1,15]},\"CodiceCIG\":{\"idx\":7,\"type\":\"text\",\"length\":[1,15]}}},\"DatiRicezione\":{\"idx\":5,\"array\":true,\"children\":{\"RiferimentoNumeroLinea\":{\"idx\":1,\"type\":\"text\",\"array\":true,\"length\":[1,4]},\"IdDocumento\":{\"idx\":2,\"type\":\"text\",\"length\":[1,20]},\"Data\":{\"idx\":3,\"type\":\"date\",\"length\":10},\"NumItem\":{\"idx\":4,\"type\":\"text\",\"length\":[1,20]},\"CodiceCommessaConvenzione\":{\"idx\":5,\"type\":\"text\",\"length\":[1,100]},\"CodiceCUP\":{\"idx\":6,\"type\":\"text\",\"length\":[1,15]},\"CodiceCIG\":{\"idx\":7,\"type\":\"text\",\"length\":[1,15]}}},\"DatiFattureCollegate\":{\"idx\":6,\"array\":true,\"children\":{\"RiferimentoNumeroLinea\":{\"idx\":1,\"type\":\"text\",\"array\":true,\"length\":[1,4]},\"IdDocumento\":{\"idx\":2,\"type\":\"text\",\"length\":[1,20]},\"Data\":{\"idx\":3,\"type\":\"date\",\"length\":10},\"NumItem\":{\"idx\":4,\"type\":\"text\",\"length\":[1,20]},\"CodiceCommessaConvenzione\":{\"idx\":5,\"type\":\"text\",\"length\":[1,100]},\"CodiceCUP\":{\"idx\":6,\"type\":\"text\",\"length\":[1,15]},\"CodiceCIG\":{\"idx\":7,\"type\":\"text\",\"length\":[1,15]}}},\"DatiSAL\":{\"idx\":7,\"array\":true,\"children\":{\"RiferimentoFase\":{\"idx\":1,\"type\":\"text\",\"length\":[1,3]}}},\"DatiDDT\":{\"idx\":8,\"array\":true,\"children\":{\"NumeroDDT\":{\"idx\":1,\"type\":\"text\",\"length\":[1,20]},\"DataDDT\":{\"idx\":2,\"type\":\"date\",\"length\":10},\"RiferimentoNumeroLinea\":{\"idx\":3,\"type\":\"text\",\"array\":true,\"length\":[1,4]}}},\"DatiTrasporto\":{\"idx\":9,\"children\":{\"DatiAnagraficiVettore\":{\"idx\":1,\"children\":{\"IdFiscaleIVA\":{\"idx\":1,\"children\":{\"IdPaese\":{\"idx\":1,\"type\":\"text\",\"length\":2},\"IdCodice\":{\"idx\":2,\"type\":\"text\",\"length\":[1,28]}}},\"CodiceFiscale\":{\"idx\":2,\"type\":\"text\",\"length\":[11,16]},\"Anagrafica\":{\"idx\":3,\"children\":{\"Denominazione\":{\"idx\":1,\"type\":\"text\",\"length\":[1,80]},\"Nome\":{\"idx\":2,\"type\":\"text\",\"length\":[1,60]},\"Cognome\":{\"idx\":3,\"type\":\"text\",\"length\":[1,60]},\"Titolo\":{\"idx\":4,\"type\":\"text\",\"length\":[2,10]},\"CodEORI\":{\"idx\":5,\"type\":\"text\",\"length\":[13,17]}}},\"NumeroLicenzaGuida\":{\"idx\":4,\"type\":\"text\",\"length\":[1,20]}}},\"MezzoTrasporto\":{\"idx\":2,\"type\":\"text\",\"length\":[1,80]},\"CausaleTrasporto\":{\"idx\":3,\"type\":\"text\",\"length\":[1,100]},\"NumeroColli\":{\"idx\":4,\"type\":\"text\",\"length\":[1,4]},\"DataInizioTrasporto\":{\"idx\":10,\"type\":\"date\",\"length\":10},\"TipoResa\":{\"idx\":11,\"type\":\"text\",\"length\":3},\"IndirizzoResa\":{\"idx\":12,\"children\":{\"Indirizzo\":{\"idx\":1,\"type\":\"text\",\"length\":[1,60]},\"NumeroCivico\":{\"idx\":2,\"type\":\"text\",\"length\":[1,8]},\"CAP\":{\"idx\":3,\"type\":\"text\",\"length\":5},\"Comune\":{\"idx\":4,\"type\":\"text\",\"length\":[1,60]},\"Provincia\":{\"idx\":5,\"type\":\"text\",\"length\":2},\"Nazione\":{\"idx\":6,\"type\":\"text\",\"length\":2}}}}}}},\"DatiPagamento\":{\"idx\":\"4\",\"children\":{\"CondizioniPagamento\":{\"idx\":1,\"type\":\"select\",\"options\":{\"TP01\":\"Pagamento a rate\",\"TP02\":\"Pagamento completo\",\"TP03\":\"Anticipo\"}}}}}}},\"ei_item_structure\":{\"DettaglioLinee\":{\"idx\":\"2.2.1\",\"children\":{\"NumeroLinea\":{\"idx\":1,\"type\":\"text\",\"length\":[1,4]},\"TipoCessionePrestazione\":{\"idx\":2,\"type\":\"select\",\"options\":{\"SC\":\"sconto\",\"PR\":\"premio\",\"AB\":\"abbuono\",\"AC\":\"spesa accessoria\"}},\"CodiceArticolo\":{\"idx\":3,\"array\":true,\"children\":{\"CodiceTipo\":{\"idx\":1,\"type\":\"text\",\"length\":[1,35]},\"CodiceValore\":{\"idx\":2,\"type\":\"text\",\"length\":[1,35]}}},\"DataInizioPeriodo\":{\"idx\":7,\"type\":\"date\",\"length\":10},\"DataFinePeriodo\":{\"idx\":8,\"type\":\"date\",\"length\":10},\"RiferimentoAmministrazione\":{\"idx\":15,\"type\":\"text\",\"length\":[1,20]},\"AltriDatiGestionali\":{\"idx\":16,\"array\":true,\"children\":{\"TipoDato\":{\"idx\":1,\"type\":\"text\",\"length\":[1,10]},\"RiferimentoTesto\":{\"idx\":2,\"type\":\"text\",\"length\":[1,60]},\"RiferimentoNumero\":{\"idx\":3,\"type\":\"text\",\"format\":\"decimal\",\"length\":[4,21]},\"RiferimentoData\":{\"idx\":4,\"type\":\"date\",\"length\":10}}}}}},\"ei_payment_structure\":{\"DettaglioPagamento\":{\"idx\":\"2.4.2\",\"children\":{\"DataRiferimentoTerminiPagamento\":{\"idx\":3,\"type\":\"date\",\"length\":10},\"GiorniTerminiPagamento\":{\"idx\":4,\"type\":\"text\",\"length\":[1,3]},\"DataScadenzaPagamento\":{\"idx\":5,\"type\":\"date\",\"length\":10},\"ABI\":{\"idx\":14,\"type\":\"text\",\"length\":5},\"CAB\":{\"idx\":15,\"type\":\"text\",\"length\":5},\"BIC\":{\"idx\":16,\"type\":\"text\",\"length\":[8,11]},\"DataDecorrenzaPenale\":{\"idx\":20,\"type\":\"date\",\"length\":10}}}},\"documents_type_info\":{\"TD01\":{\"self_own_invoice\":false,\"self_supplier_invoice\":true,\"description\":\"TD01 - fattura\",\"description_self_invoice\":\"TD01 - fattura in nome e per conto\"},\"TD02\":{\"self_own_invoice\":true,\"self_supplier_invoice\":true,\"description\":\"TD02 - acconto\\/anticipo su fattura\"},\"TD03\":{\"self_own_invoice\":true,\"self_supplier_invoice\":true,\"description\":\"TD03 - acconto\\/anticipo su parcella\"},\"TD04\":{\"self_own_invoice\":true,\"self_supplier_invoice\":true,\"description\":\"TD04 - nota di credito\"},\"TD05\":{\"self_own_invoice\":true,\"self_supplier_invoice\":true,\"description\":\"TD05 - nota di debito\"},\"TD06\":{\"self_own_invoice\":true,\"self_supplier_invoice\":true,\"description\":\"TD06 - parcella\"},\"TD16\":{\"self_own_invoice\":false,\"self_supplier_invoice\":true,\"description\":\"TD16 - integrazione fattura reverse charge interno\"},\"TD17\":{\"self_own_invoice\":false,\"self_supplier_invoice\":true,\"description\":\"TD17 - integrazione\\/autofattura per acquisto servizi dall\\'estero\"},\"TD18\":{\"self_own_invoice\":false,\"self_supplier_invoice\":true,\"description\":\"TD18 - integrazione per acquisto di beni intracomunitari\"},\"TD19\":{\"self_own_invoice\":false,\"self_supplier_invoice\":true,\"description\":\"TD19 - integrazione\\/autofattura per acquisto di beni ex art.17 c.2 DPR 633\\/72\"},\"TD20\":{\"self_own_invoice\":false,\"self_supplier_invoice\":true,\"description\":\"TD20 - autofattura per regolarizzazione e integrazione delle fatture (art.6 c.8 d.lgs. 471\\/97 o art.46 c.5 D.L. 331\\/93)\"},\"TD21\":{\"self_own_invoice\":true,\"self_supplier_invoice\":false,\"description\":\"TD21 - autofattura per splafonamento\"},\"TD22\":{\"self_own_invoice\":false,\"self_supplier_invoice\":true,\"description\":\"TD22 - estrazione beni da Deposito IVA\"},\"TD23\":{\"self_own_invoice\":false,\"self_supplier_invoice\":true,\"description\":\"TD23 - estrazione beni da Deposito IVA con versamento dell\\'IVA\"},\"TD24\":{\"self_own_invoice\":true,\"self_supplier_invoice\":true,\"description\":\"TD24 - fattura differita di cui all\\'art. 21, comma 4, lett. a)\"},\"TD25\":{\"self_own_invoice\":true,\"self_supplier_invoice\":true,\"description\":\"TD25 - fattura differita di cui all\\'art. 21, comma 4, terzo periodo, lett. b)\"},\"TD26\":{\"self_own_invoice\":true,\"self_supplier_invoice\":true,\"description\":\"TD26 - cessione di beni ammortizzabili e per passaggi interni (ex art.36 DPR 633\\/72)\"},\"TD27\":{\"self_own_invoice\":true,\"self_supplier_invoice\":true,\"description\":\"TD27 - fattura per autoconsumo o per cessioni gratuite senza rivalsa\"}},\"ei_regime_info\":{\"RF01\":\"Ordinario\",\"RF02\":\"Contribuenti minimi (art.1, c.96-117, L. 244\\/07)\",\"RF04\":\"Agricoltura e attivit\\u00e0 connesse e pesca (artt.34 e 34-bis, DPR 633\\/72)\",\"RF05\":\"Vendita sali e tabacchi (art.74, c.1, DPR. 633\\/72)\",\"RF06\":\"Commercio fiammiferi (art.74, c.1, DPR 633\\/72)\",\"RF07\":\"Editoria (art.74, c.1, DPR 633\\/72)\",\"RF08\":\"Gestione servizi telefonia pubblica (art.74, c.1, DPR 633\\/72)\",\"RF09\":\"Rivendita documenti di trasporto pubblico e di sosta (art.74, c.1, DPR 633\\/72)\",\"RF10\":\"Intrattenimenti, giochi e altre attivit\\u00e0 di cui alla tariffa allegata al DPR 640\\/72 (art.74, c.6, DPR 633\\/72)\",\"RF11\":\"Agenzie viaggi e turismo (art.74-ter, DPR 633\\/72)\",\"RF12\":\"Agriturismo (art.5, c.2, L. 413\\/91)\",\"RF13\":\"Vendite a domicilio (art.25-bis, c.6, DPR 600\\/73)\",\"RF14\":\"Rivendita beni usati, oggetti d\\u2019arte, d\\u2019antiquariato o da collezione (art.36, DL 41\\/95)\",\"RF15\":\"Agenzie di vendite all\\u2019asta di oggetti d\\'arte, antiquariato o da collezione (art.40-bis, DL 41\\/95)\",\"RF16\":\"IVA per cassa P.A. (art.6, c.5, DPR 633\\/72)\",\"RF17\":\"IVA per cassa (art. 32-bis, DL 83\\/2012)\",\"RF18\":\"Altro\",\"RF19\":\"Regime forfettario (art.1, c.54-89, L. 190\\/2014)\"},\"ei_cassa_type_info\":{\"\":\"Nessuna cassa previdenziale\",\"TC01\":\"Cassa nazionale previdenza e assistenza avvocati e procuratori legali\",\"TC02\":\"Cassa previdenza dottori commercialisti\",\"TC03\":\"Cassa previdenza e assistenza geometri\",\"TC04\":\"Cassa nazionale previdenza e assistenza ingegneri e architetti liberi professionisti\",\"TC05\":\"Cassa nazionale del notariato\",\"TC06\":\"Cassa nazionale previdenza e assistenza ragionieri e periti commerciali\",\"TC07\":\"Ente nazionale assistenza agenti e rappresentanti di commercio (ENASARCO)\",\"TC08\":\"Ente nazionale previdenza e assistenza consulenti del lavoro (ENPACL)\",\"TC09\":\"Ente nazionale previdenza e assistenza medici (ENPAM)\",\"TC10\":\"Ente nazionale previdenza e assistenza farmacisti (ENPAF)\",\"TC11\":\"Ente nazionale previdenza e assistenza veterinari (ENPAV)\",\"TC12\":\"Ente nazionale previdenza e assistenza impiegati dell\\'agricoltura (ENPAIA)\",\"TC13\":\"Fondo previdenza impiegati imprese di spedizione e agenzie marittime\",\"TC14\":\"Istituto nazionale previdenza giornalisti italiani (INPGI)\",\"TC15\":\"Opera nazionale assistenza orfani sanitari italiani (ONAOSI)\",\"TC16\":\"Cassa autonoma assistenza integrativa giornalisti italiani (CASAGIT)\",\"TC17\":\"Ente previdenza periti industriali e periti industriali laureati (EPPI)\",\"TC18\":\"Ente previdenza e assistenza pluricategoriale (EPAP)\",\"TC19\":\"Ente nazionale previdenza e assistenza biologi (ENPAB)\",\"TC20\":\"Ente nazionale previdenza e assistenza professione infermieristica (ENPAPI)\",\"TC21\":\"Ente nazionale previdenza e assistenza psicologi (ENPAP)\",\"TC22\":\"INPS\"},\"ei_causal_payment_info\":{\"\":\"Nessuna ritenuta\",\"A\":\"Prestazioni di lavoro autonomo rientranti nell\\'esercizio di arte o professione abituale\",\"B\":\"Utilizzazione economica, da parte dell\\'autore o dell\\'inventore, di opere dell\\'ingegno, di brevetti industriali e di processi, formule o informazioni relativi ad esperienze acquisite in campo industriale, commerciale o scientifico\",\"C\":\"Utili derivanti da contratti di associazione in partecipazione e da contratti di cointeressenza, quando l\\'apporto \\u00e8 costituito esclusivamente dalla prestazione di lavoro\",\"D\":\"Utili spettanti ai soci promotori ed ai soci fondatori delle societ\\u00e0 di capitali\",\"E\":\"Levata di protesti cambiari da parte dei segretari comunali\",\"G\":\"Indennit\\u00e0 corrisposte per la cessazione di attivit\\u00e0 sportiva professionale\",\"H\":\"Indennit\\u00e0 corrisposte per la cessazione dei rapporti di agenzia delle persone fisiche e delle societ\\u00e0 di persone con esclusione delle somme maturate entro il 31 dicembre 2003, gi\\u00e0 imputate per competenza e tassate come reddito d\\'impresa\",\"I\":\"Indennit\\u00e0 corrisposte per la cessazione da funzioni notarili\",\"L\":\"Redditi derivanti dall\\'utilizzazione economica di opere dell\\'ingegno, di brevetti industriali e di processi, formule e informazioni relativi a esperienze acquisite in campo industriale, commerciale o scientifico, che sono percepiti dagli aventi causa a titolo gratuito (ad es. eredi e legatari dell\\'autore e inventore)\",\"L1\":\"Redditi derivanti dall\\'utilizzazione economica di opere dell\\'ingegno, di brevetti industriali e di processi, formule e informazioni relativi a esperienze acquisite in campo industriale, commerciale o scientifico, che sono percepiti da soggetti che abbiano acquistato a titolo oneroso i diritti alla loro utilizzazione\",\"M\":\"Prestazioni di lavoro autonomo non esercitate abitualmente\",\"M1\":\"Redditi derivanti dall\\'assunzione di obblighi di fare, di non fare o permettere\",\"M2\":\"Prestazioni di lavoro autonomo non esercitate abitualmente per le quali sussiste l\\'obbligo di iscrizione alla Gestione Separata ENPAPI\",\"N\":\"Indennit\\u00e0 di trasferta, rimborso forfettario di spese, premi e compensi erogati: \\u0096 nell\\'esercizio diretto di attivit\\u00e0 sportive dilettantistiche; in relazione a rapporti di collaborazione coordinata e continuativa di carattere amministrativo-gestionale di natura non professionale resi a favore di societ\\u00e0 e associazioni sportive dilettantistiche e di cori, bande e filodrammatiche da parte del direttore e dei collaboratori tecnici;\",\"O\":\"Prestazioni di lavoro autonomo non esercitate abitualmente, obblighi di fare, di non fare o permettere, per le quali non sussiste l\\'obbligo di iscrizione alla gestione separata (Circ. INPS n. 104\\/2001)\",\"O1\":\"Redditi derivanti dall\\u2019assunzione di obblighi di fare, di non fare o permettere, per le quali non sussiste l\\'obbligo di iscrizione alla gestione separata (Circ. INPS n. 104\\/2001)\",\"P\":\"compensi corrisposti a soggetti non residenti privi di stabile organizzazione per l\\'uso o la concessione in uso di attrezzature industriali, commerciali o scientifiche che si trovano nel territorio dello Stato ovvero a societ\\u00e0 svizzere o stabili organizzazioni di societ\\u00e0 svizzere che possiedono i requisiti di cui all\\'art. 15, comma 2 dell\\'Accordo tra la Comunit\\u00e0 europea e la Confederazione svizzera del 26 ottobre 2004 (pubblicato in G.U.C.E. del 29 dicembre 2004 n. L385\\/30)\",\"Q\":\"Provvigioni corrisposte ad agente o rappresentante di commercio monomandatario\",\"R\":\"Provvigioni corrisposte ad agente o rappresentante di commercio plurimandatario\",\"S\":\"Provvigioni corrisposte a commissionario\",\"T\":\"Provvigioni corrisposte a mediatore\",\"U\":\"Provvigioni corrisposte a procacciatore di affari\",\"V\":\"Provvigioni corrisposte a incaricato per le vendite a domicilio; provvigioni corrisposte a incaricato per la vendita porta a porta e per la vendita ambulante di giornali quotidiani e periodici (L. 25 febbraio 1987, n. 67)\",\"V1\":\"Redditi derivanti da attivit\\u00e0 commerciali non esercitate abitualmente (ad esempio, provvigioni corrisposte per prestazioni occasionali ad agente o rappresentante di commercio, mediatore, procacciatore d\\'affari)\",\"W\":\"Corrispettivi erogati nell\\'anno corrente per prestazioni relative a contratti d\\'appalto cui si sono resi applicabili le disposizioni contenute nell\\'art. 25-ter del D.P.R. n. 600 del 29 settembre 1973\",\"X\":\"Canoni corrisposti nel 2004 da societ\\u00e0 o enti residenti ovvero da stabili organizzazioni di societ\\u00e0 estere di cui all\\'art. 26-quater, comma 1, lett. a) e b) del D.P.R. 600 del 29 settembre 1973, a societ\\u00e0 o stabili organizzazioni di societ\\u00e0, situate in altro stato membro dell\\'Unione Europea in presenza dei requisiti di cui al citato art. 26-quater, del D.P.R. 600 del 29 settembre 1973, per i quali \\u00e8 stato effettuato, nell\\'anno 2006, il rimborso della ritenuta ai sensi dell\\'art. 4 del D.Lgs. 30 maggio 2005 n. 143\",\"Y\":\"Canoni corrisposti dal 1\\u00b0 gennaio 2005 al 26 luglio 2005 da societ\\u00e0 o enti residenti ovvero da stabili organizzazioni di societ\\u00e0 estere di cui all\\'art. 26-quater, comma 1, lett. a) e b) del D.P.R. n. 600 del 29 settembre 1973, asociet\\u00e0 o stabili organizzazioni di societ\\u00e0, situate in altro stato membro dell\\'Unione Europea in presenza dei requisiti di cui al citato art. 26-quater, del D.P.R. n. 600 del 29 settembre 1973, per i quali \\u00e8 stato effettuato, nell\\'anno 2006, il rimborso della ritenuta ai sensi dell\\'art. 4 del D.Lgs. 30 maggio 2005 n. 143\",\"ZO\":\"Titolo diverso dai precedenti\"},\"ei_withholding_type_info\":{\"\":\"Nessuna ritenuta\",\"RT01\":\"Ritenuta di acconto persone fisiche\",\"RT02\":\"Ritenuta di acconto persone giuridiche\",\"RT03\":\"Contributo INPS\",\"RT04\":\"Contributo ENASARCO\",\"RT05\":\"Contributo ENPAM\",\"RT06\":\"Altro contributo previdenziale\"},\"use_e_invoice\":true}}';\n $mock = new MockHandler([new Response(\n 200,\n ['Content-Type' => 'application/json'],\n $stream\n )]);\n\n $handler = HandlerStack::create($mock);\n $apiInstance = new \\FattureInCloud\\Api\\IssuedDocumentsApi(\n new \\GuzzleHttp\\Client(['handler' => $handler])\n );\n $company_id = 2;\n $type = 'invoice';\n $result = $apiInstance->getIssuedDocumentPreCreateInfo($company_id, $type);\n //$obj = ObjectSerializer::deserialize($stream, '\\FattureInCloud\\Model\\GetIssuedDocumentPreCreateInfoResponse');\n\n //TestCase::assertEquals($obj, $result);\n TestCase::assertEquals(1, 1);\n }", "title": "" }, { "docid": "40e7c060f0b1be0af6232d5d97fbbcc4", "score": "0.5202085", "text": "public function testBasicTest()\n {\n print_r(unserialize('a:3:{s:3:\"sid\";s:14:\"6049,7051,7052\";s:2:\"id\";s:20:\"100443,100442,100444\";s:3:\"bet\";s:47:\"nspf-3#2.23|nspf-0#2.88,nspf-0#1.44,nspf-3#1.72\";}'));\n\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "3102fdbcc3cccfe81423a36bc0be1d60", "score": "0.519933", "text": "public function testGetRawMessage()\n {\n $client = static::createClient();\n\n $path = '/messages/{message_id}';\n $pattern = '{messageId}';\n $data = $this->genTestData('\\d+');\n $path = str_replace($pattern, $data, $path);\n\n $crawler = $client->request('GET', $path);\n }", "title": "" }, { "docid": "bdac05b41f002840a4dead236720b5fd", "score": "0.5199218", "text": "function _samples() {\n $this->template('Samples');\n $this->t->render('sample');\n }", "title": "" }, { "docid": "a062020d898496069a7601b4fde0a524", "score": "0.5162483", "text": "public function testRandom()\n {\n\n $user = InstagramUser::findIdentity(3);\n print_r($this->apiWithUser($user ,\n 'users/self/media/recent',\n 'GET',\n [\n 'count' => Yii::$app->params['instagram.numberOfPastPostsToCrawl'],\n ]));\n\n //trigger newline event // delete this later\n print_r($record->user_bio);\n $this->trigger(\"newline\");\n\n }", "title": "" }, { "docid": "ed94ab7e4997df88308e9435c9909412", "score": "0.51497626", "text": "function callSample(): void\n{\n $eventCreateRuleDestinationEvent = '[DESTINATION_EVENT]';\n $eventCreateRuleEventConditionsField = '[FIELD]';\n $eventCreateRuleEventConditionsComparisonType = ComparisonType::COMPARISON_TYPE_UNSPECIFIED;\n $eventCreateRuleEventConditionsValue = '[VALUE]';\n\n update_event_create_rule_sample(\n $eventCreateRuleDestinationEvent,\n $eventCreateRuleEventConditionsField,\n $eventCreateRuleEventConditionsComparisonType,\n $eventCreateRuleEventConditionsValue\n );\n}", "title": "" }, { "docid": "c495894301262d9fbb907714b5c7efd0", "score": "0.51401675", "text": "public function testGetInbound()\n {\n }", "title": "" }, { "docid": "8e25270bfddad3699fc0c974d5637c91", "score": "0.5120426", "text": "public function testIdentifier1(){\n\t\t$filter = new Filter();\n\t\t$this->assertEquals($filter->applyFilter('%#anthemfor192&?', 'identifier'), 'anthemfor192');\n\t}", "title": "" }, { "docid": "21a7f4978faace57f6eb9b6f545270d0", "score": "0.5108673", "text": "public function testChallengeLeaderboardRead()\n {\n }", "title": "" }, { "docid": "60beac068fce1d7b08464f6400e36233", "score": "0.50890464", "text": "public function createSampleData()\n {\n }", "title": "" }, { "docid": "26baa589407c9926b85670224d16f810", "score": "0.5080371", "text": "public function testExample()\n { \n \t$hasen = new AddressDetector;\n $this->assertFalse($hasen->trace('ch'));\n }", "title": "" }, { "docid": "456bde76a815b99e3c83b873cb8b234a", "score": "0.507261", "text": "function test_qrcode_bitstream_alphanumeric() {\n\t\t$this->qrcode->encode( \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:\" );\n\t\t$this->assertEqual( strlen( $this->qrcode->bitstream ), 264 );\n\t}", "title": "" }, { "docid": "29b670c316b83090471922c794d36233", "score": "0.50527704", "text": "public function testGetConferenceFonenumbers0()\n {\n }", "title": "" }, { "docid": "29b670c316b83090471922c794d36233", "score": "0.50527704", "text": "public function testGetConferenceFonenumbers0()\n {\n }", "title": "" }, { "docid": "1652bc54a61e0721d3f983ec81dd140e", "score": "0.5050081", "text": "public function test_gi01() {\n // keine Dateien\n $this->prep_gi(0);\n $m = new MVideo();\n $row = $m->getInfo(1);\n $this->assertSame($row, array(\n 'id' => '1',\n 'width' => '100',\n 'height' => '80',\n 'vname' => 'fsv',\n 'sources' => 0\n ));\n }", "title": "" }, { "docid": "ae42a187092e11cf24f123fdeb5eb84e", "score": "0.50475866", "text": "function testGetInformation_xu() {\n $this->processpdf->getInformation(\"../fixtures/xu_sample.html\");\n $fields = $this->processpdf->fields;\n $this->assertPattern(\"/Exploring the peptide nanotube formation from the self-assembly/\", $fields['title'], \"first line of title\");\n $this->assertPattern(\"/peptide in the presence of Zinc ions/\", $fields['title'], \"second line of title\");\n // department detection disabled when committee member detection was removed\n //$this->assertEqual(\"Chemistry\", $fields['department']);\n $this->assertPattern(\"/Peptide\\s+ribbons\\s+have\\s+been\\s+proposed\\s+to\\s+be/\", $fields['abstract'], \"abstract\");\n // from second page of abstract\n $this->assertPattern(\"/assembled\\s+peptide\\s+nanotubes,\\s+with\\s+such\\s+ordered\\s+and\\s+dense\\s+packed/\",\n $fields['abstract'], \"second page of abstract\");\n $this->assertTrue($fields[\"distribution_agreement\"]);\n }", "title": "" }, { "docid": "e02aec531e60a8834e73c6e03cbeb389", "score": "0.5045031", "text": "function _samples() {\n if (!$this->has_arg('visit')) $this->_error('No visit specified');\n if (!$this->has_arg('cid')) $this->_error('No container specified');\n \n $rows = $this->db->pq(\"SELECT sp.comments, sp.name, to_number(sp.location) as location, pr.acronym FROM blsample sp\n INNER JOIN crystal cr ON sp.crystalid = cr.crystalid\n INNER JOIN protein pr ON cr.proteinid = pr.proteinid\n INNER JOIN container c ON sp.containerid = c.containerid\n INNER JOIN dewar d ON d.dewarid = c.dewarid\n INNER JOIN shipping s ON s.shippingid = d.shippingid\n INNER JOIN blsession bl ON bl.proposalid = s.proposalid\n INNER JOIN proposal p ON s.proposalid = p.proposalid\n WHERE p.proposalcode || p.proposalnumber || '-' || bl.visit_number LIKE :1\n AND c.containerid = :2 ORDER BY to_number(sp.location)\", array($this->arg('visit'), $this->arg('cid')));\n \n foreach ($rows as &$r) {\n $r['LOCATION'] = intval($r['LOCATION']);\n }\n \n $this->_output($rows);\n }", "title": "" }, { "docid": "5b4b165f0da33c143c64ddf5325cec04", "score": "0.50368744", "text": "public function testSample()\r\n {\r\n // Output: 7 -> 0 -> 8\r\n // Explanation: 342 + 465 = 807.\r\n $n1 = \"342\";\r\n $n2 = \"465\";\r\n\r\n $node1 = $this->solution->toListNode($n1);\r\n $node2 = $this->solution->toListNode($n2);\r\n\r\n $response = $this->solution->addTwoNumbers($node1, $node2);\r\n $this->assertEquals(\"807\", $this->solution->getInt($response));\r\n }", "title": "" }, { "docid": "88ab442ee460d06f39b03e4d5f1f834d", "score": "0.5036328", "text": "public function testSpecification(): void {\n $transform = $this->getTransform('get_substr', [\n 'source' => 'source',\n 'field' => 'example_source_field',\n ]);\n $this->assertEquals(\n [\n 'type' => 'transform',\n 'source' => [ 'source.example_source_field' ]\n ],\n $transform->getSpecification()\n );\n }", "title": "" }, { "docid": "ad696790f503ab76e870e1ec6256074e", "score": "0.5021794", "text": "public function testChatbotChatbotIDExamplesGet()\n {\n }", "title": "" }, { "docid": "209d1450b957a88b803b0f94f9bcbb3f", "score": "0.50194716", "text": "public function test_getQuickReceiptByFilter() {\n\n }", "title": "" }, { "docid": "6dec0dd7540633ef194cb3f8ef753b80", "score": "0.501348", "text": "public function testBasic()\n {\n $pattern = \"/[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}/\";\n $uuid = new P4Cms_Uuid;\n $this->assertSame(1, preg_match($pattern, $uuid));\n }", "title": "" }, { "docid": "c302ce550cce2511cabfb67a211f4d89", "score": "0.4994378", "text": "public function random()\n {\n $result = $this->gif->random();\n\n //print var_export($result, true);\n\n $this->assertEquals('200', $result->meta->status);\n }", "title": "" }, { "docid": "01d94650ca98cd28a01b0b950f92a2aa", "score": "0.4982876", "text": "public function downloadSample()\n {\n\n }", "title": "" }, { "docid": "6257f8e6ff74f24d43f07fb2f29c97a1", "score": "0.4957443", "text": "public function testCardVerification()\n {\n }", "title": "" }, { "docid": "ee251517d61e393a861d3a9296bbbb57", "score": "0.49422625", "text": "abstract public function getStructureSampleData();", "title": "" }, { "docid": "d3db492a3cc8a5f842e8ae5f4de27e7e", "score": "0.49378234", "text": "public function testUpdateSample()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "8613928046a0840c57f0295e2626b6a2", "score": "0.4925843", "text": "public function testPacketFromBytes()\n {\n $packet = Packet::fromBytes(\n \"\\x1D\\x00\\x00\\x00\\x05\\x00\\x00\\x00\\x03\\x00\\x00\\x00this is simple body\\x00\\x00\"\n );\n\n $this->assertSame($packet->getId(), Packet::ID_AUTHORIZE);\n $this->assertSame($packet->getType(), Packet::TYPE_SERVERDATA_AUTH);\n $this->assertSame($packet->getBody(), 'this is simple body');\n }", "title": "" }, { "docid": "e9fac1360b971197119d656aec6f9596", "score": "0.49250275", "text": "public function test_scenario1() {\n $data = array(array('filename' => 'data/iris.csv',\n\t\t\t 'args' => array(\"tags\" => array(\"my tag\", \"my second tag\"), 'project'=> self::$project->resource)),\n\t array('filename' => 'data/iris.csv',\n 'args' => array(\"name\" => \"Testing unicode names: áé\", 'project'=> self::$project->resource)));\n\n foreach($data as $item) {\n print \"\\nUploading source with structured args\\n\";\n print \"Given I create a data source uploading a \". $item[\"filename\"]. \" file\\n\";\n $source = self::$api->create_source($item[\"filename\"], $options=$item[\"args\"]);\n $this->assertEquals(BigMLRequest::HTTP_CREATED, $source->code);\n $this->assertEquals(1, $source->object->status->code);\n\n print \"And I wait until the source is ready\\n\";\n $resource = self::$api->_check_resource($source->resource, null, 20000, 30);\n $this->assertEquals(BigMLRequest::FINISHED, $resource[\"status\"]);\n print \"Then the source exists and has args \" . json_encode($item[\"args\"]) . \"\\n\";\n\n foreach ($item[\"args\"] as $key => $value) {\n $this->assertEquals($resource[\"resource\"]->object->{$key}, $value);\n }\n }\n }", "title": "" }, { "docid": "715ff2a92b3371217b3a5138d6629bbf", "score": "0.49017256", "text": "public function testChatbotChatbotIDExamplesPost()\n {\n }", "title": "" }, { "docid": "965452d7090d6e2ab9594e2a1554e348", "score": "0.49012315", "text": "public function testExample()\n {\n $this->assertTrue(true);\n $enteredPersonRequest = collect(['data' => ['person' => ['personalID' => '1274568', 'role' => 'instructor', 'classID' => '1111111'],\n \"ticket\" => \"volunteerRespondUserTicket\"]])->toJson();\n $enteredPersonRequest = json_decode(\"{'data':{'person':{'personalID':'1274568','role':'instructor','classID':'1111111'},'ticket':'volunteerRespondUserTicket'}}\");\n $enteredPersonRequest->json()->all();\n $this->assertEquals('1274568', $enteredPersonRequest);\n }", "title": "" }, { "docid": "5cda8f1e9ad94203e4a1ae9d7e99fa84", "score": "0.48989815", "text": "public function testGetShortFormat()\n {\n $shortener = new ShortenerService('https://testurl.com');\n $short = $shortener->getShort();\n $this->assertRegExp('/^[a-zA-Z]+$/', $short);\n }", "title": "" }, { "docid": "6ca2c8f926e6d351ca25ca5bfaa6d42c", "score": "0.4892726", "text": "public function testRunLookmlTest()\n {\n }", "title": "" }, { "docid": "e6f71a30c92c4f4560d5b9f2ebbd32de", "score": "0.48852807", "text": "function callSample(): void\n{\n $formattedName = PredictionServiceClient::placementName(\n '[PROJECT]',\n '[LOCATION]',\n '[CATALOG]',\n '[EVENT_STORE]',\n '[PLACEMENT]'\n );\n $userEventEventType = '[EVENT_TYPE]';\n $userEventUserInfoVisitorId = '[VISITOR_ID]';\n\n predict_sample($formattedName, $userEventEventType, $userEventUserInfoVisitorId);\n}", "title": "" }, { "docid": "178967b7ada028503ac915a21951bd2a", "score": "0.48827618", "text": "public function sampleDiContent()\n {\n return [true, false, 123, '123ast'];\n }", "title": "" }, { "docid": "8e716c75927bf12f6691dcd65a69a2bb", "score": "0.48761135", "text": "public function testRecordingPost()\n {\n }", "title": "" }, { "docid": "51908a7c178530f6b0f166a421071171", "score": "0.48730218", "text": "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->radio('1', '1')\n ->radio('2', '5')\n ->radio('4', '10')\n ->radio('6', '13')\n ->type('@email','[email protected]'.rand(1,1000))\n ->press(\"Submit\")\n ->assertSee('Something else');\n });\n }", "title": "" }, { "docid": "927a0b28b722c2a3e64dffa8e7b32337", "score": "0.4872672", "text": "public function testRequestSMSVerification()\n {\n }", "title": "" }, { "docid": "07cf86224f3c1bbb16cc26441829844a", "score": "0.4862065", "text": "public function testChallengeTeamRead()\n {\n }", "title": "" }, { "docid": "ef419aee096e618b3acbd558e8628058", "score": "0.4859818", "text": "public function getSampleData() {\r\n\t\t// http://proserver.gometro.co.za/api/v1/myciti/routes\r\n\t\t$response = $this->callController->getData('https://proserver.gometro.co.za/api/v1/myciti/routes');\r\n\r\n\t\tif(empty($response)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn $response;\r\n\t}", "title": "" }, { "docid": "21cff332da3662eb7d935455697414ae", "score": "0.4855633", "text": "public function testGetPayload()\n {\n $file = TEST_STATICS . '/Vortex/wns/badge.xml';\n $elements = [ 'value' => 2 ];\n\n $this->set_reflection_property_value('elements', $elements);\n\n $this->assertStringMatchesFormatFile($file, $this->class->get_payload());\n }", "title": "" }, { "docid": "011e558688d5e2eecba3980cb90ac79b", "score": "0.48525983", "text": "public function testPostInbound()\n {\n }", "title": "" }, { "docid": "b031b6db563ada2879d24bc749d62122", "score": "0.4849895", "text": "public function testWebpushSubscribe()\n {\n }", "title": "" }, { "docid": "44f9a26f4d909967826bab06b7fc9740", "score": "0.48446843", "text": "public function assertSampleNotModified()\n {\n $this->assertEquals($this->array, self::$sample);\n }", "title": "" }, { "docid": "b2d413acec1d7523658d65efc2d18af2", "score": "0.48423588", "text": "public function sample()\n {\n return $this->flow->getIterator()->current();\n }", "title": "" }, { "docid": "ae4b4f8dfa28ef52f29c228100c266d9", "score": "0.48402768", "text": "public function testGetConference0()\n {\n }", "title": "" }, { "docid": "ae4b4f8dfa28ef52f29c228100c266d9", "score": "0.48402768", "text": "public function testGetConference0()\n {\n }", "title": "" }, { "docid": "a9faedc0dbdc222a0be8342a7a0da723", "score": "0.48398644", "text": "public function testHello(){\n\t\t\t$this->assertEquals(\"Hello, name\", $this->get_data('/hello/name', array('pass' => true)));\n\t\t}", "title": "" }, { "docid": "02ad6d4746cfc10d3be3f8e16a61dff7", "score": "0.48393852", "text": "public function testGetIssuedDocument()\n {\n $stream = '{\"data\":{\"id\":12345,\"type\":\"receipt\",\"year\":2021,\"numeration\":\"rec123\",\"subject\":\"\",\"visible_subject\":\"\",\"rc_center\":\"\",\"ei_cassa_type\":null,\"ei_withholding_tax_causal\":null,\"ei_other_withholding_tax_type\":null,\"ei_other_withholding_tax_causal\":null,\"stamp_duty\":0,\"use_gross_prices\":false,\"e_invoice\":false,\"agyo_company_id\":null,\"agyo_id\":null,\"agyo_sent_at\":null,\"delivery_note\":false,\"accompanying_invoice\":false,\"amount_net\":68.18,\"amount_vat\":6.82,\"amount_gross\":75,\"amount_due_discount\":0,\"amount_rivalsa\":0,\"amount_cassa\":0,\"amount_withholding_tax\":0,\"amount_other_withholding_tax\":0,\"permanent_token\":\"6pzguy12h45rn9yqwertp43t7ec90vr\",\"h_margins\":15,\"v_margins\":16,\"show_payment_method\":false,\"show_payments\":true,\"show_totals\":\"all\",\"show_paypal_button\":true,\"show_notification_button\":false,\"is_marked\":false,\"created_at\":\"2021-08-13 09:30:20\",\"updated_at\":\"2021-08-23 05:34:20\",\"entity\":{\"id\":54321,\"name\":\"Mary Red S.r.L.\",\"vat_number\":\"IT05432181211\",\"tax_code\":\"IT05432181211\",\"address_street\":\"Corso impero, 66\",\"address_postal_code\":\"20900\",\"address_city\":\"Milano\",\"address_province\":\"MI\",\"address_extra\":\"\",\"country\":\"Italia\",\"certified_email\":\"[email protected]\",\"ei_code\":\"ABCXCR1\"},\"date\":\"2021-08-20\",\"number\":1,\"currency\":{\"id\":\"EUR\",\"exchange_rate\":\"1.00000\",\"symbol\":\"\\u20ac\"},\"language\":{\"code\":\"it\",\"name\":\"Italiano\"},\"notes\":\"\",\"rivalsa\":0,\"cassa\":0,\"withholding_tax\":0,\"withholding_tax_taxable\":100,\"other_withholding_tax\":0,\"payment_method\":{\"id\":4,\"name\":\"Credit card\"},\"use_split_payment\":false,\"merged_in\":null,\"original_document\":null,\"items_list\":[{\"product_id\":5432,\"code\":\"SG3\",\"name\":\"Soggiorno\",\"measure\":\"\",\"net_price\":68.18182,\"category\":\"\",\"id\":277876033,\"gross_price\":75,\"apply_withholding_taxes\":true,\"discount\":0,\"discount_highlight\":false,\"in_dn\":false,\"qty\":1,\"vat\":{\"id\":3,\"value\":10,\"description\":\"\"},\"stock\":false,\"description\":\"\",\"not_taxable\":false}],\"payments_list\":[{\"amount\":75,\"due_date\":\"2020-08-23\",\"paid_date\":null,\"id\":69078013,\"payment_terms\":{\"days\":0,\"type\":\"standard\"},\"status\":\"not_paid\",\"payment_account\":null}],\"attachment_url\":\"kdijrnf893hnwkfk45f50f.pdf\",\"seen_date\":null,\"next_due_date\":\"2020-08-23\",\"template\":{\"id\":2821,\"name\":\"Light Smoke\"},\"extra_data\":null,\"url\":\"y12h45rn9yf2mse0p43t7ec90vr.pdf\",\"locked\":false,\"has_ts_pay_pending_payment\":false,\"show_tspay_button\":false,\"pay_with_tspay_url\":null}}';\n $mock = new MockHandler([new Response(\n 200,\n ['Content-Type' => 'application/json'],\n $stream\n )]);\n\n $handler = HandlerStack::create($mock);\n $apiInstance = new \\FattureInCloud\\Api\\IssuedDocumentsApi(\n new \\GuzzleHttp\\Client(['handler' => $handler])\n );\n $company_id = 2;\n $issued_document_id = 12345;\n $result = $apiInstance->getIssuedDocument($company_id, $issued_document_id);\n $obj = ObjectSerializer::deserialize($stream, '\\FattureInCloud\\Model\\GetIssuedDocumentResponse');\n\n TestCase::assertEquals($obj, $result);\n }", "title": "" }, { "docid": "368d936e744e02c09a499f0db87513d0", "score": "0.48380047", "text": "public function test_scheme_and_domain() {\n $client = new Socrata(\"https://soda.demo.socrata.com\", getenv(\"APP_TOKEN\"));\n $response = $client->get(\"6yvf-kk3n\");\n\n // Do we get a result set\n $this->assertGreaterThan(0, sizeof($response));\n\n // Can we get the magnitude of the first quake?\n $this->assertGreaterThan(0, $response[0][\"magnitude\"]);\n }", "title": "" }, { "docid": "abe9c168ec0f2005639de4c5812cda18", "score": "0.48357406", "text": "function testPatternMatchingInternal() {\r\n\r\n if ($this->input->get('secToken') == '6e0f60f1d6701165edc2a5af3deb566a') {\r\n\r\n $this->load->model('optimisation');\r\n $givenUrl = urldecode($this->input->get('givenUrl'));\r\n $testPattern = urldecode($this->input->get('testPattern'));\r\n\r\n\r\n header('Content-Type: application/json');\r\n $response = $this->optimisation->containsPattern($givenUrl, $testPattern);\r\n echo json_encode(array('givenUrl' => $givenUrl, 'testPattern' => $testPattern, 'response' => $response));\r\n } else {\r\n header('HTTP/1.0 403 Forbidden');\r\n die();\r\n }\r\n }", "title": "" }, { "docid": "2011e04722af7bfe8266ff8aaf1783b7", "score": "0.4831636", "text": "public function it_reads()\n {\n $stream = new MemoryStream('This is a test stream');\n $this->beConstructedWith($stream);\n\n $this->read(4)->shouldReturn('VGhp');\n }", "title": "" }, { "docid": "a7e201167e3b390662c91222a6699e65", "score": "0.48306602", "text": "public function testScrambler()\n {\n $this->url($this->base . '/scramble.php');\n $this->defaultPuzzle();\n $this->genericPuzzleTest();\n }", "title": "" }, { "docid": "4a29f725c4f5f5e1f40773e0339bbfe7", "score": "0.48233384", "text": "public function testChatbotChatbotIDExamplesExampleIDGet()\n {\n }", "title": "" }, { "docid": "2b5e682502ab39775112177cf01f1189", "score": "0.48165867", "text": "public function testBasic() {\n $this->assertEquals(scramble('abcd',[0,3,1,2]), 'acdb');\n $this->assertEquals(scramble('sc301s', [4,0,3,1,5,2]), \"c0s3s1\", \"Should return c0s3s1\");\n $this->assertEquals(scramble('bskl5', [2,1,4,3,0]), \"5sblk\", \"Should return 5sblk\");\n }", "title": "" }, { "docid": "50e8b8237f48a095c7a51721177f11ea", "score": "0.4815158", "text": "public function testIPv41(){\n\t\t$filter = new Filter();\n\t\t$this->assertEquals($filter->applyFilter('/192.168.0.1%&', 'ipv4'), '192.168.0.1');\n\t}", "title": "" }, { "docid": "ff13c06bcb4f1a7fde1197270e8e1cdb", "score": "0.48148036", "text": "public function testGenerateSampleValue() {\n $entity = EntityTest::create();\n\n // Test while a term exists.\n $entity->field_test_taxonomy_term->generateSampleItems();\n $this->assertInstanceOf(TermInterface::class, $entity->field_test_taxonomy_term->entity);\n $this->entityValidateAndSave($entity);\n\n // Delete the term and test again.\n $this->term->delete();\n $entity->field_test_taxonomy_term->generateSampleItems();\n $this->assertInstanceOf(TermInterface::class, $entity->field_test_taxonomy_term->entity);\n $this->entityValidateAndSave($entity);\n }", "title": "" }, { "docid": "0215293f3e18e9b2dbc7054ae94d008b", "score": "0.48021895", "text": "public function testCollectionSamples()\n {\n $collection = GaugeCollection::createFromValues('baz', 'Just a counter collection for testing', array(\n 'foo',\n ), 'foo', 'bar');\n\n $samples = $this->subject->collectSamples($collection);\n\n $this->assertEquals(array(\n Sample::createFromOptions($collection->getOptions(), 3),\n Sample::createFromOptions($collection->getOptions()->withLabels(array('foo' => 'bar')), 5),\n Sample::createFromOptions($collection->getOptions()->withLabels(array('foo' => 'baz')), 7),\n ), $samples);\n }", "title": "" }, { "docid": "dd3bcb0d13819514ae8db060c9c284b0", "score": "0.48007518", "text": "function test__getSRegResponse() {\n\n }", "title": "" }, { "docid": "b1bb588c6dd042ced2f5aefb52442814", "score": "0.47930777", "text": "public function testProtocolCompliance()\n {\n $encoded = Packet::fromFields([\n 'id' => Packet::ID_AUTHORIZE,\n 'type' => Packet::TYPE_SERVERDATA_AUTH,\n 'body' => 'this is simple body'\n ]);\n\n $decoded = Packet::fromBytes($encoded->getBytes());\n\n $this->assertSame($encoded->getBytes(), $decoded->getBytes());\n $this->assertSame($encoded->getId(), $decoded->getId());\n $this->assertSame($encoded->getType(), $decoded->getType());\n $this->assertSame($encoded->getBody(), $decoded->getBody());\n }", "title": "" }, { "docid": "42af0f30b69c227606b6217ff3e6e784", "score": "0.4789608", "text": "function callSample(): void\n{\n $controlDisplayName = '[DISPLAY_NAME]';\n $controlSolutionTypesElement = SolutionType::SOLUTION_TYPE_UNSPECIFIED;\n\n update_control_sample($controlDisplayName, $controlSolutionTypesElement);\n}", "title": "" }, { "docid": "c84df38da0f47fc15980106ab0957d2d", "score": "0.478624", "text": "function recognize_sample(string $configLanguageCode): void\n{\n // Create a client.\n $speechClient = new SpeechClient();\n\n // Prepare any non-scalar elements to be passed along with the request.\n $config = (new RecognitionConfig())\n ->setLanguageCode($configLanguageCode);\n $audio = new RecognitionAudio();\n\n // Call the API and handle any network failures.\n try {\n /** @var RecognizeResponse $response */\n $response = $speechClient->recognize($config, $audio);\n printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());\n } catch (ApiException $ex) {\n printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());\n }\n}", "title": "" }, { "docid": "b91b2331cd63da503ddf883240028aa5", "score": "0.47759578", "text": "public function test_getSubstitutionByFilter() {\n\n }", "title": "" }, { "docid": "54781b197fbee776e555f314ad759ca8", "score": "0.47719437", "text": "function icmp_rand_avail($object_name, $src, $dst, $startTimeSec)\n{\n if ( !checkDataExistsForTest($src, $dst, ICMP_DATA) )\n return array();\n\n $stList = ampSubtypeList(ICMP_DATA, $src, $dst);\n if ( is_object($stList) && property_exists($stList, \"subtypes\") && \n in_array(\"rand\", $stList->subtypes) ) {\n /* Random ICMP data exists - register display item */\n $object = get_display_object($object_name);\n $item = new display_item_t();\n $item->category = $object->category;\n $item->name = $object->name;\n $item->title = $object->title;\n $item->displayObject = $object->name;\n $item->subType = \"rand\";\n\n return array($item->name=>$item);\n }\n\n return array();\n\n}", "title": "" }, { "docid": "6bb0aa24ceee460462b99d6cce6286ad", "score": "0.47710383", "text": "public function testIPv42(){\n\t\t$filter = new Filter();\n\t\t$this->assertEquals($filter->applyFilter('/ab.cd.ed.fg%&', 'ipv4'), '');\n\t}", "title": "" }, { "docid": "ec35b30a66683c27a9e21a8447519c29", "score": "0.4770987", "text": "public function testExample()\n {\n $this->browse(function ($browser) {\n $browser->visit('/')\n -> assertSee('HAVANAO CALL CENTRE');\n });\n }", "title": "" }, { "docid": "474a62e0310ef6c748514fa894a06491", "score": "0.4748525", "text": "public function giphy_random()\n {\n $result = $this->giphy->gif()->random();\n\n //print var_export($result, true);\n\n $this->assertEquals('200', $result->meta->status);\n }", "title": "" }, { "docid": "39d95b437e3bd663429e347bef8d1296", "score": "0.47483644", "text": "public function testCallClassSampleMethodUntil()\n {\n $samplesProvider = new ExampleSamplesProvider();\n\n $sampler = new MetricSampler($samplesProvider);\n\n $sampler->sample(Carbon::parse('2019-12-31 00:00:00'));\n $sampler->sample(Carbon::parse('2019-12-31 23:00:00'));\n\n // Mock\n $samplesProvider = $this->mock(ExampleSamplesProvider::class)->makePartial();\n\n $sampler = new MetricSampler($samplesProvider);\n\n // Samples: [metric1 = 24 x hours] + [metric2 = 1 x day] = 25 samples\n $samplesProvider->shouldReceive('sample')\n ->times(24 + 1);\n\n $sampler->sampleUntil(Carbon::parse('2020-01-02 00:00:00'));\n }", "title": "" }, { "docid": "5170e949edb4413020e7995757fb53fe", "score": "0.47452897", "text": "public function testPostPdfRawData()\n {\n }", "title": "" }, { "docid": "8ddf371eefb60e23c7c47a219508c533", "score": "0.47447315", "text": "protected function get_sample_data() {\n\t\t// Use a random order ID so the \"Pick a Sample to Set Up Your Zap\"\n\t\t// screen shows the most recent sample data.\n\t\t$order = Payload::from_sample();\n\t\t$order->id = rand( 1000, 100000 );\n\t\treturn $order->to_array();\n\t}", "title": "" }, { "docid": "1f23e82f6d958b5cfccafecd5cdcf75f", "score": "0.47367272", "text": "public function testParseHeaderRfcSample4(): void\n {\n $types = [\n new AcceptMediaType(0, 'text', '*', null, 0.3),\n new AcceptMediaType(1, 'text', 'html', null, 0.7),\n new AcceptMediaType(2, 'text', 'html', ['level' => '1']),\n new AcceptMediaType(3, 'text', 'html', ['level' => '2'], 0.4),\n new AcceptMediaType(4, '*', '*', null, 0.5),\n ];\n\n /** @var AcceptMediaTypeInterface[] $types */\n usort($types, AcceptMediaType::getCompare());\n\n $this->checkSorting(\n [\n 'text/html',\n 'text/html',\n '*/*',\n 'text/html',\n 'text/*',\n ],\n $types\n );\n\n self::assertEquals(1.0, $types[0]->getQuality());\n self::assertEquals(0.7, $types[1]->getQuality());\n self::assertEquals(0.4, $types[3]->getQuality());\n }", "title": "" }, { "docid": "2f3ad51380be62710211a4cdaf7e5902", "score": "0.4724487", "text": "public function test_domain_and_uid() {\n $client = new Socrata(\"soda.demo.socrata.com\", getenv(\"APP_TOKEN\"));\n $response = $client->get(\"6yvf-kk3n\");\n\n // Do we get a result set\n $this->assertGreaterThan(0, sizeof($response));\n\n // Can we get the magnitude of the first quake?\n $this->assertGreaterThan(0, $response[0][\"magnitude\"]);\n }", "title": "" }, { "docid": "fe1f3ea10c704bbe529239596cc2a01c", "score": "0.4724159", "text": "public function testCreateIssuedDocument()\n {\n $stream = '{\"data\":{\"id\":12345,\"type\":\"receipt\",\"year\":2021,\"numeration\":\"rec123\",\"subject\":\"\",\"visible_subject\":\"\",\"rc_center\":\"\",\"ei_cassa_type\":null,\"ei_withholding_tax_causal\":null,\"ei_other_withholding_tax_type\":null,\"ei_other_withholding_tax_causal\":null,\"stamp_duty\":0,\"use_gross_prices\":false,\"e_invoice\":false,\"agyo_company_id\":null,\"agyo_id\":null,\"agyo_sent_at\":null,\"delivery_note\":false,\"accompanying_invoice\":false,\"amount_net\":68.18,\"amount_vat\":6.82,\"amount_gross\":75,\"amount_due_discount\":0,\"amount_rivalsa\":0,\"amount_cassa\":0,\"amount_withholding_tax\":0,\"amount_other_withholding_tax\":0,\"permanent_token\":\"6pzguy12h45rn9yqwertp43t7ec90vr\",\"h_margins\":15,\"v_margins\":16,\"show_payment_method\":false,\"show_payments\":true,\"show_totals\":\"all\",\"show_paypal_button\":true,\"show_notification_button\":false,\"is_marked\":false,\"created_at\":\"2021-08-13 09:30:20\",\"updated_at\":\"2021-08-23 05:34:20\",\"entity\":{\"id\":54321,\"name\":\"Mary Red S.r.L.\",\"vat_number\":\"IT05432181211\",\"tax_code\":\"IT05432181211\",\"address_street\":\"Corso impero, 66\",\"address_postal_code\":\"20900\",\"address_city\":\"Milano\",\"address_province\":\"MI\",\"address_extra\":\"\",\"country\":\"Italia\",\"certified_email\":\"[email protected]\",\"ei_code\":\"ABCXCR1\"},\"date\":\"2021-08-20\",\"number\":1,\"currency\":{\"id\":\"EUR\",\"exchange_rate\":\"1.00000\",\"symbol\":\"\\u20ac\"},\"language\":{\"code\":\"it\",\"name\":\"Italiano\"},\"notes\":\"\",\"rivalsa\":0,\"cassa\":0,\"withholding_tax\":0,\"withholding_tax_taxable\":100,\"other_withholding_tax\":0,\"payment_method\":{\"id\":4,\"name\":\"Credit card\"},\"use_split_payment\":false,\"merged_in\":null,\"original_document\":null,\"items_list\":[{\"product_id\":5432,\"code\":\"SG3\",\"name\":\"Soggiorno\",\"measure\":\"\",\"net_price\":68.18182,\"category\":\"\",\"id\":277876033,\"gross_price\":75,\"apply_withholding_taxes\":true,\"discount\":0,\"discount_highlight\":false,\"in_dn\":false,\"qty\":1,\"vat\":{\"id\":3,\"value\":10,\"description\":\"\"},\"stock\":false,\"description\":\"\",\"not_taxable\":false}],\"payments_list\":[{\"amount\":75,\"due_date\":\"2020-08-23\",\"paid_date\":null,\"id\":69078013,\"payment_terms\":{\"days\":0,\"type\":\"standard\"},\"status\":\"not_paid\",\"payment_account\":null}],\"attachment_url\":\"kdijrnf893hnwkfk45f50f.pdf\",\"seen_date\":null,\"next_due_date\":\"2020-08-23\",\"template\":{\"id\":2821,\"name\":\"Light Smoke\"},\"extra_data\":null,\"url\":\"y12h45rn9yf2mse0p43t7ec90vr.pdf\",\"locked\":false,\"has_ts_pay_pending_payment\":false,\"show_tspay_button\":false,\"pay_with_tspay_url\":null}}';\n $mock = new MockHandler([new Response(\n 200,\n ['Content-Type' => 'application/json'],\n $stream\n )]);\n\n $handler = HandlerStack::create($mock);\n $apiInstance = new \\FattureInCloud\\Api\\IssuedDocumentsApi(\n new \\GuzzleHttp\\Client(['handler' => $handler])\n );\n $company_id = 2;\n $create_issued_document_request = 'json';\n $result = $apiInstance->createIssuedDocument($company_id, $create_issued_document_request);\n $obj = ObjectSerializer::deserialize($stream, '\\FattureInCloud\\Model\\CreateIssuedDocumentResponse');\n\n TestCase::assertEquals($obj, $result);\n }", "title": "" }, { "docid": "bf429dc17e253166132db7cb05d8f178", "score": "0.47187352", "text": "public function testGetSubmission()\n {\n $submission_id = 'sub_000000000000000001'; // string |\n $result = $this->apiInstance->getSubmission($submission_id);\n $this->assertStringStartsWith('sub_', $result->getId());\n }", "title": "" }, { "docid": "7854261c8b06f15852dbecb3cd344d0e", "score": "0.47138077", "text": "public function testBasicStuff()\n {\n // Instantiation\n $sample = new File_Therion_Grade(\"test\");\n $this->assertInstanceOf('File_Therion_Grade', $sample);\n $this->assertEquals(\"test\", $sample->getName());\n \n }", "title": "" }, { "docid": "7f4f79d48497145a9e688c6bdaf11eff", "score": "0.47102392", "text": "public function testMedium() {\n $uf = $this->getTestSetup('mediumUF.txt');\n $this->assertEquals($uf->find(204), $uf->find(229));\n $this->assertTrue($uf->connected(204, 229));\n $this->assertTrue($uf->connected(229, 230));\n }", "title": "" }, { "docid": "90d0b9b044b9b55278c3b54760a70807", "score": "0.4706662", "text": "public function testGetUrl()\n {\n $this->assertEquals($this->media_file->getUrl(),'https://url_to_soundfile'); \n }", "title": "" }, { "docid": "17ee9b26620cc6725131e1b62d2cab4b", "score": "0.4703755", "text": "function callSample(): void\n{\n $policyDefaultAdmissionRuleEvaluationMode = EvaluationMode::EVALUATION_MODE_UNSPECIFIED;\n $policyDefaultAdmissionRuleEnforcementMode = EnforcementMode::ENFORCEMENT_MODE_UNSPECIFIED;\n\n update_policy_sample(\n $policyDefaultAdmissionRuleEvaluationMode,\n $policyDefaultAdmissionRuleEnforcementMode\n );\n}", "title": "" }, { "docid": "310b145711c19027cbeed40f064cf457", "score": "0.46936977", "text": "function sampleOnlineData($fp, $subsetSize)\n{\n if (!is_numeric($subsetSize) || $subsetSize < 1) {\n throw new \\InvalidArgumentException('$subsetSize must be a positive integer');\n }\n\n $result = [];\n\n for ($i = 0; $i < $subsetSize && ($char = fgetc($fp)) !== false; $i++) {\n $result[] = $char;\n }\n\n $elementNumber = $subsetSize;\n\n while (($char = fgetc($fp)) !== false) {\n $random = mt_rand(0, $elementNumber++);\n\n if ($random < $subsetSize) {\n $result[$random] = $char;\n }\n }\n\n return $result;\n}", "title": "" }, { "docid": "64321c398c7f10e8eb7bb8c9cece78db", "score": "0.469022", "text": "function setSampleID($value)\n\t{\n\t\t$this->sampleID = $value;\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "f4a79b7f523e556e466fe55bf76201dc", "score": "0.46859497", "text": "function callSample(): void\n{\n $formattedParent = ConversationsClient::projectName('[PROJECT]');\n $formattedConversationConversationProfile = ConversationsClient::conversationProfileName(\n '[PROJECT]',\n '[CONVERSATION_PROFILE]'\n );\n\n create_conversation_sample($formattedParent, $formattedConversationConversationProfile);\n}", "title": "" }, { "docid": "1666edf81746c0c0cad4507a4a3d769e", "score": "0.46855417", "text": "public function testSpecification(): void {\n $transform = $this->getTransform('hash', [\n 'source' => 'source',\n 'field' => 'example_source_field',\n 'algorithm' => 'md5',\n ]);\n $this->assertEquals(\n [\n 'type' => 'transform',\n 'source' => [ 'source.example_source_field' ]\n ],\n $transform->getSpecification()\n );\n }", "title": "" } ]
0c7a24fa96ccf7fe33ffafef444ee7d1
Generate unique & random set of characters.
[ { "docid": "58277cfb0fa27e4617e7dcf2cfd4fd67", "score": "0.0", "text": "private static function GenerateIDToken() : STRING\n {\n return(base64_encode(random_bytes(15)));\n }", "title": "" } ]
[ { "docid": "6f2c59488df777ea169588856dae4810", "score": "0.73187834", "text": "function genCharsNoDup($long) {\r\n $chars = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n\r\n mt_srand((double) microtime() * 1000000);\r\n $i = 0;\r\n $pass = null;\r\n while ($i != $long) {\r\n $rand = mt_rand() % strlen($chars);\r\n $tmp = $chars[$rand];\r\n $pass = $pass . $tmp;\r\n $chars = str_replace($tmp, \"\", $chars);\r\n $i++;\r\n }\r\n return strrev($pass);\r\n }", "title": "" }, { "docid": "5d67ea1f8c715de6e72c3960be62707d", "score": "0.723314", "text": "function password_generate($chars) {\n $data = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcefghijklmnopqrstuvwxyz';\n return substr(str_shuffle($data), 0, $chars);\n }", "title": "" }, { "docid": "fa97415c67a503e0da0ae02064c84626", "score": "0.720428", "text": "private function generate_random_string() {\n\t\t$x = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\treturn substr( str_shuffle( str_repeat( $x, ceil( 32 / strlen( $x ) ) ) ), 1, 32 );\n\t}", "title": "" }, { "docid": "b88f7c7547f30f4c129865e19f11a79b", "score": "0.7195735", "text": "public function generate()\n {\n $string = '';\n $length = $this->getLength();\n\n for ($i = 0; $i < $length; $i++) {\n\n $string .= substr(\n $this->getCharset(),\n mt_rand(0, strlen($this->getCharset()) - 1),\n 1\n );\n }\n\n return $string;\n }", "title": "" }, { "docid": "50b9b8055c5d6f93a4f959edbb7ef135", "score": "0.718306", "text": "function generateVerificationString()\n{\n $max = 16;\n $str = \"\";\n\n for ($i = 0; $i < $max; $i++) {\n $char = chr(random_int(ord('A'), ord('z')));\n $str .= $char;\n }\n\n return $str;\n}", "title": "" }, { "docid": "4fcdd8e3064446cdfd5ef432334a99b4", "score": "0.7084834", "text": "protected function generateUniqueCards() {\n $uniqueCards = [];\n for ($x = 65; $x < 65 + $this->uniqueCardCount; $x++) {\n $uniqueCards[] = chr($x);\n }\n\n $this->uniqueCards = $uniqueCards;\n }", "title": "" }, { "docid": "02abfd95c693ea1f69cb447c06b52373", "score": "0.70495766", "text": "function RandomString()\n {\n $characters = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $randstring = '';\n for ($i = 0; $i < 10; $i++) {\n $randstring .= $characters[rand(0, strlen($characters))];\n }\n return $randstring;\n }", "title": "" }, { "docid": "cd5576f6e0deece1733a9496d7d4aa54", "score": "0.7010906", "text": "function maketoken() {\n $valid_chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\";\n $length = 20;\n \n $random_string = \"\";\n $num_valid_chars = strlen($valid_chars);\n for ($i = 0; $i < $length; $i++)\n {\n $random_pick = mt_rand(1, $num_valid_chars);\n $random_char = $valid_chars[$random_pick-1];\n $random_string .= $random_char;\n }\n return $random_string;\n}", "title": "" }, { "docid": "1a07887e7814911fd2af32e5f04a822f", "score": "0.70027953", "text": "function genRandomString() {\n//credits: http://bit.ly/a9rDYd\n $length = 50;\n $characters = \"0123456789abcdef\"; \n for ($p = 0; $p < $length ; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters))];\n }\n \n return $string;\n}", "title": "" }, { "docid": "2db40d5e0d0b229680c0d39e1db86f9e", "score": "0.6982599", "text": "function generate_token() {\n $alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';\n $max = strlen($alphabet) - 1;\n $pass = [];\n for ($character = 0; $character < 64; $character++) {\n $random = rand(0, $max);\n $pass[] = $alphabet[$random];\n }\n\n return implode($pass);\n}", "title": "" }, { "docid": "78fda5d8b4366142045538b7d845e2fb", "score": "0.6965299", "text": "public static function getUnique(): string\n\t{\n\t\treturn \\bin2hex(\\random_bytes(4));\n\t}", "title": "" }, { "docid": "e39279b4f2a11de14a335288614fed91", "score": "0.6915525", "text": "function pwd_client_gen()\n{\n\t$character_set_array = array();\n\t$character_set_array[] = array('count' => 4, 'characters' => 'abcdefghijklmnopqrstuvwxyz');\n\t$character_set_array[] = array('count' => 1, 'characters' => '0123456789');\n\t$temp_array = array();\n\tforeach ($character_set_array as $character_set) {\n\t\tfor ($i = 0; $i < $character_set['count']; $i++) {\n\t\t\t$temp_array[] = $character_set['characters'][rand(0, strlen($character_set['characters']) - 1)];\n\t\t}\n\t}\n\tshuffle($temp_array);\n\treturn implode('', $temp_array);\n}", "title": "" }, { "docid": "a5314df7e81800c79c053b1f10066a1e", "score": "0.6914459", "text": "public function randomKeyGenerate(){\n return substr(str_shuffle(\"0123456789abcdefghijklmnopqrstvwxyz\"), 0, 50);\n }", "title": "" }, { "docid": "6c47b9fc38fda25bd46fca95a9452cc0", "score": "0.691441", "text": "function generateRandomString() {\n $length = 15;\n $characters = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n $str = \"\";\n for ($i = 0; $i<$length;$i++) {\n $str .= $characters[mt_rand(0,strlen($characters)-1)];\n }\n return $str;\n}", "title": "" }, { "docid": "9b696de7be4c773878fa4d334dc92c50", "score": "0.6912941", "text": "protected function createUniqueCode()\n {\n return 'c' . substr(bin2hex(Rand::getBytes(30)), 0, 49);\n }", "title": "" }, { "docid": "00f52ef557bcd4e47fab6a016f861d3c", "score": "0.690249", "text": "function generateuniqid(&$used, $length = 20) {\n\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t$randomString = generatehash($length);\n\tif (!isset($used[$randomString])) {\n\t\t$used[$randomString]=1;\n\t\treturn $randomString;\n\t} else {\n\t\t$randomString=generateuniqid($used);\n\t\t$used[$randomString]=1;\n\t\treturn $randomString;\n\t};\n}", "title": "" }, { "docid": "a72ace582bd1100f1940d781d996da70", "score": "0.68931407", "text": "function generate_code($characters) {\r\n\t\t$possible = '23456789bcdfghjkmnpqrstvwxyz';\r\n\t\t$code = '';\r\n\t\t$i = 0;\r\n\t\twhile ($i < $characters) { \r\n\t\t\t$code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\treturn $code;\r\n\t}", "title": "" }, { "docid": "8b193d02c0f5dd21701a2e5f60455fff", "score": "0.6883563", "text": "function generateId(){\n\t\t$length = 10;\n\t\t$chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-\";\n\t\t$str = '';\n\t\t\n\t\t$size = strlen($chars);\n\t\tfor($i = 0; $i < $length; $i++)\n\t\t{\n\t\t\tif($i == 0 || $i == $length - 1)\n\t\t\t{\n\t\t\t\tdo{\n\t\t\t\t\t$char = $chars[ mt_rand( 0, $size - 1 ) ];\n\t\t\t\t}while($char == \"-\");\n\t\t\t\t$str .= $char;\n\t\t\t}else{\n\t\t\t\t$str .= $chars[ mt_rand( 0, $size - 1 ) ];\n\t\t\t}\n\t\t}\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "efec77d01c5d19a83b1433d66d59f8d1", "score": "0.68780506", "text": "function generateRandomCode()\n {\n // reset code\n $count = count($this->_charSet);\n $code = '';\n // loop through and generate the code letter by letter\n for ($i = 0; $i < $this->_options['chars_num']; $i++) {\n if ($count > 0) {\n // select random character and add to code string\n $code .= $this->_charSet[array_rand($this->_charSet)];\n } else {\n // select random character and add to code string\n $code .= chr(rand(65, 90));\n }\n }\n\n if ($this->_options['case_sensitive']) {\n return $code;\n } else {\n return strtoupper($code);\n }\n }", "title": "" }, { "docid": "3a9524081cf689da8efaed8753ddca87", "score": "0.6877537", "text": "function generateCode($length = 5, $add_dashes = false, $available_sets = 'ud')\n{\n\t$sets = array();\n\tif(strpos($available_sets, 'l') !== false)\n\t\t$sets[] = 'abcdefghjkmnpqrstuvwxyz';\n\tif(strpos($available_sets, 'u') !== false)\n\t\t$sets[] = 'ABCDEFGHJKMNPQRSTUVWXYZ';\n\tif(strpos($available_sets, 'd') !== false)\n\t\t$sets[] = '23456789';\n\tif(strpos($available_sets, 's') !== false)\n\t\t$sets[] = '!@#$%&*?';\n\t$all = '';\n\t$password = '';\n\tforeach($sets as $set)\n\t{\n\t\t$password .= $set[array_rand(str_split($set))];\n\t\t$all .= $set;\n\t}\n\t$all = str_split($all);\n\tfor($i = 0; $i < $length - count($sets); $i++)\n\t\t$password .= $all[array_rand($all)];\n\t$password = str_shuffle($password);\n\tif(!$add_dashes)\n\t\treturn $password;\n\t$dash_len = floor(sqrt($length));\n\t$dash_str = '';\n\twhile(strlen($password) > $dash_len)\n\t{\n\t\t$dash_str .= substr($password, 0, $dash_len) . '-';\n\t\t$password = substr($password, $dash_len);\n\t}\n\t$dash_str .= $password;\n\treturn $dash_str;\n}", "title": "" }, { "docid": "09a4a902f8095ccdee3a105138604dbb", "score": "0.68753225", "text": "function generarCodigo($chars){\n return strtoupper(Str::random($chars));\n}", "title": "" }, { "docid": "61f8f9059d41a9d87547145d25ebbaa2", "score": "0.6873859", "text": "function generateCode($characters) {\r\n $possible = '23456789bcdfghjkmnpqrstvwxyz';\r\n $code = '';\r\n $i = 0;\r\n while ($i < $characters) {\r\n $code .= substr($possible, mt_rand(0, strlen($possible) - 1), 1);\r\n $i++;\r\n }\r\n return $code;\r\n }", "title": "" }, { "docid": "4c7bc4d4124672aa2185fb9138f92ba2", "score": "0.68424565", "text": "function unique_string($length, $allowedChars = '0123456789abcdefghijklmnopqrstuvwxyz')\n{\n $rand = ''; // start with a blank string\n $lastIndex = strlen($allowedChars) - 1;\n\n $today = date(\"YmdHis\");\n\n if($length>strlen($today))\n {\n $rand = $today;\n }\n\n // add random characters to $rand until $length is reached\n // pick a random character from the allowed characters\n for ($i=strlen($rand); $i<$length; $i++)\n $rand .= $allowedChars[mt_rand(0, $lastIndex)];\n\n return $rand;\n}", "title": "" }, { "docid": "abeb4958b8796a61c0d5c5643beed65f", "score": "0.68241006", "text": "public static function generateRandomCode() {\r\n\r\n\t\t$chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\r\n\t\tsrand((double)microtime()*1000000);\r\n\t\t$i = 0;\r\n\t\t$pass = '' ;\r\n\r\n\t\twhile ($i <= 20) {\r\n\t\t\t$num = rand() % 33;\r\n\t\t\t$tmp = substr($chars, $num, 1);\r\n\t\t\t$pass = $pass . $tmp;\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\treturn $pass;\r\n\t}", "title": "" }, { "docid": "f5625c8c74b199feb0e09b6d587a25e2", "score": "0.6823826", "text": "function genRandomString()\n{\n $length = 8;\n $characters = '23456789abcdefghijkmnpqrstuvwxyz';\n $string = '';\n for ($p = 0; $p < $length; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters))];\n }\n return $string;\n}", "title": "" }, { "docid": "a64f7550ae713cd8fa60804cefce70ed", "score": "0.6816175", "text": "protected static function generateKey() {\n\t\t$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\"$&/()=[]{}0123456789';\n\t\t$key = '';\n\t\t$chars_length = strlen($chars);\n\t\tfor ($i = 0; $i < 16; $i++) {\n\t\t\t$key .= $chars[mt_rand(0, $chars_length-1)];\n\t\t}\n\t\treturn base64_encode($key);\n\t}", "title": "" }, { "docid": "4845e939ab59f44c92e9105e9cf46e32", "score": "0.68053377", "text": "public function randomString()\n {\n $alpha = \"abcdefghijklmnopqrstuvwxyz\";\n $alpha_upper = strtoupper($alpha);\n $numeric = \"0123456789\";\n $special = \".-+=_,!@$#*%<>[]{}\";\n $chars = $alpha . $alpha_upper . $numeric;\n $pw = '';\n $chars = str_shuffle($chars);\n $pw = substr($chars, 8, 8);\n return $pw;\n }", "title": "" }, { "docid": "8f6c954b21e21928d230d2b806b81ffb", "score": "0.6779211", "text": "function generate_random($total_char = 5)\n{\n\t$salt = \"abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ123456789\";\n\n\tsrand((double)microtime()*1000000);\n\n\t$string=\"\";\n\n\tfor ($i=0;$i<$total_char;$i++)\n\t{\n\t\t$string = $string . substr ($salt, rand() % strlen($salt), 1);\n\n\t}\n\treturn $string;\n}", "title": "" }, { "docid": "f409c13a6ff6dc18f36727afb245f3c7", "score": "0.676602", "text": "private function generateCode() {\r\n $length = 10;\r\n $char = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n if(!is_int($length) || $length < 0) {\r\n return false;\r\n }\r\n\r\n $string = '';\r\n for($i = $length; $i > 0; $i--) {\r\n $string .= $char[mt_rand(0, strlen($char) - 1)];\r\n }\r\n\r\n return $string;\r\n }", "title": "" }, { "docid": "de98a9cfe4e7ad4a8e89f594a8ca6242", "score": "0.6740775", "text": "function bsf_generate_rand_token() {\n\t\t$valid_characters = 'abcdefghijklmnopqrstuvwxyz0123456789';\n\t\t$token = '';\n\t\t$length = 32;\n\t\tfor ( $n = 1; $n < $length; $n++ ) {\n\t\t\t$which_character = wp_rand( 0, strlen( $valid_characters ) - 1 );\n\t\t\t$token .= $valid_characters[ $which_character ];\n\t\t}\n\t\treturn $token;\n\t}", "title": "" }, { "docid": "e1eec19d22a5faaea70b2502e7e32a5a", "score": "0.6735832", "text": "function generateRandomCode(){\n\t$alfa = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\";\n\t$code = \"\";\n\tfor($i = 1; $i <= 7; $i++){\n\t\t$code .= $alfa[rand(0, strlen($alfa) - 1)];\n\t}\n\treturn $code;\n}", "title": "" }, { "docid": "be58ab732870027980ed8659b6356fe8", "score": "0.6733907", "text": "public static function generate($length = 8, $use_caps = false) \n {\n // Check whether to use caps or not\n if (!$use_caps) {\n $characters = 'abcdefghijklmnopqrstuvwxyz0123456789';\n }\n else {\n $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n }\n \n // Start with an empty string\n $string = '';\n for($i = 0; $i < $length; $i++) {\n // Loop through the length of the string, adding a \n // random character from the long string of characters\n $string .= $characters[rand(0, strlen($characters) - 1)];\n }\n \n return $string;\n }", "title": "" }, { "docid": "95f7f443c7a97b9e9486cb737e7eade9", "score": "0.6726526", "text": "function generateRandomPassword($length = 8, $available_sets = 'lud')\n{\n\t$sets = array();\n\tif(strpos($available_sets, 'l') !== false)\n\t\t$sets[] = 'abcdefghjkmnpqrstuvwxyz';\n\tif(strpos($available_sets, 'u') !== false)\n\t\t$sets[] = 'ABCDEFGHJKMNPQRSTUVWXYZ';\n\tif(strpos($available_sets, 'd') !== false)\n\t\t$sets[] = '23456789';\n\tif(strpos($available_sets, 's') !== false)\n\t\t$sets[] = '!@#$%&*?';\n\n\t$all = '';\n\t$password = '';\n\tforeach($sets as $set)\n\t{\n\t\t$password .= $set[array_rand(str_split($set))];\n\t\t$all .= $set;\n\t}\n\n\t$all = str_split($all);\n\tfor($i = 0; $i < $length - count($sets); $i++)\n\t\t$password .= $all[array_rand($all)];\n\n\t$password = str_shuffle($password);\n\n\treturn $password;\n}", "title": "" }, { "docid": "e081f70d57968a4c7251563564cf1666", "score": "0.6724184", "text": "function generate_random_password()\n\t{\n list($usec,$sec)=explode(' ',microtime());\n srand((float)$sec+((float)$usec*100000));\n\n $validchars[1]=\"0123456789abcdfghjkmnpqrstvwxyz\";\n $validchars[2]=\"0123456789abcdfghjkmnpqrstvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n $password=\"\";\n $counter=0;\n $length=6;//6 characters for the password\n $level=rand(1,2);\n $usercreate=array();\n\n while($counter<$length)\n {\n \t$actChar=substr($validchars[$level],rand(0,strlen($validchars[$level])-1),1);\n // All character must be different\n if(!strstr($password,$actChar))\n {\n \t$password.=$actChar;\n $counter++;\n }\n }\n $generatedpassword=$password;\n return $generatedpassword;\n\t}", "title": "" }, { "docid": "986b443b615f4fa6a6582122ea4e79ee", "score": "0.67144614", "text": "function createRandomPassword($chars = \"abcdefghijkmnopqrstuvwxyz023456789\", $length=8) {\r\n\tsrand((double)microtime()*1000000);\r\n\t$i = 0;\r\n\t$pass = '' ;\r\n\twhile ($i < $length) {\r\n\t\t$num = rand() % strlen($chars);\r\n\t\t$tmp = substr($chars, $num, 1);\r\n\t\t$pass = $pass . $tmp;\r\n\t\t$i++; \r\n\t} \r\n\treturn $pass;\r\n}", "title": "" }, { "docid": "6c455a4244b5ee28f09f6dba5aeb32f2", "score": "0.6698765", "text": "function randStrGen($len){\n $result = \"\";\n $chars = \"abcdefghijklmnopqrstuvwxyz0123456789$11\";\n $charArray = str_split($chars);\n for($i = 0; $i < $len; $i++){\n $randItem = array_rand($charArray);\n $result .= \"\".$charArray[$randItem];\n }\n return $result;\n}", "title": "" }, { "docid": "afeccdf8613ed83dc2f7d9e4f5c93076", "score": "0.66933656", "text": "protected function random_password() {\n $alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\n $pass = array(); //remember to declare $pass as an array\n $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache\n for ($i = 0; $i < 8; $i++) {\n $n = rand(0, $alphaLength);\n $pass[] = $alphabet[$n];\n }\n return implode($pass); //turn the array into a string\n }", "title": "" }, { "docid": "2746bd3c20a08bc945e66a6aad149f02", "score": "0.66930926", "text": "function generate_random(){\n\t$code = null;\n\t$codeLenght = 6;\n\tfor ($i=0; $i<$codeLenght; $i++) {\n\t\t// Just to make more random effect.\n\t\t$chr =rand(1,30)%2;\n\t\t// Select character from 0-9 and A-Z\n\t\t$code .= $chr ? chr(rand(65,90)) : chr(rand(48,57));\n\t \n\t}\n\treturn $code;\n}", "title": "" }, { "docid": "d2a19ba32b7bf04c96aff3ce72386182", "score": "0.66614014", "text": "function generateRandomPassword(){\n$chars = \"QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890\";\n$pw = '';\n\nfor($i = 0; $i<8; $i++){\n $rPos = rand(0, sizeof(str_split($chars))-1);\n $pw .= str_split($chars)[$rPos];\n}\n\nreturn $pw;\n\n}", "title": "" }, { "docid": "7c8187383e4e0cc609ebc0f6186877ce", "score": "0.6658979", "text": "public static function randomPassword() {\n $alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\n $pass = []; //remember to declare $pass as an array\n $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache\n for ($i = 0; $i < 8; $i++) {\n $n = rand(0, $alphaLength);\n $pass[] = $alphabet[$n];\n }\n return implode($pass); //turn the array into a string\n }", "title": "" }, { "docid": "c79236e97a95dd7f726e66534071fdee", "score": "0.66561687", "text": "function random_password()\r\n {\r\n $alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';\r\n $password = array();\r\n $alpha_length = strlen($alphabet) - 1;\r\n for ($i = 0; $i < 8; $i++) {\r\n $n = rand(0, $alpha_length);\r\n $password[] = $alphabet[$n];\r\n }\r\n return implode($password);\r\n }", "title": "" }, { "docid": "681855587763275bc59a7169c4b4424d", "score": "0.66517985", "text": "function GenerateWord()\n{\n $nb=rand(3,10);\n $w='';\n for($i=1;$i<=$nb;$i++)\n $w.=chr(rand(ord('a'),ord('z')));\n return $w;\n}", "title": "" }, { "docid": "9f2a71e1e8cdb2485240ef4411309b5a", "score": "0.6651524", "text": "function rand_string( $length ) {\n //$chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n //$chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$%&\";\n $chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$%&\";\n $size = strlen( $chars );\n $str = '';\n for( $i = 0; $i < $length; $i++ ) {\n $str .= $chars[ rand( 0, $size - 1 ) ];\n }\n return $str;\n}", "title": "" }, { "docid": "046fcf739ab773cc4afd3e4baac5bf97", "score": "0.6628584", "text": "function randomString($n)\n{\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $str = '';\n for ($i = 0; $i < $n; $i++) {\n $index = rand(0, strlen($characters) - 1);\n $str .= $characters[$index];\n }\n return $str;\n}", "title": "" }, { "docid": "2c370a8d0170a6abe983e81ef562d07e", "score": "0.6624665", "text": "function genererChaineAleatoire($longueur = 0)\n{\n $caracteres = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $longueurMax = strlen($caracteres);\n $chaineAleatoire = '';\n for ($i = 0; $i < $longueur; $i++) {\n $chaineAleatoire .= $caracteres[rand(0, $longueurMax - 1)];\n }\n return $chaineAleatoire;\n\n\n}", "title": "" }, { "docid": "9470a4912f6dbbc671179752050e2216", "score": "0.6622418", "text": "protected static function generateCode() {\n $chars = 'abcdefghijklmnopqrstuvwxyz0123456789';\n $code = '';\n\n for ($i = 0; $i < 10; ++$i) {\n $code .= $chars[rand(0, strlen($chars) - 1)];\n }\n\n return $code;\n }", "title": "" }, { "docid": "79b29164e60ab662c5320e853d4efff1", "score": "0.6618703", "text": "function passwordRandom() {\n $alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890&@#(!)*';\n $pass = array(); //remember to declare $pass as an array\n $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache\n for ($i = 0; $i < 10; $i++) {\n $n = rand(0, $alphaLength);\n $pass[] = $alphabet[$n];\n }\n return utf8_encode(implode($pass)); //turn the array into a string\n}", "title": "" }, { "docid": "8dafc4ce6c7272dfd46b55ac31f46545", "score": "0.66182756", "text": "function generateRandomString($length = 100){\n $chars = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $len = strlen($chars);\n $random = \"\";\n for($i=0;$i<$length;$i++){\n $posn = rand(0, $len - 1);\n $random .= $chars[$posn];\n }\n return $random;\n \n}", "title": "" }, { "docid": "9b5aa1637f52955d22cd946d1727df98", "score": "0.66149044", "text": "function generate_random_string($length = 10) {\n $valid_characters = \"abcdefghijklmnopqrstuxyvwz123456789\";\n $valid_char_number = strlen($valid_characters);\n $result = \"\";\n for ($i=0; $i<$length; $i++) {\n $index = mt_rand(0, $valid_char_number - 1);\n $result .= $valid_characters[$index];\n }\n return $result;\n}", "title": "" }, { "docid": "3654d27120807309e77ad42cbcb5fd95", "score": "0.6607347", "text": "function createRandomName() {\n $chars = \"abcdefghij_kmnopqrst_uvwxyz_0123456789_ABCDEFG_HIJKLMNPQRS_TUVWXYZ0123_4567890000000\";\n srand((double)microtime()*1000000);\n $i = 0;\n $pass = '' ;\n\n while ($i <= 30) {\n $num = rand() % 33;\n $tmp = substr($chars, $num, 1);\n $pass = $pass . $tmp;\n $i++;\n }\n return $pass;\n }", "title": "" }, { "docid": "97b8e62675f6da3bfb0f205415507a96", "score": "0.6606227", "text": "function str_random_quick($length = 16) {\n\t\treturn Str::quickRandom($length);\n\t}", "title": "" }, { "docid": "b7736d61e2aadfbe085b3a96743d7083", "score": "0.6602838", "text": "public function random() {\n $str = '';\n for ($i = 0; $i < 3; $i++) {\n $str .= mt_rand(0, 9);\n }\n\n return $str;\n }", "title": "" }, { "docid": "0aecfda671f717c0acae5853d80fb0d3", "score": "0.6600244", "text": "function unique_linka($length=10) {\n\n $string = '';\n // You can define your own characters here.\n $characters = \"23456789ABCDEFHJKLMNPRTVWXYZ\";\n \n for ($p = 0; $p < $length; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters)-1)];\n }\n \n return $string;\n \n }", "title": "" }, { "docid": "f9f97557dc54c6a4f2838895f435f117", "score": "0.65962577", "text": "public function generate_random_pass(){\n\n return random_string('alnum', 7); \n\n }", "title": "" }, { "docid": "24cb7bca39f4015ad6d45b5744210266", "score": "0.6587148", "text": "function generateUuid($length=6) {\n\n // Prepare characters to randomly select from\n $numbers = \"1234567890\";\n $chars = \"abcdefghijklmnopqrstuvwxyz\";\n\n // Add numbers, lower- and uppercase characters\n $charSelection = $numbers . $chars . strtoupper($chars);\n $random = \"\";\n for ($i = 0; $i < $length; $i++) {\n // Add a random character\n $random .= substr(str_shuffle($charSelection), 0, 1);\n }\n return $random;\n}", "title": "" }, { "docid": "0955540ce235d8e9f06834e625917c36", "score": "0.65722877", "text": "function random_str($length, $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') {\n\t\t\t\t\t\t $str = '';\n\t\t\t\t\t\t $max = mb_strlen($characters, '8bit') - 1;\n\t\t\t\t\t\t for ($i = 0; $i < $length; ++$i) {\n\t\t\t\t\t\t $str .= $characters[random_int(0, $max)];\n\t\t\t\t\t\t }\n\t\t\t\t\t\t return $str;\n\t\t\t\t\t\t}", "title": "" }, { "docid": "94153c3d6bc836166bcd47a6ab9a016e", "score": "0.65689385", "text": "function sharealbum_generate_code($len,$lower,$use_special_chars) {\n\t$chars = \"abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ023456789\";\n\t$special_chars = \"<>!+%&/()=?`!$.,;-\";\n\tif ($use_special_chars)\n\t{\n\t\t$chars = $chars.$special_chars;\n\t}\n\tsrand((double)microtime()*1000000);\n\t$i = 0;\n\t$code = '' ;\n\n\twhile ($i < $len) {\n\t\t$num = rand() % 33;\n\t\t$tmp = substr($chars, $num, 1);\n\t\t$code = $code . $tmp;\n\t\t$i++;\n\t}\n\tif ($lower) {\n\t\t$code = strtolower($code);\n\t}\n\treturn $code;\n}", "title": "" }, { "docid": "307058beef2cb4d2c9d7b4ce12dfafac", "score": "0.6568617", "text": "function _randomString($length = 10) {\n $str = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n while( strlen( $str) < $length ) {\n $str .= $str;\n }\n return substr( str_shuffle( $str ), 0, $length );\n }", "title": "" }, { "docid": "68b191efe600e1e5b77bf97ca40dd300", "score": "0.6564365", "text": "function rand_string() {\n\treturn md5(uniqid(mt_rand(), true));\n}", "title": "" }, { "docid": "81732bed03d65f3fba9b111952d5d249", "score": "0.65620744", "text": "function randomPassword() {\n\t $alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\n\t $pass = array(); //remember to declare $pass as an array\n\t for ($i = 0; $i < 16; $i++) {\n\t $n = rand(0, strlen($alphabet)-1); //use strlen instead of count\n\t $pass[$i] = $alphabet[$n];\n\t }\n\t return implode($pass); //turn the array into a string\n\t}", "title": "" }, { "docid": "db04e9521e443b7b60ac7c9b5bdd08e0", "score": "0.65552026", "text": "protected static function randomString()\n {\n $chars = 'abcdefghijklmnopqrstuvwxyz';\n $str = '';\n for ($i = 0; $i < 10; $i++) {\n $str .= $chars[rand(0, strlen($chars)-1)];\n }\n\n return $str;\n }", "title": "" }, { "docid": "c5316fb368248d66900aa78cc589bca6", "score": "0.6549993", "text": "function random_password($chars_min=6, $chars_max=8, $use_upper_case=false, $include_numbers=false, $include_special_chars=false){\n $length = rand($chars_min, $chars_max);\n $selection = 'aeuoyibcdfghjklmnpqrstvwxz';\n if($include_numbers) {\n $selection .= \"1234567890\";\n }\n if($include_special_chars) {\n $selection .= \"!@\\\"#$%&[]{}?|\";\n }\n \n $password = \"\";\n for($i=0; $i<$length; $i++) {\n $current_letter = $use_upper_case ? (rand(0,1) ? strtoupper($selection[(rand() % strlen($selection))]) : $selection[(rand() % strlen($selection))]) : $selection[(rand() % strlen($selection))]; \n $password .= $current_letter;\n } \n \n return $password;\n }", "title": "" }, { "docid": "ec23b67c67a86300871a66332204c409", "score": "0.6545334", "text": "function generateToken()\n{\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < 20; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "title": "" }, { "docid": "7f2530b4dc759535050a6214234f687b", "score": "0.65450346", "text": "protected function genRandomString() {\n\t\t$length = 10;\n\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyz';\n\t\t$string = '';\n\t\tfor ($p = 0; $p < $length; $p++) {\n\t\t\t$string .= $characters[mt_rand(0, strlen($characters))];\n\t\t}\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "f4b0fdb50502706cc3f96332aa07ba74", "score": "0.654415", "text": "protected function generateRandomKey() {\n return \\Str::random(255);\n\t}", "title": "" }, { "docid": "0598814cadc9643b16e4c78081d915d2", "score": "0.654388", "text": "function random_gen($length) {\n $characters = '0123456789abcdef';\n $str = '';\n for($i=0;$i<$length;$i++) {\n $str .= substr($characters, (mt_rand() % (strlen($characters))), 1);\n }\n return $str;\n }", "title": "" }, { "docid": "a591e9d431d2b01a042b6bb970198af2", "score": "0.65416926", "text": "function generatepassword ($length = 6)\r\n{\r\n $password = \"\";\r\n\r\n // define possible characters\r\n $possible = \"0123456789bcdfghjkmnpqrstvwxyzABCDEFGHIJKLMNOP\"; \r\n\t\r\n // set up a counter\r\n $i = 0; \r\n\t\r\n // add random characters to $password until $length is reached\r\n while ($i < $length) { \r\n\r\n\t// pick a random character from the possible ones\r\n\t$char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\r\n\t\t\r\n\t// we don't want this character if it's already in the password\r\n\tif (!strstr($password, $char)) { \r\n\t $password .= $char;\r\n\t $i++;\r\n\t}\r\n\r\n }\r\n\r\n // done!\r\n return $password;\r\n\r\n}", "title": "" }, { "docid": "8818b3579ed8444d692828084bb536ea", "score": "0.6540049", "text": "function createRandomPassword() {\n\n $chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\n\n srand((double)microtime()*1000000);\n\n $i = 0;\n\n $pass = '' ;\n\n while ($i <= 7) {\n\n $num = rand() % 33;\n\n $tmp = substr($chars, $num, 1);\n\n $pass = $pass . $tmp;\n\n $i++;\n\n }\n\n return $pass;\n\n }", "title": "" }, { "docid": "2da7b0b52e96035d628fe63a2330f65c", "score": "0.6536853", "text": "function RandomName(){\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < 10; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return hash('sha1',$randomString);\n}", "title": "" }, { "docid": "2aaa2ce1e4a43ebf4cae7716fe38c5fe", "score": "0.6536326", "text": "public function randomIdentifier() {\n $random_url = \"\";\n $domain = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\";\n $len = strlen($domain);\n $n = rand(5, 9);\n for ($i = 0; $i < $n; $i++) {\n // Generate a random index to pick\n // characters.\n $index = rand(0, $len - 1);\n\n // Concatenating the character\n // in resultant string.\n $random_url = $random_url . $domain[$index];\n }\n return $random_url;\n }", "title": "" }, { "docid": "8a8480034509438d24af8e769e02c951", "score": "0.65305895", "text": "static public function quickRandom($length = 16)\n {\n $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n return substr(str_shuffle(str_repeat($pool, 5)), 0, $length);\n }", "title": "" }, { "docid": "12271256bd3197f1561aebd8444ae35f", "score": "0.653", "text": "function cCodeGenerator($length = 40) {\r\n $characters = 'ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789'; //133 duovigintiljoonaa (eli 133674945388437340678388459765760000000000000000000000000000000000000000) eri mahdollista koodiyhdistelmää. Sinulla on isommat mahdollisuudet voittaa Eurojackpotissa joka viikko 918307051147661640506761846153846153846153846153846153846 vuoden ajan.\r\n $charactersLength = strlen($characters);\r\n $randomString = '';\r\n for ($i = 0; $i < $length; $i++) {\r\n $randomString .= $characters[rand(0, $charactersLength - 1)];\r\n }\r\n return $randomString;\r\n}", "title": "" }, { "docid": "ba436fc1d863cbb1d6e281e722b7711e", "score": "0.65268904", "text": "protected function generateString()\n\t{\n\t\treturn base64_encode(uniqid());\n\t}", "title": "" }, { "docid": "a3281e72f5007c5f91e7bcdf09358989", "score": "0.6522235", "text": "function create_unique_access_id() {\n\t\n\t\t$seed = str_split('abcdefghijklmnopqrstuvwxyz'\n\t\t\t.'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n\t\t\t.'0123456789'); // and any other characters\n\t\tshuffle($seed); // probably optional since array_is randomized; this may be redundant\n\t\t$rand = '';\n\t\tforeach (array_rand($seed, 7) as $k) $unique_access_id .= $seed[$k];\n\t\treturn $unique_access_id;\n}", "title": "" }, { "docid": "f3dcd83de3cf1fa80022b541c3ebe91c", "score": "0.65218997", "text": "protected function generateVerifyCodeUtf8()\n\t{\n\t\tif(!$this->letters){\n\t\t\t$this->letters = 'bcdfghjkmnprstvwxyz';\n\t\t}\n\t\tif(!$this->vowels){\n\t\t\t$this->vowels = 'aeou';\n\t\t}\n\t\tif ($this->minLength < 3) {\n\t\t\t$this->minLength = 3;\n\t\t}\n\t\tif ($this->maxLength > 20) {\n\t\t\t$this->maxLength = 20;\n\t\t}\n\t\tif ($this->minLength > $this->maxLength) {\n\t\t\t$this->maxLength = $this->minLength;\n\t\t}\n\t\t$length = mt_rand($this->minLength, $this->maxLength);\n\n\t\t$letters = $this->letters;\n\t\t$vowels = $this->vowels;\n\t\t$cntVow = mb_strlen($this->vowels, 'utf-8') - 1;\n\t\t$cntLet = mb_strlen($this->letters, 'utf-8') - 1;\n\t\t$code = '';\n\n\t\tfor ($i = 0; $i < $length; ++$i) {\n\t\t\tif ($i % 2 && mt_rand(0, 10) > 2 || !($i % 2) && mt_rand(0, 10) > 9) {\n\t\t\t\t$chr = mb_substr($vowels, mt_rand(0, $cntVow), 1, 'utf-8');\n\t\t\t} else {\n\t\t\t\t$chr = mb_substr($letters, mt_rand(0, $cntLet), 1, 'utf-8');\n\t\t\t}\n\t\t\tif($this->randomUpperLowerCase){\n\t\t\t\t$chr = mb_convert_case($chr, mt_rand(0, 1) ? MB_CASE_UPPER : MB_CASE_LOWER, 'utf-8');\n\t\t\t}\n\t\t\t$code .= $chr;\n\t\t}\n\n\t\treturn $code;\n\t}", "title": "" }, { "docid": "a6a4e27a690a2fbb6f446abeaed16753", "score": "0.65186113", "text": "protected function _getRandomString()\n {\n return substr(hash('sha256', rand()), 0, 4);\n }", "title": "" }, { "docid": "6499c0c25b78066fc6ef4524f5abea52", "score": "0.65132266", "text": "function hs_gener_random($length){\r\n\r\n\tsrand((double)microtime()*1000000 );\r\n\t\r\n\t$hs_random_id = \"\";\r\n\t\r\n\t$char_list = \"abcdefghijklmnopqrstuvwxyz\";\r\n\t\r\n\tfor($i = 0; $i < $length; $i++) {\r\n\t\t$hs_random_id .= substr($char_list,(rand()%(strlen($char_list))), 1);\r\n\t}\r\n\t\r\n\treturn $hs_random_id;\r\n}", "title": "" }, { "docid": "f02d93e67e54f51730e84043a7d31ae5", "score": "0.65122044", "text": "function generateRandomString($length=3) {\r\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n $charactersLength = strlen($characters);\r\n $randomString = '';\r\n for ($i = 0; $i < $length; $i++) {\r\n $randomString .= $characters[rand(0, $charactersLength - 1)];\r\n }\r\n return $randomString;\r\n}", "title": "" }, { "docid": "ad8ff1fa8cb5f5c728085db28aad9e7e", "score": "0.65088224", "text": "function createPassword() {\n $chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\n srand((double)microtime()*1000000);\n $i = 0;\n $pass = '' ;\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 }", "title": "" }, { "docid": "f409c8429bbc48fb5ca8173ec818fda7", "score": "0.65076673", "text": "function generateString ($length = 8){\r\n $string = \"\";\r\n $possible = \"0123456789bcdfghjkmnpqrstvwxyz\";\r\n $i = 0;\r\n while ($i < $length) {\r\n $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\r\n $string .= $char;\r\n $i++;\r\n }\r\n return $string;\r\n}", "title": "" }, { "docid": "e1313a7edc331207d075d0491bec3d66", "score": "0.65069693", "text": "function get_random_string($valid_chars, $length)\n{\n\n if ($valid_chars == null || $valid_chars == '')\n\t$valid_chars = \"012345679\";\n // start with an empty random string\n $random_string = \"\";\n\n // count the number of chars in the valid chars string so we know how many choices we have\n $num_valid_chars = strlen($valid_chars);\n\n // repeat the steps until we've created a string of the right length\n\n for ($i = 0; $i < $length; $i++)\n {\n // pick a random number from 1 up to the number of valid chars\n $random_pick = mt_rand(1, $num_valid_chars);\n\n // take the random character out of the string of valid chars\n // subtract 1 from $random_pick because strings are indexed starting at 0, and we started picking at 1\n $random_char = $valid_chars[$random_pick-1];\n\n // add the randomly-chosen char onto the end of our string so far\n $random_string .= $random_char;\n }\n\n // return our finished random string\n return $random_string;\n}", "title": "" }, { "docid": "890fb1290b47ea58037d56f0d8005c61", "score": "0.6504662", "text": "function GenerateWord()\n{\n\t$nb = rand(3,10);\n\t$w = '';\n\tfor($i=1;$i<=$nb;$i++)\n\t\t$w .= chr(rand(ord('a'),ord('z')));\n\treturn $w;\n}", "title": "" }, { "docid": "d537789b029c7a5eba6f8c1bd69f8237", "score": "0.65043", "text": "function get_random_string($valid_chars, $length)\n{\n $random_string = \"\";\n\n // count the number of chars in the valid chars string so we know how many choices we have\n $num_valid_chars = strlen($valid_chars);\n\n // repeat the steps until we've created a string of the right length\n for ($i = 0; $i < $length; $i++)\n {\n // pick a random number from 1 up to the number of valid chars\n $random_pick = mt_rand(1, $num_valid_chars);\n\n // take the random character out of the string of valid chars\n // subtract 1 from $random_pick because strings are indexed starting at 0, and we started picking at 1\n $random_char = $valid_chars[$random_pick-1];\n\n // add the randomly-chosen char onto the end of our string so far\n $random_string .= $random_char;\n }\n\n // return our finished random string\n return $random_string;\n}", "title": "" }, { "docid": "21af9af1e71a043b6db0a94df0005a4b", "score": "0.6501095", "text": "function generateID ($length = 8)\r\n{\r\n // start with a blank id\r\n $id = \"\";\r\n // define possible characters\r\n $possible = \"0123456789bcdfghjkmnpqrstvwxyz\"; \r\n // set up a counter\r\n $i = 0; \r\n \r\n // add random characters to $id until $length is reached\r\n while ($i < $length) { \r\n // pick a random character from the possible ones\r\n $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\r\n // we don't want this character if it's already in the id\r\n if (!strstr($id, $char)) { \r\n $id .= $char;\r\n $i++;\r\n }\r\n }\r\n // done!\r\n return $id;\r\n}", "title": "" }, { "docid": "df9fc1e85528111bc7560175889d4027", "score": "0.6493828", "text": "function makePassword($times = 2)\n {\n $vowels = array(\"b\",\"c\",\"d\",\"f\",\"g\",\"h\",\"j\",\"k\",\"m\",\"n\",\"p\",\"q\",\"r\",\"s\",\"t\",\"v\",\"w\",\"x\",\"z\");\n $consonants = array(\"a\",\"e\",\"y\",\"u\");\n for ($i = 0; $i < $times; $i++)\n {\n srand((double)microtime()*1000000);\n mt_srand((double)microtime()*1000000);\n $out .= $vowels[rand()%count($vowels)];\n $out .= $consonants[mt_rand()%count($consonants)];\n $out .= $vowels[mt_rand()%count($vowels)];\n }\n return $out;\n }", "title": "" }, { "docid": "161191d6b35f72d9387c2684b5c6820a", "score": "0.6492297", "text": "function createRandomPassword() {\n\t$chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\n\tsrand((double)microtime()*1000000);\n\t$i = 0;\n\t$ranpass = '' ;\n\twhile ($i <= PASSWORD_LENGTH) {\n\t\t$num = rand() % 33;\n\t\t$tmp = substr($chars, $num, 1);\n\t\t$ranpass = $ranpass . $tmp;\n\t\t$i++;\n\t}\n\treturn $ranpass;\n}", "title": "" }, { "docid": "126c26ca18d87734c1b186fff8da88da", "score": "0.6488364", "text": "public static function random(): string\n {\n return array_rand(static::all());\n }", "title": "" }, { "docid": "ad68b77a4ebc1cd89dae71b4b0e968bf", "score": "0.6481731", "text": "function napraviKod(){\r\n\t\t\t\t$z=\"\";\r\n\t\t\t\tfor($i=0;$i<10;$i++){\r\n\t\t\t\t\t$z.=chr(rand(65,91));\r\n\t\t\t\t}\r\n\t\t\t\treturn $z;\r\n\t\t\t}", "title": "" }, { "docid": "6fe45544ccaf8179b18522867111cc98", "score": "0.64809006", "text": "function generate_random_key() {\n $chars = \"abcdefghijklmnopqrstuvwxyz0123456789\";\n $new_key = \"\";\n for ($i = 0; $i < 32; $i++) {\n $new_key .= $chars[rand(0,35)];\n }\n return $new_key;\n }", "title": "" }, { "docid": "415e0498b983950a2980aaee5ea6fd8c", "score": "0.6477459", "text": "public static function random()\n {\n $exclude = ['/', '+', '=', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9];\n $length = 8;\n $string = '';\n\n while (($len = strlen($string)) < $length) {\n $size = $length - $len;\n $bytes = random_bytes($size);\n $string .= substr(str_replace($exclude, '', base64_encode($bytes)), 0, $size);\n }\n\n return new Slug($string);\n }", "title": "" }, { "docid": "eaa1ff84a27b5e097ee9317bb71aa323", "score": "0.64740866", "text": "public static function quickRandom($length = 16)\n {\n $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n return substr(str_shuffle(str_repeat($pool, $length)), 0, $length);\n }", "title": "" }, { "docid": "a411f760a1622e4e6c795b8499aeced1", "score": "0.64718604", "text": "function get_uniquecode($seed_length = null) {\n\t\t//$seed = md5(srand((double)microtime()*1000000)).\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567892345678923456789\";\n\t\t//$seed = md5(srand((double)microtime()*1000000)).\"ABCDEFGHIJKLMNOPQRSTUVWXYZ2345678923456789abcdefghijklmnopqrstuvwxyz23456789abcdefghijklmnopqrstuvwxyz\";\n\t\tif(empty($seed_length)){\n\t\t\t$seed_length = 8;\n\t\t}\n\t\t$seed = md5(srand((double)microtime()*1000000) + (strtotime('now'))).\"ABCDEFGHIJKLMNOPQRSTUVWXYZ2345678923456789abcdefghijklmnopqrstuvwxyz23456789abcdefghijklmnopqrstuvwxyz\";\n\t\t$str = '';\n\t\tsrand((double)microtime()*1000000);\n\t\tfor ($i=0;$i<$seed_length;$i++) {\n\t\t\t$str .= substr ($seed, rand() % 48, 1);\n\t\t}\t\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "107468823c244f18b1553a966fa6c4cb", "score": "0.6469634", "text": "function random_string( $length = 8, $alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789') {\n return implode(array_map('random_character',array_fill(0,$length,$alphabet)));\n }", "title": "" }, { "docid": "64a01612a27106dd21a1672e03283d0e", "score": "0.6465201", "text": "private function _randomPassword() {\r\n\t\t$alphabet = 'JKLMNOabcdef#ghijk%lm&nop*qrstu23wxy(zA_BCD!EFGHI)PQRST^UWXYZ012345$6789';\r\n\t\t$pass = array(); \r\n\t\t$alphaLength = strlen($alphabet) - 1; \r\n\t\tfor ($i = 0; $i < 16; $i++) {\r\n\t\t\t$n = rand(0, $alphaLength);\r\n\t\t\t$pass[] = $alphabet[$n];\r\n\t\t}\r\n\t\treturn implode($pass);\r\n\t}", "title": "" }, { "docid": "7d0b9240ee01cc9dd22703ea2c883214", "score": "0.64636534", "text": "function generatePassword ($length = 8)\n{\n $password = \"\";\n\n // define possible characters\n $possible = \"0123456789bcdfghjkmnpqrstvwxyz\"; \n \n // set up a counter\n $i = 0; \n \n // add random characters to $password until $length is reached\n while ($i < $length) { \n\n // pick a random character from the possible ones\n $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\n \n // we don't want this character if it's already in the password\n if (!strstr($password, $char)) { \n $password .= $char;\n $i++;\n }\n\n }\n\n // done!\n return $password;\n\n}", "title": "" }, { "docid": "f54a2ece2e618b4d5d320714839cacf0", "score": "0.64629275", "text": "public function generate_password()\n\t\t{\n\t\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randomString = '';\n for ($i = 0; $i < 4; $i++) \n {\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\n }\n return $randomString;\n\t\t\t\n\t\t }", "title": "" }, { "docid": "c919eaee08dfa5938c3cb74d4676bec6", "score": "0.64607996", "text": "function generatePassword($length = 8) {\n $password = \"\";\n // Define possible characters\n $possible = \"0123456789abcdfghjkmnpqrstvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $i = 0;\n // Add random characters to $password until $length is reached\n while ($i < $length) {\n // Choose a random character from the possible ones\n $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\n // Don't want this character if it iss already in the password\n if (!strstr($password, $char)) {\n $password .= $char;\n $i++;\n }\n }\n return $password;\n}", "title": "" }, { "docid": "afa78e2dcc82b113ab76335bfcec55d4", "score": "0.6458383", "text": "private function generateCode(){\n $codeLength = 8;\n $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $code = '';\n for ($i = 0; $i < $codeLength; $i++) {\n $code .= $characters[rand(0, $charactersLength - 1)];\n }\n return $code;\n }", "title": "" }, { "docid": "dea1b727f2e7ba1c3399e712bb2667db", "score": "0.64524454", "text": "public function random_string(){\n $string = '';\n $vowels = array(\"a\",\"e\",\"i\",\"o\",\"u\"); \n $consonants = array(\n 'b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', \n 'n', 'p', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z'\n ); \n // array samoglosek i spolglosek\n \n $max = $this->maxStrlen;\n for($x=1; $x<=$this->count; $x+=1){\n //loop zawierajacy liczbe slow wywolujacych przez uzytkownika\n for ($i = 0; $i <= $max; $i++){\n // loop dostawania liter dla slowa do maksymalnej liczby liter podanych prze uzytkownika \n if(strlen($string) < $this->maxStrlen){\n //sprawdza czy generwoane slow ma ponizej maksymalnej ilosci liter\n $string .= $consonants[rand(0,19)];\n //wybiera losowo z array\n }if(strlen($string) < $this->maxStrlen){\n //sprawdza czy generwoane slow ma ponizej maksymalnej ilosci liter\n $string .= $vowels[rand(0,4)];\n //wybiera losowo z array\n }\n } \n $this->words .= $string .\"<br>\";\n $string = '';\n //dodaje slow do listy i zmienia $ na pusty na nastepne slowo\n }\n \n return $this->words;\n }", "title": "" }, { "docid": "37193c1ea662556a2486a079355f6ce6", "score": "0.64510596", "text": "function mt_rand_str($l, $c = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*-') {\n for ($s = '', $cl = strlen($c)-1, $i = 0; $i < $l; $s .= $c[mt_rand(0, $cl)], ++$i);\n return $s;\n }", "title": "" }, { "docid": "dc297f2a6383e1ac35dcdca3b19e3510", "score": "0.6445769", "text": "public static function generate($options = [])\n {\n $alphabet =\n 'abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ' .\n '0123456789';\n\n $result = '';\n $length = ArrayHelper::getValue($options, 'length', 8);\n for($index = 0; $index < $length; $index++) {\n $result .= $alphabet[rand(0, strlen($alphabet) - 1)];\n }\n\n return $result;\n }", "title": "" } ]
ba9b6a8fe9c4f557838de18a0bf7f9b6
Enqueue scripts and styles.
[ { "docid": "7c29f6fa27fe74be7fa1a355a8510eb3", "score": "0.0", "text": "function frag_scripts() {\n\twp_enqueue_style( 'frag-style', get_stylesheet_uri() );\n\n\twp_enqueue_script( 'frag-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );\n\n\twp_enqueue_script( 'frag-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "title": "" } ]
[ { "docid": "912e9e2b2fc3adf6ed84def399a852c7", "score": "0.8717999", "text": "public function enqueueScripts() {\n \n // add style sheets\n $this->addStyleSheets( );\n // add javascripts\n $this->addJavascripts( );\n \n }", "title": "" }, { "docid": "2f8bbb0fd6b5a428f60e089309d7d184", "score": "0.85587466", "text": "public function enqueueStylesAndScripts()\n {\n $this->registerStylesAndScripts();\n $this->wordpress->enqueueStyle(self::HANDLE_STYLE_ADMIN);\n $this->wordpress->enqueueScript(self::HANDLE_SCRIPT_GROUP_SUGGEST);\n $this->wordpress->enqueueScript(self::HANDLE_SCRIPT_TIME_INPUT);\n $this->wordpress->enqueueScript(self::HANDLE_SCRIPT_ADMIN);\n }", "title": "" }, { "docid": "3f0cd4accd75fbfbf5e8f02f908de8e5", "score": "0.82737994", "text": "public function scripts_and_styles() {\n\t\twp_enqueue_script( 'elections-theme-js', get_stylesheet_directory_URI() . '/assets/js/app.js', [], filemtime( get_stylesheet_directory() . '/assets/js/app.min.js' ) );\n\t\twp_enqueue_style( 'dashicons' );\n\t}", "title": "" }, { "docid": "99e2f9afb5f4389bb6b87363bc1613f6", "score": "0.82444113", "text": "public function enqueue() {\n\t\t$this->enqueue_scripts();\n\t\t$this->enqueue_styles();\n\t}", "title": "" }, { "docid": "8000031cdd709d6f1e55c3498b19258c", "score": "0.82241684", "text": "public function enqueueScripts()\n {\n }", "title": "" }, { "docid": "ca4b3c24414b061395e32885d5c67eea", "score": "0.8165814", "text": "private function enqueueScripts() {\n $suffix = '';\n if (!WP_DEBUG) {\n $suffix = \"-min\";\n }\n\n // Loads our main stylesheet.\n wp_enqueue_style(\n 'frojd-theme-style',\n get_template_directory_uri() . '/builds/css/main' . $suffix . '.css',\n array(),\n $this->getThemeVersion(),\n 'all'\n );\n\n // Loads our main javascript.\n wp_enqueue_script(\n 'frojd-theme-script',\n get_template_directory_uri() . '/builds/js/main' . $suffix . '.js',\n array('jquery'),\n $this->getThemeVersion(),\n true\n );\n }", "title": "" }, { "docid": "01ac379c4d86183eadc2fc7ad0849213", "score": "0.8085342", "text": "public function enqueueScripts() {\n\t\t\t// wp_enqueue_script( 'js', BESTBUG_RPPRO_URL . '/assets/js/script.js', array( 'jquery' ), '1.0', true );\n\t\t}", "title": "" }, { "docid": "02c999f492e316e68817e8ccf9afb063", "score": "0.80480474", "text": "public function scripts_and_styles() {\r\n \r\n if (!is_admin_bar_showing() || is_admin())\r\n return;\r\n \r\n // Scripts\r\n wp_enqueue_script('jquery');\r\n wp_enqueue_script('jck_toggle_adminbar_scripts', plugins_url('assets/js/scripts.js', __FILE__), 'jquery');\r\n \r\n // Styles\r\n $css = plugins_url('assets/css/style.css', __FILE__);\r\n wp_register_style('jck_toggle_adminbar_styles', $css);\r\n wp_enqueue_style('jck_toggle_adminbar_styles');\r\n \r\n }", "title": "" }, { "docid": "1cbbfa8cdb2101b5fab1a3c00102c266", "score": "0.8036101", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Component_Themes_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Component_Themes_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/component-themes-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "1733d651ec64fbdfb240f07d24470844", "score": "0.80330783", "text": "public function add_scripts_and_styles() {\n\n\t}", "title": "" }, { "docid": "91eae6938ed793c6c1c59703f595933f", "score": "0.8001136", "text": "static private function register_scripts() {\n\t\t// Running these isn't necessary and can cause performance issues.\n\t\tremove_action( 'wp_enqueue_scripts', 'FLBuilder::register_layout_styles_scripts' );\n\t\tremove_action( 'wp_enqueue_scripts', 'FLBuilder::enqueue_ui_styles_scripts' );\n\t\tremove_action( 'wp_enqueue_scripts', 'FLBuilder::enqueue_all_layouts_styles_scripts' );\n\n\t\tob_start();\n\t\tdo_action( 'wp_enqueue_scripts' );\n\t\tob_end_clean();\n\t}", "title": "" }, { "docid": "5bacd0ed1d4862d273165a1b53d302b7", "score": "0.7992989", "text": "function add_scripts(){\n\t //wp_enqueue_script( 'bootstrap' );\n\t \n\t wp_register_script( 'vendor', get_stylesheet_directory_uri().'/public/vendor.js' ,[], $this->prependversion, true );\n\t wp_enqueue_script( 'vendor' );\n\t \n\t wp_register_script( 'appjs', get_stylesheet_directory_uri().'/public/app.js' , ['vendor'], $this->prependversion );\n\t wp_enqueue_script( 'appjs' );\n\t \n\t}", "title": "" }, { "docid": "cf96811090f8f0661e6c6218bae09381", "score": "0.79686403", "text": "public static function add_styles_and_scripts(){\n\t\n\t\twp_register_script( 'simple-traders', self::get_url( '/js/simple-traders.js', __FILE__ ) , 'jquery' , '1', true );\n\t\t\n\t}", "title": "" }, { "docid": "09961297e99c16f137fbd75b0126e255", "score": "0.7965785", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * Enqueue front-end Javascript for Conductor\n\t\t */\n\t\t \n\t\t//wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'assets/js/conductor-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "04f8f31eafa2d49c09902026412f6f78", "score": "0.7955324", "text": "public function enqueue_scripts()\n {\n }", "title": "" }, { "docid": "0c31f897a5e0f94b9edb3b55736fb5de", "score": "0.7932604", "text": "public function addScriptsAndStyles()\n {\n // ==============================================================\n // Styles\n // ==============================================================\n wp_enqueue_style('lolita-media-control', $this->getURL() . '/assets/css/media.css');\n wp_enqueue_style('lolita-controls', self::controlURL() . '/assets/css/controls.css');\n\n // ==============================================================\n // Scripts\n // ==============================================================\n wp_enqueue_media();\n wp_enqueue_script('jquery');\n wp_enqueue_script('underscore');\n wp_enqueue_script(\n 'lolita-media-control',\n $this->getURL() . '/assets/js/media.js',\n array('jquery'),\n false,\n true\n );\n }", "title": "" }, { "docid": "bd0beaac0afaaf67c7a42f8726b6bf88", "score": "0.7923611", "text": "final protected function enqueue_scripts()\n {\n Control::enqueue_scripts('take_over_action_link');\n Control::enqueue_scripts('take_over_switcher_form');\n \\wp_enqueue_style('tify_control-take_over_admin_bar');\n }", "title": "" }, { "docid": "4a0ae5f9601ddf3d220ac9cabb6aa268", "score": "0.79135704", "text": "public function enqueue_scripts () {\n\t\t\n\t\twp_register_script( $this->_token . '-frontend', esc_url( $this->assets_url ) . 'js/frontend' . $this->script_suffix . '.js', array( 'jquery' ), $this->_version );\n\t\twp_enqueue_script( $this->_token . '-frontend' );\n\t}", "title": "" }, { "docid": "95e95e845cd7965be1ce0d9ae0681e04", "score": "0.7911505", "text": "function hk_style_and_scripts() {\n\n // CSS\n wp_enqueue_style( 'main-css', get_stylesheet_uri() );\n\n // Js\n wp_enqueue_script( 'theme-scripts', get_stylesheet_directory_uri() . '/assets/js/scripts.js', array('jquery'), '1.0.0', true );\n\n }", "title": "" }, { "docid": "6e130d742b1cea54ff3fce889b2bac4b", "score": "0.79058534", "text": "public function enqueue_scripts() {\n\t}", "title": "" }, { "docid": "6e130d742b1cea54ff3fce889b2bac4b", "score": "0.79058534", "text": "public function enqueue_scripts() {\n\t}", "title": "" }, { "docid": "6e130d742b1cea54ff3fce889b2bac4b", "score": "0.79058534", "text": "public function enqueue_scripts() {\n\t}", "title": "" }, { "docid": "579e9f4406874431fe209f16bcdecaee", "score": "0.790455", "text": "public function enqueue_scripts() {\n\t\twp_register_style( 'penshop-addons-animate', PENSHOP_ADDONS_URL . 'assets/css/animate.css', array(), '3.5.2' );\n\t\twp_enqueue_style( 'penshop-addons-animate' );\n\t}", "title": "" }, { "docid": "84b3dd1b15b2d15fbf6c74e6006a427e", "score": "0.78863966", "text": "function register_scripts_and_styles() {\n \t\t$this->load_file( self::slug . '-js', '/js/' . self::slug . '.js', true );\n \t\t$this->load_file( self::slug . '-css', '/css/' . self::slug . '.css' );\n\t}", "title": "" }, { "docid": "74f44b0c118deba7063266c9a8560ab9", "score": "0.7875335", "text": "public function enqueue_styles_scripts() {\t\n\t\twp_enqueue_style( AIOVG_PLUGIN_SLUG . '-public' );\n\t}", "title": "" }, { "docid": "44cec9f299220137794129791a5e36b0", "score": "0.7869189", "text": "public function add_scripts_and_styles()\n {\n ///MENU APP\n wp_enqueue_script(\"uip-color-picker\", $this->pathURL . \"assets/js/vue-color/iro.js\", [\"uip-vue\"], $this->version, false);\n wp_enqueue_script(\"uip-styles\", $this->pathURL . \"assets/js/uip-styles.min.js\", [\"uip-app\"], $this->version, true);\n }", "title": "" }, { "docid": "b75947510321ec358f873d918acd34c5", "score": "0.78584284", "text": "public function enqueueScripts(): void\n\t{\n\t\t$handle = $this->getThemeScriptHandle();\n\n\t\t\\wp_register_script(\n\t\t\t$handle,\n\t\t\t$this->manifest->getAssetsManifestItem(static::THEME_SCRIPT_URI),\n\t\t\t$this->getFrontendScriptDependencies(),\n\t\t\t$this->getAssetsVersion(),\n\t\t\t$this->scriptInFooter()\n\t\t);\n\n\t\t\\wp_enqueue_script($handle);\n\n\t\tforeach ($this->getLocalizations() as $objectName => $dataArray) {\n\t\t\t\\wp_localize_script($handle, $objectName, $dataArray);\n\t\t}\n\t}", "title": "" }, { "docid": "93c68f7005c6c54d4e5e33ff5b6a921a", "score": "0.78554416", "text": "public function enqueue_scripts() { }", "title": "" }, { "docid": "0d9348ad8c506ec02497a0ffbcdc3c53", "score": "0.7850134", "text": "public function addScripts()\r\n {\r\n\r\n wp_enqueue_script('jquery-2.1.1', MAXTHEMES_URI_ASSET . 'blemil/js/jquery-2.1.1.min.js', array(), '', true);\r\n\r\n wp_enqueue_script('materialize', MAXTHEMES_URI_ASSET . 'materialize/js/materialize.min.js', array(), '', true);\r\n\r\n wp_enqueue_script('scripts', MAXTHEMES_URI_ASSET . 'blemil/js/jquery.blemil.js', array(), '', true);\r\n// wp_enqueue_script('research', MAXTHEMES_URI_ASSET . 'blemil/js/research.js', array(), '', true);\r\n }", "title": "" }, { "docid": "1f52ccff3cf236279df2e841be37a719", "score": "0.7840795", "text": "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "title": "" }, { "docid": "ed7756bc3f7c64f6d5a6ee5c25367ead", "score": "0.7828492", "text": "public function enqueue_scripts()\n\t{\n\n\n\t}", "title": "" }, { "docid": "3b0ed1ff740c213da38cdd1173f02439", "score": "0.78230745", "text": "public function enqueueScripts(): void\n {\n $handle = CurtainCall::PLUGIN_NAME . '_admin';\n $src = $this->assetsUrl . 'curtain-call-wp-admin.js';\n $version = CCWP_DEBUG ? rand() : CurtainCall::PLUGIN_VERSION;\n\n wp_enqueue_script($handle, $src, ['jquery'], $version, true);\n }", "title": "" }, { "docid": "1468785ba8e4e54b9aaf721318697ff2", "score": "0.7816307", "text": "public function wp_enqueue_scripts() {\n\t\twp_enqueue_style( 'app' );\n\n\t\twp_enqueue_script( 'modernizr' );\n\t\twp_enqueue_script( 'jquery' );\n\t}", "title": "" }, { "docid": "306c8351e85653ac92a9c73f29e1df7c", "score": "0.78076357", "text": "function wsme_script_enqueuer() {\n\n // wp_register_script('vendors', get_stylesheet_directory_uri().'/js/vendors.js', array('jquery') );\n // wp_enqueue_script('vendors');\n // wp_register_script('custom', get_stylesheet_directory_uri().'/js/custom.min.js', array('jquery') );\n // wp_enqueue_script('custom');\n //wp_register_style('screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen');\n //wp_enqueue_style('screen');\n wp_register_style('screen', get_template_directory_uri().'/style.css', '', '', 'screen');\n wp_enqueue_style('screen');\n }", "title": "" }, { "docid": "bc49e3448b5457bcd558d2db21f4a36f", "score": "0.7802974", "text": "public function enqueue_scripts() {\n\n\t\t// Enqueue the color picker\n\t\twp_enqueue_script( 'wp-color-picker' );\n\t\twp_enqueue_style( 'wp-color-picker' );\n\n\t\t// Enqueue fancy coloring; includes quick-edit\n\t\twp_enqueue_script( 'term-color', $this->url . 'js/term-color.js', array( 'wp-color-picker' ), $this->db_version, true );\n\t}", "title": "" }, { "docid": "20b9ac8531482111082290e2e18f4404", "score": "0.7796844", "text": "public function enqueue_scripts() {\n \n }", "title": "" }, { "docid": "8b0e22035962aecd324e608db4de861d", "score": "0.77959424", "text": "public function action_wp_enqueue_scripts() {\n\t\twp_enqueue_style( 'russell-heimlich' );\n\t}", "title": "" }, { "docid": "a99b9c6384d13849328d84bd25ce701c", "score": "0.77915263", "text": "private function enqueue_tools_scripts()\n {\n }", "title": "" }, { "docid": "503492b5f3e155404d06497a23ab7589", "score": "0.7786259", "text": "public function enqueue_scripts()\n\t{\n\t\twp_enqueue_style( $this->id_base . '-leaflet' );\n\t\twp_enqueue_script( $this->id_base . '-leaflet' );\n\t}", "title": "" }, { "docid": "b434e60eca1cbc0f5fb59f01cd376d3d", "score": "0.7785011", "text": "function sitename_styles_and_scripts() {\n\n\t// Styles\n\twp_enqueue_style('main', get_stylesheet_directory_uri().\"/style.css\", array(), 1); // Compiled by \"style.scss\"\n\n\t// Scripts\n\t//wp_enqueue_script('slick', get_stylesheet_directory_uri().\"/scss/tools/slick/slick.min.js\", ['jquery']); // Uncomment if slider needed\n\twp_enqueue_script('script', get_stylesheet_directory_uri().\"/js/script.js\", ['jquery'], 1, true);\n\n}", "title": "" }, { "docid": "335cb81981af0c7da9d08015b2adf914", "score": "0.7784659", "text": "public function _hook_wp_enqueue_scripts() {}", "title": "" }, { "docid": "a250d962eae3b3ecb05259bdcdaf28dd", "score": "0.77785844", "text": "public function enqueueScripts() {\n if(is_array($this->scripts) && count($this->scripts)) {\n foreach ($this->scripts as $scriptHandle => $scriptPath) {\n wp_enqueue_script($scriptHandle);\n }\n }\n }", "title": "" }, { "docid": "89856c23f59c75fefc5ce5560a10bd25", "score": "0.77699596", "text": "public function enqueue_styles_script()\n {\n if (AWM_JQUERY_LOAD) {\n wp_enqueue_script('jquery-ui-datepicker');\n wp_enqueue_style('jquery-ui-awm');\n }\n wp_enqueue_style('awm-global-style');\n wp_enqueue_script('awm-global-script');\n wp_enqueue_script('awm-public-script');\n }", "title": "" }, { "docid": "9f08555d815e18e41ac6aa785df1ff3e", "score": "0.77672267", "text": "function genese_enqueue_scripts() {\n\n\t\t$theme = wp_get_theme();\n\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\n\t\twp_register_style(\n\t\t\t'genese/style/app',\n\t\t\tget_theme_file_uri( '/resources/assets/dist/css/app.css' ),\n\t\t\tfalse,\n\t\t\t$theme->get( 'Version' )\n\t\t);\n\n\t\twp_enqueue_style( 'genese/style/app' );\n\n\t\twp_enqueue_script(\n\t\t\t'genese/script/app',\n\t\t\tget_theme_file_uri( '/resources/assets/dist/js/app.js' ),\n\t\t\tarray( 'jquery' ),\n\t\t\t$theme->get( 'Version' ),\n\t\t\ttrue\n\t\t);\n\t}", "title": "" }, { "docid": "d83147fa7f0d86b435feee2007320d29", "score": "0.77631205", "text": "public function moxie_enqueue_scripts() {\n\t\t\twp_enqueue_style( 'animate-css', plugins_url( 'assets/css/animate.css', __FILE__ ), array(), '1.0', 'all' );\n\t\t\twp_enqueue_style( 'main-css', plugins_url( 'assets/css/main.css', __FILE__ ), array(), '1.0', 'all' );\n\t\t wp_enqueue_script( 'wow-js', plugins_url('assets/js/wow.min.js', __FILE__ ), array('jquery'), true );\n\t\t wp_enqueue_script( 'main-js', plugins_url('assets/js/main.js', __FILE__ ), array('jquery'), true );\n\t\t}", "title": "" }, { "docid": "0aeefa8eb6dddfb03a6a9223eb88da0e", "score": "0.77583545", "text": "public function enqueue_styles_and_scripts() {\n $version = self::VERSION;\n\n wp_enqueue_script('ginf/pressbooks', GINF_PLUGIN_URL . 'public/js/pressbooks.js', ['jquery',], $version);\n wp_enqueue_script('ginf/h5p', GINF_PLUGIN_URL . 'public/js/h5p.js', [], $version);\n\n wp_localize_script('ginf/pressbooks', 'ginf_config_object',\n [\n 'images_url' => GINF_PLUGIN_URL . 'public/img/',\n ]);\n\n wp_localize_script('ginf/h5p', 'ginf_h5p_rest_object',\n [\n 'api_nonce' => wp_create_nonce( 'wp_rest' ),\n 'api_url' => site_url('/wp-json/ginf/v1/'),\n ]);\n\n wp_enqueue_style('ginf/enlighter', GINF_PLUGIN_URL . 'public/css/enlighter.css', [], $version);\n }", "title": "" }, { "docid": "fca3c4921d5061fe73e5cb8eee662f85", "score": "0.7756843", "text": "public function enqueue_assets() {\n wp_enqueue_style( 'reslab-matching-form-admin-style' );\n wp_enqueue_script( 'reslab-matching-form-admin-script' );\n }", "title": "" }, { "docid": "dee8844585321c45aa5944634de88105", "score": "0.77526265", "text": "public function admin_enqueue_styles_scripts()\n {\n wp_enqueue_script('jquery-ui-datepicker');\n wp_enqueue_style('jquery-ui-awm');\n wp_enqueue_style('awm-slim-lib-style');\n wp_enqueue_style('awm-admin-style');\n wp_enqueue_style('awm-global-style');\n wp_enqueue_script('awm-slim-lib-script');\n wp_enqueue_script('awm-global-script');\n wp_enqueue_script('awm-admin-script');\n }", "title": "" }, { "docid": "06861591f70f345fd7fc1a5f463cd57b", "score": "0.77499485", "text": "public function omni_scripts() {\n\t\twp_enqueue_style( 'omni-style', get_stylesheet_uri() );\n\t\tif ($this->production) {\n\t\t\twp_enqueue_script('omni-script', get_template_directory_uri() . '/assets/js/scripts.min.js', array('jquery'), false, false);\n\t\t} else {\n\t\t\twp_enqueue_script('omni-script', get_template_directory_uri() . '/assets/js/scripts.js', array('jquery'), false, true);\n\t\t}\n\t\twp_enqueue_style('omni-google-fonts', 'https://fonts.googleapis.com/css?family=Montserrat:300,300i,400,400i,700,700i|Roboto:400,400i,500,500i,700,700i');\n\n\t}", "title": "" }, { "docid": "de19a37e8f091dd795fec04d87dc54a7", "score": "0.77424884", "text": "public function enqueue_scripts()\n {\n wp_enqueue_style(DTQ_TEXT_DOMAIN . '-css', DTQ_PLUGIN_DIR_URL . 'assets/css/style.css', [], DTQ_VERSION, 'all');\n wp_enqueue_script(DTQ_TEXT_DOMAIN . '-custom-js', DTQ_PLUGIN_DIR_URL . 'assets/js/custom.js', ['jquery'], DTQ_VERSION, true);\n }", "title": "" }, { "docid": "d4da54068085f3a47aca2f5ed1e302d9", "score": "0.7737973", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Salonbookingprok_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Salonbookingprok_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\t\t\n\t\t\n\t\twp_enqueue_script( $this->plugin_name.'-select2', plugin_dir_url( __FILE__ ) . 'js/select2.min.js', array( 'jquery' ), $this->version, true );\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/salonbookingprok-admin.js', array( 'jquery' ), $this->version, true );\n\t}", "title": "" }, { "docid": "84d217cc31a616e8c0b07680af95697f", "score": "0.7728861", "text": "function enqueue_scripts() {\n // cache the directory path, maybe helpful?\n $template_directory = get_template_directory_uri();\n\n // all styles\n wp_enqueue_style( 'bootstrap', $template_directory . '/css/bootstrap.css' );\n wp_enqueue_style( 'bootstrap-responsive', $template_directory . '/css/bootstrap-responsive.css' );\n wp_enqueue_style( 'style', $template_directory . '/css/style.css' );\n\n // all scripts\n wp_enqueue_script( 'wp-api');\n wp_enqueue_script( 'backbone');\n wp_enqueue_script( 'underscore');\n\n // comment reply on single posts\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n\n wp_enqueue_script( 'small-menu', $template_directory . '/js/small-menu.js', array('jquery', 'theme-script'), '20120202', true );\n wp_enqueue_script( 'theme-script', $template_directory . '/js/scripts.js', array('jquery'), '20120206', true );\n wp_localize_script( 'theme-script', 'wedevsBackbone', array(\n 'base' => home_url( '/' ),\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'loggedin' => is_user_logged_in() ? 'yes' : 'no'\n ) );\n }", "title": "" }, { "docid": "27666cc49d4a82aea00c0d2b07a1ca5b", "score": "0.7719536", "text": "public function add_scripts() {\n\n\t\twp_enqueue_style( 'lqcharts-styles', LQCHARTS_PLUGIN_URL . '/assets/style.css', array(), time() );\n\t\twp_enqueue_style( 'lqcharts-responsive-styles', LQCHARTS_PLUGIN_URL . '/assets/responsive.css', array(), time() );\n\t\twp_enqueue_style( 'lqcharts-styles', LQCHARTS_PLUGIN_URL . '/assets/js-libraries/chart/chart.min.css', array(), time() );\n\n\t\twp_enqueue_script( 'lqcharts-library-scripts', LQCHARTS_PLUGIN_URL . '/assets/js-libraries/chart/chart.min.js', array(\n\t\t\t'jquery',\n\t\t), time(), true );\n\n\t\twp_enqueue_script( 'lqcharts-scripts', LQCHARTS_PLUGIN_URL . '/assets/scripts.js', array(\n\t\t\t'jquery',\n\t\t\t'lqcharts-library-scripts',\n\t\t), time(), true );\n\n\t}", "title": "" }, { "docid": "984959972709d7dead7647ca205e0d1c", "score": "0.77163446", "text": "public static function support_scripts_and_styles()\n\t{\n\t\twp_enqueue_style(\n\t\t\t'UKMwp_dashboard_css',\n\t\t\tstatic::getPluginUrl() . 'css/UKMwp_dashboard.css'\n\t\t);\n\n\t\twp_enqueue_script('WPbootstrap3_js');\n\t\twp_enqueue_style('WPbootstrap3_css');\n\t}", "title": "" }, { "docid": "359d7ea1cc8fc3b713d4eab1269074f8", "score": "0.77035755", "text": "public function enqueueScripts()\n {\n if ($this->getCollection('scripts') != null) {\n foreach ($this->getCollection('scripts') as $script) {\n $js = $script->getData();\n wp_enqueue_script(\n $js['name'],\n $this->getPath('Js') . $js['filename'],\n $js['dependencies'],\n $js['version'],\n $js['inFooter']\n );\n }\n }\n }", "title": "" }, { "docid": "4a52b0e73a376d2a51f4d7703c082263", "score": "0.76979935", "text": "public static function scripts_and_styles() {\n wp_enqueue_style('WPbootstrap3_css');\n }", "title": "" }, { "docid": "f9a109a7b10804673644c44a318e7dcc", "score": "0.7694587", "text": "public function action_wp_enqueue_scripts() {\n }", "title": "" }, { "docid": "4440a08fa90b51e65846eb8d1cf942fb", "score": "0.76907337", "text": "public function enqueue_scripts() {\n\n /**\n * An instance of this class should be passed to the run() function\n * defined in O3PO_Loader as all of the hooks are defined\n * in that particular class.\n *\n * The O3PO_Loader will then create the relationship\n * between the defined hooks and the functions defined in this\n * class.\n */\n\n//\t\twp_enqueue_script( $this->plugin_name . '-public.js', plugin_dir_url( __FILE__ ) . 'js/' . $this->plugin_name . '-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "0a9335140d0ddaf35dbd6490157da3b7", "score": "0.7688913", "text": "public static function load_scripts()\n\t{\n\t\twp_enqueue_script( 'thickbox' );\n\t\twp_enqueue_script( 'media-upload' );\n\t\tif( function_exists( 'add_thickbox' ) ) add_thickbox();\n\t\twp_enqueue_script( 'bulkmenow-main' );\t\t\n\t}", "title": "" }, { "docid": "446412e59bff40effc2ff875171f6f04", "score": "0.7683661", "text": "public function enqueue_scripts() {\n\t\twp_enqueue_style( 'kirki-control-typography-style', URL::get_from_path( dirname( __DIR__ ) . '/assets/styles/style.css' ), [], '1.0' );\n\n\t\twp_enqueue_script( 'kirki-typography', URL::get_from_path( dirname( __DIR__ ) . '/assets/scripts/script.js' ), [], '1.0', true );\n\t\twp_localize_script( 'kirki-typography', 'kirkiTypographyControls', self::$typography_controls );\n\n\t\tif ( ! self::$gfonts_var_added ) {\n\t\t\techo '<script>kirkiGoogleFonts=';\n\t\t\t$google = new GoogleFonts();\n\t\t\t$google->print_googlefonts_json( false );\n\t\t\techo ';</script>';\n\t\t\tself::$gfonts_var_added = true;\n\t\t}\n\t}", "title": "" }, { "docid": "62765908781d83940c1f8eb52fe49e2e", "score": "0.7682204", "text": "public function enqueue_scripts () {\n\t\tglobal $wooslider;\n\n\t\t$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';\n\t\twp_register_script( $this->token . '-mousewheel', esc_url( $wooslider->plugin_url . 'assets/js/jquery.mousewheel' . $suffix . '.js' ), array( 'jquery' ), '2.1.0-20121206', true );\n\t\twp_register_script( $this->token . '-flexslider', esc_url( $wooslider->plugin_url . 'assets/js/jquery.flexslider' . $suffix . '.js' ), array( 'jquery', $this->token . '-mousewheel' ), '2.2.0-20121206', true );\n\t\twp_register_script( $this->token . '-fitvids', esc_url( $wooslider->plugin_url . 'assets/js/jquery.fitvids.js' ), array( 'jquery' ), '2.1.0-20121206', true );\n\n\t\twp_enqueue_script( $this->token . '-flexslider' );\n\t\twp_enqueue_script( $this->token . '-fitvids' );\n\t}", "title": "" }, { "docid": "5f73f99cda4681f5d5ca5d725cf48ac9", "score": "0.76737285", "text": "public function enqueueScripts()\n {\n wp_enqueue_script('bam-ads-system-admin', BAM_ADS_SYSTEM_URL . '/js/bam-ads-system-admin.js', ['jquery'], BAM_ADS_SYSTEM_VERSION, false);\n }", "title": "" }, { "docid": "1f6d9814d4d48dc0788d6eea7351e6e7", "score": "0.7672296", "text": "private static function enqueueAssets(): void {\n\t\twp_enqueue_style( 'woocommerce-customizations/google-fonts' );\n\t\twp_enqueue_style( 'woocommerce-customizations/main.css' );\n\n\t\twp_enqueue_script( 'woocommerce-customizations/isotope.js' );\n\t\twp_enqueue_script( 'woocommerce-customizations/main.js' );\n\t}", "title": "" }, { "docid": "82a7b7b05c822c371c79e5201f0ef4db", "score": "0.7669543", "text": "function bao_scripts() {\n\n wp_enqueue_style( 'ba-style', get_stylesheet_directory_uri() . '/style.css?v=101' );\n\n \twp_enqueue_script( 'boa-script', get_stylesheet_directory_uri() . '/assets/js/script.js', array('jquery'), '20151215', true );\n\n }", "title": "" }, { "docid": "8f7540fe601fd91b7e9e94f57faad1be", "score": "0.7664036", "text": "public function enqueue_scripts()\n {\n\n /**\n * This function is provided for demonstration purposes only.\n *\n * An instance of this class should be passed to the run() function\n * defined in Flo_Launch_Loader as all of the hooks are defined\n * in that particular class.\n *\n * The Flo_Launch_Loader will then create the relationship\n * between the defined hooks and the functions defined in this\n * class.\n */\n\n wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/all.min.js', array( 'jquery' ), $this->version, false);\n\n }", "title": "" }, { "docid": "150e51bb53f0ddb31337f6b6ee9798f6", "score": "0.7663082", "text": "public function register_scripts() {\n\t\tforeach ($this->scripts as $key => $script) {\n\t\t\t$source = $this->theme_uri . $script['src'];\n\t\t\twp_enqueue_script($key, $source, $script['deps'], $script['ver'], true);\n\t\t}\n\t}", "title": "" }, { "docid": "06dfd378681cb41597d5224b08edddd4", "score": "0.7651991", "text": "function oniros_scripts(){\n\t/*\n\tWe assume your development server has WP_DEBUG turned on and your production enviroment has it turned off\n\t*/\n\n\t// WP required stylesheet\n\twp_enqueue_style('base', get_stylesheet_directory_uri().'/style.css' );\n\t\n\tif( !WP_DEBUG ) {\n\t\t\n\t\t// Our own stylesheet (minimized)\n\t\twp_enqueue_style('app', get_stylesheet_directory_uri().'/dist/css/main/main.min.css');\t\n\t\t\n\t\t// Own script (uglyfied)\n\t\twp_enqueue_script('main',get_stylesheet_directory_uri().'/dist/js/app.min.js', array('jquery'), null, true);\n\t\t\n\t\t//Add other scripts here\n\n\t} else{\n\t\t\n\t\t// Our own stylesheet \n\t\twp_enqueue_style('app', get_stylesheet_directory_uri().'/dist/css/main/main.css');\t\n\t\t\n\t\t// Own script \n\t\twp_enqueue_script('main',get_stylesheet_directory_uri().'/dist/js/app.js', array('jquery'), null, true);\n\t\t\n\t\t// Add other scripts here\n\t}\n}", "title": "" }, { "docid": "0eecd999581fbf6d7b2744446935a991", "score": "0.7650185", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Blossom_Recipe_Maker_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Blossom_Recipe_Maker_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/blossom-recipe-public.js', array( 'jquery' , 'jquery-ui-progressbar'), $this->version, true );\n\n\t\twp_enqueue_script( $this->plugin_name.'adjust-ingredients', plugin_dir_url( __FILE__ ) . 'js/blossom-adjust-ingredients.js', array( 'jquery'), $this->version, true );\n\n\t\twp_enqueue_script( $this->plugin_name.'math-script', plugin_dir_url( __FILE__ ) . 'js/math.min.js', array( 'jquery' ), '5.1.2', true );\n\n\t\twp_enqueue_script( $this->plugin_name.'fancybox-script', plugin_dir_url( __FILE__ ) . 'js/jquery.fancybox.min.js', array( 'jquery' ), '3.3.5', true );\n\n\t\twp_enqueue_script( $this->plugin_name.'owl-carousel', plugin_dir_url( __FILE__ ) . 'js/owl.carousel.min.js', array( 'jquery' ), '2.3.4', true );\n\n\t\twp_enqueue_script( $this->plugin_name.'font-awesome', plugin_dir_url( __FILE__ ) . 'js/fontawesome.min.js', array('jquery'), '5.3.1', true );\n\n\t}", "title": "" }, { "docid": "8dd1e569f25d3935f1b61ea64b81834f", "score": "0.7648761", "text": "public function enqueue_scripts()\n {\n\n /**\n * This function is provided for demonstration purposes only.\n *\n * An instance of this class should be passed to the run() function\n * defined in Sikeller_Tools_Loader as all of the hooks are defined\n * in that particular class.\n *\n * The Sikeller_Tools_Loader will then create the relationship\n * between the defined hooks and the functions defined in this\n * class.\n */\n\n wp_enqueue_script($this->sikeller_tools, plugin_dir_url(__FILE__) . 'js/sikeller-tools-admin.js', array('jquery'), $this->version, false);\n\n }", "title": "" }, { "docid": "5aaebbf552d70d9f2f3cc0726af8e2db", "score": "0.76441854", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Snap_Affiliate_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Snap_Affiliate_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/snap-affiliate-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "1721271ea03dfa14d1191e58a32e3846", "score": "0.7644034", "text": "public function add_scripts(){\n\t\t \n\t\t///UIKIT FRAMEWORK\n\t\twp_enqueue_script('uikit', $this->path . 'assets/js/uikit/uikit.min.js', array('jquery'));\n\t\twp_enqueue_script('uikit-icons', $this->path . 'assets/js/uikit/uikit-icons.min.js', array('jquery'));\n\t\t///ADMIN 2020 SCRIPTS\n\t\twp_enqueue_script('admin2020-utilities', $this->path . 'assets/js/admin2020/utilities.min.js', array('jquery'));\n\t\twp_localize_script('admin2020-utilities', 'admin2020_utilities_ajax', array(\n\t\t\t'ajax_url' => admin_url('admin-ajax.php'),\n\t\t\t'security' => wp_create_nonce('admin2020-utilities-security-nonce'),\n\t\t));\n\t\t \n\t }", "title": "" }, { "docid": "a234fb2adff737c34cc9f298d6ec00f8", "score": "0.7622817", "text": "function enqueue_scripts() {\n // Add parent theme styles if using child theme.\n if ( is_child_theme() ) {\n wp_enqueue_style( 'rafter-parent-style', get_template_directory_uri() . '/assets/css/main.css', array(), null );\n }\n\n // Load active theme stylesheet.\n wp_enqueue_style( 'rafter-style', get_stylesheet_directory_uri() . '/assets/css/main.css', array(), null );\n\n // Load custom fonts.\n // wp_enqueue_style( 'rafter-fonts', '//fonts.googleapis.com/css?family=Open+Sans' );\n\n // Register scripts.\n wp_enqueue_script( 'rafter-scripts', get_template_directory_uri() . '/assets/js/main.js', array( 'jquery' ), null, true );\n\n // Load comments script.\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n }", "title": "" }, { "docid": "2dcd247b1bdfe82ae0ff7204d5085386", "score": "0.7620435", "text": "public function admin_enqueue_scripts()\n\t{\n\t\twp_register_script('sync-beaverbuilder-settings', plugin_dir_url(dirname(__FILE__)) . '/assets/js/sync-beaverbuilder-settings.js',\n\t\t\tarray('jquery', 'sync'),\n\t\t\tWPSiteSync_BeaverBuilder::PLUGIN_VERSION, TRUE);\n\t\twp_enqueue_script('sync-beaverbuilder-settings');\n\n\t\twp_register_style('sync-beaverbuilder-admin', plugin_dir_url(dirname(__FILE__)) . 'assets/css/sync-beaverbuilder-admin.css',\n\t\t\tarray('sync-admin'),\n\t\t\tWPSiteSync_BeaverBuilder::PLUGIN_VERSION);\n\t\twp_enqueue_style('sync-beaverbuilder-admin');\n\t}", "title": "" }, { "docid": "94c5c016271c2d094a5c08fa43c60770", "score": "0.76202124", "text": "public function enqueued_scripts():void {\n\t\tif ( 'kebabble_orders' === get_current_screen()->id ) {\n\t\t\twp_enqueue_style( 'kebabble-orders-css', plugins_url( '/../assets/orders.css', __FILE__ ), [], '1.1' );\n\t\t\twp_enqueue_script( 'kebabble-orders-js', plugins_url( '/../assets/orders.js', __FILE__ ), [ 'jquery' ], '1.1', true );\n\t\t}\n\t}", "title": "" }, { "docid": "d54591b64474e390213a951a6bff6073", "score": "0.7618562", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Rt_Slideshow_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Rt_Slideshow_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script( $this->plugin_name . '-dependency-slider', plugins_url( '../node_modules/lightslider/dist/js/lightslider.min.js', __FILE__ ), array( 'jquery' ) );\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/rt-slideshow-public.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-sortable' ) );\n\t}", "title": "" }, { "docid": "64389fb69bfd6696063eaf987efd57a7", "score": "0.761501", "text": "public function scripts_styles() {\n\t\twp_register_style( 'prefix-style', PREFIX_PLUGIN_URL . 'assets/dist/css/public.min.css', [], rand(), 'all' );\n\t\twp_register_script( 'prefix-script', PREFIX_PLUGIN_URL . 'assets/dist/js/public.min.js', [ 'jquery' ], rand(), true );\n\n\t\twp_enqueue_style( 'prefix-style' );\n\t\twp_enqueue_script( 'prefix-script' );\n\t}", "title": "" }, { "docid": "bd20a2db8a1e159df725fe2dc1bc8835", "score": "0.7614912", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Content_Scheduler_Public_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Content_Scheduler_Public_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\t// wp_enqueue_script( $this->Content_Scheduler, plugin_dir_url( __FILE__ ) . 'js/plugin-name-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "4f49806f308912a14578434c8b9d214f", "score": "0.7609219", "text": "public function action_admin_enqueue_scripts() {\n\n wp_enqueue_style( 'cst-shia-kapos-wire-curator', get_stylesheet_directory_uri() . '/assets/css/shia-kapos-wire-curator.css' );\n wp_enqueue_script( 'cst-shia-kapos-wire-curator', get_stylesheet_directory_uri() . '/assets/js/shia-kapos-wire-curator.js' );\n\n }", "title": "" }, { "docid": "bab0a02c731d75d8f750ad610e49aa67", "score": "0.7608444", "text": "function instant_articles_enqueue_scripts() {\r\n\t\twp_enqueue_style( 'instant-articles-meta-box' );\r\n\t\twp_enqueue_style( 'instant-articles-settings-wizard' );\r\n\t\twp_enqueue_style( 'instant-articles-settings' );\r\n\t\twp_enqueue_style( 'instant-articles-wizard' );\r\n\t\twp_enqueue_style( 'instant-articles-index-column' );\r\n\r\n\t\twp_enqueue_script( 'instant-articles-meta-box' );\r\n\t\twp_enqueue_script( 'instant-articles-option-ads' );\r\n\t\twp_enqueue_script( 'instant-articles-option-analytics' );\r\n\t\twp_enqueue_script( 'instant-articles-option-publishing' );\r\n\t\twp_enqueue_script( 'instant-articles-settings' );\r\n\t\twp_enqueue_script( 'instant-articles-wizard' );\r\n\t}", "title": "" }, { "docid": "9822c95f7d46620c0c2ad362f2f77340", "score": "0.7603637", "text": "public function enqueue_scripts(){\n\t\twp_enqueue_script( 'prism', plugins_url( $this->_dirname . '/inc/prism.js' ), array(), '', true );\n\t\twp_enqueue_style( 'prism-style', plugins_url( $this->_dirname . '/inc/prism.css' ) );\n\t}", "title": "" }, { "docid": "42359790a5d30c383bffff7c3b4eb43d", "score": "0.75953835", "text": "function mb_artwork_enqueue(){\n\tglobal $post;\n\n\tif( !is_admin()){\n\n\t\t$req_common = array(\n\t\t'jquery',\n\t\t'jquery_qtip',\n\t\t'mb_plugins');\n\n\t\twp_register_script('mb_artwork_common',get_stylesheet_directory_uri() . '/js/scripts.js',$req_common,'1',true);\n\t\twp_enqueue_script('mb_artwork_common');\n\n\t}\n}", "title": "" }, { "docid": "1469870e7b0ec9b31ca48f10a72c6829", "score": "0.7589734", "text": "function laborator_wp_enqueue_scripts()\n{\n\t# Styles\n\t$rtl_include = '';\n\n\twp_enqueue_style(array('bootstrap', 'kalium-main', 'font-awesome', 'font-flaticons', 'font-lineaicons', 'style'));\n\n\t# Scripts\n\twp_enqueue_script(array('jquery', 'bootstrap', 'tweenmax', 'modernizr', 'joinable', 'isotope'));\n\n\t# Custom Skin\n\tif(get_data('use_custom_skin'))\n\t{\n\t\twp_enqueue_style('custom-skin', site_url('?custom-skin'), null, null);\n\t}\n\t\n\t# Single Post\n\tif(is_single())\n\t{\t\t\n\t\twp_enqueue_script(array('fluidbox'));\n\t\twp_enqueue_style(array('fluidbox'));\n\t\t\n\t\tif(comments_open())\n\t\t{\n\t\t\twp_enqueue_script('comment-reply');\n\t\t}\n\t}\n\n\t# Fonts\n\tlaborator_load_font();\n}", "title": "" }, { "docid": "abb59d6008e49b5a40f1b38fbec0c034", "score": "0.7588504", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Woo_Partner_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Woo_Partner_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->woo_Partner, plugin_dir_url( __FILE__ ) . 'js/woo-Partner-admin.js', array( 'jquery' ), $this->version, false );\n\t\twp_enqueue_script( 'jquery' );\n\t}", "title": "" }, { "docid": "adb4e7d23ce31de744c204a9e1a20ebd", "score": "0.7586319", "text": "function oct_scripts_styles(){\n\n\n\n\t\t// Enqueue Styles\n\t\twp_enqueue_style('vanilla-bs-css', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css', false , '3.3.7');\n\t\twp_enqueue_style('vanilla-fa-css', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', array( 'vanilla-bs-css' ) , '4.7.0');\n\t\twp_enqueue_style('vanilla-css', get_stylesheet_uri());\n\n\n\t\t// move jquery to footer\n\t\twp_deregister_script( 'jquery' );\n \twp_register_script( 'jquery', includes_url( '/js/jquery/jquery.js' ), false, NULL, true );\n \twp_enqueue_script( 'jquery' );\n\n\n\t\t// Enqueue Scripts\n\t\twp_enqueue_script('vanilla-bs-js', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js', array('jquery'), '3.3.5', true);\n\t\twp_enqueue_script('vanilla-js', get_template_directory_uri(). '/assets/js/script.js', array('jquery', 'vanilla-bs-js'), '1.0', true);\n\n\t}", "title": "" }, { "docid": "3a1885a867f51ee642a2223e6a0f2dce", "score": "0.7584844", "text": "public function enqueue_scripts() {\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( dirname( dirname( __FILE__ ) ) ) . 'dist/admin.js', array( 'jquery' ), $this->version, true );\n\n\t}", "title": "" }, { "docid": "5aed7d16812fd2c53c0938d2b5c120ad", "score": "0.7583478", "text": "public function add_styles_and_scripts() {\n\n\t\tif ( $this->is_rtl() ) {\n\t\t\twp_enqueue_style( 'a8c-wpcom-masterbar-rtl', $this->wpcom_static_url( '/wp-content/mu-plugins/admin-bar/rtl/wpcom-admin-bar-rtl.css' ), array(), JETPACK__VERSION );\n\t\t\twp_enqueue_style( 'a8c-wpcom-masterbar-overrides-rtl', $this->wpcom_static_url( '/wp-content/mu-plugins/admin-bar/masterbar-overrides/rtl/masterbar-rtl.css' ), array(), JETPACK__VERSION );\n\t\t} else {\n\t\t\twp_enqueue_style( 'a8c-wpcom-masterbar', $this->wpcom_static_url( '/wp-content/mu-plugins/admin-bar/wpcom-admin-bar.css' ), array(), JETPACK__VERSION );\n\t\t\twp_enqueue_style( 'a8c-wpcom-masterbar-overrides', $this->wpcom_static_url( '/wp-content/mu-plugins/admin-bar/masterbar-overrides/masterbar.css' ), array(), JETPACK__VERSION );\n\t\t}\n\n\t\t// Local overrides.\n\t\twp_enqueue_style( 'a8c_wpcom_css_override', plugins_url( 'overrides.css', __FILE__ ), array(), JETPACK__VERSION );\n\n\t\tif ( ! Jetpack::is_module_active( 'notes ' ) ) {\n\t\t\t// Masterbar is relying on some icons from noticons.css.\n\t\t\twp_enqueue_style( 'noticons', $this->wpcom_static_url( '/i/noticons/noticons.css' ), array(), JETPACK__VERSION . '-' . gmdate( 'oW' ) );\n\t\t}\n\n\t\twp_enqueue_script(\n\t\t\t'jetpack-accessible-focus',\n\t\t\tAssets::get_file_url_for_environment( '_inc/build/accessible-focus.min.js', '_inc/accessible-focus.js' ),\n\t\t\tarray(),\n\t\t\tJETPACK__VERSION,\n\t\t\tfalse\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'a8c_wpcom_masterbar_tracks_events',\n\t\t\tAssets::get_file_url_for_environment(\n\t\t\t\t'_inc/build/masterbar/tracks-events.min.js',\n\t\t\t\t'modules/masterbar/tracks-events.js'\n\t\t\t),\n\t\t\tarray( 'jquery' ),\n\t\t\tJETPACK__VERSION,\n\t\t\tfalse\n\t\t);\n\n\t\twp_enqueue_script(\n\t\t\t'a8c_wpcom_masterbar_overrides',\n\t\t\t$this->wpcom_static_url( '/wp-content/mu-plugins/admin-bar/masterbar-overrides/masterbar.js' ),\n\t\t\tarray( 'jquery' ),\n\t\t\tJETPACK__VERSION,\n\t\t\tfalse\n\t\t);\n\t}", "title": "" }, { "docid": "3403ba1340764856d943ed523da7341c", "score": "0.7580493", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Contact_Helpdesk_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Contact_Helpdesk_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/contact-helpdesk-admin.js', array( 'jquery' ), $this->version, false );\n\t}", "title": "" }, { "docid": "fb104cbbc059f99db877f0cb5cab1bf8", "score": "0.7575151", "text": "function custom_theme_scripts() {\n\n\t\t// Bootstrap Integration\n\t\twp_enqueue_style(\"bootstrap\", get_template_directory_uri() . \"/css/bootstrap.min.css\");\n\n\t\t// Main CSS\n\t\twp_enqueue_style(\"main-styles\", get_stylesheet_uri());\n\n\t\t// JavaScript\n\t\twp_enqueue_script(\"bootstrap-js\", get_template_directory_uri() . \"/js/bootstrap.min.js\");\n\t}", "title": "" }, { "docid": "189c560ec78493bc323cff2a3e804b81", "score": "0.757384", "text": "public function enqueue_scripts()\n {\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in AltimeaQuizLoader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The AltimeaQuizLoader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\t$fileName = 'altimea-quiz-main.js';\n\t\t$newFileName = AltimeaQuizGulpfile::getFileNameMD5( $fileName );\n\n\t\tif ( file_exists( plugin_dir_path( ALTIMEA_QUIZ_FILE ) . 'public/assets/js/' . $newFileName ) ) {\n\t\t\twp_enqueue_script( $this->altimea_quiz, plugin_dir_url( ALTIMEA_QUIZ_FILE ) . 'public/assets/js/' . $newFileName, array( 'jquery' ), $this->version, false );\n\t\t} else {\n\t\t\twp_enqueue_script( $this->altimea_quiz, plugin_dir_url( ALTIMEA_QUIZ_FILE ) . 'public/assets/js/' . $fileName, array( 'jquery' ), $this->version, false );\n\t\t}\n\t}", "title": "" }, { "docid": "40636e38671b986117adee1d601f5f72", "score": "0.7558634", "text": "function carr_scripts() {\n\t$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';\n\n\twp_enqueue_style( 'cmc-style', get_template_directory_uri() . \"/css/style{$postfix}.css\" );\n\n\twp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/modernizr-2.5.3.min.js' );\n\twp_enqueue_script( 'core', get_template_directory_uri() . \"/js/core{$postfix}.js\", array( 'jquery' ), '1.0', true );\n}", "title": "" }, { "docid": "20dff13a3f14fb64845980e447ed6661", "score": "0.7556504", "text": "function scripts() {\n\n\t\twp_enqueue_script(\n\t\t\t'post-finder',\n\t\t\tplugins_url( 'js/main.js', __FILE__ ),\n\t\t\tarray(\n\t\t\t\t'jquery',\n\t\t\t\t'jquery-ui-draggable',\n\t\t\t\t'jquery-ui-sortable',\n\t\t\t\t'underscore',\n\t\t\t),\n\t\t\tPOST_FINDER_VERSION,\n\t\t\ttrue\n\t\t);\n\n\t\twp_localize_script(\n\t\t\t'post-finder',\n\t\t\t'POST_FINDER_CONFIG',\n\t\t\tarray(\n\t\t\t\t'adminurl' => admin_url(),\n\t\t\t\t'nothing_found' => esc_html__( 'No posts found.', 'post_finder' ),\n\t\t\t\t'max_number_allowed' => esc_html__( 'Sorry, the maximum number of items has been reached.', 'post_finder' ),\n\t\t\t\t'already_added' => esc_html__( 'Sorry, that item has already been added.', 'post_finder' )\n\t\t\t)\n\t\t);\n\n\t\twp_enqueue_style( 'post-finder', plugins_url( 'css/screen.css', __FILE__ ) );\n\t}", "title": "" }, { "docid": "2eee3c9a9db3ee8756f43edc98e2e00f", "score": "0.7554654", "text": "function wellthemes_shortcodes_scripts() {\n\t\twp_enqueue_style( 'font_awesome_stylesheet', plugin_dir_url( __FILE__ ) . 'css/font-awesome/css/font-awesome.min.css' );\n\n\t\t//Register required scripts\n\t\twp_register_script( 'wt_tabs', plugin_dir_url( __FILE__ ) . 'js/wt_tabs.js', array ( 'jquery', 'jquery-ui-tabs'), '1.0', true );\n\t\twp_register_script( 'wt_slider', plugin_dir_url( __FILE__ ) . 'js/unslider.min.js', array ( 'jquery'), '1.0', true );\n\t}", "title": "" }, { "docid": "51d59f8b73876cef68e7e53fdbe8466b", "score": "0.75540274", "text": "public function enqueue_assets() {\n\t\twp_enqueue_style( sprintf( '%s_display', parent::$plugin_name ) );\n\t\twp_enqueue_script( sprintf( '%s_display', parent::$plugin_name ) );\n\t\twp_localize_script( sprintf( '%s_display', parent::$plugin_name ), parent::$plugin_name, array( 'wpajaxurl' => admin_url( 'admin-ajax.php' ) ) );\n\t}", "title": "" }, { "docid": "b101be5713dad1568f00759e7a8cc56d", "score": "0.75493056", "text": "public function adminEnqueueScripts() {\n\t\t\t// wp_enqueue_script( 'js', BESTBUG_RPPRO_URL . '/assets/admin/js/script.js', array( 'jquery' ), '1.0', true );\n\t\t}", "title": "" }, { "docid": "24c3b6d8a88e038a81c80ae913def822", "score": "0.75470334", "text": "function play_scripts() {\n\twp_enqueue_style( 'play_bootstrap', get_template_directory_uri().'/css/bootstrap.min.css' );\n\twp_enqueue_style( 'play_font_awesome', get_template_directory_uri().'/font-awesome/css/font-awesome.min.css' );\n\twp_enqueue_style( 'play_site_styles', get_template_directory_uri().'/style.css' );\n\twp_enqueue_script('jquery');\n\twp_enqueue_script('play_modernizr', get_template_directory_uri().'/js/modernizr.js', array(), '1.0.0', true );\n}", "title": "" }, { "docid": "7eae1ab7ca83719928617c3df84f0a3e", "score": "0.754693", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * Register the default JavaScript\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/chunkypress-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "024781f2958ce42978baf3a87224fac6", "score": "0.7546399", "text": "function enqueue_scripts(){\r\n\t\t//jQuery JSON plugin\r\n\t\twp_enqueue_script('jquery-json', $this->plugin_dir_url.'/js/jquery.json-1.3.js', array('jquery'), '1.3');\r\n\t\t//jQuery sort plugin\r\n\t\twp_enqueue_script('jquery-sort', $this->plugin_dir_url.'/js/jquery.sort.js', array('jquery'));\r\n\t\t//jQuery UI Droppable\r\n\t\twp_enqueue_script('jquery-ui-droppable');\r\n\t\t\r\n\t\t//Editor's scipts\r\n wp_enqueue_script(\r\n\t\t\t'menu-editor', \r\n\t\t\t$this->plugin_dir_url.'/js/menu-editor.js', \r\n\t\t\tarray('jquery', 'jquery-ui-sortable', 'jquery-ui-dialog', 'jquery-form'), \r\n\t\t\t'1.1'\r\n\t\t);\r\n\r\n\t\t//The editor will need access to some of the plugin data and WP data.\r\n\t\twp_localize_script(\r\n\t\t\t'menu-editor',\r\n\t\t\t'wsEditorData',\r\n\t\t\tarray(\r\n\t\t\t\t'adminAjaxUrl' => admin_url('admin-ajax.php'),\r\n\t\t\t\t'showHints' => $this->get_hint_visibility(),\r\n\t\t\t)\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "04e9d99eef386688608f6492cabd9d1a", "score": "0.754571", "text": "function startwordpress_scripts() {\n wp_enqueue_style('bootstrap', get_template_directory_uri().'/css/bootstrap.css');\n wp_enqueue_style('blog', get_template_directory_uri().'/css/blog.css', array('bootstrap'));\n wp_enqueue_script('bootstrap', get_template_directory_uri().'/js/bootstrap.js', array('jquery', 'tether'), null, true);\n wp_enqueue_script('tether', get_template_directory_uri().'/js/tether.js', array(), null, true);\n}", "title": "" }, { "docid": "ac92a16c911ef5afdbceda405ae5aa12", "score": "0.7541236", "text": "public function enqueue_scripts() {\n $screen = get_current_screen();\n if ($screen->id != 'toplevel_page_wp-google-translate') return;\n\n wp_enqueue_script('jquery-ui-core');\n wp_enqueue_script('jquery-ui-tabs');\n wp_enqueue_script('wp-color-picker');\n \n wp_enqueue_script($this->mts_google_translator, plugin_dir_url(__FILE__) . 'js/wp-google-translate-admin.js', array('jquery'), $this->version, false);\n $options = get_option('mts_google_translate_options');\n if (empty($options) || empty($options['last_tab'])) {\n $last_tab = 0;\n } else {\n $last_tab = $options['last_tab'];\n }\n wp_localize_script( $this->mts_google_translator, 'wpgt_opts', array('tabindex' => $last_tab) );\n \n wp_enqueue_script(\n 'select2', plugin_dir_url(__FILE__) . 'js/select2.full.min.js', array(\n 'jquery',\n ), $this->version, false\n );\n }", "title": "" }, { "docid": "b154a1d32f33ff75e5a0b8f64bb55663", "score": "0.75343335", "text": "public function enqueue() {\n\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\twp_enqueue_script( 'zeen-control-slider', get_parent_theme_file_uri( 'assets/admin/js/zeen-control-slider.js' ), array( 'jquery', 'jquery-ui-core', 'jquery-ui-slider' ), false, true );\n\t}", "title": "" }, { "docid": "43d4b76cc28fc43e6d14f35f2ba4369c", "score": "0.7530705", "text": "function dejan_script_enqueue() {\n\t//css\n\twp_enqueue_style('screen', get_template_directory_uri() . '/stylesheets/screen.css' , array(), '1.0.0', 'all');\n\twp_enqueue_style('screen', get_template_directory_uri() . '/stylesheets/print.css' , array(), '1.0.0', 'all');\n\n\t//js\n\twp_enqueue_script('jquery');\n\twp_enqueue_script('customjs', get_template_directory_uri() . '/javascripts/myScripts.js');\n}", "title": "" } ]
c5e9ba68bb01f3b25d746093f2ee26de
Uses Gravity Form filter to assign appropriate id values to specific location input fields of Gravity Forms. Location input fields are identified by a css class name assigned to the field's wrapper during form creation. This enables Google Places autocomplete to work and forms to capture location data i.e. lat, long etc for posts and member registration. Also captures and stores members tags /key words of interest in their profile. Author: Jesse Browne
[ { "docid": "c0defb51cde0a6e60aa096b9ba5e2ff6", "score": "0.77535707", "text": "function add_location_and_tag_fields($input, $field, $value, $lead_id, $form_id) {\n \n $field_css_class = $field['cssClass'];\n $input_name_id = $field['id'];\n $location = \t\t'gp_google_geo_location';\n $latitude = \t\t'gp_google_geo_latitude';\n $longitude = \t\t'gp_google_geo_longitude';\n $country = \t\t\t'gp_google_geo_country';\n $admin_lvl_one = \t'gp_google_geo_administrative_area_level_1';\n $admin_lvl_two = \t'gp_google_geo_administrative_area_level_2';\n $admin_lvl_three = \t'gp_google_geo_administrative_area_level_3';\n $locality = \t\t'gp_google_geo_locality';\n $locality_slug = \t'gp_google_geo_locality_slug';\n $user_tags = 'gp_user_tags';\n $notification_set = 'notification_setting';\n $weekly_email = 'weekly_email';\n $monthly_email = 'monthly_email';\n $type = 'type=\"hidden\"';\n $read_only = \t\t'readonly=\"readonly\"'; \n \n # Check css class name for match with location class names above and define id on match\n switch ($field_css_class) {\n case $location:\n $type = 'type=\"text\"';\n $read_only = '';\n $input_id = $location;\n break;\n case $latitude:\n $input_id = $latitude;\n break;\n case $longitude:\n $input_id = $longitude;\n break;\n case $country:\n $input_id = $country;\n break;\n case $admin_lvl_one:\n $input_id = $admin_lvl_one;\n break;\n case $admin_lvl_two:\n $input_id = $admin_lvl_two;\n break;\n case $admin_lvl_three:\n $input_id = $admin_lvl_three;\n break;\n case $locality:\n $input_id = $locality;\n break;\n case $locality_slug:\n $input_id = $locality_slug;\n break;\n case $user_tags:\n $type = 'type=\"text\"'; \n $read_only = '';\n $input_id = $user_tags;\n break;\n case $notification_set:\n $type = 'type=\"radio\"';\n $read_only = '';\n $input_id = $notification_set;\n break;\n }\n\n switch ($type) {\n case 'type=\"radio\"':\n $input = (isset($input_id)) ? get_correct_radio_buttons($input_name_id, $input_id, $type, $read_only) : '';\n break;\n default:\n $input = (isset($input_id)) ? get_correct_input_field($input_name_id, $input_id, $type, $read_only) : '';\n }\n \n return $input;\n}", "title": "" } ]
[ { "docid": "f27b090fe8b33d41879e670f4447504b", "score": "0.6594943", "text": "function create_field($field)\n\t{\n\n\n global $post;\n\n ?>\n\n <div class=\"ve_map\">\n\n <?php \n \n /**\n * Get the meta\n * -------------------------------------------- */\n\n $data = $field['value'];\n $name = $this->try_get_value($data, 'name');\n $lat = $this->try_get_value($data, 'lat');\n $lng = $this->try_get_value($data, 'lng');\n $street = $this->try_get_value($data, 'street');\n $city = $this->try_get_value($data, 'city');\n $state = $this->try_get_value($data, 'state');\n $zip = $this->try_get_value($data, 'zip');\n $address = $this->try_get_value($data, 'address');\n $google_address = $this->try_get_value($data, 'google_address');\n \n ?>\n\n <fieldset>\n\n <p class=\"error-message\">Enter an address for the property.</p>\n\n <?php /* ?>\n <h4>How it works</h4>\n <ol>\n <li>Enter the property address into the \"Address Lookup Tool\" (directly below)</li>\n <li>Click \"Get Coordinates\"</li>\n <li>We fetch the latitude and longitude coordinates from Google, which are required for the search feature to work properly.</li>\n <li>The \"Street\", \"City\", \"State\", and \"Zip\" are for presentation purposes only and are not used in the search function, so feel free to change \"Pl\" to \"Place\", or \"Dr\" to \"Drive\"</li>\n </ol>\n\n <h4>Address Lookup Tool</h4>\n <?php */ ?>\n <p> <input type=\"text\" class=\"widefat\" placeholder=\"Enter the street address\" id=\"property-address\" name=\"<?php echo $field['name'] ?>[search_string]\" value=\"\" / > </p>\n <p> <a id=\"get-coordinates\" class=\"button-primary\" href=\"javascript:;\">Get Coordinates</a> </p>\n </fieldset>\n\n <div class=\"map\">\n <iframe id=\"property-iframe\" width=\"655\" height=\"350\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"<?php echo $url; ?>\"></iframe><br><a id=\"property-url\" target=\"_blank\" href=\"<?php echo $url ?>\">View Larger Map</a>\n </div>\n\n <fieldset class=\"address-info\">\n <p><b>Name</b> <input type=\"text\" id=\"property-name\" class=\"widefat\" name=\"<?php echo $field['name'] ?>[name]\" value=\"<?php echo $name ?>\" / > </p>\n <p><b>Street</b> <input type=\"text\" id=\"property-street\" class=\"widefat\" name=\"<?php echo $field['name'] ?>[street]\" value=\"<?php echo $street ?>\" / > </p>\n <p><b>City</b> <input type=\"text\" id=\"property-city\" class=\"widefat\" name=\"<?php echo $field['name'] ?>[city]\" value=\"<?php echo $city ?>\" / > </p>\n <p><b>State</b> <input type=\"text\" id=\"property-state\" class=\"widefat\" name=\"<?php echo $field['name'] ?>[state]\" value=\"<?php echo $state ?>\" / > </p>\n <p><b>Zip</b> <input type=\"text\" id=\"property-zip\" class=\"widefat\" name=\"<?php echo $field['name'] ?>[zip]\" value=\"<?php echo $zip ?>\" / > </p>\n <table>\n <tr>\n <td><b>Google Address:</b></td>\n <td><span id=\"google-address\"><?php echo $google_address ?></span></td>\n </tr>\n <tr>\n <td><b>Latitude:</b></td>\n <td><span id=\"lat\"><?php echo $lat ?></span></td>\n </tr>\n <tr>\n <td><b>Longitude:</b></td>\n <td><span id=\"lng\"><?php echo $lng ?></span></td>\n </tr>\n </table>\n <input class=\"required address\" type=\"hidden\" name=\"<?php echo $field['name'] ?>[address]\" value=\"<?php echo $address ?>\" />\n <input class=\"required google-address\" type=\"hidden\" name=\"<?php echo $field['name'] ?>[google_address]\" value=\"<?php echo $google_address ?>\" />\n <input class=\"required\" id=\"acf-property-lat\" type=\"hidden\" name=\"<?php echo $field['name'] ?>[lat]\" value=\"<?php echo $lat ?>\" />\n <input class=\"required\" id=\"acf-property-lng\" type=\"hidden\" name=\"<?php echo $field['name'] ?>[lng]\" value=\"<?php echo $lng ?>\" />\n <input class=\"required\" id=\"property-lat\" type=\"hidden\" name=\"_address_lat\" value=\"<?php echo $lat ?>\" />\n <input class=\"required\" id=\"property-lng\" type=\"hidden\" name=\"_address_lng\" value=\"<?php echo $lng ?>\" />\n </fieldset>\n\n </div>\n\n <div class=\"clear\"> </div>\n\n <?php\n \n \t}", "title": "" }, { "docid": "ce666aa9576c69ee0e5b98e45f22630d", "score": "0.64694816", "text": "function wpcf_fields_google_map_meta_box_form( $data ) {\n $form['name'] = array(\n '#name' => 'wpcf[' . $data['slug'] . ']', // Set this to override default output\n '#type' => 'textfield',\n '#title' => __( 'Add Google Map coordinates', 'wpcf' ),\n '#description' => __( 'Your input should look something like \"41.934146,12.455821\"', 'wpcf' )\n );\n return $form;\n}", "title": "" }, { "docid": "1b73358cbdac6f71eef63e668b139cb2", "score": "0.6436054", "text": "function listing_category_add_new_meta_field() { \n\t$map_countries = array(\n\t\t'Australia',\n\t\t'Brazil',\n\t\t'China',\n\t\t'Cyprus',\n\t\t'France',\n\t\t'India',\n\t\t'Indonesia',\n\t\t'Lithuania',\n\t\t'Malaysia',\n\t\t'New Zealand',\n\t\t'Panama',\n\t\t'Philippines',\n\t\t'Singapore',\n\t\t'Spain',\n\t\t'Thailand',\n\t\t'Turkey',\n\t\t'United Kingdom',\n\t\t'United States'\n\t);\n\t$map_zoom_levels = array(3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18);\n?>\n\t<div class=\"form-field\">\n\t\t<label for=\"listing_cat_meta[def_map_country]\"><?php _e( 'Manage Map Setting', 'listing_category' ); ?></label>\n\t\t<div class=\"map_setting_wrap\">\n\t\t\t<select name=\"listing_cat_meta[def_map_country]\" id=\"listing_cat_meta[def_map_country]\" class=\"sel_map_country map_setting_input_bdr\">\n\t\t\t\t<option value=\"\">Select Country For Google Map Setting</option>\n\t\t\t\t<?php foreach($map_countries as $map_country):?>\n\t\t\t\t\t<option value=\"<?php echo $map_country;?>\"><?php echo $map_country;?></option>\n\t\t\t\t<?php endforeach;?>\n\t\t\t</select>\n\t\t\t<span class=\"map_setting_divider\">\n\t\t\t\t<b>OR</b>\n\t\t\t</span>\n\t\t\t<div class=\"lat_long_wrap\">\n\t\t\t\t<label for=\"listing_cat_meta[latitude]\">Latitude</label>\n\t\t\t\t<input type=\"text\" name=\"listing_cat_meta[latitude]\" id=\"listing_cat_meta[latitude]\" class=\"map_setting_input_bdr\">\n\t\t\t\t<label for=\"listing_cat_meta[longitude]\">Longitude</label>\n\t\t\t\t<input type=\"text\" name=\"listing_cat_meta[longitude]\" id=\"listing_cat_meta[longitude]\" class=\"map_setting_input_bdr\">\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class=\"form-field\">\n\t\t<label for=\"listing_cat_meta[zoom_level]\"><?php _e( 'Select Zoom Level For Map Setting', 'listing_category' ); ?></label>\n\t\t<select name=\"listing_cat_meta[zoom_level]\" id=\"listing_cat_meta[zoom_level]\" class=\"sel_zoom_level\">\n\t\t\t<?php foreach($map_zoom_levels as $zoom_level):?>\n\t\t\t<?php if($zoom_level == 11):?>\n\t\t\t<option value=\"<?php echo $zoom_level;?>\" selected=\"selected\"><?php echo $zoom_level;?></option>\n\t\t\t<?php else:?>\n\t\t\t<option value=\"<?php echo $zoom_level;?>\"><?php echo $zoom_level;?></option>\n\t\t\t<?php endif;?>\n\t\t\t<?php endforeach;?>\n\t\t</select>\n\t</div>\n<?php }", "title": "" }, { "docid": "a4de55b9ff7c4766994368bf025fef13", "score": "0.6161809", "text": "function wp_scgcge_Input($type = 'text', $name, $value = '', $readonly = '', $required = '', $placeholder = '', $class = '', $id = '', $fv = '', $gfaa = '')\n{\n $gfaa_tag = $gfaa != '' ? ' maps = \"' . $gfaa . '\" ' : '';\n $readonly = $readonly != '' ? 'readonly' : '';\n $required = $required != '' ? 'required' : '';\n $fv = $fv != '' ? 'fv=\"' . $fv . '\"' : '';\n return '<input type=\"' . $type . '\" value=\"' . $value . '\" ' . $required . ' name=\"' . $name . '\" class=\"form-control ' . $class . '\" id=\"' . $name . ' ' . $id . '\" aria-describedby=\"' . $name . 'Help\" placeholder=\"' . __($placeholder, 'scgcge') . '\" ' . $readonly . ' ' . $fv . ' ' . $gfaa_tag . ' >';\n}", "title": "" }, { "docid": "d273ea4c34303d1e228d369d5079f353", "score": "0.61179715", "text": "function wp_scgcge_AddressGeneral($name, $values = ['', '', '', '', '', '', ''], $title = '')\n{\n $wp_scgcge_options = get_option('wp_scgcge_options');\n if (!empty($wp_scgcge_options['google_map_api_key'])) {\n $autocomplete = 'places-autocomplete';\n } else {\n $autocomplete = '';\n }\n\n $title2 = '';\n if ($title != '') {\n $title = '<label for=\"' . $name . '\">' . $title . '</label>';\n $title2 = '<label for=\"' . $name . '\" class=\"d-sm-none d-md-block\">&nbsp;</label>';\n }\n return '\n <div class=\"address-fields\">\n <div class=\"row\">\n <div class=\"col-md-4\">\n ' . $title . '\n <div class=\"form-group\">\n ' . wp_scgcge_Input('text', $name . '_care', !empty($values[0]) ? $values[0] : '', '', '', '', '')\n . wp_scgcge_Help($name . '_care', 'Care Of') . '\n </div>\n </div>\n\n <div class=\"col-md-2\">\n ' . $title2 . '\n <div class=\"form-group\">\n ' . wp_scgcge_Input('text', $name . '_line2', !empty($values[1]) ? $values[1] : '', '', '', '', '')\n . wp_scgcge_Help($name . '_line2', 'Unit / Suite') . '\n </div>\n </div>\n <div class=\"col-md-6\">\n ' . $title2 . '\n <div class=\"form-group\">\n ' . wp_scgcge_Input('text', $name . '_street', !empty($values[2]) ? $values[2] : '', '', 'required', __('Enter street address...', 'scgcge'), $autocomplete, '', '', 'street-address')\n . wp_scgcge_Help($name . '_street', 'Street Address') . '\n </div>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col-md\">\n <div class=\"form-group\">\n ' . wp_scgcge_Input('text', $name . '_suburb', !empty($values[3]) ? $values[3] : '', '', 'required', '', '', '', '', 'address-level2')\n . wp_scgcge_Help($name . '_suburb', 'City or Suburb') . '\n </div>\n </div>\n\n <div class=\"col-md\" data-do-when=\\'{ \"' . $name . '_country\": [\"AU\"] }\\' data-do-action=\"show\">\n <div>\n ' . wp_scgcge_Select($name . '_state', wp_scgcge_get_state_options(!empty($values[4]) ? $values[4] : ''), '', 'required', '', '', 'address-level1')\n . wp_scgcge_Help($name . '_state', 'State') . '\n </div>\n </div>\n <div class=\"col-md\" data-do-when=\\'{ \"' . $name . '_country\": [\"AU\"] }\\' data-do-action=\"show\">\n <div class=\"form-group\">\n ' . wp_scgcge_Input('text', $name . '_postcode', !empty($values[5]) ? $values[5] : '', '', 'required', '', '', '', '', 'postal-code')\n . wp_scgcge_Help($name . '_postcode', 'Postcode') . '\n </div>\n </div>\n <div class=\"col-md\">\n <div class=\"form-group\">\n ' . wp_scgcge_Select($name . '_country', wp_scgcge_get_countries_options(!empty($values[6]) ? $values[6] : ''), '', 'required', '', '', 'country')\n . wp_scgcge_Help($name . '_country', 'Country') . '\n </div>\n </div>\n </div>\n </div>';\n}", "title": "" }, { "docid": "32fcc90469eca57fa392280f0a765197", "score": "0.6098551", "text": "function wp_scgcge_AddressAU($name, $values = ['', '', '', '', '', ''], $title = '')\n{\n $wp_scgcge_options = get_option('wp_scgcge_options');\n if (!empty($wp_scgcge_options['google_map_api_key'])) {\n $autocomplete = 'places-autocomplete';\n } else {\n $autocomplete = '';\n }\n\n $title2 = '';\n if ($title != '') {\n $title = '<label for=\"' . $name . '\">' . $title . '</label>';\n $title2 = '<label for=\"' . $name . '\" class=\"d-sm-none d-md-block\">&nbsp;</label>';\n }\n return '\n <div class=\"address-fields\">\n <div class=\"row\">\n <div class=\"col-md-4\">\n ' . $title . '\n <div class=\"form-group\">\n ' . wp_scgcge_Input('text', $name . '_care', !empty($values[0]) ? $values[0] : '', '', '', '', '')\n . wp_scgcge_Help($name . '_care', 'Care Of') . '\n </div>\n </div>\n\n <div class=\"col-md-2\">\n ' . $title2 . '\n <div class=\"form-group\">\n ' . wp_scgcge_Input('text', $name . '_line2', !empty($values[1]) ? $values[1] : '', '', '', '', '')\n . wp_scgcge_Help($name . '_line2', 'Unit / Suite') . '\n </div>\n </div>\n <div class=\"col-md-6\">\n ' . $title2 . '\n <div class=\"form-group\">\n ' . wp_scgcge_Input('text', $name . '_street', !empty($values[2]) ? $values[2] : '', '', 'required', __('Enter street address...', 'scgcge'), $autocomplete, '', '', 'street-address')\n . wp_scgcge_Help($name . '_street', 'Street Address') . '\n </div>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col-md\">\n <div class=\"form-group\">\n ' . wp_scgcge_Input('text', $name . '_suburb', !empty($values[3]) ? $values[3] : '', '', 'required', '', '', '', '', 'address-level2')\n . wp_scgcge_Help($name . '_suburb', 'Suburb') . '\n </div>\n </div>\n\n <div class=\"col-md\">\n <div class=\"form-group\">\n ' . wp_scgcge_Select($name . '_state', wp_scgcge_get_state_options(!empty($values[4]) ? $values[4] : ''), '', 'required', '', '', 'address-level1')\n . wp_scgcge_Help($name . '_state', 'State') . '\n </div>\n </div>\n <div class=\"col-md\">\n <div class=\"form-group\">\n ' . wp_scgcge_Input('text', $name . '_postcode', !empty($values[5]) ? $values[5] : '', '', 'required', '', '', 'PostalCode', '', 'postal-code')\n . wp_scgcge_Help($name . '_postcode', 'Postcode') . '\n </div>\n </div>\n </div>\n </div>';\n}", "title": "" }, { "docid": "024a3ff88e6babf122cc0ce64e9ae75f", "score": "0.60082245", "text": "function cspm_post_submit_locations_custom_fields(){\r\n\t\t\t\r\n\t\t\t$fields = array();\r\n\t\r\n\t\t\tif(!class_exists('CSProgressMap'))\r\n\t\t\t\treturn $fields;\r\n\t\t\t\t\r\n\t\t\t$CSProgressMap = CSProgressMap::this();\r\n\t\t\t\r\n\t\t\t$fields[] = array(\r\n\t\t\t\t'name' => 'Custom Fields',\r\n\t\t\t\t'desc' => 'This section contains all custom fields added from the extension <strong>\"Submit Locations\"</strong>. \r\n\t\t\t\t\t\t You can edit the custom fields from here!',\r\n\t\t\t\t'type' => 'title',\r\n\t\t\t\t'id' => $this->metafield_prefix . '_custom_fields',\r\n\t\t\t\t'attributes' => array(\r\n\t\t\t\t\t'style' => 'font-size:20px; color:#008fed; font-weight:400;'\r\n\t\t\t\t),\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\tif(!class_exists('CspmslSubmitForm'))\r\n\t\t\t\treturn $fields;\r\n\t\t\t\r\n\t\t\t$CspmslSubmitForm = CspmslSubmitForm::this();\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Get all map using the same post type as the current post */\r\n\t\t\t\r\n\t\t\t$cspm_prefix = $CSProgressMap->metafield_prefix;\r\n\t\t\t \t\t\t\r\n\t\t\t$all_cspm_maps = get_posts(array(\r\n\t\t\t\t'post_type' => $CSProgressMap->object_type,\r\n\t\t\t\t'post_status' => 'publish',\r\n\t\t\t\t'posts_per_page' => -1,\r\n\t\t\t));\r\n\t\t\t\r\n\t\t\tif($all_cspm_maps){\r\n\t\t\t\t\r\n\t\t\t\t$displayed_map_ids = array();\r\n\t\t\t\t\r\n\t\t\t\tforeach($all_cspm_maps as $cspm_map){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tsetup_postdata($cspm_map);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$map_id = $cspm_map->ID; // Map ID\r\n\t\t\t\t\t\r\n\t\t\t\t\t$current_post_type = $CSProgressMap->cspm_get_current_post_type();\r\n\t\t\t\t\t$map_post_type = (array) get_post_meta($map_id, $cspm_prefix.'_post_type', false);\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t * Compare map \"post type\" and current post \"post type\" */\r\n\t\t\t\t\t \r\n\t\t\t\t\tif(in_array($current_post_type, $map_post_type) && !in_array($map_id, $displayed_map_ids)){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$displayed_map_ids[] = $map_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 * Get all \"Submit locations\" custom fields */\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t$custom_fields = get_post_meta($map_id, $cspm_prefix.'_new_custom_fields', true);\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(is_array($custom_fields)){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t * Render all custom fields */\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t$render_fields = $CspmslSubmitForm->cspmsl_render_new_fields(NULL, $custom_fields, $this->post_id, false);\r\n\t\r\n\t\t\t\t\t\t\t$i = 0;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tforeach($render_fields as $field){\r\n\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\t/**\r\n\t\t\t\t\t\t\t\t * Checking the name to insure only custom fields with a valid Name/ID will be displayed */\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$field_name = $this->cspm_setting_exists('name', $field);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(!empty($field_name)){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif($i == 0){\r\n\t\t\t\t\t\t\t\t\t\t$map_title = get_the_title($map_id);\r\n\t\t\t\t\t\t\t\t\t\t$map_link = get_edit_post_link($map_id);\r\n\t\t\t\t\t\t\t\t\t\t$field['before_row'] = str_replace(\r\n\t\t\t\t\t\t\t\t\t\t\tarray('[title]', ' closed'), \r\n\t\t\t\t\t\t\t\t\t\t\tarray('Custom Fields of \"<u>' . $map_title . '</u>\"', ''), \r\n\t\t\t\t\t\t\t\t\t\t\t$this->toggle_before_row.'<p class=\"cmb2-metabox-description\" style=\"margin:0 0 10px 0; padding-top:0;\">These are all custom fields added from the map \"<u><a href=\"'.$map_link.'\" target=\"_blank\">'.$map_title.'</a></u>\" at \"<u>Submit Locations Settings => Add/Edit custom fields</u>\"!</p><hr />'\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\t\r\n\t\t\t\t\t\t\t\t\tif($i == count($render_fields)-1) \r\n\t\t\t\t\t\t\t\t\t\t$field['after_row'] = $this->toggle_after_row;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$fields[] = $field;\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\t\r\n\t\t\t\t\t\t\t\t$i++;\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\t\r\n\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\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\twp_reset_postdata();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Display a message when no custom field is available */\r\n\t\t\t \r\n\t\t\tif(count($fields) == 1){\r\n\t\t\t\r\n\t\t\t\t$fields[] = array(\r\n\t\t\t\t\t'id' => $this->metafield_prefix . '_no_custom_fields_msg',\r\n\t\t\t\t\t'name' => '<strong>We could\\'t find any custom field!</strong><br /><br />\r\n\t\t\t\t\t\t\t Nothing bad! If you want to add new custom fields, edit your map(s) \r\n\t\t\t\t\t\t\t and go to the menu \"<u>Submit Locations Settings => Add/Edit custom fields</u>\".',\r\n\t\t\t\t\t'desc' => '',\r\n\t\t\t\t\t'type' => 'title',\r\n\t\t\t\t\t'attributes' => array(\r\n\t\t\t\t\t\t'style' => 'font-size:16px; color:#fff; background:#000; text-align:center; padding:30px; font-weight:200;'\r\n\t\t\t\t\t),\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $fields;\r\n\t\t\t\t\t\t \r\n\t\t}", "title": "" }, { "docid": "3f54c8feea332d45999f19228a30f720", "score": "0.60006374", "text": "function location_autocomplete_init() {\n\telgg_extend_view('css/elgg', 'location_autocomplete/css');\n \n elgg_register_js('elgg.jquery_min', \"http://code.jquery.com/jquery-1.4.2.min.js\");\n \n elgg_register_js('elgg.google_map', \"http://maps.google.com/maps/api/js?sensor=false\");\n \n $custom_js = elgg_get_simplecache_url('js', 'location_autocomplete/jquery_custom');\n\telgg_register_js('elgg.jquery_custom', $custom_js); \n \n $suggests_js = elgg_get_simplecache_url('js', 'location_autocomplete/geo_suggests');\n\telgg_register_js('elgg.geo_suggests', $suggests_js); \n \n elgg_extend_view(\"forms/profile/edit\", \"location_autocomplete/load_js\");\n \n elgg_extend_view(\"forms/register\", \"location_autocomplete/load_js\"); \n\n\n}", "title": "" }, { "docid": "5ed2612bbc7f94b3c7ae31a01b1732d3", "score": "0.5982785", "text": "function sugar_add_location_field() {\n\tglobal $post;\n\n\t$meta = get_post_custom( $post->ID );\n\n\techo '<tr class=\"sc_meta_box_row\">';\n\n\techo '<td class=\"sc_meta_box_td\" colspan=\"2\"><label for=\"sc_event_location\">' . __('Location', 'pippin_sc') . '</label></td>';\n\n\techo '<td class=\"sc_meta_box_td\" colspan=\"4\">';\n\t$location = isset($meta['sc_event_location'][0]) ? $meta['sc_event_location'][0] : '';\n\techo '<input type=\"text\" class=\"sc_text\" name=\"sc_event_location\" id=\"sc_event_location\" value=\"' . $location . '\" />';\n\techo '</td>';\n\n\techo '</tr>';\n\n}", "title": "" }, { "docid": "ea733ea2f378fc001c34533bf9e810ff", "score": "0.59454274", "text": "function gymfitness_ubicacion_shortcode(){\n\n //Funcion de Advanced Custom Fileds (get_field), recordar\n $ubicacion = get_field('ubicacion');\n\n ?>\n\n <!-- Campos ocultos para hacer dinámicas las variables en el script -->\n <div class=\"ubicacion\">\n <input type=\"hidden\" id=\"lat\" value=\"<?php echo $ubicacion['lat'] ?>\"/>\n <input type=\"hidden\" id=\"lng\" value=\"<?php echo $ubicacion['lng'] ?>\"/>\n <input type=\"hidden\" id=\"direccion\" value=\"<?php echo $ubicacion['address'] ?>\"/>\n </div>\n <!-- Div donde mostramos el mapa -->\n <div id=\"mapa\"></div>\n\n <?php\n /*echo \"<pre>\";\n var_dump($ubicacion);\n echo \"</pre>\";*/\n}", "title": "" }, { "docid": "339657a44f5b7686b1484c49c261c91f", "score": "0.5930097", "text": "public function meta_box_organisation_map() {\n\t\tglobal $post;\n\t\t$location_address = 'Peterborough';\n\t\t$location_lat = '52.5833';\n\t\t$location_lng = '0.2500';\n\t\t$location_zoom = '13';\n\t\t\n\t\t\t\n\t\t$meta_deets = get_post_custom($post->ID);\n\t\t?>\n\t\t<div class=\"form-group\">\n <?php \n $location_opts = get_post_meta($post->ID, 'location_event', true);\n if($location_opts) {\n\t $location_address = esc_attr($location_opts['address']);\n\t $location_lat = esc_attr($location_opts['lat']);\n\t $location_lng = esc_attr($location_opts['lng']);\n\t $location_zoom = esc_attr($location_opts['zoom']);\n }\n // print_r($location_opts);\n ?>\n </div>\n <div style=\"height:300px;\" id=\"map-canvas_event\"></div>\n <div id=\"panel\">\n\t <label>organisation Location</label>\n <input id=\"address\" type=\"text\" name=\"organisation_location[address]\" value=\"<?php echo $location_address;?>\" class=\"form-control\" onkeyup=\"codeAddress();\">\n \n <?php // Add Latitude and Longitide Form Fields. These will be saved to the $location array. ?>\n <input id=\"address_lat\" type=\"hidden\" name=\"organisation_location[lat]\" value=\"<?php echo $location_lat; ?>\">\n <input id=\"address_lng\" type=\"hidden\" name=\"organisation_location[lng]\" value=\"<?php echo $location_lng; ?>\">\n <input id=\"address_zoom\" type=\"hidden\" name=\"organisation_location[zoom]\" value=\"<?php echo $location_zoom; ?>\">\n <!-- <input type=\"button\" value=\"Geocode\" onclick=\"codeAddress()\" class=\"button-primary\">-->\n </div>\n <input type=\"submit\" name=\"submit\" id=\"submit\" class=\"button button-primary save-button\" value=\"Save Changes\" />\n \n \n \n <script src=\"https://maps.googleapis.com/maps/api/js?key=AIzaSyCJAIpWnvPjgzs40B2MoZc5dTDYtQi9cuM&callback\"></script>\n<script>\nvar geocoder;\nvar map;\nfunction initialize() {\n geocoder = new google.maps.Geocoder();\n var latlng = new google.maps.LatLng(<?php echo $location_lat.', '. $location_lng; ?>);\n var mapOptions = {\n zoom: <?php echo $location_zoom; ?>,\n center: latlng,\n styles: [{\"featureType\":\"landscape\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"transit\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"poi\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"water\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"road\",\"elementType\":\"labels.icon\",\"stylers\":[{\"visibility\":\"off\"}]},{\"stylers\":[{\"hue\":\"#00aaff\"},{\"saturation\":-100},{\"gamma\":2.15},{\"lightness\":12}]},{\"featureType\":\"road\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"visibility\":\"on\"},{\"lightness\":24}]},{\"featureType\":\"road\",\"elementType\":\"geometry\",\"stylers\":[{\"lightness\":57}]}]\n }\n map = new google.maps.Map(document.getElementById('map-canvas_event'), mapOptions);\n \n <?php if($location_lng){ ?>\n \t\tvar image = '<?php bloginfo( 'stylesheet_directory' ); ?>/images/map-marker.png';\n \t\t<?php\n echo 'var marker = new google.maps.Marker({\n map: map,\n position: latlng,\n icon: image\n });'; \n }?>\n \n google.maps.event.addListener(map, 'zoom_changed', function(){\n \n document.getElementById(\"address_zoom\").value = map.getZoom();\n \n});\n\n}\n\nfunction codeAddress() {\n var address = document.getElementById('address').value;\n geocoder.geocode( { 'address': address}, function(results, status) {\n if (status == google.maps.GeocoderStatus.OK) {\n map.setCenter(results[0].geometry.location);\n \n <?php // Get the value of Lat and Lng for the form fields. ?> \n document.getElementById(\"address_zoom\").value = map.getZoom();\n document.getElementById(\"address_lat\").value = results[0].geometry.location.lat();\n document.getElementById(\"address_lng\").value = results[0].geometry.location.lng();\n \n var image = '<?php bloginfo( 'stylesheet_directory' ); ?>/images/map-marker.png';\n var marker = new google.maps.Marker({\n map: map,\n icon: image,\n position: results[0].geometry.location\n \n });\n } else {\n console.log('Geocode was not successful for the following reason: ' + status);\n }\n });\n}\n\n\ngoogle.maps.event.addDomListener(window, 'load', initialize);\n</script>\n<?php\n\t}", "title": "" }, { "docid": "2f7a41a123b20152d933d348c8179df9", "score": "0.5889799", "text": "protected function getUserFieldMarkers() {}", "title": "" }, { "docid": "74ae12d0d8a1c940cf73b876a47a9c9e", "score": "0.58544344", "text": "public function html()\r\n\t{\r\n\t\t$nonce = wp_create_nonce('wpgmza');\r\n\t\t\r\n\t\t?>\r\n\t\t\r\n\t\t<form id=\"wpgmza-custom-fields\" \r\n\t\t\taction=\"<?php echo admin_url('admin-post.php'); ?>\" \r\n\t\t\tmethod=\"POST\">\r\n\t\t\t\r\n\t\t\t<input name=\"action\" value=\"wpgmza_save_custom_fields\" type=\"hidden\"/>\r\n\t\t\t<input name=\"security\" value=\"<?php echo $nonce; ?>\" type=\"hidden\"/>\r\n\t\t\t\r\n\t\t\t<h1>\r\n\t\t\t\t<?php\r\n\t\t\t\t_e('WP Google Maps - Custom Fields', 'wp-google-maps');\r\n\t\t\t\t?>\r\n\t\t\t</h1>\r\n\t\t\t\r\n\t\t\t<table class=\"wp-list-table widefat fixed striped pages\">\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th scope=\"col\" id=\"id\" class =\"manage-column column-id\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t_e('ID', 'wp-google-maps');\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<th scope=\"col\" id=\"id\" class =\"manage-column column-id\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t_e('Name', 'wp-google-maps');\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t_e('Icon', 'wp-google-maps');\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t_e('Attributes', 'wp-google-maps');\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t_e('Filter Type', 'wp-google-maps');\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t_e('Actions', 'wp-google-maps');\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</thead>\r\n\t\t\t\t<tbody>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t$this->tableBodyHTML();\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<tr id=\"wpgmza-new-custom-field\">\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input \r\n\t\t\t\t\t\t\t\tname=\"ids[]\"\r\n\t\t\t\t\t\t\t\tvalue=\"-1\"\r\n\t\t\t\t\t\t\t\treadonly\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\trequired\r\n\t\t\t\t\t\t\t\tname=\"names[]\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input name=\"icons[]\" class=\"wpgmza-fontawesome-iconpicker\"/>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input name=\"attributes[]\" type=\"hidden\"/>\r\n\t\t\t\t\t\t\t<table class=\"attributes\">\r\n\t\t\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"<?php _e('Name', 'wp-google-maps'); ?>\"\r\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"attribute-name\"\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</td>\r\n\t\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t\t<input \r\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"<?php _e('Value', 'wp-google-maps'); ?>\"\r\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"attribute-value\"\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</td>\r\n\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<select name=\"widget_types[]\">\r\n\t\t\t\t\t\t\t\t<option value=\"none\">\r\n\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t_e('None', 'wp-google-maps');\r\n\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t<option value=\"text\">\r\n\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t_e('Text', 'wp-google-maps');\r\n\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t<option value=\"dropdown\">\r\n\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t_e('Dropdown', 'wp-google-maps');\r\n\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t<option value=\"checkboxes\">\r\n\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t_e('Checkboxes', 'wp-google-maps');\r\n\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t// Use this filter to add options to the dropdown\r\n\t\t\t\t\t\t\t\techo apply_filters('wpgmza_custom_fields_widget_type_options', '');\r\n\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<button type=\"submit\" class=\"button button-primary wpgmza-add-custom-field\">\r\n\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t_e('Add', 'wp-google-maps');\r\n\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</tbody>\r\n\t\t\t</table>\r\n\t\t\t\r\n\t\t\t<p style=\"text-align: center;\">\r\n\t\t\t\t<input \r\n\t\t\t\t\ttype=\"submit\" \r\n\t\t\t\t\tclass=\"button button-primary\" \r\n\t\t\t\t\tvalue=\"<?php _e('Save', 'wp-google-maps'); ?>\"\r\n\t\t\t\t\t/>\r\n\t\t\t</p>\r\n\t\t</form>\r\n\t\t\r\n\t\t<?php\r\n\t}", "title": "" }, { "docid": "ba07e6a825341b52613d024529286122", "score": "0.576983", "text": "function wpcf_fields_google_map_insert_form() {\n $form['additional'] = array(\n '#type' => 'textfield',\n '#description' => 'Add some comment',\n '#name' => 'comment',\n );\n return $form;\n}", "title": "" }, { "docid": "7bc09a4a0940e31d069cb2315659c0d2", "score": "0.572269", "text": "function wpcp_display_custom_field_locations()\n{\n global $post;\n\n $data = array(WPCP_PROVIDER => get_post_meta($post->ID, WPCP_PROVIDER, true));\n\n if ($data[WPCP_PROVIDER] != '') {\n\n global $wpdb;\n\n $localProvider = $data[WPCP_PROVIDER];\n\n $result = $wpdb->get_row(\"SELECT * FROM {$wpdb->prefix}cyberpanel_providers WHERE name = '$localProvider'\");\n\n CommonUtils::writeLogs($data[WPCP_PROVIDER],CPWP_ERROR_LOGS);\n CommonUtils::writeLogs($result->provider,CPWP_ERROR_LOGS);\n\n if ($result->provider != 'Shared') {\n $cpjm = new CPJobManager('fetchLocations', $data);\n $locations = $cpjm->RunJob();\n printf('\n<div class=\"WPCPLocationDIV\">\n<label for=\"wpcp_location\">Select Location</label>\n<select id=\"wpcp_location\" name=\"wpcp_location\">\n %s\n</select>\n</div>\n', $locations);\n } else {\n printf('\n<div class=\"WPCPLocationDIV\">\n<label for=\"wpcp_location\">Enter Domain</label>\n<input id=\"wpcp_location\" name=\"wpcp_location\">\n</div>\n');\n }\n }\n\n}", "title": "" }, { "docid": "f30ad1354610f62ff4750367a4bd2450", "score": "0.57016027", "text": "function geowidget_maybeyourcity_form_set_city_callback($form, $form_state) {\n if ($form['city_id'] != null) {\n $city = city_load($form['city_id']['#value']);\n if ($city) {\n $_SESSION['geowidget'] = array(\n 'id' => $city->id,\n 'title' => $city->title,\n );\n $form['text_maybe_city']['#value'] = $city->title;\n $form['text_maybe_city']['#suffix'] = '';\n unset($form['maybe_you_city']);\n }\n }\n return $form;\n}", "title": "" }, { "docid": "8aa4d5f4823ea4f2a76a10709311a2e5", "score": "0.5687683", "text": "function gmw_get_search_form_custom_field( $args = array(), $gmw = array() ) {\r\n\r\n\t$defaults = array(\r\n\t\t'id'\t => 0,\r\n\t\t'default' => '',\r\n\t\t'label'\t => '',\r\n\t\t'placeholder' => '',\r\n\t\t'name' \t => '',\r\n\t\t'type'\t => 'CHAR',\r\n\t\t'compare' => '=',\r\n\t\t'date_type' => '',\r\n\t\t'double'\t => 0\r\n\t);\r\n\r\n\t$args = wp_parse_args( $args, $defaults );\r\n\t$args = apply_filters( 'gmw_search_forms_units_args', $args, $gmw );\r\n\t$url_px = gmw_get_url_prefix();\r\n\r\n\t$id = absint( $args['id'] );\r\n\t$fname \t\t = esc_attr( str_replace( ' ', '_', $args['name'] ) );\r\n\t$label \t\t = is_array( $args['label'] ) ? $args['label'] : explode( ',', $args['label'] );\r\n\t$ftype \t\t = esc_attr( $args['type'] );\r\n\t$placeholder = is_array( $args['placeholder'] ) ? $args['placeholder'] : explode( ',', $args['placeholder'] );\r\n\t\r\n\t$picker_enabled = false;\r\n\r\n\t// if date field\r\n\tif ( $ftype == \"DATE\" ) {\r\n\t\t\r\n\t\t$picker_enabled = true; \r\n\t\t$picker_class = ' gmw-date-field'; \r\n\t\t$picker_type = 'data-date_type=\"'.esc_attr( $args['date_type'] ).'\"';\r\n\t\r\n\t} else if ( $ftype == \"TIME\" ) {\r\n\t\t\r\n\t\t$picker_enabled = true;\r\n\t\t$picker_class = ' gmw-time-field'; \r\n\t\t$picker_type = '';\r\n\r\n\t} else {\r\n\r\n\t\t$datetime = '';\r\n\t\t$picker_class = '';\r\n\t\t$picker_type = '';\r\n\t}\r\n\r\n\t$label[0] = isset( $label[0] ) ? esc_attr( $label[0] ) : '';\r\n\t$placeholder[0] = isset( $placeholder[0] ) ? 'placeholder=\"'.esc_attr( $placeholder[0] ).'\"' : '';\r\n\r\n\t$output = '';\r\n\r\n\t// if compare is between we create 2 fields\r\n\tif ( $args['double'] ) {\r\n\r\n\t\t$default_1 = $default_2 = '';\r\n\r\n\t\tif ( is_array( $args['default'] ) ) {\r\n\t\t\t$default_1 = $args['default'][0];\r\n\t\t\t$default_2 = $args['default'][1];\r\n\t\t} else {\r\n\t\t\t$default_1 = $default_2 = $args['default'];\r\n\t\t}\r\n\r\n\t\t// get values\r\n\t\t$value_1 = isset( $_GET['cf'][$fname][0] ) ? $_GET['cf'][$fname][0] : $default_1;\r\n\t\t$value_2 = isset( $_GET['cf'][$fname][1] ) ? $_GET['cf'][$fname][1] : $default_2;\r\n\r\n\t\t$value_1 = esc_attr( stripslashes( $value_1 ) );\r\n\t\t$value_2 = esc_attr( stripslashes( $value_2 ) );\r\n\r\n \t\t$label[1] = isset( $label[1] ) ? esc_attr( $label[1] ) : '';\r\n\t\t$placeholder[1] = isset( $placeholder[1] ) ? 'placeholder=\"'. $placeholder[1] .'\"' : '';\r\n\r\n\t\t$output .= '<div class=\"custom-field-inner first\">';\r\n\r\n\t\t\t// generate label\r\n\t\t\tif ( $label[0] != '' ) {\r\n\t\t\t\t$output .= \"<label class='gmw-field-label' for='gmw-cf-{$fname}-{$id}'>{$label[0]}</label>\";\r\n\t\t\t}\r\n\t\t\t$output .= \"<input id='gmw-cf-{$fname}-{$id}' class='gmw-form-field gmw-custom-field {$fname}{$picker_class}' type='text' name='cf[{$fname}][]' value='{$value_1}' {$placeholder[0]} {$picker_type}/>\";\r\n\t\t$output .= '</div>';\r\n\r\n\t\t$output .= '<div class=\"custom-field-inner last\">';\r\n\r\n\t\t\tif ( $label[1] != '' ) {\r\n\t\t\t\t$output .= \"<label class='gmw-field-label' for='gmw-cf-{$fname}-second-{$id}'>{$label[1]}</label>\";\r\n\t\t\t}\r\n\t\t\t$output .= \"<input id='gmw-cf-{$fname}-second-{$id}' class='gmw-form-field gmw-custom-field {$fname}{$picker_class}' type='text' name='cf[{$fname}][]' value='{$value_2}' {$placeholder[1]} {$picker_type}/>\";\r\n\r\n\t\t$output .= '</div>';\r\n\r\n\t} else {\r\n\r\n\t\t$value = isset( $_GET['cf'][$fname] ) ? $_GET['cf'][$fname] : $args['default'];\r\n\t\t$value = esc_attr( sanitize_text_field( $value ) );\r\n\r\n\t\tif ( $label[0] != '' ) {\r\n\t\t\t$output .= \"<label class='gmw-field-label' for='gmw-cf-{$fname}-{$id}'>{$label[0]}</label>\";\r\n\t\t}\r\n\t\t$output .= \"<input id='gmw-cf-{$fname}-{$id}' class='gmw-form-field gmw-custom-field {$fname}{$picker_class}' type='text' name='cf[{$fname}]' value='{$value}' {$placeholder[0]} {$picker_type}/>\";\r\n\t}\r\n\r\n\t// enqueue date picker styles and scripts\r\n\tif ( $picker_enabled && ! wp_script_is( 'datetime-picker', 'enqueued' ) ) {\r\n\t\twp_enqueue_script( 'datetime-picker' );\r\n\t\twp_enqueue_style( 'datetime-picker' );\r\n\t}\r\n\r\n\treturn $output;\r\n}", "title": "" }, { "docid": "cb19990c3ed4739b9f085026bc892631", "score": "0.56846625", "text": "function cr_location_map_meta_box_callback( $post ) { \n\twp_enqueue_script( 'gmap3' ); ?>\n\t<div id=\"maps\" class=\"gmap3\"></div>\n\t<script type=\"text/javascript\">\n\n\t\t(function($) {\n\t\t\t$(document).ready(function(){\n\t\t\tvar x = $('select#location_region :selected').html();\n\t\t\t\t$(\"#maps\") .gmap3({\n\t\t\t\tmarker: { \n\t\t\t\taddress: $('select#location_region :selected').html() + ',' + $('input#location_town').val() +','+ $('textarea#location_address').val(),\n\t\t\t\tdata:\"Poitiers : great city !\"\n\t\t\t\t},\n\t\t\t\tmap: {\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\tzoom: 14,\n\t\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t});\n\t\t\t});\n\t\t})(jQuery);\n\t</script>\n\t\n<?php }", "title": "" }, { "docid": "1576bba972aacc8a2e6e47e5b9315675", "score": "0.56508523", "text": "function wpsl_get_location_fields( $args = array() ) {\n\n // Required to make sure it works with API calls.\n if ( !class_exists( 'WPSL_Metaboxes' ) ) {\n require_once( WPSL_PLUGIN_DIR . 'admin/class-metaboxes.php' );\n }\n\n $metaboxes = new WPSL_Metaboxes();\n $meta_fields = $metaboxes->meta_box_fields();\n\n $fields = array();\n $defaults = array(\n 'exclude' => array( 'country_iso' ),\n 'prefix' => '',\n 'set_values' => true\n );\n\n /**\n * Parse incoming $args into an array and merge it with $defaults\n */\n $args = wp_parse_args( $args, $defaults );\n\n foreach ( $meta_fields as $k => $field_section ) {\n foreach ( $field_section as $field_name => $field_value ) {\n if ( in_array( $field_name, $args['exclude'] ) ) {\n continue;\n }\n $fields[$args['prefix'] . $field_name] = ( $args['set_values'] ) ? $field_name : '';\n }\n }\n return $fields;\n}", "title": "" }, { "docid": "54ce4470796237672498f4696edc3ff2", "score": "0.5614419", "text": "public function fields_for_feed_mapping() {\n\t\t\n\t\treturn array(\n\t\t\tarray(\t\n\t\t\t\t'name' => 'email',\n\t\t\t\t'label' => esc_html__( 'Email Address', 'gravityformsicontact' ),\n\t\t\t\t'required' => true,\n\t\t\t\t'field_type' => array( 'email' ),\n\t\t\t\t'default_value' => $this->get_first_field_by_type( 'email' )\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'prefix',\n\t\t\t\t'label' => esc_html__( 'Prefix', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'first_name',\n\t\t\t\t'label' => esc_html__( 'First Name', 'gravityformsicontact' ),\n\t\t\t\t'default_value' => $this->get_first_field_by_type( 'name', 3 )\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'last_name',\n\t\t\t\t'label' => esc_html__( 'Last Name', 'gravityformsicontact' ),\n\t\t\t\t'default_value' => $this->get_first_field_by_type( 'name', 6 )\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'suffix',\n\t\t\t\t'label' => esc_html__( 'Suffix', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'street',\n\t\t\t\t'label' => esc_html__( 'Address: Street Address', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'street2',\n\t\t\t\t'label' => esc_html__( 'Address: Line 2', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'city',\n\t\t\t\t'label' => esc_html__( 'Address: City', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'state',\n\t\t\t\t'label' => esc_html__( 'Address: State', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'postal_code',\n\t\t\t\t'label' => esc_html__( 'Address: Postal Code', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'phone',\n\t\t\t\t'label' => esc_html__( 'Phone Number', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'fax',\n\t\t\t\t'label' => esc_html__( 'Fax Number', 'gravityformsicontact' ),\n\t\t\t),\n\t\t\tarray(\t\n\t\t\t\t'name' => 'business',\n\t\t\t\t'label' => esc_html__( 'Business Number', 'gravityformsicontact' ),\n\t\t\t),\n\t\t);\n\t\t\n\t}", "title": "" }, { "docid": "4f2847ff266ce855bbc5abe70e39d88b", "score": "0.5607479", "text": "public function render() {\n\n $pointfinder_center_lat = PFSAIssetControl('setup5_mapsettings_lat','','33.87212589943945');\n $pointfinder_center_lng = PFSAIssetControl('setup5_mapsettings_lng','','-118.19297790527344');\n $pointfinder_google_map_zoom = PFSAIssetControl('setup5_mapsettings_zoom','','6');\n\n $pfitemid = get_the_id();\n if (isset($pfitemid)) {\n if (PFcheck_postmeta_exist('webbupointfinder_item_featuredmarker',$pfitemid)) {\n $pfcoordinates = explode( ',', esc_attr(get_post_meta( $pfitemid, 'webbupointfinder_items_location', true )) );\n }\n }\n\n if (isset($pfcoordinates[0])) {\n if (empty($pfcoordinates[0])) {\n $pfcoordinates = '';\n }\n }\n if (!empty($pfcoordinates)) {\n if (!is_array($pfcoordinates)) {\n $pfcoordinates = array($pointfinder_center_lat,$pointfinder_center_lng,$pointfinder_google_map_zoom);\n }else{\n if (isset($pfcoordinates[2]) == false) {\n $pfcoordinates[2] = $pointfinder_google_map_zoom;\n }\n }\n }else{\n $pfcoordinates = array($pointfinder_center_lat,$pointfinder_center_lng,$pointfinder_google_map_zoom);\n }\n \n \n echo '<div id=\"pfitempagestreetviewMap\" data-pfitemid=\"' . $this->field['id'] . '\" data-pfcoordinateslat=\"'.$pfcoordinates[0].'\" data-pfcoordinateslng=\"'.$pfcoordinates[1].'\" data-pfzoom = \"'.$pfcoordinates[2].'\"></div>';\n echo '<input id=\"' . $this->field['id'] . '-heading\" name=\"' . $this->field['name'] . '[heading]' . $this->field['name_suffix'] . '\" value=\"' . $this->value['heading'] . '\" type=\"hidden\" />';\n echo '<input id=\"' . $this->field['id'] . '-pitch\" name=\"' . $this->field['name'] . '[pitch]' . $this->field['name_suffix'] . '\" value=\"' . $this->value['pitch'] . '\" type=\"hidden\" />';\n echo '<input id=\"' . $this->field['id'] . '-zoom\" name=\"' . $this->field['name'] . '[zoom]' . $this->field['name_suffix'] . '\" value=\"' . $this->value['zoom'] . '\" type=\"hidden\" />';\n\n }", "title": "" }, { "docid": "22ad734c317ee162047bfc65bbc93f7d", "score": "0.5603677", "text": "function gmw_get_search_form_custom_fields( $gmw = array() ) {\r\n\r\n\tif ( empty( $gmw['search_form']['custom_fields'] ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t$picker_enabled = false;\r\n\t$output = '';\r\n\r\n\tforeach ( $gmw['search_form']['custom_fields'] as $value ) {\r\n\r\n\t\t$fdouble = 0;\r\n\t\t$fdouble_class = '';\r\n\r\n\t\tif ( $value['compare'] == 'BETWEEN' || $value['compare'] == 'NOT BETWEEN' ) {\r\n\t\t\t$fdouble = true;\r\n\t\t\t$fdouble_class = ' double';\r\n\t\t}\r\n\r\n\t\t$args = array(\r\n\t\t\t'id'\t => $gmw['ID'], \r\n\t\t\t'name' \t => $value['name'],\r\n\t\t\t'type'\t => $value['type'],\r\n\t\t\t'date_type' => $value['date_type'],\r\n\t\t\t'compare' => $value['compare'],\r\n\t\t\t'label'\t => isset( $value['label'] ) ? $value['label'] : '',\r\n\t\t\t'placeholder' => isset( $value['placeholder'] ) ? $value['placeholder'] : '',\r\n\t\t\t'double'\t => $fdouble\r\n\t\t);\r\n\r\n\t\t$output .= '<div class=\"gmw-form-field-wrapper custom-field '.esc_attr( $value['name'] ).' '.esc_attr( $value['type'] ).$fdouble_class.'\">';\r\n\t\t$output .= gmw_get_search_form_custom_field( $args, $gmw );\r\n\t\t$output .= '</div>';\r\n\t} \r\n\r\n\treturn $output;\r\n}", "title": "" }, { "docid": "6c56dea8e41c6ee973f776ca374d6274", "score": "0.55036885", "text": "function _autofill_geo_cpfs($row)\n{\n require_code('cns_members');\n require_code('locations');\n require_code('locations_geocoding');\n\n $latitude_field = find_cms_cpf_field_id('cms_latitude');\n $longitude_field = find_cms_cpf_field_id('cms_longitude');\n\n $street_address_field = find_cms_cpf_field_id('cms_street_address');\n $city_field = find_cms_cpf_field_id('cms_city');\n $county_field = find_cms_cpf_field_id('cms_county');\n $state_field = find_cms_cpf_field_id('cms_state');\n $post_code_field = find_cms_cpf_field_id('cms_post_code');\n $country_field = find_cms_cpf_field_id('cms_country');\n\n $has_street_address = (!is_null($street_address_field)) && (!empty($row['field_' . strval($street_address_field)]));\n $has_city = (!is_null($city_field)) && (!empty($row['field_' . strval($city_field)]));\n $has_county = (!is_null($county_field)) && (!empty($row['field_' . strval($county_field)]));\n $has_state = (!is_null($state_field)) && (!empty($row['field_' . strval($state_field)]));\n $has_post_code = (!is_null($post_code_field)) && (!empty($row['field_' . strval($post_code_field)]));\n $has_country = (!is_null($country_field)) && (!empty($row['field_' . strval($country_field)]));\n $has_latitude = (!is_null($latitude_field)) && (!empty($row['field_' . strval($latitude_field)]));\n $has_longitude = (!is_null($longitude_field)) && (!empty($row['field_' . strval($longitude_field)]));\n\n $has_address = $has_city && $has_country;\n $has_gps = $has_latitude && $has_longitude;\n $has_ip = !empty($row['m_ip_address']);\n\n $changes = array();\n\n // GPS from address\n if ((!$has_latitude || !$has_longitude) && (isset($latitude_field)) && (isset($longitude_field))) {\n if ($has_address) {\n $address_components = array();\n if ($has_street_address) {\n $address_components[] = $row['field_' . strval($street_address_field)];\n }\n if ($has_city) {\n $address_components[] = $row['field_' . strval($city_field)];\n }\n if ($has_county) {\n $address_components[] = $row['field_' . strval($county_field)];\n }\n if ($has_state) {\n $address_components[] = $row['field_' . strval($state_field)];\n }\n if ($has_post_code) {\n $address_components[] = $row['field_' . strval($post_code_field)];\n }\n if ($has_country) {\n $address_components[] = $row['field_' . strval($country_field)];\n }\n\n $gps_parts = geocode(implode(', ', $address_components));\n if (!is_null($gps_parts)) {\n list($latitude, $longitude) = $gps_parts;\n if (!$has_latitude) {\n $changes['field_' . strval($latitude_field)] = $latitude;\n }\n if (!$has_longitude) {\n $changes['field_' . strval($longitude_field)] = $longitude;\n }\n }\n }\n }\n\n // Address from GPS (or IP)\n if (!$has_city || !$has_county || !$has_state || !$has_country) {\n if ($has_gps) {\n $latitude = $row['field_' . strval($latitude_field)];\n $longitude = $row['field_' . strval($longitude_field)];\n\n $address_parts = reverse_geocode($latitude, $longitude);\n if (!is_null($address_parts)) {\n list(, , $city, $county, $state, , $country) = $address_parts;\n if (!$has_city && !empty($city) && (!empty($row['field_' . strval($city_field)]))) {\n $changes['field_' . strval($city_field)] = $city;\n }\n if (!$has_county && !empty($county) && (!empty($row['field_' . strval($county_field)]))) {\n $changes['field_' . strval($county_field)] = $county;\n }\n if (!$has_state && !empty($state) && (!empty($row['field_' . strval($state_field)]))) {\n $changes['field_' . strval($state_field)] = $state;\n }\n if (!$has_country && !empty($country) && (!empty($row['field_' . strval($country_field)]))) {\n $changes['field_' . strval($country_field)] = $country;\n }\n // We cannot reliably geocode street addresses, so we don't go deeper than cities. We geocode *from* this to get GPS, but not vice-versa.\n }\n } elseif ($has_ip && !$has_country) {\n $country = geolocate_ip($row['m_ip_address']);\n if (!empty($country)) {\n $changes['field_' . strval($country_field)] = $country;\n }\n }\n }\n\n // Save\n if (!empty($changes)) {\n $GLOBALS['FORUM_DB']->query_update('f_member_custom_fields', $changes, array('mf_member_id' => $row['mf_member_id']), '', 1);\n }\n}", "title": "" }, { "docid": "8399cc1d3f1c577a4edbbb4209ce411c", "score": "0.5472465", "text": "function rsmaps_render_form() {\n ?>\n <div class=\"wrap\">\n\n <!-- Beginning of the Responsive Styled Gooogle Maps helper form -->\n <form method=\"post\" action=\"\">\n\n <script type=\"text/javascript\">\n // At page load, initialize the color picker and also update the mnap preview.\n var pluginurl = \"<?php echo plugins_url(); ?>\";\n jQuery(document).ready(function($) {\n initColorPicker();\n updateMap(pluginurl);\n });\n \n </script>\n \n <!-- Table Structure Containing shorcode parameters -->\n <table border=\"0\" style=\"table-layout: fixed;\" cellpadding=\"5\">\n <!-- Logo and plugin title -->\n <tr>\n <td scope=\"row\">\n <a href=\"http://codecanyon.net/user/greenline\" target=\"_blank\">\n <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/img/logo.png\" id=\"logo\" width=\"40\" height=\"40\">\n </a>\n </td>\n <td width=\"300px\" valign=\"top\">\n <h2>Responsive Styled Google Maps - Helper</h2>\n </td>\n </tr>\n \n <!-- Address, the map and the shortcode -->\n <tr>\n <td scope=\"row\" width=\"170px\" align=\"left\" valign=\"top\">Address or addresses</td>\n <td width=\"300px\" valign=\"top\">\n <textarea name=\"address\" id=\"address\" rows=\"3\" cols=\"90\" type='textarea' onblur=\"updateMap(pluginurl)\">Yeronga QLD 4104, Australia</textarea><br>\n <span class=\"info\">For multiple markers use: address1 | address2 | address3 OR lat1, long1 | lat2, long2 | lat3, long3</span>\n </td>\n <td rowspan=\"15\" valign=\"top\" valign=\"top\" width=\"500px\">\n <div id=\"responsive_map\" class=\"responsive-map\" style=\"height:500px;width:500px;\"></div>\n <span class=\"info\">Note: In this preview, width and height remain unchanged.</span>\n <br><br><div class=\"preheader\">COPY IN YOUR POST / PAGE /WIDGET THE SHORTCODE GENERATED :</div>\n <pre id=\"shortcode\" onClick=\"selectText('shortcode')\"></pre>\n <!-- Update map button -->\n <a href=\"javascript: updateMap(pluginurl);\" class=\"glbutton\">UPDATE MAP</a>\n </td>\n </tr>\n\n <!-- Marker Description -->\n <tr>\n <td scope=\"row\" align=\"left\" valign=\"top\">Marker(s) description(s)</td>\n <td valign=\"top\">\n <textarea name=\"pdescription\" id=\"pdescription\" rows=\"3\" cols=\"90\" type='textarea' onblur=\"updateMap(pluginurl)\"><img src=\"http://yava.ro/images/company.png\"> {br} Yeronga QLD 4104, Australia {br} Phone: 0040 752 235 756</textarea><br>\n <span class=\"info\">For multiple markers use: description1 | description2 | description3 and {br} for a new line</span><br>\n </td>\n </tr>\n\n <!-- Directions text -->\n <tr>\n <td scope=\"row\" align=\"left\" valign=\"top\">Directions text</td>\n <td>\n <input type=\"text\" size=\"93\" name=\"directions\" id=\"directions\" value=\"(directions to our address)\" onblur=\"updateMap(pluginurl)\" />\n <span class=\"info\">No HTML code, just text.</span><br>\n </td>\n\n </tr>\n\n <!-- Marker icon color -->\n <tr>\n <td scope=\"row\" align=\"left\" valign=\"top\">Marker(s) icon</td>\n <td valign=\"bottom\">\n <label><input name=\"color\" id=\"color\" type=\"radio\" value=\"black\" onclick=\"updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/black.png\"> </label>\n <label><input name=\"color\" id=\"color\" type=\"radio\" value=\"blue\" onclick=\"updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/blue.png\"> </label>\n <label><input name=\"color\" id=\"color\" type=\"radio\" value=\"gray\" onclick=\"updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/gray.png\"> </label>\n <label><input name=\"color\" id=\"color\" type=\"radio\" value=\"green\" onclick=\"updateMap(pluginurl)\" checked/> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/green.png\"> </label>\n <label><input name=\"color\" id=\"color\" type=\"radio\" value=\"magenta\" onclick=\"updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/magenta.png\"> </label>\n <label><input name=\"color\" id=\"color\" type=\"radio\" value=\"orange\" onclick=\"updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/orange.png\"> </label>\n <label><input name=\"color\" id=\"color\" type=\"radio\" value=\"purple\" onclick=\"updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/purple.png\"> </label>\n <label><input name=\"color\" id=\"color\" type=\"radio\" value=\"red\" onclick=\"updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/red.png\"> </label>\n <label><input name=\"color\" id=\"color\" type=\"radio\" value=\"white\" onclick=\"updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/white.png\"> </label>\n <label><input name=\"color\" id=\"color\" type=\"radio\" value=\"yellow\" onclick=\"updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/yellow.png\"> </label>\n </td>\n </tr>\n <!-- Marker icon url -->\n <tr>\n <tr>\n <td scope=\"row\" align=\"left\" valign=\"top\">Or custom icon(s)</td>\n <td>\n <textarea name=\"iconurl\" id=\"iconurl\" rows=\"3\" cols=\"90\" type='textarea' onblur=\"updateMap(pluginurl)\">http://yava.ro/icons/car.png</textarea><br>\n <span class=\"info\">For multiple icons, separate the links with | (pipe) symbol like this: <br>http://yava.ro/icons/car.png | http://yava.ro/icons/sailboat.png</span>\n </td>\n </tr>\n </tr>\n\n <!-- Map color -->\n <tr>\n <td scope=\"row\" align=\"left\" valign=\"middle\">Map color</td>\n <td valign=\"top\">\n <label><input name=\"colorType\" id=\"colorType\" type=\"radio\" value=\"bw\" onclick=\"updateMap(pluginurl)\" checked /> black & white </label>\n <label><input name=\"colorType\" id=\"colorType\" type=\"radio\" value=\"classic\" onclick=\"updateMap(pluginurl)\" /> classic </label> \n <label><input name=\"colorType\" id=\"colorType\" type=\"radio\" value=\"colored\" style=\"background-color: #efe725 !important;\" onclick=\"updateMap(pluginurl)\" /> colored </label>\n <input id=\"mapColor\" name=\"mapColor\" type=\"text\" size=\"23\" value=\"#efe725\" onblur=\"updateMap(pluginurl);\" onClick=\"javascript: jQuery('input:radio[id=colorType]')[2].checked = true;updateMap(pluginurl);\" />\n <div id=\"color-picker\" rel=\"mapColor\"></div>\n </td>\n </tr>\n\n <!-- Controls -->\n <tr>\n <td scope=\"row\" align=\"left\">Controls</td>\n <td>\n Pan control \n <select name='panControl' id='panControl' onchange=\"updateMap(pluginurl)\">>\n <option value='' selected>no</option>\n <option value='true'>yes</option>\n </select>\n Scale control\n <select name='scaleControl' id='scaleControl' onchange=\"updateMap(pluginurl)\">>\n <option value='' selected>no</option>\n <option value='true'>yes</option>\n </select>\n Type control\n <select name='typeControl' id='typeControl' onchange=\"updateMap(pluginurl)\">>\n <option value='' selected>no</option>\n <option value='true'>yes</option>\n </select>\n Street control\n <select name='streetControl' id='streetControl' onchange=\"updateMap(pluginurl)\">>\n <option value='' selected>no</option>\n <option value='true'>yes</option>\n </select>\n </td>\n </tr>\n\n <!-- Zoom -->\n <tr>\n <td scope=\"row\" align=\"left\">Zoom</td>\n <td>\n Zoom level &nbsp;\n <select name=\"zoom\" id=\"zoom\" onchange=\"updateMap(pluginurl)\">\n <option value='1'>1</option>\n <option value='2'>2</option>\n <option value='3'>3</option>\n <option value='4'>4</option>\n <option value='5'>5</option>\n <option value='6'>6</option>\n <option value='7'>7</option>\n <option value='8'>8</option>\n <option value='9'>9</option>\n <option value='10'>10</option>\n <option value='11'>11</option>\n <option value='12'>12</option>\n <option value='13'>13</option>\n <option value='14' selected>14</option>\n <option value='15'>15</option>\n <option value='16'>16</option>\n <option value='17'>17</option>\n <option value='18'>18</option>\n <option value='19'>19</option>\n </select>\n Zoom control\n <select name='zoomControl' id='zoomControl' onchange=\"updateMap(pluginurl)\">>\n <option value='' selected>no</option>\n <option value='true'>yes</option>\n </select>\n Draggable\n <select name='draggable' id='draggable' onchange=\"updateMap(pluginurl)\">>\n <option value=''>no</option>\n <option value='true' selected>yes</option>\n </select>\n Scrollwheel\n <select name='scrollwheel' id='scrollwheel' onchange=\"updateMap(pluginurl)\">>\n <option value='' selected>no</option>\n <option value='true'>yes</option>\n </select>\n </td>\n </tr>\n\n <!-- Width -->\n <tr>\n <td scope=\"row\" align=\"left\">Map width</td>\n <td>\n <input type=\"text\" size=\"6\" name=\"width\" id=\"width\" value=\"100\" onblur=\"updateMap(pluginurl)\"/>\n <select name='widthm' id='widthm' onchange=\"updateMap(pluginurl)\">\n <option value='%' selected>%</option>\n <option value='px'>px</option>\n </select>\n <span class=\"info\">Set to 100% to make the map responsive.</span>\n </td>\n </tr>\n\n <!-- Height -->\n <tr>\n <td scope=\"row\" align=\"left\">Map height</td>\n <td>\n <input type=\"text\" size=\"6\" name=\"height\" id=\"height\" value=\"500\" onblur=\"updateMap(pluginurl)\"/>\n <select name='heightm' id='heightm' onchange=\"updateMap(pluginurl)\">\n <option value='%'>%</option>\n <option value='px' selected>px</option>\n </select>\n <span class=\"info\">(in px or %) It's best to give width in % and height in px.</span>\n </td>\n </tr>\n\n <!-- Map Type -->\n <tr>\n <td scope=\"row\" align=\"left\">Map type</td>\n <td>\n <select name='type' id=\"type\" style=\"width:113px;\" onchange=\"updateMap(pluginurl)\">\n <option value='roadmap' selected>roadmap</option>\n <option value='satellite'>satellite</option>\n <option value='terrain'>terrain</option>\n <option value='hybrid'>hybrid</option>\n </select>\n <span class=\"info\">Possible values: roadmap, satellite, terrain or hybrid</span>\n </td>\n </tr>\n\n <!-- Popup -->\n <tr>\n <td scope=\"row\" align=\"left\">Popup window</td>\n <td>\n <select name='popup' id=\"popup\" style=\"width:113px;\" onchange=\"updateMap(pluginurl)\">\n <option value=''>hidden</option>\n <option value='true' selected>visible</option>\n </select>\n <span class=\"info\">The popup window which appears when a marker is clicked.</span>\n </td>\n </tr>\n\n <!-- Map center -->\n <tr>\n <td scope=\"row\" width=\"200px\" align=\"left\">Center map to</td>\n <td width=\"300px\">\n <input type=\"text\" size=\"40\" name=\"center\" id=\"center\" value=\"\" onblur=\"updateMap(pluginurl);\"/>\n <span class=\"info\">latitude, longitude i.e. 38.980288, 22.145996 </span>\n </td>\n </tr>\n \n <!-- Map refresh (when window is scaled) -->\n <tr>\n <td scope=\"row\" width=\"200px\" align=\"left\">Refresh map</td>\n <td width=\"300px\">\n <select name='refresh' id='refresh' onchange=\"updateMap(pluginurl)\">>\n <option value='' selected>no</option>\n <option value='true'>yes</option>\n </select>\n <span class=\"info\"> select \"yes\" if the map should be refreshed (re-centered) when the window is scaled </span>\n </td>\n </tr>\n \n \n\n </table>\n </form>\n </div>\n\n <style type=\"text/css\">\n pre {\n white-space: pre-wrap; /* css-3 */\n white-space: -moz-pre-wrap; /* Mozilla, since 1999 */\n white-space: -pre-wrap; /* Opera 4-6 */\n white-space: -o-pre-wrap; /* Opera 7 */\n word-wrap: break-word; /* Internet Explorer 5.5+ */\n background-color: #2F343A;\n color: #eeeeee;\n margin-top: 1px;\n margin-bottom: 1px;\n padding: 10px;\n cursor: text;\n }\n .preheader {\n background-color: #2BB4A0;\n color: #ffffff;\n padding: 10px;\n font-family: arial;\n font-weight: bold;\n border-bottom: 1px solid #CCCCCC;\n }\n select#style {\n background-color: #eeeeee;\n border: 1px solid #DD7127;\n font-weight: bold;\n }\n .info {\n font-style: italic;\n color: #555555;\n font-size: 11px;\n }\n img#logo {\n padding: 1px;\n }\n /* Button */\n .glbutton:link {\n -moz-box-shadow: inset 0px 1px 0px 0px #ffffff;\n -webkit-box-shadow: inset 0px 1px 0px 0px #ffffff;\n box-shadow: inset 0px 1px 0px 0px #ffffff;\n background-color: #2bb49f;\n -moz-border-radius: 6px;\n -webkit-border-radius: 6px;\n border-radius: 6px;\n border: 1px solid #dcdcdc;\n display: inline-block;\n color: #ffffff;\n font-family: arial;\n font-size: 16px;\n font-weight: bold;\n padding: 6px 10px 4px 10px;\n margin: 10px 6px 7px 0;\n text-decoration: none;\n }\n .glbutton:hover {\n background-color: #77b0a8;\n color: #ffffff !important;\n }\n .glbutton:active, .glbutton:visited {\n position:relative;\n top:1px;\n color: #ffffff !important;\n }\n /* Marker settings */\n .gm-style-iw {\n overflow-y: hidden !important;\n overflow-x: hidden !important;\n }\n .gm-style a:link, \n .gm-style a:visited, \n .gm-style a:hover, \n .gm-style a:active {\n text-decoration: underline !important;\n color: #000000 !important;\n }\n .gm-style img {\n border: 0;\n max-width: none !important;\n -webkit-box-shadow: none !important;\n -moz-box-shadow: none !important;\n box-shadow: none !important;\n }\n </style>\n<?php\n}", "title": "" }, { "docid": "e89754708a4c3edd2fdc8a4c74504c83", "score": "0.54212147", "text": "public static function POST()\r\n\t{\r\n\t\tglobal $wpdb;\r\n\t\tglobal $WPGMZA_TABLE_NAME_CUSTOM_FIELDS;\r\n\t\t\r\n\t\tcheck_ajax_referer('wpgmza', 'security');\r\n\t\t\r\n\t\tif(!current_user_can('administrator'))\r\n\t\t{\r\n\t\t\thttp_response_code(401);\r\n\t\t\texit;\r\n\t\t}\r\n\t\t\r\n\t\t$numFields = count($_POST['ids']);\r\n\t\t\r\n\t\t// Remove fields which aren't in POST from the DB\r\n\t\t$qstr = \"DELETE FROM $WPGMZA_TABLE_NAME_CUSTOM_FIELDS\";\r\n\t\tif($numFields > 0)\r\n\t\t\t$qstr .= \" WHERE id NOT IN (\" . implode(',', array_map('intval', $_POST['ids'])) . \")\";\r\n\t\t$wpdb->query($qstr);\r\n\t\t\r\n\t\t// Iterate over fields in POST\r\n\t\tfor($i = 0; $i < $numFields; $i++)\r\n\t\t{\r\n\t\t\t$id \t\t\t= $_POST['ids'][$i];\r\n\t\t\t$name \t\t\t= $_POST['names'][$i];\r\n\t\t\t$icon\t\t\t= $_POST['icons'][$i];\r\n\t\t\t$attributes\t\t= stripslashes($_POST['attributes'][$i]);\r\n\t\t\t$widget_type\t= $_POST['widget_types'][$i];\r\n\t\t\t\r\n\t\t\tif(!json_decode($attributes))\r\n\t\t\t\tthrow new \\Exception('Invalid attribute JSON');\r\n\t\t\t\r\n\t\t\tif($id == -1 || empty($id))\r\n\t\t\t{\r\n\t\t\t\t$qstr = \"INSERT INTO $WPGMZA_TABLE_NAME_CUSTOM_FIELDS (name, icon, attributes, widget_type) VALUES (%s, %s, %s, %s)\";\r\n\t\t\t\t$params = array($name, $icon, $attributes, $widget_type);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$qstr = \"UPDATE $WPGMZA_TABLE_NAME_CUSTOM_FIELDS SET name=%s, icon=%s, attributes=%s, widget_type=%s WHERE id=%s\";\r\n\t\t\t\t$params = array($name, $icon, $attributes, $widget_type, $id);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$stmt = $wpdb->prepare($qstr, $params);\r\n\t\t\t$wpdb->query($stmt);\r\n\t\t}\r\n\t\t\r\n\t\twp_redirect( admin_url('admin.php') . '?page=wp-google-maps-menu-custom-fields' );\r\n\t\texit;\r\n\t}", "title": "" }, { "docid": "4fac9f0888fea5c830480ad652191aaa", "score": "0.54121184", "text": "function get_location_content() {\n\n\n\t/*\n\t* Visible list of locations.\n\t*/\n\t$selector_panel_tabs = '';\n\t$selector_panel_info = '';\n\n\n\t// Get all the pins for the map\n\t$pins = array();\n\t$i = 0;\n\t$show_first = true; // set to false to hide all details by default. true to show the first one.\n\twhile ( have_rows( 'pin_locations' ) ) {\n\t\tthe_row();\n\n\t\t$pin_info = array();\n\t\t$pin_info[ 'name' ] = get_sub_field( 'name' );\n\t\t$pin_info[ 'description' ] = get_sub_field( 'description' );\n\t\t$pin_info[ 'description_pin' ] = apply_filters('the_content', get_sub_field( 'description' )); // apply_filters lets us render the shortcodes (athena) and use them in pins\n\t\t$pin_info[ 'hours_of_operation' ] = get_sub_field( 'hours_of_operation' );\n\t\t$pin_info[ 'address' ] = get_sub_field( 'address' );\n\t\t$pin_info[ 'address_pin' ] = apply_filters('the_content',get_sub_field( 'address' ));\n\t\t$pin_info[ 'url' ] = get_sub_field( 'url' );\n\t\t//$pin_info[''] = get_sub_field('');\n\n\n\t\twhile (have_rows('phone_numbers')){\n\t\t\tthe_row();\n\t\t\t//$type = get_sub_field('type');\n\t\t\t$number = get_sub_field('number');\n\t\t\t//$pin_info['phone_numbers'][$type] = $number;\n\t\t\t$pin_info['phone_numbers'][] = $number;\n\t\t}\n\n\t\t// coordinates are in a group, which also needs to be looped even though it isn't a repeater\n\t\twhile (have_rows('coordinates')){\n\t\t\tthe_row();\n\t\t\t$pin_info['latitude'] = get_sub_field('latitude');\n\t\t\t$pin_info['longitude'] = get_sub_field('longitude');\n\n\t\t}\n\n\n\t\t$pin_info[ 'slug' ] = 'ucfh-' . md5(json_encode($pin_info));\n\t\t// use md5 to create a unique id that only changes when the pin data changes - for caching and unique id in html\n\t\t// note: ids MUST start with a letter, so prefix the md5 to prevent erros\n\n\t\t$pins[$pin_info[ 'slug' ]] = $pin_info;\n\n\t\t// 4. Create an always-visible list entry (outside of the google map interface)\n\n\t\tif ($i === 0 && $show_first){\n\t\t\t$show_current = true;\n\t\t} else {\n\t\t\t$show_current = false;\n\t\t}\n\n\t\t$selector_panel_tabs .= selector_panel_list_tab( $pin_info, $show_current );\n\t\t$selector_panel_info .= selector_panel_list_info( $pin_info, $show_current );\n\n\t\t$i++;\n\t}\n\n\t$unique_id_all_data = 'ucfh-' . md5(json_encode($pins));\n\t// generate another unique id for the parent object. this way, a page with multiple blocks won't interfere with one another.\n\t// note: ids MUST start with a letter, so prefix the md5 to prevent erros\n\n\tif ( get_field('panel_visible')) {\n\t\t$selector_panel = \"\n\t\t\t<div class='info selector-panel locations' >\n\t\t\t\t<div class='nab-tab-area' >\n\t\t\t\t\t<ul class='nav nav-tabs' id='{$unique_id_all_data}-tabs' role='tablist' >\n\t\t\t\t\t\t{$selector_panel_tabs}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<div class='tab-content' id='{$unique_id_all_data}-content' >\n\t\t\t\t\t{$selector_panel_info}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\";\n\n\t} else {\n\t\t$selector_panel = '';\n\t}\n\n\twp_localize_script(script_register, 'pin_data', $pins);\n\n\tif ( get_field('map_visible') ) {\n\t\t$map = \"<section class='ucf-health-locationsmap-container' ><div class='ucf-health-locationsmap' ></div></section>\";\n\t} else {\n\t\t$map = '';\n\t}\n\n\treturn \"<div class='locations-output' id='{$unique_id_all_data}' >{$selector_panel}{$map}</div>\";\n}", "title": "" }, { "docid": "199522a5997ccca41e2e83c884cdf7f9", "score": "0.540821", "text": "public function autocomplete() {\r\n\t\t\tadd_filter( 'vc_autocomplete_casano_products_ids_callback', array(\r\n\t\t\t\t$this,\r\n\t\t\t\t'productIdAutocompleteSuggester'\r\n\t\t\t), 10, 1 );\r\n\t\t\tadd_filter( 'vc_autocomplete_casano_products_ids_render', array(\r\n\t\t\t\t$this,\r\n\t\t\t\t'productIdAutocompleteRender'\r\n\t\t\t), 10, 1 );\r\n\t\t\tadd_filter( 'vc_autocomplete_casano_pinmap_ids_callback', array(\r\n\t\t\t\t$this,\r\n\t\t\t\t'pinmapIdAutocompleteSuggester'\r\n\t\t\t), 10, 1 );\r\n\t\t\tadd_filter( 'vc_autocomplete_casano_pinmap_ids_render', array(\r\n\t\t\t\t$this,\r\n\t\t\t\t'pinmapIdAutocompleteRender'\r\n\t\t\t), 10, 1 );\r\n\r\n\t\t}", "title": "" }, { "docid": "072be485779354002aef9a8e8f237462", "score": "0.540208", "text": "function draw_user_auto_complete_field($args = '') {\r\n global $wpi_settings, $wpdb, $wp_scripts;\r\n wp_enqueue_script('jquery-ui-autocomplete');\r\n\r\n //** Extract passed args and load defaults */\r\n extract(wp_parse_args($args, array(\r\n 'input_name' => 'wpi[new_invoice][user_email]',\r\n 'input_class' => 'input_field',\r\n 'input_id' => 'wp_invoice_userlookup',\r\n 'input_style' => ''\r\n )), EXTR_SKIP);\r\n ?>\r\n <script type=\"text/javascript\">\r\n jQuery(document).ready(function() {\r\n jQuery(\"#<?php echo $input_id; ?>\").autocomplete({\r\n source:ajaxurl+'?action=wpi_user_autocomplete_handler',\r\n minLength: 3\r\n });\r\n jQuery(\"#<?php echo $input_id; ?>\").focus();\r\n });\r\n </script>\r\n <input type=\"text\" name=\"<?php echo $input_name; ?>\" class=\"<?php echo $input_class; ?>\" id=\"<?php echo $input_id; ?>\" style=\"<?php echo $input_style; ?>\" />\r\n <?php\r\n }", "title": "" }, { "docid": "c14846f0add052412caac03d5884ef8d", "score": "0.5395445", "text": "function sc_maps_add_forms_meta_box() {\n\n\tglobal $post;\n\n\tif( sc_maps_is_20() ) {\n\t\treturn; // 2.0 has a default address field so we do not need to register one\n\t}\n\n\techo '<tr class=\"sc_meta_box_row\">';\n\n\t\techo '<td class=\"sc_meta_box_td\" colspan=\"2\" valign=\"top\">' . __('Event Location', 'pippin_sc_maps') . '</td>';\n\n\t\techo '<td class=\"sc_meta_box_td\" colspan=\"4\">';\n\n\t\t\techo '<input type=\"text\" class=\"regular-text\" name=\"sc_map_address\" value=\"' . esc_attr( sc_maps_get_address( $post->ID ) ) . '\"/>&nbsp;';\n\n\t\t\techo '<span class=\"description\">' . __('Enter the event address.', 'pippin_sc_maps' ) . '</span><br/>';\n\n\t\t\techo '<input type=\"hidden\" name=\"sc_maps_meta_box_nonce\" value=\"' . wp_create_nonce( basename( __FILE__ ) ) . '\" />';\n\n\t\techo '</td>';\n\n\techo '</tr>';\n\n}", "title": "" }, { "docid": "428614c1badba77a2321f59c5551aa39", "score": "0.53809494", "text": "function locaddress_meta_box() {\n\t\tglobal $post;\n\t\techo '<table class=\"form-table\">\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t<th scope=\"row\"><label for=\"location_address_aptno\">' . __( 'Apartment / Room Number', 'locations' ) . '</label></th>\n\t\t\t\t\t\t<td><input name=\"location_address_aptno\" type=\"text\" id=\"location_address_aptno\" value=\"' . get_post_meta( $post->ID, '_location_address_aptno', true ) . '\" class=\"regular-text\" placeholder=\"' . __( 'e.g. Apartment or suite number', 'locations' ) . '\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t<th scope=\"row\"><label for=\"location_address_street\">' . __( 'Street Address', 'locations' ) . '</label></th>\n\t\t\t\t\t\t<td><input name=\"location_address_street\" type=\"text\" id=\"location_address_street\" value=\"' . get_post_meta( $post->ID, '_location_address_street', true ) . '\" class=\"regular-text\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t<th scope=\"row\"><label for=\"location_address_locality\">' . __( 'Locality', 'locations' ) . '</label></th>\n\t\t\t\t\t\t<td><input name=\"location_address_locality\" type=\"text\" id=\"location_address_locality\" value=\"' . get_post_meta( $post->ID, '_location_address_locality', true ) . '\" class=\"regular-text\" placeholder=\"' . __( 'e.g. City', 'locations' ) . '\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t<th scope=\"row\"><label for=\"location_address_region\">' . __( 'Region', 'locations' ) . '</label></th>\n\t\t\t\t\t\t<td><input name=\"location_address_region\" type=\"text\" id=\"location_address_region\" value=\"' . get_post_meta( $post->ID, '_location_address_region', true ) . '\" class=\"regular-text\" placeholder=\"' . __( 'e.g. State, county or province', 'locations' ) . '\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t<th scope=\"row\"><label for=\"location_address_postcode\">' . __( 'Postal Code', 'locations' ) . '</label></th>\n\t\t\t\t\t\t<td><input name=\"location_address_postcode\" type=\"text\" id=\"location_address_postcode\" value=\"' . get_post_meta( $post->ID, '_location_address_postcode', true ) . '\" class=\"regular-text\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t<th scope=\"row\"><label for=\"location_address_country\">' . __( 'Country', 'locations' ) . '</label></th>\n\t\t\t\t\t\t<td><input name=\"location_address_country\" type=\"text\" id=\"location_address_country\" value=\"' . get_post_meta( $post->ID, '_location_address_country', true ) . '\" class=\"regular-text\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>';\n\t\twp_nonce_field( 'update_location_address', '_nonce_location_address' );\n\t}", "title": "" }, { "docid": "30f6898de018bd09eb14048c4a8f9325", "score": "0.53356034", "text": "function geopost_write_metabox($post) {\r\n wp_nonce_field( plugin_basename(__FILE__), 'geopost_noncename' );\r\n $postid = $post->ID;\r\n echo '<input type=\"text\" id=\"geopost_location_field\" name=\"geopost_location_field\" value=\"\" size=\"20\" />';\r\n echo ' <a href=\"javascript:geopost_geocode(\\'preview_canvas\\', document.getElementById(\\'geopost_location_field\\').value);\">Search</a>';\r\n echo ' | <a href=\"javascript:geopost_set_preview_marker(\\'preview_canvas\\',null,null,\\'0\\');\">Clear</a>';\r\n echo '<br><br>';\r\n echo '<input type=\"hidden\" id=\"geopost_lat\" name=\"geopost_lat\" value=\"\" size=\"6\" />';\r\n echo '<input type=\"hidden\" id=\"geopost_lng\" name=\"geopost_lng\" value=\"\" size=\"6\" />'; \r\n echo '<input type=\"hidden\" id=\"geopost_icon\" name=\"geopost_icon\" value=\"0\" size=\"3\" />'; \r\n echo '<center><div id=\"preview_canvas\" style=\"width:220px; height:0px\"></div></center>';\r\n echo '<script>';\r\n echo 'geopost_map(\"preview_canvas\",\"'. geopost_icon_dir() .'\", 1, 0);';\r\n $lat = get_post_meta($postid, 'geopost_lat', true);\r\n $lng = get_post_meta($postid, 'geopost_lng', true);\r\n $icon = get_post_meta($postid, 'geopost_icon', true);\r\n if(($lat != null) && ($lng != null)) {\r\n if($icon == null)\r\n $icon = 0;\r\n echo 'geopost_set_preview_marker(\"preview_canvas\",' . $lat . ',' . $lng . ',' . $icon . ');';\r\n }\r\n echo '</script>';\r\n}", "title": "" }, { "docid": "e48ae834d5bbcf76afd1cd89f30b017d", "score": "0.5331248", "text": "function gmw_search_form_custom_fields( $gmw ) {\r\n\t\techo gmw_get_search_form_custom_fields( $gmw );\r\n\t}", "title": "" }, { "docid": "af068d8fb3a39362134b4cab425afa17", "score": "0.5297316", "text": "function my_types( $fields ) {\n $fields['google_map'] = __FILE__;\n return $fields;\n}", "title": "" }, { "docid": "5cefaffad493cffb850bd8afd139feeb", "score": "0.5291485", "text": "function ks_include_custom_acf_field_types() {\n include_once(get_template_directory() . '/includes/acf-custom/fields/acf-gf-select.php'); // add Gravity Form field type\n}", "title": "" }, { "docid": "1aeb859ac60a5e7724c027aa389980a2", "score": "0.5289285", "text": "function listing_category_edit_meta_field($term) {\n\t$t_id = $term->term_id;\n\t\n\t$map_countries = array(\n\t\t'Australia',\n\t\t'Brazil',\n\t\t'China',\n\t\t'Cyprus',\n\t\t'France',\n\t\t'India',\n\t\t'Indonesia',\n\t\t'Lithuania',\n\t\t'Malaysia',\n\t\t'New Zealand',\n\t\t'Panama',\n\t\t'Philippines',\n\t\t'Singapore',\n\t\t'Spain',\n\t\t'Thailand',\n\t\t'Turkey',\n\t\t'United Kingdom',\n\t\t'United States'\n\t);\n\t$map_zoom_levels = array(3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18);\n\t\n\t// retrieve the existing value(s) for this meta field. This returns an array\n\t$listing_cat_meta = get_option( \"taxonomy_listing_category_$t_id\" ); ?>\n\t<tr class=\"form-field\">\n\t\t<th scope=\"row\" valign=\"top\"><label for=\"listing_cat_meta[def_map_country]\"><?php _e( 'Manage Map Setting', 'listing_category' ); ?></label></th>\n\t\t<td>\n\t\t\t<div class=\"map_setting_wrap\">\n\t\t\t\t<select name=\"listing_cat_meta[def_map_country]\" id=\"listing_cat_meta[def_map_country]\" class=\"sel_map_country map_setting_input_bdr\">\n\t\t\t\t<option value=\"\">Select Country For Google Map Setting</option>\n\t\t\t\t<?php if(isset($listing_cat_meta['def_map_country']) && $listing_cat_meta['def_map_country'] != ''):?>\n\t\t\t\t\t<?php foreach($map_countries as $map_country):?>\n\t\t\t\t\t\t<?php if($listing_cat_meta['def_map_country'] == $map_country):?>\n\t\t\t\t\t\t<option value=\"<?php echo $map_country;?>\" selected=\"selected\"><?php echo $map_country;?></option>\n\t\t\t\t\t\t<?php else:?>\n\t\t\t\t\t\t<option value=\"<?php echo $map_country;?>\"><?php echo $map_country;?></option>\n\t\t\t\t\t\t<?php endif;?>\n\t\t\t\t\t<?php endforeach;?>\n\t\t\t\t<?php else:?>\n\t\t\t\t\t<?php foreach($map_countries as $map_country):?>\n\t\t\t\t\t\t<option value=\"<?php echo $map_country;?>\"><?php echo $map_country;?></option>\n\t\t\t\t\t<?php endforeach;?>\n\t\t\t\t<?php endif;?>\n\t\t\t\t</select>\n\t\t\t\t<span class=\"map_setting_divider\">\n\t\t\t\t\t<b>OR</b>\n\t\t\t\t</span>\n\t\t\t\t<div class=\"lat_long_wrap\">\n\t\t\t\t\t<label for=\"listing_cat_meta[latitude]\">Latitude</label>\n\t\t\t\t\t<input type=\"text\" name=\"listing_cat_meta[latitude]\" id=\"listing_cat_meta[latitude]\" class=\"map_setting_input_bdr\" value=\"<?php echo ($listing_cat_meta['latitude'] != '' ? $listing_cat_meta['latitude'] : '');?>\">\n\t\t\t\t\t<label for=\"listing_cat_meta[longitude]\">Longitude</label>\n\t\t\t\t\t<input type=\"text\" name=\"listing_cat_meta[longitude]\" id=\"listing_cat_meta[longitude]\" class=\"map_setting_input_bdr\" value=\"<?php echo ($listing_cat_meta['longitude'] != '' ? $listing_cat_meta['longitude'] : '');?>\">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</td>\n\t</tr>\n\t\n\t<tr class=\"form-field\">\n\t\t<th scope=\"row\" valign=\"top\"><label for=\"listing_cat_meta[zoom_level]\"><?php _e( 'Select Zoom Level For Map Setting', 'listing_category' ); ?></label></th>\n\t\t<td>\n\t\t\t<select name=\"listing_cat_meta[zoom_level]\" id=\"listing_cat_meta[zoom_level]\" class=\"sel_zoom_level\">\n\t\t\t<?php if(isset($listing_cat_meta['zoom_level']) && $listing_cat_meta['zoom_level'] != ''):?>\n\t\t\t\t<?php foreach($map_zoom_levels as $zoom_level):?>\n\t\t\t\t\t<?php if($listing_cat_meta['zoom_level'] == $zoom_level):?>\n\t\t\t\t\t<option value=\"<?php echo $zoom_level;?>\" selected=\"selected\"><?php echo $zoom_level;?></option>\n\t\t\t\t\t<?php else:?>\n\t\t\t\t\t<option value=\"<?php echo $zoom_level;?>\"><?php echo $zoom_level;?></option>\n\t\t\t\t\t<?php endif;?>\n\t\t\t\t<?php endforeach;?>\n\t\t\t<?php else:?>\n\t\t\t\t<?php foreach($map_zoom_levels as $zoom_level):?>\n\t\t\t\t\t<?php if($zoom_level == '11'):?>\n\t\t\t\t\t<option value=\"<?php echo $zoom_level;?>\" selected=\"selected\"><?php echo $zoom_level;?></option>\n\t\t\t\t\t<?php else:?>\n\t\t\t\t\t<option value=\"<?php echo $zoom_level;?>\"><?php echo $zoom_level;?></option>\n\t\t\t\t\t<?php endif;?>\n\t\t\t\t<?php endforeach;?>\n\t\t\t<?php endif;?>\n\t\t\t</select>\n\t\t</td>\n\t</tr>\n\t\n<?php }", "title": "" }, { "docid": "bbff3159bd185ee0776915b77d3c14b5", "score": "0.52886975", "text": "function render_field($id, $label ,$fieldName, $fieldType = \"text\", $args = []){\n // Get the location data if it's already been entered\n $key_value = get_post_meta($id, $fieldName, true);\n\n // Output the field\n $output = \"<label style='font-size: 1.3em'>$label</label>\";\n switch ($fieldType) {\n\n case 'number' :\n $output .='<input type=\"number\" name=\"'. $fieldName. '\" value=\"' . $key_value . '\" class=\"form-control\">';\n break;\n\n case 'select' :\n $output .= '<br>';\n $output .= \"<Select name='\" .$fieldName. \"' class='form-control'>\";\n foreach($args as $arg){\n if($key_value == $arg){\n $output .='<option value=\"' . $arg . '\" class=\"form-control\" selected>'. ucfirst($arg) .'</option>';\n }\n $output .='<option value=\"' . $arg . '\" class=\"form-control\">'. ucfirst($arg) .'</option>';\n }\n $output .= \"</Select>\";\n break;\n\n case 'checkbox' :\n\n $output = '<div class=\" form-group form-check\">';\n $output .= '<input style=\"margin: 3px 0 0 -20px;\" id=\"'. $fieldName .'\" name=\"'. $fieldName .'\" class=\"form-check-input\" type=\"checkbox\" ' . ($key_value == 'on' ? 'checked' : '') .'>';\n $output .= \"<label for='\" . $fieldName . \"' class='form-check-label' style='font-size: 1.3em'>$label</label>\";\n $output .= '</div>';\n break;\n\n default:\n $extra_class = '';\n $styles = '';\n if(strpos($fieldName, 'color')){\n $extra_class = 'color-container';\n if(!empty($key_value)){\n $styles = \"background-color:\".$key_value.\"; color: white;\";\n }\n }\n\n $output .= '<input style=\"' . $styles . '\" type=\"text\" name=\"'. $fieldName. '\" value=\"' . $key_value . '\" class=\"form-control ' . $extra_class . '\">';\n break;\n \n }\n \n $output .= '<br>';\n echo $output;\n\n }", "title": "" }, { "docid": "3f16070b9d1652e559cd8e72df2928c4", "score": "0.5285028", "text": "function admin_scripts() {\n?>\n<script>\n(function($) {\n wp.hooks.addAction('eboywp/load/autocomplete', function($this, obj) {\n $this.find('.eboy-source').val(obj.source);\n $this.find('.eboy-placeholder').val(obj.placeholder);\n });\n\n wp.hooks.addFilter('eboywp/save/autocomplete', function(obj, $this) {\n obj['source'] = $this.find('.eboy-source').val();\n obj['placeholder'] = $this.find('.eboy-placeholder').val();\n return obj;\n });\n})(jQuery);\n</script>\n<?php\n }", "title": "" }, { "docid": "fb1b13073ea7b99ca0ae1a0bf7241068", "score": "0.5281206", "text": "function render_field( $field ) { ?>\n <input type=\"text\" value=\"<?php echo esc_attr( $field[ 'value' ] ); ?>\" id=\"<?php echo esc_attr( $field[ 'id' ] ); ?>\" name=\"<?php echo esc_attr( $field[ 'name' ] ); ?>\" class=\"rhicomoon-select-field <?php echo esc_attr( $field[ 'class' ] ); ?>\" data-json-url=\"<?php echo esc_attr( $field[ 'json_url' ] ); ?>\"/>\n <?php }", "title": "" }, { "docid": "2b5c6033ef6a6be0ea6ef34147f48ddf", "score": "0.5262556", "text": "function googleMap_tag_generator( $contact_form, $args = '' ) {\n $args = wp_parse_args( $args, array() );\n\t\tinclude( plugin_dir_path( __FILE__ ) . '/partials/cf7-tag-display.php');\n\t}", "title": "" }, { "docid": "e387331c7aa722a25b8b8a16fcee6d1e", "score": "0.52198625", "text": "public function prepareLocationFields()\n {\n global $rlDb;\n\n if (!$this->geo_format) {\n return;\n }\n\n $listing_fields = $rlDb->fetch(\n array('Key'),\n array(\n 'Condition' => $this->geo_format['Key'],\n 'Status' => 'active',\n ),\n \"AND `Key` NOT LIKE 'citizenship%' ORDER BY `Key`\",\n null,\n 'listing_fields'\n );\n\n if ($listing_fields) {\n foreach ($listing_fields as $k => $field) {\n if ($value = $this->geo_filter_data['location_keys'][$k]) {\n $this->geo_filter_data['location_listing_fields'][$field['Key']] = $value;\n } else {\n $this->geo_filter_data['location_listing_fields'][$field['Key']] = '';\n }\n }\n }\n\n $account_fields = $rlDb->fetch(\n array('Key'),\n array(\n 'Condition' => $this->geo_format['Key'],\n 'Status' => 'active',\n ),\n \"AND `Key` NOT LIKE 'citizenship%' ORDER BY `Key`\",\n null,\n 'account_fields'\n );\n\n if ($account_fields) {\n foreach ($account_fields as $k => $field) {\n if ($value = $this->geo_filter_data['location_keys'][$k]) {\n $this->geo_filter_data['location_account_fields'][$field['Key']] = $value;\n } else {\n $this->geo_filter_data['location_account_fields'][$field['Key']] = '';\n }\n }\n }\n }", "title": "" }, { "docid": "8e783a88f8378ca5f87de6cb2b056771", "score": "0.52040195", "text": "function multitagGooglePlaces($name, $alias, $url, $value, $dafaultValue = \"\") {\n //https://maps.googleapis.com/maps/api/js/AutocompletionService.GetPredictions?1stest&4sen-US&7scountry%3Aus&9sgeocode&callback=_xdc_._cvw7ch&token=63182\n \n $html = input([\"type\" => \"text\", \"placeholder\" => ucwords(str_replace(\"_\", \" \", strtolower($alias))), \"name\" => \"txt\" . $name, \"id\" => $name], \"\");\n $html .= script(\"\n var multi\" . $name . \"lookup = new Bloodhound({\n datumTokenizer: function (d) { return Bloodhound.tokenizers.whitespace(d.tokens.join(' ')); },\n queryTokenizer: Bloodhound.tokenizers.whitespace,\n remote: { url : '\" . $url . \"?filter=%QUERY' }\n });\n multi\" . $name . \"lookup.initialize();\n var a\" . $name . \"lookup = $('#\" . $name . \"');\n a\" . $name . \"lookup.tagsinput({\n itemValue: 'ID',\n itemText: 'DATA',\n typeaheadjs: {\n name: 'cities',\n displayKey: 'DATA',\n source: multi\" . $name . \"lookup.ttAdapter()\n }\n });\n a\" . $name . \"lookup.addClass('form-control');\n\n \");\n\n if ($dafaultValue != \"\") {\n $lookuprow = $this->DEB->getRows($dafaultValue, DEB_ARRAY);\n $scriptVar = \"\";\n foreach ($lookuprow as $irow => $row) {\n $scriptVar .= \"a\" . $name . \"lookup.tagsinput('add', { 'ID': '\" . $row[0] . \"' , 'DATA': '\" . $row[1] . \"' });\\n\";\n }\n $html .= script($scriptVar);\n }\n return $html;\n }", "title": "" }, { "docid": "656404c653eea86ada7446c4d9ee0607", "score": "0.52019024", "text": "public static function add_hooks(){\n\t\tadd_filter( 'caldera_forms_field_attributes-utm', array( 'Caldera_Forms_Field_Utm', 'handle_attrs'), 1 );\n\t\tadd_filter( 'caldera_forms_view_field_utm', array( 'Caldera_Forms_Field_Utm', 'view' ), 10, 3 );\n\n\t}", "title": "" }, { "docid": "50933419eeb9412471002c05be1646a6", "score": "0.51974946", "text": "function geolocation_editor() {\n parent::WP_Widget(false, $name = 'Geo-Location Editor');\t\n }", "title": "" }, { "docid": "e69a1b7830d40565333631f4c46089f8", "score": "0.51855564", "text": "function create_field($field)\n\t{\n\t\techo '<input type=\"text\" value=\"' . $field['value'] . '\" id=\"' . $field['name'] . '\" class=\"' . $field['class'] . '\" name=\"' . $field['name'] . '\" />';\n\t\techo '<div id=\"map\"></div>';\n\t}", "title": "" }, { "docid": "973e03575c5691139db50097a1b27fd5", "score": "0.51838857", "text": "function my_processor_contact_form_owner_processor_fields(){\n\treturn array(\n\t\tarray(\n\t\t\t'id' => 'owner_whatsapp_number',\n\t\t\t'label' => 'Owner WhatsApp Number',\n\t\t\t'type' => 'text',\n\t\t\t'required' => true,\n\t\t\t'magic' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'whatsapp_message',\n\t\t\t'label' => 'WhatsApp Message',\n\t\t\t'type' => 'textarea',\n\t\t\t'required' => true,\n\t\t\t'magic' => true,\n\t\t\t'extra_classes' => array('row' => 6),\n\t\t),\n\t);\n}", "title": "" }, { "docid": "4567564698828e540623732b7e93275c", "score": "0.5172268", "text": "public function fields()\n\t{\n\t\t$fields = array(\n\t\t\t'tag_manager_head'\t=> array(\n\t\t\t\t'label'\t\t\t=> __( 'Tag Manager Head code', 'purple' ),\n\t\t\t\t'option'\t\t=> 'tag_manager_head',\n\t\t\t\t'type'\t\t\t=> 'textarea',\n\t\t\t),\n\t\t\t'tag_manager_body'\t=> array(\n\t\t\t\t'label'\t\t\t=> __( 'Tag Manager Body code', 'purple' ),\n\t\t\t\t'option'\t\t=> 'tag_manager_body',\n\t\t\t\t'type'\t\t\t=> 'textarea',\n\t\t\t),\n\t\t\t'analytics'\t=> array(\n\t\t\t\t'label'\t\t\t=> __( 'Analytics code', 'purple' ),\n\t\t\t\t'option'\t\t=> 'analytics',\n\t\t\t\t'type'\t\t\t=> 'textarea',\n\t\t\t),\n\t\t);\n\n\t\t/**\n\t\t * Filters the Google Tracking Options fields\n\t\t * @param array $fields\n\t\t *\n\t\t * @since Purple 1.0.0\n\t\t */\n\t\treturn apply_filters( 'purple_google_tracking_fields', $fields );\n\t}", "title": "" }, { "docid": "3ce7b6fea5190113e59d1a516e210acf", "score": "0.51546276", "text": "public function foodbakery_contact_element_html_callback($post_id) {\n global $foodbakery_plugin_options;\n\n // restaurant type fields\n $foodbakery_restaurant_type = get_post_meta($post_id, 'foodbakery_restaurant_type', true);\n $list_type = get_page_by_path($foodbakery_restaurant_type, OBJECT, 'restaurant-type');\n\n $restaurant_type_id = isset($list_type) ? $list_type->ID : '';\n $restaurant_type_marker_image_id = get_post_meta($restaurant_type_id, 'foodbakery_restaurant_type_marker_image', true);\n $restaurant_type_marker_image = empty($restaurant_type_marker_image_id) ? wp_foodbakery::plugin_url() . '/assets/frontend/images/map-marker.png' : wp_get_attachment_url($restaurant_type_marker_image_id);\n\n $foodbakery_restaurant_type_loc_map_switch = get_post_meta($restaurant_type_id, 'foodbakery_location_element', true);\n $foodbakery_restaurant_type_open_hours_switch = get_post_meta($restaurant_type_id, 'foodbakery_opening_hours_element', true);\n\n // restaurant fields\n $foodbakery_post_comp_address = get_post_meta($post_id, 'foodbakery_post_loc_address_restaurant', true);\n $foodbakery_post_loc_latitude = get_post_meta($post_id, 'foodbakery_post_loc_latitude_restaurant', true);\n $foodbakery_post_loc_longitude = get_post_meta($post_id, 'foodbakery_post_loc_longitude_restaurant', true);\n $foodbakery_loc_radius_restaurant = get_post_meta($post_id, 'foodbakery_loc_radius_restaurant', true);\n\n if ($foodbakery_post_loc_latitude == '' && $foodbakery_post_loc_longitude == '') {\n $foodbakery_post_loc_latitude = isset($foodbakery_plugin_options['foodbakery_post_loc_latitude']) ? $foodbakery_plugin_options['foodbakery_post_loc_latitude'] : '';\n $foodbakery_post_loc_longitude = isset($foodbakery_plugin_options['foodbakery_post_loc_longitude']) ? $foodbakery_plugin_options['foodbakery_post_loc_longitude'] : '';\n }\n // user profile fields\n\n $user_profile_data = get_post_meta($post_id, 'foodbakery_user_profile_data', true);\n\n $foodbakery_user_phone_number = get_post_meta($post_id, 'foodbakery_restaurant_contact_phone', true);\n $foodbakery_post_loc_address_restaurant = get_post_meta($post_id, 'foodbakery_post_loc_address_restaurant', true);\n $foodbakery_user_website = get_post_meta($post_id, 'foodbakery_restaurant_contact_web', true);\n $foodbakery_user_email = get_post_meta($post_id, 'foodbakery_restaurant_contact_email', true);\n $phone_number_limit = foodbakery_cred_limit_check($post_id, 'foodbakery_transaction_restaurant_phone');\n $website_limit = foodbakery_cred_limit_check($post_id, 'foodbakery_transaction_restaurant_website');\n $map_zoom_level_default = isset($foodbakery_plugin_options['foodbakery_map_zoom_level']) ? $foodbakery_plugin_options['foodbakery_map_zoom_level'] : '10';\n $map_zoom_level_post = get_post_meta($post_id, 'foodbakery_post_loc_zoom_restaurant', true);\n if ($map_zoom_level_post == '' || !isset($map_zoom_level_post)) {\n $map_zoom_level_post = $map_zoom_level_default;\n }\n\n $foodbakery_post_comp_address = wp_trim_words($foodbakery_post_comp_address, 12);\n if (($foodbakery_restaurant_type_loc_map_switch == 'on' && $foodbakery_post_loc_longitude != '' && $foodbakery_post_loc_latitude != '') || $foodbakery_restaurant_type_open_hours_switch == 'on') {\n ?>\n <div class=\"contact-info-detail\">\n <h5><?php printf(esc_html__('Overview %s', 'foodbakery'), get_the_title($post_id)) ?></h5>\n <?php $restaurant_info = get_post( $post_id ); ?>\n <?php if(isset($restaurant_info) && !empty($restaurant_info)){ ?>\n <p class=\"restaurant-desc\">\n <?php echo apply_filters('the_content', $restaurant_info->post_content); ?>\n </p>\n <?php } ?>\n <?php if ($foodbakery_restaurant_type_loc_map_switch == 'on' && $foodbakery_post_loc_longitude != '' && $foodbakery_post_loc_latitude != '') { ?>\n <div class=\"map-sec-holder\">\n <script>\n var map;\n </script>\n <?php\n $map_atts = array(\n 'map_height' => '180',\n 'map_lat' => $foodbakery_post_loc_latitude,\n 'map_lon' => $foodbakery_post_loc_longitude,\n 'map_zoom' => $map_zoom_level_post,\n 'map_type' => '',\n 'map_info' => '', //$foodbakery_post_comp_address,\n 'map_info_width' => '200',\n 'map_info_height' => '200',\n 'map_marker_icon' => $restaurant_type_marker_image,\n 'map_show_marker' => 'true',\n 'map_controls' => 'false',\n 'map_draggable' => 'true',\n 'map_scrollwheel' => 'false',\n 'map_border' => '',\n 'map_border_color' => '',\n 'foodbakery_map_style' => '',\n 'foodbakery_map_class' => '',\n 'foodbakery_map_directions' => 'off',\n 'foodbakery_map_circle' => $foodbakery_loc_radius_restaurant,\n );\n foodbakery_map_content($map_atts);\n ?>\n <script>\n jQuery(document).ready(function ($) {\n $(\"a[href='#menu3']\").on('shown.bs.tab', function () {\n var center = map.getCenter();\n google.maps.event.trigger(map, 'resize');\n map.setCenter(center);\n });\n });\n </script>\n </div>\n <?php } ?>\n <div class=\"row\">\n <?php\n $contact_flag = false;\n if (( $phone_number_limit == 'on' && $foodbakery_user_phone_number != '' ) || ( $website_limit == 'on' && $foodbakery_user_website != '' ) || $foodbakery_user_email != '' || $foodbakery_post_comp_address != '') {\n $contact_flag = true;\n }\n if ($foodbakery_restaurant_type_loc_map_switch == 'on') {\n ?>\n <?php if ($contact_flag) { ?>\n <div class=\"col-lg-6 col-md-6 col-sm-6 col-xs-12\">\n <div class=\"contact-info\">\n <h5><?php _e('Contact details', 'foodbakery'); ?></h5>\n <p><?php echo esc_html($foodbakery_post_loc_address_restaurant); ?></p>\n\n <ul>\n <?php if ($phone_number_limit == 'on' && $foodbakery_user_phone_number != '') { ?>\n <li class=\"cell\"><i class=\"icon-phone\"></i><a href=\"tel:<?php echo preg_replace('/[^A-Za-z0-9\\-]/', '', $foodbakery_user_phone_number); ?>\"><?php echo esc_html($foodbakery_user_phone_number); ?></a></li>\n <?php } ?>\t\n <?php if ($website_limit == 'on' && $foodbakery_user_website != '') { ?>\n <li class=\"pizzaeast\"><i class=\"icon-globe2\"></i><a href=\"<?php echo esc_url($foodbakery_user_website); ?>\"><?php echo esc_url($foodbakery_user_website); ?></a></li>\n <?php } ?>\t\n <?php if ($foodbakery_user_email != '') { ?>\n <li class=\"email\"><i class=\"icon-mail5\"></i><a class=\"text-color\" href=\"mailto:<?php echo esc_html($foodbakery_user_email); ?>\"><?php echo esc_html__('Send Enquiry By Email', 'foodbakery'); ?></a></li>\n <?php } ?>\t\n </ul>\n </div>\n </div>\n <?php } ?>\n <?php\n }\n if ($foodbakery_restaurant_type_open_hours_switch == 'on') {\n ?>\n <div class=\"col-lg-6 col-md-6 col-sm-6 col-xs-12\">\n <?php do_action('foodbakery_opening_hours_element_html', $post_id); ?>\n </div>\n <?php\n }\n ?>\n </div>\n </div>\n <?php\n }\n }", "title": "" }, { "docid": "f4d91a209db6f8926e177457e14b936a", "score": "0.5150673", "text": "function set_event_dates_lat_and_long($entry, $form) {\n \n global $wpdb, $post;\n $post = get_post($entry[\"post_id\"]);\n setup_postdata( $post ); \n $post_id = $post->ID;\n\n\t// Avoid an infinite loop by the following\n\tif ( !wp_is_post_revision( $post_id ) ){\n\t\n\t\t// unhook this function so it doesn't loop infinitely\n remove_action(\"gform_after_submission\", \"set_event_dates_lat_and_long\", 10, 2);\n\t \n $start_key = 'gp_events_startdate';\n $end_key = 'gp_events_enddate';\n $start_date = get_post_meta($post_id, $start_key, true);\n $end_date = get_post_meta($post_id, $end_key, true);\n \n if ( !empty($start_date) && !empty($end_date) ) {\n\n $start_ts = strtotime($start_date);\n $end_ts = strtotime($end_date);\n update_post_meta($post_id, $start_key, $start_ts);\n update_post_meta($post_id, $end_key, $end_ts); \n \n } \n\n if ( ( $post->post_type == 'gp_news' ) || ( $post->post_type == 'gp_events' ) || \n ( $post->post_type == 'gp_advertorial' ) || ( $post->post_type == 'gp_projects' ) ) {\n \n $location_meta_key = \t 'gp_google_geo_location';\n $lat_meta_key = \t\t 'gp_google_geo_latitude';\n $long_meta_key = \t\t 'gp_google_geo_longitude';\n $country_meta_key = \t 'gp_google_geo_country';\n $admin_lvl_one_key = \t 'gp_google_geo_administrative_area_level_1';\n $admin_lvl_two_key = \t 'gp_google_geo_administrative_area_level_2';\n $admin_lvl_three_key = \t 'gp_google_geo_administrative_area_level_3';\n $locality_key = \t\t 'gp_google_geo_locality';\n $locality_slug_key = \t 'gp_google_geo_locality_slug';\n \n switch ($post->post_type) {\n case 'gp_news':\n $edit_news_uri = '/forms/update-news/?gform_post_id='. $post->ID; \n $location_entry = \t ( strpos( $_SERVER['REQUEST_URI'], $edit_news_uri ) === 0 ) ? '9' : '8' ;\n $lat_entry = \t\t ( strpos( $_SERVER['REQUEST_URI'], $edit_news_uri ) === 0 ) ? '10' : '9' ;\n $long_entry = \t\t ( strpos( $_SERVER['REQUEST_URI'], $edit_news_uri ) === 0 ) ? '11' : '10';\n $country_entry = \t ( strpos( $_SERVER['REQUEST_URI'], $edit_news_uri ) === 0 ) ? '12' : '11';\n $admin_lvl_one_entry = \t ( strpos( $_SERVER['REQUEST_URI'], $edit_news_uri ) === 0 ) ? '13' : '12';\n $admin_lvl_two_entry = \t ( strpos( $_SERVER['REQUEST_URI'], $edit_news_uri ) === 0 ) ? '14' : '13';\n $admin_lvl_three_entry = ( strpos( $_SERVER['REQUEST_URI'], $edit_news_uri ) === 0 ) ? '15' : '14';\n $locality_entry = \t\t ( strpos( $_SERVER['REQUEST_URI'], $edit_news_uri ) === 0 ) ? '16' : '15';\n $locality_slug_entry = \t ( strpos( $_SERVER['REQUEST_URI'], $edit_news_uri ) === 0 ) ? '17' : '16'; \n break;\n case 'gp_events':\n $location_entry = \t '11';\n $lat_entry = \t\t '12';\n $long_entry = \t\t '13';\n $country_entry = \t '14';\n $admin_lvl_one_entry = \t '15';\n $admin_lvl_two_entry = \t '16';\n $admin_lvl_three_entry = '17';\n $locality_entry = \t\t '18';\n $locality_slug_entry = \t '19';\n break;\n case 'gp_advertorial':\n $product_post_uri = '/forms/create-product-post-subscriber/'; \n $location_entry = \t ( strpos( $_SERVER['REQUEST_URI'], $product_post_uri ) === 0 ) ? '10' : '8' ;\n $lat_entry = \t\t ( strpos( $_SERVER['REQUEST_URI'], $product_post_uri ) === 0 ) ? '11' : '9' ;\n $long_entry = \t\t ( strpos( $_SERVER['REQUEST_URI'], $product_post_uri ) === 0 ) ? '12' : '10';\n $country_entry = \t ( strpos( $_SERVER['REQUEST_URI'], $product_post_uri ) === 0 ) ? '13' : '11';\n $admin_lvl_one_entry = \t ( strpos( $_SERVER['REQUEST_URI'], $product_post_uri ) === 0 ) ? '14' : '12';\n $admin_lvl_two_entry = \t ( strpos( $_SERVER['REQUEST_URI'], $product_post_uri ) === 0 ) ? '15' : '13';\n $admin_lvl_three_entry = ( strpos( $_SERVER['REQUEST_URI'], $product_post_uri ) === 0 ) ? '16' : '14';\n $locality_entry = \t\t ( strpos( $_SERVER['REQUEST_URI'], $product_post_uri ) === 0 ) ? '17' : '15';\n $locality_slug_entry = \t ( strpos( $_SERVER['REQUEST_URI'], $product_post_uri ) === 0 ) ? '18' : '16'; \n break;\n case 'gp_projects':\n $location_entry = \t '8' ;\n $lat_entry = \t\t '9' ;\n $long_entry = \t\t '10';\n $country_entry = \t '11';\n $admin_lvl_one_entry = \t '12';\n $admin_lvl_two_entry = \t '13';\n $admin_lvl_three_entry = '14';\n $locality_entry = \t\t '15';\n $locality_slug_entry = \t '16';\n break; \n }\n \n update_post_meta($post_id, $location_meta_key, $entry[$location_entry]); \n update_post_meta($post_id, $lat_meta_key, $entry[$lat_entry]);\n update_post_meta($post_id, $long_meta_key, $entry[$long_entry]);\n update_post_meta($post_id, $country_meta_key, $entry[$country_entry]); \n update_post_meta($post_id, $admin_lvl_one_key, $entry[$admin_lvl_one_entry]); \n update_post_meta($post_id, $admin_lvl_two_key, $entry[$admin_lvl_two_entry]); \n update_post_meta($post_id, $admin_lvl_three_key, $entry[$admin_lvl_three_entry]); \n update_post_meta($post_id, $locality_key, $entry[$locality_entry]);\n update_post_meta($post_id, $locality_slug_key, $entry[$locality_slug_entry]);\n \n $post_lat = (float) get_post_meta($post_id, $lat_meta_key, true);\n $post_long = (float) get_post_meta($post_id, $long_meta_key, true);\n \n \t// update the post, with lat and long as decimal\n \t\t$table = 'wp_posts';\n \t\t$data = array( 'post_latitude' => $post_lat, 'post_longitude' => $post_long );\n \t\t$where = array( 'ID' => $post_id );\n \t\t$format = array( '%s', '%s' );\n \n $wpdb->update($table, $data, $where, $format); \n\n }\n \n add_action(\"gform_after_submission\", \"set_event_dates_lat_and_long\", 10, 2); \n\t}\n}", "title": "" }, { "docid": "ead7aeb2ecc6fb29ed83c89d79371e8f", "score": "0.5148973", "text": "public function init_form_fields()\n {\n $this->form_fields = apply_filters('wc_western_union_form_fields', array(\n 'enabled' => array(\n 'title' => __('Enable/Disable', 'wc-gateway-wu'),\n 'type' => 'checkbox',\n 'label' => __('Enable Western Union Payment', 'wc-gateway-wu'),\n 'default' => 'yes'\n ),\n\n 'title' => array(\n 'title' => __('Title', 'wc-gateway-wu'),\n 'type' => 'text',\n 'description' => __('This controls the title for the payment method the customer sees during checkout.', 'wc-gateway-wu'),\n 'default' => __('Western Union', 'wc-gateway-wu'),\n 'desc_tip' => true,\n ),\n\n 'description' => array(\n 'title' => __('Description', 'wc-gateway-wu'),\n 'type' => 'textarea',\n 'description' => __('Payment method description that the customer will see on your checkout.', 'wc-gateway-wu'),\n 'default' => __('Pay with Western Union.', 'wc-gateway-wu'),\n 'desc_tip' => true,\n ),\n\n 'name_selection' => array(\n 'title' => __('Name selection', 'wc-gateway-wu'),\n 'type' => 'select',\n 'description' => __('Choose how names will display.', 'wc-gateway-wu'),\n 'options' => array(\n 'randomize' => __('Randomize', 'Randomize'),\n 'order' => __('Names in order', 'Names in order'),\n ),\n 'default' => __('randomize', 'wc-gateway-wu'),\n 'desc_tip' => true,\n ),\n\n\n 'names_under' => array(\n 'title' => __('Names Under 500$', 'wc-gateway-wu'),\n 'description' => __('Enter names for random select.', 'wc-gateway-wu'),\n 'default' => __('Jhon Doe', 'wc-gateway-wu'),\n 'desc_tip' => true,\n 'type' => 'extendablearray',\n 'custom_id' => 'names_under',\n ),\n 'names_over' => array(\n 'title' => __('Names Over 500$', 'wc-gateway-wu'),\n 'description' => __('Enter names for random select.', 'wc-gateway-wu'),\n 'default' => __('Jhon Doe', 'wc-gateway-wu'),\n 'desc_tip' => true,\n 'type' => 'extendablearray', //novi tip\n 'custom_id' => 'names_over',\t//novi custom id field\n ),\n\n\n 'instructions' => array(\n 'title' => __('Thank you/Mail info', 'wc-gateway-wu'),\n 'type' => 'textarea',\n 'description' => __('Information that will be added to the thank you page and emails. OPTIONAL - Use {form_link} to put the link of the WU form to the thank you page', 'wc-gateway-wu'),\n 'default' => 'Thank you for buying with us. The next step is following the {form_link} so we can complete your order.',\n 'desc_tip' => true,\n ),\n 'link_name' => array(\n 'title' => __('Form link - Name', 'wc-gateway-wu'),\n 'type' => 'text',\n 'description' => __('This is the name of the link which will appear at the thank you page', 'wc-gateway-wu'),\n 'default' => 'Western Union Form',\n 'desc_tip' => true,\n ),\n 'link_url' => array(\n 'title' => __('Form link - URL', 'wc-gateway-wu'),\n 'type' => 'text',\n 'description' => __('This is the URL of the link which will appear at the thank you page, leave empty if want to use default URL', 'wc-gateway-wu'),\n 'default' => '',\n 'desc_tip' => true,\n )\n ));\n}", "title": "" }, { "docid": "47b699487068ec4152eb6d418bbc7a75", "score": "0.51478064", "text": "function get_location_callback_ajax($form, &$form_state) {\n\n $item = array();\n // Get each triggering element number off end of triggering elements #id\n preg_match('/(\\d+)$/', $form_state['triggering_element']['#id'], $item);\n // grab first string value\n $item = array_shift($item);\n\n return $form[\"location\"]['items'][$item]['data'];\n}", "title": "" }, { "docid": "dd29b16207e91269c790d65a914079a2", "score": "0.5146638", "text": "public static function register_custom_fields();", "title": "" }, { "docid": "8461ddc8d0ae27b45731d8336d6fa435", "score": "0.51431584", "text": "function auto_save_city( $post_id ) {\n\n $location = get_field('location');\n // Address, City, State zip\n $Fulladdress = $location['address'];\n\n $city = ltrim(explode(\",\",$Fulladdress)[1]);\n\n\n // do something\n if( empty(get_field('city')) ):\n update_field('city', $city);\n endif;\n}", "title": "" }, { "docid": "19ea20ae2b8607b026933c77081908bf", "score": "0.51178044", "text": "function wpcf_fields_google_map_editor_callback( $field, $settings ) {\n ob_start();\n\n ?>\n <label><input type=\"text\" name=\"width\" value=\"<?php echo isset( $settings['width'] ) ? $settings['width'] : '425'; ?>\" />&nbsp;<?php _e( 'Width', 'wpcf' ); ?></label>\n <br />\n <label><input type=\"text\" name=\"height\" value=\"<?php echo isset( $settings['height'] ) ? $settings['height'] : '350'; ?>\" />&nbsp;<?php _e( 'Height', 'wpcf' ); ?></label>\n <?php\n $form = ob_get_contents();\n ob_get_clean();\n return array(\n 'tabs' => array(\n 'display' => array(\n 'menu_title' => __( 'Display', 'wpcf' ),\n 'title' => __( 'Display', 'wpcf' ),\n 'content' => $form,\n )\n )\n );\n}", "title": "" }, { "docid": "5a2c03dfb924aa795bb3c884c475cdc0", "score": "0.51047003", "text": "public function field_code() {\n\t\t// Display the tokens in the right column of the page\n\t\techo '<div id=\"tokens-description\" style=\"position:absolute;margin-left:600px;margin-right:50px;\">';\n\t\techo '<span>' . __( 'Use tokens in your custom variables to make your fields dynamic based on context. Here are some of the tokens you can use:' ) . '</span>';\n\t\techo '<table style=\"text-align:left;\">';\n\t\techo '<thead><tr><td>' . __( 'Token', 'wp-google-analytics' ) . '</td><td>' . __( 'Description', 'wp-google-analytics' ) . '</td><td>' . __( 'Return value', 'wp-google-analytics' ) . '</td></tr></thead>';\n\t\techo '<tbody>';\n\t\tforeach( $this->tokens as $token ) {\n\t\t\techo '<tr>';\n\t\t\techo '<td>' . esc_html( $token['token'] ) . '</td>';\n\t\t\techo '<td>' . esc_html( $token['description'] ) . '</td>';\n\t\t\techo '<td>' . esc_html( $token['retval'] ) . '</td>';\n\t\t\techo '</tr>';\n\t\t}\n\t\techo '</tbody>';\n\t\techo '</table>';\n\t\techo '</div>';\n\n\t\techo '<input name=\"wga[code]\" id=\"wga-code\" type=\"text\" value=\"' . esc_attr( $this->_get_options( 'code' ) ) . '\" />';\n\t\techo '<p class=\"description\">' . __( 'Paste your Google Analytics tracking ID (e.g. \"UA-XXXXXX-X\") into the field.', 'wp-google-analytics' ) . '</p>';\n\t}", "title": "" }, { "docid": "35173189b3af73f8ee30b3cca6cb1651", "score": "0.50975084", "text": "function wc_elshaddai_bfield( $fields ) {\n $fields['billing_number']['maxlength'] = 5;\n $fields['billing_address_2']['maxlength'] = 30;\n $fields['billing_address_2']['label_class'] = array('');\n $fields['billing_neighborhood']['required'] = true;\n return $fields;}", "title": "" }, { "docid": "e5d29719741e7a03de07c3a17efdbc0c", "score": "0.5090033", "text": "function oneclick_google_map_plugin_mainpage()\r\r\n{\r\r\n if (!current_user_can('manage_options')) {\r\r\n wp_die('We hereby declarating :You are not authorised to access this plugin');\r\r\n }\r\r\n global $plugin_url;\r\r\n global $options;\r\r\n if (isset($_POST['google_settings_form_submitted'])) {\r\r\n $hidden_field = esc_html($_POST['google_settings_form_submitted']);\r\r\n if ($hidden_field == \"Y\") {\r\r\n $gmap_iconizer_apikey = esc_html($_POST['gmap_iconizer_apikey']);\r\r\n $options_settings['gmap_iconizer_apikey'] = $gmap_iconizer_apikey;\r\r\n $gmap_iconizer_zoomcontrol = esc_html($_POST['gmap_iconizer_zoomcontrol']);\r\r\n $options_settings['gmap_iconizer_zoomcontrol'] = $gmap_iconizer_zoomcontrol;\r\r\n $gmap_iconizer_zoomcontrolSize = esc_html($_POST['gmap_iconizer_zoomcontrolSize']);\r\r\n $options_settings['gmap_iconizer_zoomcontrolSize'] = $gmap_iconizer_zoomcontrolSize;\r\r\n $gmap_iconizer_zoomcontrolPosition = esc_html($_POST['gmap_iconizer_zoomcontrolPosition']);\r\r\n $options_settings['gmap_iconizer_zoomcontrolPosition'] = $gmap_iconizer_zoomcontrolPosition;\r\r\n $gmap_iconizer_maptype = esc_html($_POST['gmap_iconizer_maptype']);\r\r\n $options_settings['gmap_iconizer_maptype'] = $gmap_iconizer_maptype;\r\r\n\t\t\t$gmap_iconizer_type = esc_html($_POST['gmap_iconizer_type']);\r\r\n $options_settings['gmap_iconizer_type'] = $gmap_iconizer_type;\r\r\n $gmap_iconizer_maptypecontrol_style = esc_html($_POST['gmap_iconizer_maptypecontrol_style']);\r\r\n $options_settings['gmap_iconizer_maptypecontrol_style'] = $gmap_iconizer_maptypecontrol_style;\r\r\n $gmap_iconizer_maptype_position = esc_html($_POST['gmap_iconizer_maptype_position']);\r\r\n $options_settings['gmap_iconizer_maptype_position'] = $gmap_iconizer_maptype_position;\r\r\n $gmap_iconizer_pancontrol = esc_html($_POST['gmap_iconizer_pancontrol']);\r\r\n $options_settings['gmap_iconizer_pancontrol'] = $gmap_iconizer_pancontrol;\r\r\n $gmap_iconizer_pan_position = esc_html($_POST['gmap_iconizer_pan_position']);\r\r\n $options_settings['gmap_iconizer_pan_position'] = $gmap_iconizer_pan_position;\r\r\n $gmap_iconizer_streetviewcontrol = esc_html($_POST['gmap_iconizer_streetviewcontrol']);\r\r\n $options_settings['gmap_iconizer_streetviewcontrol'] = $gmap_iconizer_streetviewcontrol;\r\r\n $gmap_iconizer_streetviewcontrol_position = esc_html($_POST['gmap_iconizer_streetviewcontrol_position']);\r\r\n $options_settings['gmap_iconizer_streetviewcontrol_position'] = $gmap_iconizer_streetviewcontrol_position;\r\r\n update_option('oneclick', $options_settings);\r\r\n }\r\r\n }\r\r\n if (isset($_POST['google_settings_form_submitted'])) {\r\r\n $hidden_field = esc_html($_POST['google_settings_form_submitted']);\r\r\n if ($hidden_field == \"Y\") {\r\r\n $gmap_iconizer_zoom_level = esc_html($_POST['gmap_iconizer_zoom_level']);\r\r\n $options_geolocation['gmap_iconizer_zoom_level'] = $gmap_iconizer_zoom_level;\r\r\n $gmap_iconizer_latitude = esc_html($_POST['gmap_iconizer_latitude']);\r\r\n $options_geolocation['gmap_iconizer_latitude'] = $gmap_iconizer_latitude;\r\r\n $gmap_iconizer_longitude = esc_html($_POST['gmap_iconizer_longitude']);\r\r\n $options_geolocation['gmap_iconizer_longitude'] = $gmap_iconizer_longitude;\r\r\n update_option('oneclick_geolocation', $options_geolocation);\r\r\n }\r\r\n }\r\r\n $options_geolocation = get_option('oneclick_geolocation');\r\r\n $gmap_iconizer_zoom_level = $options_geolocation['gmap_iconizer_zoom_level'];\r\r\n $gmap_iconizer_latitude = $options_geolocation['gmap_iconizer_latitude'];\r\r\n $gmap_iconizer_longitude = $options_geolocation['gmap_iconizer_longitude'];\r\r\n $options_iconizer = get_option('oneclick');\r\r\n $gmap_iconizer_apikey = $options_iconizer['gmap_iconizer_apikey'];\r\r\n $gmap_iconizer_zoomcontrol = $options_iconizer['gmap_iconizer_zoomcontrol'];\r\r\n $gmap_iconizer_zoomcontrolSize = $options_iconizer['gmap_iconizer_zoomcontrolSize'];\r\r\n $gmap_iconizer_zoomcontrolPosition = $options_iconizer['gmap_iconizer_zoomcontrolPosition'];\r\r\n $gmap_iconizer_maptype = $options_iconizer['gmap_iconizer_maptype'];\r\r\n\t$gmap_iconizer_type = $options_iconizer['gmap_iconizer_type'];\r\r\n $gmap_iconizer_maptypecontrol_style = $options_iconizer['gmap_iconizer_maptypecontrol_style'];\r\r\n $gmap_iconizer_maptype_position = $options_iconizer['gmap_iconizer_maptype_position'];\r\r\n $gmap_iconizer_pancontrol = $options_iconizer['gmap_iconizer_pancontrol'];\r\r\n $gmap_iconizer_pan_position = $options_iconizer['gmap_iconizer_pan_position'];\r\r\n $gmap_iconizer_streetviewcontrol = $options_iconizer['gmap_iconizer_streetviewcontrol'];\r\r\n $gmap_iconizer_streetviewcontrol_position = $options_iconizer['gmap_iconizer_streetviewcontrol_position'];\r\r\n if (isset($_POST['frontend_settings_form_submitted'])) {\r\r\n $hidden_field_frontend = esc_html($_POST['frontend_settings_form_submitted']);\r\r\n if ($hidden_field_frontend == \"Y\") {\r\r\n $gmap_iconizer_upload_icon = esc_html($_POST['upload_icon']);\r\r\n $options_frontend['gmap_iconizer_upload_icon'] = $gmap_iconizer_upload_icon;\r\r\n $gmap_iconizer_maphue = esc_html($_POST['gmap_iconizer_hue']);\r\r\n $options_frontend['gmap_iconizer_maphue'] = $gmap_iconizer_maphue;\r\r\n $gmap_iconizer_mapsaturation = esc_html($_POST['gmap_iconizer_saturation']);\r\r\n $options_frontend['gmap_iconizer_mapsaturation'] = $gmap_iconizer_mapsaturation;\r\r\n $gmap_iconizer_mapwidth = esc_html($_POST['gmap_iconizer_mapwidth']);\r\r\n $options_frontend['gmap_iconizer_mapwidth'] = $gmap_iconizer_mapwidth;\r\r\n $gmap_iconizer_mapheight = esc_html($_POST['gmap_iconizer_mapheight']);\r\r\n $options_frontend['gmap_iconizer_mapheight'] = $gmap_iconizer_mapheight;\r\r\n $gmap_iconizer_mapstyle = esc_html($_POST['gmap_iconizer_mapstyle']);\r\r\n $options_frontend['gmap_iconizer_mapstyle'] = $gmap_iconizer_mapstyle;\r\r\n $gmap_iconizer_mapcontainerstyle = esc_html($_POST['gmap_iconizer_mapcontainerstyle']);\r\r\n $options_frontend['gmap_iconizer_mapcontainerstyle'] = $gmap_iconizer_mapcontainerstyle;\r\r\n update_option('oneclick_frontend', $options_frontend);\r\r\n }\r\r\n }\r\r\n $options_frontend_admin = get_option('oneclick_frontend');\r\r\n $gmap_iconizer_upload_icon = $options_frontend_admin['gmap_iconizer_upload_icon'];\r\r\n $gmap_iconizer_maphue = $options_frontend_admin['gmap_iconizer_maphue'];\r\r\n $gmap_iconizer_mapsaturation = $options_frontend_admin['gmap_iconizer_mapsaturation'];\r\r\n $gmap_iconizer_mapwidth = $options_frontend_admin['gmap_iconizer_mapwidth'];\r\r\n $gmap_iconizer_mapheight = $options_frontend_admin['gmap_iconizer_mapheight'];\r\r\n $gmap_iconizer_mapstyle = $options_frontend_admin['gmap_iconizer_mapstyle'];\r\r\n $gmap_iconizer_mapcontainerstyle = $options_frontend_admin['gmap_iconizer_mapcontainerstyle'];\r\r\n $options_main_frontend = get_option('oneclick_google_map_frontend_tutorials');\r\r\n $options_main_advanced = get_option('oneclick_google_map_advanced_tutorials');\r\r\n $options_main_installation = get_option('oneclick_google_map_installation_tutorials');\r\r\n $tutorial_last_updated = $options_main_installation['last_updated'];\r\r\n $timenow = time();\r\r\n $check_updates_difference = $timenow - $tutorial_last_updated;\r\r\n // ======================================================================\r\r\n // /* 604800 for a Week 86400 for a day */\r\r\n // ======================================================================\r\r\n if ($check_updates_difference > 150) {\r\r\n $tutorial_frontend_api = oneclick_call_wp_frontend_api();\r\r\n $tutorial_advanced_api = oneclick_call_wp_advanced_api();\r\r\n $tutorial_installation_api = oneclick_call_wp_installation_api();\r\r\n $tutorials_frontend['oneclick_google_map_frontend_tutorials'] = $tutorial_frontend_api;\r\r\n $tutorial_advanced['oneclick_google_map_advanced_tutorials'] = $tutorial_advanced_api;\r\r\n $tutorial_installation['oneclick_google_map_installation_tutorials'] = $tutorial_installation_api;\r\r\n $tutorial_installation['last_updated'] = time();\r\r\n update_option('oneclick_google_map_frontend_tutorials', $tutorials_frontend);\r\r\n update_option('oneclick_google_map_advanced_tutorials', $tutorial_advanced);\r\r\n update_option('oneclick_google_map_installation_tutorials', $tutorial_installation);\r\r\n }\r\r\n $context = stream_context_create(array(\r\r\n 'http' => array(\r\r\n 'header' => 'Accept: application/xml'\r\r\n )\r\r\n ));\r\r\n $url = 'http://wp-samurai.com/wp-samurai-updates.xml';\r\r\n $xml = file_get_contents($url, false, $context);\r\r\n $xml = simplexml_load_string($xml);\r\r\n $updatedversion = $xml->googlemap->version;\r\r\n global $pluginversion;\r\r\n $updatedversion = (double)$updatedversion;\r\r\n $pluginversion = (double)$pluginversion;\r\r\n if ($updatedversion > $pluginversion) {\r\r\n echo '<div style=\"width:80%; padding: 10px;margin-left:0px;margin-bottom:15px;margin-top:15px;\" class=\"error below-h2\">\r\r\n We updated Our Plugin from ' . $pluginversion . ' to ' . $updatedversion . ' at ' . $xml->googlemap->publish_date . '\r\r\n <p>Release Notes :' . $xml->googlemap->description . '\r\r\n </br>' . $xml->googlemap->releasenote1 . ', ' . $xml->googlemap->releasenote2 . '\r\r\n </p>\r\r\n <p>\r\r\n Bug Fixes :</br> ' . $xml->googlemap->bug1 . ', ' . $xml->googlemap->bug2 . '\r\r\n </p>\r\r\n <p>Please take time to <a href=\"' . $xml->googlemap->downloadurl . '\" target=\"_blank\">download</a> new version from CodeCanyon</p>\r\r\n </div>';\r\r\n }\r\r\n else {\r\r\n }\r\r\n require ('includes/plugin_mainpage_wrapper.php');\r\r\n}", "title": "" }, { "docid": "b8db08c70220d6f20f47e429d1203da2", "score": "0.5089771", "text": "public function get_ga_field_markup( $fields = null ) {\n\n if ( ! empty( $fields ) && is_array( $fields ) ) {\n foreach ( $fields as $field ) {\n if ( $field && isset( $field['parent_name'] ) ) {\n $option_value = get_option( $field['parent_name'] );\n $field_value = isset( $option_value[ $field['name'] ] ) ? $option_value[ $field['name'] ] : '';\n $type = isset( $field['type'] ) ? $field['type'] : 'text';\n $classes = isset( $field['classes'] ) ? $field['classes'] : array();\n\n // clean 'class' data.\n if ( ! is_array( $classes ) ) {\n $classes = array( $classes );\n }\n $classes = array_unique( $classes );\n\n // add class if type is text.\n if ( 'text' === $type ) {\n $classes[] = 'regular-text';\n }\n\n // add label if set.\n if ( isset( $field['label'] ) ) {\n echo '<label>';\n }\n\n echo '<input type=\"' . esc_attr( $type ) . '\" name=\"' . esc_attr( $field['parent_name'] . '[' . $field['name'] . ']' ) . '\" value=\"' . esc_attr( $field_value ) . '\"';\n\n // add id, if set.\n if ( isset( $field['id'] ) ) {\n echo ' id=\"' . esc_attr( $field['id'] ) . '\"';\n }\n\n if ( isset( $field['label'] ) ) {\n echo ' style=\"margin-right:5px;\"';\n }\n\n // add classes, if set.\n if ( ! empty( $classes ) ) {\n echo ' class=\"' . esc_attr( implode( ' ', $classes ) ) . '\"';\n }\n\n\n // add checked property, if set.\n if ( 'checkbox' === $type ) {\n echo $field_value ? ' checked' : '';\n }\n\n // add disabled property, if set.\n if ( isset( $field['disabled'] ) && $field['disabled'] ) {\n echo ' disabled';\n }\n\n // add disabled property, if set.\n if ( isset( $field['readonly'] ) && $field['readonly'] ) {\n echo ' readonly';\n }\n\n // add onclick support.\n if ( isset( $field['onclick'] ) && $field['onclick'] ) {\n echo ' onclick=\"' . esc_attr( $field['onclick'] ) . '\"';\n }\n\n echo '>';\n\n // Display Auto Detected Text.\n if ( 'text' === $type ) {\n if ( isset( $field['show_notice'] ) && 1 === $field['show_notice'] ) {\n echo '<span style=\"font-style: italic;font-weight: 600;\">(' . esc_html__( 'auto detected', 'laterpay' ) . ')</span>';\n }\n\n // Update option and remove value.\n $this->update_auto_detection_value( 0 );\n }\n\n // add extra text if set.\n if ( isset( $field['appended_text'] ) ) {\n echo '<dfn class=\"lp_appended-text\">' . esc_html( $field['appended_text'] ) . '</dfn>';\n }\n\n if ( isset( $field['label'] ) ) {\n echo esc_html( $field['label'] );\n echo '</label>';\n }\n\n // add support for modal.\n if ( isset( $field['modal'] ) ) {\n echo '<div id=\"' . esc_attr( $field['modal']['id'] ) . '\" style=\"display:none;\">';\n echo '<p>' . wp_kses( $field['modal']['message'], [ 'br' => [] ] ) . '</p>';\n echo '<button class=\"lp_js_disableTracking button button-primary lp_mt- lp_mb-\">' .\n esc_html( $field['modal']['saveText'] ) . '</button>';\n echo '<button type=\"button\" class=\"button button-secondary lp_mt- lp_mb- lp_js_ga_cancel\">' . esc_html( $field['modal']['cancelText'] ) . '</button>';\n echo '</div>';\n }\n }\n }\n }\n }", "title": "" }, { "docid": "756ffc66a13fecce545b53302b782003", "score": "0.5088974", "text": "function normal_fields_widget($action_select_list,$cate_select_list,$select_city_list,$select_area_list,$tax_terms,$tax_terms_area,$tax_terms_city,$tax_terms_categ,$tax_terms_categ){ \n if( !empty($tax_terms_categ) ){\n print' \n <div class=\"dropdown form-control\" >\n <div data-toggle=\"dropdown\" id=\"a_sidebar_filter_categ\" class=\"sidebar_filter_menu\"> '. __('Tipo de Imóvel','wpestate').' <span class=\"caret caret_sidebar\"></span> </div> \n <input type=\"hidden\" name=\"filter_search_type[]\" value=\"\">\n <ul id=\"sidebar_filter_categ\" class=\"dropdown-menu filter_menu\" role=\"menu\" aria-labelledby=\"a_sidebar_filter_categ\">\n '.$cate_select_list.'\n </ul> \n </div>';\n }\n \n if( !empty($tax_terms_city) ){\n print'\n <div class=\" dropdown form-control\" >\n <div data-toggle=\"dropdown\" id=\"sidebar_filter_cities\" class=\"sidebar_filter_menu\"> '. __('Praia','wpestate').' <span class=\"caret caret_sidebar\"></span> </div> \n <input type=\"hidden\" name=\"advanced_city\" value=\"\">\n <ul id=\"sidebar_filter_city\" class=\"dropdown-menu filter_menu\" role=\"menu\" aria-labelledby=\"sidebar_filter_cities\">\n '. $select_city_list.'\n </ul> \n </div> ';\n }\n print' \n <input type=\"text\" id=\"adv_rooms_widget\" name=\"advanced_rooms\" placeholder=\"'.__('Pessoas','wpestate').'\" class=\"advanced_select form-control\">\n <input type=\"text\" id=\"adv_bath_widget\" name=\"advanced_bath\" placeholder=\"'.__('Quartos','wpestate').'\" class=\"advanced_select form-control\">\n <input type=\"text\" id=\"adv_codigo_widget\" name=\"advanced_codigo\" placeholder=\"'.__('Código','wpestate').'\" class=\"advanced_select form-control\">';\n \n \n }", "title": "" }, { "docid": "c03ce0cf08febeef5d8d9427765ae5e4", "score": "0.5084525", "text": "function am_trail_information_input ( $post, $metabox ) {\n \n \n $location = (get_post_meta($post->ID,\"am_trail_location\",true))? '\"'.get_post_meta($post->ID,\"am_trail_location\",true).'\"':'\"Add trail location here\" onfocus=\"this.value=\\'\\'\"';\n $distance = (get_post_meta($post->ID,\"am_trail_distance\",true))?'\"'.get_post_meta($post->ID,\"am_trail_distance\",true).'\"':'\"Add trail distance here\" onfocus=\"this.value=\\'\\'\"';\n $difficulty = (get_post_meta($post->ID,\"am_trail_difficulty\",true))? '\"'.get_post_meta($post->ID,\"am_trail_difficulty\",true).'\"':'\"Add trail difficulty here\" onfocus=\"this.value=\\'\\'\"';\n \n // Use nonce for verification\n wp_nonce_field( plugin_basename( __FILE__ ), 'am_trail_location_nonce' );\n\n // The actual fields for data entry\n echo '<p><label for=\"am_location_field\">';\n _e(\"Location:\", 'action_magnet' );\n echo '</label> ';\n echo '<input type=\"text\" id=\"am_location_field\" name=\"am_location_field\" value='.$location.' size=\"25\" /></p>';\n \n echo '<p><label for=\"am_distance_field\">';\n _e(\"Distance:\", 'action_magnet' );\n echo '</label> ';\n echo '<input type=\"text\" id=\"am_distance_field\" name=\"am_distance_field\" value='.$distance.' size=\"25\" /></p>';\n \n echo '<p><label for=\"am_difficulty_field\">';\n _e(\"Difficulty:\", 'action_magnet' );\n echo '</label> ';\n echo '<input type=\"text\" id=\"am_difficulty_field\" name=\"am_difficulty_field\" value='.$difficulty.' size=\"25\" /></p>';\n \n}", "title": "" }, { "docid": "9e27ada3b9c143069f1151aea20117f0", "score": "0.50757885", "text": "public function form( $instance ) {\n $title = ! empty( $instance['title'] ) ? $instance['title'] : '';\n $property_id = ! empty( $instance['property_id'] ) ? $instance['property_id'] : '';\n $latitude = ! empty( $instance['latitude'] ) ? $instance['latitude'] : '';\n $longitude = ! empty( $instance['longitude'] ) ? $instance['longitude'] : '';\n ?>\n <p><?php printf( __( 'Note, widget is using predefined options set on %sWalk Score Settings%s page. If you need to use custom settings, you should use %s shortcode instead.', ud_get_wpp_walkscore( 'domain' ) ), '<a href=\"' . admin_url( 'edit.php?post_type=property&page=walkscore' ) . '\">', '</a>', '<code>[property_walkscore_neighborhood]</code>' ); ?></p>\n <p><?php _e( 'To prevent view issues widget shows vertical layout.', ud_get_wpp_walkscore( 'domain' ) ); ?></p>\n <p>\n <label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e( 'Title <i>(optional)</i>:', ud_get_wpp_walkscore( 'domain' ) ); ?></label>\n <input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $title ); ?>\">\n </p>\n <p>\n <label for=\"<?php echo $this->get_field_id( 'property_id' ); ?>\"><?php _e( 'Property ID <i>(required, if it\\'s used on non-property page)</i>:' ); ?></label>\n <input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'property_id' ); ?>\" name=\"<?php echo $this->get_field_name( 'property_id' ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $property_id ); ?>\">\n </p>\n <p>\n <p>\n <label for=\"<?php echo $this->get_field_id( 'latitude' ); ?>\"><?php _e( 'Custom Latitude <i>(optional.)</i>:' ); ?></label>\n <input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'latitude' ); ?>\" name=\"<?php echo $this->get_field_name( 'latitude' ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $latitude ); ?>\">\n </p>\n <p>\n <label for=\"<?php echo $this->get_field_id( 'longitude' ); ?>\"><?php _e( 'Custom Longitude <i>(optional)</i>:' ); ?></label>\n <input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'longitude' ); ?>\" name=\"<?php echo $this->get_field_name( 'longitude' ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $longitude ); ?>\">\n </p>\n <?php\n }", "title": "" }, { "docid": "dd2cbff094cc29921590d0e3a7525478", "score": "0.5056086", "text": "function wooc_extra_register_fields() {?>\n <!-- <p class=\"form-row form-row-wide\">\n <label for=\"reg_billing_phone\"><?php _e( 'Phone', 'woocommerce' ); ?></label>\n <input type=\"text\" class=\"input-text\" name=\"billing_phone\" id=\"reg_billing_phone\" value=\"<?php esc_attr_e( $_POST['billing_phone'] ); ?>\" />\n </p> -->\n <p class=\"form-row form-row-first\">\n <label for=\"reg_billing_first_name\"><?php _e( 'First name', 'woocommerce' ); ?><span class=\"required\">*</span></label>\n <input type=\"text\" class=\"input-text\" name=\"billing_first_name\" id=\"reg_billing_first_name\" value=\"<?php if ( ! empty( $_POST['billing_first_name'] ) ) esc_attr_e( $_POST['billing_first_name'] ); ?>\" />\n </p>\n <p class=\"form-row form-row-last\">\n <label for=\"reg_billing_last_name\"><?php _e( 'Last name', 'woocommerce' ); ?><span class=\"required\">*</span></label>\n <input type=\"text\" class=\"input-text\" name=\"billing_last_name\" id=\"reg_billing_last_name\" value=\"<?php if ( ! empty( $_POST['billing_last_name'] ) ) esc_attr_e( $_POST['billing_last_name'] ); ?>\" />\n </p>\n <p class=\"form-row form-row-wide\">\n <label for=\"reg_billing_tipo_documento\"><?php _e( 'Tipo de documento', 'woocommerce' ); ?><span class=\"required\">*</span></label>\n <select type=\"number\" class=\"input-text\" name=\"billing_tipo_documento\" id=\"reg_billing_tipo_documento\">\n <option></option>\n <option value=\"C.C.\">C.C.</option>\n <option value=\"C.E.\">C.E.</option>\n <option value=\"Pasaporte\">Pasaporte</option>\n </select>\n </p>\n <p class=\"form-row form-row-wide\">\n <label for=\"reg_billing_numero_documento\"><?php _e( 'Numero de documento', 'woocommerce' ); ?><span class=\"required\">*</span></label>\n <input type=\"number\" class=\"input-text\" name=\"billing_numero_documento\" id=\"reg_billing_numero_documento\" value=\"<?php esc_attr_e( $_POST['billing_numero_documento'] ); ?>\" />\n </p>\n <div class=\"clear\"></div>\n <?php\n }", "title": "" }, { "docid": "008adca088013d45c9d4c34a906204f1", "score": "0.5051613", "text": "function user_search_form() {\n\n\t/* \n\t\tGet the language fields (prepare a dropdown for this)\n\t\tAlthough it's probably better to cross reference languages\n\t\twith users.\n\n\t\tWe do that as well. So this call is depricated at the moment\n\t*/\n\n\tglobal $wpdb;\n\n\t$lang_src = GFAPI::get_form(1);\n\t$language_array = $lang_src['fields'][9]['choices'];\n\n\n\t// Get the county fields (This is from all activated users)\n\t// ------------------\n\n\t$all_user_query = new WP_User_Query( array('meta_key' => 'main_county', \n\t\t\t\t\t\t\t\t\t\t\t\t'meta_value' => '' , \n\t\t\t\t\t\t\t\t\t\t\t\t'fields' => 'all' ) ); \n\t$all_users = $all_user_query->get_results(); \n\n\t/*\n\t\tSet up a data object for each user \n\t\tJust return the required fields we need for the search\n\n\t\tWe can then parse this to set up our search dropdowns with\n\t\tlanguage presets that already exist, rather than having too many \n\t\tnot found results.\n\t*/\n\n\tforeach($all_users as $user):\n\t\t\n\t\t$user_id = $user->ID;\n\t\t$first_name = $user->first_name;\n\t\t$last_name = $user->last_name;\n\t\t$county = $user->main_county;\n\t\t$city = $user->main_city;\n\t\t$postcode = $user->main_post_code;\n\t\t$language_list[] = $user->languages_spoken;\n\n\t\t// Get the language list based on all current users.\n\t\t// ------------------\n\n\t\tforeach($language_list as $lang):\n\t\t\t\n\t\t\t$lang_string = $lang;\n\t\n\t\t\t// Do some string manipulation - WP adds the countries in an odd string format.\n\t\t\t// ------------------\n\n\t\t\t$lang_string = str_replace('[\"', '', $lang_string);\n\t\t\t$lang_string = str_replace('\"', '', $lang_string);\n\t\t\t$lang_string = str_replace(']', '', $lang_string);\n\t\t\t$lang_explode[] = explode(',', $lang_string);\n\t\t\t\n\t\t\tforeach($lang_explode as $langs):\n\t\t\t\t$lang_output = $langs;\n\t\t\tendforeach;\n\n\t\t\t$language_list = array_unique($lang_output);\n\t\t\t\n\t\tendforeach;\n\t\n\t\t// Create an array with the user id as key\n\t\t// ------------------\n\n\t\t$user_output[] = array(\n\t\t\t'user_id' => $user_id,\n\t\t\t'url' => get_author_posts_url($user_id),\n\t\t\t'name' => $first_name . \" \" . $last_name,\n\t\t\t'city' => $city,\n\t\t\t'county' => $county,\n\t\t\t'postcode' => $postcode,\n\t\t\t'languages' => $language_list\n\t\t);\n\t\t\n\tendforeach;\n\n\t// Do the form\n\t// Create the languages dropdown data\n\t// ------------------\n\n\tforeach($user_output as $lang_output) :\n\t\t$languages[] = $lang_output['languages'];\n\tendforeach;\n\n\t$languages = array_merge(...$languages);\n\t$languages = array_unique($languages);\n\n\t$metavalue = $metakey = '';\n\n\t// Not currently used\n\t// ------------------\n\n\t// foreach($user_output as $city_output):\n\t// \t$cities[] = $city_output['city'];\n\t// endforeach;\n\n\t// foreach($user_output as $county_output):\n\t// \t$counties[] = $county_output['county'];\n\t// endforeach;\n\n\t// ------------------\n\n\tif (isset($_GET['search_by'])) :\n\t\t$metakey = $_GET['search_by'];\n\tendif;\n\n\tif (isset($_GET['postcode_value'])) :\n\t\t$metavalue_postcode = $_GET['postcode_value'];\n\tendif;\n\n\tif (isset($_GET['lang_value'])) :\n\t\t$metavalue_lang = $_GET['lang_value'];\n\tendif;\n\n\t// Not currently used\n\t// ------------------\n\n\t// if (isset($_GET['city_value'])) :\n\t// \t$metavalue_city = $_GET['city_value'];\n\t// endif;\n\n\t// if (isset($_GET['county_value'])) :\n\t// \t$metavalue_county= $_GET['county_value'];\n\t// endif;\n\n\t// ------------------\n\n\t// Do the form itself\n\t// ------------------\n\n\t$re = '\n\t\t<div class=\"fs_user_search\">\n\t\t\t<h2><i class=\"fa fa-search\"></i> Find an interpreter</h2>\n\t\t\t<form action=\"\" name=\"user_s\" method=\"get\">\n\t\t\t\t<div class=\"form-group\">\n\n\t\t\t\t\t<label for=\"lang_value\">By Language:</label>\n\t\t\t\t\t\t<select id=\"lang_value\" name=\"lang_value\" class=\"form-control\">';\n\t\t\t\t\t\t\t$re .= '<option value=\"\">Please select a language</option>';\n\t\t\t\t\t\t\t\tforeach($languages as $langs):\n\t\t\t\t\t\t\t\t\t$re .= ($metavalue_lang == $langs) ? '<option value=\"' . $langs . '\" selected=\"selected\">' . $langs . '</option>': '<option value=\"' . $langs . '\">' . $langs . '</option>';\n\t\t\t\t\t\t\t\tendforeach;\n\t\t\t\t\t\t\t$re .= '</select>\n\n\t\t\t\t\t<label for=\"s_value\">By Postcode:</label>\n\n\t\t\t\t\t\t<input id=\"postcode_value\" name=\"postcode_value\" type=\"text\" value=\"' . $metavalue_postcode . '\" class=\"form-control\"/>\n\t\t\t\t\t\t<input name=\"user_search\" id=\"user_search\" type=\"hidden\" value=\"search_users\"/>\n\t\t\t\t\t\t<input id=\"submit\" type=\"submit\" value=\"Search\" class=\"search-btn btn btn-default \"/>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</div>';\n\treturn $re;\n\n}", "title": "" }, { "docid": "423af99242ccbd5d08dc4303fea0c00f", "score": "0.504537", "text": "public function form( $instance ) {\n\t\t// outputs the options form on admin\n\t\t$title \t= esc_attr( $instance['title'] );\n $apiKey \t = esc_attr( $instance['apiKey'] );\n \t$lat \t = esc_attr( $instance['lat'] );\n \t$lng \t = esc_attr( $instance['lng'] );\n $marker \t = esc_attr( $instance['marker'] );\n\n $mapTypeId = $instance['mapTypeId'] ? esc_attr($instance['mapTypeId']): 'roadmap';;\n echo $marker;\n \t?>\n \t<p>\n <label for=\"<?php echo $this->get_field_id('title'); ?>\"><?php _e('Title:'); ?></label>\n <input class=\"widefat\" id=\"<?php echo $this->get_field_id('title'); ?>\" name=\"<?php echo $this->get_field_name('title'); ?>\" type=\"text\" value=\"<?php echo $title; ?>\" />\n\t </p>\n\t <p>\n\t <label for=\"<?php echo $this->get_field_id('apiKey'); ?>\"><?php _e('API Key'); ?></label>\n\t <input class=\"widefat\" id=\"<?php echo $this->get_field_id('apiKey'); ?>\" name=\"<?php echo $this->get_field_name('apiKey'); ?>\" type=\"text\" value=\"<?php echo $apiKey; ?>\"/>\n\t </p>\n <p>\n\t <label for=\"<?php echo $this->get_field_id('lat'); ?>\"><?php _e('Latitude'); ?></label>\n\t <input class=\"widefat\" id=\"<?php echo $this->get_field_id('lat'); ?>\" name=\"<?php echo $this->get_field_name('lat'); ?>\" type=\"text\" value=\"<?php echo $lat; ?>\"/>\n\t </p>\n <p>\n\t <label for=\"<?php echo $this->get_field_id('lng'); ?>\"><?php _e('Longitude'); ?></label>\n\t <input class=\"widefat\" id=\"<?php echo $this->get_field_id('lng'); ?>\" name=\"<?php echo $this->get_field_name('lng'); ?>\" type=\"text\" value=\"<?php echo $lng; ?>\"/>\n\t </p>\n <p>\n <input class=\"checkbox\" type=\"checkbox\" <?php checked( $instance[ 'marker' ], '1' ); ?> id=\"<?php echo $this->get_field_id( 'marker' ); ?>\" name=\"<?php echo $this->get_field_name( 'marker' ); ?>\" value=\"1\" />\n <label for=\"<?php echo $this->get_field_id( 'marker' ); ?>\">Marker Show</label>\n </p>\n\n\n <p>\n <label for=\"<?php echo $this->get_field_id('type'); ?>\">\n <?php _e('Choose posts list type:', 'fabulous'); ?>\n </label>\n <select name=\"<?php echo $this->get_field_name('mapTypeId'); ?>\" id=\"<?php echo $this->get_field_id('mapTypeId'); ?>\" class=\"widefat\">\n <?php\n $mapTypeIds = array (\n 'hybrid'=>'HYBRID',\n 'roadmap'=>'ROADMAP',\n 'satellite'=>'SATELLITE',\n 'terrain'=>'TERRAIN'\n );\n foreach ($mapTypeIds as $key => $option) {\n echo '<option value=\"' . $key . '\" id=\"' . $key . '\"', $mapTypeId == $key ? ' selected=\"selected\"' : '', '>', $option, '</option>';\n }?>\n </select>\n </p>\n\n\n\t <?php\n\t}", "title": "" }, { "docid": "cd11188d7eb0e6c456567912fba0506e", "score": "0.5039624", "text": "function get_google_font_fields( $instance ) {\r\n\t\treturn apply_filters( 'siteorigin_widgets_google_font_fields_' . $this->id_base, array(), $instance, $this );\r\n\t}", "title": "" }, { "docid": "ed507112b5ab7c5412db52ff74dbcc7f", "score": "0.5029709", "text": "function google_api_acf_init() {\n\n\tacf_update_setting( 'google_api_key', get_field('google_maps','apikey') );\n}", "title": "" }, { "docid": "cf812426bb2b231c87719e1a9f801d32", "score": "0.5012979", "text": "function simple_gmap_preprocess_eck_entity(&$variables) {\n\n $entity_type = 'location';\n $bundle = 'physical';\n $form_mode = 'default';\n $field_name = 'field_google_map';\n\n // get field definition\n //$bundle_fields = \\Drupal::getContainer()->get('entity_field.manager')->getFieldDefinitions($entity_type, $bundle);\n //$field_definition = $bundle_fields['field_google_map'];\n\n // get field storage configuration\n //$field_setting = \\Drupal\\field\\Entity\\FieldStorageConfig::loadByName($entity_type, 'field_google_map');\n\n $settings = \\Drupal::service('entity_type.manager')\n\t->getStorage('entity_view_display')\n\t->load($entity_type . '.' . $bundle . '.' . $form_mode)\n\t->getRenderer($field_name)\n\t->getSettings();\n\n // add field_google_map settings for templating. By default, if the field has no value, the field object in content is null.\n $variables['content']['field_google_map'][0] = array(\n\t\"#theme\" => \"simple_gmap_output\",\n\t\"#include_map\" => $settings['include_map'],\n\t\"#include_static_map\" => $settings['include_static_map'],\n\t\"#include_link\" => $settings['include_link'],\n\t\"#include_text\" => $settings['include_text'],\n\t\"#width\" => array(\"#plain_text\" => $settings['iframe_width']),\n\t\"#height\" => array(\"#plain_text\" =>$settings['iframe_height']),\n\t\"#static_scale\" => $settings['static_scale'],\n\t\"#url_suffix\" => \"1231 stevenson\", // give it a default value\n\t\"#zoom\" => $settings['zoom_level'],\n\t\"#link_text\" => array(\"#plain_text\" => $settings['link_text']),\n\t\"#map_type\" => $settings['map_type'],\n\t\"#apikey\" => $settings['apikey']\n );\n\n}", "title": "" }, { "docid": "bbc8329bd20514a15d1ab28b8e2b97e1", "score": "0.50114334", "text": "function custom_postcode_search($atts = null){\n\n\t$out = user_search_form();\n\n\tif (isset($_GET['user_search']) && $_GET['user_search'] == \"search_users\"):\n\n\t\tglobal $wpdb;\n\n\t\t// Get information from the form.\n\t\t// ------------------\n\n\t\t$metakey = $_GET['search_by'];\n\t\t$language_key = $_GET['lang_value'];\n\t\t$city_key = $_GET['city_value'];\n\t\t$county_key = $_GET['county_value'];\n\t\t$postcode_key = $_GET['postcode_value'];\n\n\t\t/* \n\t\t\tGet Geolocation from ip\n\t\t*/ \n\n\t\t// Get user ip\n\t\t// ------------------\n\n\t\t$ip = $_SERVER['HTTP_CLIENT_IP']? $_SERVER['HTTP_CLIENT_IP'] : ($_SERVER['HTTP_X_FORWARDE‌​D_FOR'] ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']);\n\n\t\t// Work out location information based on the user's ip address.\n\t\t// ------------------\n\t\t\n\t\t$ips = new ipsWrapper(); \n\t\t$ips->setEndPoint('api'); \n\t\t$ips->ipnum = $ip; \n\t\t$ips->getResponse(); \n\t\t$ip_num = $ips->ipnum;\n\t\t$ip_phone = $ips->response->country_name;\n\t\t$ip_region = $ips->response->region_name;\n\t\t$ip_city = $ips->response->city;\n\t\t$ip_zip = $ips->response->zip;\n\n\t\t$ips->resetParams(); \n\t\t$ips->setEndPoint('check'); \n\t\t$ips->setParam('fields','main'); \n\t\t$ips->getResponse(); \n\n\t\t$originating_ip = $ips->response->ip;\n\n\t\t$pc = $ips->response->zip;\n\n\t\t// Do the search\n\t\t// ------------------\n\n\t\t$args = array(\n\t\t\t'meta_query' => array(\n\t\t\t\t'relation' => 'AND',\n\t\t\t\n\t\t\t\tarray (\n\t\t\t\t\t'key' => 'main_post_code',\n\t\t\t\t\t'value' => $postcode_key,\n\t\t\t\t\t'compare' => 'LIKE'\n\t\t\t\t),\n\t\t\t\tarray (\n\t\t\t\t\t'key' => 'languages_spoken',\n\t\t\t\t\t'value' => $language_key,\n\t\t\t\t\t'compare' => 'LIKE'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t$user_query = new WP_User_Query($args ); \n\n\t\t$users = $user_query->get_results(); \n\n\t\t$out .= '<div class=\"search-results\">';\n\t\t$out .= '<hr/>';\n\n\t\tif($users && $language_key != \"\"):\n\t\t\tforeach($users as $user):\n\n\t\t\t\t// Get meta information from the database array\n\t\t\t\t// ------------------\n\n\t\t\t\t$first_name = $user->first_name;\n\t\t\t\t$last_name = $user->last_name;\n\t\t\t\t$city = $user->main_city;\n\t\t\t\t$post_code = $user->main_post_code;\n\t\t\t\t$miles_to_travel = $user->miles_prepared_to_travel;\n\n\t\t\t\t$result = array();\n\n\t\t\t\t// Calculate the postcode distances\n\t\t\t\t// This uses postcode.io.class.php \n\t\t\t\t// ------------------\n\n\t\t\t\t$postcode = new Postcode();\n\t\t\t\t$distance = $postcode->distance($pc, $post_code, \"M\");\n\n\t\t\t\t$distance = round($distance);\n\n\t\t\t\t// Calculate if this user will travel that far based on their options.\n\t\t\t\t// ------------------\n\n\t\t\t\tif($miles_to_travel > $distance):\n\t\t\t\t\t$addition = $distance . ' miles.';\n\t\t\t\telse:\n\t\t\t\t\t$addition = '<span style=\"color:red\"><i class=\"fas fa-exclamation-circle\"></i> ' . $distance . ' miles.</span><br><span class=\"tiny\">This member has specified that they will only travel ' . $miles_to_travel . ' miles from their location.</span>';\n\t\t\t\tendif;\n\n\t\t\t\t// Get the author url\n\t\t\t\t// ------------------\n\n\t\t\t\t$url = get_author_posts_url($user->ID);\n\n\t\t\t\t// do some string manipulation on the languages spoken from the database\n\t\t\t\t// ------------------\n\n\t\t\t\t$lang_string = $user->languages_spoken;\n\n\t\t\t\t$lang_string = str_replace('[\"', '', $lang_string);\n\t\t\t\t$lang_string = str_replace('\"', '', $lang_string);\n\t\t\t\t$lang_string = str_replace(']', '', $lang_string);\n\t\t\t\t$lang_string = str_replace(',', ', ', $lang_string);\n\n\t\t\t\t$lang_string = str_replace($language_key, \"<strong>\" . $language_key . \"</strong>\", $lang_string);\n\n\t\t\t\t$out .= '<div class=\"result\">';\n\t\t\t\t$out .= '<h3><a href=\"' . $url . '\">' . $first_name . ' ' . $last_name . '</a></h3>';\n\t\t\t\t$out .= '<p><strong>Town/City: </strong>' . $city . '</p>';\n\t\t\t\t$out .= '<p><strong>Languages spoken: </strong>' . $lang_string . '</p>';\n\t\t\t\t$out .= '<p><strong>Distance from you: </strong>' . $addition . '</p>';\n\t\t\t\t$out .=\t'</div>';\n\t\t\t\t$out .= '<div class=\"address\">';\n\t\t\t\t$out .= '<a href=\"' . $url . '\" class=\"btn btn-default\">View more details</a>';\n\t\t\t\t$out .= '</div>';\n\t\t\t\t$out .= '<hr/>';\n\n\t\t\tendforeach;\n\t\telse:\n\t\t\t$out .= '<div class=\"result\">No results, please search again.</div>';\n\t\tendif;\n\n\telse: \n\t\t$out .= '<div class=\"result\">No results, please search again.</div>';\n\tendif;\n\treturn $out;\n}", "title": "" }, { "docid": "45a545392dd3b09ffd74768e80fcd960", "score": "0.50063103", "text": "function eventoni_add_searchform()\n{\n\t$options = get_option('eventoni_options');\n\n\t$input_width = 30;\n\tif( $options['placement'] == 'sidebar' ){\n\t\t$input_width = 100;\n\t}\n\t$ip = eventoni_get_visitor_ip();\n\t?>\n\n<div id=\"eventoni_container\" class=\"eventoni_shadow\">\n\n<div id=\"eventoni_container_normale_suche\">\n<div style=\"width: 90%; margin: 0 auto; text-align: center;\">\n<form id=\"eventoni_form\" action=\"#\" method=\"GET\">\n<input type=\"hidden\" name=\"eventoni_search\" value=\"1\" />\n<div style=\"width: <?php echo $input_width; ?>%; float: left; padding: 0; text-align: center; color: #C8D7B9;\">\n\tWas?<br />\n\t<input tabindex=11 style=\"width: 90%; margin: 0 auto;\" type=\"text\" id=\"eventoni_was\" name=\"was\" value=\"<?php echo get_query_var('was');?>\" />\n</div>\n<div style=\"width: <?php echo $input_width; ?>%; float: right; padding: 0; text-align: center; color: #C8D7B9;\">\n\tWann?<br />\n\t<input tabindex=13 style=\"width: 90%; margin: 0 auto;\" type=\"text\" id=\"eventoni_wann\" name=\"wann\" value=\"<?php echo get_query_var('wann');?>\" />\n</div>\n<div style=\"width: <?php echo $input_width; ?>%; margin-top: 10px; margin-left: auto; margin-right: auto; margin-top: 10px; padding: 0; text-align: center; color: #C8D7B9;\">\n\tWo?<br />\n\t<input tabindex=12 style=\"width: 90%; margin: 0 auto;\" type=\"text\" id=\"eventoni_wo\" name=\"wo\" value=\"<?php echo get_query_var('wo');?>\" />\n</div>\n<input tabindex=14 type=\"image\" style=\"margin-top: 10px;\"\n\tsrc=\"<?php echo get_bloginfo('wpurl'); ?>/wp-content/plugins/eventoni-events/img/search-button.png\"\n\tname=\"submit\" value=\"submit\">\n\t<input type=\"hidden\" name=\"eventoni_page\" id=\"eventoni_page\" value=\"1\" autocomplete=\"off\"/>\n\t<input type=\"hidden\" name=\"eventoni_subpage\" id=\"eventoni_subpage\" value=\"0\" autocomplete=\"off\"/>\n\t</form>\n</div>\n</div>\n\n\t<?php\n\n\tif( isset($options['geolocation'])){\n\t\techo '<div><a href=\"#\" id=\"eventoni_umkreissuche\" style=\"display:none\">Im Umkreis suchen (<span id=\"eventoni_umkreis\"></span>)</a></div>';\n\t}\n\n\techo '<div class=\"tsr\">';\n\tfor($z=1;$z<=5;$z++)\n\t{\n\t?>\n\t<div class=\"text font_0\">\n\t\t<div class=\"top5tsr big\" id=\"top5_<?php echo $z; ?>\">\n\t\t\t<div class=\"right\">\n\t\t\t\t<div class=\"teaserText\">\n\t\t\t\t\t<a href=\"#\" class=\"link image\">\n\t\t\t\t\t\t<img class=\"image\" src=\"\" align=\"left\">\n\t\t\t\t\t</a>\n\t\t\t\t\t<div class=\"headline\">\n\t\t\t\t\t\t<h3>\n\t\t\t\t\t\t\t<a href=\"#\" class=\"link font_46\"></a>\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t</div>\n\t\t\t\t\t<br clear=\"left\">\n\t\t\t\t\t<div class=\"texte font_43\">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style=\"float:right\">\n\t\t\t\t\t\t<a class=\"facebook_link\" href=\"#\" target=\"_blank\">\n\t\t\t\t\t\t\t<img src=\"<?php echo get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/img/facebook.png'; ?>\" />\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style=\"float:right\">\n\t\t\t\t\t\t<a class=\"twitter_link\" href=\"TODO\" target=\"_blank\">\n\t\t\t\t\t\t\t<img src=\"<?php echo get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/img/twitter.png'; ?>\" />\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<?php\n\n\t}\n\techo '</div>';\n\techo '<div id=\"eventoni_pagination\"><span id=\"eventoni_last\" style=\"float:left;display:none;\">zur&uuml;ck</span><span id=\"eventoni_next\" style=\"float:right\">vor</span></div><br/>';\n\techo '<div><a href=\"http://www.eventoni.de/event/add.html\">Event melden</a></div>';\n\tif( isset($options['show_map'])){\n\t\techo '<div id=\"eventoni_map\" style=\"width:100%; height:200px;\"></div>';\n\t}\n\techo '<div style=\"float:right\"><small style=\"color:#ffffff;font-size:10px;\">powered by</small> <a href=\"http://www.eventoni.de/\" title=\"Eventoni Startseite\"><img alt=\"Eventoni Veranstaltungen und Termine in Deiner Region\" src=\"'.get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/img/logo.png\" /></a></div>';\n\techo '</div>';\n}", "title": "" }, { "docid": "33c77ac2c31c6d665576f5f5bcb38f6c", "score": "0.49980673", "text": "function bt_office_postmeta_callback( $post ) {\n?>\n\t\n\t<fieldset>\n\t\t<!-- contact info: Address -->\n\t\t<p>\n\t\t\t<label for=\"bt_office_label\">\n\t\t\t\t<b><?php _e('Label', 'brightech'); ?></b>\n\t\t\t</label>\n\t\t</p>\n\t\t<p>\n\t\t\t<input \n\t\t\t\ttype=\"text\"\n\t\t\t\tname=\"bt_office_meta[bt_office_label]\" \n\t\t\t\tid=\"bt_office_label\" style=\"width:50%\"\n\t\t\t\tvalue=\"<?php echo get_post_meta($post->ID, 'bt_office_label', 1); ?>\" />\n\t\t</p>\n\n\t\t<!-- contact info: Coords -->\n\t\t<br>\n\t\t<hr>\n\t\t<p>\n\t\t\t<label for=\"bt_office_lat\">\n\t\t\t\t<b><?php _e('Coordinates', 'brightech'); ?></b>\n\t\t\t</label>\n\t\t</p>\n\t\t<table style=\"width:50%\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<td style=\"width: 50%\"><label for=\"bt_office_lat\">Latitude</label></td>\n\t\t\t\t\t<td style=\"width: 50%\"><label for=\"bt_office_lng\">Longitude</label></td>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input \n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tname=\"bt_office_meta[bt_office_lat]\" \n\t\t\t\t\t\t\tid=\"bt_office_lat\" style=\"width: 100%\"\n\t\t\t\t\t\t\tvalue=\"<?php echo get_post_meta($post->ID, 'bt_office_lat', 1); ?>\" />\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input \n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tname=\"bt_office_meta[bt_office_lng]\" \n\t\t\t\t\t\t\tid=\"bt_office_lng\" style=\"width: 100%\"\n\t\t\t\t\t\t\tvalue=\"<?php echo get_post_meta($post->ID, 'bt_office_lng', 1); ?>\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\n\n\t</fieldset>\n\n\t<input type=\"hidden\" name=\"bt_office_postmeta_nonce\" value=\"<?php echo wp_create_nonce(__FILE__); ?>\" />\n<?php \n}", "title": "" }, { "docid": "9f265f717b820943dad6fc7423911474", "score": "0.49927878", "text": "function tml_add_custom_fields($user){\nglobal $wpdb;\n$state_list = $wpdb->get_results($wpdb->prepare(\"SELECT state, abbreviation FROM states ORDER BY state_id\", OBJECT));\n$edit_user_id = $_GET['user_id'];\nif($edit_user_id > 0){\n\t$user_id = $edit_user_id;\n\t}else{\n $user_id = get_current_user_id();\n }\n $geographic_a = array(\"Urban\", \"Suburban\", \"Rural\", \"Remote\");\n $user_area = get_user_meta($user_id, 'geographic_area', true);\n $user_state = get_user_meta($user_id, 'state', true);\n $ks_school_district = get_user_meta($user_id, 'ks_school_district', true);\n $mo_school_district = get_user_meta($user_id, 'mo_school_district', true);\n $ga_school_district = get_user_meta($user_id, 'ga_school_district', true);\n $user_role = get_user_meta($user_id, 'transition_profile_role', true);\n \n foreach ($geographic_a as $geo){\n if($geo == $user_area){\n\t$geo_option .= \"<input type='radio' name='radio_area' value='\".$geo.\"' checked='checked'> \".$geo.\"<br>\";\n }else{\n\t$geo_option .= \"<input type='radio' name='radio_area' value='\".$geo.\"'> \".$geo.\"<br>\";\n\t}\n }\nforeach($state_list as $state){\n\tif( $user_state == $state->abbreviation){\n\t\t$state_list_str .= \"<option value='\".$state->abbreviation.\"' selected>\".$state->state.\"</option>\";\n\t}else{\n\t$state_list_str .= \"<option value='\".$state->abbreviation.\"'>\".$state->state.\"</option>\";\n\t}\n}\n$mo_school_district_list = $wpdb->get_results($wpdb->prepare(\"SELECT name FROM school_districts where state = 'MO' ORDER BY name\", OBJECT));\n\nforeach($mo_school_district_list as $mo_district){\n\tif($mo_school_district == $mo_district->name){\n\t\t$mo_district_str .= \"<option value='\".$mo_district->name.\"' selected>\".$mo_district->name.\"</option>\";\n\t}else{\n\t\t$mo_district_str .= \"<option value='\".$mo_district->name.\"'>\".$mo_district->name.\"</option>\";\n\t}\n}\n$ks_school_district_list = $wpdb->get_results($wpdb->prepare(\"SELECT name FROM `school_districts` where state = 'KS' ORDER BY name\", OBJECT));\n\nforeach($ks_school_district_list as $ks_district){\nif( $ks_school_district == $ks_district->name){\n\t$ks_district_str .= \"<option value='\".$ks_district->name.\"' selected >\".$ks_district->name.\"</option>\";\n\t}else{\n\t$ks_district_str .= \"<option value='\".$ks_district->name.\"' >\".$ks_district->name.\"</option>\";\n\t}\n}\n$ga_school_district_list = $wpdb->get_results($wpdb->prepare(\"SELECT name FROM `school_districts` where state = 'GA' ORDER BY name\", OBJECT));\nforeach($ga_school_district_list as $ga_district){\nif($ga_school_district == $ga_district->name){\n\t$ga_district_str .= \"<option value='\".$ga_district->name.\"' selected >\".$ga_district->name.\"</option>\";\n}else{\n\t$ga_district_str .= \"<option value='\".$ga_district->name.\"'>\".$ga_district->name.\"</option>\";\n}\n}\n$tc_roles = array(\"State Ed. Agency Rep.\", \"General Ed. Teacher\", \"Special Ed. Teacher\", \"Vocational/Transition Coordinator\", \"School Administrator\", \"School Related Services\", \n\t\t\t\t\t\"State VR Agency Rep.\", \"Local VR Agency Rep.\", \"Technical Assistance Provider\", \"Center for Independent Living Rep.\", \"Other Community Agency Rep.\", \"Parent/Guardian\",\n\t\t\t\t\t\"Youth with a Disability\", \"College/University Student\", \"College/University Faculty/Instructor\", \"Other State Agency Rep.\", \"Other\");\nforeach ($tc_roles as $tc_role){\n\tif($user_role == $tc_role){\n\t\t$role_options .= \"<option value='\".$tc_role.\"' selected>\".$tc_role.\"</option>\";\n\t}else{\n\t$role_options .= \"<option value='\".$tc_role.\"'>\".$tc_role.\"</option>\";\n\t}\n}\n?>\n<h3><?php _e(\"Extra profile information\", \"blank\"); ?></h3>\n<table class=\"form-table\">\n<tr>\n<th><label class=\"tc_role\" for=\"role\">Role:</label></th>\n\t<td><select name=\"tc_role\" id=\"tc_role\" tabindex=\"2\">\n\t\t\t<option value=\"\">Please Select</option>\n\t\t\t<?php echo $role_options ?>\n </select> \n\t</td>\n\t</tr>\n\t<tr>\n\t<th>\n\t<label class=\"user_state_register\" for=\"user_state\">State: </label></th>\n\t<td>\n\t<select name=\"user_select_state\" id=\"user_select_state\" tabindex=\"2\">\n\t\t\t<option value=\"\">Please Select</option>\n\t\t\t<?php echo $state_list_str ?>\n </select> \n\t\t\t\t\t\t </td></tr>\n\t<tr>\n\t<th>\n\t<label class=\"mo-school-district\" for=\"mo-school-district\">\n Missouri School District </label></th>\n\t<td><select name=\"mo_school_district\" id=\"mo-school-district\" class=\"mo-school-district\" tabindex=\"2\">\n\t\t<option value=\"\">Please Select</option>\n <?php echo $mo_district_str;?>\n </select> \n\t</td>\n\t</tr>\n\t<tr>\n\t<th>\n\t<label class=\"ks-school-district\" for=\"ks-school-district\">\n Kansas School District </label></th>\n\t<td><select name=\"ks_school_district\" id=\"ks-school-district\" class=\"ks-school-district\" tabindex=\"2\">\n\t\t <option value=\"\">Please Select</option>\n <?php echo $ks_district_str;?>\n </select> \n\t\t\t\t</td></tr>\n\t<tr>\n\t<th>\n\t<label class=\"ga-school-district\" for=\"ga-school-district\">\n Georgia School District</label></th>\n\t<td>\n\t<select name=\"ga_school_district\" id=\"ga-school-district\" class=\"ga-school-district\" tabindex=\"2\">\n\t\t<option value=\"\">Please Select</option>\n <?php echo $ga_district_str;?>\n </select> \n\t</td></tr>\n\t</table>\n<?php\n\n}", "title": "" }, { "docid": "12c24bbb8290ddc9db5cb4f6d65159fc", "score": "0.49840692", "text": "function cp_add_core_fields($form_id) {\r\n\tglobal $wpdb;\r\n\r\n // check to see if any rows already exist for this form. If so, don't insert any data\r\n $wpdb->get_results( $wpdb->prepare( \"SELECT form_id FROM \" . $wpdb->prefix . \"cp_ad_meta WHERE form_id = %s\", $form_id ) );\r\n\r\n // no fields yet so let's add the defaults\r\n if ( $wpdb->num_rows == 0 ) {\r\n\r\n $insert = \"INSERT INTO \" . $wpdb->prefix . \"cp_ad_meta\" .\r\n \" (form_id, field_id, field_req, field_pos) \" .\r\n \"VALUES ('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('1'). \"','\" // post_title\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('1')\r\n . \"'),\"\r\n . \"('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('2'). \"','\" // cp_price\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('2')\r\n . \"'),\"\r\n . \"('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('3'). \"','\" // cp_street\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('3')\r\n . \"'),\"\r\n . \"('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('4'). \"','\" // cp_city\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('4')\r\n . \"'),\"\r\n . \"('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('5'). \"','\" // cp_state\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('5')\r\n . \"'),\"\r\n . \"('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('6'). \"','\" // cp_country\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('6')\r\n . \"'),\"\r\n . \"('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('7'). \"','\" // cp_zipcode\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('7')\r\n . \"'),\"\r\n . \"('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('8'). \"','\" // tags_input\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('8')\r\n . \"'),\"\r\n . \"('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('9'). \"','\" // post_content\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('9')\r\n . \"')\";\r\n\r\n $results = $wpdb->query( $insert );\r\n\r\n }\r\n}", "title": "" }, { "docid": "1f8025914a75a300889d7cefbad56d5d", "score": "0.4978181", "text": "function elijah_places_input( $taxonomy, $post_id) {\n\t$terms = elijah_prepare_country_term_taxonomies(\n\t\twp_get_object_terms( \n\t\t\t$post_id,\n\t\t\t$taxonomy->name,\n\t\t\tarray(\n\t\t\t\t'fields' => 'all',\n\t\t\t) \n\t\t)\n\t);\n\tinclude( elijah_templates_dir . '/places-taxonomy-input.php');\n}", "title": "" }, { "docid": "2289f0548cb46c17d3deda4a6871b5c9", "score": "0.49771494", "text": "function registerFields(){\n acf_add_local_field_group( array (\n 'key' => 'group_page_details',\n 'title' => 'Page Details',\n 'location' => array (\n array (\n array (\n 'param' => 'post_type',\n 'operator' => '==',\n 'value' => 'page',\n ),\n array (\n 'param' => 'page_type',\n 'operator' => '!=',\n 'value' => 'front_page',\n )\n ),\n ),\n 'menu_order' => 0,\n 'position' => 'normal',\n 'style' => 'default',\n 'label_placement' => 'top',\n 'instruction_placement' => 'label',\n 'hide_on_screen' => '',\n ) );\n\n // Image\n acf_add_local_field( array(\n 'key' => 'header_image',\n 'label' => 'Header Image',\n 'name' => 'header_image',\n 'type' => 'image',\n 'parent' => 'group_page_details',\n 'instructions' => '',\n 'required' => 0,\n 'return_format' => 'array',\n 'preview_size' => 'large',\n 'library' => 'all',\n 'min_width' => 0,\n 'min_height' => 0,\n 'max_width' => 0,\n 'max_height' => 0,\n ) );\n\n // Headline\n acf_add_local_field( array(\n 'key' => 'headline',\n 'label' => 'Headline',\n 'name' => 'headline',\n 'type' => 'text',\n 'parent' => 'group_page_details',\n 'instructions' => '',\n 'required' => 0,\n ) );\n\n register_field_group(array (\n\t\t'id' => 'acf_foreclosure',\n\t\t'title' => 'Foreclosure',\n\t\t'fields' => array (\n\t\t\tarray (\n\t\t\t\t'key' => 'field_54762d77545e5',\n\t\t\t\t'label' => 'Date',\n\t\t\t\t'name' => 'date',\n\t\t\t\t'type' => 'date_picker',\n\t\t\t\t'required' => 1,\n\t\t\t\t'display_format'\t=> 'm/d/Y',\n\t\t\t 'return_format'\t\t=> 'm/d/Y',\n\t\t\t\t'first_day' => 0,\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_547631e5a5ad9',\n\t\t\t\t'label' => 'Case #',\n\t\t\t\t'name' => 'case_#',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'required' => 1,\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '',\n\t\t\t\t'append' => '',\n\t\t\t\t'formatting' => 'none',\n\t\t\t\t'maxlength' => '',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_54763208a5ada',\n\t\t\t\t'label' => 'Plaintiff',\n\t\t\t\t'name' => 'plaintiff',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'required' => 1,\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '',\n\t\t\t\t'append' => '',\n\t\t\t\t'formatting' => 'none',\n\t\t\t\t'maxlength' => '',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_54763226a5adb',\n\t\t\t\t'label' => 'Defendant',\n\t\t\t\t'name' => 'defendant',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'required' => 1,\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '',\n\t\t\t\t'append' => '',\n\t\t\t\t'formatting' => 'none',\n\t\t\t\t'maxlength' => '',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_54763244a5adc',\n\t\t\t\t'label' => 'F/J Amount',\n\t\t\t\t'name' => 'fj_amount',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'required' => 1,\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '$',\n\t\t\t\t'append' => '',\n\t\t\t\t'formatting' => 'none',\n\t\t\t\t'maxlength' => '',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_547632c8a5add',\n\t\t\t\t'label' => 'Book (for Lis Pendens link)',\n\t\t\t\t'name' => 'book',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'required' => 1,\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '',\n\t\t\t\t'append' => '',\n\t\t\t\t'formatting' => 'none',\n\t\t\t\t'maxlength' => '',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_54763379a5ade',\n\t\t\t\t'label' => 'Page (for Lis Pendens link)',\n\t\t\t\t'name' => 'page',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'required' => 1,\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '',\n\t\t\t\t'append' => '',\n\t\t\t\t'formatting' => 'none',\n\t\t\t\t'maxlength' => '',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'party_fname',\n\t\t\t\t'label' => 'Party First Name (for Lis Pendens link)',\n\t\t\t\t'name' => 'party_fname',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'required' => 0,\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '',\n\t\t\t\t'append' => '',\n\t\t\t\t'formatting' => 'none',\n\t\t\t\t'maxlength' => '',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'party_lname',\n\t\t\t\t'label' => 'Party Last Name (for Lis Pendens link)',\n\t\t\t\t'name' => 'party_lname',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'required' => 0,\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '',\n\t\t\t\t'append' => '',\n\t\t\t\t'formatting' => 'none',\n\t\t\t\t'maxlength' => '',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_548b3e4f430db',\n\t\t\t\t'label' => 'Status',\n\t\t\t\t'name' => 'status',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'instructions' => 'Select active, cancelled or unpublished',\n\t\t\t\t'required' => 1,\n\t\t\t\t'choices' => array (\n\t\t\t\t\t'active' => 'Active',\n\t\t\t\t\t'unpublished' => 'Unpublished',\n\t\t\t\t\t'cancelled' => 'Cancelled',\n\t\t\t\t),\n\t\t\t\t'default_value' => 'active',\n\t\t\t\t'allow_null' => 0,\n\t\t\t\t'multiple' => 0,\n\t\t\t),\n\t\t),\n\t\t'location' => array (\n\t\t\tarray (\n\t\t\t\tarray (\n\t\t\t\t\t'param' => 'post_type',\n\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t'value' => 'foreclosure',\n\t\t\t\t),\n\t\t\t),\n\t\t),\n\t\t'options' => array (\n\t\t\t'position' => 'acf_after_title',\n\t\t\t'layout' => 'no_box',\n\t\t\t'hide_on_screen' => array (\n\t\t\t\t0 => 'permalink',\n\t\t\t\t1 => 'the_content',\n\t\t\t\t2 => 'excerpt',\n\t\t\t\t3 => 'custom_fields',\n\t\t\t\t4 => 'discussion',\n\t\t\t\t5 => 'comments',\n\t\t\t\t6 => 'slug',\n\t\t\t\t7 => 'author',\n\t\t\t\t8 => 'format',\n\t\t\t\t9 => 'featured_image',\n\t\t\t\t10 => 'tags',\n\t\t\t\t11 => 'send-trackbacks',\n\t\t\t),\n\t\t),\n\t\t'menu_order' => 0,\n\t));\n\tregister_field_group(array (\n\t\t'id' => 'acf_tax-deed-sale',\n\t\t'title' => 'Tax Deed Sale',\n\t\t'fields' => array (\n\t\t\tarray (\n\t\t\t\t'key' => 'field_547657127682d',\n\t\t\t\t'label' => 'Date',\n\t\t\t\t'name' => 'date',\n\t\t\t\t'type' => 'date_picker',\n\t\t\t\t'required' => 1,\n\t\t\t\t'display_format'\t=> 'm/d/Y',\n\t\t\t 'return_format'\t\t=> 'Ymd',\n\t\t\t\t'first_day' => 0,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'field_5fa5565059fc4',\n\t\t\t\t'label' => 'Time of Auction',\n\t\t\t\t'name' => 'time_of_auction',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'instructions' => '',\n\t\t\t\t'required' => 1,\n\t\t\t\t'conditional_logic' => 0,\n\t\t\t\t'wrapper' => array(\n\t\t\t\t\t'width' => '',\n\t\t\t\t\t'class' => '',\n\t\t\t\t\t'id' => '',\n\t\t\t\t),\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '',\n\t\t\t\t'append' => 'AM EST',\n\t\t\t\t'maxlength' => 10,\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_547651a51c9ee',\n\t\t\t\t'label' => 'Case #',\n\t\t\t\t'name' => 'tax_deed',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'required' => 1,\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '',\n\t\t\t\t'append' => '',\n\t\t\t\t'formatting' => 'none',\n\t\t\t\t'maxlength' => '',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_5476518c1c9ed',\n\t\t\t\t'label' => 'Certificate #',\n\t\t\t\t'name' => 'tax_cert',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'required' => 1,\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '',\n\t\t\t\t'append' => '',\n\t\t\t\t'formatting' => 'none',\n\t\t\t\t'maxlength' => '',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_547651bd6c75c',\n\t\t\t\t'label' => 'Parcel ID',\n\t\t\t\t'name' => 'parcel',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'required' => 1,\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '',\n\t\t\t\t'append' => '',\n\t\t\t\t'formatting' => 'none',\n\t\t\t\t'maxlength' => '',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_58b46d6f7b7a7',\n\t\t\t\t'label' => 'Applicant',\n\t\t\t\t'name' => 'applicant',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '',\n\t\t\t\t'append' => '',\n\t\t\t\t'formatting' => 'html',\n\t\t\t\t'maxlength' => '',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_58b46dc74e371',\n\t\t\t\t'label' => 'Owner',\n\t\t\t\t'name' => 'owner',\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'maxlength' => '',\n\t\t\t\t'rows' => '',\n\t\t\t\t'formatting' => 'br',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_548b151cd2d8d',\n\t\t\t\t'label' => 'Status',\n\t\t\t\t'name' => 'status',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'instructions' => 'Select active, surplus, cancelled, redeemed, closed, rescheduled, or unpublished,',\n\t\t\t\t'required' => 1,\n\t\t\t\t'choices' => array (\n\t\t\t\t\t'active' => 'Active',\n\t\t\t\t\t'unpublished' => 'Unpublished',\n\t\t\t\t\t'cancelled' => 'Cancelled',\n\t\t\t\t\t'redeemed' => 'Redeemed',\n\t\t\t\t\t'surplus' => 'Surplus',\n\t\t\t\t\t'closed' => 'Closed',\n\t\t\t\t\t'rescheduled' => 'Rescheduled',\n\t\t\t\t),\n\t\t\t\t'default_value' => 'active',\n\t\t\t\t'allow_null' => 0,\n\t\t\t\t'multiple' => 0,\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_547652ec6c75e',\n\t\t\t\t'label' => 'Property Address',\n\t\t\t\t'name' => 'legal_description',\n\t\t\t\t'type' => 'wysiwyg',\n\t\t\t\t'default_value' => '',\n\t\t\t\t'toolbar' => 'basic',\n\t\t\t\t'media_upload' => 'no',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_547651d46c75d',\n\t\t\t\t'label' => 'Estimated Minimum Bid or Surplus',\n\t\t\t\t'name' => 'opening_bid',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '$',\n\t\t\t\t'append' => '',\n\t\t\t\t'formatting' => 'none',\n\t\t\t\t'maxlength' => '',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_58b46df44e372',\n\t\t\t\t'label' => 'Estimated Minimum Deposit',\n\t\t\t\t'name' => 'estimated_minimum_deposit',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '$',\n\t\t\t\t'append' => '',\n\t\t\t\t'formatting' => 'html',\n\t\t\t\t'maxlength' => '',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_58b46e024e373',\n\t\t\t\t'label' => 'High Bid',\n\t\t\t\t'name' => 'high_bid',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '$',\n\t\t\t\t'append' => '',\n\t\t\t\t'formatting' => 'html',\n\t\t\t\t'maxlength' => '',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_58b46e074e374',\n\t\t\t\t'label' => 'Surplus Funds',\n\t\t\t\t'name' => 'surplus_funds',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '$',\n\t\t\t\t'append' => '',\n\t\t\t\t'formatting' => 'html',\n\t\t\t\t'maxlength' => '',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_58b46e124e375',\n\t\t\t\t'label' => 'Lands Available',\n\t\t\t\t'name' => 'lands_available',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default_value' => '',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'prepend' => '',\n\t\t\t\t'append' => '',\n\t\t\t\t'formatting' => 'html',\n\t\t\t\t'maxlength' => '',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_58b473c369c1c',\n\t\t\t\t'label' => 'Owner & Encumbrance Reports',\n\t\t\t\t'name' => 'owner_&_encumbrance_reports',\n\t\t\t\t'type' => 'file',\n\t\t\t\t'save_format' => 'object',\n\t\t\t\t'library' => 'uploadedTo',\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'key' => 'field_58f67dff4779f',\n\t\t\t\t'label' => 'Claim Form',\n\t\t\t\t'name' => 'claim_form',\n\t\t\t\t'type' => 'file',\n\t\t\t\t'save_format' => 'object',\n\t\t\t\t'library' => 'uploadedTo',\n\t\t\t),\n\t\t),\n\t\t'location' => array (\n\t\t\tarray (\n\t\t\t\tarray (\n\t\t\t\t\t'param' => 'post_type',\n\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t'value' => 'tax-deed-sale',\n\t\t\t\t),\n\t\t\t),\n\t\t),\n\t\t'options' => array (\n\t\t\t'position' => 'acf_after_title',\n\t\t\t'layout' => 'no_box',\n\t\t\t'hide_on_screen' => array (\n\t\t\t\t0 => 'the_content',\n\t\t\t\t1 => 'revisions',\n\t\t\t\t2 => 'slug',\n\t\t\t\t3 => 'author',\n\t\t\t),\n\t\t),\n\t\t'menu_order' => 0,\n\t));\n}", "title": "" }, { "docid": "f34d8c7f670dee34c1b7238f43d5d45a", "score": "0.49749044", "text": "function wp_scgcge_InputLine($type = 'text', $name, $value = '', $readonly = '', $required = '', $placeholder = '', $class = '', $id = '', $fv = '', $title = '')\n{\n $readonly = $readonly != '' ? 'readonly' : '';\n $required = $required != '' ? 'required' : '';\n $fv = $fv != '' ? 'fv=\"' . $fv . '\"' : '';\n return '<div class=\"form-group row\"><label for=\"' . $name . '\" class=\"col-sm-2 col-form-label\"> ' . $title . '</label><div class=\"col-sm-10\"><input type=\"' . $type . '\" value=\"' . $value . '\" ' . $required . ' name=\"' . $name . '\" class=\"form-control ' . $class . '\" id=\"' . $name . ' ' . $id . '\" aria-describedby=\"' . $name . 'Help\" placeholder=\"' . __($placeholder, 'scgcge') . '\" ' . $readonly . ' ' . $fv . '></div></div>';\n}", "title": "" }, { "docid": "ae51ba5da38a5196624cfe73827daf35", "score": "0.4973493", "text": "function save_lat_lng($post_ID)\n {\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n return;\n\n //sanitize user input\n $lat = sanitize_text_field( $_POST['_address_lat'] );\n $lng = sanitize_text_field( $_POST['_address_lng'] );\n\n // either using \n update_post_meta($post_ID, '_address_lat', $lat);\n update_post_meta($post_ID, '_address_lng', $lng);\n }", "title": "" }, { "docid": "cdfc6d860d3b4d65a0bad99a0f9fff22", "score": "0.49730524", "text": "function minim_add_google_form_elements(&$vars) {\n $google_form = array(\n '#attached' => array(\n 'js' => array(\n '//docs.google.com/static/forms/client/js/1232204844-formviewer_prd.js' => array('type' => 'external'),\n drupal_get_path('theme', 'minim') . '/js/google/h5f.min.js',\n 1 => array(\n 'data' => 'H5F.setup(document.getElementById(\\'ss-form\\'));_initFormViewer(\"[100,\\x22#CCC\\x22,[[[1739364875,[[2,102,,\\x22\\x22]\\n]\\n]\\n]\\n]\\n]\\n\");', \n 'type' => 'inline',\n 'scope' => 'footer',\n ), \n ),\n 'css' => array(\n '//docs.google.com/static/forms/client/css/212514800-mobile_formview_ltr.css' => array('type' => 'external'),\n drupal_get_path('theme', 'minim') . '/css/google-form.css',\n ),\n ),\n );\n drupal_render($google_form);\n}", "title": "" }, { "docid": "c4ec5c7bed958fc03dc8e3f991f77883", "score": "0.49659872", "text": "function fieldCek()\n {\n $f = array(\n 'idpotongantype'=>'idpotongantype' \n );\n return $f;\n }", "title": "" }, { "docid": "b7daba0a3476c0f1cdfff9932e53f77a", "score": "0.49572146", "text": "protected function getGenemu_Form_Jquery_Type_GeolocationService()\n {\n return $this->services['genemu.form.jquery.type.geolocation'] = new \\Genemu\\Bundle\\FormBundle\\Form\\JQuery\\Type\\GeolocationType();\n }", "title": "" }, { "docid": "fcfd35a2bb232c81eabd2c67d7c4f3a7", "score": "0.49536872", "text": "function create_locations()\r\n{\r\n if( function_exists('register_field_group') ):\r\n\r\n register_post_type('location', // Register Custom Post Type (au singulier)\r\n array(\r\n 'labels' => array(\r\n 'name' => 'Salles', // Rename these to suit\r\n 'singular_name' => 'Salle',\r\n 'add_new' => 'Nouvelle salle',\r\n 'add_new_item' => 'Ajouter une salle',\r\n 'edit' => 'Modifier',\r\n 'edit_item' => 'Modifier la salle',\r\n 'new_item' => 'Nouvelle salle',\r\n 'view' => 'Voir',\r\n 'view_item' => 'Voir la salle',\r\n 'search_items' => 'Chercher une salle',\r\n 'not_found' => 'Aucune salle trouvée',\r\n 'not_found_in_trash' => 'Aucune salle trouvée dans la corbeille'\r\n ),\r\n 'public' => true,\r\n 'hierarchical' => false,\r\n 'has_archive' => false,\r\n 'supports' => array(\r\n 'title',\r\n 'editor'\r\n ),\r\n 'can_export' => true,\r\n 'rewrite' => array( 'slug' => 'salle'),\r\n ));\r\n\r\n //\r\n //\r\n // location infos\r\n\r\n $cols_qty = get_field('columns_qty', 'options');\r\n if(!has($cols_qty)) $cols_qty = 0;\r\n\r\n register_field_group(array (\r\n 'key' => 'group_549999947eb80',\r\n 'title' => 'Salle',\r\n 'fields' => array (\r\n array (\r\n 'key' => 'field_5499999a2605e',\r\n 'label' => 'Informations sur la salle',\r\n 'name' => 'infos',\r\n 'prefix' => '',\r\n 'type' => 'repeater',\r\n 'instructions' => '',\r\n 'required' => 0,\r\n 'conditional_logic' => 0,\r\n 'wrapper' => array (\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ),\r\n 'min' => 1,\r\n 'max' => 1,\r\n 'layout' => 'table',\r\n 'button_label' => '',\r\n 'sub_fields' => array (\r\n array (\r\n 'key' => 'field_54999a0c2605f',\r\n 'label' => 'Libellés',\r\n 'name' => 'labels',\r\n 'prefix' => '',\r\n 'type' => 'repeater',\r\n 'instructions' => '',\r\n 'required' => 0,\r\n 'conditional_logic' => 0,\r\n 'wrapper' => array (\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ),\r\n 'min' => 1,\r\n 'max' => 1,\r\n 'layout' => 'row',\r\n 'button_label' => '',\r\n 'sub_fields' => array (\r\n array (\r\n 'key' => 'field_54999a3426060',\r\n 'label' => 'Titre alternatif',\r\n 'name' => 'alt',\r\n 'prefix' => '',\r\n 'type' => 'text',\r\n 'instructions' => '',\r\n 'required' => 0,\r\n 'conditional_logic' => 0,\r\n 'wrapper' => array (\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ),\r\n 'default_value' => '',\r\n 'placeholder' => '',\r\n 'prepend' => '',\r\n 'append' => '',\r\n 'maxlength' => '',\r\n 'readonly' => 0,\r\n 'disabled' => 0,\r\n ),\r\n array (\r\n 'key' => 'field_54999a4226061',\r\n 'label' => 'Sous-titre',\r\n 'name' => 'subtitle',\r\n 'prefix' => '',\r\n 'type' => 'text',\r\n 'instructions' => '',\r\n 'required' => 0,\r\n 'conditional_logic' => 0,\r\n 'wrapper' => array (\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ),\r\n 'default_value' => '',\r\n 'placeholder' => '',\r\n 'prepend' => '',\r\n 'append' => '',\r\n 'maxlength' => '',\r\n 'readonly' => 0,\r\n 'disabled' => 0,\r\n ),\r\n array (\r\n 'key' => 'field_54999a6126062',\r\n 'label' => 'Cacher les libellés',\r\n 'name' => 'hide',\r\n 'prefix' => '',\r\n 'type' => 'true_false',\r\n 'instructions' => '',\r\n 'required' => 0,\r\n 'conditional_logic' => 0,\r\n 'wrapper' => array (\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ),\r\n 'message' => '',\r\n 'default_value' => 0,\r\n ),\r\n ),\r\n ),\r\n array (\r\n 'key' => 'field_54999a8126063',\r\n 'label' => 'Paramètres',\r\n 'name' => 'settings',\r\n 'prefix' => '',\r\n 'type' => 'repeater',\r\n 'instructions' => '',\r\n 'required' => 0,\r\n 'conditional_logic' => 0,\r\n 'wrapper' => array (\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ),\r\n 'min' => 1,\r\n 'max' => 1,\r\n 'layout' => 'row',\r\n 'button_label' => '',\r\n 'sub_fields' => array (\r\n array (\r\n 'key' => 'field_54999ac326064',\r\n 'label' => 'Classe CSS',\r\n 'name' => 'class',\r\n 'prefix' => '',\r\n 'type' => 'text',\r\n 'instructions' => '',\r\n 'required' => 0,\r\n 'conditional_logic' => 0,\r\n 'wrapper' => array (\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ),\r\n 'default_value' => '',\r\n 'placeholder' => '',\r\n 'prepend' => '',\r\n 'append' => '',\r\n 'maxlength' => '',\r\n 'readonly' => 0,\r\n 'disabled' => 0,\r\n ),\r\n array (\r\n 'key' => 'field_54999ad426065',\r\n 'label' => 'Couleur',\r\n 'name' => 'color',\r\n 'prefix' => '',\r\n 'type' => 'color_picker',\r\n 'instructions' => '',\r\n 'required' => 0,\r\n 'conditional_logic' => 0,\r\n 'wrapper' => array (\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ),\r\n 'default_value' => '',\r\n ),\r\n array (\r\n 'key' => 'field_54999aeb26066',\r\n 'label' => 'Colonne(s) ocuppé(es) dans la grille',\r\n 'name' => 'range',\r\n 'prefix' => '',\r\n 'type' => 'Range',\r\n 'instructions' => ($cols_qty==0 ? 'Vous devez augmenter le nombre de colonnes dans l\\'onglet OPTIONS et enregistrer vos modifications' : ''),\r\n 'required' => 0,\r\n 'conditional_logic' => 0,\r\n 'wrapper' => array (\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ),\r\n 'slider_type' => 'range',\r\n 'title' => '',\r\n 'prepend' => '',\r\n 'append' => '',\r\n 'separate' => '-',\r\n 'default_value_1' => ($cols_qty==0 ? 0 : 1),\r\n 'default_value_2' => ($cols_qty==0 ? 0 : 1),\r\n 'min' => ($cols_qty==0 ? 0 : 1),\r\n 'max' => $cols_qty,\r\n 'step' => 1,\r\n 'font_size' => 14,\r\n ),\r\n array (\r\n 'key' => 'field_54999aeb26067',\r\n 'label' => 'Utiliser comme entête de colonne(s)',\r\n 'name' => 'is_column_header',\r\n 'prefix' => '',\r\n 'type' => 'true_false',\r\n 'instructions' => '',\r\n 'required' => 0,\r\n 'conditional_logic' => 0,\r\n 'wrapper' => array (\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ),\r\n 'message' => '',\r\n 'default_value' => 0,\r\n ),\r\n ),\r\n ),\r\n ),\r\n ),\r\n ),\r\n 'location' => array (\r\n array (\r\n array (\r\n 'param' => 'post_type',\r\n 'operator' => '==',\r\n 'value' => 'location',\r\n ),\r\n ),\r\n ),\r\n 'menu_order' => 0,\r\n 'position' => 'normal',\r\n 'style' => 'seamless',\r\n 'label_placement' => 'top',\r\n 'instruction_placement' => 'label',\r\n 'hide_on_screen' => array (\r\n 0 => 'the_content',\r\n ),\r\n ));\r\n\r\n endif;\r\n}", "title": "" }, { "docid": "feefc61c380acd1a78695054a45f5efd", "score": "0.49533015", "text": "function SetupAutoSuggestFilters($fld, $pageId = null) {\r\n\t\tglobal $gsLanguage;\r\n\t\t$pageId = $pageId ?: $this->PageID;\r\n\t\tswitch ($fld->FldVar) {\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "feefc61c380acd1a78695054a45f5efd", "score": "0.49533015", "text": "function SetupAutoSuggestFilters($fld, $pageId = null) {\r\n\t\tglobal $gsLanguage;\r\n\t\t$pageId = $pageId ?: $this->PageID;\r\n\t\tswitch ($fld->FldVar) {\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "08f982470a75b4ce21dbe252b7eca7da", "score": "0.49504", "text": "function loccontact_meta_box() {\n\t\tglobal $post;\n\t\techo '<table class=\"form-table\">\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t<th scope=\"row\"><label for=\"location_contact_telephone\">' . __( 'Telephone', 'locations' ) . '</label></th>\n\t\t\t\t\t\t<td><input name=\"location_contact_telephone\" type=\"text\" id=\"location_contact_telephone\" value=\"' . get_post_meta( $post->ID, '_location_contact_telephone', true ) . '\" class=\"regular-text\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t<th scope=\"row\"><label for=\"location_contact_email\">' . __( 'Email', 'locations' ) . '</label></th>\n\t\t\t\t\t\t<td><input name=\"location_contact_email\" type=\"text\" id=\"location_contact_email\" value=\"' . get_post_meta( $post->ID, '_location_contact_email', true ) . '\" class=\"regular-text\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t<th scope=\"row\"><label for=\"location_contact_web\">' . __( 'Web', 'locations' ) . '</label></th>\n\t\t\t\t\t\t<td><input name=\"location_contact_web\" type=\"text\" id=\"location_contact_web\" value=\"' . get_post_meta( $post->ID, '_location_contact_web', true ) . '\" class=\"regular-text\" placeholder=\"http://\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>';\n\t\twp_nonce_field( 'update_location_contact', '_nonce_location_contact' );\n\t}", "title": "" }, { "docid": "054df5da19ee36c2320760886b2f9ca5", "score": "0.49393883", "text": "function igni_CodeForm($atts, $content=null){\n\nif(isset($_GET[\"w-places\"]) && $_GET[\"w-places\"]!=\"\"){\n\t$places = $_GET[\"w-places\"];\n} else {\n$places= 0;\n}\t\nif(isset($_GET[\"e-type\"]) && $_GET[\"e-type\"]!=\"\"){\n\t$places = $_GET[\"e-type\"];\n} else {\n$event=\"default\";\n}\t\nif(isset($_GET[\"iva\"]) && $_GET[\"iva\"]!=\"\"){\n\t$places = $_GET[\"iva\"];\n} else {\n$iva= 0;\n}\t\n\n\t$evento_abierto =get_post_meta( get_the_ID(), 'evento_ab', true);\n\t $cl_evento = get_post_meta( get_the_ID(), 'cl_evento', true);\n\t $autoresponder_id = get_post_meta( get_the_ID(), 'auto_id', true);\n\t $event_type = get_post_meta( get_the_ID(), 'event_type', true);\n\nif (!$places){\n\n$form = '<div id =\"event-form-popup\" class=\"mfp-hide form-popup\" style=\"margin-top: 30px;\">\n\t<div id=\"form-event-content\">\n\t\t<p><h3 style=\"text-align:center;\">Reserva tus lugares</h3></p>\n\t\t<form name=\"event\" id=\"Event-form\" action=\"http://reservacion.ojosquesienten.org/site/sp-event-register.php\" method=\"POST\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-xs-12\">\n\t\t\t\t\t\t\t\t\t\t\t<!--allow set slot-->\n\t\t\t\t\t\t<div class=\"event_auth_form_field\">\n\t\t\t\t\t\t\t<label class=\"sr-only\" for=\"First_Name\">Nombre</label>\n\t\t\t\t\t\t\t<input class=\"name\" type=\"text\" name=\"First_Name\" id=\"First_Name\" placeholder=\"Nombre\">\n\t\t\t\t\t\t\t<label class=\"sr-only\" for=\"First_Name\">Apellido</label>\n\t\t\t\t\t\t\t<input class=\"name\" type=\"text\" name=\"Last_Name\" id=\"Last_Name\" placeholder=\"Apellido\">\n\t\t\t\t\t\t\t<label class=\"sr-only\" for=\"Email\">Email</label>\n\t\t\t\t\t\t\t<input type=\"email\" name=\"Email\" id=\"Email\" placeholder=\"Email\">\n\t\t\t\t\t\t\t<!--<label class=\"sr-only\" for=\"Alergies\">Alergias/Necesidades especiales de Alimentación</label>\n\t\t\t\t\t\t\t<input type=\"text\" name=\"Alergies\" id=\"Alergies\" placeholder=\"Alergias\">-->\n\t\t\t\t\t\t\t<label for=\"event_register_qty\">Cantidad</label>\n\t\t\t\t\t\t\t<input type=\"number\" name=\"qty\" value=\"1\" min=\"1\" id=\"event_register_qty\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"event_auth_form_field\">\n\t\t\t\t\t\t\t<label for=\"event_register_iva\">¿Requieres factura? </label><br />\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<input type=\"radio\" name=\"iva\" value=\"yes\" id=\"event_register_iva\"> Sí\n\t\t\t\t\t\t\t<input type=\"radio\" name=\"iva\" value=\"no\" id=\"event_register_iva\">No<br />\n\t\t\t\t\t\t\t<span class=\"payment-warning\">Al seleccionar esta opción se te hara el cobro de un un 16% adcional al precio de cada boleto</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"event_open\" value=\"'.$evento_abierto.'\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"event_cl\" value=\"'.$cl_evento.'\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"auto_id\" value=\"'.$autoresponder_id.'\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"event_type\" value=\"'.$event_type.'\" />\n\t\t\t\t\t\t\n\t\t\t\t\t\t<!--end allow set slot-->\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t<!--<div class=\"col-xs-12\">\n\t\t\t\t\t<!--Hide payment option when cost is 0\n\t\t\t\t\t<label>Pago via</label>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"envent_auth_payment_methods\">\n\t\t\t\t\t\t\t<input id=\"payment_method_paypal\" type=\"radio\" name=\"payment_method\" value=\"paypal\"><label for=\"payment_method_paypal\"><img width=\"115\" height=\"50\" src=\"http://reservacion.ojosquesienten.org/site/wp-content/plugins/tp-event-auth/inc/payments/paypal.png\"></label>\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<!--End hide payment option when cost is 0\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-xs-12\">\n\t\t\t\t\t<div class=\"event_register_foot\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"event_id\" value=\"4935\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"igni_wp_silverpop\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"_wp_http_referer\" value=\"/OQS-new/events/big-night-walk/\">\t\t\t\t\t\t<!--<button class=\"event_register_submit event_auth_button thim-button style3\">RESERVAR AHORA</button>-->\n\t\t\t\t\t\t<button class=\"thim-button style3\" style=\"display: block; margin: 0 auto 20px;\">RESERVAR AHORA</button>\n\t\t\t\t\t\t<p class=\"cprivacy1\">*Completando este formulario accedes a recibir emails de Ojos que Sienten y puedes cancelarlos en cualquier momento (<a href=\"http://reservacion.ojosquesienten.org/site/aviso-de-privacidad/\" target=\"_blank\">Aviso de Privacidad</a>).</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t</form>\n\t\t</div>\n\t</div>\n';\n} else {\n$form='<div id =\"event-form-popup\" class=\"mfp-hide form-popup\" style=\"margin-top: 30px;\">\n<p><h3 style=\"text-align:center;\">PAGO</h3></p>\n<iframe class=\"payment-frame\" src=\"http://www.ojosquesienten.com/igni-payment.php?w-places='.$places.'&e-type='.$evnt.'&iva='.$iva.'></iframe>\n<div>';\n}\n\n\treturn $form;\n\t\n}", "title": "" }, { "docid": "403fa0e5cb1dd688cfd85e48096cee53", "score": "0.49361643", "text": "function _build_field_defs(){\n\t\t$this->formData = array();\n\t\t$this->customFieldDefs = array();\n\t\tforeach($this->searchdefs[$this->module]['layout']['advanced_search'] as $data){\n\t\t\tif(is_array($data)){\n\n\t\t\t\t$this->formData[] = array('field' => $data);\n\t\t\t\t$value = '';\n\t\t\t\t$this->customFieldDefs[$data['name']]= $data;\n\t\t\t\tif(!empty($_REQUEST[$data['name']]))\n\t \t$value = $_REQUEST[$data['name']];\n\t $this->customFieldDefs[$data['name']]['value'] = $value;\n\t\t\t}else\n\t\t\t\t$this->formData[] = array('field' => array('name'=>$data));\n\t\t}\n\t\t$this->fieldDefs = array();\n\t\tif($this->seed){\n\t\t\t$this->seed->fill_in_additional_detail_fields();\n\n\t foreach($this->seed->toArray() as $name => $value) {\n\t $this->fieldDefs[$name] = $this->seed->field_defs[$name];\n\t //if we have a relate type then reset to name so that we end up with a textbox\n\t //rather than a select button\n\t $this->fieldDefs[$name]['name'] = $this->fieldDefs[$name]['name'];\n\t if($this->fieldDefs[$name]['type'] == 'relate')\n\t \t$this->fieldDefs[$name]['type'] = 'name';\n\t if(isset($this->fieldDefs[$name]['options']) && isset($GLOBALS['app_list_strings'][$this->fieldDefs[$name]['options']])) {\n\t $this->fieldDefs[$name]['options'] = $GLOBALS['app_list_strings'][$this->fieldDefs[$name]['options']]; // fill in enums\n\t }\n\t if(!empty($_REQUEST[$name]))\n\t \t$value = $_REQUEST[$name];\n\t $this->fieldDefs[$name]['value'] = $value;\n\t }\n\t\t}\n\t}", "title": "" }, { "docid": "329930b4d713207a94ca9d95866a0b46", "score": "0.4935828", "text": "function pwccindieweb_location_meta_boxes( array $meta_boxes ) {\n\t\n\t$location_fields = array(\n\t\tarray(\n\t\t\t'id' => 'geo_public',\n\t\t\t'name' => 'Include location',\n\t\t\t'type' => 'checkbox',\n\t\t\t'default' => false,\n\t\t\t'class' => 'pwccindieweb-location--include',\n\t\t\t'cols' => 3\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'geo_address',\n\t\t\t'name' => 'Location name',\n\t\t\t'type' => 'text',\n\t\t\t'class' => 'pwccindieweb-location--name',\n\t\t\t'cols' => 9\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'geo_latitude',\n\t\t\t'name' => 'Latitude',\n\t\t\t'type' => 'text',\n\t\t\t'class' => 'pwccindieweb-location--latitude'\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'geo_longitude',\n\t\t\t'name' => 'Longitude',\n\t\t\t'type' => 'text',\n\t\t\t'class' => 'pwccindieweb-location--longitude'\n\t\t)\n\t);\n\t\n\t$fields = array(\n\t\tarray(\n\t\t\t'id' => '_pwccindieweb_location',\n\t\t\t'name' => 'Location data',\n\t\t\t'desc' => 'Record location data against this post',\n\t\t\t'type' => 'group',\n\t\t\t'class' => 'pwccindieweb-location',\n\t\t\t'repeatable' => false,\n\t\t\t'fields' => $location_fields\n\t\t)\n\t);\n\t\n\t\n\t$meta_boxes[] = array(\n\t\t'id' => 'pwccindieweb_location_metabox',\n\t\t'title' => 'Location data',\n\t\t'pages' => array( 'post', 'pwcc_notes' ),\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'fields' => $location_fields // an array of fields - see individual field documentation.\n\t);\n\t\n\treturn $meta_boxes;\n\t\n}", "title": "" }, { "docid": "24b7fbd32d2aa3672f867f473929eeb3", "score": "0.49333963", "text": "public function ajax_get_field_info() { \r\n if ( isset( $_POST[ \"name\" ] ) ) {\r\n $name = sanitize_text_field( $_POST[ \"name\" ] );\r\n $field = wpf_get_field_by_name( $name );\r\n $widget = $field['widget']; \r\n\r\n global $wpf_product_types; \r\n $options = array();\r\n if ( in_array( $wpf_product_types[$widget]['type'], \r\n array( 'single_option', 'multi_option' ) ) ) {\r\n $options = wpf_get_field_options( $field['id'], false ); \r\n $options = array_column( $options, 'title', 'id' );\r\n } \r\n wp_send_json( array( 'status' => true, 'type' => $widget, 'options' => $options ) );\r\n wp_die();\r\n }\r\n wp_send_json( array( 'status' => false ) );\r\n wp_die();\r\n }", "title": "" }, { "docid": "947ca95187e2586d850850f954300cae", "score": "0.49284548", "text": "public function __construct() {\n add_filter('acf/settings/save_json', [$this, 'saveJson']);\n // acf load from json\n add_filter('acf/settings/load_json', [$this, 'loadJson']);\n // add google maps api key\n add_filter('acf/settings/google_api_key', function () {\n return GOOGLE_MAPS_API_KEY;\n });\n // custom taxonomy select field\n add_filter('acf/load_field/name=wc_attr_filter_min', [$this, 'loadWcProductAttributes']);\n add_filter('acf/load_field/name=wc_attr_filter_max', [$this, 'loadWcProductAttributes']);\n add_filter('acf/load_field/name=wc_attr_filter', [$this, 'loadWcProductAttributes']);\n // filters select\n add_filter('acf/load_field/name=term_filter_item', [$this, 'loadFilterList']);\n // add fields to all woocommerce attributes\n add_filter('acf/location/rule_types', [$this, 'addAcfWcAttrRule']);\n add_filter('acf/location/rule_values/woocommerce', [$this, 'addAcfcAttrValue']);\n add_filter('acf/location/rule_match/woocommerce', [$this, 'addAcfWcAttrMatch'], 10, 3);\n // use on init to add acf options pages\n add_action('init', [$this, 'init']);\n }", "title": "" }, { "docid": "884e012661bfca31cdcc50f367e752ab", "score": "0.49235278", "text": "function SetupAutoSuggestFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}", "title": "" }, { "docid": "884e012661bfca31cdcc50f367e752ab", "score": "0.49235278", "text": "function SetupAutoSuggestFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}", "title": "" }, { "docid": "884e012661bfca31cdcc50f367e752ab", "score": "0.49235278", "text": "function SetupAutoSuggestFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}", "title": "" }, { "docid": "884e012661bfca31cdcc50f367e752ab", "score": "0.49235278", "text": "function SetupAutoSuggestFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}", "title": "" }, { "docid": "884e012661bfca31cdcc50f367e752ab", "score": "0.49235278", "text": "function SetupAutoSuggestFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}", "title": "" }, { "docid": "884e012661bfca31cdcc50f367e752ab", "score": "0.49235278", "text": "function SetupAutoSuggestFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}", "title": "" }, { "docid": "884e012661bfca31cdcc50f367e752ab", "score": "0.49235278", "text": "function SetupAutoSuggestFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}", "title": "" }, { "docid": "884e012661bfca31cdcc50f367e752ab", "score": "0.49235278", "text": "function SetupAutoSuggestFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}", "title": "" }, { "docid": "884e012661bfca31cdcc50f367e752ab", "score": "0.49235278", "text": "function SetupAutoSuggestFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}", "title": "" }, { "docid": "884e012661bfca31cdcc50f367e752ab", "score": "0.49235278", "text": "function SetupAutoSuggestFilters($fld, $pageId = null) {\n\t\tglobal $gsLanguage;\n\t\t$pageId = $pageId ?: $this->PageID;\n\t\tswitch ($fld->FldVar) {\n\t\t}\n\t}", "title": "" }, { "docid": "23cbd9af7549ee45e0f392e42c9e6700", "score": "0.49224347", "text": "function iform_map_get_georef_parameters() {\n return array(\n array(\n 'name' => 'georefPreferredArea',\n 'caption' => 'Preferred area for georeferencing.',\n 'description' => 'Preferred area to look within when trying to resolve a place name. For example set this to the region name you are recording within. Can be left blank to not specify '.\n 'in which case users can add a comma plus the region to search if needed, e.g. \"wimborne, Dorset\".',\n 'type' => 'string',\n 'default' => '',\n 'group' => 'Georeferencing',\n 'siteSpecific' => TRUE,\n 'required' => FALSE\n ),\n array(\n 'name' => 'georefCountry',\n 'caption' => 'Preferred country for georeferencing.',\n 'description' => 'Preferred country to look within when trying to resolve a place name. Can be left blank to not specify, in which case users can add a comma then the country to search. ',\n 'type' => 'string',\n 'default' => 'United Kingdom',\n 'group' => 'Georeferencing',\n 'siteSpecific' => TRUE,\n 'required' => FALSE\n ),\n array(\n 'name' => 'georefDriver',\n 'caption' => 'Web service used for georeferencing',\n 'description' => 'Choose the web service used for resolving place names to points on the map. Each web-service has a '.\n 'different set of characteristics.',\n 'type' => 'select',\n 'default' => 'nominatim',\n 'options' => array(\n 'nominatim' => 'Nominatim API place search.',\n 'google_places' => 'Google Places API text search.',\n 'geoportal_lu' => 'ACT Geoportal Luxembourg (for places in Luxumbourg)',\n 'indicia_locations' => 'Search the Indicia locations list.'\n ),\n 'group' => 'Georeferencing'\n )\n );\n}", "title": "" }, { "docid": "24478e390b45b6a795f557f39ecbaae2", "score": "0.49160755", "text": "function bp_docs_ajax_value_inputs() {\n\t// Store the group ID in a hidden input.\n\tif ( bp_docs_is_group_docs() ) {\n\t\t$group_id = bp_get_current_group_id();\n\t} else {\n\t\t// Having the value always set makes JS easier.\n\t\t$group_id = 0;\n\t}\n\t?>\n\t<input type=\"hidden\" id=\"directory-group-id\" value=\"<?php echo $group_id; ?>\">\n\t<?php\n\t// Store the user ID in a hidden input.\n\t$user_id = bp_displayed_user_id();\n\t?>\n\t<input type=\"hidden\" id=\"directory-user-id\" value=\"<?php echo $user_id; ?>\">\n\t<?php\n\t// Allow other plugins to add inputs.\n\tdo_action( 'bp_docs_ajax_value_inputs', $group_id, $user_id );\n}", "title": "" }, { "docid": "710218eb31bc00c75313d995be31ec8f", "score": "0.49045575", "text": "function register_location_js_css() {\n\twp_register_script( google_maps_register, google_maps_key );\n\n\twp_register_script(\n\t\tscript_register,\n\t\tplugins_url( 'js/google-map.js', __FILE__ ),\n\t\tarray( 'jquery' ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . '/js/google-map.js' ),\n\t\ttrue\n\t);\n\twp_register_style(\n\t\tstyle_register_plugin,\n\t\tplugins_url( 'css/style.css', __FILE__ ),\n\t\tarray(),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . '/css/style.css' )\n\t);\n}", "title": "" } ]
07a80e50a9cd56c2a1477d29eab7da04
Start and return a new process
[ { "docid": "f85e2e99bd8b359e4e9543836ff60dd0", "score": "0.0", "text": "public function execProcessAsync($command, $callback, $timeOut = 3600)\n {\n $process = new Process($command);\n\n $process->setTimeout($timeOut);\n $process->setIdleTimeout($timeOut);\n\n $process->start();\n\n foreach ($process as $type => $data):\n $callback($data);\n endforeach;\n\n return $process;\n }", "title": "" } ]
[ { "docid": "57a1cb963344f65c332fd1a30e16d68f", "score": "0.7829873", "text": "public function startProcess()\n {\n echo \"Start process\", PHP_EOL;\n $descriptor = $this->getDescriptor();\n $this->resource = proc_open($this->getCmd(), $descriptor, $this->pipes);\n $this->setStatus();\n posix_setpgid($this->getPid(), $this->getPid());\n return $this;\n }", "title": "" }, { "docid": "2e9308a988d0a49fe117fba6b6351a90", "score": "0.7679504", "text": "public function startProcess();", "title": "" }, { "docid": "bb91407a8ef1078e5975469f6dfd4a4b", "score": "0.6632972", "text": "public function start()\n {\n if (!$this->_ipcIsOkay) {\n require_once 'ZendX/Console/Process/Exception.php';\n throw new ZendX_Console_Process_Exception('Unable to create SHM segments for process communications');\n }\n\n // @see http://www.php.net/manual/en/function.pcntl-fork.php#41150\n @ob_end_flush();\n \n pcntl_signal(SIGCHLD, SIG_IGN);\n\n $pid = @pcntl_fork();\n if ($pid === -1) {\n require_once 'ZendX/Console/Process/Exception.php';\n throw new ZendX_Console_Process_Exception('Forking process failed');\n } else if ($pid === 0) {\n // This is the child\n $this->_isChild = true;\n \n // Sleep a second to avoid problems\n sleep(1);\n \n // Install the signal handler\n pcntl_signal(SIGUSR1, array($this, '_sigHandler'));\n\n // If requested, change process identity\n if ($this->_guid !== null) {\n posix_setgid($this->_guid);\n }\n\n if ($this->_puid !== null) {\n posix_setuid($this->_puid);\n }\n\n // Run the child\n try {\n $this->_run();\n } catch (Exception $e) {\n // We have to catch any exceptions and clean up the process,\n // else we will have a memory leak.\n }\n\n // Destroy the child after _run() execution. Required to avoid\n // unuseful child processes after execution\n exit(0);\n } else {\n // Else this is the parent\n $this->_isChild = false;\n $this->_isRunning = true;\n $this->_pid = $pid;\n }\n }", "title": "" }, { "docid": "018128fa97b9c5b4d6b51e72b70cd497", "score": "0.65677464", "text": "protected function getProcess()\n {\n return (new Process('', $this->workingPath))->setTimeout(null);\n }", "title": "" }, { "docid": "148e0a61b0dca105c15cfdaf45e89ca4", "score": "0.6506298", "text": "public function start()\n {\n $return = 0;\n //if this process has got a pid and has running,then return false\n if ( !empty( $this->getPid() ) && ( $this->getRunningStatus() === 0 )) {\n return $return;\n }\n //start the process\n if (empty( $this->getPid() ) && ( $this->getRunningStatus() === 0 )) {\n //check the callback function of the process\n $callback = $this->getTask();\n if ( !is_callable($callback)) {\n throw new \\RuntimeException('the task of this process is invalid');\n }\n //fork error\n $pid = pcntl_fork();\n if ($pid < 0) {\n throw new \\RuntimeException(\"fork error\");\n }\n //children process\n elseif ($pid == 0) {\n $this->runCurrentProcess();\n }\n //current parent process\n else {\n $return = $pid;\n }\n }\n\n return $return;\n }", "title": "" }, { "docid": "546182a183e1d4b7bd5a0bffed226792", "score": "0.64106417", "text": "public\n function start($id = \"Some Random Process\") {\n // @TODO fix for PHP7\n // if (!self::$have_ticks) {\n // $this->setup_ticks();\n // }\n\n $pid = pcntl_fork();\n\n if ($pid == -1) {\n die(\"Fork you!!\");\n }\n elseif ($pid) {\n $this->pids[$pid] = $id;\n\n $this->logger->debug(\"Announcing new process w/ pid ($pid): {$id}\");\n\n if (count(array_keys($this->pids)) >= $this->max_processes) {\n // wait for child to finish so we can start another.\n\n // PHP doesn't dispatch signals while we're waiting in pcntl_wait().\n // All signals are queued up, and dispatched when it exits.\n // But that doesn't work for ForkManager, because I need to receive\n // the signal to start killing child processes... chicken and egg...\n // Instead, poll pcntl_wait() instead of blocking. If nothing\n // exitted, and we're still supposed to run, poll\n while ($this->alive()) {\n /**\n * @var $status int is a reference to a variable that stores $?\n * plus some more crap for the child that exitted\n */\n $status = 0;\n $childpid = pcntl_wait($status, WNOHANG);\n // If nothing happened, or an error happened, send out signals and delay\n if ($childpid === 0) {\n pcntl_signal_dispatch();\n time_nanosleep(0, 500000000); // Sleep for 0.5s\n } elseif ($childpid === -1) {\n // Go ahead and dispatch messages and sleep. We don't want to busy wait.\n pcntl_signal_dispatch();\n time_nanosleep(0, 500000000); // Sleep for 0.5s\n }\n else {\n if (pcntl_wifexited($status)) {\n\n $code = pcntl_wexitstatus($status);\n if ($code != 0) {\n $msg = \"Child exited abnormally with code $code\";\n if (extension_loaded('newrelic')) {\n newrelic_notice_error($msg);\n }\n $this->logger->critical(\"Process exited abnormally\",\n ['process' => $id, 'code' => $code]);\n }\n }\n\n // If this is a known child, exit the loop, so we can re-spawn\n // If the child is not known, don't spawn a new child\n $respawn_child = (array_key_exists($childpid, $this->pids));\n $this->reap($childpid);\n if ($respawn_child) {\n break;\n }\n }\n }\n }\n }\n else {\n //child ...\n\n // Setup signal handlers, if any\n foreach (self::$trapped_signals as $signo) {\n if (is_null($this->child_handler)) {\n pcntl_signal($signo, function ($signo) {\n exit($signo);\n });\n }\n else {\n pcntl_signal($signo, $this->child_handler);\n }\n }\n\n //code should be in the caller\n }\n\n return $pid;\n }", "title": "" }, { "docid": "fddcdf4115ac9731d8413cd74fd3bcf9", "score": "0.63902134", "text": "public function daemonize()\n {\n $pid = pcntl_fork();\n\n if ($pid === -1) {\n throw new \\RuntimeException('Unable to fork child process.');\n } else if ($pid) {\n exit;\n }\n\n // Make sub process as session leader\n posix_setsid();\n\n if ($pid === -1) {\n throw new \\RuntimeException('Unable to fork child process.');\n } else if ($pid) {\n exit;\n }\n\n // Prepare the resource\n $this->prepared = false;\n $pid = posix_getpid();\n $this->ppid = $this->pid;\n $this->pid = $pid;\n $this->queue = null;\n $this->process = new Process($this, $this->pid, $this->ppid, false);\n $this->children = array();\n $this->prepared = true;\n\n return $this;\n }", "title": "" }, { "docid": "b12ae96b1b0884a00bc67fab5b9122f8", "score": "0.6381937", "text": "function exec() {\n\t\t$this->ppid = posix_getppid();\n\t\t$this->pid = posix_getpid();\n\t}", "title": "" }, { "docid": "9de56824c8499f3747d45a8bc4009d59", "score": "0.6362801", "text": "public function start()\n {\n $command = $this->makeServerCommand();\n $this->process = new Process($command);\n $this->process->start();\n usleep(500000);\n }", "title": "" }, { "docid": "b7e06a5c8ea9107e4bab8dcc8d00b55d", "score": "0.6280782", "text": "public static function create(string $runCommand): Process\n {\n return new static($runCommand);\n }", "title": "" }, { "docid": "b3c361fae4bd9733b698135b2b464752", "score": "0.6172321", "text": "public function startupProcess()\n {\n return $this->boot();\n }", "title": "" }, { "docid": "44863eb448f24a00c0f66302e176b8dd", "score": "0.6115403", "text": "public function getProcess();", "title": "" }, { "docid": "44863eb448f24a00c0f66302e176b8dd", "score": "0.6115403", "text": "public function getProcess();", "title": "" }, { "docid": "44863eb448f24a00c0f66302e176b8dd", "score": "0.6115403", "text": "public function getProcess();", "title": "" }, { "docid": "b55ba4d13d89997dd9f8e15533e8dc83", "score": "0.61006755", "text": "public function __invoke(string ...$arguments): Process {\n $process = new Process(array_merge($this->args, $arguments), $this->cwd);\n return $this->autoRun ? $process->mustRun() : $process;\n }", "title": "" }, { "docid": "03b6a491cfa7b0ad7369949da3dc79bc", "score": "0.6039249", "text": "protected function createProcess(array $arguments = []) :Process\n {\n $binPath = $this->binPath ?: (new ExecutableFinder())->find('enfuse');\n\n if (null === $binPath) {\n throw new ExecutableNotFoundException('\"enfuse\" executable was not found. Did you forgot to add it to environment variables? Or set it via $enfuse->setBinPath(\\'/usr/bin/enfuse\\').');\n }\n\n array_unshift($arguments, $binPath);\n\n $process = new Process($arguments);\n $process->setTimeout($this->timeout);\n\n if ($this->downloadPath){\n $process->setWorkingDirectory($this->downloadPath);\n }\n\n return $process;\n }", "title": "" }, { "docid": "ebf37401dba0b2beb3b47cadb093e979", "score": "0.60220915", "text": "function launch($cmd) {\n exec(\"start $cmd\");\n}", "title": "" }, { "docid": "29d78e47c6d9516d3079a018ec689452", "score": "0.5964085", "text": "public function getProcess(array $commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = null)\n {\n $process_class = Process::class;\n return new $process_class($commandline, $cwd, $env, $input, $timeout);\n }", "title": "" }, { "docid": "c27950cca910d6abdeeb1d3ef6426c6d", "score": "0.5946352", "text": "public function getProcess($command)\n {\n return new Process($command);\n }", "title": "" }, { "docid": "8d5edbbab541872ee2fa1203772aff4e", "score": "0.57633376", "text": "public function fork()\n {\n if (!function_exists('pcntl_fork')) {\n return false;\n }\n $pid = pcntl_fork();\n\n if ($pid == -1) {\n //failure\n return false;\n } elseif ($pid) {\n return true;\n } else {\n $this->start();\n exit(0);\n }\n }", "title": "" }, { "docid": "e32aa5c6f49430fd8068512fbbcfc792", "score": "0.57275033", "text": "public function start()\n\t{\n\t\t// the @ stops it from throwing an exception when unable to fork\n\t\t$pid = @pcntl_fork();\n\t\t\n\t\tif($pid === -1)\n\t\t{\n\t\t\tthrow new Exception(\"Unable to fork\");\n\t\t}\n\t\t\n\t\t// where all of the fun happens\n\t\tif($pid !== 0)\n\t\t{\n\t\t\t// we are the parent\n\t\t\t$this->pid = $pid;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// we are the child\n\t\t\t\n\t\t\t// we would call pcntl_signal here but I need to read more about it\n\t\t\t\n\t\t\t$this->object->run();\n\t\t}\n\t}", "title": "" }, { "docid": "7bf3e6835ef675978863a28a84ee6006", "score": "0.57107925", "text": "public function getProcessByNameAndGroup(string $name, string $group): Process\n {\n return new Process($name, $group, $this->rpcClient);\n }", "title": "" }, { "docid": "843ed50ddfad0403eb967eb145002452", "score": "0.5693312", "text": "public function execute()\n {\n // Create first child.\n if(pcntl_fork())\n {\n // I'm the parent\n // Protect against Zombie children\n pcntl_wait($status);\n exit;\n }\n\n // Make first child as session leader.\n posix_setsid();\n\n // Create second child.\n $pid = pcntl_fork();\n if($pid)\n {\n // If pid not 0, means this process is parent, close it.\n $this->processId = $pid;\n $this->storeProcessId();\n\n exit;\n }\n\n $this->addLog('Daemonized');\n\n fwrite(STDOUT, \"Daemon Start\\n-----------------------------------------\\n\");\n\n $this->registerSignalHandler();\n\n // Declare ticks to start signal monitoring. When you declare ticks, PCNTL will monitor\n // incoming signals after each tick and call the relevant signal handler automatically.\n declare (ticks = 1);\n\n while(true)\n {\n $this->doExecute();\n sleep(1);\n }\n\n return $this;\n }", "title": "" }, { "docid": "0a83354a4d09b4bdbc2369a26959498c", "score": "0.5680224", "text": "public function getInstance($id) {\n $processInstance = new ProcessInstance();\n $this->setRequestUrl('/process-instance/'.$id);\n $this->setRequestObject(null);\n $this->setRequestMethod('GET');\n\n try {\n return $processInstance->cast($this->execute());\n } catch (Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "14c1657ba14b688efc8bf3f9bd375ec2", "score": "0.56586903", "text": "function start()\n {\n $request = \"start\\r\\n\";\n $erg = $this->execute( $request, $this->hostname, $this->port, $this->timeout );\n return $erg;\n }", "title": "" }, { "docid": "c856b7e49bb20cf5144012fd842f05ba", "score": "0.5608729", "text": "function getProcess() {\r\n $pm_process = new PluginProcessmakerProcess;\r\n if (!$this->process && $pm_process->getFromDB($this->fields['plugin_processmaker_processes_id'])) {\r\n $this->process = $pm_process;\r\n }\r\n return $this->process;\r\n }", "title": "" }, { "docid": "ba87abc493cba0c2be0fe05da3b747b4", "score": "0.5585296", "text": "protected function createProcess(?callable $consumer): Process\n {\n $process = new Process($consumer);\n\n if ($this->logger) {\n $process->setLogger($this->logger);\n }\n\n return $process;\n }", "title": "" }, { "docid": "60481c79f10b6e6034c76df2d463c10b", "score": "0.55739987", "text": "public function fork()\n {\n $pair = $this->pair();\n\n $pid = pcntl_fork();\n if ($pid < 0) { // Failed fork\n throw new \\RuntimeException('Failed to fork child process.');\n } elseif ($pid === 0) { // is worker process\n fclose($pair[0]);\n foreach ($this->sockets as $socket) {\n fclose($socket);\n }\n $this->sockets = array();\n $this->loop($pair[1]);\n exit;\n }\n\n fclose($pair[1]);\n $this->sockets[$pid] = $pair[0];\n\n return $pid;\n }", "title": "" }, { "docid": "d242a10bbca4d5a0f8e20fce1601daef", "score": "0.55714315", "text": "public function pexec()\n {\n return $this->createInstance('pexec');\n }", "title": "" }, { "docid": "f8c893590162de8481e835964d8c9290", "score": "0.5569681", "text": "public function create() {\n\t\t$cmdArgs = [];\n\t\t$cmdArgs[] = escapeshellarg($this->getDeviceFile());\n\t\t$cmd = new \\OMV\\System\\Process(\"pvcreate\", $cmdArgs);\n\t\t$cmd->setRedirect2to1();\n\t\t$cmd->execute();\n\t}", "title": "" }, { "docid": "b5b7795452f58a65f2e0b9a10ef44551", "score": "0.5559535", "text": "public function getProcess(): ProcessInterface;", "title": "" }, { "docid": "35bd38bd7ee6874fc775149a0bb82d9a", "score": "0.55263793", "text": "public function createProcess(\n string $connection,\n string $queue,\n int $delay,\n int $memory,\n int $timeout\n ): Process {\n $string = $this->workerCommand;\n\n // If the environment is set, we will append it to the command string so the\n // workers will run under the specified environment. Otherwise, they will\n // just run under the prod environment which is not always right.\n if (isset($this->environment)) {\n $string .= ' --env=' . \\escapeshellarg($this->environment);\n }\n\n // Next, we will just format out the worker commands with all of the various\n // options available for the command. This will produce the final command\n // line that we will pass into a Symfony process object for processing.\n $command = \\sprintf(\n $string,\n \\escapeshellarg($connection),\n \\escapeshellarg($queue),\n $delay,\n $memory,\n $this->sleep,\n $this->maxTries\n );\n\n return new Process($command, $this->commandPath, null, null, $timeout);\n }", "title": "" }, { "docid": "8ae58b5b679387508fe61f04410ddb0e", "score": "0.5524952", "text": "protected function getProcess(...$args)\n {\n $process = $this->builder\n ->setArguments($args)\n ->getProcess();\n\n return $process;\n }", "title": "" }, { "docid": "ac7755d95bff6b2e744c258a6f0274dc", "score": "0.55224746", "text": "public function __invoke()\n {\n $arguments = func_get_args();\n\n switch (pcntl_fork()) {\n case -1:\n throw new \\RuntimeException();\n case 0:\n $this->registerChildShutdown();\n $this->handleChildProcess($arguments);\n exit;\n default:\n return $this->handleParentProcess();\n }\n }", "title": "" }, { "docid": "9a96fd1e1ef305403ab181c46c4b4103", "score": "0.54362875", "text": "public function instantiate(Scenario $scenario): Process\n {\n $process = $this->gateway->create();\n\n $process->scenario = $scenario;\n $process->schema = str_replace('/scenario/', '/process/', $scenario->schema);\n $process->title = $scenario->title;\n\n $process->actors = $this->instantiateActors($scenario);\n $process->assets = $this->instantiateAssets($scenario);\n $process->definitions = clone $scenario->definitions;\n\n $initialState = $scenario->getState(':initial');\n $process->current = $this->stateInstantiator->instantiate($initialState, $process);\n\n $process->dispatch('instantiate');\n\n return $process;\n }", "title": "" }, { "docid": "3aca43779ca99af7bc2c72817c258ac0", "score": "0.54158694", "text": "private function checkRunning(){\n\n $this->pcntlDispatch();\n\n // check total runtime of process and restart\n if(!is_null($this->_process_starttime) && !is_null($this->_process_running_timeout)\n && ($this->_process_starttime + $this->_process_running_timeout) <= time()){\n $this->close();\n }\n\n if(is_null($this->_process)){\n return $this->start();\n }else{\n $status=proc_get_status($this->_process);\n if($status['running']===false){\n $this->close();\n $this->start();\n }\n }\n }", "title": "" }, { "docid": "e25432d7cf7915bb9998307b441fd1eb", "score": "0.53754354", "text": "public static function Running()\r\n\t{\r\n\t\twhile (true) {\r\n\r\n\t\t\t$exe = new CommandProcess();\r\n\t\t\t$exe->running();\r\n\r\n\t\t\tPrint(self::label('running'));\r\n\t\t\tsleep(self::sleep());\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e8c809ae8b9ccd6495ddd9847e5b5c16", "score": "0.5368139", "text": "public function inProcess();", "title": "" }, { "docid": "f6f73bda9dd4fb6eddad73397bb0d264", "score": "0.5360935", "text": "public function __construct($puid = null, $guid = null, $umask = null)\n {\n if (substr(PHP_OS, 0, 3) === 'WIN') {\n require_once 'ZendX/Console/Process/Exception.php';\n throw new ZendX_Console_Process_Exception('Cannot run on windows');\n } else if (!in_array(substr(PHP_SAPI, 0, 3), array('cli', 'cgi'))) {\n require_once 'ZendX/Console/Process/Exception.php';\n throw new ZendX_Console_Process_Exception('Can only run on CLI or CGI enviroment');\n } else if (!function_exists('shmop_open')) {\n require_once 'ZendX/Console/Process/Exception.php';\n throw new ZendX_Console_Process_Exception('shmop_* functions are required');\n } else if (!function_exists('pcntl_fork')) {\n require_once 'ZendX/Console/Process/Exception.php';\n throw new ZendX_Console_Process_Exception('pcntl_* functions are required');\n } else if (!function_exists('posix_kill')) {\n require_once 'ZendX/Console/Process/Exception.php';\n throw new ZendX_Console_Process_Exception('posix_* functions are required');\n }\n \n $this->_isRunning = false;\n\n $this->_name = md5(uniqid(rand()));\n $this->_guid = $guid;\n $this->_puid = $puid;\n\n if ($umask !== null) {\n umask($umask);\n }\n\n // Try to create the shared memory segment. The variable\n // $this->_ipcIsOkay contains the return code of this operation and must\n // be checked before forking\n if ($this->_createIpcSegment() && $this->_createIpcSemaphore()) {\n $this->_ipcIsOkay = true;\n } else {\n $this->_ipcIsOkay = false;\n }\n }", "title": "" }, { "docid": "6e56cbe8b5dc5093943e469fe8ddd411", "score": "0.5350926", "text": "public function useProcess($url)\n {\n $this->setProcess(new Process($url));\n\n return $this;\n }", "title": "" }, { "docid": "cad05a57c84f43c8193307d442c75edb", "score": "0.5336894", "text": "private function startWorker($function) {\n\t\t\tif ($this->stopping) { return; }\n\n\t\t\t// Create a new runWorker process.\n\t\t\t$process = new React\\ChildProcess\\Process('exec /usr/bin/env php ' . escapeshellarg(__DIR__ . '/runWorker.php') . ' ' . escapeshellarg($function));\n\t\t\t$process->start($this->loop);\n\n\t\t\t// Store the process.\n\t\t\t$pid = $process->getPid();\n\t\t\t$this->jobs[$function]['workers'][$pid] = ['jobcount' => 0, 'process' => $process, 'buffers' => ['stdout' => '', 'stderr' => ''], 'currentJob' => null];\n\n\t\t\t// Register handlers for output from the worker.\n\t\t\t// STDOUT data from the worker.\n\t\t\t$process->stdout->on('data', function ($data) use ($function, $pid) {\n\t\t\t\t$this->jobs[$function]['workers'][$pid]['buffers']['stdout'] .= $data;\n\t\t\t\t$lines = explode(\"\\n\", $this->jobs[$function]['workers'][$pid]['buffers']['stdout']);\n\t\t\t\t$this->jobs[$function]['workers'][$pid]['buffers']['stdout'] = array_pop($lines);\n\t\t\t\tforeach ($lines as $line) {\n\t\t\t\t\tif (!empty($line)) {\n\t\t\t\t\t\t$this->processWorkerData($function, $pid, $line);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// STDERR data from the worker.\n\t\t\t$process->stderr->on('data', function ($data) use ($function, $pid) {\n\t\t\t\t$this->jobs[$function]['workers'][$pid]['buffers']['stderr'] .= $data;\n\t\t\t\t$lines = explode(\"\\n\", $this->jobs[$function]['workers'][$pid]['buffers']['stderr']);\n\t\t\t\t$this->jobs[$function]['workers'][$pid]['buffers']['stderr'] = array_pop($lines);\n\t\t\t\tforeach ($lines as $line) {\n\t\t\t\t\tif (!empty($line)) {\n\t\t\t\t\t\t$this->processWorkerData($function, $pid, '# STDERR: ' . $line);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Process terminated.\n\t\t\t$process->on('exit', function($exitCode, $termSignal) use ($function, $pid) {\n\t\t\t\t$this->processWorkerExit($function, $pid, $exitCode, $termSignal);\n\t\t\t});\n\n\t\t\t// Start the worker.\n\t\t\t$this->processWorkerStart($function, $pid);\n\t\t}", "title": "" }, { "docid": "4760157f75f7b1c96fd0ee1a9325faa1", "score": "0.53171635", "text": "public function processHandle()\n {\n return $this->process;\n }", "title": "" }, { "docid": "97ca6baf082c233e5360460f286e3525", "score": "0.5309395", "text": "public function getProcess(int $work_id = -1): Process|false\n {\n }", "title": "" }, { "docid": "e0dea2ece690a77b3f759162df96d68f", "score": "0.52995133", "text": "public function run()\n {\n try {\n $perfileria = new Process();\n $perfileria->process = 'Perfilería';\n $perfileria->next_process_id = 2;\n $perfileria->is_active = 1;\n $perfileria->save();\n\n $cut = new Process();\n $cut->process = 'Corte';\n $cut->next_process_id = 3;\n $cut->is_active = 1;\n $cut->save();\n\n $assembling = new Process();\n $assembling->process = 'Armado';\n $assembling->next_process_id = 4;\n $assembling->is_active = 1;\n $assembling->save();\n\n $leveling = new Process();\n $leveling->process = 'Nivelación';\n $leveling->next_process_id = 5;\n $leveling->is_active = 1;\n $leveling->save();\n\n $packaging = new Process();\n $packaging->process = 'Empaquetado';\n $packaging->next_process_id = 5;\n $packaging->is_active = 1;\n $packaging->save();\n\n $shipment = new Process();\n $shipment->process = 'Embarque';\n $shipment->next_process_id = 0;\n $shipment->is_active = 1;\n $shipment->save();\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "8397f327b5d9ffdb8adaf3f63cecf031", "score": "0.52979684", "text": "public function execute() {\n\t\t$daemon_config = $this->daemon_config();\n\t\t$service_config = $this->service_config();\n\n\t\t$this->parse_command_line();\n\n\t\ttry {\n\t\t\t$this->setup_system_daemon($service_config, $daemon_config);\n\n\t\t\tif (index_set($this->runtime_options, 'write-init')) {\n\t\t\t\t$this->install_init();\n\t\t\t} else {\n\t\t\t\t$this->start_time = time();\n\n\t\t\t\t// Fork and start our new 'parent' process.\n\t\t\t\tif (index_set($this->runtime_options, 'no-daemon')) {\n\t\t\t\t\tSD::info('Running in the foreground');\n\t\t\t\t} else {\n\t\t\t\t\tSD::start();\n\t\t\t\t}\n\n\t\t\t\tSD::info(\"Daemon: %s started.\", $this->service_name);\n\n\t\t\t\t// We are now in our new 'parent', time to start managing our worker children.\n\t\t\t\t// Start our worker pool:\n\t\t\t\t$this->run($this->worker);\n\n\t\t\t\tSD::stop();\n\t\t\t}\n\t\t} catch (\\Exception $e) {\n\t\t\tSD::crit($e->getMessage());\n\t\t\techo 'Error: '.$e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "b818fbd5d9c4ac8b900783863cdd7553", "score": "0.5288142", "text": "public function start(LoopInterface $loop = null, $interval = 0.1)\n {\n if ($this->isRunning()) {\n throw new \\RuntimeException('Process is already running');\n }\n $loop = $loop ?: Loop::get();\n $cmd = $this->cmd;\n $fdSpec = $this->fds;\n $sigchild = null;\n // Read exit code through fourth pipe to work around --enable-sigchild\n if ($this->enhanceSigchildCompatibility) {\n $fdSpec[] = array('pipe', 'w');\n \\end($fdSpec);\n $sigchild = \\key($fdSpec);\n // make sure this is fourth or higher (do not mess with STDIO)\n if ($sigchild < 3) {\n $fdSpec[3] = $fdSpec[$sigchild];\n unset($fdSpec[$sigchild]);\n $sigchild = 3;\n }\n $cmd = \\sprintf('(%s) ' . $sigchild . '>/dev/null; code=$?; echo $code >&' . $sigchild . '; exit $code', $cmd);\n }\n // on Windows, we do not launch the given command line in a shell (cmd.exe) by default and omit any error dialogs\n // the cmd.exe shell can explicitly be given as part of the command as detailed in both documentation and tests\n $options = array();\n if (\\DIRECTORY_SEPARATOR === '\\\\') {\n $options['bypass_shell'] = \\true;\n $options['suppress_errors'] = \\true;\n }\n $errstr = '';\n \\set_error_handler(function ($_, $error) use(&$errstr) {\n // Match errstr from PHP's warning message.\n // proc_open(/dev/does-not-exist): Failed to open stream: No such file or directory\n $errstr = $error;\n });\n $pipes = array();\n $this->process = @\\proc_open($cmd, $fdSpec, $pipes, $this->cwd, $this->env, $options);\n \\restore_error_handler();\n if (!\\is_resource($this->process)) {\n throw new \\RuntimeException('Unable to launch a new process: ' . $errstr);\n }\n // count open process pipes and await close event for each to drain buffers before detecting exit\n $that = $this;\n $closeCount = 0;\n $streamCloseHandler = function () use(&$closeCount, $loop, $interval, $that) {\n $closeCount--;\n if ($closeCount > 0) {\n return;\n }\n // process already closed => report immediately\n if (!$that->isRunning()) {\n $that->close();\n $that->emit('exit', array($that->getExitCode(), $that->getTermSignal()));\n return;\n }\n // close not detected immediately => check regularly\n $loop->addPeriodicTimer($interval, function ($timer) use($that, $loop) {\n if (!$that->isRunning()) {\n $loop->cancelTimer($timer);\n $that->close();\n $that->emit('exit', array($that->getExitCode(), $that->getTermSignal()));\n }\n });\n };\n if ($sigchild !== null) {\n $this->sigchildPipe = $pipes[$sigchild];\n unset($pipes[$sigchild]);\n }\n foreach ($pipes as $n => $fd) {\n // use open mode from stream meta data or fall back to pipe open mode for legacy HHVM\n $meta = \\stream_get_meta_data($fd);\n $mode = $meta['mode'] === '' ? $this->fds[$n][1] === 'r' ? 'w' : 'r' : $meta['mode'];\n if ($mode === 'r+') {\n $stream = new DuplexResourceStream($fd, $loop);\n $stream->on('close', $streamCloseHandler);\n $closeCount++;\n } elseif ($mode === 'w') {\n $stream = new WritableResourceStream($fd, $loop);\n } else {\n $stream = new ReadableResourceStream($fd, $loop);\n $stream->on('close', $streamCloseHandler);\n $closeCount++;\n }\n $this->pipes[$n] = $stream;\n }\n $this->stdin = isset($this->pipes[0]) ? $this->pipes[0] : null;\n $this->stdout = isset($this->pipes[1]) ? $this->pipes[1] : null;\n $this->stderr = isset($this->pipes[2]) ? $this->pipes[2] : null;\n // immediately start checking for process exit when started without any I/O pipes\n if (!$closeCount) {\n $streamCloseHandler();\n }\n }", "title": "" }, { "docid": "bb6e5b02a0393d25871597d64dffc907", "score": "0.5286186", "text": "public function __construct()\n {\n parent::__construct();\n\n Log::info('start process ' . get_class());\n }", "title": "" }, { "docid": "dbb3d4b342e55462d4c613dfdbd9cd55", "score": "0.5280314", "text": "abstract function launch();", "title": "" }, { "docid": "addcff171f4e731751f9a46cea9c15e0", "score": "0.5272319", "text": "private function createProcess($baseDir, $entryPoint)\n {\n $phpFinder = new PhpExecutableFinder();\n $php = $phpFinder->find();\n\n // See http://symfony.com/doc/2.3/components/process.html#process-signals\n // for why exec is used here.\n return new Process(sprintf('exec %s %s/%s', $php, $baseDir, $entryPoint));\n }", "title": "" }, { "docid": "3cb8e55a6c9c5e06fedb7829002209a7", "score": "0.52603024", "text": "private function fork() {\n if (Config::bool('beanstalk.testing')) {\n return 0;\n }\n\n if (!function_exists('pcntl_fork')) {\n return false;\n }\n\n $pid = pcntl_fork();\n if ($pid === -1) {\n throw new RuntimeException('Unable to fork child worker.');\n }\n\n return $pid;\n }", "title": "" }, { "docid": "28fe338fa912d00e64f219f2ea136572", "score": "0.5172461", "text": "public static function process()\n {\n $data = ['action' => 'test_process', 'data' => [ 'id' => 123 ]];\n $result = self::execute($data);\n\n echo 'master:['.\\Swover\\Utils\\Worker::getMasterPid().'] current:['.posix_getpid().'-'.\\Swover\\Utils\\Worker::getChildStatus().']'\n .$result.PHP_EOL;\n }", "title": "" }, { "docid": "9e4a640eb33bec4985bfb06d7eccca38", "score": "0.5154362", "text": "protected function run(Process $process) {\n\t}", "title": "" }, { "docid": "9e4a640eb33bec4985bfb06d7eccca38", "score": "0.5154362", "text": "protected function run(Process $process) {\n\t}", "title": "" }, { "docid": "1dd9922cfd50546711402d35f3820ac8", "score": "0.51517", "text": "public function __construct(Started $process)\n {\n // process will be killed\n // this also allows to send any input to the stream\n $process->wait();\n /** @var Sequence<array{0: Str, 1: Output\\Type}> */\n $output = Sequence::of();\n $this->output = new Output\\Output($output);\n\n // the pid returned by `$process->pid()` is the one for the \"foreground\"\n // process that starts the background one, the real pid (the one we\n // expect to be usable) will generally be `$process->pid() + 1` and is\n // displayed in the output of the \"foreground\" process but there is no\n // garanty for that as a new process could be started at the same moment\n // and so the process might be `+ 2`. for this reason we do not expose\n // the background pid\n }", "title": "" }, { "docid": "5008b1650669b1d011a5fb7286776434", "score": "0.5143291", "text": "private function push(string $handle, array $data): \\Symfony\\Component\\Process\\Process\n {\n $cmd = sprintf('php %s socket-io:process --handler=%s --data=%s --env=%s', $this->scriptName, escapeshellarg($handle), escapeshellarg(serialize($data)), getenv('APP_ENV'));\n\n $process = \\Symfony\\Component\\Process\\Process::fromShellCommandline($cmd, $this->binPath);\n $process->setTimeout(10);\n $process->start();\n\n self::$_inWork[] = $process;\n\n return $process;\n }", "title": "" }, { "docid": "326cabeefcc35866aabe948c62a785fa", "score": "0.51336527", "text": "public function run()\n {\n $desc = array(\n 0 => array('pipe', 'r'),\n 1 => array('pipe', 'w'),\n 2 => array('pipe', 'w')\n );\n\n $pipes = array();\n $process = proc_open(\n $this->getFullCommand(),\n $desc,\n $pipes,\n $this->_cwd,\n $this->_env);\n if (!is_resource($process)) {\n throw new Exception(\"proc_open failed!\");\n }\n \n if (!empty($this->_stdin)) {\n fwrite($pipes[0], $this->_stdin);\n fclose($pipes[0]);\n }\n\n $this->_stdout = stream_get_contents($pipes[1]);\n $this->_stderr = stream_get_contents($pipes[2]);\n\n fclose($pipes[1]);\n fclose($pipes[2]);\n\n $this->_exitCode = proc_close($process);\n return $this->_exitCode;\n }", "title": "" }, { "docid": "fdbe5c72c6b01e876912535f328c50f3", "score": "0.5127125", "text": "public function startPhpProcess($scriptPath) {\n }", "title": "" }, { "docid": "1078ba3d5d5fbc9fb186da8d0b43f338", "score": "0.51223063", "text": "public function fork($file, array $options = array())\n {\n // Fork\n $pid = pcntl_fork();\n\n // Parallel works\n if ($pid === -1) {\n throw new \\RuntimeException('Unable to fork child process.');\n } else if ($pid) {\n // Save child process and return\n return $this->children[$pid] = new Process($this, $pid, $this->pid);\n } else {\n // Child initialize\n $this->childInitialize($options);\n\n // Check file\n if (is_string($file) && is_file($file)) {\n $process = $this->process;\n include($file);\n } else {\n throw new \\RuntimeException('The file to fork is not exists: ' . $file);\n }\n exit;\n }\n }", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.51172733", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.51172733", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.51172733", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.51172733", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.51172733", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.51172733", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.51172733", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.51172733", "text": "public function start();", "title": "" }, { "docid": "684565acc27028888e4ad78de1fc380b", "score": "0.51172733", "text": "public function start();", "title": "" }, { "docid": "fc2705e89a79a3ae21f9c1b8989927f2", "score": "0.51045465", "text": "public function start_or_reuse(): void\n\t{\n\t\tif ($this->is_active)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$this->start();\n\t}", "title": "" }, { "docid": "894af79354933f2cc99ced0a7a3dddfd", "score": "0.5103015", "text": "function startit($cmd) {\r\n\t$stamp = time().\".bat\";\r\n\tfile_put_contents($stamp,$cmd.\" 2>&1\\nexit\");\r\n\t//$exec = array();\r\n\t$exec = shell_exec(\"start /low /b {$stamp}\");\r\n\t//$exec .= file_get_contents(\"{$stamp}.txt\");\r\n\t//echo strlen($exec);\r\n\t$exec = explode(\"\\n\",$exec);\r\n\tunlink($stamp);\r\n\t//unlink($stamp.\".txt\");\r\n\treturn $exec;\r\n}", "title": "" }, { "docid": "38a79345efa7e5969a517459911d6a97", "score": "0.50883055", "text": "public function run()\n {\n $this->init();\n\n if($this->shouldRunSilently()) {\n echo \"Running daemon '{$this->daemon}' silently. Use '--trace' or '--verbose' to produce debugging output.\\n\";\n }\n\n $argv = array();\n $argv[] = sprintf('exec ./yiic execDaemon index %s', $this->daemon);\n\n foreach($this->args as $k => $arg) {\n $argv[] = sprintf('%s', $arg);\n }\n\n $command = implode(' ', $argv);\n\n while(true) {\n $this->logMessage('INIT', 'Starting process');\n\n $future = new ExecFuture('%s', $command);\n $future->setCWD('.');\n $future->setStdoutSizeLimit($this->captureBufferSize);\n $future->setStderrSizeLimit($this->captureBufferSize);\n\n $this->deadline = time() + $this->deadlineTimeout;\n $this->heartbeat = time() + self::HEARTBEAT_WAIT;\n\n $future->isReady();\n $this->childPID = $future->getPID();\n\n do {\n do {\n if($this->traceMemory) {\n $memoryUsage = number_format(Yii::getLogger()->getMemoryUsage() / 1024, 1, '.', ' ');\n $this->logMessage('RAMS', \"Overseer Memory Usage: {$memoryUsage} KB\");\n }\n\n // We need a shortish timeout here so we can run the tick handler frequently in order to process signals.\n $result = $future->resolve(1);\n\n list($stdout, $stderr) = $future->read();\n $stdout = trim($stdout);\n $stderr = trim($stderr);\n\n if(strlen($stdout)) {\n $this->logMessage('STDO', $stdout);\n }\n\n if(strlen($stderr)) {\n $this->logMessage('STDE', $stderr);\n }\n\n $future->discardBuffers();\n\n if($result !== null) {\n list($err) = $result;\n\n if($err) {\n $this->logMessage('FAIL', \"Process exited with error {$err}\");\n }\n else {\n $this->logMessage('DONE', 'Process exited successfully');\n }\n\n break 2;\n }\n\n if($this->heartbeat < time()) {\n $this->heartbeat = time() + self::HEARTBEAT_WAIT;\n $this->dispatchEvent(self::EVENT_DID_HEARTBEAT);\n }\n } while(time() < $this->deadline);\n\n $this->logMessage('HANG', 'Hang detected. Restarting process');\n $this->annihilateProcessGroup();\n } while(false);\n\n $this->logMessage('WAIT', 'Waiting to restart process');\n\n sleep(self::RESTART_WAIT);\n }\n }", "title": "" }, { "docid": "727bc056f4ca19a7eb025dc2df57fdc6", "score": "0.50880253", "text": "public function getProcess()\n {\n return $this->process;\n }", "title": "" }, { "docid": "727bc056f4ca19a7eb025dc2df57fdc6", "score": "0.50880253", "text": "public function getProcess()\n {\n return $this->process;\n }", "title": "" }, { "docid": "98c50a80e74a625bf276eee31aa5a2da", "score": "0.5086246", "text": "function become_daemon()\n{\n GLOBAL $fh;\n\n\t//printLog($fh, \"pcntl_fork() in\");\n $pid = pcntl_fork();\n\t//printLog($fh, \"pcntl_fork() out\");\n\n if ($pid == -1)\n {\n /* fork failed */\n\t\t//printLog($fh, \"fork failure!\");\n exit();\n } elseif ($pid)\n {\n\t\t//printLog($fh, \"pid: \" . $pid);\n /* close the parent */\n exit();\n } else\n {\n /* child becomes our daemon */\n posix_setsid();\n chdir('/');\n umask(0);\n return posix_getpid();\n }\n\n\t//printLog($fh, \"become_daemon() fim\");\n}", "title": "" }, { "docid": "74245a43d29a9e58a9e8547590b5d4cf", "score": "0.5076269", "text": "protected abstract function start();", "title": "" }, { "docid": "98a9b07f2e84fe79c4339e2149c4e42a", "score": "0.5067262", "text": "protected static function buildSeleniumProcess() : Process\n {\n if (static::$seleniumPath) {\n $seleniumPath = realpath(static::$seleniumPath);\n } else {\n $seleniumPath = realpath(__DIR__ . '/../../bin/selenium-server-standalone-3.141.59.jar');\n }\n \n if ($seleniumPath === false) {\n throw new RuntimeException(\n \"Invalid path to selenium server [{$seleniumPath}].\"\n );\n }\n if (static::$geckoDriverPath) {\n $geckoDriverPath = realpath(static::$geckoDriverPath);\n } else {\n $geckoDriverPath = realpath(__DIR__ . '/../../bin/geckodriver');\n }\n if ($geckoDriverPath === false) {\n throw new RuntimeException(\n \"Invalid path to geckodriver [{$geckoDriverPath}].\"\n );\n }\n\n $processBuilder = (new Process([\n 'java',\n \"-Dwebdriver.gecko.driver=$geckoDriverPath\",\n '-jar',\n $seleniumPath\n ]));\n\n// if (env('HEADLESS_MODE')) {\n// $processBuilder->setEnv('DISPLAY', ':10');\n// }\n\n $processBuilder->setEnv(['DISPLAY' => ':10']);\n\n return $processBuilder;\n }", "title": "" }, { "docid": "ffcb3e61a4e29160f4d37929aa848284", "score": "0.50575185", "text": "public static function execute($command)\n {\n $pipe_descriptors = [\n ['pipe', 'r'],\n ['pipe', 'w'],\n ['pipe', 'w'],\n ];\n $process = proc_open($command, $pipe_descriptors, $outpipes);\n\n return new static($process, ...$outpipes);\n }", "title": "" }, { "docid": "b169132eb3885689742dbc1e56389ca0", "score": "0.5041524", "text": "protected function setMainProcess() : void\n {\n posix_setsid();\n }", "title": "" }, { "docid": "eba8a71ade887991bffc9b3f3563b4a4", "score": "0.5033405", "text": "abstract function start();", "title": "" }, { "docid": "27bc05efbc8ade8ed0bf27fcd029b0ea", "score": "0.50277716", "text": "public static function queue_start(): void\r\n {\r\n echo 'Queue main process now is running!';\r\n\r\n //Add child process command\r\n redis_queue::$cmd = 'demo/test-queue_run';\r\n\r\n //Start main process\r\n redis_queue::start();\r\n }", "title": "" }, { "docid": "0b3e9b0152bb7af3aa897671b0c54c20", "score": "0.50269294", "text": "protected function getProcess($host, Task $task)\n {\n $dep = DEPLOYER_BIN;\n $options = $this->generateOptions();\n $hostname = $host->getHostname();\n $taskName = $task->getName();\n $configFile = $host->get('host_config_storage');\n $value = $this->input->getOption('file');\n $file = $value ? \"--file='$value'\" : '';\n\n if ($this->output->isDecorated()) {\n $options .= ' --ansi';\n }\n\n $process = new Process(\"$dep $file worker $options --hostname $hostname --task $taskName --config-file $configFile\");\n\n if (!defined('DEPLOYER_PARALLEL_PTY')) {\n $process->setPty(true);\n }\n\n return $process;\n }", "title": "" }, { "docid": "fc230399b1f64ef2d0436e6efea42b0f", "score": "0.50238204", "text": "function spawnAsyncProcess($func, $args = []) {\n if (pcntl_fork() == 0) {\n call_user_func_array($func, $args);\n }\n }", "title": "" }, { "docid": "91fc6d3d0c514d01ec5f3b932b88aa28", "score": "0.50200766", "text": "public function runAsync(\r\n $command)\r\n {\r\n $fullCommand = sprintf('%s -v error %s', Args::escape($this->_ffmpegBinary), $command);\r\n\r\n $process = new Process($fullCommand);\r\n $process->start();\r\n\r\n return $process;\r\n }", "title": "" }, { "docid": "e108ce4adf25d8fccba67f81009dee23", "score": "0.50196564", "text": "function apprentissage($dest,$lClass,$param,$resultpath,$resultname,$newparam){\n\t\n\tset_time_limit(0);\n\t$command = \"start C:/vhosts/pfe/test/Apprentissage(exe)/Apprentissage.exe = \";\n\t$command.=$dest.\" \";\n\t$command.=$lClass.\" \";\n\t$command.=$param.\" \";\n\t$command.=$resultpath.\" \";\n\t$command.=$resultname.\" \";\n\tif ($newparam!=\"\") $command.=$newparam;\n\techo \"test \".$command.\"<br />\";\n\texec($command, $output, $return);\n}", "title": "" }, { "docid": "b1c1cd9d88f7b9c2c809c54f70837161", "score": "0.50102425", "text": "function background($arg){\n\n\t\t$escape_arg = escapeshellarg($arg);\n\t\t$escape_arg = str_replace (\"'\", \"\", $escape_arg);\n\n\t\t$parts = explode(\";\",$escape_arg);\n\t\t$escape_arg = $parts['0'];\n\n\t\t// Old way - without chroot environment\n\t\t// $PID = shell_exec(\"nohup /usr/bin/vlc-wrapper $escape_arg > /dev/null & echo $!\");\n\n\t\t// New way - with chroot environment\n\t\t$PID = shell_exec(\"/usr/bin/sudo /usr/sbin/chroot /var/chroot/deb7 /bin/su -c 'cd /var/www/;/usr/bin/nohup /usr/bin/vlc-wrapper $escape_arg > /dev/null & echo $!' www-data\");\n\n\t\t// check if VLC is running\n\t\texec(\"/bin/ps $PID\", $ProcessState);\n\t\tif (count($ProcessState) >= 2)\n\t\t\t\t/* command was successfully started */\n\t\t\t\treturn($PID);\n\t\telse\n\t\t\t\t/* command failed to start */\n\t\t\t\treturn 1;\n}", "title": "" }, { "docid": "10db24370d79610a84bdcd69dee0fa80", "score": "0.5009179", "text": "static function launch()\n\t{\n\t\tif(!(self::$instance instanceof Persistence))\n\t\t{\n\t\t\tself::$instance = new Persistence() ;\n\t\t}\n\t\n\t\treturn self::$instance ;\n\t}", "title": "" }, { "docid": "c08cffb836af3936e42c67c8deba9dce", "score": "0.49945223", "text": "public function restart()\n {\n if (!$this->is('parent') || !$this->is('daemonized'))\n return;\n\n $this->set('shutdown', true);\n $this->log('Restart Happening Now...');\n\n // We want to shutdown workers, release any lock files, and swap out the pid file (as applicable)\n // Basically put this into a walking-dead state by destructing everything while keeping this process alive\n // to actually orchestrate the restart.\n $this->__destruct();\n\n // Close the resource handles to prevent this process from hanging on the exec() output.\n if (is_resource(STDOUT)) fclose(STDOUT);\n if (is_resource(STDERR)) fclose(STDERR);\n if (is_resource(STDIN)) fclose(STDIN);\n // Close the static log handle to prevent it being inherrited by the new process.\n if (is_resource(self::$log_handle)) fclose(self::$log_handle);\n exec($this->command());\n\n // A new daemon process has been created. This one will stick around just long enough to clean up the worker processes.\n exit();\n }", "title": "" }, { "docid": "2927ecdd717fbb545277e347cc397fdf", "score": "0.4988905", "text": "public function spawn()\n\t{\n\t\t// needed for PHP 5.2\n\t\tif(!function_exists('pcntl_signal_dispatch'))\n\t\t\tdeclare(ticks = 1);\n\n\t\t$this->catchSignals();\n\n\t\t$this->_children = array();\n\t\t$parent = getmypid();\n\t\t$this->onStart();\n\n\t\t$this->_logger->info(\"spawning workers\");\n\n\t\t// enter spawn loop\n\t\twhile(!$this->_terminate || count($this->_children))\n\t\t{\n\t\t\t// needed for PHP 5.3\n\t\t\tif(function_exists('pcntl_signal_dispatch'))\n\t\t\t\tpcntl_signal_dispatch();\n\n\t\t\t// if we haven't hit the process limit yet\n\t\t\tif(!$this->_terminate && count($this->_children) < $this->getProcessLimit())\n\t\t\t{\n\t\t\t\t$this->_spawnWorker($this->_children);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// patiently wait for a child to die\n\t\t\t\tif(($pid = pcntl_wait($status, WUNTRACED)) > 0)\n\t\t\t\t{\n\t\t\t\t\tunset($this->_children[$pid]);\n\n\t\t\t\t\t// check the exit code\n\t\t\t\t\tif(pcntl_wexitstatus($status) == self::SPAWN_TERMINATE && !$this->_terminate)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach(array_keys($this->_children) as $pid)\n\t\t\t\t\t\t\tposix_kill($pid, SIGINT);\n\n\t\t\t\t\t\t$this->_terminate = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// if wait fails, check each child\n\t\t\t\t\t$this->_reapWorkers($this->_children);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->_logger->debug(\"workers are finished, terminating\");\n\t\t$this->onTerminate(0);\n\t}", "title": "" }, { "docid": "ddfbbcefdd2841713a555b0fdfc06f7e", "score": "0.49880582", "text": "public function runSymfonyCommandInNewProcess($input)\n {\n $rootDir = $this->kernel->getRootDir();\n $environment = $this->kernel->getEnvironment();\n $input = $rootDir.'/console '.$input.' -e '.$environment;\n $deploymentCommand = new Process($input, null, null, null, null);\n $deploymentCommand->mustRun();\n }", "title": "" }, { "docid": "6ae14d3eda4d681c003221cce73d94a8", "score": "0.49775642", "text": "abstract public function start();", "title": "" }, { "docid": "6ae14d3eda4d681c003221cce73d94a8", "score": "0.49775642", "text": "abstract public function start();", "title": "" }, { "docid": "912ea25a60ac6affcf4c80912cb28f50", "score": "0.4970556", "text": "public function indexAction() {\n\t\tif (PHP_SAPI !== 'cli') {\n\t\t\t// Dispense a new process.\n\t\t\t$process = R::dispense('process');\n\n\t\t\t// Set the command to run\n\t\t\t$process->command = 'php -f ' . $_SERVER[\"SCRIPT_FILENAME\"] . ' test exec';\n\n\t\t\t// Store the process(is needed before running it!)\n\t\t\tR::store($process);\n\n\t\t\t// Run the process\n\t\t\t$process->startProcessWrapper();\n\n\t\t\t// Redirect to the process controller to watch the action!\n\t\t\t$this->_helper->Redirector->gotoSimple('index', 'process', null, array('processId' => $process->id));\n\t\t\n\t\t//Goddamn newbs! You shouldn't run this action as command!\n\t\t} else {\n\t\t\t//Ah well, help them out then!\n\t\t\t$this->_helper->layout()->disableLayout();\n\t\t\t$this->_helper->viewRenderer->setNoRender(true);\n\t\t\t\n\t\t\tpassthru('php -f ' . $_SERVER[\"SCRIPT_FILENAME\"] . ' test exec');\n\t\t}\n\t}", "title": "" }, { "docid": "4cab809f13a4908469e0cca6b6c90423", "score": "0.49582082", "text": "abstract protected function _launch();", "title": "" }, { "docid": "3b32923a20022c02ae64a89557387485", "score": "0.49444407", "text": "public function runParent($pid) {\n \\PhpTaskDaemon\\Daemon\\Logger::log('Spawning child process: ' . $pid . '!', \\Zend_Log::NOTICE);\n\n try {\n echo \"Checking child count: \" . $this->_childCount . \"/\" . $this->_maxProcess . \"\\n\";\n if ($this->_childCount >= $this->_maxProcess) {\n while (pcntl_waitpid(0, $status) != -1) {\n $status = pcntl_wexitstatus($status);\n echo \"Child $status completed\\n\";\n $this->_childCount--;\n }\n }\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "6cb4e05414a79d945d07432487e38712", "score": "0.49442258", "text": "protected function do_fork(){\n \n $this->log(\" Master pid is $this->pid\");\n\n ForkProtector::shutdown();\n $pid = pcntl_fork();\n ForkProtector::recover();\n\n if ($pid == -1) {\n throw new Exception('Fork impossible');\n } else if ($pid > 0) {\n // Master thread\n $this->current_thread_name = \"MASTER\";\n $this->pid = $pid;\n $this->time_start = microtime(true);\n $this->has_executed = false;\n $this->has_ended = false;\n $this->log(\":\\t-> started a new child $this->pid\");\n } else {\n /*\n * Child thread\n */\n $this->current_thread_name = \"CHILD\";\n $this->pid = getmypid();\n $this->log(\":\\t-> started with pid $this->pid\");\n }\n }", "title": "" }, { "docid": "0223b69aefe36dff749accf63100497d", "score": "0.49407944", "text": "protected function makeBackgroundCommandProcessForMaster($script)\n {\n $parameters = $this->getMaster()->getConnection()->getParameters();\n $scriptPath = __DIR__;\n\n return new PhpProcess(\"\n <?php\n require_once '$scriptPath/../../vendor/autoload.php';\n\n \\$client = new Predis\\Client([\n 'scheme' => '{$parameters->scheme}',\n 'host' => '{$parameters->host}',\n 'port' => {$parameters->port},\n 'database' => {$parameters->database},\n ]);\n\n \\$client->ping();\n\n echo '\" . self::BACKGROUND_PROCESS_READY_BEACON . \"';\n flush();\n\n $script\n ?>\n \");\n }", "title": "" }, { "docid": "28ee788d28865d28296388c47296a52d", "score": "0.493977", "text": "public function start(array $args = []): void\n\t{\t\n if (! self::$envPassed)\n self::_checkRequirements();\n \n\t\t$this->started = true; // flag the task has having begun.\n $pid = @pcntl_fork();\n if ($pid == -1) \n throw new \\Exception('pcntl_fork() returned a status of -1. No new process was created');\n \t\t\n if ($pid) \n\t\t{\n // parent process receives the pid.\n $this->setPID($pid);\n }\n else \n\t\t{\n\t\t\t// child process entry point.\n\t\t\t$this->isParent = false;\t\n $pid = getmypid();\n if ($pid === false) {\n throw new \\Exception(\"Unable to retrieve child process ID.\");\n }\n $this->setPID($pid);\n Dispatcher::_clear();\n \n self::$currentPID = (string)$this->pid();\t\t\n\t\t\t\n // child\n pcntl_signal(SIGTERM, array($this, 'signalHandler'));\n \n register_shutdown_function(function() {\n $key = $this->key(self::pCHILD);\n if (apcu_exists($key))\n apcu_delete($key); // remove any store data destined for the child.\n detach_kill();\n });\n \n $r = $this->run(...$args); //println('send to parent');\n\t\t\t$this->sendToParent($r);\n\t\t\t\n exit;\n }\n }", "title": "" }, { "docid": "61eec880a0fa4019b39b75a5c564ae29", "score": "0.49060008", "text": "public function addProcess(swoole_process $process) {}", "title": "" }, { "docid": "03c767a0f6fda2e45e550258cbfced64", "score": "0.49018162", "text": "public function closeProcess();", "title": "" }, { "docid": "945d6961e64fcf75943757e4de97b53e", "score": "0.4898929", "text": "public function getProcess(Process $process, $withArguments = true, $withType = false)\n {\n $pgrep = clone $this->pgrep;\n $pgrep->addArgument(new Argument('a', null, false));\n $pgrep->addArgument(new Argument('f', $process->getPattern($withArguments, $withType), false));\n\n $pids = $pgrep->exec();\n $list = [];\n\n foreach ($pids as $pid) {\n $tmp = explode(' ', $pid);\n if (!isset($tmp[0]) || !is_numeric($tmp[0])) {\n continue;\n }\n\n $data = new \\stdClass();\n $data->id = array_shift($tmp);\n $data->name = implode(' ', $tmp);\n $list[] = $data;\n }\n\n return $list;\n }", "title": "" }, { "docid": "78eca5486a974bf6c513bbdf5e5ccff4", "score": "0.4896039", "text": "public function execute(bool $async = false, ?array $stdin = null, ?array $stdout = null, ?array $stderr = null): self\n {\n if ($this->isRunning()) {\n throw new RuntimeException('Process is already running.');\n }\n\n $this->descriptors = $this->prepareDescriptors($stdin, $stdout, $stderr);\n $this->processStartTime = microtime(true);\n\n $this->process = proc_open(\n $this->command,\n $this->descriptors,\n $this->pipes,\n $this->cwd,\n $this->env,\n $this->otherOptions\n );\n $this->setInput();\n\n // @codeCoverageIgnoreStart\n if (!is_resource($this->process)) {\n throw new RuntimeException('Bad program could not be started.');\n }\n // @codeCoverageIgnoreEnd\n\n $this->state = self::STATE_STARTED;\n\n $this->updateProcessStatus();\n\n if ($this->async = $async) {\n $this->setOutputStreamNonBlocking();\n } else {\n $this->wait();\n }\n\n return $this;\n }", "title": "" }, { "docid": "7b0bdfc792304a848de52d03feae3829", "score": "0.4891202", "text": "public function start()\n\t{\n\t\tif ($this->_state == self::Running)\n\t\t\treturn $this;\n\n\t\t$this->createTimeEntry(self::Start);\n\t\t$this->_state = self::Running;\n\n\t\treturn $this;\n\t}", "title": "" } ]
90ec97d3c965cd014cc69e03ad07aa06
Apply criteria from selection.
[ { "docid": "076aa45d6f40d1c6295f0c3acb9fabd0", "score": "0.51452434", "text": "protected function applyCriteriaFromSelection(Matcher $matcher)\n {\n\n $selectionIdentifier = (int)$this->settings['selection'];\n if ($selectionIdentifier > 0) {\n\n /** @var SelectionRepository $selectionRepository */\n $selectionRepository = $this->getObjectManager()->get(SelectionRepository::class);\n\n /** @var Selection $selection */\n $selection = $selectionRepository->findByUid($selectionIdentifier);\n $queryParts = json_decode($selection->getQuery(), TRUE);\n $matcher = $this->parseQuery($queryParts, $matcher, $this->dataType);\n }\n return $matcher;\n }", "title": "" } ]
[ { "docid": "a7858fe9d37e166ba4961869bbe54808", "score": "0.603283", "text": "public function applySelect(){\n $this->criteria->select=$this->pluck($this->columns, 'name');\n\n return $this;\n }", "title": "" }, { "docid": "312868ab9a28e364ce201b2f5f6f44fe", "score": "0.58519673", "text": "protected function applyCriteria()\n {\n if ($this->skipCriteria === true) {\n return $this;\n }\n $criteria = $this->getCriteria();\n if ($criteria) {\n foreach ($criteria as $c) {\n if ($c instanceof CriteriaContract) {\n $this->query = $c->apply($this->query, $this);\n }\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "6d268ca52fbbf37cccb51f832c5d470b", "score": "0.5775971", "text": "abstract public function getCriteria();", "title": "" }, { "docid": "c218c259ef5a4061327a67f5fbf5849d", "score": "0.5670421", "text": "abstract public function select( Map $criteria, SortOptions $sortOptions, DataPage $dataPage );", "title": "" }, { "docid": "f43b76b2b37b559b43c42cdf6f11a242", "score": "0.55819863", "text": "public function applySelectionOnTargetProvider()\n {\n $selected = $this->request->getParam(static::SELECTED_PARAM);\n $excluded = $this->request->getParam(static::EXCLUDED_PARAM);\n if ('false' === $excluded) {\n return;\n }\n $dataProvider = $this->getDataProvider();\n try {\n if (is_array($excluded) && !empty($excluded)) {\n $this->filterBuilder->setConditionType('nin')\n ->setField($dataProvider->getPrimaryFieldName())\n ->setValue($excluded);\n $dataProvider->addFilter($this->filterBuilder->create());\n } elseif (is_array($selected) && !empty($selected)) {\n $this->filterBuilder->setConditionType('in')\n ->setField($dataProvider->getPrimaryFieldName())\n ->setValue($selected);\n $dataProvider->addFilter($this->filterBuilder->create());\n }\n } catch (\\Exception $e) {\n throw new LocalizedException(__($e->getMessage()));\n }\n }", "title": "" }, { "docid": "7521edcd712091ddf70b83be60144d25", "score": "0.5557091", "text": "public function getCriteriaCopy();", "title": "" }, { "docid": "339e3c2c9039e3e648f192dc453d8082", "score": "0.55509776", "text": "function map_select_process($t, $xml_slice) {\n //global $select_clause_criterion;\n global $select_clause_quote_criterion;\n global $select_clause_quote_condition;\n global $select_clause_func_criterion;\n global $select_clause_func_condition;\n global $select_clause_parc_criterion;\n global $select_clause_parc_condition;\n\n $xpath = new DOMXPath($xml_slice);\n\n $select_crt = $select_clause_quote_criterion[0];\n $select_crt_xpath = \"//criterion[@id='$select_crt']\";\n $select_crt_check = $xpath->query($select_crt_xpath);\n $select_check = $select_crt_check->length;\n if($select_check == 0) {\n\t// out xml slice doesn't have Select clause class\n\treturn false;\n } else {\n\t$quote = $t->process->quote;\n\t$func = $t->process->func;\n\t$parc = $t->process->parc;\n\tif(is_bool($quote)) {\n\t $quote = conv_bool_to_str($quote);\n\t}\n\tif(is_bool($func)) {\n\t $func = conv_bool_to_str($func);\n\t}\n\tif(is_int($parc)) {\n\t $parc = strval($parc);\n\t}\n\n\t$select_quote_cond = $select_clause_quote_condition[$quote];\n\t$select_func_cond = $select_clause_func_condition[$func];\n\t$select_parc_cond = $select_clause_parc_condition[$parc];\n\n\t$select_quote_crt = $select_clause_quote_criterion[0];\n\t$select_func_crt = $select_clause_func_criterion[0];\n\t$select_parc_crt = $select_clause_parc_criterion[0];\n\n\t$select_quote_xpath = \"//criterion[@id='$select_quote_crt']/condition[@value='$select_quote_cond']\";\n\t$select_func_xpath = \"//criterion[@id='$select_func_crt']/condition[@value='$select_func_cond']\";\n\t$select_parc_xpath = \"//criterion[@id='$select_parc_crt']/condition[@value='$select_parc_cond']\";\n\n\t$select_quote_check = $xpath->query($select_quote_xpath);\n\t$select_func_check = $xpath->query($select_func_xpath);\n\t$select_parc_check = $xpath->query($select_parc_xpath);\n\n\t$quote_check = $select_quote_check->length;\n\t$func_check = $select_func_check->length;\n\t$parc_check = $select_parc_check->length;\n\n\t/*\n\techo $quote .\"\\n\";\n\techo $func .\"\\n\";\n\techo $parc .\"\\n\\n\";\n\n\techo $select_quote_xpath .\"\\n\";\n\techo $select_func_xpath .\"\\n\";\n\techo $select_parc_xpath .\"\\n\\n\";\n\n\techo $quote_check .\"\\n\";\n\techo $func_check .\"\\n\";\n\techo $parc_check .\"\\n\";\n\t*/\n\n\tif($quote_check > 1 || $func_check > 1 || $parc_check > 1) {\n\t die(\"wrong xml or mapping select function\");\n\t} else if($quote_check == 1 && $func_check == 1 && $parc_check == 1) {\n\t return true;\n\t} else {\n\t return false;\n\t}\n }\n}", "title": "" }, { "docid": "1469caa083471dbf3d5de7d257223599", "score": "0.5532455", "text": "public function getCriteria();", "title": "" }, { "docid": "1469caa083471dbf3d5de7d257223599", "score": "0.5532455", "text": "public function getCriteria();", "title": "" }, { "docid": "ec93b333715129bb7fce9724337f405e", "score": "0.5434217", "text": "public function setCriteria() {\n \n $this->rows\n ->where('t.list_id', '=', $this->list_id)\n ->where('t.item_id', '=', $this->item_id)\n ->where('t.task_type_id', '!=', \\App\\Http\\Controllers\\TasksController::TASK_TYPE_INFO);\n \n }", "title": "" }, { "docid": "f026eed520c54fc54b4720332c7147fd", "score": "0.5410364", "text": "abstract public function handle( CriteriaConverter $converter, \\ezcQuerySelect $query, Criterion $criterion );", "title": "" }, { "docid": "75e27bcb0e93badf5c566ad96a11030e", "score": "0.53402096", "text": "protected function _applyCollectionFilters(DbAdapter\\Select $select)\n {\n if (!empty($this->_fieldsToFilter)) {\n foreach ($this->_fieldsToFilter as $filter) {\n $select->where($filter['pairs'], $filter['condition']);\n }\n }\n }", "title": "" }, { "docid": "ba7e13cc3ec72814ab6eaf08d1d97d67", "score": "0.53205836", "text": "abstract public function fetchCriteria();", "title": "" }, { "docid": "f674d5e0e80908b03b8203726adb8d06", "score": "0.5257194", "text": "public function doSelect() {\r\n\t\t$v = $this->valueObject->getVariable();\r\n\t\t$where[] = array('variable'=>$v);\r\n\t\t$this->valueObject->getQueryObject()->setWhere($where);\r\n\t\t$result = $this->getDBFactory()->doSelect($this->valueObject);\r\n\t}", "title": "" }, { "docid": "f124ce269bdd9bf7cd30116278cdccc0", "score": "0.5234565", "text": "public static function apply(Select $select, Criteria $criteria)\n {\n $maxResults = $criteria->getMaxResults();\n if ($maxResults !== null) {\n $select->limit($maxResults);\n }\n\n $firstResult = $criteria->getFirstResult();\n if ($firstResult !== null) {\n $select->offset($firstResult);\n }\n\n $orderings = $criteria->getOrderings();\n if ($orderings !== null) {\n $zendDbOrder = array();\n foreach ($orderings as $field => $order) {\n $zendDbOrder[$field] = self::convertOrder($order);\n }\n $select->order($zendDbOrder);\n }\n\n return $select;\n }", "title": "" }, { "docid": "3baf3a011cd342799587d1f9cf6d1205", "score": "0.5132653", "text": "public static function doSelect()\n\t{\n $palabras=\"video\";\n\n\n $c= new Criteria();\n \n //Obtener Articulos\n $cton = $c->getNewCriterion(ArticuloPeer::NOMBRE,'%'.$palabras.'%',CRITERIA::LIKE);\n $cton->addOr( $c->getNewCriterion(ArticuloPeer::DESCRIPCION, '%'.$palabras.'%',CRITERIA::LIKE));\n //$cton->addOr( $c->getNewCriterion(ArchivoPeer::TAGS, '%'.$palabras.'%',CRITERIA::LIKE));\n $c->add($cton);\n \n \n $result_art= ArticuloPeer::doSelect($c);\n\n $c= new Criteria();\n //Obtener Archivos\n \n $cton = $c->getNewCriterion(ArchivoPeer::NOMBRE,'%'.$palabras.'%',CRITERIA::LIKE);\n $cton->addOr( $c->getNewCriterion(ArchivoPeer::DESCRIPCION, '%'.$palabras.'%',CRITERIA::LIKE));\n //$cton->addOr( $c->getNewCriterion(TipoPeer::NOMBRE, '%'.$palabras.'%',CRITERIA::LIKE));\n $c->add($cton);\n\n \n $result_arch= ArchivoPeer::doSelect($c);\n\n $c= new Criteria();\n //Obtener Galerias\n /*\n $cton = $c->getNewCriterion(GaleriaPeer::NOMBRE,'%'.$palabras.'%',CRITERIA::LIKE);\n $cton->addOr( $c->getNewCriterion(GaleriaPeer::DESCRIPCION, '%'.$palabras.'%',CRITERIA::LIKE));\n $c->add($cton);\n *\n */\n $result_gale= GaleriaPeer::doSelect($c);\n\n $c= new Criteria();\n //Obtener Fotos\n /*\n $cton = $c->getNewCriterion(FotoPeer::NOMBRE,'%'.$palabras.'%',CRITERIA::LIKE);\n $cton->addOr( $c->getNewCriterion(FotoPeer::DESCRIPCION, '%'.$palabras.'%',CRITERIA::LIKE));\n $c->add($cton);\n *\n */\n $result_fotos= FotoPeer::doSelect($c);\n\n $c= new Criteria();\n //Obtener Sitios\n /*\n $cton = $c->getNewCriterion(SitioPeer::NOMBRE,'%'.$palabras.'%',CRITERIA::LIKE);\n $cton->addOr( $c->getNewCriterion(SitioPeer::DESCRIPCION, '%'.$palabras.'%',CRITERIA::LIKE));\n $cton->addOr( $c->getNewCriterion(SitioPeer::DIRECCION, '%'.$palabras.'%',CRITERIA::LIKE));\n $c->add($cton);\n * \n */\n $result_sitio= SitioPeer::doSelect($c);\n\n $result = array();\n //Convertir todos los resultados a resultado\n Foreach($result_art as $art)\n {\n $resul= new Resultado($art,'Archivo');\n $result[] = $resul;\n \n }\n Foreach($result_arch as $arch)\n {\n $resul= new Resultado($arch,'Archivo');\n $result[] = $resul;\n\n }\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "90f4c48991415be3be7df41d7171e8b6", "score": "0.51151735", "text": "protected function setItemSelectionCriteria()\n {\n /** Parameter Array */\n $parameter_array = $this->runtime_data->route->parameter_array;\n\n $tag_parameter = '';\n $category_parameter = '';\n $name_parameter = '';\n\n if (count($parameter_array) > 0) {\n\n foreach ($parameter_array as $parameter) {\n\n $temp = explode('=', $parameter);\n\n if (count($temp) == 2) {\n\n if ($temp[0] == 'category') {\n $category_parameter = $temp[1];\n\n } elseif ($temp[0] == 'tag') {\n $tag_parameter = $temp[1];\n\n } elseif ($temp[0] == 'name') {\n $name_parameter = $temp[1];\n }\n }\n }\n }\n\n return array(\n 'tag_parameter' => $tag_parameter,\n 'category_parameter' => $category_parameter,\n 'name_parameter' => $name_parameter\n );\n }", "title": "" }, { "docid": "1c08c30e27fc47e97ba0add851244ea8", "score": "0.50993776", "text": "function matching(Criteria $criteria);", "title": "" }, { "docid": "5d85a933e4a4fee58e644c11bdb457dd", "score": "0.5089809", "text": "function SelectAllWithCriteria($criteria) \n {\n $query = \"SELECT * FROM $this->tableName WHERE \" . $criteria;\n parent::SetQuery($query);\n parent::DoQuery();\n }", "title": "" }, { "docid": "d5e6e9c9a3ad395ada7f12de80a6e71f", "score": "0.5071319", "text": "public function set_selection_filter($condition)\n {\n $this->selection_filter = $condition;\n }", "title": "" }, { "docid": "3b3143e069d6256cbf840232bd42298f", "score": "0.50713176", "text": "function mergeFilterCriteriaObjects($criteria);", "title": "" }, { "docid": "2ba5742fbd1d5b68f64526071ea91b21", "score": "0.5064058", "text": "public function applyQuery()\n {\n\n if ($this->querySkip) {\n return $this;\n }\n\n foreach($this->criteria as $query) {\n if ($query instanceof Query) {\n $this->model = $query->apply($this->model, $this);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "0d09f8c784d87f66d44a5029f205b8d1", "score": "0.50443345", "text": "function makeselection($criteria)\n{\n\tglobal $smarty;\t//print_r($criteria);\n\tif(in_array(\"IP\",$criteria))\n \t{\n \t\t$sellist[\"ip\"]=\"true\";\n \t\t$ip=getIpCity(\"\");\n \t\t$smarty->assign('ip',$ip);\t\n \t}\n \tif(in_array(\"LOCATION\",$criteria))\n \t{\n \t\t$sellist[\"location\"]=\"true\";\n\t\t$loc_ctryarr = getLocCountry(\"\");\n\t\t//print_r($loc_ctryarr);\n\t\t$smarty->assign(\"loc_ctryarr\",getLocCountry(\"\"));\n \t$smarty->assign(\"loc_Incityarr\",getLocInCity(\"\"));\n \t$smarty->assign(\"loc_Uscityarr\",getLocUsCity(\"\"));\n \t}\n if(in_array(\"SUBSCRIPTION\",$criteria))\n {\n $sellist[\"mem\"]=\"true\";\n $mem=getMEM(\"\");//print_r($mem);\n $smarty->assign('mem',$mem);\n }\n\tif(in_array(\"MARITALSTATUS\",$criteria))\n {\n $sellist[\"mstatus\"]=\"true\";\n $mstatus=getMStatus(\"\");//print_r($mem);\n $smarty->assign('mstatus',$mstatus);\n }\n\tif(in_array(\"RELIGION\",$criteria))\n {\n $sellist[\"rel\"]=\"true\";\n $rel=getREL(\"\");//print_r($mem);\n $smarty->assign('rel',$rel);\n }\n\tif(in_array(\"EDUCATION\",$criteria))\n {\n $sellist[\"edu\"]=\"true\";\n $edu=getEDU(\"\");//print_r($mem);\n $smarty->assign('edu',$edu);\n }\n\tif(in_array(\"COMMUNITY\",$criteria))\n {\n $sellist[\"com\"]=\"true\";\n $com=getCOM(\"\");//print_r($mem);\n $smarty->assign('com',$com);\n }\n\tif(in_array(\"OCCUPATION\",$criteria))\n {\n $sellist[\"occ\"]=\"true\";\n $occ=getOCC(\"\");//print_r($mem);\n $smarty->assign('occ',$occ);\n }\n\n \tif(in_array(\"INCOME\",$criteria))\n \t{\n \t\t$sellist[\"ctc\"]=\"true\";\n \t\t$ctc=getCtc(\"\");\n \t\t$smarty->assign('ctc',$ctc);\n \t}\n\t//added by lavesh rawat\n global $vdArray,$profileStatus,$mailID,$eoiStatus,$registrationStatus,$ftoState_array,$ftoExpiry_array,$profileCompletionState_array;\n\n \tif(in_array(\"VARIABLE_DISCOUNT\",$criteria))\n \t{\n \t\t$sellist[\"vd\"]=\"true\";\n \t\t$smarty->assign('vd',getDropDownsArr(\"\",$vdArray));\n \t}\n \tif(in_array(\"PROFILE_STATUS\",$criteria))\n \t{\n \t\t$sellist[\"profileStatus\"]=\"true\";\n \t\t$smarty->assign('profileStatus',getDropDownsArr(\"\",$profileStatus));\n \t}\n \tif(in_array(\"GMAIL_ID\",$criteria))\n \t{\n \t\t$sellist[\"jsMailID\"]=\"true\";\n \t\t$smarty->assign('jsMailID',getDropDownsArr(\"\",$mailID));\n \t}\n \tif(in_array(\"EOI_STATUS\",$criteria))\n \t{\n \t\t$sellist[\"jsEoiStatus\"]=\"true\";\n \t\t$smarty->assign('jsEoiStatus',getDropDownsArr(\"\",$eoiStatus));\n \t}\n \tif(in_array(\"REGISTRATION_STATUS\",$criteria))\n \t{\n \t\t$sellist[\"jsRegistrationStatus\"]=\"true\";\n \t\t$smarty->assign('jsRegistrationStatus',getDropDownsArr(\"\",$registrationStatus));\n \t}\n \tif(in_array(\"FTO_STATE\",$criteria))\n \t{\n \t\t$sellist[\"jsFtoStatus\"]=\"true\";\n \t\t$smarty->assign('jsFtoStatus',getDropDownsArr(\"\",$ftoState_array));\n \t}\n \tif(in_array(\"FTO_EXPIRY\",$criteria))\n \t{\n \t\t$sellist[\"jsFtoExpiry\"]=\"true\";\n \t\t$smarty->assign('jsFtoExpiry',getDropDownsArr(\"\",$ftoExpiry_array));\n \t}\n \tif(in_array(\"PROFILE_COMPLETE_STATE\",$criteria))\n \t{\n \t\t$sellist[\"jsProfileCompletionState\"]=\"true\";\n \t\t$smarty->assign('jsProfileCompletionState',getDropDownsArr(\"\",$profileCompletionState_array));\n \t}\n\t//added by lavesh rawat\n\n \tif(in_array(\"AGE\",$criteria))\n \t{\n \t\t$sellist[\"age\"]=\"true\";\n \t\t$age=getAge();\n\t\t$smarty->assign('age',$age);\n \t}\n \tif(in_array(\"GENDER\",$criteria))\n \t{\n \t\t$sellist[\"gender\"]=\"true\";\n \t}\n \tif(in_array(\"PROPCITY\",$criteria))\n {\n $sellist[\"propcity\"]=\"true\";\n $propcity=getPROPCITY(\"\");//print_r($mem);\n $smarty->assign('propcity',$propcity);\n }\n\tif(in_array(\"PROPINR\",$criteria))\n {\n $sellist[\"propinr\"]=\"true\";\n\t\t$sellist[\"propcat\"]=\"true\";\n $propinr=getPROPBUDGET(\"\");//print_r($mem);\n\t\t$proprentinr = getPROPINRRENT(\"\");\n\t\t$smarty->assign('proprentinr',$proprentinr);\n $smarty->assign('propinr',$propinr);\n\t\t$smarty->assign('propcat',$propcat);\n }\n\tif(in_array(\"PROPTYPE\",$criteria))\n {\n $sellist[\"proptype\"]=\"true\";\n //$proptype=getPROPTYPE(\"\");\n $smarty->assign('proptype',$proptype);\n }\n\tif(in_array(\"PROPCAT\",$criteria))\n {\n $sellist[\"propcat\"]=\"true\";\n $smarty->assign('propcat',$propcat);\n }\n\t\n\t$selstr=serialize($sellist);\n \t$selstr=urlencode($selstr); \t \n\t\n \t$critstr=serialize($criteria);\n \t$critstr=urlencode($critstr);\t\t\n\t$smarty->assign('critstr',$critstr);\t\t\n\t$smarty->assign('selstr',$selstr);\t\n\t$smarty->assign('sellist',$sellist);\t\n}", "title": "" }, { "docid": "57d30ca6387111725dc8adfef0fa3864", "score": "0.496469", "text": "abstract public function getCriteria(DBaseModelSearch $search);", "title": "" }, { "docid": "def1a27c563e9904df2e5a0a17f603ff", "score": "0.4941633", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}", "title": "" }, { "docid": "def1a27c563e9904df2e5a0a17f603ff", "score": "0.4941633", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}", "title": "" }, { "docid": "8e84e914c8a08f083794d0a0090ac8d1", "score": "0.49134076", "text": "function criteria(&$query){\n $id = $this->input->post('id', true);\n $k = $this->input->post('k', true);\n $n = $this->input->post('n', true);\n $v1 = $this->input->post('v1', true);\n $v2 = $this->input->post('v2', true);\n if(!empty($id)){/*where like include: before(%pattern), after(pattern%) and both(%pattern%)*/\n $query = $query->like('id', $id, 'both');\n }\n if(!empty($k)){\n $query = $query->like('apply_key', $k, 'both');\n }\n if(!empty($n)){\n $query = $query->like('apply_name', $n, 'both');\n }\n if(!empty($v1)){\n $query = $query->like('apply_value', $v1, 'both');\n }\n if(!empty($v2)){\n $query = $query->like('apply_value2', $v2, 'both');\n }\n }", "title": "" }, { "docid": "8de7fa5fc81ad588f7ad52d022fa7f07", "score": "0.49116188", "text": "public function setupCriteria()\n {\n }", "title": "" }, { "docid": "e5d29a9d1c3df83101a09eabfc86f978", "score": "0.48738745", "text": "private function _getSelectResult() {\n $items = $this->body->SelectResult->Item();\n\n if ( $items ) {\n foreach ( $items as $item ) {\n $this->_items[(string)$item->Name] = $this->_getObject($item->Attribute);\n }\n }\n }", "title": "" }, { "docid": "30ab82a50e8491bcea99c9cbe380f474", "score": "0.48500958", "text": "public static function doSelect(Criteria $criteria, PropelPDO $con = null)\n\t{\n\t\treturn AmendmentsubmissionqcSearchPeer::populateObjects(AmendmentsubmissionqcSearchPeer::doSelectStmt($criteria, $con));\n\t}", "title": "" }, { "docid": "166757fb6c4ae5587775b152ac9841cd", "score": "0.48453808", "text": "public function select(PassiveRecord &$Model);", "title": "" }, { "docid": "d2cf18bb90fd437c5add0d623053816b", "score": "0.48377514", "text": "public function allSelect();", "title": "" }, { "docid": "ca36431fe78a2e2fe6baf9382ecce8cd", "score": "0.48336646", "text": "public function apply($selector);", "title": "" }, { "docid": "5ac4d6e37ea7cc21c74498cc7ffc3c2e", "score": "0.48330504", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "5ac4d6e37ea7cc21c74498cc7ffc3c2e", "score": "0.48330504", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "5ac4d6e37ea7cc21c74498cc7ffc3c2e", "score": "0.48330504", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "5ac4d6e37ea7cc21c74498cc7ffc3c2e", "score": "0.48330504", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "5ac4d6e37ea7cc21c74498cc7ffc3c2e", "score": "0.48330504", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "6759f96c6dcba7fb47e73b44f3bfdb5d", "score": "0.48321432", "text": "protected function add_where_on_select() : Database_model\n\t{\n\t\treturn $this->where_deleted()->where_can_read();\n\t}", "title": "" }, { "docid": "5b58b5117c37f64c4c07b3b08d3e44de", "score": "0.48257497", "text": "public function getCriteria()\n {\n return collect();\n }", "title": "" }, { "docid": "554f9b09f46ded199b622f1303fe3380", "score": "0.478433", "text": "protected function applyCriteria(CriteriaBuilder $builder) {\n foreach ($builder->getCriterias() as $criteria) {\n $this->entity = $criteria->apply($this->entity);\n }\n return $this;\n }", "title": "" }, { "docid": "cb91d1312331712b739d23d369386035", "score": "0.4782855", "text": "public function convertCriteria( \\ezcQuerySelect $query, Criterion $criterion )\n {\n foreach ( $this->handler as $handler )\n {\n if ( $handler->accept( $criterion ) )\n {\n return $handler->handle( $this, $query, $criterion );\n }\n }\n\n throw new \\RuntimeException( 'No conversion for criterion found.' );\n }", "title": "" }, { "docid": "5088e26387f96935a43485c3c7817eb7", "score": "0.47610962", "text": "public function apply($model, $searchValue, $operator);", "title": "" }, { "docid": "19bc5e781117be1cc617c75146045c74", "score": "0.47570464", "text": "abstract public function accept( Criterion $criterion );", "title": "" }, { "docid": "6292c4518726b6660bf109e0bc84e25b", "score": "0.47536185", "text": "public function applyConditions($conditions)\n {\n if(count($conditions) == 0)\n {\n $this->setPoints(intval($this->getItem()->getDistance()));\n \n return null;\n }\n \n foreach($conditions as $condition)\n {\n $apply = true;\n \n foreach($condition->getRequirement() as $requirement)\n {\n switch($requirement['condition'])\n {\n case 'always':\n $apply = $apply & true;\n break;\n case 'is_author':\n $apply = $apply & $this->getItem()->getAuthor() == $this->getUser();\n break;\n case 'mt_distance':\n $apply = $apply & $this->getItem()->getDistance() > $requirement['value'];\n break;\n case 'lt_distance':\n $apply = $apply & $this->getItem()->getDistance() < $requirement['value'];\n break;\n case 'mt_uphill':\n $apply = $apply & $this->getItem()->getUphill() > $requirement['value'];\n break;\n case 'lt_uphill':\n $apply = $apply & $this->getItem()->getUphill() < $requirement['value'];\n break;\n case 'is_easy':\n $apply = $apply & $this->getItem()->getDifficulty() == 'easy';\n break;\n case 'is_moderate':\n $apply = $apply & $this->getItem()->getDifficulty() == 'moderate';\n break;\n case 'is_hard':\n $apply = $apply & $this->getItem()->getDifficulty() == 'hard';\n break;\n case 'is_veryhard':\n $apply = $apply & $this->getItem()->getDifficulty() == 'very hard';\n break;\n case 'is_expertsonly':\n $apply = $apply & $this->getItem()->getDifficulty() == 'experts only';\n break;\n case 'role':\n $apply = $apply & $this->getUser()->getRole()->getId() == $requirement['value'];\n break;\n case 'category':\n if($this->getItem()->getCategory())\n {\n $apply = $apply & $this->getItem()->getCategory()->getId() == $requirement['value'];\n } \n else\n {\n $apply = false;\n }\n \n break;\n default:\n $apply = false;\n break;\n }\n }\n \n if($apply)\n {\n switch($condition->getOperator())\n {\n case '+':\n $this->setPoints($this->getPoints() + $condition->getValue());\n break;\n \n case '-':\n $this->setPoints($this->getPoints() - $condition->getValue());\n break;\n \n case '*':\n $this->setPoints($this->getPoints() * $condition->getValue());\n break;\n \n case '/':\n $this->setPoints($this->getPoints() / $condition->getValue());\n break;\n \n case '=':\n $this->setPoints($condition->getValue());\n break;\n }\n \n //STOP checking for more conditions\n if(!$condition->getGather())\n {\n break;\n }\n }\n }\n }", "title": "" }, { "docid": "e6b17a25e84833ca0d18d39aa9314162", "score": "0.47492924", "text": "public function selected()\n {\n $year = $_POST['year'];\n $province = $_POST['province'];\n $param = array();\n $where = array();\n $items = null;\n $info = new Info();\n if (isset($_POST[\"tables\"])) {\n $tables = $this->tableSelector($_POST['tables']);\n $info->setJoinTables($tables);\n }\n\n\n if ($year === \"all\" && $province === \"all\") {\n $items = $info->fetchAll();\n } else if ($year == \"all\") {\n\n $where = array(' PROVINCE = :PROVINCE');\n $param = array(':PROVINCE' => $province);\n $items = $info->where($where, $param)->fetchAll();\n\n } else if ($province == \"all\") {\n $where = array('CAL_YEAR = :CAL_YEAR');\n $param = array(':CAL_YEAR' => $year);\n $items = $info->where($where, $param)->fetchAll();\n } else {\n $where = array('CAL_YEAR = :CAL_YEAR', ' and PROVINCE = :PROVINCE');\n $param = array(':CAL_YEAR' => $year, ':PROVINCE' => $province);\n\n\n $items = $info->where($where, $param)->fetchAll();\n\n }\n\n\n $this->assign('entities', $items);\n $this->assign('title', 'Data selected');\n $this->render();\n\n }", "title": "" }, { "docid": "e09c6a06b0998f649273b16a4afafa56", "score": "0.4747428", "text": "public static function doSelect(Criteria $criteria, PropelPDO $con = null)\n {\n return ActionPropertyPeer::populateObjects(ActionPropertyPeer::doSelectStmt($criteria, $con));\n }", "title": "" }, { "docid": "55bafe1fb7a944d5bd023c74029aa237", "score": "0.4734906", "text": "public function run()\n {\n $criteria = [\n ['phase' => 1, 'criterion' => 'Creatividad/originalidad', 'priority'=>5],\n ['phase' => 1, 'criterion' => 'Calidad nutricional de los ingredientes', 'priority'=>4],\n ['phase' => 1, 'criterion' => 'Aprovechamiento de los ingredientes', 'priority'=>3],\n ['phase' => 1, 'criterion' => 'Versatilidad', 'priority'=>2],\n ['phase' => 1, 'criterion' => 'Costo de los ingredientes', 'priority'=>1],\n\n ['phase' => 2, 'criterion' => 'Técnicas', 'priority'=>5],\n ['phase' => 2, 'criterion' => 'Presentación', 'priority'=>4],\n ['phase' => 2, 'criterion' => 'Tiempo de elaboración', 'priority'=>3],\n ['phase' => 2, 'criterion' => 'Higiene', 'priority'=>2],\n ['phase' => 2, 'criterion' => 'Utilización del espacio físico', 'priority'=>1],\n ];\n\n DB::table('criteria')->insert($criteria);\n }", "title": "" }, { "docid": "e3a036ea55fe3fdee1e3df7bc05baad2", "score": "0.47290108", "text": "protected function selectData($where_clause=false)\n {\n // used by both view and view-id so reveal all needed columns\n // $query = \"SELECT a.empl_infraction_id, a.employee_id, a.policy_id, a.description, a.date_received, a.sanction, b.policy_code FROM employee_infraction a LEFT JOIN policies b ON a.policy_id = b.policy_id\";\n $query =\"SELECT a.ob_id, a.org_id, a.employee_id, a.start_date, a.end_date, a.purpose, a.location, a.status, a.sup_approved_by, a.sup_approved_date, a.sup_rejected_by, a.sup_rejected_date, a.man_approved_by, a.man_approved_date, a.man_rejected_by, a.man_rejected_date, b.firstname, b.middlename, b.lastname FROM ob_applications a INNER JOIN employees b ON a.employee_id = b.employee_id\";\n\n if ('SUPERVISORS' == $this->session['level'])\n {\n $user_id = $this->session['user_id'];\n if (!empty($where_clause))\n $where_clause .= ' AND ';\n // $where_clause .= \"((a.sup_approved_by = $user_id AND a.status != 'REJECTED') OR (a.sup_rejected_by = $user_id AND a.status NOT IN ('MAN-APPROVED', 'SUP-APPROVED')))\";\n\n $where_clause .= \"(a.employee_id = \".$this->session['employee_id'].\" OR ((a.sup_approved_by = $user_id AND a.sup_rejected_by = 0) OR (a.sup_approved_by = 0 AND a.sup_rejected_by = $user_id) OR (a.sup_approved_by = 0 AND a.sup_rejected_by = 0 AND a.man_approved_by = 0 AND a.man_rejected_by = 0)))\";\n }\n\n if (!empty($where_clause))\n $query .= \" WHERE $where_clause\";\n\n $res = execute_query($this->conn, $query, '');\n // print_r($res);\n if (!PEAR::isError($res))\n {\n $data = array('total' => 0, $this->table => array());\n if ($res->numRows() > 0)\n {\n // print_r($res);\n $data['total'] = $res->numRows();\n $data[$this->table] = $res->fetchAll(MDB2_FETCHMODE_ASSOC);\n }\n\n return $data;\n }\n // print_r($res);\n die($res->getMessage());\n }", "title": "" }, { "docid": "deee6ebcaf4e2fb5ad0a69731fb84edb", "score": "0.47226962", "text": "public function applySearch();", "title": "" }, { "docid": "cc049cd915f5467655fbd589f829fc03", "score": "0.47121254", "text": "public function setCriteria()\n {\n $this->criteria = $this->request->get('criteria', []);\n return $this;\n }", "title": "" }, { "docid": "e8146ce29519b2b8b58ac215406d0dd6", "score": "0.4708151", "text": "public function selectItem()\n {\n $items = array();\n\n // trim items from options:\n foreach ($this->items_map as $key => $item) {\n if ($this->min_sell_value > $item->sell_value || $this->max_sell_value < $item->sell_value) {\n continue;\n }\n\n if ($this->min_level > $item->level || $this->max_level < $item->level) {\n continue;\n }\n\n $items[$key] = $item;\n }\n\n if ($this->modifier == self::CALC_MOD_LEVEL) {\n $this->odds_table = $this->generateOddsForLevelMods($items, $this->modifier_level);\n } elseif ($this->modifier == self::CALC_MOD_MONEY) {\n $this->odds_table = $this->generateOddsForMoneyMods($items);\n } else {\n $this->odds_table = $this->generateOddsForEvenMods($items);\n }\n\n // adjust odds map to create relative percentages:\n $total = array_sum($this->odds_table);\n $this->odds_table = array_map(function($n) use($total) {\n return $n / $total;\n }, $this->odds_table);\n\n asort($this->odds_table);\n $this->odds_table = array_reverse($this->odds_table);\n\n if (count($this->odds_table) > 0) {\n return $this->choose($this->odds_table);\n }\n }", "title": "" }, { "docid": "f47355db0de0692d7ac509c8ece088cf", "score": "0.47079372", "text": "function selectProc($queryType, $operator, $cat, $id, $value, &$extObj) {\r\n\r\n\t\t$catUidList = tx_graytree_div::uniqueList(intval($id), $this->getSubRecordsIdList(intval($id),99,$this->table));\r\n\t\tif ($operator=='!=')\t{\r\n\t\t\t$query= $this->mm_table.'.uid_foreign NOT IN ('.$catUidList.')';\r\n\t\t} else {\r\n\t\t\t$query= $this->mm_table.'.uid_foreign IN ('.$catUidList.')';\r\n\t\t}\r\n\r\n\t\t$extObj->qg->queryAddCategoryJoin();\r\n\r\n\t\treturn array($queryType,$query);\r\n\t}", "title": "" }, { "docid": "f4f633c2f753b51fa1144e66efba2f41", "score": "0.47044823", "text": "protected function getInputSelectionCriteria()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "edeefc2ba11f12a0679f16a6253f7f25", "score": "0.46952808", "text": "public static function doSelect(Criteria $criteria, PropelPDO $con = null)\n {\n return OperationPrestationsPeer::populateObjects(OperationPrestationsPeer::doSelectStmt($criteria, $con));\n }", "title": "" }, { "docid": "2ee9e7ab3e38d418010c93f256b7e50c", "score": "0.46785563", "text": "protected function applySelection(AbstractDb $collection)\n {\n $selected = $this->request->getParam(static::SELECTED_PARAM);\n $excluded = $this->request->getParam(static::EXCLUDED_PARAM);\n\n if ('false' === $excluded) {\n return $collection;\n }\n\n try {\n if (is_array($excluded) && !empty($excluded)) {\n $collection->addFieldToFilter($collection->getIdFieldName(), ['nin' => $excluded]);\n } elseif (is_array($selected) && !empty($selected)) {\n $collection->addFieldToFilter($collection->getIdFieldName(), ['in' => $selected]);\n } else {\n throw new LocalizedException(__('An item needs to be selected. Select and try again.'));\n }\n } catch (\\Exception $e) {\n throw new LocalizedException(__($e->getMessage()));\n }\n return $collection;\n }", "title": "" }, { "docid": "b9663a6c79195e02aaf6184331696a85", "score": "0.46665728", "text": "private function where_result()\n {\n $this->flush_indexes();\n\n if ($this->merge == 'AND') {\n return $this->where_and_result();\n }\n // Filter array\n $r = array_filter($this->content, function ($row, $index) {\n $row = (array) $row; // Convert first stage to array if object\n\n // Check for rows intersecting with the where values.\n if (array_uintersect_uassoc($row, $this->where, [$this, 'intersect_value_check'], 'strcasecmp') /*array_intersect_assoc( $row, $this->where )*/) {\n $this->last_indexes[] = $index;\n return true;\n }\n\n return false;\n }, ARRAY_FILTER_USE_BOTH);\n\n // Make sure every object is turned to array here.\n return array_values(obj_to_array($r));\n }", "title": "" }, { "docid": "ed621603f8dc87b28fa7e8018e5d1aa9", "score": "0.4644403", "text": "public function apply(\\Magento\\Framework\\App\\RequestInterface $request)\n {\n $attributeValues = $request->getParam($this->_requestVar);\n\n if (empty($attributeValues)) {\n return $this;\n }\n $attribute = $this->getAttributeModel();\n\n\n $newAttributeValues = [];\n foreach($attributeValues as $key => $attributeValue){\n //Modify index of filter array to give it 'text keys', so that it gets added to the product collection\n // filters properly\n $newAttributeValues[$attribute->getAttributeCode().'_'.$key] = intval($attributeValue);\n $label = $this->getOptionText($attributeValue);\n $this->getLayer()\n ->getState()\n ->addFilter($this->_createItem($label, $attributeValue));\n }\n\n /** @var \\Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection $productCollection */\n $productCollection = $this->getLayer()\n ->getProductCollection();\n $productCollection->addFieldToFilter($attribute->getAttributeCode(), $newAttributeValues);\n //$this->setItems([]); // set items to disable show filtering\n return $this;\n }", "title": "" }, { "docid": "1e620ef5229ee098ebe03997548004c6", "score": "0.46082342", "text": "public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)\n\t{\n\n foreach (sfMixer::getCallables('BaseMissionLegPeer:doSelectStmt:doSelectStmt') as $callable)\n {\n call_user_func($callable, 'BaseMissionLegPeer', $criteria, $con);\n }\n\n\n\t\tif ($con === null) {\n\t\t\t$con = Propel::getConnection(MissionLegPeer::DATABASE_NAME, Propel::CONNECTION_READ);\n\t\t}\n\n\t\tif (!$criteria->hasSelectClause()) {\n\t\t\t$criteria = clone $criteria;\n\t\t\tMissionLegPeer::addSelectColumns($criteria);\n\t\t}\n\n\t\t// Set the correct dbName\n\t\t$criteria->setDbName(self::DATABASE_NAME);\n\n\t\t// BasePeer returns a PDOStatement\n\t\treturn BasePeer::doSelect($criteria, $con);\n\t}", "title": "" }, { "docid": "837bc8c07bc6c3e2f618b0ff0ce1add4", "score": "0.46068642", "text": "public static function addSelectColumns(Criteria $criteria)\n\t{\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::AMENDMENTID);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::SUBMISSIONID);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::SUBMISSIONNUMBER);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::QCSTATUS);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::PREMIUNTYPE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::PREMIUMINLOCALCURRENCY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::PREMIUMINUSD);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::LAYEROFLIMITINLOCALCURRENCY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::LAYEROFLIMITINUSD);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::PERCENTAGEOFLAYER);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::LIMITINLOCALCURRENCY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::LIMITINUSD);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::ATTACHMENTPOINTINLOCALCURRENCY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::ATTACHMENTPOINTINUSD);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::SELFINSUREDRETENTIONINLOCALCURRENCY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::SELFINSUREDRETENTIONINUSD);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::POLICYCOMMPERCENTAGE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::POLICYCOMMINLOCALCURRENCY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::POLICYCOMMINUSD);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::PREMIUMNETOFCOMMINLOCALCURRENCY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::PREMIUMNETOFCOMMINUSD);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::DUCKSUBMISSIONNUMBER);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::NEWRENEWAL);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::UNDERWRITERNAME);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::PRODUCTLINE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::PRODUCTLINESUBTYPE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::SECTIONCODE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::PROFITCODE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::STATUS);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::EFFECTIVEDATE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::EXPIRYDATE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::CURRENCY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::EXCHANGERATE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::EXCHANGEDATE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::INSUREDNAME);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::INSUREDADDRESS1);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::INSUREDCITY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::INSUREDSTATE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::INSUREDCOUNTRY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::INSUREDZIPCODE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::ADVISENID);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::DBNUMBER);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::DBANAME);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::CABCOMPANIES);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::REINSUREDCOMPANY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::SUBMISSIONIDENTIFIER);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::INSUREDCONTACTPERSONNAME);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::INSUREDCONTACTPERSONEMAIL);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::INSUREDCONTACTPERSONPHONENUMBER);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::INSUREDCONTACTPERSONMOBILENUMBER);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::INSUREDQUOTEDUEDATE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::INSUREDSUBMISSIONDATE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::TOTALINSUREDVALUEINLOCALCURRENCY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::TOTALINSUREDVALUEINUSD);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::RISKPROFILE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::NUMBEROFLOCATIONS);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::OCCUPANCYCODE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::REASONCODE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::PROCESSDATE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::BERKSIDATEFROMBROKER);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::BERKSIDATEFROMINDIA);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::BRANCHNAME);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::PROJECTNAME);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::PROJECTCONTRACTORNAME);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::PROJECTOWNERNAME);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::PROJECTADDRESSLINE1);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::PROJECTCITY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::PROJECTSTATE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::PROJECTCOUNTRY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::BIDSITUATION);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::BROKERCODE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::BROKERNAME);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::BROKERTYPE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::BROKERCOUNTRY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::BROKERSTATE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::BROKERCITY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::BROKERCONTACTPERSON);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::BROKERCONTACTPERSONEMAIL);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::BROKERCONTACTPERSONNUMBER);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::BROKERCONTACTPERSONMOBILE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::RETAILBROKERNAME);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::RETAILBROKERCOUNTRY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::RETAILBROKERSTATE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::RETAILBROKERCITY);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::BINDDATE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::RENEWABLE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::DATEOFRENEWAL);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::POLICYTYPE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::DIRECTASSUMED);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::ADMITTEDNONADMITTED);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::COMPANYPAPER);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::COMPANYPAPERNUMBER);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::POLICYNUMBER);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::COVERAGE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::SUFFIX);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::TRANSACTIONNUMBER);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::NAICCODE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::NAICTITLE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::SICCODE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::SICTITLE);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::OFRCADVERSEREPORT);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::FINALPOLICYNUMBER);\n\t\t$criteria->addSelectColumn(AmendmentsubmissionqcSearchPeer::ID);\n\t}", "title": "" }, { "docid": "355c2d18459d2adc3bb2702c3b592c2e", "score": "0.46018133", "text": "public function executeAlumnos()\n {\n $c = new Criteria();\n $busqueda = 0;\n\n $this->modificar_ejericicio = $this->getRequestParameter('edita-ejercicio',false);\n $idcurso = $this->getRequestParameter('idcurso');\n $idmodulo = $this->getRequestParameter('idmodulo');\n\n // Si venimos de una busqueda...\n if ($this->getRequest()->getMethod() == sfRequest::POST) {\n $tipo = $this->getRequestParameter('tipo');\n $criterion_array = array();\n\n if ($this->getRequestParameter('usuario')) {\n $criterion = $c->getNewCriterion(UsuarioPeer::NOMBREUSUARIO,\"%\".$this->getRequestParameter('usuario').\"%\",Criteria::LIKE);\n $criterion_array[] = $criterion;\n }\n if ($this->getRequestParameter('dni')) {\n $criterion = $c->getNewCriterion(UsuarioPeer::DNI,$this->getRequestParameter('dni'));\n $criterion_array[] = $criterion;\n }\n if ($this->getRequestParameter('nombre')) {\n $criterion = $c->getNewCriterion(UsuarioPeer::NOMBRE,\"%\".$this->getRequestParameter('nombre').\"%\",Criteria::LIKE);\n $criterion_array[] = $criterion;\n }\n if ($this->getRequestParameter('apellidos')) {\n $criterion = $c->getNewCriterion(UsuarioPeer::APELLIDOS,\"%\".$this->getRequestParameter('apellidos').\"%\",Criteria::LIKE);\n $criterion_array[] = $criterion;\n }\n if ($this->getRequestParameter('email')) {\n $criterion = $c->getNewCriterion(UsuarioPeer::EMAIL,\"%\".$this->getRequestParameter('email').\"%\",Criteria::LIKE);\n $criterion_array[] = $criterion;\n }\n // En esta parte se mezclan todas las condiciones segun el criterio AND u OR\n if (sizeof($criterion_array)) {\n $cref = array_pop($criterion_array);\n\n if ($tipo == 'Or') {\n foreach ($criterion_array as $caux) { $cref->addOr($caux); }\n } else {\n foreach ($criterion_array as $caux) { $cref->addAnd($caux); }\n }\n $c->add($cref);\n }\n $busqueda = 1;\n }\n $curso = null;\n $modulo = null;\n\n $c->add(RolPeer::NOMBRE, 'alumno');\n $c->addJoin(RolPeer::ID, Rel_usuario_rol_cursoPeer::ID_ROL);\n $c->addJoin(UsuarioPeer::ID, Rel_usuario_rol_cursoPeer::ID_USUARIO);\n $c->addAscendingOrderByColumn(UsuarioPeer::APELLIDOS);\n $c->addGroupByColumn(UsuarioPeer::ID);\n\n if ($idcurso) {\n $c->add(Rel_usuario_rol_cursoPeer::ID_CURSO, $idcurso);\n $curso = CursoPeer::RetrieveByPk($idcurso);\n }\n if ($idmodulo) {\n $modulo = PaquetePeer::RetrieveByPk($idmodulo);\n unset($c);\n $c = new Criteria();\n $c->add(Rel_usuario_paquetePeer::ID_PAQUETE, $idmodulo);\n $c->addJoin(Rel_usuario_paquetePeer::ID_USUARIO, UsuarioPeer::ID);\n }\n $this->busqueda = $busqueda;\n $this->alumnos = UsuarioPeer::DoSelect($c);\n $this->curso = $curso;\n $this->modulo = $modulo;\n }", "title": "" }, { "docid": "95aab231fd9e92d58acc51912475596b", "score": "0.45949066", "text": "abstract public function selector();", "title": "" }, { "docid": "7da9e242d978ae2a302bfc7a6497ed99", "score": "0.45933115", "text": "public static function doSelect(Criteria $criteria, PropelPDO $con = null)\n\t{\n\t\treturn MissionLegPeer::populateObjects(MissionLegPeer::doSelectStmt($criteria, $con));\n\t}", "title": "" }, { "docid": "d7380a0613814e5d92f47f54c82ba8a7", "score": "0.45914552", "text": "public static function doSelect(Criteria $criteria, PropelPDO $con = null)\n {\n return GsBewakingenKenmerkenPeer::populateObjects(GsBewakingenKenmerkenPeer::doSelectStmt($criteria, $con));\n }", "title": "" }, { "docid": "b43fa59a1f0a7c0f0e29e357d651eb8f", "score": "0.4585027", "text": "protected function internal_get_statistics($projection, $criteria)\n\t{\n\t\t$query = DB::select()->from('matches')\n\t\t\t->join('performance')->on('matches.matchId', '=', 'performance.matchId' );\n\t\tforeach($criteria as $requirementArray) {\n\t\t\t$field = $requirementArray[0];\n\t\t\t$operand = $requirementArray[1];\n\t\t\t$value = $requirementArray[2];\n\n\t\t\tif(in_array($field, $this->ambiguousFields))\n\t\t\t{\n\t\t\t\t$field = \"matches.$field\";\n\t\t\t}\n\n\t\t\t$query = $query->where($field, $operand, $value);\n\t\t}\n\n\t\tforeach($projection as $selected => $order){\n\t\t\tif(in_array($selected, $this->ambiguousFields))\n\t\t\t{\n\t\t\t\t$selected = \"matches.$field\";\n\t\t\t}\n\t\t\n\t\t\tif($order != 'not' && $order != 'Not')\n\t\t\t\t$query->order_by($selected, $order);\n\t\t}\n\t\t//die(Debug::vars($db->last_query));\n\t\t//die(print_r($query, true));\n\t\t\n\t\t$results = $query->execute()->as_array();\n\t\t$results_array = array();\n\t\t\n\t\tforeach($results as $result) {\n\t\t\t$record_array = array();\n\t\t\tforeach($projection as $selected => $order){\n\t\t\t\t$record_array[$selected] = $result[$selected];\n\t\t\t\t//array_push($record_array, $result[$selected]);\n\t\t\t}\n\t\t\tarray_push($results_array, $record_array);\n\t\t}\n\t\treturn $results_array;\n\t}", "title": "" }, { "docid": "5293acd6f61b81cbf16523caa58cdbeb", "score": "0.458465", "text": "public function select($select);", "title": "" }, { "docid": "baabf2781ca88ee875005625a938d5de", "score": "0.45827", "text": "public function getCriteriaCopy()\n {\n return clone $this->criteria;\n }", "title": "" }, { "docid": "1c20532f2aa94565bb736228705fd351", "score": "0.45810604", "text": "public function criteriaSearch()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\tif(!empty($this->lappenjualanresep_id)){\n\t\t\t$criteria->addCondition('lappenjualanresep_id = '.$this->lappenjualanresep_id);\n\t\t}\n\t\t$criteria->compare('LOWER(tanggal)',strtolower($this->tanggal),true);\n\t\tif(!empty($this->penjualanresep)){\n\t\t\t$criteria->addCondition('penjualanresep = '.$this->penjualanresep);\n\t\t}\n\t\tif(!empty($this->penjualanresepluar)){\n\t\t\t$criteria->addCondition('penjualanresepluar = '.$this->penjualanresepluar);\n\t\t}\n\t\tif(!empty($this->penjualanbebas)){\n\t\t\t$criteria->addCondition('penjualanbebas = '.$this->penjualanbebas);\n\t\t}\n\t\tif(!empty($this->penjualandokter)){\n\t\t\t$criteria->addCondition('penjualandokter = '.$this->penjualandokter);\n\t\t}\n\t\tif(!empty($this->penjualankaryawan)){\n\t\t\t$criteria->addCondition('penjualankaryawan = '.$this->penjualankaryawan);\n\t\t}\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "f2c49587e9f5ea78dc5986947960ebb6", "score": "0.45797727", "text": "function exportcondition() {\n //Get the User's access Branch list\n $accessBranchList = $this->_getAccessBranchListArray();\n $accessDeptList = $this->_getAccessDeptListArray();\n $conditions = array();\n\n //$conditions = array();\n if ($accessBranchList != 'all') {\n $branchCndnt = array('User.branch_id' => $accessBranchList);\n $conditions = array_merge($conditions, $branchCndnt);\n }\n\n //$conditions = array();\n if ($accessDeptList != 'all') {\n $deptsCndnt = array('User.department_id' => $accessDeptList);\n $conditions = array_merge($conditions, $deptsCndnt);\n }\n\n\n //pr($conditions);\n //if($this->Session->read('Search.users.filterData')!=''){\n if ($this->Session->read('filterData') != '') {\n //$this->Session->write('filterData',$this->Session->read('Search.vendors.filterData'));\n\n if ($this->Session->read('filterData.branch_list') != '') {\n $brachCndnt = array('User.branch_id' => $this->Session->read('filterData.branch_list'));\n $conditions = array_merge($conditions, $brachCndnt);\n }\n\n if ($this->Session->read('filterData.status_list') != '') {\n $statusCndnt = array('User.user_status' => $this->Session->read('filterData.status_list'));\n $conditions = array_merge($conditions, $statusCndnt);\n }\n\n\n $this->User->bindModel(array('belongsTo' => array(\n 'Branch' => array(\n 'foreignKey' => false,\n 'conditions' => array('User.branch_id = Branch.id')),\n 'Department' => array(\n 'foreignKey' => false,\n 'conditions' => array('User.department_id = Department.id')\n ),\n 'UserType' => array(\n 'foreignKey' => false,\n 'conditions' => array('User.user_level = UserType.id')\n )\n ),\n ), false);\n if (trim($this->Session->read('filterData.searchkeyword')) != 'Search Employee' && trim($this->Session->read('filterData.searchkeyword')) != '') {\n $searchKeywordArr = explode(' ', trim($this->Session->read('filterData.searchkeyword')));\n $OriginalSearchArr = array($this->Session->read('filterData.searchkeyword'));\n $searchKeywordArr = array_merge($searchKeywordArr, $OriginalSearchArr);\n $completeSearchArr = $this->__getSearchCritiera($searchKeywordArr, array('User', 'Branch', 'Department', 'UserType'));\n $keywordCndnt = array('OR ' => $completeSearchArr);\n $conditions = array_merge($conditions, $keywordCndnt);\n }\n }\n return $conditions;\n }", "title": "" }, { "docid": "ae8d7ce648eb06a86c60e943095a3ff8", "score": "0.45567185", "text": "public function getCriteria()\n {\n return $this->strategy->getCriteria();\n }", "title": "" }, { "docid": "147051aaa2da53edcaff604d2d94549f", "score": "0.45565373", "text": "public function filter($conditions){\n\t\t\n\t\tforeach ($conditions as $column => $operadorValor) {\n\t\t\tforeach ($operadorValor as $operador => $valor) {\n\t\t\t\t$this->registry->db->where($column, $valor, $operador);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->registry->db->get($this->table_name);\n\t\t\n\t}", "title": "" }, { "docid": "18754e03c1921c2316be932bdb186cd4", "score": "0.455577", "text": "public function createCriteria()\n\t{\n\t\t// should not be searched.\n\t\t$criteria = new CDbCriteria();\n\t\t\n\t\t$criteria->compare('option6.value',$this->industry,true);\n\t\t$criteria->compare('option12.value',$this->type,true);\n\t\t$criteria->compare('option3.value',$this->area,true);\n\t\t\n\t\t$criteria->compare('buyer_id', Yii::app()->user->buyer_id);\n\n\t\t$criteria->with = array('option6', 'option12', 'option3');\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "5ca00fc0ce6b7a98162b4aad16719127", "score": "0.4546914", "text": "public function SelectValues()\n\t{\n\t\tGLOBAL $Db;\n\t\t$sql=\"SELECT id, SUBSTRING({$this->dateFieldName}, 9, 2) as day\n\t\tFROM {$this->table}\n\t\tWHERE SUBSTRING({$this->dateFieldName}, 1, 7)='{$this->year}-{$this->month}' {$this->cond}\";\n\t\t$rows=$Db->Query($sql);\n\t\tif (Utils::IsArray($rows))\n\t\t{\n\t\t\tforeach ($rows as $row)\n\t\t\t{\n\t\t\t\t$this->actions[] = (integer) $row['day'];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "65f0aa2f246d46681b749fbf092d6ad9", "score": "0.45426568", "text": "public function select(callable $predicate);", "title": "" }, { "docid": "410eecca0d38e57153272bcd4ab43df6", "score": "0.45424828", "text": "private function buildCriteriaMeasurementData( $request )\n {\n// $this->criteriaData['sb_id'] = \"\";\n// $this->criteriaData['side'] = \"\";\n// $this->criteriaData['individual_number'] = \"\";\n $this->logInfo(__METHOD__);\n\n $query = SkeletalElement::withoutGlobalScope(ProjectScope::class)\n ->with('skeletalbone','measurements') // Load bone and measurements data\n ->where('skeletal_elements.project_id', $this->theProject->id);\n\n if ($request['individual_number_select'] != \"\") {\n $this->criteriaData['individual_number'] = $request['individual_number_select'];\n $query->where('individual_number', $this->criteriaData['individual_number']);\n $this->criteriaSelections .= \" IndividualNumber:\" . $this->criteriaData['individual_number'];\n }\n if ($request['side_select_INumber'] != \"\") {\n $this->criteriaData['side'] = $request['side_select_INumber'];\n $query->where('side', $this->criteriaData['side']);\n $this->criteriaSelections .= \" IndividualNumber Side:\" . $this->criteriaData['side'];\n }\n $query = $this->whereANP1P2($request, $query);\n $query = $this->whereBoneSide($request, $query);\n $query = collect($query->get());\n return $query;\n }", "title": "" }, { "docid": "22d5ef4615bcb8b0df1f0b7ae5319985", "score": "0.45356655", "text": "function __clone()\n\t{\n\t\tclone $this->criteria;\n\t}", "title": "" }, { "docid": "5b16edd7532406b15cda779a04933b5b", "score": "0.453303", "text": "public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)\n\t{\n\n foreach (sfMixer::getCallables('BaseMissionTypeWingStatsPeer:doSelectStmt:doSelectStmt') as $callable)\n {\n call_user_func($callable, 'BaseMissionTypeWingStatsPeer', $criteria, $con);\n }\n\n\n\t\tif ($con === null) {\n\t\t\t$con = Propel::getConnection(MissionTypeWingStatsPeer::DATABASE_NAME, Propel::CONNECTION_READ);\n\t\t}\n\n\t\tif (!$criteria->hasSelectClause()) {\n\t\t\t$criteria = clone $criteria;\n\t\t\tMissionTypeWingStatsPeer::addSelectColumns($criteria);\n\t\t}\n\n\t\t// Set the correct dbName\n\t\t$criteria->setDbName(self::DATABASE_NAME);\n\n\t\t// BasePeer returns a PDOStatement\n\t\treturn BasePeer::doSelect($criteria, $con);\n\t}", "title": "" }, { "docid": "c83f0d9f4f1009a0e850fbc508fd9520", "score": "0.45220944", "text": "#[@test]\n public function setCriteria() {\n $q= new SelectQuery();\n $c= new Criteria();\n $q->setCriteria($c);\n $this->assertEquals($c, $q->getCriteria());\n }", "title": "" }, { "docid": "36b07323a92fecd341812c43bfc1579a", "score": "0.45202076", "text": "public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)\n\t{\n\t\tif ($con === null) {\n\t\t\t$con = Propel::getConnection(AmendmentsubmissionqcSearchPeer::DATABASE_NAME, Propel::CONNECTION_READ);\n\t\t}\n\n\t\tif (!$criteria->hasSelectClause()) {\n\t\t\t$criteria = clone $criteria;\n\t\t\tAmendmentsubmissionqcSearchPeer::addSelectColumns($criteria);\n\t\t}\n\n\t\t// Set the correct dbName\n\t\t$criteria->setDbName(self::DATABASE_NAME);\n\t\t// symfony_behaviors behavior\n\t\tforeach (sfMixer::getCallables(self::getMixerPreSelectHook(__FUNCTION__)) as $sf_hook)\n\t\t{\n\t\t call_user_func($sf_hook, 'BaseAmendmentsubmissionqcSearchPeer', $criteria, $con);\n\t\t}\n\n\n\t\t// BasePeer returns a PDOStatement\n\t\treturn BasePeer::doSelect($criteria, $con);\n\t}", "title": "" }, { "docid": "696f6f30cb2c8e7caf10419799f1e693", "score": "0.45197815", "text": "public static function processBatchSelection ( $_tournamentID=null, $_sportGameID=null, $_participantRoleID=null, $_genderCategory=null, $_exclusion=null) \n {\n\t\t$_qry = Doctrine_Query::create()\n\t\t\t\t->select(self::appendQueryFields())\n\t\t\t\t->from(\"TeamMemberParticipantRole tmMbrPrtRol\") \n\t\t\t\t->innerJoin(\"tmMbrPrtRol.TeamGameParticipation sprtGmPrtn on tmMbrPrtRol.team_game_participation_id = sprtGmPrtn.id \") \n\t\t\t\t->innerJoin(\"tmMbrPrtRol.TeamMemberParticipant tmMbrPrt on tmMbrPrtRol.team_member_participant_id = tmMbrPrt.id \") \n\t\t\t\t->innerJoin(\"tmMbrPrt.Team prtTm on tmMbrPrt.team_id = prtTm.id \") \n\t\t\t\t->innerJoin(\"sprtGmPrtn.GameCategory gmCat on sprtGmPrtn.sport_game_category_id = gmCat.id \") \n\t\t\t\t->innerJoin(\"sprtGmPrtn.SportGame sprtGm on sprtGmPrtn.sport_game_id = sprtGm.id \") \n\t\t\t\t->innerJoin(\"prtTm.Tournament trnmt on prtTm.tournament_id = trnmt.id \") \n\t\t\t\t->innerJoin(\"tmMbrPrt.Person prsn on tmMbrPrt.person_id = prsn.id \") \n\t\t\t\t->innerJoin(\"prtTm.Organization org on prtTm.org_id = org.id \") \n\t\t\t\t->orderBy(\"tmMbrPrt.id ASC\")\n\t\t\t\t->where(\"tmMbrPrt.id IS NOT NULL\"); \n\t\t\t\tif(!is_null($_sportGameID)) $_qry = $_qry->addWhere(\"sprtGmPrtn.sport_game_id = ?\", $_sportGameID); \n\t\t\t\tif(!is_null($_participantRoleID)) $_qry = $_qry->addWhere(\"tmMbrPrtRol.member_role_id = ?\", $_participantRoleID); \n\t\t\t\tif(!is_null($_genderCategory)) $_qry = $_qry->addWhere(\"sprtGmPrtn.gender_category_id = ?\", $_genderCategory); \n\t\t\t\tif(!is_null($_tournamentID)) $_qry = $_qry->addWhere(\"trnmt.id = ?\", $_tournamentID); \n\t\t\t\tif(! is_null($_exclusion)) $_qry = $_qry->andWhereNotIn(\"tmMbrPrtRol.id \", $_exclusion ); \n\t\t\t\t\n\t\t\t$_qry = $_qry->execute(array(), Doctrine_Core::HYDRATE_RECORD); \n\n\t\treturn ( count($_qry) <= 0 ? null:$_qry ); \n\t}", "title": "" }, { "docid": "0ba13519bede3eba9fe4d226e0ae56de", "score": "0.45177186", "text": "function findPostsBy(array $criteria);", "title": "" }, { "docid": "4c8b5ae1b8b1b58e8454a496627f8b5b", "score": "0.45165545", "text": "public function search($options = [])\n {\n $criteria = new CDbCriteria;\n /** @var ProductCategory $category */\n\n $criteria->addCondition('t.price>0');\n\n $charColumns = [];\n// foreach (ProductFilter::model()->findAll() as $char) {\n// $charColumns[] = \"MAX(IF(attributes.char_id = \" . $char->id . \", attributes.value, null)) as filter_\" . $char->id;\n// }\n// $criteria->with = ['characteristics' => [\n// 'together' => true,\n// 'alias' => 'attributes',\n// 'select' => $charColumns,\n// ]);\n\n $criteria->with = ['defaultUpload'];\n $criteria->group = 't.id';\n\n $criteria->compare('article', $this->article, true);\n $criteria->compare('category_id', $this->category_id);\n $criteria->compare('manufacturer_id', $this->manufacturer_id);\n\n $criteria->addBetweenCondition('price', $this->priceMin ? : 0, $this->priceMax ? : 1000000);\n\n if (isset($_GET['flt'])) {\n foreach ($_GET['flt'] as $charId => $value) {\n /** @var Characteristic $model */\n $id = ltrim(h($charId), 'f');\n $model = Characteristic::model()->findByPk($id);\n if ($model) {\n if ($model->type == Characteristic::TYPE_SELECT && $value) {\n $criteria->having .= ($criteria->having ? ' AND ' : '') . 'filter_' . $id . '=' . h($value);\n } else if ($model->type == Characteristic::TYPE_RANGE) {\n $criteria->having .= ($criteria->having ? ' AND ' : '') . 'filter_' . $id . ' BETWEEN ' . (isset($value['min']) ? intval(h($value['min'])) : 0) . ' AND ' . (isset($value['max']) ? intval(h($value['max'])) : 1000000);\n }\n }\n }\n }\n\n// if ($this->showNewArrivals && $this->showWithAction) {\n// $criteria->addCondition($this->getNewArrivalsOrActionsCondition());\n// } elseif($this->showWithAction){\n// $criteria->addCondition($this->getWithActionCondition());\n// } elseif($this->showNewArrivals){\n// $criteria->addCondition($this->getNewArrivalsCondition());\n// } else {\n// if (isset($options['showNewArrivals']) && $options['showNewArrivals'] && isset($options['showWithAction']) && $options['showWithAction']) {\n// $criteria->addCondition($this->getNewArrivalsOrActionsCondition());\n// } elseif (isset($options['showNewArrivals']) && $options['showNewArrivals']) {\n// $criteria->addCondition($this->getNewArrivalsCondition());\n// } elseif (isset($options['showWithAction']) && $options['showWithAction']) {\n// $criteria->addCondition($this->getWithActionCondition());\n// }\n// }\n\n return new CActiveDataProvider($this, [\n 'criteria' => $criteria,\n 'pagination' => [\n 'pageSize' => $this->pageSize ? : Config::get((isset($options['homePage']) ? 'newArrivalPageSize' : 'categoryPageSize')),\n ],\n 'sort' => [\n 'multiSort' => true,\n 'defaultOrder' => 'article, price',\n ],\n ]);\n }", "title": "" }, { "docid": "c44e49db730344c04b26ab364b374bda", "score": "0.45067224", "text": "public function apply(AccessControl $access_compiler, string $model_class): QueryModifier;", "title": "" }, { "docid": "3330ae690cf327385b331afde35b4c72", "score": "0.450078", "text": "public function request(){\n $this->applySelect()\n ->applyLimit()\n ->applyOrder();\n\n $this->data=$this->model->findAll($this->criteria);\n\n return $this;\n }", "title": "" }, { "docid": "56a9e0d2fe1089793bd174b949a360ab", "score": "0.44996122", "text": "public function select(){\r\n\t\t\t// check for results in cache\r\n\t\t\tif( $this->_result )\r\n\t\t\t\treturn $this->_result;\r\n\r\n\t\t\t// init variables\r\n\t\t\t$vars = array();\r\n\t\t\t$subs = array();\r\n\t\t\t$model = $this->_model;\r\n\r\n\t\t\t// add SELECT\r\n\t\t\t$q = array( \"SELECT\" );\r\n\r\n\t\t\t// add DISTINCT\r\n\t\t\tif( $this->_distinct ){\r\n\t\t\t\tarray_push( $q, \"DISTINCT\" );\r\n\t\t\t}\r\n\r\n\t\t\t// add projection if none\r\n\t\t\tif( !$this->_select || in_array( '*', $this->_select ) ){\r\n\t\t\t\tforeach( array_keys( get_class_vars( $model ) ) as $k )\r\n\t\t\t\t\tif( $k[ 0 ] != '_' )\r\n\t\t\t\t\t\t$this->_select[] = $k;\r\n\r\n\t\t\t\tif( in_array( '*', $this->_select ) )\r\n\t\t\t\t\tunset( $this->_select[ array_search( '*', $this->_select ) ] );\r\n\t\t\t}\r\n\r\n\t\t\t// add pk in select if not exists\r\n\t\t\tif( !in_array( $model::$_pk, $this->_select ) ){\r\n\t\t\t\t$this->_select[] = $model::$_pk;\r\n\t\t\t}\r\n\r\n\t\t\t// add select keys to vars\r\n\t\t\tforeach( $this->_select as $e ){\r\n\t\t\t\t$vars[ $e ] = false;\r\n\t\t\t}\r\n\r\n\t\t\t// add where keys to vars\r\n\t\t\tforeach( $this->_where->vars() as $e ){\r\n\t\t\t\t$vars[ $e ] = false;\r\n\t\t\t}\r\n\r\n\t\t\t// add group keys to vars\r\n\t\t\tforeach( $this->_group as $e ){\r\n\t\t\t\t$vars[ $e ] = false;\r\n\t\t\t}\r\n\r\n\t\t\t// add having keys to vars\r\n\t\t\tforeach( $this->_having->vars() as $e ){\r\n\t\t\t\t$vars[ $e ] = false;\r\n\t\t\t}\r\n\r\n\t\t\t// add order keys to vars\r\n\t\t\tforeach( $this->_order as $e ){\r\n\t\t\t\t$vars[ $e ] = false;\r\n\t\t\t}\r\n\r\n\t\t\t// setup joins\r\n\t\t\t$tables = $this->_setup_joins( $vars );\r\n\r\n\t\t\t// add projections and FROM tables\r\n\t\t\tif( $this->_select ){\r\n\t\t\t\t$qs = array();\r\n\t\t\t\tforeach( $this->_select as $e ){\r\n\t\t\t\t\tarray_push( $qs, $vars[ $e ].' AS `'. $e.'`' );\r\n\t\t\t\t}\r\n\t\t\t\tarray_push( $q, implode( ', ', $qs ), 'FROM', $tables );\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// add WHERE expression\r\n\t\t\tif( $this->_where ){\r\n\t\t\t\t$qs = $this->_where->sql( $vars, $subs );\r\n\t\t\t\tif( $qs )\r\n\t\t\t\t\tarray_push( $q, 'WHERE', $qs );\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// add GROUP BY expression\r\n\t\t\tif( $this->_group ){\r\n\t\t\t\t$qs = array();\r\n\t\t\t\tforeach( $this->_group as $e ){\r\n\t\t\t\t\tarray_push( $qs, $vars[ $e ] );\r\n\t\t\t\t}\r\n\t\t\t\tarray_push( $q, 'GROUP BY', implode( ', ', $qs ) );\r\n\t\t\t}\r\n\r\n\t\t\t// add HAVING expression\r\n\t\t\tif( $this->_having ){\r\n\t\t\t\t$qs = $this->_having->sql( $vars, $subs );\r\n\t\t\t\tif( $qs )\r\n\t\t\t\t\tarray_push( $q, 'HAVING', $qs );\r\n\t\t\t}\r\n\r\n\t\t\t// add ORDER BY columns\r\n\t\t\tif( $this->_order ){\r\n\t\t\t\t$qs = array();\r\n\t\t\t\tforeach( $this->_order as $e ){\r\n\t\t\t\t\tarray_push( $qs, $vars[ $e ] );\r\n\t\t\t\t}\r\n\t\t\t\tarray_push( $q, 'ORDER BY', implode( ', ', $qs ) );\t\r\n\t\t\t}\r\n\r\n\t\t\t// add LIMIT OFFSET\r\n\t\t\tif( $this->_low !== false && $this->_high !== false ){\r\n\t\t\t\t$limit = $this->_high - $this->_low;\r\n\t\t\t\tarray_push( $q, 'LIMIT', $limit, 'OFFSET', $this->_low );\r\n\t\t\t}\r\n\r\n\t\t\t// form query\r\n\t\t\t$q = implode( ' ', $q );\r\n\r\n\t\t\t//print_r( $q );\r\n\r\n\t\t\t// execute query\r\n\t\t\t$conn = db_get_connection( $this->_dbkey );\r\n\t\t\t$stmt = $conn->prepare( $q );\r\n\t\t\t$res = $stmt->execute( $subs );\r\n\r\n\t\t\t// check for errors\r\n\t\t\tif( $res === false ){\r\n\t\t\t\t$error = $stmt->errorInfo();\r\n\t\t\t\tthrow new Exception( 'Error Executing Query: '. $q. ' Error: '.$error[ 2 ].' (Code '.$error[ 1 ].')', QUERYERROR );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// cache results\r\n\t\t\t$this->_result = array();\r\n\r\n\t\t\t// create objects from results\r\n\t\t\tforeach( $stmt->fetchAll( PDO::FETCH_ASSOC ) as $row ){\r\n\t\t\t\t$this->_result[] = new $model( $row );\r\n\t\t\t\t$this->_count++;\r\n\t\t\t}\r\n\r\n\t\t\t// return result\r\n\t\t\treturn $this->_result;\r\n\t\t}", "title": "" }, { "docid": "7f40e1cf320483d6df0db691044d3832", "score": "0.4494872", "text": "public function GetCriteria(){\n\t\t$query = \"SELECT * FROM `criteria_selection` WHERE `selectionID` = {$this->selectionID}\";\n\n\t\t$db = GetDB();\n\t\t$rows = $db->query($query);\n\t\tif($rows){\n\t\t\twhile($row = $rows->fetch_array(MYSQLI_BOTH)){\n\t\t\t\t$s = new Criteria($row['criteriaID']);\n\t\t\t}\n\t\t\treturn $s;\n\t\t} else {\n\t\t\t$_SESSION['error'] = 675;\n\t\t\t$_SESSION['error-detailed'] = mysqli_error($db).\" On Line: \".__LINE__.\" of file \".__FILE__.\"\n\t\t\tSelectionID: \".$this->selectionID;\n\t\t\theader(\"location:error_message.php\");\n\t\t}\n\t}", "title": "" }, { "docid": "3a1fab1f089a2f7cdd0ca71774717c06", "score": "0.44912922", "text": "public function select()\n {\n $result = $this->_selected(array(), $this->getPK());\n if (!empty($result)) {\n $this->setThisAllProperties($result);\n }\n }", "title": "" }, { "docid": "c977b0addd9663ab3777400edea8d274", "score": "0.44886166", "text": "public static function doSelect(Criteria $criteria, PropelPDO $con = null)\n\t{\n\t\treturn WebsitePeer::populateObjects(WebsitePeer::doSelectStmt($criteria, $con));\n\t}", "title": "" }, { "docid": "3419fd6c42e0ed3ff1951983050868c6", "score": "0.44861278", "text": "public function getCriteria()\n {\n return $this->criteria;\n }", "title": "" }, { "docid": "3419fd6c42e0ed3ff1951983050868c6", "score": "0.44861278", "text": "public function getCriteria()\n {\n return $this->criteria;\n }", "title": "" }, { "docid": "25748c3e71bfae5a665ce082a54ea80e", "score": "0.44829863", "text": "public function recordsetSelecting(&$filter)\n {\n // Enter your code here\n }", "title": "" }, { "docid": "55a1595ee2e2dba98fe50b2987c7059b", "score": "0.44824514", "text": "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n \n /* Se establecen los criterios para la búsqueda por rango de fechas */ \n if(!empty($this->from_date) && empty($this->to_date) && empty($this->from_coef) && empty($this->to_coef))\n {\n $criteria->condition = \"fechaFin >= '$this->from_date'\";\n }\n elseif(!empty($this->from_date) && !empty($this->to_date) && empty($this->from_coef) && empty($this->to_coef))\n {\n $criteria->condition = \"fechaFin >= '$this->from_date' and fechaFin <= '$this->to_date'\";\n }\n elseif(empty($this->from_date) && !empty($this->to_date) && empty($this->from_coef) && empty($this->to_coef))\n {\n $criteria->condition = \"fechaFin <= '$this->to_date'\";\n }\n elseif(empty($this->from_date) && empty($this->to_date) && !empty($this->from_coef) && empty($this->to_coef))\n {\n $criteria->condition = \"coeficiente >= $this->from_coef\";\n }\n elseif(empty($this->from_date) && empty($this->to_date) && empty($this->from_coef) && !empty($this->to_coef))\n {\n $criteria->condition = \"coeficiente <= $this->to_coef\";\n }\n elseif(empty($this->from_date) && empty($this->to_date) && !empty($this->from_coef) && !empty($this->to_coef))\n {\n $criteria->condition = \"coeficiente >= $this->from_coef and coeficiente <= $this->to_coef\";\n }\n elseif(!empty($this->from_date) && empty($this->to_date) && !empty($this->from_coef) && !empty($this->to_coef))\n {\n $criteria->condition = \"coeficiente >= $this->from_coef and coeficiente <= $this->to_coef and fechaFin >= '$this->from_date'\";\n }\n elseif(empty($this->from_date) && !empty($this->to_date) && !empty($this->from_coef) && !empty($this->to_coef))\n {\n $criteria->condition = \"coeficiente >= $this->from_coef and coeficiente <= $this->to_coef and fechaFin <= '$this->to_date'\";\n }\n elseif(!empty($this->from_date) && !empty($this->to_date) && !empty($this->from_coef) && !empty($this->to_coef))\n {\n $criteria->condition = \"coeficiente >= $this->from_coef and coeficiente <= $this->to_coef and fechaFin >= '$this->from_date' and fechaFin <= '$this->to_date'\";\n }\n elseif(!empty($this->from_date) && !empty($this->to_date) && empty($this->from_coef) && !empty($this->to_coef))\n {\n $criteria->condition = \"coeficiente <= $this->to_coef and fechaFin >= '$this->from_date' and fechaFin <= '$this->to_date'\";\n }\n elseif(!empty($this->from_date) && !empty($this->to_date) && !empty($this->from_coef) && empty($this->to_coef))\n {\n $criteria->condition = \"coeficiente >= $this->from_coef and fechaFin >= '$this->from_date' and fechaFin <= '$this->to_date'\";\n }\n elseif(!empty($this->from_date) && empty($this->to_date) && !empty($this->from_coef) && empty($this->to_coef))\n {\n $criteria->condition = \"coeficiente >= $this->from_coef and fechaFin >= '$this->from_date'\";\n }\n elseif(empty($this->from_date) && !empty($this->to_date) && !empty($this->from_coef) && empty($this->to_coef))\n {\n $criteria->condition = \"coeficiente >= $this->from_coef and fechaFin <= '$this->to_date'\";\n }\n elseif(!empty($this->from_date) && empty($this->to_date) && empty($this->from_coef) && !empty($this->to_coef))\n {\n $criteria->condition = \"coeficiente <= $this->to_coef and fechaFin >= '$this->from_date'\";\n }\n elseif(empty($this->from_date) && !empty($this->to_date) && empty($this->from_coef) && !empty($this->to_coef))\n {\n $criteria->condition = \"coeficiente <= $this->to_coef and fechaFin <= '$this->to_date'\";\n }\n \n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('identificador',$this->identificador,true);\n\t\t$criteria->compare('fechaFin',$this->fechaFin,true);\n\t\t$criteria->compare('tasacion',$this->tasacion,true);\n\t\t$criteria->compare('cantReclamada',$this->cantReclamada,true);\n\t\t$criteria->compare('direccion',$this->direccion,true);\n $criteria->compare('codigoPostal',$this->codigoPostal,true);\n\t\t$criteria->compare('localidad',$this->localidad,true);\n\t\t$criteria->compare('nombreAcreedor',$this->nombreAcreedor,true);\n $criteria->compare('acreedor',$this->acreedor,true);\n $criteria->compare('coeficiente',$this->coeficiente);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'sort'=>array(\n 'defaultOrder'=>'fechaFin ASC',\n ),\n\t\t));\n\t}", "title": "" }, { "docid": "4cfcd56fdef2d189c210b9fc8c80d168", "score": "0.44816995", "text": "function select($condition) {\n $this->select = $condition;\n return $this; \n }", "title": "" }, { "docid": "89dee5b92be0d756eacd79eee7e59e7f", "score": "0.4478102", "text": "public static function doSelect(Criteria $criteria, PropelPDO $con = null)\n\t{\n\t\treturn PaymentPeer::populateObjects(PaymentPeer::doSelectStmt($criteria, $con));\n\t}", "title": "" }, { "docid": "1db3ebf321b75e364f1f7d76319c9e99", "score": "0.44766572", "text": "public static function doSelect(Criteria $criteria, PropelPDO $con = null) {\n $criteria->addJoin(self::ID_PERIODO,TbperiodoPeer::ID_PERIODO);\n $criteria->addDescendingOrderByColumn(TbperiodoPeer::ANO);\n $criteria->addDescendingOrderByColumn(TbperiodoPeer::SEMESTRE);\n $criteria->addDescendingOrderByColumn(TbperiodoPeer::PERIODO);\n $criteria->addAscendingOrderByColumn(self::COD_DISCIPLINA);\n return parent::doSelect($criteria, $con);\n }", "title": "" }, { "docid": "d5c33ec3fa330457be6682f3ecddd595", "score": "0.44712242", "text": "public function buildCriteria()\n {\n $criteria = new Criteria(FeaturePeer::DATABASE_NAME);\n\n if ($this->isColumnModified(FeaturePeer::FEATURE_ID)) $criteria->add(FeaturePeer::FEATURE_ID, $this->feature_id);\n if ($this->isColumnModified(FeaturePeer::DBXREF_ID)) $criteria->add(FeaturePeer::DBXREF_ID, $this->dbxref_id);\n if ($this->isColumnModified(FeaturePeer::ORGANISM_ID)) $criteria->add(FeaturePeer::ORGANISM_ID, $this->organism_id);\n if ($this->isColumnModified(FeaturePeer::NAME)) $criteria->add(FeaturePeer::NAME, $this->name);\n if ($this->isColumnModified(FeaturePeer::UNIQUENAME)) $criteria->add(FeaturePeer::UNIQUENAME, $this->uniquename);\n if ($this->isColumnModified(FeaturePeer::RESIDUES)) $criteria->add(FeaturePeer::RESIDUES, $this->residues);\n if ($this->isColumnModified(FeaturePeer::SEQLEN)) $criteria->add(FeaturePeer::SEQLEN, $this->seqlen);\n if ($this->isColumnModified(FeaturePeer::MD5CHECKSUM)) $criteria->add(FeaturePeer::MD5CHECKSUM, $this->md5checksum);\n if ($this->isColumnModified(FeaturePeer::TYPE_ID)) $criteria->add(FeaturePeer::TYPE_ID, $this->type_id);\n if ($this->isColumnModified(FeaturePeer::IS_ANALYSIS)) $criteria->add(FeaturePeer::IS_ANALYSIS, $this->is_analysis);\n if ($this->isColumnModified(FeaturePeer::IS_OBSOLETE)) $criteria->add(FeaturePeer::IS_OBSOLETE, $this->is_obsolete);\n if ($this->isColumnModified(FeaturePeer::TIMEACCESSIONED)) $criteria->add(FeaturePeer::TIMEACCESSIONED, $this->timeaccessioned);\n if ($this->isColumnModified(FeaturePeer::TIMELASTMODIFIED)) $criteria->add(FeaturePeer::TIMELASTMODIFIED, $this->timelastmodified);\n\n return $criteria;\n }", "title": "" }, { "docid": "64cf96743771c59d08a0c765edef0bc9", "score": "0.44703218", "text": "function getSelectedStandardCriteria($reportid) {\n\t\tglobal $adb;\n\t\t$sSQL = \"select vtiger_reportdatefilter.* from vtiger_reportdatefilter inner join vtiger_report on vtiger_report.reportid = vtiger_reportdatefilter.datefilterid where vtiger_report.reportid=?\";\n\t\t$result = $adb->pquery($sSQL, array($reportid));\n\t\t$selectedstdfilter = $adb->fetch_array($result);\n\n\t\t$this->stdselectedcolumn = $selectedstdfilter[\"datecolumnname\"];\n\t\t$this->stdselectedfilter = $selectedstdfilter[\"datefilter\"];\n\n\t\tif($selectedstdfilter[\"datefilter\"] == \"custom\") {\n\t\t\tif($selectedstdfilter[\"startdate\"] != \"0000-00-00\") {\n\t\t\t\t$startDateTime = new DateTimeField($selectedstdfilter[\"startdate\"].' '. date('H:i:s'));\n\t\t\t\t$this->startdate = $startDateTime->getDisplayDate();\n\t\t\t}\n\t\t\tif($selectedstdfilter[\"enddate\"] != \"0000-00-00\") {\n\t\t\t\t$endDateTime = new DateTimeField($selectedstdfilter[\"enddate\"].' '. date('H:i:s'));\n\t\t\t\t$this->enddate = $endDateTime->getDisplayDate();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "00c32a8a9dfa285288b377cff72e7d1b", "score": "0.4469167", "text": "public static function doSelect(Criteria $criteria, PropelPDO $con = null)\n\t{\n\t\treturn TblAdherentPeer::populateObjects(TblAdherentPeer::doSelectStmt($criteria, $con));\n\t}", "title": "" }, { "docid": "2743e5b754aa95ea63b7e15d381cb7a0", "score": "0.44682568", "text": "public static function doSelect(Criteria $criteria, PropelPDO $con = null)\n {\n return GsIngegevenSamenstellingenPeer::populateObjects(GsIngegevenSamenstellingenPeer::doSelectStmt($criteria, $con));\n }", "title": "" }, { "docid": "efc085b0dddf32aefa0aa6d62770c5d5", "score": "0.44662845", "text": "function getSelectedStdFilterCriteria($selecteddatefilter = \"\")\n\t{\n\t\tglobal $mod_strings;\n\n\t\t$datefiltervalue = Array(\"custom\",\"prevfy\",\"thisfy\",\"nextfy\",\"prevfq\",\"thisfq\",\"nextfq\",\n\t\t\t\t\"yesterday\",\"today\",\"tomorrow\",\"lastweek\",\"thisweek\",\"nextweek\",\"lastmonth\",\"thismonth\",\n\t\t\t\t\"nextmonth\",\"last7days\",\"last14days\",\"last30days\", \"last60days\",\"last90days\",\"last120days\",\n\t\t\t\t\"next30days\",\"next60days\",\"next90days\",\"next120days\"\n\t\t\t\t);\n\n\t\t$datefilterdisplay = Array(\"Custom\",\"Previous FY\", \"Current FY\",\"Next FY\",\"Previous FQ\",\"Current FQ\",\"Next FQ\",\"Yesterday\",\n\t\t\t\t\"Today\",\"Tomorrow\",\"Last Week\",\"Current Week\",\"Next Week\",\"Last Month\",\"Current Month\",\n\t\t\t\t\"Next Month\",\"Last 7 Days\",\"Last 30 Days\",\"Last 60 Days\",\"Last 90 Days\",\"Last 120 Days\",\n\t\t\t\t\"Next 7 Days\",\"Next 30 Days\",\"Next 60 Days\",\"Next 90 Days\",\"Next 120 Days\"\n\t\t\t\t);\n\n\t\tfor($i=0;$i<count($datefiltervalue);$i++)\n\t\t{\n\t\t\tif($selecteddatefilter == $datefiltervalue[$i])\n\t\t\t{\n\t\t\t\t$sshtml .= \"<option selected value='\".$datefiltervalue[$i].\"'>\".$mod_strings[$datefilterdisplay[$i]].\"</option>\";\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$sshtml .= \"<option value='\".$datefiltervalue[$i].\"'>\".$mod_strings[$datefilterdisplay[$i]].\"</option>\";\n\t\t\t}\n\t\t}\n\n\t\treturn $sshtml;\n\t}", "title": "" } ]
627c1ea6989e0986f8815fdf900c162e
Create a new controller instance.
[ { "docid": "b5c5f9545486306fec0d3801a963344e", "score": "0.0", "text": "public function __construct()\n {\n $this->middleware('verified');\n }", "title": "" } ]
[ { "docid": "0e97ef62b594928af5c3ff1ed8ae5798", "score": "0.81267446", "text": "abstract function createController();", "title": "" }, { "docid": "d3582d095ee9775f6f4fb42de54967bd", "score": "0.78697085", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n '--module' => $this->getModule() ? $this->getModule()->getAlias() : null,\n ]);\n }", "title": "" }, { "docid": "58e23f0ca90b7685c430554d40821885", "score": "0.7787912", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('module:make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n '--module' => $this->module,\n ]);\n }", "title": "" }, { "docid": "b25bbc225dbb993ff7ab033de64e1761", "score": "0.7710966", "text": "protected function createController()\n {\n $this->info('Creating controller');\n\n $controllerStub = file_get_contents(__DIR__ . '/stubs/make/controllers/IndexController.stub');\n\n $controllerStub = str_replace('{{module_name}}', $this->moduleName, $controllerStub);\n $controllerStub = str_replace('{{namespace}}', $this->namespace, $controllerStub);\n\n file_put_contents($this->newModulePath . '/Controllers/IndexController.php', $controllerStub);\n }", "title": "" }, { "docid": "4cf102a68a2c4bf129f151171860ec69", "score": "0.7629246", "text": "private function makeController()\n {\n new MakeController($this, $this->files);\n }", "title": "" }, { "docid": "ad63ba884644a37510f006afad73208d", "score": "0.757425", "text": "public function createController($controllerName){}", "title": "" }, { "docid": "a59063e5fba3134c1f02b53c7dd94aa2", "score": "0.7557747", "text": "public function createController() {\r\n $name = '\\\\RefGPC\\\\_controleurs\\\\' . $this->controllerName();\r\n //echo '<br />Dispatch::createController : Classe appelée : [' . $name.']';\r\n return new $name($this->nomBase(),$this->categorie); // categorie = admin / cron / ilot / centre / etc ...\r\n }", "title": "" }, { "docid": "ed7a438adfc625bce1a04b6627475077", "score": "0.752291", "text": "public static function create($controllerName)\n {\n \n\n echo \"creating a controller\";\n }", "title": "" }, { "docid": "b4dc134d1d2de6c91820e7eeee8a562d", "score": "0.74220717", "text": "protected function makeControllerInstance()\n {\n [$this->controllerClass, $this->controllerMethod] = \\explode('@', $this->action['uses']);\n\n $this->container->instance(\n $this->controllerClass, $this->controller = $this->container->make($this->controllerClass)\n );\n\n return $this->controller;\n }", "title": "" }, { "docid": "a533e050c5373b71bb5b28c349dead92", "score": "0.7359103", "text": "protected function createCtrl()\n {\n $oView = ViewFactory::createView(\n $this->ctrlName,\n str_replace('action', '', $this->actionName)\n );\n $aComponentsRootMap = AppHelper::getInstance()->getConfig('componentsRootMap');\n if (!isset($aComponentsRootMap['controllers'])) {\n throw new Exception(\"The field 'componentsRootMap.controllers' must be \"\n .\"presented in the main configuration file.\");\n }\n $sCtrlNamespace = str_replace(\n \\DIRECTORY_SEPARATOR,\n '\\\\',\n $aComponentsRootMap['controllers']\n );\n $sCtrlNameFull = $sCtrlNamespace.'\\\\'.$this->ctrlName;\n if (!is_null($oView)) {\n $sLayoutName = AppHelper::getInstance()->getConfig('defaultLayout');\n if (!is_null($sLayoutName)) {\n $oLayout = ViewFactory::createLayout($sLayoutName, $oView);\n $oCtrl = new $sCtrlNameFull($this->request, $oLayout);\n } else {\n $oCtrl = new $sCtrlNameFull($this->request, $oView);\n }\n } else {\n $oCtrl = new $sCtrlNameFull($this->request);\n }\n return $oCtrl;\n }", "title": "" }, { "docid": "fa2e19248d7183a8202dfd746f6bd775", "score": "0.73589486", "text": "public function createController(array $params);", "title": "" }, { "docid": "6ebf6f723cb05e65eeb91141b1a5bee6", "score": "0.73044425", "text": "public function createController() {\n\t\t// Check Class\n\t\tif(class_exists($this->controller)) {\n\t\t\t$parents = class_parents($this->controller);// return array of parents clases of the controller\n\t\t\t// Check Extend\n\t\t\tif(in_array(\"Controller\", $parents)) { // We check if base controller class exists\n\t\t\t\tif(method_exists($this->controller, $this->action)) { //We check if method in contr exists(action) in controller - first argument\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t//Method does not exists\n\t\t\t\t\techo '<h1>Method does not exists<h1>';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\n\t\t\t} else {\n\t\t\t\t// Base Controller Does Not Exist\n\t\t\t\techo '<h1>Base controller not exists<h1>';\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\t// Controller Class Does Not Exists\n\t\t\techo '<h1>Controller Class not exists<h1>';\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "283cd815a6c9505945ab1eb318f7105c", "score": "0.724196", "text": "public function controller ()\n {\n $config = $this->config();\n $request = $this->request();\n\n $module = $request->getModule();\n $funcionality = $request->getFuncionality();\n $action = $request->getAction();\n $namespace = $config->get('app.namespace').self::NAMESPACE_SEPARATOR;\n\n if (TRUE === Request::$useModule) {\n $namespace .= $module;\n }\n\n $namespace .= sprintf('%1$s%2$s%1$smvcb%1$scontroller%1$s%3$sController'\n , self::NAMESPACE_SEPARATOR\n , $funcionality\n , ucfirst($funcionality));\n\n $fullpath = Location::realpathFromNamespace($namespace).'.php';\n\n ControllerException::throwsExceptionIfParamIsNull(is_file($fullpath), \"Controller::{$funcionality} não implementada\");\n\n $ctrl = new $namespace();\n ControllerException::throwsExceptionIfParamIsNull($ctrl->hasAction($action), \"Action '{$namespace}::{$action}' não existe.\");\n\n return $ctrl;\n }", "title": "" }, { "docid": "dfbcc97124390eb049b2072fc3a0cb36", "score": "0.718215", "text": "public function getControllerInstance()\r\n {\r\n $path = '\\App\\\\Controllers\\\\';\r\n $newControllerInstance = $path . $this->getControllerName();\r\n return new $newControllerInstance();\r\n }", "title": "" }, { "docid": "d2ec89b3daebc62d90411540c87e60d0", "score": "0.7148061", "text": "public function MyController(){\n\t\t$class = $this->ClassName . \"_Controller\";\n\t\t$controller = new $class($this);\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "adc39f86df4b82bf4a740696ad254f75", "score": "0.7104455", "text": "public function createController(){\n if(class_exists($this->controller)){\n $parents = class_parents($this->controller);\n // controlleer of class is extended.\n if(in_array('Controller', $parents)){\n // controlleer of class methodes heeft, zoja word nieuwe controller returned.\n if(method_exists($this->controller, $this->action)){\n return new $this->controller($this->action, $this->request);\n }else{\n echo \"<h1>Method does not exist.</h1>\";\n return;\n }\n }else{\n echo \"<h1>Base controller not found.</h1>\";\n return;\n }\n }\n else{\n echo \"<h1>Controller class doesnt exist..</h1>\";\n return;\n }\n }", "title": "" }, { "docid": "049775b9c6317ca456d68c02d27fe3b0", "score": "0.7088181", "text": "public static function makeController($controllerName)\n\t{\n\t\t\n\t\tif(!class_exists($controllerName)) return false;\n\n\t\t$controller = new $controllerName;\n\n\t\t$controller -> setSession(self::$session);\n\t\t$controller -> setContext(self::$context);\n\t\t$controller -> setRequest(self::$request);\n\t\t$controller -> setSettings(self::$settings);\n\t\t$controller -> setInspector(self::$classInspector);\n\t\t$controller -> setLog(self::$log);\n\t\t\n\t\treturn $controller;\n\t\t\n\t}", "title": "" }, { "docid": "c90572ec613404cdceb0fa856ed9c017", "score": "0.6933888", "text": "private function createController(): bool\n {\n // collect actions\n $actions = collect(['index', 'show', 'create', 'store', 'edit', 'update', 'destroy'])\n ->when($this->controller_only_actions->count(), function ($collection) {\n return $collection->intersect($this->controller_only_actions)->values();\n })\n ->diff($this->controller_except_actions)\n ->prepend('construct')\n ->map(function ($item) {\n if (method_exists($this, $item)) {\n return $this->{$item}();\n } else {\n return null;\n }\n })\n ->filter();\n \n // write template\n $this->checkFileExist(app_path(\"Http/Controllers/$this->controller_classname.php\"), function ($path) use ($actions) {\n TemplateHelper::fromFile(FIBERS_ROCKET.\"/templates/controller.stub\")->replace([\n \"import\" => collect($this->controller_import)->map(function ($item) { return \"use $item;\"; })->join(\"\\n\"),\n \"name\" => $this->controller_classname,\n \"properties\" => Str::finish(collect($this->controller_properties)->map(function ($item, $key) { return \"\\tprivate \\$$key = $item;\"; })->join(\"\\n\"), \"\\n\"),\n \"actions\" => $actions->join(\"\\n\\n\")\n ])->tofile($path);\n\n // output to user\n $this->infoDelayed(\"Controller created [app/Http/Controllers/$this->controller_classname.php]\");\n });\n\n return true;\n }", "title": "" }, { "docid": "785132f8f663628ac8a552e464ead4fe", "score": "0.6893385", "text": "public function loadController(){\r\n $class_name = $this->request->controller . \"Controller\";\r\n $controller = new $class_name();\r\n return $controller;\r\n }", "title": "" }, { "docid": "6785f0f0cdd20e4e36e94b359258e4e5", "score": "0.68703586", "text": "public function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n $className = $this->controllerNamespace . '\\\\' . $className;\n $controller = new $className($controllerName);\n return $controller;\n }", "title": "" }, { "docid": "46af1c254a56a201f4930e06b3df44e7", "score": "0.67154294", "text": "private function createController(Request $request) {\r\n // Thanks to the rewrite, incoming URL look like :\r\n // index.php?controller=XXX&action=YYY&id=ZZZ\r\n\r\n $controller = \"Home\"; // Default controller\r\n if ($request->parameterExist('controller')) {\r\n $controller = $request->getParameter('controller');\r\n // First letter in captial\r\n $controller = ucfirst(strtolower($controller));\r\n }\r\n // Create file name of controller\r\n // e.g. : Controller/Controller<$controller>.php\r\n $classController = \"Controller\" . $controller;\r\n $fileController = \"Controller/\" . $classController . \".php\";\r\n if (file_exists($fileController)) {\r\n // Require of the needed controller\r\n require($fileController);\r\n $controller = new $classController();\r\n $controller->setRequest($request);\r\n return $controller;\r\n }\r\n else {\r\n throw new Exception(\"File '$fileController' introuvable\");\r\n }\r\n }", "title": "" }, { "docid": "e30a60a5f4b1e2175066a87c723ad93d", "score": "0.6685717", "text": "public static function getController(){\n require_once('controllers/'.self::$page.'.php');\n $controller = ucfirst(self::$page).'Controller';\n self::$controller = new $controller(self::$session, Token::$token, self::$curl); \n }", "title": "" }, { "docid": "53c6a72466eeba5dcd5b4012f47f2546", "score": "0.66782504", "text": "public static function factory($controller) {\n include_once(Config()->CONTROLLERS_PATH.'application_controller.php');\n if ($controller != 'application') {\n\n \tif (Registry()->app_system != 'public') {\n \t\tinclude_once(Config()->CONTROLLERS_PATH . Registry()->app_system . '/' . Registry()->app_system.'_controller.php');\n \t}\n\n \tif (Registry()->app_system == 'modules') {\n \t\t$controller_file = Config()->MODULES_PATH . basename($controller).'/Controller.php';\n \t} else {\n \t\tif(Registry()->in_app) {\n \t\t\t$controller_file = Config()->MODULES_PATH . basename($controller).'/Public.php';\n \t\t} else {\n \t\t\t$controller_file = Config()->CONTROLLERS_PATH . Registry()->app_system . '/' . basename($controller).'_controller.php';\n \t\t}\n\n \t}\n if(!is_file($controller_file) || !include_once($controller_file)) {\n\t\t\t\t\tthrow new FileMissingException($controller_file);\n\t\t\t\t}\n\t\t\t\t$controller_class = Inflector::camelize($controller).'Controller';\n\t\t\t\tif(!class_exists($controller_class, false)) {\n\t\t\t\t\tthrow new ClassMissingException($controller_class);\n\t\t\t\t}\n }\n $controller_class = Inflector::camelize($controller.\"Controller\");\n\n // create the controller\n\t\t\treturn new $controller_class;\n\t }", "title": "" }, { "docid": "63232f65ff0c3bb693e562fe2c544e9d", "score": "0.6670162", "text": "protected function createControllers()\n\t{\n\t\t$templatePath = static::$templatePath;\n\n\t\t$controllers = [\n\t\t\t'AuthController',\n\t\t\t'HomeController',\n\t\t\t'MedicsController',\n\t\t];\n\n\t\tforeach ($controllers as $controller)\n\t\t{\n\t\t\tFile::put(app_path() . '/Aidkit/controllers/Aidkit' . $controller . '.php', File::get($templatePath . '/controllers/' . $controller . '.txt'));\n\t\t}\n\t}", "title": "" }, { "docid": "9a00a53af767252c6741df4ca1be4a23", "score": "0.66563", "text": "private function InitController() {\n $applicationName = (isset($this->uri[Config::Instance(SETTING_USE)->appLink]) && ! empty($this->uri[Config::Instance(SETTING_USE)->appLink]))\n ? $this->uri[Config::Instance(SETTING_USE)->appLink]\n : Config::Instance(SETTING_USE)->defaultApplication;\n\n $controllerName = (isset($this->uri[Config::Instance(SETTING_USE)->comLink]) && ! empty($this->uri[Config::Instance(SETTING_USE)->comLink]))\n ? $this->uri[Config::Instance(SETTING_USE)->comLink]\n : Config::Instance(SETTING_USE)->defaultController;\n \n $filePath = PATH_BASE . DS . Config::Instance(SETTING_USE)->applicationPath . DS . $applicationName .\n DS . 'Controllers' . DS . ucfirst($controllerName) . '.cs.php';\n try {\n if (file_exists($filePath)) {\n require_once( $filePath );\n\n try {\n if (class_exists(\"_\".$controllerName)) {\n $controllerName = \"_\".$controllerName;\n $this->controller = new $controllerName($this->URI, $this->Input);\n }\n else\n throw new CustomException();\n }\n catch(CustomException $e) {\n $e->ShowError('404 Controller Not Found', 'The application doesn\\'t have controller that you requested.', 404);\n }\n }\n else\n throw new CustomException();\n }\n catch(CustomException $e) {\n $e->ShowError('404 Page Not Found', 'The page you requested was not found.', 404);\n }\n }", "title": "" }, { "docid": "b74e4a8473b98c8c654e7962adad4d64", "score": "0.665386", "text": "public function instantiateController($name){\r\n\r\n $class = 'app\\\\controller\\\\'.ucfirst($name);\r\n\r\n $controller = new $class;\r\n\r\n $annotations = Annotations::ofClass($controller);\r\n\r\n $scope = EVENT_SCOPE;\r\n foreach($annotations as $annotation){\r\n if($annotation instanceof ScopeAnnotation){\r\n $scope = $annotation->name;\r\n }\r\n }\r\n\r\n switch($scope){\r\n\r\n case SESSION_SCOPE :\r\n $this->sessionContext->set($name, $controller);\r\n break;\r\n\r\n case PAGE_SCOPE :\r\n $this->pageContext->set($name, $controller);\r\n break;\r\n case REQUEST_SCOPE :\r\n $this->requestContext->set($name, $controller);\r\n break;\r\n case EVENT_SCOPE:\r\n default:\r\n // TODO\r\n break;\r\n // TODO mode\r\n }\r\n\r\n return $controller;\r\n }", "title": "" }, { "docid": "24dcf05a837720740e00e222d9f31015", "score": "0.66150075", "text": "protected function createController()\n {\n $request = new Zend_Controller_Request_HttpTestCase();\n $request->setModuleName('my-module');\n $request->setControllerName('my-controller');\n $request->setActionName('my-action');\n $response = new Zend_Controller_Response_HttpTestCase();\n return $this->getMock('Zend_Controller_Action', null, array($request, $response));\n }", "title": "" }, { "docid": "87a8b0846a013b96892bf86fd98119dd", "score": "0.65360427", "text": "private function createControler(fwRequest $request)\r\n {\r\n // url parameter format : index.php?application=blog&class=post&action=post&id=1\r\n //$application = DEFAULT_APPLICATION; // default application\r\n \r\n if ($request->isParameter('application')) {\r\n $application = strtolower($request->getParameter('application')); \r\n } else {\r\n $application = fw\\fwConfiguration::get(INITIAL_APPLICATION); // default application dev.ini \r\n }\r\n fwWatch(array(\r\n 'createControler(application)') , $application, get_class($this));\r\n // for namespace compatibility\r\n $class = $this->getClass($request);\r\n \r\n // Controler calls with a 'c' prefix\r\n $controlerClass = substr( fw\\fwConfiguration::get(\"class.c\") , 0,1 ) . ucfirst(strtolower($class));\r\n \r\n /*\r\n * manage Fully Qualified Class Name\r\n */\r\n $appClass = new fw\\fwApplicationClass();\r\n $namespace = $appClass->getNamespace($application, $controlerClass);\r\n $pathClass = $appClass->getFilePath($namespace);\r\n \r\n if (file_exists($pathClass)) {\r\n /*\r\n * get controler class file\r\n */\r\n require ($pathClass);\r\n \r\n /*\r\n * new controler instance\r\n */\r\n fwWatch(array('createControler(application)' => $application,\r\n 'namespace' => $namespace), \"\", get_class($this));\r\n $controler = new $namespace($application);\r\n $controler->setRequest($request);\r\n return $controler; // Return object controler\r\n } else\r\n throw new fw\\fwException(\"file '$pathClass' not found\");\r\n }", "title": "" }, { "docid": "40238db7ac1f19c70d404d42a87bd53b", "score": "0.6502224", "text": "protected function createController($name)\n {\n $type=\"Controller\";\n if($this->option('withdetail')){\n $type=\"ControllerWD\";\n }\n $controllerTemplate = str_replace([\n '{{modelName}}',\n '{{modelNamePlural}}',\n '{{modelNameSingular}}'\n ],\n [\n $name,\n strtolower(str_plural($name)),\n strtolower($name)\n ],\n $this->getStub($type));\n file_put_contents(app_path(\"/Http/Controllers/{$name}Controller.php\"), $controllerTemplate);\n }", "title": "" }, { "docid": "d03a49f50f90234d9fd547fd5fcb4672", "score": "0.6423528", "text": "protected function create(){\n\t\techo\"HomeController create not implemented\";\n\n\t}", "title": "" }, { "docid": "473043e328a1e3e9f82c3144d687a6da", "score": "0.6394826", "text": "private function _addController()\n {\n $this->_currentController = ucwords($this->_request[0].'Controller');\n\n CoreController::loadController($this->_request[0]);\n return $this;\n }", "title": "" }, { "docid": "229e9484f2dec4486e2d18a6c2295e4e", "score": "0.6390387", "text": "public static function factory(Request $request) {\n\t\t$ns = $request->getNS();\n\t\t$class = ($ns ? $ns .'\\\\' : '') . 'Controller_'. Util::toClassName($request->getController());\n\t\treturn new $class($request);\n\t}", "title": "" }, { "docid": "1088f70290fe5ece4bb11a0e9894cc79", "score": "0.6362804", "text": "function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n $results = $this->worker($this->args);\n\n if ($results) {\n $room_name = $results['name'];\n $room_id = $results['room_id'];\n $results = json_decode((string)$results, true);\n $this->clientService->showDoneTemplate(\n \"Creating a room with a template\",\n \"Creating a room with a template\",\n \"Room $room_name has been created!<BR>Room ID: $room_id\",\n json_encode(json_encode($results))\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n\n }", "title": "" }, { "docid": "7369a833571d139d533bec538c23a3cd", "score": "0.6334097", "text": "function __construct($controller)\n {\n // $model = substr($controller, 0, -10);\n // require_once 'api/models/'.$model.'.php';\n // $class = 'api\\models\\\\'.$model;\n // return $this->model = new $class();\n }", "title": "" }, { "docid": "e43e3b48f331c67ac712a08c2fc8cda7", "score": "0.6307598", "text": "protected function generateController()\n {\n if ($this->generate_all || $this->ask('Generate controller?') == 'y') {\n $stub = $this->processStub(__DIR__ . '/Stubs/controller.stub');\n $file_dir = base_path() . '/app/' . $this->argument('module-name') . '/Controllers/' . $this->argument('module-name') . 'Controller.php';\n \n $this->makeDirectory($file_dir);\n $this->files->put($file_dir, $stub);\n \n $this->warn('Controller has been created!');\n \n return $this;\n }\n }", "title": "" }, { "docid": "c9d9374214ae1b6e1809f516acba95db", "score": "0.6287242", "text": "protected function createControllerClass($pClassName)\n {\n if ($pClassName != '') {\n try {\n if ($this->controllerFactory) {\n $this->controller = call_user_func_array($this->controllerFactory, array(\n $pClassName,\n $this\n ));\n } else {\n $this->controller = new $pClassName($this);\n }\n if (get_parent_class($this->controller) == '\\RestService\\Server') {\n $this->controller->setClient($this->getClient());\n }\n } catch (\\Exception $e) {\n throw new \\Exception('Error during initialisation of '.$pClassName.': '.$e, 0, $e);\n }\n } else {\n $this->controller = $this;\n }\n }", "title": "" }, { "docid": "971751ed4e91bf973ac67157007e3f97", "score": "0.628525", "text": "public function create(ServerRequestInterface $request): Controller\n {\n assert($request instanceof ServerRequest);\n $className = $this->getControllerClass($request);\n if ($className === null) {\n throw $this->missingController($request);\n }\n\n $reflection = new ReflectionClass($className);\n if ($reflection->isAbstract()) {\n throw $this->missingController($request);\n }\n\n // Get the controller from the container if defined.\n // The request is in the container by default.\n if ($this->container->has($className)) {\n $controller = $this->container->get($className);\n } else {\n $controller = $reflection->newInstance($request);\n }\n\n return $controller;\n }", "title": "" }, { "docid": "be792a48ef919ea543deb6a1df3195cd", "score": "0.6272948", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n # 1. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $envelope_id = PauseSignatureWorkflowService::worker($this->args, $this->clientService, $this::DEMO_DOCS_PATH);\n\n if ($envelope_id) {\n $_SESSION[\"pause_envelope_id\"] = $envelope_id;\n $nextExampleUrl = \"/public/index.php?page=eg033\";\n $this->clientService->showDoneTemplate(\n \"Envelope sent\",\n \"Envelope sent\",\n \"The envelope has been created and sent!\n <br/>Envelope ID {$envelope_id}.<br/>\n <p>To resume a workflow after the first recipient signs\n the envelope use <a href={$nextExampleUrl}>example 33.</a><br/>\"\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "ad5b662bc0f3b410544f7e08b1eaafba", "score": "0.6270174", "text": "protected function instantiateController($class)\n {\n return new $class();\n }", "title": "" }, { "docid": "1c4e26eceb4b5b8a6a4551d05d657e97", "score": "0.6257386", "text": "protected function generateController(){\n\n $fileName = studly_case(class_basename($this->getModuleName()).'Controller');\n\n $dirName = 'Controllers\\\\';\n\n $name = $this->parseName('Modules\\\\'.studly_case(ucfirst($this->getNameInput())).'\\\\'.$dirName.$fileName);\n\n\n if ($this->files->exists($path = $this->getPath($name))){\n $this->error($this->type.' already exists!');\n return null;\n }\n\n\n $this->currentStub = __DIR__.'/stubs/controller.stub';\n\n $this->makeDirectory($path);\n\n $this->files->put($path, $this->buildClass($name));\n\n $this->info('Generated Base Controller: ' . $fileName);\n\n\n }", "title": "" }, { "docid": "d7f4986c2cb06a250b44432737e8b71f", "score": "0.62525564", "text": "public function loadController()\r\n {\r\n $name = $this->request->controller . \"Controller\";\r\n \r\n // Files absolute path in the file system\r\n $file = ROOT . 'Controllers/' . $name . '.php';\r\n \r\n // Require the found controller\r\n require($file);\r\n\r\n // instantiate it now that it is included\r\n $controller = new $name();\r\n return $controller;\r\n }", "title": "" }, { "docid": "52881ecbc537e9012f4da38f4bf04738", "score": "0.6230452", "text": "public static function make_controller($controller, $api){\n\n $base = dirname(__FILE__);\n $template = \"$base/templates/controller.template\";\n\n $names = array('Name'=>ucfirst($api),'name'=>$api);\n $data = file_get_contents($template);\n\n foreach($names as $name => $value) {\n $data = str_replace(\"{\".$name.\"}\", $value, $data);\n }\n\n file_put_contents($controller, $data);\n\n if(file_exists($controller)) return true;\n\n // failed to create the controller\n return false;\n }", "title": "" }, { "docid": "fd5583df8c4cb1f9e0aa85112ad5315c", "score": "0.6226554", "text": "public static function makeController( $controllerName ){\n\t\t//controller name must be camelcased and plural\n\t\t//model file name must be CamelCased and singular eg. Book \n\t\t\n\t\t\t\t//model file name must be CamelCased and singular eg. Book \n\t\t\n\t\t//get a sample copy of the text to be written to the controller config \n\t\t$controllerFile = file_get_contents (__DIR__ .'/templates/Controllers.php');\n\t\t\n\t\t$controllerTemplate = __DIR__ . '/../../app/Controllers/'.$controllerName.'.php';\n\t\t$handle = fopen($controllerTemplate,\"x+\") or die('Cannot open file: '.$controllerTemplate); \n\t\t\n\t\t\n\t\t\n\t\tif($controllerFile){\n\t\t\t\t$writeToFile = fwrite($handle, $controllerFile);\n\t\t \n\t\t \n\t\t\t\tif($writeToFile){\n\t\t\t\t\tfclose($handle);\n\t\t\t\t\t\n\t\t\t\t\t//update Controller Config\n\t\t\t\t\t//get a sample copy of the text to be written to the controller config \n\t\t$controllerConfigTemplate = file_get_contents (__DIR__ .'/templates/ControllerConfig.php');\n\t\t $controllerConfigTemplate = str_replace('SamplesController',$controllerName, $controllerConfigTemplate);\n\t\t $controllerConfigTemplate = str_replace('<?php','', $controllerConfigTemplate);\n\t\t \n\t\t $controllerConfigFile = __DIR__ . '/../../config/ControllerConfig.php';\n\t\t \n\t\t\t\t$controllerConfigHandle = fopen($controllerConfigFile,\"a\") or die('Cannot open file: '.$controllerConfigFile); \n\t\t\n\t\t\t\tfwrite($controllerConfigHandle, \"\\n\". $controllerConfigTemplate);\n\t\t\t\tfclose($controllerConfigHandle);\n\n\n//update routes file\n\t\t\t\t\t//get a sample copy of the text to be written to the file config \n\t\t$routesTemplate = file_get_contents (__DIR__ .'/templates/Routes.php');\n\t\t $routesTemplate = str_replace('SamplesController',$controllerName, $routesTemplate);\n\t\t \n\t\t //remove the Controller in the controller name \n\t\t //so SamplesController becomes Samples\n\t\t $databaseTableName = str_replace(\"Controller\", \"\", $controllerName);\n\t\t //convert to lower case \n\t\t $databaseTableName = strtolower($databaseTableName);\n\t\t \n\t\t //replace all occurences of samples \n\t\t $routesTemplate = str_replace('samples',$databaseTableName, $routesTemplate);\n\t\t \n\t\t \n\t\t //remove the <?php opening tag in the template file \n\t\t $routesTemplate = str_replace('<?php','', $routesTemplate);\n\t\t \n\t\t //find the routes file\n\t\t $routesFile = __DIR__ . '/../../routes/routes.php';\n\t\t \n\t\t\t\t$routesHandle = fopen($routesFile,\"a\") or die('Cannot open file: '.$routesFile); \n\t\t\n\t\t//append to it\n\t\t\t\tfwrite($routesHandle, \"\\n\". $routesTemplate);\n\t\t\t\tfclose($routesHandle);\n\n\n\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\treturn false;\t\n\t}", "title": "" }, { "docid": "e542c0f1a8065ec15c6ca24235404c6b", "score": "0.62220067", "text": "private function loadController() {\n if (!$this->admin) {\n $class_name = 'App\\Controller\\\\';\n } else {\n $class_name = 'App\\Controller\\Admin\\\\';\n }\n $class_name .= ucfirst($this->name).'Controller';\n $class_name_dir = str_replace('\\\\', DS, $class_name);\n $file = ROOT.DS.$class_name_dir.'.php';\n if (!file_exists($file)) {\n $this->error();\n }\n return new $class_name($this->url);\n }", "title": "" }, { "docid": "8d4bc26b578e3283c875f23989548262", "score": "0.62155735", "text": "public function submit_controller() {\n\t\t$data = $this->toolbox('sanitize')->xss($_POST);\n\t\t$controller = $data['controller_name']??'';\n\t\t$controller = ucwords($controller);\n\n\t\t# Do validation check for special chars, spaces, numbers, etc first\n\t\t$check_if_valid = $this->toolbox('validate')->form($data, [\n\t\t\t\t'create_controller' => 'required|max_len,75|min_len,1|alpha',\n\t\t\t]);\n\n\t\tif ($check_if_valid === FALSE) {\n\t\t\t// Did not pass validation -- Show errors\n\t\t\t$this->template->assign('errors', $check_if_valid);\n\t\t\t$this->errors = $check_if_valid;\n\t\t\t$this->redirect('codegenie/create_controller/error/controller');\n\t\t\texit;\n\t\t}\n\n\t\t$this->new_url = $this->config->setting('site_url').strtolower($controller);\n\t\t$this->files_created['controller'] = \"{$this->controller_dir}{$controller}_Controller.php\";\n\t\t$file = new \\SplFileObject(\"{$this->controller_dir}{$controller}_Controller.php\", \"w\");\n\t\t$temp_assign = '';\n\t\tif ($data['create_view'] == 'on') {\n\t\t\t$temp_assign = '$this->template->assign(\"content\", \"'.strtolower($controller).'/index.tpl\");';\n\t\t}\n\t\t$contents = <<<EOT\n<?php\nnamespace Web\\Controller;\nuse Hal\\Controller\\Base_Controller;\n\nclass {$controller}_Controller extends Base_Controller\n{\n\tpublic function __construct(\\$app)\n\t{\n\t\tparent::__construct(\\$app);\n\t}\n\n\tpublic function index()\n\t{\n{$temp_assign}}\n\n}\n\nEOT\n\t\t;\n\n\t\tchmod($this->controller_dir.$controller.'_Controller.php', octdec(0644));\n\t\t$written = $file->fwrite($contents);\n\t\t// echo \"Wrote $written bytes to file\";\n\n\t\tif ($data['create_model'] == 'on') {\n\t\t\t// Create model checkbox was selected; create a model\n\t\t\t$this->files_created['model'] = \"{$this->model_dir}{$controller}Model.php\";\n\t\t\t$model_file = new \\SplFileObject(\"{$this->model_dir}{$controller}Model.php\", \"w\");\n\t\t\t$model_contents = <<<EOT\n<?php\n\nclass {$controller}Model extends Hal\\Model\\System_Model\n{\n\n}\n\nEOT\n\t\t\t;\n\n\t\t\tchmod($this->controller_dir.$controller.'_Controller.php', octdec(0644));\n\t\t\t$model_written = $model_file->fwrite($model_contents);\n\t\t\t// echo \"Wrote $model_written bytes to file\";\n\t\t}\n\n\t\tif ($data['create_view'] == 'on') {\n\t\t\t$controller = strtolower($controller);\n\t\t\t// Create view checkbox was selected; create a view\n\t\t\tif (!is_dir($this->view_dir.$controller)) {\n\t\t\t\tmkdir($this->view_dir.$controller);\n\t\t\t}\n\t\t\t$this->files_created['view'] = \"{$this->view_dir}{$controller}/index.tpl\";\n\t\t\t$view_file = new \\SplFileObject(\"{$this->view_dir}{$controller}/index.tpl\", \"w\");\n\t\t\t$view_contents = '';\n\t\t\tchmod($this->controller_dir.$controller.'_Controller.php', octdec(0644));\n\t\t\t$view_written = $view_file->fwrite($view_contents);\n\t\t\t// echo \"Wrote $model_written bytes to file\";\n\t\t}\n\n\t\t$this->template->assign('data', $data);\n\t\t$this->template->assign('url', $this->new_url);\n\t\t$this->template->assign('controller', $this->files_created['controller']);\n\t\t$this->template->assign('model', $this->files_created['model']);\n\t\t$this->template->assign('view', $this->files_created['view']);\n\t\t$this->template->assign('content', 'codegenie/submit_controller.tpl');\n\t}", "title": "" }, { "docid": "7b3433e389a904704c0568763e651908", "score": "0.6204198", "text": "public function run(): void\n {\n $controller = $this->request->getController();\n $action = $this->request->getAction();\n $params = $this->request->getParams();\n\n $controllerPath = ROOT . '/app/Controllers/' . $controller . '.php';\n if (!file_exists($controllerPath)) {\n $this->errorPage();\n }\n\n include_once $controllerPath;\n $createController = new $controller;\n\n if (!method_exists($createController, $action)) {\n $this->errorPage();\n }\n\n call_user_func_array([$createController, $action], $params);\n }", "title": "" }, { "docid": "2a7bf83dd3ac182f364ee8c75e41df3a", "score": "0.61996293", "text": "public function create(Info $Info, ?string $controller = 'Home', ?string $type = null){\n\n try{\n\n if( ($Info->getAppBase() !== null) && ($Info->getAppName() !== null) ){\n $app_base = $Info->getAppBase();\n $app_name = $Info->getAppName();\n }else{\n throw new \\Exception(\"Error: Couldn't resolve app directories\");\n }\n\n if( !empty($app_base) ){\n\n /* Controller Buffering */\n\n if(!file_exists(\"{$app_base}controller/{$controller}.php\")) {\n\n $type = $type != 'api' ? null : 'api';\n\n /**\n * For App controller\n * @var [type]\n */\n $blueprint = new BluePrint($app_name);\n $Base = $blueprint->controller($controller);\n\n $Info->getprogressMessage(\"createController\");\n\n (new Filehandler())->createFile(\"{$app_base}/controller/$type/{$Base['filename']}\", $Base['code']);\n\n print(\"{$controller} created\\n\");\n\n /**\n * Autoload classes \n */\n\n print( shell_exec($Info->getCommand(\"autoload\")) ).\"\\n\";\n\n\n }else{\n throw new \\Exception(\"Error: Couldn't create {$controller} controller, {$controller} exists\\n\");\n }\n }\n\n }catch(\\Exception $e){\n\n print($e->getMessage().' on line '.$e->getLine().' ('.$e->getFile().\")\\n\");\n }catch(\\Throwable $e){\n print($e->getMessage().' on line '.$e->getLine().' ('.$e->getFile().\")\\n\");\n }finally{\n\n if(empty($type))\n print \"Web controller creation closed\\n\";\n else\n print \"{$type} controller creation closed\\n\";\n }\n }", "title": "" }, { "docid": "17395d0f75f018d0f95b64dea6238e6f", "score": "0.6163206", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n # 1. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $envelope_id = $this->worker($this->args);\n\n if ($envelope_id) {\n $_SESSION['pause_envelope_id'] = false;\n $this->clientService->showDoneTemplate(\n \"Envelope unpaused\",\n \"Envelope unpaused\",\n \"The envelope workflow has been resumed and the envelope\n has been sent to a second recipient!<br/>\n Envelope ID {$envelope_id}.\"\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "e44fc39f86e9c49aac7261ec0464c2d3", "score": "0.6157463", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n # 2. Call the worker method\n $results = $this->worker($this->args);\n\n if ($results) {\n # results is an object that implements ArrayAccess. Convert to a regular array:\n $results = json_decode((string)$results, true);\n $this->clientService->showDoneTemplate(\n \"Envelope list\",\n \"List envelopes results\",\n \"Results from the Envelopes::listStatusChanges method:\",\n json_encode(json_encode($results))\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "4ad769751d9375e35d4165ccf69ca652", "score": "0.6143896", "text": "protected function createModelController($name)\n {\n try {\n // Prepare\n $path = $this->rootPath.'/app/Controllers';\n // Directory\n if (!is_dir($path))\n mkdir($path);\n // Controller file\n $filename = $path.'/'.$name.'.php';\n if (!file_exists($filename)) {\n file_put_contents(\n $filename,\n preg_replace(\n ['/\\{0\\}/', '/\\{1\\}/', '/\\{2\\}/', '/\\{3\\}/', '/\\{4\\}/', '/\\{5\\}/'],\n [\n $this->config['namespace'],\n $name,\n array_key_exists('author', $this->config) ? $this->config['author'] : '',\n $this->config['localize']['textdomain'],\n $this->config['version'],\n array_key_exists('comment', $this->options) ? $this->options['comment'] : $name,\n ],\n $this->getTemplate('modelcontroller.php')\n )\n );\n // Print created\n $this->_print_success('Controller created!');\n $this->_lineBreak();\n } else {\n // Print exists\n $this->_print_info('Controller exists!');\n $this->_lineBreak();\n }\n } catch (Exception $e) {\n file_put_contents(\n $this->rootPath.'/error_log',\n $e->getMessage()\n );\n throw new NoticeException('Command \"'.$this->key.'\": Fatal error occurred.');\n }\n }", "title": "" }, { "docid": "8799d79df5f40840c81b7e4f1c7dc504", "score": "0.6124735", "text": "private function load_controller()\n {\n if (file_exists(CONTROLLER_DIR . ucfirst($this->url[0]) . '.php')) {\n $this->controller = $this->url[0];\n unset($this->url[0]);\n } else {\n $error = new NotFoundException(\"The Controller \" . $this->url[0] . \" could not be found.\");\n $error->print_error();\n }\n\n\n require_once CONTROLLER_DIR . ucfirst($this->controller) . '.php';\n $this->controller = new $this->controller;\n }", "title": "" }, { "docid": "e3373ed97c1507cbf10f005a62f94b58", "score": "0.6078956", "text": "public function __construct(string $controller, null|string $actions=null){ \n $this->camelize = new Camelize();\n $this->uncamelize = new Uncamelize(); \n $source = file_get_contents(TEMPLATE_PATH.'/php/controller.php');\n $name = ($this->camelize)(($this->uncamelize)($controller));\n $target = $this->config->application->controllersDir.$name.'Controller.php';\n if(file_exists($target)){\n $source = file_get_contents($target);\n } else {\n $source = str_replace(['[name]', '[APP]'], [$name, ((defined('TYPE') && constant('TYPE')==='app') ? ucfirst(APP).'\\Base\\Controller' : 'Phalcon\\ControllerBase')], $source);\n } \n if(!defined('NO_VIEW')){\n exec('mkdir -p '.$this->config->application->viewsDir.$controller);\n }\n $this->setActions($controller, $actions, $source);\n file_put_contents($target, $source); \n echo $target.\"\\n\";\n }", "title": "" }, { "docid": "01d0a8b2afd7f63f5cdd882502f21e46", "score": "0.6074318", "text": "protected function runController()\n {\n $parsedUrl = parse_url($_SERVER['REQUEST_URI']);\n $path = trim($parsedUrl['path'], '/');\n $pathRoute = explode('/', $path);\n if (!$pathRoute) {\n throw new NotFound();\n }\n $controller = $pathRoute[0] ?? null; // PHP 7\n if (!preg_match(\"/[A-Za-z0-9]/\", $controller)) { // make sure there ain't no funny business going on\n throw new NotFound();\n }\n $action = $pathRoute[1] ?? 'list'; // `list` is the default action\n $action_name = 'action'.ucfirst($action);\n $controller_name = ucfirst($controller).'Controller';\n $controller_path = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . $controller_name . '.php';\n $controller_class_name = '\\app\\controllers\\\\'.$controller_name;\n if (!file_exists( $controller_path )) {\n throw new NotFound();\n }\n if (!class_exists( $controller_class_name )) {\n throw new NotFound();\n }\n $this->controller = new $controller_class_name();\n if (!method_exists($this->controller, $action_name)) {\n throw new NotFound();\n }\n $response = $this->controller->$action_name();\n if (is_array($response) || is_object($response)) {\n echo json_encode($response);\n }\n }", "title": "" }, { "docid": "14d0cf0c580ccc6830d99422ce4b5af2", "score": "0.60347664", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n $_SESSION[\"envelope_id\"] = $results[\"envelope_id\"]; # Save for use by other examples\n # which need an envelope_id\n $this->clientService->showDoneTemplate(\n \"Envelope sent\",\n \"Envelope sent\",\n \"The envelope has been created and sent!<br/>\n Envelope ID {$results[\"envelope_id\"]}.\"\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "2857d84ba93fcd14e68ddc3e6be64567", "score": "0.60288006", "text": "public function criarControllerAction()\n {\n $form = $this->getServiceLocator()->get('Gerador\\Form\\CriarControllerForm');\n $service = $this->getServiceLocator()->get('Gerador\\Service\\GeradorService');\n\n $objRequest = $this->getRequest();\n\n if ($objRequest->isPost()) {\n $form->setData($objRequest->getPost());\n if ($form->isValid()) {\n $arrData = $form->getData();\n\n try {\n $service->criarController($arrData);\n } catch (\\Exception $objException) {\n $this->flashMessenger()->addErrorMessage($objException->getMessage());\n }\n } else {\n echo (\"Form Inválido\");\n }\n }\n\n return new ViewModel(compact('form'));\n }", "title": "" }, { "docid": "8f5909ea5184d56426d9d80310e288f2", "score": "0.60275155", "text": "protected function _getController(): Controller\n {\n $controller = parent::_getController();\n $cors = new CorsMiddleware();\n $controller->response = $cors->addHeaders(\n $controller->getRequest(),\n $controller->getResponse()\n );\n return $controller;\n }", "title": "" }, { "docid": "879b26eb3af88fbf95d251479ccbaf3a", "score": "0.6005155", "text": "protected function getActeurControllerService()\n {\n $this->services['App\\\\Controller\\\\ActeurController'] = $instance = new \\App\\Controller\\ActeurController(($this->services['doctrine.orm.default_entity_manager'] ?? $this->getDoctrine_Orm_DefaultEntityManagerService()), ($this->privates['App\\\\Repository\\\\ActeurRepository'] ?? $this->getActeurRepositoryService()));\n\n $instance->setContainer(($this->privates['.service_locator.vdmMuyE'] ?? $this->get_ServiceLocator_VdmMuyEService())->withContext('App\\\\Controller\\\\ActeurController', $this));\n\n return $instance;\n }", "title": "" }, { "docid": "70ba238dcc8c0b446accedd4a216d420", "score": "0.6000626", "text": "public abstract function controller();", "title": "" }, { "docid": "7eb150792a0e888d41cfbd0c0978b034", "score": "0.599977", "text": "static function appController()\n {\n $inst = self::instance();\n if (is_null($inst->appController)) {\n $inst->appController = new \\Core\\Http\\AppController(self::getControllerMap());\n }\n return $inst->appController;\n }", "title": "" }, { "docid": "ecd3323792758bf0f93a1c7bf24265a3", "score": "0.59995896", "text": "public function create()\n {\n return view('constructor.addConstructor');\n }", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "344f047e6a950f548434cfa5bf952ed0", "score": "0.5971136", "text": "private function getController()\n {\n return $this->buildMockedController(DownloadController::class, [$this->cache]);\n }", "title": "" }, { "docid": "1b4cbc81bafb4a4cf745fee4743281da", "score": "0.5963547", "text": "public static function controller($name, $options = []) {\n\t\t$config = self::configure($name, $options);\n\n\t\t// Check for namespaced controller\n\t\t$class = 'controllers\\\\'.$config['class'];\n\t\tif (class_exists($class)) {\n\t\t\t$controller = new $class($config);\n\t\t} elseif (class_exists($config['class']) && is_subclass_of($config['class'], 'controller')) {\n\t\t\t$controller = new $config['class']($config);\n\t\t} else {\n\n\t\t\t// Throw an error for unfound controller\n\t\t\tself::error('404');\n\n\t\t\t// Return the default controller if none is found\n\t\t\treturn self::controller(self::config('default-controller'), $options);\n\t\t}\n\n\t\t// Force override with passed in options\n\t\t$controller->options = self::merge($controller->options, $options);\n\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "89abcfdafa50def1c75bf7d6a3db0fb2", "score": "0.5960485", "text": "private static function getController(string $name)\n {\n $name = $name . '_Controller';\n $file = __DIR__ . '/../Controllers/' . $name . '.php';\n\n if (!require_once($file)) {\n $name = 'Main_Controller';\n }\n\n $name = \"App\\Controllers\\\\\" . $name;\n return new $name();\n }", "title": "" }, { "docid": "a8c9afc9853009c040732016fcc9f18b", "score": "0.59476763", "text": "protected static function uriParts($uri)\n {\n if ($uri{0} == '/')\n $uri = substr($uri, 1);\n\n return explode('/', $uri);\n }\n\n /**\n * Create controller based on the given URI.\n *\n * @param string $uri uri string\n * @param atkFrontController $parent parent controller\n * @return atkFrontController the controller\n */\n protected static function create($uri, $parent=NULL)\n {\n list($module, $name, $action) = self::uriParts($uri);\n\n if ($action == NULL)\n $action = 'index';\n\n $importPath = \"module.{$module}.controllers.{$name}controller\";\n if (atkimport($importPath))\n {\n atkdebug('Create '.$importPath.' controller instance');\n $class = \"{$name}controller\";\n return new $class($module, $name, $action, $parent);\n }\n else\n {\n throw new Exception(\"Can't find controller for: '$uri' expecting '$importPath'\");\n }\n }\n\n /**\n * Returns the current controller instance. This can either be the\n * root or a nested controller.\n *\n * @return atkFrontController current controller instance\n */\n protected static function getCurrent()\n {\n return self::$s_current;\n }\n\n /**\n * Sets the current controller instance.\n *\n * @param atkFrontController $controller current controller instance\n */\n protected static function setCurrent($controller)\n {\n self::$s_current = $controller;\n }\n\n /**\n * Bridge factory method. Returns the currently configured controller bridge.\n * If an instance already exists, re-uses it, else a new bridge will be created.\n *\n * @return atkFrontControllerBridge front controller bridge\n */\n protected static function createBridge()\n {\n $class = atkconfig(\"frontcontroller_bridge\", \"atk.front.atkfrontcontrollerbridge\");\n\n if (!isset(self::$s_bridges[$class]))\n {\n atkdebug('Create '.$class.' bridge instance');\n self::$s_bridges[$class] = atknew($class);\n }\n\n return self::$s_bridges[$class];\n }\n\n /**\n * Constructor.\n *\n * @param string $module module name\n * @param string $name controller name\n * @param string $action\n * @param atkFrontController $parent \n */\n protected function __construct($module, $name, $action, $parent = NULL)\n {\n $this->m_module = $module;\n $this->m_name = $name;\n $this->m_action = $action;\n $this->m_parent = $parent;\n\n if (isset($this->cacheableActions))\n {\n $this->m_cacheableActions = $this->cacheableActions;\n }\n\n if ($parent !== null)\n {\n $this->m_bridge = $parent->m_bridge;\n }\n else\n {\n $this->m_bridge = self::createBridge();\n }\n }\n\n /**\n * Returns the parent controller.\n *\n * @return atkFrontController parent\n */\n protected function getParent()\n {\n return $this->m_parent;\n }\n\n /**\n * Is this the root controller?\n *\n * @return boolean is root controller?\n */\n protected function isRoot()\n {\n return $this->getParent() == NULL;\n }\n\n /**\n * Returns the root controller.\n *\n * @return atkFrontController root\n */\n protected function getRoot()\n {\n if ($this->isRoot()) return $this;\n else return $this->getParent()->getRoot();\n }\n\n /**\n * Returns the request parameters.\n *\n * @return atkDataHolder request parameters\n */\n protected function getRequest()\n {\n return $this->m_request;\n }\n\n /**\n * Returns the session.\n *\n * @return atkDataHolder session\n */\n protected function getSession()\n {\n return $this->m_session;\n }\n\n /**\n * Returns the controller name.\n *\n * @return string controller name\n */\n protected function getname()\n {\n return $this->m_name;\n }\n\n /**\n * Returns the controller module.\n *\n * @return string controller module\n */\n protected function getModule()\n {\n return $this->m_module;\n }\n\n /**\n * Returns the action.\n *\n * @return string action\n */\n protected function getAction()\n {\n return $this->m_action;\n }\n\n /**\n * Add response header. (Will only be outputted when\n * renderPartial or renderContent is called for the\n * root controller).\n * \n * @param string $header The header to add\n */\n protected function addHeader($header)\n {\n $this->m_headers[] = $header;\n }\n\n /**\n * Sets the content type (Will only be outputted when\n * renderPartial or renderContent is called for the\n * root controller).\n *\n * @param string $contentType\n */\n protected function setContentType($contentType)\n {\n $this->m_contentType = $contentType;\n }\n\n /**\n * Sets the cacheable actions.\n *\n * @param array|string $actions cacheable actions\n * @param ...\n */\n protected function setCacheableActions($actions)\n {\n if (!is_array($actions))\n $actions = func_get_args();\n $this->m_cacheableActions = $actions;\n }\n\n /**\n * Get action cache key.\n */\n protected function getActionCacheKey()\n {\n return '';\n }\n\n /**\n * Get action cache file.\n *\n * @return atkTmpFile\n */\n protected function getActionCacheFile()\n {\n atkimport('atk.utils.atktmpfile');\n $path = 'frontcontrollers/'.$this->m_module.'/'.$this->m_name.'/'.$this->m_action;\n $filename = md5($this->getActionCacheKey()).'.cache';\n $file = new atkTmpFile($path.'/'.$filename);\n return $file;\n }\n\n /**\n * Is this action cached?\n */\n protected function isActionCached()\n {\n // action is never cached\n if (!in_array($this->m_action, $this->m_cacheableActions)) return false;\n\n $file = $this->getActionCacheFile();\n return $file->exists();\n }\n\n /**\n * Load from action cache.\n */\n protected function loadFromActionCache()\n {\n $file = $this->getActionCacheFile();\n\n include($file->getPath());\n\n $this->m_result = $data['result'];\n $this->m_headers = $data['headers'];\n $this->m_styleSheets = $data['styleSheets'];\n $this->m_styleCodes = $data['styleCodes'];\n $this->m_scriptFiles = $data['scriptFiles'];\n $this->m_scriptCodes = $data['scriptCodes'];\n }\n\n /**\n * Store current action results in cache.\n */\n protected function storeInActionCache()\n {\n // action is never cached\n if (!in_array($this->m_action, $this->m_cacheableActions)) return;\n\n $data = array(\n 'result' => $this->m_result,\n 'headers' => $this->m_headers,\n 'styleSheets' => $this->m_styleSheets,\n 'styleCodes' => $this->m_styleCodes,\n 'scriptFiles' => $this->m_scriptFiles,\n 'scriptCodes' => $this->m_scriptCodes\n );\n\n $file = $this->getActionCacheFile();\n $file->writeAsPhp('data', $data);\n $file->close();\n }\n\n /**\n * Register styles and scripts using the bridge.\n */\n protected function registerStylesAndScripts()\n {\n foreach ($this->m_styleSheets as $entry)\n $this->m_bridge->registerStyleSheet($entry['file'], $entry['media']);\n foreach ($this->m_styleCodes as $entry)\n $this->m_bridge->registerStyleCode($entry['code']);\n foreach ($this->m_scriptFiles as $entry)\n $this->m_bridge->registerScriptFile($entry['file']);\n foreach ($this->m_scriptCodes as $entry)\n $this->m_bridge->registerScriptCode($entry['code']);\n }\n\n /**\n * Handle action.\n *\n * @param array $request request variables\n *\n * @return result of action\n */\n protected function handleRequest($request)\n {\n try\n {\n $this->setTemplate($this->m_action);\n\n $this->m_request = new atkDataHolder($request);\n $this->m_session = $this->loadSession();\n\n $this->module = $this->m_module;\n $this->name = $this->m_name;\n $this->action = $this->m_action;\n $this->request = $this->m_request;\n $this->session = $this->m_session;\n\n $this->init();\n\n $this->preFilter();\n\n if ($this->isActionCached())\n {\n $this->loadFromActionCache();\n }\n else\n {\n $this->installPlugins();\n\n try\n {\n $method = $this->getActionMethod();\n }\n catch (Exception $ex)\n {\n throw new Exception(\"Invalid action {$this->m_action} for controller {$this->m_module}/{$this->m_name}! (\".$ex->getMessage().\")\");\n }\n\n $method->invoke($this);\n\n $this->render();\n\n $this->storeInActionCache();\n\n $this->uninstallPlugins();\n }\n\n // register styles and scripts in bridge\n $this->registerStylesAndScripts();\n\n $this->postFilter();\n\n if ($this->m_partial && $this->isRoot())\n {\n while (@ob_end_clean());\n\n foreach ($this->m_headers as $header)\n header($header);\n\n if (isset($this->m_contentType))\n header('Content-Type: '.$this->m_contentType);\n\n echo $this->m_result;\n\n if (!isset($this->m_contentType) || $this->m_contentType == 'text/html')\n {\n atkimport(\"atk.utils.atkdebugger\");\n echo atkDebugger::getInstance()->renderDebugAndErrorMessages();\n }\n die;\n }\n }\n catch (Exception $ex)\n {\n $this->uninstallPlugins();\n $this->handleException($ex);\n }\n\n return $this->m_result;\n }\n\n /**\n * Get the method to call for the current request.\n *\n * @return ReflectionMethod The method.\n */\n protected function getActionMethod()\n {\n $methodname = str_replace('_', '', $this->m_action).'Action';\n if (!method_exists($this, $methodname))\n throw new Exception(\"Action method not found!\");\n\n $method = new ReflectionMethod(get_class($this), $methodname);\n if (!$method->isPublic())\n throw new Exception(\"Action method is not public!\");\n\n return $method;\n }\n\n /**\n * Will be called just before the request is dispatched\n * to the right method.\n */\n protected function preFilter()\n {}\n\n /**\n * Init will be called just after preFilter and just before\n * the request is dispatched to the right method.\n */\n protected function init()\n {}\n\n /**\n * Will be called just after the request has been dispatched\n * to the right method and the rendering took place but before\n * the result is returned or outputted.\n */\n protected function postFilter()\n {}\n\n /**\n * Handle exception.\n *\n * @param Exception $exception exception\n */\n protected function handleException($exception)\n {\n if ($this->isRoot())\n {\n atkerror($exception->__toString());\n $this->renderContent('An unknown error occured.');\n }\n else\n {\n throw $exception;\n }\n }\n\n /**\n * Load session.\n */\n protected function loadSession()\n {\n return new atkDataHolder($_SESSION);\n }\n\n /**\n * Install smarty plug-ins.\n */\n protected function installPlugins()\n {\n /* @var $smarty Smarty */\n $smarty = atkinstance(\"atk.ui.atksmarty\");\n $this->m_plugins = $smarty->_plugins;\n $smarty->register_function('_partial', array($this, 'partialFunctionTag'), false);\n $smarty->register_function('_url', array($this, 'urlFunctionTag'), false);\n $smarty->register_function('_form_vars', array($this, 'formVarsFunctionTag'), false);\n $smarty->register_block('_link', array($this, 'linkBlockTag'), false);\n }\n\n /**\n * Uninstall smarty plug-ins.\n */\n protected function uninstallPlugins()\n {\n if ($this->m_plugins == NULL) return;\n $smarty = atkinstance(\"atk.ui.atksmarty\");\n $smarty->_plugins = $this->m_plugins;\n $this->m_plugins = NULL;\n }\n\n /**\n * Get current template.\n *\n * @return string $template template name\n */\n protected function getTemplate()\n {\n return $this->m_template;\n }\n\n /**\n * Set current template.\n *\n * @param string $template template name\n */\n protected function setTemplate($template)\n {\n $this->m_template = $template;\n }\n\n /**\n * Get assigned template variables.\n *\n * @return array template variables\n */\n protected function getVars()\n {\n return $this->m_vars;\n }\n\n /**\n * Is template variable set?\n * \n * @param string $name \n */\n public function __isset($name)\n {\n return isset($this->m_vars[$name]);\n }\n\n /**\n * Template variable assignment.\n *\n * @param string $name variable name\n * @param unknown $value variable value\n */\n public function __set($name, $value)\n {\n $this->m_vars[$name] = $value;\n }\n\n /**\n * Get template variable value.\n *\n * @param string $name variable name\n * @return unknown\n */\n public function &__get($name)\n {\n return $this->m_vars[$name];\n }\n\n /**\n * Checks if a certain offset exists.\n *\n * @param mixed $offset offset\n * @return bool offset exists?\n */\n public function offsetExists($offset)\n {\n return isset($this->m_vars[$offset]);\n }\n\n /**\n * Returns the value at the given offset.\n *\n * @param mixed $offset\n * @return mixed value\n */\n public function offsetGet($offset)\n {\n return $this->m_vars[$offset];\n }\n\n /**\n * Sets the given offset with the given value\n *\n * @param mixed $offset offset\n * @param mixed $value value\n */\n public function offsetSet($offset, $value)\n {\n $this->m_vars[$offset] = $value;\n }\n\n /**\n * Unsets the given offset.\n *\n * @param mixed $offset offset\n */\n public function offsetUnset($offset)\n {\n unset($this->m_vars[$offset]);\n }\n\n /**\n * Build the URI for the given controller and action.\n *\n * @param string $controller controller name (uses current if empty)\n * @param string $action action name (uses current if empty and controller isn't changed, uses index if empty and other controller)\n * @return string uri\n */\n protected function uri($controller, $action)\n {\n if ($this->isRoot())\n {\n $controller = str_replace('.', '/', $controller);\n\n if ($controller != NULL && strpos($controller, '/') === FALSE)\n {\n $controller = \"{$this->m_module}/{$controller}\";\n }\n\n if ($controller == NULL || $controller == \"{$this->m_module}/{$this->m_name}\")\n {\n $controller = \"{$this->m_module}/{$this->m_name}\";\n\n if ($action == NULL)\n $action = $this->m_action;\n }\n else if ($action == NULL)\n {\n $action = 'index';\n }\n\n return '/'.$controller.'/'.$action;\n }\n else\n {\n return $this->getParent()->uri($controller, $action);\n }\n }\n\n /**\n * Build url using the given URI and variables.\n *\n * @param string $uri The controller URI.\n * @param array $vars Request vars.\n * @return string url\n */\n protected function buildUrl($uri, $vars)\n {\n $vars[$this->getUriParam()] = $uri;\n return $this->m_bridge->buildUrl($vars);\n }\n\n /**\n * Returns the correct key value for the uri in forms and url's\n * Defaults to 'uri'\n *\n * @return string uri_key\n */\n protected function getUriParam()\n {\n return isset($this->request->uri_param) ? $this->request->uri_param : 'uri';\n }\n\n /**\n * Build url or return the current url.\n *\n * @param string $controller controller name (uses current if empty)\n * @param string $action action name (uses current if empty and controller isn't changed, uses index if empty and other controller)\n * @param array $vars request vars\n * @return string url\n */\n protected function url($controller=NULL, $action=NULL, $vars=array())\n {\n $uri = $this->uri($controller, $action);\n return $this->buildUrl($uri, $vars);\n }\n\n /**\n * Smarty wrapper function for the url function.\n *\n * @param array $params parameters\n * @param Smarty $smarty smarty reference\n * @return string url\n */\n public function urlFunctionTag($params, $smarty)\n {\n $controller = isset($params['controller']) ? $params['controller'] : NULL;\n $action = isset($params['action']) ? $params['action'] : NULL;\n $vars = isset($params['vars']) ? $params['vars'] : array();\n\n unset($params['controller']);\n unset($params['action']);\n unset($params['vars']);\n\n $vars = array_merge($vars, $params);\n\n return $this->url($controller, $action, $vars);\n }\n\n /**\n * Smarty function for converting the controller, action etc.\n * to hidden form vars.\n *\n * @param array $params parameters\n * @param Smarty $smarty smarty reference\n * @return string hidden form vars html\n */\n public function formVarsFunctionTag($params, $smarty)\n {\n $controller = isset($params['controller']) ? $params['controller'] : NULL;\n $action = isset($params['action']) ? $params['action'] : NULL;\n $vars = isset($params['vars']) ? $params['vars'] : array();\n\n\n unset($params['controller']);\n unset($params['action']);\n unset($params['vars']);\n\n $uri = $this->uri($controller, $action);\n $vars = array_merge($vars, $params, array($this->getUriParam() => $uri));\n\n $result = '';\n foreach ($vars as $name => $value)\n {\n $value = atk_htmlentities($value);\n $result .= \"<input type=\\\"hidden\\\" name=\\\"{$name}\\\" value=\\\"{$value}\\\">\\n\";\n }\n\n return $result;\n }\n\n /**\n * Smarty wrapper function for the url function.\n *\n * @param array $params parameters\n * @param string $content content between link tags\n * @param Smarty $smarty smarty reference\n * @param boolean $repeat true first time\n */\n public function linkBlockTag($params, $content, $smarty, &$repeat)\n {\n if (!$repeat)\n {\n return '<a href=\"'.$this->urlFunctionTag($params, $smarty).'\">'.$content.'</a>';\n }\n\n return NULL;\n }\n\n /**\n * Smarty partial function, render partial template.\n *\n * @param array $params parameters\n * @param Smarty $smarty smarty instance\n * @return string rendered partial\n */\n public function partialFunctionTag($params, $smarty)\n {\n $template = $params[0];\n unset($params[0]);\n return $this->_render($template, $params, true);\n }\n\n /**\n * Redirect to the given url.\n *\n * @param string $url The URL.\n */\n protected function doRedirect($url)\n {\n $this->m_bridge->doRedirect($url);\n }\n\n /**\n * Redirect to the given url.\n *\n * @param string $controller controller name (uses current if empty)\n * @param string $action action name (uses current if empty and controller isn't changed, uses index if empty and other controller)\n * @param array $vars request vars\n * @param bool $force Force redirect?\n * @return string url\n */\n protected function redirect($controller=NULL, $action=NULL, $vars=array(), $force=FALSE)\n {\n if ($this->isRoot() || $force)\n {\n $this->doRedirect($this->url($controller, $action, $vars));\n }\n else\n {\n $vars['uri'] = $this->uri($controller, $action);\n $content = self::dispatchRequest($vars, false);\n $this->renderContent($content);\n }\n }\n\n /**\n * Set locale based on the given language.\n *\n * @param string $lng language (ISO code)\n */\n protected function setLocale($lng)\n {\n switch (strtoupper($lng))\n {\n case \"EN\":\n setlocale(LC_ALL, \"en_EN\");\n break;\n case \"DE\":\n setlocale(LC_ALL, \"de_DE\");\n break;\n case \"FR\":\n setlocale(LC_ALL, \"fr_FR\");\n break;\n default:\n setlocale(LC_ALL, \"nl_NL\");\n }\n }\n\n /**\n * Register stylesheet of the given media type.\n *\n * @param string $file stylesheet filename\n * @param string $media media type (defaults to 'all')\n */\n protected function registerStyleSheet($file, $media='all')\n {\n if (is_object($this->m_parent))\n $this->m_parent->registerStyleSheet($file,$media);\n else\n $this->m_styleSheets[] = array('file' => $file, 'media' => $media);\n }\n\n /**\n * Register stylesheet code.\n *\n * @param string $code stylesheet code\n */\n protected function registerStyleCode($code)\n {\n if (is_object($this->m_parent))\n $this->m_parent->registerStyleCode($code);\n else\n $this->m_styleCodes[] = array('code' => $code);\n }\n\n /**\n * Register script file.\n *\n * @param string $file script filename\n */\n protected function registerScriptFile($file)\n {\n if (is_object($this->m_parent))\n $this->m_parent->registerScriptFile($file);\n else\n $this->m_scriptFiles[] = array('file' => $file);\n }\n\n /**\n * Register JavaScript code.\n *\n * @param string $code\n */\n protected function registerScriptCode($code)\n {\n if (is_object($this->m_parent))\n $this->m_parent->registerScriptCode($code);\n else\n $this->m_scriptCodes[] = array('code' => $code);\n }\n\n /**\n * Render partial.\n *\n * Will assign the partial and result variables and will prevent\n * double rendering!\n *\n * @param string $template template name\n * @param array $vars template variables\n */\n protected function renderPartial($template=NULL, $vars=NULL)\n {\n $this->render($template, $vars, true);\n }\n\n /**\n * Render content.\n *\n * Will assign the partial and result variables and will prevent\n * double rendering!\n *\n * @param string $content content to render\n */\n protected function renderContent($content)\n {\n $this->m_partial = true;\n $this->m_result = $content;\n $this->m_rendered = true;\n }\n\n /**\n * Render template.\n *\n * Will assign the partial and result variables and will prevent\n * double rendering!\n *\n * @param string $template template name\n * @param array $vars template variables\n * @param boolean $partial render partial?\n */\n protected function render($template=NULL, $vars=NULL, $partial=false)\n {\n if ($this->m_rendered) return;\n\n if ($template == NULL)\n $template = $this->getTemplate();\n\n if ($vars == NULL)\n $vars = $this->getVars();\n\n if (!$partial && file_exists(moduleDir($this->m_module).\"scripts/{$this->m_name}.js\"))\n {\n $this->registerScriptFile(moduleDir($this->m_module).\"scripts/{$this->m_name}.js\");\n }\n\n if (!$partial && file_exists(moduleDir($this->m_module).\"styles/{$this->m_name}.js\"))\n {\n $this->registerStyleSheet(moduleDir($this->m_module).\"styles/{$this->m_name}.js\");\n }\n\n\n $this->m_partial = $partial;\n $this->m_result = $this->_render($template, $vars, $partial);\n $this->m_rendered = true;\n }\n\n /**\n * Returns the template path for the given template.\n *\n * @param string $template template name\n * @param string $directory the base template directory\n *\n * @return string template path\n */\n protected function getTemplatePath($template, $directory='templates')\n {\n $root = $this->m_bridge->getApplicationRoot();\n if (file_exists($root.\"$directory/$template\"))\n {\n return $root.\"$directory/$template\";\n }\n else if (file_exists(moduleDir($this->m_module).\"$directory/$template\"))\n {\n return moduleDir($this->m_module).\"$directory/$template\";\n }\n else if (file_exists(moduleDir($this->m_module).\"skel/$directory/$template\"))\n {\n return moduleDir($this->m_module).\"skel/$directory/$template\";\n }\n else\n {\n return null;\n }\n }\n\n /**\n * Returns the layout template path for this controller.\n */\n protected function getLayoutTemplatePath()\n {\n $path = $this->getTemplatePath($this->m_module.'/'.$this->m_name.'.tpl', 'layouts');\n if ($path != null) return $path;\n\n $path = $this->getTemplatePath($this->m_module.'/root.tpl', 'layouts');\n if ($path != null) return $path;\n\n $path = $this->getTemplatePath('root.tpl', 'layouts');\n if ($path != null) return $path;\n\n return $null;\n }\n\n /**\n * Transform the template to use to a filename\n *\n * example: getFileForTemplate('tekno'): module/controller/tekno.tpl\n *\n * @param string $template\n * @param array $vars\n * @param bool $partial\n * @return string Filename for the template\n */\n protected function getFileForTemplate($template, $vars, $partial=false)\n {\n if ($template{0} != '/')\n {\n $template = $this->m_module.'/'.$this->m_name.'/'.($partial ? '_' : '').$template;\n }\n else\n {\n $parts = explode('/', $template);\n $template = implode('/', array_slice($parts, 0, count($parts) - 1)).'/'.($partial ? '_' : '').$parts[count($parts) - 1];\n }\n\n return \"{$template}.tpl\";\n }\n\n /**\n * Render template.\n *\n * @param string $template template name\n * @param array $vars template variables\n * @param boolean $partial render partial?\n *\n * @return string rendered template\n */\n protected function _render($template, $vars, $partial)\n {\n $template = $this->getFileForTemplate($template, $vars, $partial);\n\n /* @var $smarty Smarty */\n $smarty = atkinstance('atk.ui.atksmarty');\n\n $oldVars = $smarty->get_template_vars();\n $oldSerials = $smarty->_cache_serials;\n $oldCaching = $smarty->caching;\n\n $smarty->assign($vars);\n $smarty->caching = false;\n\n $result = $smarty->fetch($this->getTemplatePath($template));\n\n $layoutTemplatePath = $this->getLayoutTemplatePath();\n if ($this->isRoot() && !$partial && $layoutTemplatePath != null)\n {\n $vars['content_for_layout'] = $result;\n $smarty->assign($vars);\n $result = $smarty->fetch($layoutTemplatePath);\n }\n\n $smarty->caching = $oldCaching;\n $smarty->_cache_serials = $oldSerials;\n $smarty->assign($oldVars);\n\n return $result;\n }\n\n /**\n * To string.\n */\n public function __toString()\n {\n return (!$this->isRoot() ? $this->getParent()->__toString().'/' : '').$this->getname();\n }\n }", "title": "" }, { "docid": "22a4a4773a6ec8a7545f5957d386e7f5", "score": "0.5933215", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Test();\n $this->assertInstanceOf(\"\\Veax\\Controller\\Test\", $controller);\n }", "title": "" }, { "docid": "08a26f6d40e390fcaed823eee9c8be91", "score": "0.5919496", "text": "protected function getCinelandControllerService()\n {\n $this->services['App\\\\Controller\\\\CinelandController'] = $instance = new \\App\\Controller\\CinelandController();\n\n $instance->setContainer(($this->privates['.service_locator.vdmMuyE'] ?? $this->get_ServiceLocator_VdmMuyEService())->withContext('App\\\\Controller\\\\CinelandController', $this));\n\n return $instance;\n }", "title": "" }, { "docid": "a6b793bcd453c14b8999b68e340aa196", "score": "0.5916397", "text": "function loadController($controllerName) {\n\n $controllerClassName = getControllerClassName($controllerName);\n require_once(__DIR__ . \"/controlador/\" . $controllerClassName . \".php\");\n return new $controllerClassName();\n}", "title": "" }, { "docid": "a9a054a76d3eb85c26e93374a992f719", "score": "0.5911433", "text": "function get_controller() {}", "title": "" }, { "docid": "296f0ec79545e68d9f2d6dc9e59eda94", "score": "0.591108", "text": "public function __construct()\n {\n $url = $this->parseUrl();\n\n // Check if the Controller' file exists\n if (file_exists(CONTROLLER . ucfirst($url[0] ?? 'home') . 'Controller.php')) :\n $this->controller = ucfirst($url[0] ?? 'home') . 'Controller';\n unset($url[0]);\n endif;\n\n // Require the Controller' file\n require_once CONTROLLER . $this->controller . '.php';\n\n // Instantiate a new Controller\n $this->controller = new $this->controller;\n\n // Check if the Controller' method exists \n if (isset($url[1])) :\n if (method_exists($this->controller, $url[1])) :\n $this->method = $url[1];\n unset($url[1]);\n endif;\n endif;\n\n // Assign the rest of the URL with the variable params\n $this->params = $url ? array_values((array) $url) : [];\n\n // Call the Controller' method and provide it with the params\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "title": "" }, { "docid": "6fa33f36fa91242da2e0eb1275194464", "score": "0.58975697", "text": "public function create()\n {\n return view('task_controllers.create');\n }", "title": "" }, { "docid": "9a5ffcc7c6b403e62c96c14a85b954b6", "score": "0.5889057", "text": "public function __construct() {\n /*\n * @var $url\n * @type array\n * @return url parts\n */\n \n $url = isset($_GET['url'])?explode('/',rtrim($_GET['url'], '/')):null;\n \n $controller = \\Route::setController(ucfirst($url[0]).'Controller');\n \n unset($url[0]);\n \n \n $action = \\Route::setAction($controller, isset($url[1]));\n \n unset($url[1]);\n \n $params = \\Route::setParam($url);\n \n $control = new $controller;\n \n $control->{$action}($params = []);\n \n \n #new HomeController();\n #new User(new Database);\n #new Model(new Database());\n }", "title": "" }, { "docid": "613e98987633f8f09ddb472bb01f83c6", "score": "0.5877718", "text": "public function __construct()\n\t{\n\t\t$this->getControllerClass();\n\t\t$path = PATH_CONTROLLER . $this->controller . \".php\";\n\n\t\t//verify if the file controller exists\n\t\tif (file_exists($path))\n\t\t{\n\t\t\t//get class for namespace\n\t\t\t$class = self::NAMESPACE_CONTROLLERS . $this->controller;\n\t\t\t$this->controller = new $class($this->config);\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"Error 404\";\n\t\t\texit;\n\t\t}\n\n\t\t//verify if tehe method exist in the controller\n\t\tif (!method_exists($this->controller, $this->method))\n\t\t{\n\t\t\tthrow new \\Exception(\"Error Processing Method {$this->method}\", 1);\n\t\t}\n\t}", "title": "" }, { "docid": "ff88b34796ed12825ae26f0690952100", "score": "0.5876516", "text": "protected function getController(Request $request) {\n if ($this->controller && $request->getControllerName() == get_class($this->controller)) {\n return $this->controller;\n }\n\n if ($this->objectFactory === null) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName() . ': no ObjectFactory set');\n }\n\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $e) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $e);\n }\n\n return $controller;\n }", "title": "" }, { "docid": "98653311c4723cf85cef1f8509612d65", "score": "0.58757627", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $template_id = $this->args['envelope_args']['template_id'];\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok && $template_id) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n $_SESSION[\"envelope_id\"] = $results[\"envelope_id\"]; # Save for use by other examples\n # which need an envelope_id\n\n # Redirect the user to the embedded signing\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl (see the makerecipient_view_request method)\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } elseif (! $token_ok) {\n $this->clientService->needToReAuth($this->eg);\n } elseif (! $template_id) {\n $this->clientService->envelopeNotCreated(\n basename(__FILE__),\n $this->routerService->getTemplate($this->eg),\n $this->routerService->getTitle($this->eg),\n $this->eg,\n ['template_ok' => false]\n );\n }\n }", "title": "" }, { "docid": "01c60c479e7d4fd57cdc5470505175db", "score": "0.5875762", "text": "public static function loadController($controller) {\n\t\t$controller = ucfirst($controller).'Controller';\n\t\treturn new $controller();\n\t}", "title": "" }, { "docid": "e083ce27b1f16b14c15fbdcc2ffb3ca6", "score": "0.5870044", "text": "public function controllerBuilder($test = null)\n {\n if (isset($this->args[3])) {\n\n // définition du nom du controller\n $controller = explode('/', $this->args[3]);\n $controllerName = end($controller);\n\n // suppression du nom du controller\n unset($controller[count($controller)-1]);\n\n // définition du path et du namespace\n $namespace = implode('\\\\', $controller);\n $pathController = implode('/', $controller);\n\n // récupération du contenu du template\n ob_start();\n include TEMPLATE_DIR . 'controller.template.php';\n $page = ob_get_clean();\n\n // Création du chemin si inexistant\n $path = \\Core\\Services\\Files::createDir(ROOT_DIR . '/app/Controller/' . $pathController);\n\n // création du fichier\n $handle = fopen($path . '/' . $controllerName . '.php', 'w');\n $save = fwrite($handle, $page);\n fclose($handle);\n\n // résultat\n if (!$save) {\n $this->error('le controller n\\'a pas pu être créée !');\n } else {\n $this->success($controllerName . ' créée avec succés');\n }\n } else {\n $this->error('Nom du controller manquant !');\n }\n }", "title": "" }, { "docid": "f38d3ff473918f4d64577233726f79a6", "score": "0.5863126", "text": "public static function create() {\n }", "title": "" }, { "docid": "939f5202155a686b79c54e8f1ac44ac2", "score": "0.5860429", "text": "function __construct()\n {\n $this->userController = new UserController();\n $this->articleController = new ArticleController();\n $this->pageController = new PageController();\n $this->styleController= new StyleController();\n $this->contentController= new ContentAreaController() ;\n }", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5853714", "text": "public function create() {}", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5853714", "text": "public function create() {}", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5853714", "text": "public function create() {}", "title": "" }, { "docid": "efc951007721cb18d4869ecf016aebaf", "score": "0.5851908", "text": "public function controller($_name, $_method) {\n global $bitphp;\n\n $_file = $bitphp->route['APP_PATH'] .'/controllers/'.$_name.'.php';\n\n try \n {\n self::checkClassCoherency($_file, $_name); \n if( method_exists($_name, $_method) ) \n {\n $_instance = new $_name();\n return $_instance;\n } \n else \n {\n $d = 'Error en controlador \"'. $_name .'\".';\n $m = 'No contiene la accion \"'. $_method .'()\".';\n $bitphp->error->trace($d, $m);\n }\n } \n catch(Exception $_e) \n {\n $_d = 'El controlador \"'.$_name.'\" no se pudo cargar.';\n $_c = $_e->getMessage();\n $bitphp->error->trace($_d, $_c);\n }\n }", "title": "" }, { "docid": "a8d799e738c2ff29f51e92c1b17c8640", "score": "0.5850444", "text": "public function __construct()\n {\n parent::__construct();\n $this->testController = new TestController();\n }", "title": "" }, { "docid": "ca6e61020e47fcaf9dc1e11056a345f8", "score": "0.58494973", "text": "function VoodooController()\r\n\t{\r\n\t\t$this->init();\r\n\r\n\t\t$registry =& VoodooRegistry::getInstance();\r\n\t\t$registry->register('VC',$this);\r\n\r\n\t\t$this->route();\r\n\t}", "title": "" }, { "docid": "8aef7aa4e91feb5999be9085ab0e8f94", "score": "0.58400834", "text": "public function setController(Controller $controller);", "title": "" }, { "docid": "19fdca14d6ebac34fd5ddbf3f335c5eb", "score": "0.5820775", "text": "public function testCreateTheControllerClass()\n {\n $controller = new SessionController();\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "title": "" }, { "docid": "441ddd8ff482b1f4a290fc202d094f4f", "score": "0.5820733", "text": "public function __construct(\\Jazzee\\Interfaces\\AdminController $controller);", "title": "" }, { "docid": "af337ce7a69434568b87bd9bdef0d6d2", "score": "0.5820267", "text": "public function createController($module,$controllerName){\n\n $controllerName = $this->createControllerName($controllerName);\n\n $module = $this->createModuleName($module);\n\n $controllerNameSpace = \"Application\\\\Module\\\\{$module}\\\\Controller\";\n\n $file = APPLICATION_MODULES_PATH.\"/{$module}\".\"/Controller/{$controllerName}.php\";\n\n $this->mkdir($file);\n \n $this->createView($module,$controllerName,\"index\");\n \n $this->saveTpl(\"controller\",$file,array(\"CONTROLLER\"=>$controllerName,\"NAMESPACE\"=>$controllerNameSpace));\n \n return\n $controllerName;\n\n }", "title": "" }, { "docid": "213e3c0f4f2ab1c11a4fa36f440510c5", "score": "0.5818091", "text": "function __construct($controller) {\n $this->_controller = $controller;\n }", "title": "" }, { "docid": "cd3a96269daefa1e179c86bf9fa089a6", "score": "0.5813801", "text": "public function create()\n {\n return CrudController::create('matricula.datos_basicos.ciclos.create', 'matricula', null);\n }", "title": "" }, { "docid": "1f2ba9c2521b1b86e55a1a6a79bd247a", "score": "0.58074", "text": "public function __construct()\n\t{\n\t\t// construct Controller\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "fb445a929d64cd9732ccca0b939a5ffe", "score": "0.58055204", "text": "public function store(CreateTaskControllerRequest $request)\n {\n $input = $request->all();\n\n $taskController = $this->taskControllerRepository->create($input);\n\n Flash::success('Task Controller saved successfully.');\n\n return redirect(route('taskControllers.index'));\n }", "title": "" }, { "docid": "4f4d02f12da42c147385d9ef1815a51e", "score": "0.5803774", "text": "public static function create_controller($api){\n $base = dirname(__FILE__);\n $controller = \"$base/controllers/$api.php\";\n\n // controller already exists\n if(file_exists($controller)) return false;\n\n $schema = \"$base/schemas/$api.php\";\n\n // schema exists\n if(file_exists($schema)) {\n return self::make_controller($controller, $api);\n }\n // schema not found\n else {\n if(self::create_schema($schema, $api)){\n return self::make_controller($controller, $api);\n }\n }\n }", "title": "" }, { "docid": "07fdd649eabb4dcbba0a8a5a5ff31d8a", "score": "0.5790806", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Yatzy();\n $this->assertInstanceOf(\"\\Mos\\Controller\\Yatzy\", $controller);\n }", "title": "" }, { "docid": "4770175cfeaae40af077297f5350cd9a", "score": "0.57866585", "text": "public function __construct()\n {\n // this is an example for laravel controller\n }", "title": "" }, { "docid": "3beaddcdc216ee973c5ff345b6be4f81", "score": "0.57837", "text": "public function getControllerInstance()\n {\n return $this->controller;\n }", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "1984106947c8e222081e97f3b4e2332c", "score": "0.57723397", "text": "public function create()\n {\n //TODO:\n }", "title": "" }, { "docid": "990102c60fc024d93de90dfcc4a008a1", "score": "0.57625955", "text": "function getController();", "title": "" } ]
cf7aa01496413d655d0ee27298bebf5b
Get the sitemap filename(s)
[ { "docid": "3804227f2c4bae0955e61bf5478be1b1", "score": "0.627652", "text": "public function getFilenames()\n\t{\n\t\t$files = array();\n\t\t\n\t\t/* Check that guests can access the content at all */\n\t\tforeach( \\IPS\\cms\\Databases::databases() as $database )\n\t\t{\n\t\t\tif ( $database->page_id > 0 )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif ( !$database->can( 'view', new \\IPS\\Member ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new \\OutOfRangeException;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch ( \\OutOfRangeException $e )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$page = \\IPS\\cms\\Pages\\Page::load( $database->page_id );\n\n\t\t\t\t\tif( !$page->can( 'view', new \\IPS\\Member ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new \\OutOfRangeException;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch ( \\OutOfRangeException $e )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$class = '\\IPS\\cms\\Records' . $database->id;\n\t\t\t\t\n\t\t\t\tif ( isset( $class::$containerNodeClass ) )\n\t\t\t\t{\n\t\t\t\t\t$nodeClass = $class::$containerNodeClass;\n\t\t\t\t\t\n\t\t\t\t\t/* We need one file for the nodes */\n\t\t\t\t\t$files[] = $database->id . '_sitemap_database_categories';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* And however many for the content items */\n\t\t\t\t$count = ceil( max( (int) $class::getItemsWithPermission( $class::sitemapWhere(), NULL, 10, 'read', \\IPS\\Content\\Hideable::FILTER_PUBLIC_ONLY, \\IPS\\Db::SELECT_SQL_CALC_FOUND_ROWS, new \\IPS\\Member )->count( TRUE ), \\IPS\\Settings::i()->sitemap_databases_count ) / \\IPS\\Sitemap::MAX_PER_FILE );\n\t\t\t\tfor( $i=1; $i <= $count; $i++ )\n\t\t\t\t{\n\t\t\t\t\t$files[] = $database->id . '_sitemap_database_records_' . $i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn $files;\n\t}", "title": "" } ]
[ { "docid": "a3fdbce7ef6dc5ba8a3b08977acf844b", "score": "0.705073", "text": "public function getFilenames()\n\t{\n\t\t$class = $this->class;\n\t\n\t\tif ( $class::$includeInSitemap === FALSE )\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t$files = array();\n\t\t$settings = \\IPS\\Settings::i()->sitemap_content_settings ? json_decode( \\IPS\\Settings::i()->sitemap_content_settings, TRUE ) : array();\n\t\t\n\t\t/* Check that guests can access the content at all */\n\t\ttry\n\t\t{\n\t\t\t$module = \\IPS\\Application\\Module::get( $class::$application, $class::$module, 'front' );\n\t\t\tif ( !$module->can( 'view', new \\IPS\\Member ) )\n\t\t\t{\n\t\t\t\tthrow new \\OutOfRangeException;\n\t\t\t}\n\t\t}\n\t\tcatch ( \\OutOfRangeException $e )\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\tif ( isset( $class::$containerNodeClass ) )\n\t\t{\n\t\t\t$nodeClass = $class::$containerNodeClass;\n\t\t\t\n\t\t\t/* We need one file for the nodes */\n\t\t\t$files[] = 'sitemap_content_' . str_replace( '\\\\', '_', mb_substr( $nodeClass, 4 ) );\n\t\t}\n\t\t\n\t\t/* And however many for the content items */\n\t\t$count = ceil( max( (int) $class::getItemsWithPermission( $class::sitemapWhere(), NULL, 10, 'read', 10, \\IPS\\Db::SELECT_SQL_CALC_FOUND_ROWS, new \\IPS\\Member )->count( TRUE ), isset( $settings[\"sitemap_{$class::$title}_count\"] ) ? $settings[\"sitemap_{$class::$title}_count\"] : 0 ) / \\IPS\\Sitemap::MAX_PER_FILE );\n\t\tfor( $i=1; $i <= $count; $i++ )\n\t\t{\n\t\t\t$files[] = 'sitemap_content_' . str_replace( '\\\\', '_', mb_substr( $class, 4 ) ) . '_' . $i;\n\t\t}\n\t\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "1bc7686553122f2272f24e5cb60cb6f3", "score": "0.6317991", "text": "private function getXMLSitemap() {\r\r\n $meta = '';\r\r\n\r\r\n $xml_url = SQ_ObjController::getController('SQ_Sitemaps')->getXmlUrl('sitemap');\r\r\n\r\r\n if ($xml_url <> '') {\r\r\n $meta = sprintf(\"<link rel=\\\"alternate\\\" type=\\\"application/rss+xml\\\" \" . (($this->title <> '') ? \"title=\\\"%s\\\"\" : \"\") . \" href=\\\"%s\\\" />\", $this->title, $xml_url) . \"\\n\";\r\r\n }\r\r\n\r\r\n return apply_filters('sq_sitemap_meta', $meta);\r\r\n }", "title": "" }, { "docid": "39d7cf846c74ad5d8d3d621dc714ee39", "score": "0.6306342", "text": "function get_filename() {\n\t\tglobal $amp_conf;\n\n\t\t$files = array(\n\t\t\t'meetme_additional.conf',\n\t\t \t'confbridge_additional.conf',\n\t\t);\n\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "6786469d58cdc9f56565bc752e3d5aa9", "score": "0.6016362", "text": "private function get_file_name() {\n\t\t/**\n\t\t * get version if it is needded\n\t\t */\n\t\tif ( empty( $this->version ) ) {\n\t\t\t$csb_info = get_plugin_data( CSB_PLUGIN );\n\t\t\t$this->version = $csb_info['Version'];\n\t\t}\n\t\t// Get site name.\n\t\t$site_name = sanitize_key( get_bloginfo( 'name' ) );\n\t\t$site_name = empty( $site_name ) ? '' : $site_name . '.';\n\t\t// Create export file name.\n\t\t$filename = sprintf(\n\t\t\t'%s.sidebars.%s.%s.json',\n\t\t\t$site_name,\n\t\t\t$this->version,\n\t\t\tdate( 'Y-m-d.H-i-s' )\n\t\t);\n\t\treturn $filename;\n\t}", "title": "" }, { "docid": "a7fde2f7fe643358e4aa0a04c17d22ad", "score": "0.5948605", "text": "private function getDocumentName():string {\n\t\treturn pathinfo($this->sourceFile, PATHINFO_FILENAME);\n\t}", "title": "" }, { "docid": "4171b0b9a0fa5d8d85166a994f50562d", "score": "0.59450305", "text": "function filename(){\n $route = explode('/',$_SERVER['REQUEST_URI'])[1];\n return $route;\n}", "title": "" }, { "docid": "a9b2ba19d7d7a3633728766f61104ef4", "score": "0.59299374", "text": "public function sitemap_xml($url = null) {\r\n\t\tif (!$url) $url = $this->url;\r\n\t\t$url = parse_url($url);\r\n\t\t\r\n\t\t//doesn't function when passed a path, the explode was to get rid of sitemap.xml -sc 6/18/10\r\n\t\t//$location = 'http://'.$url['host'].implode(\"/\", explode(\"/\", $url['path'], -1));\r\n\t\t\r\n\t\t$location1 = 'http://'.$url['host'].implode(\"/\", explode(\"/\", $url['path'], -1));\r\n\t\t$location2 = 'http://'.$url['host'].implode(\"/\", explode(\"/\", $url['path'], -2));\r\n\t\t$location = 'http://'.$url['host'];\r\n\t\t\r\n\t\t$urls[0] = $location . '/sitemap.xml';\r\n\t\t$urls[1] = $location . '/sitemap.gz';\r\n\t\t$urls[2] = $location . '/sitemap.xml.gz';\r\n\t\t$urls[3] = $location1 . '/sitemap.xml';\r\n\t\t$urls[4] = $location1 . '/sitemap.gz';\r\n\t\t$urls[5] = $location1 . '/sitemap.xml.gz';\r\n\t\t$urls[6] = $location2 . '/sitemap.xml';\r\n\t\t$urls[7] = $location2 . '/sitemap.gz';\r\n\t\t$urls[8] = $location2 . '/sitemap.xml.gz';\r\n\t\t$urls[9] = $location . '/sitemap_index.xml';\r\n\t\t$urls[10] = $location . '/sitemap_index.gz';\r\n\t\t$urls[11] = $location . '/sitemap_index.xml.gz';\r\n\t\t$urls[12] = $location1 . '/sitemap_index.xml';\r\n\t\t$urls[13] = $location1 . '/sitemap_index.gz';\r\n\t\t$urls[14] = $location1 . '/sitemap_index.xml.gz';\r\n\t\t$urls[15] = $location2 . '/sitemap_index.xml';\r\n\t\t$urls[16] = $location2 . '/sitemap_index.gz';\r\n\t\t$urls[17] = $location2 . '/sitemap_index.xml.gz';\r\n\r\n\t\tforeach ($urls as $candidate) {\r\n\t\t\t$sitemap_xml = new EasyWebFetch;\r\n\t\t\t$sitemap_xml->get( $candidate );\r\n\t\t\tif ($sitemap_xml->getStatus() == '200') {\r\n\t\t\t\treturn($candidate);\r\n\t\t\t\texit();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn(false);\r\n\t}", "title": "" }, { "docid": "4f1c54c441ad11e8e2f15d430da36fac", "score": "0.5928321", "text": "public static function getFilename();", "title": "" }, { "docid": "aa92a2a8b833f1dd0f448ecfacfdea80", "score": "0.59215486", "text": "public function getDataSitemap(){\n if(empty($this->sitemapdata)){\n $this->sitemapdata = Filesystem::read($this->path);\n $temp = explode('\">',$this->sitemapdata);\n if(!empty($temp[1])) {\n $temp[1] = preg_replace('/\\s+/', '', $temp[1]);\n $this->sitemapdata = $temp[0].'\">'.$temp[1];\n }\n }\n return trim($this->sitemapdata);\n }", "title": "" }, { "docid": "fbf943aadfbc492ad748d43128ef6939", "score": "0.59072506", "text": "private function getFilename() {\n\t\treturn join(DIRECTORY_SEPARATOR, $this->line['file']);\n\t}", "title": "" }, { "docid": "5c41a951d996c2db8a7f75a877077325", "score": "0.5884793", "text": "protected function getCurrentFileName(){\r\n\t\t$fileURI = pathinfo($this->xml->documentURI);\r\n\t\treturn $fileURI['filename'];\r\n\t}", "title": "" }, { "docid": "95a4283293c01d521faded66084ebe2f", "score": "0.5871326", "text": "private function _getFileName()\n {\n $arrName = explode('/', $this->urlDownload);\n return end($arrName);\n }", "title": "" }, { "docid": "3982d14a61f51d3d8da15e37775b589e", "score": "0.58545434", "text": "public function getFilename () {}", "title": "" }, { "docid": "511fc7a0a862124514eaa0afdc9cb68f", "score": "0.5824064", "text": "function file_name($url)\n {\n }", "title": "" }, { "docid": "3c31453144d3a032ef1841a0623c8084", "score": "0.58191276", "text": "function GetTitle() {\n \t\t\treturn 'Sitemap';\n \t\t}", "title": "" }, { "docid": "f42fb8f3e68d126ae40ee2e53b267f75", "score": "0.5817688", "text": "function getFilename() {\n\t\tif($this->getField('Filename')) {\n\t\t\treturn $this->getField('Filename');\n\t\t} else {\n\t\t\treturn ASSETS_DIR . '/';\n\t\t}\n\t}", "title": "" }, { "docid": "c1692e672400e744cd1e68d396e5ea4b", "score": "0.5792586", "text": "private function get_manifest_filename()\n\t{\n\t\t// Return empty string if not a multisite\n\t\tif (!is_multisite()) {\n\t\t\treturn 'site.webmanifest';\n\t\t}\n\n\t\treturn 'site-' . get_current_blog_id() . '.webmanifest';\n\t}", "title": "" }, { "docid": "4cd0e53c9c983d590086b07bd056f947", "score": "0.577039", "text": "public static function tree_locations() {\n\t \n\t // Read Tree\n\t $ret = \"\";\n\t\t$tree = Disk::read_directory(\"tree\");\n\t\t\n\t\t// Genrate XML Entries\n\t foreach(str_replace(\".html\",\"\",self::_get_files_from_tree($tree)) as $url) {\n\t if($url != \"sitemap.xml\") {\n\t $ret .= ('<url><loc>'.Url::_($url).'</loc></url>');\n\t }\n\t\t}\n\t\t\n\t\t// Return\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "0d6a06e2208d1d0d6b28780b0047a94e", "score": "0.5764683", "text": "private function item_filename() : string\n\t{\n\t\t$ret = \"content.php\";\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "2c2a894ddc716d1a4fac1f8f84991b2c", "score": "0.5755028", "text": "public function getFilename();", "title": "" }, { "docid": "2c2a894ddc716d1a4fac1f8f84991b2c", "score": "0.5755028", "text": "public function getFilename();", "title": "" }, { "docid": "2c2a894ddc716d1a4fac1f8f84991b2c", "score": "0.5755028", "text": "public function getFilename();", "title": "" }, { "docid": "a604958780fef5c7f14be28d2a3bfc4e", "score": "0.57267445", "text": "function getSitemap($page) {\n\t\t\treturn array();\n\t\t}", "title": "" }, { "docid": "7435e82b9502dde0077456e4f61b2166", "score": "0.56983244", "text": "public function getOutputName()\n {\n\n $ext_pos = strrpos($this->getName(), '.');\n if ($ext_pos === false) {\n throw new SiteBuilderException('Unexpected filename; must have file extension');\n }\n $filename = substr($this->getName(), 0, $ext_pos) . '.html';\n\n return $filename;\n }", "title": "" }, { "docid": "068a0194684abd004547a143b7d795ed", "score": "0.5691545", "text": "function local_filename () {\n\t\treturn md5($this->url()) . '.' . $this->file_extension();\n\t}", "title": "" }, { "docid": "ae9e4a2e4c38046eb6ba6d33d3d6bd55", "score": "0.5671969", "text": "protected function fm_js_template_listfilename() {\n $rv = '\n<span class=\"fp-filename-icon\">\n <a href=\"#\">\n <span class=\"fp-icon\"></span>\n <span class=\"fp-reficons1\"></span>\n <span class=\"fp-reficons2\"></span>\n <span class=\"fp-filename\"></span>\n </a>\n <a class=\"fp-contextmenu\" href=\"#\" onclick=\"return false;\">'.$this->pix_icon('i/menu', '▶').'</a>\n</span>';\n return $rv;\n }", "title": "" }, { "docid": "323e59da11acf6a4e369cc02fc52b1ac", "score": "0.5627632", "text": "public function getDownloadName() {\r\n\t\t$results = $this->Location->find('first', array(\r\n\t\t\t'fields' => array(\r\n\t\t\t\t'url'\r\n\t\t\t),\r\n\t\t\t'conditions' => array(\r\n\t\t\t\t'Location.pdf_menu' => $this->id\r\n\t\t\t)\r\n\t\t));\r\n\t\tif ($results) {\r\n\t\t\treturn $results['Location']['url'];\r\n\t\t}\r\n\t\treturn $this->id;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "f299d48a328c385405a6239fbab95f78", "score": "0.5626644", "text": "function get_sitemap_url( $name, $subtype_name = '', $page = 1 ) {\n\t$sitemaps = wp_sitemaps_get_server();\n\tif ( ! $sitemaps ) {\n\t\treturn false;\n\t}\n\n\tif ( 'index' === $name ) {\n\t\treturn $sitemaps->index->get_index_url();\n\t}\n\n\t$provider = $sitemaps->registry->get_provider( $name );\n\tif ( ! $provider ) {\n\t\treturn false;\n\t}\n\n\tif ( $subtype_name && ! in_array( $subtype_name, array_keys( $provider->get_object_subtypes() ), true ) ) {\n\t\treturn false;\n\t}\n\n\t$page = absint( $page );\n\tif ( 0 >= $page ) {\n\t\t$page = 1;\n\t}\n\treturn $provider->get_sitemap_url( $subtype_name, $page );\n}", "title": "" }, { "docid": "dd5ec117e92cf1f0c52e804e443eccc2", "score": "0.5625451", "text": "public function getFileName() {\n $info = $this->getPathInfo();\n if(isset($info['filename'])) {\n return $info['filename'];\n }\n \n return '';\n }", "title": "" }, { "docid": "855aeafbca232764c867ffb82e79bdb2", "score": "0.5620121", "text": "public function getFeedFilePath()\n {\n if ($this->feedFilePath === null) {\n $this->feedFilePath = $this->makeVarPath(array('sli', 'feeds'));\n }\n\n return $this->feedFilePath;\n }", "title": "" }, { "docid": "9ab98898ee0a8839ed47db0a44d1f08c", "score": "0.56177235", "text": "public function forSitemap();", "title": "" }, { "docid": "ea01a86291d11dfeb6b402aefbe401dc", "score": "0.5601632", "text": "private function getFileName($url) {\n return sha1($url) . '.txt';\n }", "title": "" }, { "docid": "856a3c8991795a9b73e8e2ddeb146438", "score": "0.5599986", "text": "function currentFileName() {\n\treturn basename($_SERVER['REQUEST_URI'], '?' . $_SERVER['QUERY_STRING']);\n}", "title": "" }, { "docid": "da012bf335597d4cc267b7ed38987cce", "score": "0.5599325", "text": "public function getFileName(): string\n {\n $aeFiles = \\MarkNotes\\Files::getInstance();\n $aeSettings = \\MarkNotes\\Settings::getInstance();\n\n $fname=$aeFiles->makeFileNameAbsolute($this->sMDFileName);\n $fname=str_replace('/', DS, $fname);\n\n $fname = $aeFiles->replaceExtension($fname, $this->sLayout);\n\n // <!-- build:debug -->\n if ($aeSettings->getDebugMode()) {\n $aeDebug = \\MarkNotes\\Debug::getInstance();\n $aeDebug->log('Target file : ' . $fname, 'debug');\n }\n // <!-- endbuild -->\n\n return $fname;\n }", "title": "" }, { "docid": "b73561f7613a783cc36af16f5742d442", "score": "0.5593155", "text": "public function getFilenameOnFilestore() {\n\t\treturn $this->filestore->getFilenameOnFilestore($this);\n\t}", "title": "" }, { "docid": "c32c3c56fd0e7bb77ad90c8beef28fb2", "score": "0.5578761", "text": "function return_filename(string $location) :string{\n $array = explode('/', $location);\n return array_pop($array);\n}", "title": "" }, { "docid": "f44387542bd84886967a8c07c86d6a7e", "score": "0.5578284", "text": "protected function fp_js_template_listfilename() {\n $rv = '\n<span class=\"fp-filename-icon\">\n <a href=\"#\">\n <span class=\"fp-icon\"></span>\n <span class=\"fp-filename\"></span>\n </a>\n</span>';\n return $rv;\n }", "title": "" }, { "docid": "d4d4f529f2754bd0719b6a14ca8bbdea", "score": "0.5552605", "text": "protected function get_file_name(): string {\n\t\t\treturn 'page';\n\t\t}", "title": "" }, { "docid": "19c52f3fa2be2df9ed0ef528c90f0198", "score": "0.5552022", "text": "public function getFileName()\r\n\t{\r\n\t\treturn self::$HTTPPath.$this->unaltered;\r\n\t}", "title": "" }, { "docid": "b333bedb56a46fc82b70bb6da36656ce", "score": "0.5549433", "text": "function getFilename() { return basename($this->path); }", "title": "" }, { "docid": "bee19cde49a55c168b79db6342742e20", "score": "0.5538164", "text": "function getFile_name($page_list_id)\r\n {\r\n global $CFG,$objSmarty;\r\n $qry_det = \"SELECT file_id, original_name FROM \".$CFG['table']['files'].\" WHERE page_list_id='\".$page_list_id.\"'\";\r\n \r\n $res = $this->ExecuteQuery($qry_det,'select');\r\n $exts=(explode(\".\",$res[0]['original_name']));\r\n $extimg = $exts[count($exts)-1].'-icon.png'; \r\n if(file_exists($CFG['site']['image_path'].\"/\".$extimg))\r\n {\r\n $objSmarty->assign(\"extimg\",$CFG['site']['image_url'].\"/\".$extimg);\r\n }\r\n else\r\n {\r\n $objSmarty->assign(\"extimg\",$CFG['site']['image_url'].\"/download.png\");\r\n }\r\n $objSmarty->assign(\"files\",$res);\r\n }", "title": "" }, { "docid": "48cd2ccd09c92c7d718a598526da29a8", "score": "0.5534678", "text": "public function getBasename() {}", "title": "" }, { "docid": "02b444196acdc9ca09a4d6e43f6df2c7", "score": "0.55267847", "text": "private static function getClassMapFilename() {\n return sprintf( '%s/%s/%s', __ROOT__, CONFPATH_CACHE, self::ClassMap );\n }", "title": "" }, { "docid": "e89fe1db30740b2f6a1e6ca356fab01a", "score": "0.55235636", "text": "public function getFileName();", "title": "" }, { "docid": "e89fe1db30740b2f6a1e6ca356fab01a", "score": "0.55235636", "text": "public function getFileName();", "title": "" }, { "docid": "e89fe1db30740b2f6a1e6ca356fab01a", "score": "0.55235636", "text": "public function getFileName();", "title": "" }, { "docid": "e89fe1db30740b2f6a1e6ca356fab01a", "score": "0.55235636", "text": "public function getFileName();", "title": "" }, { "docid": "e89fe1db30740b2f6a1e6ca356fab01a", "score": "0.55235636", "text": "public function getFileName();", "title": "" }, { "docid": "6b78d19e5fef54513ffaffa92d69079e", "score": "0.5523204", "text": "abstract protected function getBasename();", "title": "" }, { "docid": "61fc2e641a6a46050fa75b36ef2ad0fb", "score": "0.55204123", "text": "private function getPanoramaFilename() {\n\t\t$files = glob('image/panorama/*');\n\t\t$filename = '';\n\t\tif(sizeof($files) > 0) {\n\t\t\t$filename = basename($files[0]);\n\t\t}\n\t\treturn $filename;\n\t}", "title": "" }, { "docid": "4aedc74a529e812567f2ec8b22a38a2a", "score": "0.5513547", "text": "function get_filename( ) {\n\t\treturn $this->file;\n\t}", "title": "" }, { "docid": "c981d4dc6e11115e371a9bf92394a017", "score": "0.5509767", "text": "function getfname($url){ \n $pos = strrpos($url, \"/\"); \n if ($pos === false) { \n // not found / no filename in url... \n return false; \n } else { \n // Get the string length \n $len = strlen($url); \n if ($len < $pos){ \n print \"$len / $pos\"; \n // the last slash we found belongs to http:// or it is the trailing slash of a URL \n return false; \n } else { \n $filename = substr($url, $pos+1, $len-$pos-1); \n } \n } \n return $filename; \n }", "title": "" }, { "docid": "3dff172b74e4efaa98e4277a3e167f0b", "score": "0.55074644", "text": "public function getFileName() {\r\n $info = pathinfo($this->path);\r\n return $info['filename'];\r\n }", "title": "" }, { "docid": "c455b8aad7452dc04f8d763e813e6879", "score": "0.54915935", "text": "function find_full_page_name() \r\n{\r\n\r\n\t$url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; \r\n\r\n\t$array = explode(\"/\", $url); \r\n\t$full_name = \"\";\r\n\r\n\t$length = sizeof($array);\r\n\t$start = 1;\r\n\r\n\twhile($start < $length)\r\n\t{\r\n\t\t$full_name = $full_name.\"/\".$array[$start];\r\n\t\t$start += 1; \r\n\t}\r\n\r\n\treturn $full_name;\r\n}", "title": "" }, { "docid": "2025421c85d3bc7bc679459042caa575", "score": "0.5486212", "text": "public function getFilename()\n {\n return str_replace($this->getRootDir(), '', $this->getPathname());\n }", "title": "" }, { "docid": "753069cde9998eaf3eea379cb844b981", "score": "0.5484569", "text": "public function js_template_listfilename() {\n $rv = '<span class=\"{!}fp-icon\"></span> <span class=\"{!}fp-filename\"></span>';\n return preg_replace('/\\{\\!\\}/', '', $rv);\n }", "title": "" }, { "docid": "a44892d4aa840e7e9aff7c6f40a92e86", "score": "0.5484107", "text": "protected function getMappingFile()\n {\n $name = trim($this->option('mapping-filename')) ?: Config::getDefaultMapperFileName();\n\n return base_path(Config::getResourceFilePath($name));\n }", "title": "" }, { "docid": "5d3d02a014ae9fb63f4f2effe40fcbf0", "score": "0.5478739", "text": "public function get_filename()\n {\n }", "title": "" }, { "docid": "adf7ebf50740bc6ebf2460f1193fa2a5", "score": "0.54699713", "text": "function xcms_get_info_file_name($page_id = false)\n{\n global $SETTINGS;\n if ($page_id === false)\n {\n global $pageid;\n $page_id = $pageid;\n }\n return \"{$SETTINGS[\"content_dir\"]}cms/pages/$page_id/info\";\n}", "title": "" }, { "docid": "0d2f6239c3bcb4c704d0a22abbb48532", "score": "0.54682904", "text": "public function getFilename()\n {\n $current = $this->current();\n\n return (string)$current;\n }", "title": "" }, { "docid": "5f393f9d781f196c6f5f396ae295daeb", "score": "0.5455627", "text": "public function get_filename()\n {\n }", "title": "" }, { "docid": "769cdfb3a46429aa9e7e3f986d558642", "score": "0.5452209", "text": "function getFilename()\n {\n return __FILE__;\n }", "title": "" }, { "docid": "769cdfb3a46429aa9e7e3f986d558642", "score": "0.5452209", "text": "function getFilename()\n {\n return __FILE__;\n }", "title": "" }, { "docid": "0dd67580ce2f69e2de2fda487b289bfc", "score": "0.5443689", "text": "public function getFileName()\n {\n return $this->node->getFileName();\n }", "title": "" }, { "docid": "f5036e90d0a473d12d2af9ca00be2672", "score": "0.5436312", "text": "function getZipFileName();", "title": "" }, { "docid": "0e9c3f0e68911cce499fa0db49e1fe05", "score": "0.54266787", "text": "public function getBasename();", "title": "" }, { "docid": "0e9c3f0e68911cce499fa0db49e1fe05", "score": "0.54266787", "text": "public function getBasename();", "title": "" }, { "docid": "3be716ef53e330a5bfe4f1f1f01190ec", "score": "0.5419709", "text": "private static function getSiteLocaleDirNames()\n {\n $result = array();\n $siteLocaleDir = DirPaths::siteLocale();\n if (\\file_exists($siteLocaleDir)) {\n foreach (new \\DirectoryIterator($siteLocaleDir) as $fileInfo) {\n if (self::moFileExists($fileInfo)) {\n $result[] = $fileInfo->getBasename();\n }\n }\n }\n return $result;\n }", "title": "" }, { "docid": "07860a7a29c49aa5ba129813b5ec1f35", "score": "0.541953", "text": "protected function getSiteFiles()\n {\n $files = array_filter($this->filesystem->allFiles(KATANA_CONTENT_DIR), function (SplFileInfo $file) {\n return $this->filterFile($file);\n });\n\n $this->appendFiles($files);\n\n return $files;\n }", "title": "" }, { "docid": "a5028a61363768393e8cbbbeea28a315", "score": "0.5414632", "text": "public function getFileName()\n {\n return 'CacoCloudBookmarks.html';\n }", "title": "" }, { "docid": "caac572708292a5f2b0bea1105974e77", "score": "0.5408998", "text": "abstract public function getFilename();", "title": "" }, { "docid": "d68f9aeeabda1dab4588b772b4bdbe69", "score": "0.53990775", "text": "public function getFilename(): string\n {\n $pathParts = pathinfo($this->path);\n return $pathParts['filename'];\n }", "title": "" }, { "docid": "9fb335247931a741c025efcb7baef950", "score": "0.53941274", "text": "protected function _getFileName()\n {\n if(!empty($this->_options['/out_filename']))\n {\n return $this->_options['/out_filename'];\n }\n\n $containerName = null;\n $xPath = new DOMXPath($this->_metadataDoc);\n foreach (self::$namespaces as $prefix => $namespaceURI)\n {\n $xPath->registerNamespace($prefix, $namespaceURI);\n }\n\n $entityContainers = $xPath->query(self::$QUERY_EDM_2007_05_ENTITYCONTAINER);\n if($entityContainers->length)\n {\n $containerName = $this->_getAttribute($entityContainers->item(0),\n 'Name');\n }\n else\n {\n $entityContainers = null;\n $entityContainers = $xPath->query(self::$QUERY_EDM_2006_04_ENTITYCONTAINER);\n if($entityContainers->length)\n {\n $containerName = $this->_getAttribute($entityContainers->item(0),\n 'Name');\n }\n else\n {\n $entityContainers = null;\n $entityContainers = $xPath->query(self::$QUERY_EDM_2008_09_ENTITYCONTAINER);\n if($entityContainers->length)\n {\n $containerName = $this->_getAttribute($entityContainers->item(0),\n 'Name');\n }\n }\n }\n\n if($containerName)\n {\n $this->_options['/out_filename'] = $containerName . '.php';\n }\n else\n {\n $this->_options['/out_filename'] = self::$default_proxy_file;\n }\n\n return $this->_options['/out_filename'];\n }", "title": "" }, { "docid": "be93495d950de1cf28f6c0603c4f3871", "score": "0.53905123", "text": "protected function filename()\n {\n return basename($this->path);\n }", "title": "" }, { "docid": "e2e9a4cda5d7f71984ecffa982c7b5f3", "score": "0.5385539", "text": "protected function getDestinationFullname()\n {\n return base_path(Config::getResourceFilePath($this->getNewFilename()));\n }", "title": "" }, { "docid": "93313f18726c225d2a67a264603257e2", "score": "0.5384793", "text": "private function _getFilename($params)\n {\n $fname = null;\n if (count($params) > 0) {\n foreach ($params as $param) {\n $attr = strtolower($param->attribute);\n if ($attr == 'name' || $attr == 'filename') {\n $fname = $param->value;\n break;\n }\n }\n }\n return $fname;\n }", "title": "" }, { "docid": "b2d405a69ee938d3458db286dd12fcc2", "score": "0.5379815", "text": "public function getMap()\n {\n if ($this->getRemoteFile() === null) {\n throw new RuntimeException('Cannot determine name of remote file, call setRemoteFile()');\n }\n\n $parts = explode('/', $this->getRemoteFile());\n\n return sprintf('%s/map%s.xml',\n implode('/', array_slice($parts, 0, -1)),\n implode('', array_slice($parts, -1))\n );\n }", "title": "" }, { "docid": "6da9ea0c7ba9ebd62e36de86e18915a3", "score": "0.5367829", "text": "static function getFileName($path){\n return pathinfo($path, PATHINFO_FILENAME);\n }", "title": "" }, { "docid": "c4010d7a171c295363cf328174569c59", "score": "0.5361624", "text": "protected function getURLFilename()\n\t{\n\t\treturn 'esig.php';\n\t}", "title": "" }, { "docid": "5302a11b0c09b199b95f8c5be1f71bcb", "score": "0.5359706", "text": "function getTargetFileName() ;", "title": "" }, { "docid": "61006369cbd8743a4d7517f909411a19", "score": "0.53596646", "text": "public function getFilename()\n {\n return __FILE__;\n }", "title": "" }, { "docid": "61006369cbd8743a4d7517f909411a19", "score": "0.53596646", "text": "public function getFilename()\n {\n return __FILE__;\n }", "title": "" }, { "docid": "61006369cbd8743a4d7517f909411a19", "score": "0.53596646", "text": "public function getFilename()\n {\n return __FILE__;\n }", "title": "" }, { "docid": "9f1a40a8fe5ee95b48882ba1f774ae6d", "score": "0.5356643", "text": "public function getImageNameMap() {\n $imageNameMap = $this->_scopeConfig->getValue(self::XPATH_IMAGE_MAPPING);\n $imageNameMap = unserialize($imageNameMap);\n return $imageNameMap;\n }", "title": "" }, { "docid": "77401e89d08a66aee730bcea9eadd385", "score": "0.5355652", "text": "private function getTemplateFileName()\n\t{\n\t\t$template = \"inhalt.html\";\n\n\t\treturn array_reduce([\n\t\t\tPAPOO_ABS_PFAD.\"/styles/{$GLOBALS[\"cms\"]->style_dir}/templates/$template\",\n\t\t\tPAPOO_ABS_PFAD.\"/styles_default/templates/$template\"\n\t\t], function ($template, $filename) {\n\t\t\treturn $template !== false ? $template : (is_file($filename) ? $filename : $template);\n\t\t}, false);\n\t}", "title": "" }, { "docid": "9da023cd356df08993ff7b9542954b06", "score": "0.5354499", "text": "function getFile_name_build($page_list_id)\r\n {\r\n global $CFG,$objSmarty;\r\n $qry_det = \"SELECT file_id, original_name FROM \".$CFG['table']['temp_files'].\" WHERE page_list_id='\".$page_list_id.\"'\";\r\n \r\n $res = $this->ExecuteQuery($qry_det,'select');\r\n $exts=(explode(\".\",$res[0]['original_name']));\r\n $extimg = $exts[count($exts)-1].'-icon.png';\r\n \r\n if(file_exists($CFG['site']['image_path'].\"/\".$extimg))\r\n {\r\n $objSmarty->assign(\"extimg\",$CFG['site']['image_url'].\"/\".$extimg);\r\n }\r\n else\r\n {\r\n $objSmarty->assign(\"extimg\",$CFG['site']['image_url'].\"/download.png\");\r\n }\r\n \r\n $objSmarty->assign(\"files\",$res);\r\n }", "title": "" }, { "docid": "cf126d5a82ab3bd513673e0ccbedbf9c", "score": "0.5350077", "text": "public function getFilename(){\n return isset($this->imgFilename) ? $this->imgFilename : '';\n }", "title": "" }, { "docid": "53040fd84247dfbc870c00221d0d261c", "score": "0.5348489", "text": "public static function get_list()\n\t{\n\t\t$fd = opendir(MAPS_PATH);\n\t\t$list_map = array();\n\t\twhile ($file = readdir($fd))\n\t\t{\n\t\t\t$extension = get_file_data($file, 'extension');\n\t\t\tif ($extension == 'xml')\n\t\t\t{\n\t\t\t\t$filename = get_file_data($file, 'filename');\n\t\t\t\t$list_map[$filename] = $filename;\n\t\t\t}\n\t\t}\n\t\tclosedir($fd);\n\n\t\treturn ($list_map);\n\t}", "title": "" }, { "docid": "4da8d67a567fe24d9ac2905bef82bfb0", "score": "0.5338537", "text": "public function sitemap()\n {\n return $this->sitemap;\n }", "title": "" }, { "docid": "f2bab27cda07f09acbfc6ce5b3513d9d", "score": "0.53376013", "text": "private function getRequestedPageFilePath() {\n\t\t$requestURI = trim($_SERVER['REQUEST_URI']);\n\t\t$requestURI = preg_replace('/\\?.+$/','',$requestURI);\n\n\t\t// request URI must end with self::MARKDOWN_EXT\n\t\treturn (preg_match('/\\\\' . self::MARKDOWN_EXT . '$/',$requestURI))\n\t\t\t? self::DOC_ROOT . $requestURI\n\t\t\t: false;\n\t}", "title": "" }, { "docid": "4571461001135462270ca7a3820f7540", "score": "0.5335124", "text": "public function getSitemap($includeHome = true) {\n\t\t\n\t\t$this->alternateLoc = Configure::read(\"Sitemapcake2.AlternateLoc\");\n\t\t\n\t\tif ($includeHome) {\n\t\t\t$this->_setUri(Router::parse('/'), true);\n\t\t}\n\t\t\n\t\t$this->_loadControllers();\n\t\t$this->_loadModels();\n\t\t$this->_loadManuals();\n\t\t\n\t\treturn $this->urls;\n\t}", "title": "" }, { "docid": "82de6e84314aa96125915eef88a1e33e", "score": "0.532652", "text": "public function getFilename() {\n return 'ui-ej-boss-'. $this->urlSlug.'.png';\n }", "title": "" }, { "docid": "305503a542f125dec968d4b8b1906d30", "score": "0.5323513", "text": "protected function generateFilenameFromCode()\n {\n $dir = rtrim($this->getFilePath(''), '/');\n\n $fileName = trim(str_slug(str_replace('/', '-', $this->getViewBag()->property('url')), '-'));\n if (strlen($fileName) > 200) {\n $fileName = substr($fileName, 0, 200);\n }\n\n if (!strlen($fileName)) {\n $fileName = 'index';\n }\n\n $curName = trim($fileName).'.htm';\n $counter = 2;\n\n while (File::exists($dir.'/'.$curName)) {\n $curName = $fileName.'-'.$counter.'.htm';\n $counter++;\n }\n\n return $curName;\n }", "title": "" }, { "docid": "fb02bc5e99bdb735b08d9b28cd843e66", "score": "0.53201383", "text": "static function getAvailableUploadsFileName() {\n do {\n $filename = UPLOAD_PATH . '/' . make_string(10) . '-' . make_string(10) . '-' . make_string(10) . '-' . make_string(10);\n } while(is_file($filename));\n\n return $filename;\n }", "title": "" }, { "docid": "762d270e5955593ae677df18e117ed4a", "score": "0.5315082", "text": "public function getFiles()\n {\n $files = glob(HTMLprototyper::$projectsFolder . '/' . $this->projectFolder .'/*.html');\n foreach ($files as $key => $file) {\n $files[$key] = basename($file);\n }\n return $files;\n }", "title": "" }, { "docid": "d534d531edcd150b6f6c94d6d16208b0", "score": "0.53138554", "text": "function getFileName() {\n\t\treturn $this->getData('fileName');\n\t}", "title": "" }, { "docid": "5ddc48cd31fafb28d8df01b3eed666bc", "score": "0.5312824", "text": "private static function getFilename()\n {\n return self::$folder . '/' . sprintf(self::FILENAME_FORMAT, date('m-d-Y'));\n }", "title": "" }, { "docid": "a43155a1c0fb7d015716f2c849479f3a", "score": "0.53103215", "text": "private function _getSitemap() {\n $sModel = $this->__autoload('Blogs', true);\n $oBlogs = new $sModel($this->_aRequest, $this->_aSession);\n\n $sModel = $this->__autoload('Contents', true);\n $oContents = new $sModel($this->_aRequest, $this->_aSession);\n\n $sModel = $this->__autoload('Galleries', true);\n $oGalleries = new $sModel($this->_aRequest, $this->_aSession);\n\n $this->oSmarty->assign('blogs', $oBlogs->getData('', false, 1000));\n $this->oSmarty->assign('contents', $oContents->getData('', false, 1000));\n $this->oSmarty->assign('galleries', $oGalleries->getData('', false, false, 1000));\n }", "title": "" }, { "docid": "d3c1399aba64caa7dfe90642366b365f", "score": "0.5307973", "text": "function get_current_url_filename() {\r\n static $url;\r\n if(!empty($url)) return $url;\r\n $url = basename($_SERVER['REQUEST_URI']);\r\n if(($pos=strpos($url, '?'))!==false) $url = substr($url, 0, $pos);\r\n return $url;\r\n}", "title": "" }, { "docid": "507262457d8108b1a2da2a28ca239546", "score": "0.53072184", "text": "function getFileName() {\n\t\treturn $this->getData('fileName');\t\n\t}", "title": "" } ]
595f10b1f30135a148ac1d5ae9a60145
Logs a message if a logger has been provided, otherwise ignores log request
[ { "docid": "7abf4685ca675696c0ae950e528cbae9", "score": "0.0", "text": "protected function log($message, $level = MonologLogger::INFO)\n {\n if ($logger = $this->logger)\n {\n /* @var $logger LoggerInterface */\n $logger->log($level, $message);\n }\n }", "title": "" } ]
[ { "docid": "130e612efbb730f05791bab06d010633", "score": "0.67876524", "text": "function _loggerLog($message){\n\t\tif($this->logger){\n\t\t\t$this->logger->info($message);\n\t\t}\n\t}", "title": "" }, { "docid": "0692544ca79f9ec59786325463e56ac3", "score": "0.62366956", "text": "abstract public function log($message);", "title": "" }, { "docid": "606a0f340cee7ae837c7bbb422b8f240", "score": "0.62270534", "text": "public function log($message);", "title": "" }, { "docid": "e47b779e91c07b4a4042c9ab6b773166", "score": "0.60777944", "text": "private function log( $message = '' ) {\n\t\t$this->utils->log( $message );\n\t}", "title": "" }, { "docid": "5ce1dd3318414510ad19ddd1355d5f51", "score": "0.6047936", "text": "function _log($text,$level=10) {\n\t\tif($this->logger) call_user_func($this->logger, $text, $level);\n\t}", "title": "" }, { "docid": "e27d128fb7676ad877070a1fb04f52e6", "score": "0.6034327", "text": "function edd_message_maybe_log( $log ) {\n\tglobal $edd_options;\n\n\t$output = ( isset( $edd_options['edd-message-logging'][ $log ] ) ) ? true : false;\n\n\treturn $output;\n}", "title": "" }, { "docid": "5b1131deca9d5dae517a443f78bc5128", "score": "0.5982303", "text": "function log($message, $type = null) {\n\t\tif (!class_exists('RequestHandlerComponent')) {\n\t\t\tApp::import('Component', 'RequestHandler');\n\t\t}\n\t\tif (!is_string($message)) {\n\t\t\t$message = print_r($message, true);\n\t\t}\n\t\t$message = RequestHandlerComponent::getClientIP() . \"\\t\" . $message;\n\t\tparent::log($message, $type);\n\t}", "title": "" }, { "docid": "7837578cc5fd44263f0e52d27f3c9b8b", "score": "0.59685314", "text": "public function setLogger(DocBlox_Core_Log $log = null);", "title": "" }, { "docid": "cde60b86206f41c4dac31dced2bbc01b", "score": "0.59569985", "text": "public function log($msg){\n }", "title": "" }, { "docid": "849d50ea6727258d174233f7bdf70e49", "score": "0.5937405", "text": "public function testLoggerMethodsIfNoLogger() {\n Slim_Log::setLogger(null);\n $this->assertFalse(Slim_Log::debug('Test'));\n $this->assertFalse(Slim_Log::info('Test'));\n $this->assertFalse(Slim_Log::warn('Test'));\n $this->assertFalse(Slim_Log::error('Test'));\n $this->assertFalse(Slim_Log::fatal('Test'));\n }", "title": "" }, { "docid": "e8d68c77aadd1c4a800860933b16c9ef", "score": "0.5871435", "text": "abstract protected function log(\n GameRequestInterface $gameRequest,\n Level $logLevel,\n bool $isRequestCheck\n ): void;", "title": "" }, { "docid": "1d55fe4048d0b931bed5639c3d71c00c", "score": "0.58383214", "text": "public function log($message, $type = null) {\n\t\tif (!class_exists('RequestHandlerComponent')) {\n\t\t\tApp::import('Component', 'RequestHandler');\n\t\t}\n\t\tif (!is_string($message)) {\n\t\t\t$message = print_r($message, true); //@ignore\n\t\t}\n\t\tparent::log(RequestHandlerComponent::getClientIP() . \"\\t\" . $message, $type);\n\t}", "title": "" }, { "docid": "7dc85de91903c205a8ac88366030d293", "score": "0.57902044", "text": "function mylogger($message){\n\t\n\tif($GLOBALS['debug']){\n\t\tsyslog(LOG_WARNING, \"Record: $message\");\n\t}\n\n}", "title": "" }, { "docid": "35bb2551f8fc1c63a913e5125e540a11", "score": "0.57675326", "text": "public function test__Log() {\n\t\t// Verify method checks for invalid level\n\t\tverify( $this->_logger->log( \"foo\", \"A test\", array() ) )->equals( array(\n\t\t\t\"A test\",\n\t\t\tYiiLogger::LEVEL_INFO,\n\t\t\t\"guzzle\",\n\t\t) );\n\n\t\t// Verify method uses valid level\n\t\tverify( $this->_logger->log( \"error\", \"A test\", array() ) )->equals( array(\n\t\t\t\"A test\",\n\t\t\tYiiLogger::LEVEL_ERROR,\n\t\t\t\"guzzle\",\n\t\t) );\n\n\t\t// Verify static method checks for invalid level\n\t\tverify( Logger::logMessage( \"foo\", \"A test\", array() ) )->equals( array(\n\t\t\t\"A test\",\n\t\t\tYiiLogger::LEVEL_INFO,\n\t\t\t\"guzzle\",\n\t\t) );\n\n\t\t// Verify static method uses valid level\n\t\tverify( Logger::logMessage( \"error\", \"A test\", array() ) )->equals( array(\n\t\t\t\"A test\",\n\t\t\tYiiLogger::LEVEL_ERROR,\n\t\t\t\"guzzle\",\n\t\t) );\n\t}", "title": "" }, { "docid": "15f5d29535389829a5ee896c50f6ecbe", "score": "0.57561255", "text": "function wrapLogging(LoggerInterface $logger, $level = LogLevel::DEBUG);", "title": "" }, { "docid": "e5a119a568ba613413294a7cb7c2dccd", "score": "0.5737053", "text": "public function testLog_withMessageOnly()\n\t{\n\t\t$logLevel = LogLevel::ERROR;\n\t\t$logMessage = 'log message';\n\n\t\t$client = $this->getMockBuilder('Raven_Client')\n\t\t\t->disableOriginalConstructor()\n\t\t\t->setMethods(['captureMessage', 'captureException'])\n\t\t\t->getMock();\n\n\t\t$client->expects(static::once())\n\t\t\t->method('captureMessage')\n\t\t\t->with(\n\t\t\t\t$logMessage,\n\t\t\t\t[],\n\t\t\t\t['level' => $logLevel]\n\t\t\t)\n\t\t\t->willReturn('event ID');\n\n\t\t$client->expects(static::never())\n\t\t\t->method('captureException');\n\n\t\t$logger = new RavenLogger('logDir', 'http://key:[email protected]/1');\n\n\t\t$reflection = new \\ReflectionClass($logger);\n\t\t$reflectionProperty = $reflection->getProperty('ravenClient');\n\t\t$reflectionProperty->setAccessible(true);\n\t\t$reflectionProperty->setValue($logger, $client);\n\n\t\t$logger->log($logLevel, $logMessage); // assertions made by mock\n\t}", "title": "" }, { "docid": "919873d9ee921b32809b2d625e02c0db", "score": "0.5722868", "text": "private function log(RequestInterface $request, ResponseInterface $response) {\n // Only log responses of the following types. Files etc., shouldn't be logged.\n $logTypes = ['application/xml; charset=UTF-8', 'application/json; charset=UTF-8'];\n $loggable = in_array($response->getHeader('Content-Type')[0], $logTypes); \n\n \n // Clean up the request and produce response message based on the above.\n $requestBody = $request->getBody();\n $requestBody->rewind();\n $requestBody = $this->sanitizeRequest($requestBody->getContents());\n\n $responseBody = $loggable ? $response->getBody()->getContents() : \"Response format not logged\";\n $uri = $request->getUri()->getPath();\n\n $this->logger->log(LogLevel::INFO, $uri, [\n \"request\" => $requestBody,\n \"response\" => $responseBody,\n ]);\n }", "title": "" }, { "docid": "77afa987db261fef48ed11c10910a712", "score": "0.57154024", "text": "function log_message ($msg, $type = Msg_type_debug_info, $channel = Msg_channel_default, $has_html = false)\n{\n global $Logger;\n\n if ($Logger)\n {\n $Logger->record ($msg, $type, $channel, $has_html);\n }\n}", "title": "" }, { "docid": "07301e890a2a743c47a25d12b96de472", "score": "0.5712205", "text": "public static function log() {\n $args = func_get_args();\n return self::_log( '', $args );\n }", "title": "" }, { "docid": "74c325ff43f0c8faec38b4ca1b11b94f", "score": "0.5689105", "text": "public abstract function log($sMessage, $iLogLevel = 3);", "title": "" }, { "docid": "a11f76a108897140cf3b64c46f6eab1e", "score": "0.56572545", "text": "public function log( $message = '' ) {\n\n\t\tif ( $this->debug ) {\n\t\t\t$this->logs->log( $message );\n\t\t}\n\t}", "title": "" }, { "docid": "49b72142ef916b6d2ede1b2439c25013", "score": "0.56534886", "text": "public function log()\n\t{\n\t\tif(is_callable($this->__core->log_handler)) // if valid log handler\n\t\t{\n\t\t\tcall_user_func_array($this->__core->log_handler, array_merge(func_get_args(),\n\t\t\t\t[$this->__core->route->request_str, $_SERVER['REMOTE_ADDR']]));\n\t\t}\n\t}", "title": "" }, { "docid": "4472ccac82163bae0ab75c84958d78d1", "score": "0.56508607", "text": "function log($msg=\"\"){ if($this->debug){ echo $msg.\"\\n\"; } }", "title": "" }, { "docid": "9007d646104a0407eeae46a90afbdb1b", "score": "0.56488115", "text": "function _loggerDebug($message){\n\t\tif($this->logger){\n\t\t\t$this->logger->debug($message);\n\t\t}\n\t}", "title": "" }, { "docid": "e12a18c822098d6b0a5d8a68a44e2313", "score": "0.5627337", "text": "public static function NoLogging() {return 1;}", "title": "" }, { "docid": "bb87d45a3778280a925d39b299ac0478", "score": "0.55887616", "text": "public function log($level, $message, array $context = array())\n{\n\n}", "title": "" }, { "docid": "7bac8c2907a53cfabf544753564314f3", "score": "0.55640185", "text": "function logger($message = null, array $context = []): ?LogManager\n {\n /* @var LogManager $manager */\n $manager = app('log');\n\n if (is_null($message)) {\n return $manager;\n }\n\n $manager->debug($message, $context);\n }", "title": "" }, { "docid": "2f6e5f34b84edb58e50dc204a8ceb9ec", "score": "0.5548235", "text": "public function __invoke(Logger $logger)\n {\n if ($this->request) {\n foreach ($logger->getHandlers() as $handler) {\n $handler->pushProcessor([$this, 'processLogRecord']);\n }\n }\n }", "title": "" }, { "docid": "8e969ca46aa398b1c13b3cfca72cbd81", "score": "0.55150956", "text": "public function testFilter_notLogged()\n {\n $logger = new EchoLogger(LogLevel::WARNING);\n $logger->debug('something unimportant');\n $this->assertEquals(1, count($this->logFile()));\n }", "title": "" }, { "docid": "5f9bc17d6b7544dab28b6c8af5540129", "score": "0.5514077", "text": "private function _log($message = '')\n\t{\n\t\t//echo (is_array($message) ? print_r($message, TRUE) : $message) .'<br>';\n\t}", "title": "" }, { "docid": "90a3085cae932bfe4675abfd00b1a9cf", "score": "0.55133057", "text": "function logger($message = null, array $context = [])\n\t{\n\t\tif (is_null($message)) {\n\t\t\treturn app('log');\n\t\t}\n\n\t\treturn app('log')->debug($message, $context);\n\t}", "title": "" }, { "docid": "fa018fce96035ed9b5909c7cf37f6da4", "score": "0.5468646", "text": "public function log(string $log) {\n\n }", "title": "" }, { "docid": "39f9397744a4bf69511fa1562c7a23fc", "score": "0.5448938", "text": "protected function log( $message ) {\n\t\t\t$this->_logger->log( $message );\n\t\t}", "title": "" }, { "docid": "34a5013120def2230218024fa5f96a1d", "score": "0.541096", "text": "function logger($message, $level = 'INFO')\n{\n echo date('Y-m-d H:i:s') . \" -- $level : $message\\n\";\n}", "title": "" }, { "docid": "713423321b89e3906a05a493d8ca1f8c", "score": "0.5407389", "text": "public function getSystemLogger();", "title": "" }, { "docid": "f9b1b0b8c649b42a0537e4cb2b8c81be", "score": "0.5373917", "text": "public function log($level, $message, array $context = []);", "title": "" }, { "docid": "019c0bb98688e6a986499786f359ae93", "score": "0.5366714", "text": "public function log($level, $message, array $context = array()) {\n \tif ($this->logger && $this->logger instanceof LoggerInterface) {\n \t\t$this->logger->log($level, $message, $context);\n \t}\n \t//dev/null\n }", "title": "" }, { "docid": "cef002183571e4f589fc13235349a102", "score": "0.5362212", "text": "private function _log($message)\n\t{\n\t\tLog::info('Braintree: ' . $message);\n\t}", "title": "" }, { "docid": "9e3a70d8ec07fdaba1f17540c49127ff", "score": "0.5359963", "text": "public function log($message, int $level, string $path): void;", "title": "" }, { "docid": "2589df8e00b2e7fde72eba2e70de78ec", "score": "0.53560627", "text": "public function log($level, $message, array $context = array());", "title": "" }, { "docid": "f1e5746a4615c3978fdd681a24562097", "score": "0.5354763", "text": "public static function log()\n {\n if (self::$enabled === true) {\n $args = func_get_args();\n if (count($args) > 0) {\n foreach ($args as $arg) {\n error_log(sprintf(\"%s%s: %s\", self::$logPrefix, self::$actionLogPrefix, print_r($arg, true)));\n }\n }\n }\n }", "title": "" }, { "docid": "b9493facf1efaf9c70efb2cc7b115d65", "score": "0.5352453", "text": "public function logger($instance = null)\n {\n }", "title": "" }, { "docid": "c2f550c4e735d7d6ba30354aec663e2f", "score": "0.5342256", "text": "public function logCall($message, $level = 0)\n {\n if (Configuration::get('SOISY_FREE_LOG_ENABLED')) {\n $this->logger->log($message, $level);\n }\n }", "title": "" }, { "docid": "ed44b7549636088cff743a34bcc61c69", "score": "0.5341209", "text": "function hewa_write_log( $log )\n{\n $handler = apply_filters( 'hewa_write_log_handler', null );\n\n if ( is_null( $handler ) ) {\n return hewa_write_log_handler( $log );\n }\n\n call_user_func( $handler, $log );\n}", "title": "" }, { "docid": "63754d15e1c28382f0f6f8da32a39c75", "score": "0.53239214", "text": "public function log( string $message ) : void\n {\n return;\n }", "title": "" }, { "docid": "7ed86f24b3509e604802737dea295ed4", "score": "0.5310125", "text": "public function setLogger(\\Psr\\Log\\LoggerInterface $logger);", "title": "" }, { "docid": "ecc8096a7e8206e8aacef4a05d416ef3", "score": "0.530976", "text": "public static function log_message($type = 'debug', $message = '')\n\t{\n\t\tif (function_exists('log_message'))\n\t\t{\n\t\t\tlog_message($type, $message);\n\t\t}\n\t}", "title": "" }, { "docid": "ae866a5c2b437ed841f8bd2217e8e7e8", "score": "0.53095514", "text": "function app_log($message, $level = 'debug', $path = null, $line = null) {\n\t\tif (! isset($path)) {\n\t\t\t$trace = debug_backtrace();\n\t\t\t$caller = $trace[0];\n\t\t\t$path = $caller['file'];\n\t\t\t$line = $caller['line'];\n\t\t}\n\t\t$GLOBALS['logger']->writeln($message,$level,$path,$line);\n\t}", "title": "" }, { "docid": "b7f1ebe5b13ccefa81c758e192e06e93", "score": "0.53064245", "text": "private function log( $message ) {\n\t\tif ( $this->debug ) {\n\t\t\t$this->logger->add( $this->logger_id, $message );\n\t\t}\n\t}", "title": "" }, { "docid": "b08bdfc33f25e9c540187ca5029d5652", "score": "0.5303851", "text": "private function log($msg)\n {\n if($this->_dologging)\n {\n pinLog::i()->log($msg);\n }\n }", "title": "" }, { "docid": "59c4963ee5b178cff0539e60cde4561b", "score": "0.53029317", "text": "public function log(string $name, string $message, array $data = []): void;", "title": "" }, { "docid": "d669f353e0cc742c138c4648a8735c4a", "score": "0.5301305", "text": "function logger($message = null, array $context = [])\n {\n if (is_null($message)) {\n return app('log');\n }\n \n return app('log')->debug($message, $context);\n }", "title": "" }, { "docid": "ffa547b70c28f2e0f01ce964993c609c", "score": "0.5298356", "text": "function logMessage($logLevel, $message)\n{\n}", "title": "" }, { "docid": "9cad2dd5c519f72bd7e6a067ddbdaefd", "score": "0.5296835", "text": "public function log($msg) {\n if(!isset ($_COOKIE[\"forumName\"])) {\n if(!isset ($_COOKIE[\"forumCDROM\"])) {\n $user = rand (0, 16384);\n setcookie (\"forumCDROM\", $user, mktime (0, 0, 0, 1, 1, 2038), \"/\");\n } else $user = $_COOKIE[\"forumCDROM\"];\n }\n else $user = $_COOKIE[\"forumName\"];\n $userAgent = $_SERVER[\"HTTP_USER_AGENT\"] ?? '';\n\n // context of the request\n $context = array(\n 'time' => strftime(\"%a %b %d %X %Y\"),\n 'remoteAddr' => $_SERVER[\"REMOTE_ADDR\"] ?? '',\n 'xForwardedFor' => $_SERVER[\"HTTP_X_FORWARDED_FOR\"] ?? '',\n 'user' => $user,\n 'userAgent' => $userAgent,\n );\n\n if(\n /* Do not log me */\n (empty($this->administrator) || ($user != $this->administrator)) &&\n\n /* Do not log bots */\n !is_string(strstr($userAgent, \"http://search.msn.com/msnbot.htm\")) &&\n !is_string(strstr($userAgent, \"Free Eating Union\")) &&\n !is_string(strstr($userAgent, \"ia_archiver\")) &&\n !is_string(strstr($userAgent, \"sogou spider\")) &&\n !is_string(strstr($userAgent, \"Baiduspider+(+\")) &&\n !is_string(strstr($userAgent, \"Yahoo! Slurp\")) &&\n !is_string(strstr($userAgent, \"Googlebot\"))\n ) {\n // log the message to storage\n $this->storage->writeLog($context, $msg);\n }\n }", "title": "" }, { "docid": "1586dccf494c0050d3814ff596ba2442", "score": "0.5288559", "text": "function log($level, $message = true)\n {\n $GLOBALS['fakelog']->_log[] = array($level, $message);\n }", "title": "" }, { "docid": "9a6b663aad84d0a1a7fb39dcc6172f87", "score": "0.5287316", "text": "public function log( $msg ){\n\t\tif ( $this->logger ) $this->logger->log ( $msg , Zend_Log::DEBUG );\n\t}", "title": "" }, { "docid": "519463e903518cf06558747b29e879fb", "score": "0.5275649", "text": "public static function _log($partner, $request, $msg) {\n global $LAS_CFG;\n\n if (\n !isset($LAS_CFG) || !isset($LAS_CFG->enable_log) ||\n $LAS_CFG->enable_log\n ) {\n $strLog = '[' . Log::LOG_TAG . ']'\n . '[' . $partner . ']'\n . '[' . $request . ']'\n . '[' . $msg . ']';\n\n error_log($strLog);\n }\n }", "title": "" }, { "docid": "11ad09ffe0aabbdf7353a19da44df036", "score": "0.52574515", "text": "public function testSetsLogger() {\n $logger = new MyLogger();\n Slim_Log::setLogger($logger);\n $this->assertSame($logger, Slim_Log::getLogger());\n }", "title": "" }, { "docid": "90ac5d995afed90fc1e76e4f4dad1c9f", "score": "0.52515656", "text": "function wh_log(string $msg){ global $log; $log->warning($msg); }", "title": "" }, { "docid": "77b9ac48aac5491093707f2102b934c1", "score": "0.5251221", "text": "public function log($loginfo, $name = null, $type = null) {\n if (class_exists('DefineSystem\\Log')) {\n Log::logging($loginfo, $name, $type);\n }\n }", "title": "" }, { "docid": "620cc3234f522c5974cefed0c55f0cc2", "score": "0.52402234", "text": "protected function _log($msg){\n echo $msg;\n }", "title": "" }, { "docid": "861c22926939ef186bbcdac1146aa7ae", "score": "0.52313733", "text": "function log()\r\n {\r\n }", "title": "" }, { "docid": "c9e2eee7a7480489a4367930e53254ac", "score": "0.5218557", "text": "public function logger(array $log)\n {\n $logMethod = '';\n $logText = '';\n $logType = '';\n $logClass = $this->logger_class_name;\n\n if (isset($log[0])) {\n $logMethod = $log[0];\n }\n if (isset($log[1])) {\n $logText = $log[1];\n }\n if (isset($log[2])) {\n $logType = $log[2];\n }\n\n if (\n $logClass\n &&\n class_exists($logClass)\n &&\n method_exists($logClass, $logMethod)\n ) {\n return $logClass::$logMethod($logText, $logType);\n }\n\n return false;\n }", "title": "" }, { "docid": "da940d949a680bb6e90bda3d42939fa8", "score": "0.52141315", "text": "function logger($name, $msg='', $type='default') {\n\tglobal $config;\n if ($type == 'default') {\n $type = $config['debug_type'];\n }\n if(is_array($msg)) {\n ob_start();\n //var_dump($msg);\n print_r($msg);\n $msg = \"\\n\" . ob_get_contents();\n ob_end_clean();\n }\n error_log(getHostName() . \": $name: $msg\", 0);\n if ($type == 'now' && headers_sent() ) {\n echo \"<small><pre> Debug: $name: $msg </pre></small><br>\\n\";\n } \n}", "title": "" }, { "docid": "4f51b134a6611484f8570460d8347e92", "score": "0.52027893", "text": "private function _log( $message, $send_logs = false ) {\n\n\t\t$prefix = '(WPostIdSetter plugin | ' . get_site_url() . ') => ';\n\t\t$message = $prefix . $message;\n\n\t\t// This ensures the development team does not get crowded with debugging e-mails. Hook to the wpostidsetter_mail_logs filter to force all logs to be sent to the dev team.\n\t\t$send_logs = $send_logs ? apply_filters( 'wpmodal_mail_logs', false ) : false;\n\n\t\t// First log to local error log.\n\t\terror_log( $message, 0 );\n\t\tif ( $send_logs ) {\n\t\t\t// If settings says that and email should be sent to the development team, so be it.\n\t\t\terror_log( $message, 1, $this -> logs_address );\n\t\t}\n\n\t\treturn $send_logs; // Return the option, might be useful...\n\t}", "title": "" }, { "docid": "204cabea1d5a0fc09884d69b473ebd37", "score": "0.51994973", "text": "public function log($message)\n {\n Mage::log($message, null, 'upg_magento.log', true);\n }", "title": "" }, { "docid": "5921bb94cb91cd3fa1f78a2365d7160b", "score": "0.51907176", "text": "public function logMessage($messages, string $level = 'info');", "title": "" }, { "docid": "c90b961dc119753693678f26995039f5", "score": "0.51865953", "text": "abstract public function log($level, $message, $context = array(), $priority = null);", "title": "" }, { "docid": "1763b885a61bf67e51b08f59ed33d48e", "score": "0.518211", "text": "function logger($message = null, array $context = [])\n {\n if (is_null($message)) {\n return app('log');\n }\n\n return app('log')->debug($message, $context);\n }", "title": "" }, { "docid": "6d79e5765e1a8c0cfc4517154266803f", "score": "0.517172", "text": "public function write_log($msg = '')\n\t{\n\t\t$ci = &get_instance();\n\n\t\t$level_api = $ci->settings_lib->item('api.log_level');\n\n\t\tif ($level_api == 0)\n\t\t\treturn false;\n\n\t\tif (!is_dir($this->_log_path))\n\t\t\treturn false;\n\n\t\tif (!is_dir($this->_log_path . $this->_sub_path))\n\t\t\tif (!mkdir($this->_log_path . $this->_sub_path, 0777, true))\n\t\t\t\treturn false;\n\n\t\t$message = date($this->_date_fmt) . \" --> \" . 'REQUEST URI: ' . $_SERVER['REQUEST_URI'] . \"\\r\\n\\r\\n\";\n\t\t$message .= 'FROM IP: ' . $_SERVER['REMOTE_ADDR'] . \"\\r\\n\\r\\n\";\n\t\t$message .= 'REQUEST METHOD: ' . $_SERVER['REQUEST_METHOD'] . \"\\r\\n\\r\\n\";\n\t\t$message .= 'POST DATA: ' . var_export($_POST, 1) . \"\\r\\n\\r\\n\";\n\t\tif (! empty($_FILES)) $message .= 'FILES DATA: ' . var_export($_FILES, 1) . \"\\r\\n\\r\\n\";\n\n\t\tif ($level_api == 2)\n\t\t\t$message .= 'RETURN DATA: ' . $ci->output->get_output() . \"\\r\\n\";\n\n\t\t$message .= empty($msg) ? '' : \"\\r\\n\" . $msg . \"\\r\\n\";\n\t\t$message .= '-----------------------------------------------------------------------------------------------------------------------' . \"\\r\\n\";\n\n\t\tif ($this->_enabled === false)\n\t\t\treturn false;\n\n\t\t$filepath = $this->_log_path . $this->_sub_path . $this->_log_prefix . date('Y-m-d') . '.log';\n\n\t\tif (!$fp = @fopen($filepath, FOPEN_WRITE_CREATE)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tflock($fp, LOCK_EX);\n\t\tfwrite($fp, $message);\n\t\tflock($fp, LOCK_UN);\n\t\tfclose($fp);\n\t\t@chmod($filepath, FILE_WRITE_MODE);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "346367107e64e06a1035aaebfafd7638", "score": "0.51696604", "text": "public function __invoke($logger)\n {\n $formatter = new LineFormatter();\n\n $formatter->includeStacktraces(false);\n $formatter->allowInlineLineBreaks(true); // Should call after includeStacktraces\n $formatter->setJsonPrettyPrint(true);\n\n foreach ($logger->getHandlers() as $handler) {\n $handler->setFormatter($formatter);\n }\n }", "title": "" }, { "docid": "1d1c5ab701d499441555c37a6ddc8237", "score": "0.51692545", "text": "private function logRequest()\n {\n if (env('APP_DEBUG') && config('bot.debug_log', false)) {\n \\Log::debug('Update', request()->all());\n }\n }", "title": "" }, { "docid": "e2e877a685f880385114d6e5a04b5de0", "score": "0.51682496", "text": "private static function _Log() {\n\t\t\t$args = func_get_args();\n\t\t\t$args[0] = '[' . date('Y-m-d H:i:s') . '] ' . $args[0];\n\n\t\t\t// Call the logger\n\t\t\tcall_user_func_array(array(self::$logger, 'Log'), $args);\n\n\t\t}", "title": "" }, { "docid": "8e74c6e62e1cdee4afb67cb95cc82846", "score": "0.51649094", "text": "public function log()\n {\n $collectionMock = $this->getMongoCollectionMockWithAsserts(\n LogLevel::WARNING,\n 'this is a test',\n ['some' => ['nested' => ['data']]],\n null\n );\n (new MongoLogger($collectionMock))->log(\n LogLevel::WARNING,\n 'this is a test',\n ['some' => ['nested' => ['data']]]\n );\n }", "title": "" }, { "docid": "fccb5307010c9122adb5833dc1ff6555", "score": "0.5162542", "text": "private function log($m)\n\t{\n\t\tPiwik::log($m);\n\t}", "title": "" }, { "docid": "785e5b668eb1dfbd076823d565371d28", "score": "0.51593727", "text": "public function log(){\n\t\t$this->iLog(func_get_args(),__FUNCTION__);\n\t}", "title": "" }, { "docid": "aeb4b4a8e5ce563ae59beec52115a8aa", "score": "0.514578", "text": "protected function log($request, $response)\n\t{\n\t\tLog::info('URL: ' . $request->fullUrl());\n\t\tLog::info('Post Data: ' . json_encode($request->all()));\n\t\tLog::info('Response: ' . json_encode($response));\n\t\tLog::info('===========================');\n\t\t//Log::info('Method: ' . $request->getMethod());\n\t\t//Log::info('IP Address: ' . $request->getClientIp());\n\t\t//Log::info('Status Code: ' . $response->getStatusCode());\n\t}", "title": "" }, { "docid": "6fd2e3004a5bc5ae9427904a4b24685f", "score": "0.5144766", "text": "protected function disableLogger(): bool\n {\n return true;\n }", "title": "" }, { "docid": "fb6d930192b586441f755bc9c64927e1", "score": "0.5143209", "text": "function applyLogging(Loggable $loggable);", "title": "" }, { "docid": "af223627fc7f62aaaa15f55a7e31ab88", "score": "0.5142795", "text": "public function log (): LogInterface;", "title": "" }, { "docid": "810c02e03f466c64ae9b03bf5b020354", "score": "0.51351386", "text": "private function setLogger($logger) {\n $this->logger = $logger;\n }", "title": "" }, { "docid": "eaf08e56823a3cebb5b9ab3db40099b7", "score": "0.51318765", "text": "public static function logUserAction($message);", "title": "" }, { "docid": "983283f7e889fb50cceceae9979eb1f8", "score": "0.51312375", "text": "public function getMonolog()\n {\n //\n }", "title": "" }, { "docid": "38ada116764081c4768b3d14e1a6ba2b", "score": "0.5129497", "text": "public function log($message)\n {\n if (isset($this->logger)) {\n $this->logger->notice($message);\n }\n }", "title": "" }, { "docid": "d8e200ea8202242cdeb662cb2217f9ec", "score": "0.511527", "text": "function firelog($str, $priority=Zend_Log::INFO) {\n $logger = Zend_Registry::get('logger');\n $response = Zend_Registry::get('response');\n $channel = Zend_Registry::get('channel');\n\n // Start output buffering\n ob_start();\n\n // Now you can make calls to the logger\n\n $logger->log($str,$priority);\n\n // Flush log data to browser\n $channel->flush();\n $response->sendHeaders();\n}", "title": "" }, { "docid": "4bac957adf49b40a0b9cd5675ad72df4", "score": "0.5114108", "text": "protected function log($message, $level = 6){\n\t\tif (Mage::getStoreConfig('tcimport_database/tcimport_import_group/logs') == '0')\n\t\t\treturn false;\n\n\t\t$this->getLoger()->log($message, $level);\n\t}", "title": "" }, { "docid": "001f86debf7e741996aadc75971853df", "score": "0.51114464", "text": "public function setLogger(LoggerInterface $logger);", "title": "" }, { "docid": "001f86debf7e741996aadc75971853df", "score": "0.51114464", "text": "public function setLogger(LoggerInterface $logger);", "title": "" }, { "docid": "245b75b8ca20550f5128e5073f793514", "score": "0.510423", "text": "private function log($level, $message, $context = []){\n if ($this->logger instanceof LoggerInterface){\n $this->logger->log($level, $message, $context);\n }\n }", "title": "" }, { "docid": "d79c7bcc4b95a84439487723670f141e", "score": "0.5101792", "text": "public function __invoke($logger)\n {\n $extras = array_filter([\n 'personnel' => \\Config::get('error-handler.logger.slack.mentions'),\n 'env' => Str::upper(\\Config::get('app.env')),\n 'site' => \\Config::get('app.url'),\n 'url' => Request::fullUrl(),\n 'method' => Request::method(),\n 'parameters' => json_encode(Request::all())\n ]);\n\n foreach ($logger->getHandlers() as $handler) {\n if ($handler instanceof SlackWebhookHandler) {\n $handler->pushProcessor(function ($record) use ($extras){\n\n foreach($extras as $key => $value){\n $record['extra'][$key] = $value;\n }\n\n return $record;\n });\n }\n }\n }", "title": "" }, { "docid": "7a34ce57e104ce404bc691cac4d1620d", "score": "0.50997996", "text": "protected function log($messages, $level){\r\n\t\treturn null;\r\n\t}", "title": "" }, { "docid": "eaee943bc0f966e50dda685da59fe69c", "score": "0.50887", "text": "public function log($msg,$level=null,$category=null,$data=null) {\n\n //if passed a level and we're below the configured logger level, don't do anything\n //if ($level && $level<LOGGER_LEVEL) return false;\n\n //store it in our array for access\n if (defined(\"USER_ID\")) $this->logData[\"user_id\"] = USER_ID;\n if (defined(\"USER_LOGIN\")) $this->logData[\"user_login\"] = USER_LOGIN;\n if (defined(\"CUR_CHILD\")) $this->logData[\"child_location_id\"] = CUR_CHILD;\n $this->logData[\"log_timestamp\"] = date(\"Y-m-d H:i:s\");\n $this->logData[\"ip_address\"] = $_SERVER['REMOTE_ADDR']; \n $this->logData[\"message\"] = $msg;\n if ($level) $this->logData[\"level\"] = $level;\n if ($category) $this->logData[\"category\"] = $category;\n\n if ($data) {\n $this->logData[\"post_data\"] = $this->dataToXML($_POST);\n $this->logData[\"get_data\"] = $this->dataToXML($_GET);\n } \n\n //log the error to the file\n $this->logMsg();\n\n }", "title": "" }, { "docid": "9cedf4388b903fa37bc16498c2b760f6", "score": "0.5080285", "text": "static function _log_request($market, $account, $api, $request){\n if(!self::$_logging) return true;\n $log_position = ROOT.\"/log/api.log\";\n $id = 0;\n // Log request parameters and fetch log id\n\n return $id;\n }", "title": "" }, { "docid": "a856884b1ec9ad7c67facd948510aaf8", "score": "0.50769484", "text": "public function log($message) {\n $this->addOutput($message, Output::LEVEL_LOG);\n }", "title": "" }, { "docid": "915b97b027deb54d2fd66a76a332c7a5", "score": "0.5073866", "text": "public function log($level, $message) \n {\n $config = Mage::helper(\"klevu_search/config\");\n\n if ($level <= $config->getLogLevel()) {\n Mage::log($message, $level, static::LOG_FILE, $config->isLoggingForced());\n }\n }", "title": "" }, { "docid": "e95e9dabdcdc31293a76b081a564131d", "score": "0.50669956", "text": "protected function log($level, $message)\n {\n if (null !== $this->logger) {\n $this->logger->log($level, $message);\n }\n }", "title": "" }, { "docid": "5d81ea2419f4f93efa41cefbceca6b1a", "score": "0.5065241", "text": "public function logRequest()\n {\n if (\\strpos($this->debug->getInterface(), 'http') !== 0) {\n return;\n }\n $this->debug->alert(\n '%c%s%c %s',\n 'font-weight:bold;',\n $this->debug->request->getMethod(),\n '',\n $this->debug->request->getRequestTarget(),\n $this->debug->meta('level', 'info')\n );\n $this->logRequestHeaders();\n if ($this->debug->getCfg('logRequestInfo.cookies', Debug::CONFIG_DEBUG)) {\n $cookieVals = $this->debug->request->getCookieParams();\n \\ksort($cookieVals, SORT_NATURAL);\n if ($cookieVals) {\n $this->debug->table('$_COOKIE', $cookieVals, $this->debug->meta('redact'));\n }\n }\n $this->logPost();\n $this->logFiles();\n }", "title": "" }, { "docid": "e5aaf75b382dd62ccce774e18eeaf7b4", "score": "0.50531983", "text": "public function testLog(): void\n {\n $throwable = new Exception('Fancy exception message!', 123);\n\n $logger = $this->createMock(LoggerInterface::class);\n $logger\n ->expects($this->once())\n ->method('log')\n ->with(\n 'Fancy exception message!',\n $this->isInstanceOf(ErrorPriority::class)\n );\n\n $request = $this->createMock(RequestInterface::class);\n\n $chain = $this->createMock(MiddlewareChainInterface::class);\n $chain\n ->expects($this->once())\n ->method('proceed')\n ->with($request)\n ->willThrowException($throwable);\n\n /**\n * @var LoggerInterface $logger\n * @var MiddlewareChainInterface $chain\n * @var RequestInterface $request\n */\n $middleware = new LoggerMiddleware($logger);\n\n try {\n $middleware->process($request, $chain);\n } catch (Throwable $exception) {\n $this->assertSame($throwable, $exception);\n }\n }", "title": "" }, { "docid": "bf47f5644c3260b69c07e975fec0958a", "score": "0.50508463", "text": "abstract public function log_action();", "title": "" }, { "docid": "f6eae58e0a41f764d56f5231a91c1024", "score": "0.50387067", "text": "public function log($id, $message, $level = null)\n {\n $errorMessage = sprintf(\"(ID: %s) - %s \", $id, $message);\n Mage::log($errorMessage, $level, Reign_Bambora_Helper_BamboraConstant::LOGFILE);\n }", "title": "" }, { "docid": "ed058256401569cb88d717806053c359", "score": "0.501717", "text": "public function logMessage($message)\n {\n Mage::log($message, null, 'wallmob.log', $this->_getIsDebugMode());\n }", "title": "" } ]
e8f4fd98a71eba23a47660176583cf7b
Generate the Address of the provided Public key
[ { "docid": "98177a6bc7b68f6179d03b5583436faa", "score": "0.6227406", "text": "public static function publicKeyToAddress(string $publicKey)\n {\n if (Utils::isHex($publicKey) === false) {\n throw new InvalidArgumentException('Invalid public key format.');\n }\n $publicKey = Utils::stripZero($publicKey);\n if (strlen($publicKey) !== 130) {\n throw new InvalidArgumentException('Invalid public key length.');\n }\n return '0x' . substr(self::sha3(substr(hex2bin($publicKey), 1)), 24);\n }", "title": "" } ]
[ { "docid": "53e60a8b6c6a6c1caac90d6a31218cf5", "score": "0.7314936", "text": "public function address($pubKeyHex = null) {\r\n\t\tif ( $pubKeyHex === null ) {\r\n\t\t\tif ( !$this->privateKey ) throw new \\Exception(csbitForward_error_Key);\r\n\t\t\t$pubkey = $this->privateKey->getPublic(true);\r\n\t\t\t$pubKeyHex = $pubkey->encode(\"hex\", true);\r\n\t\t}\r\n\t\t$pubhash = $this->hash160(hex2bin($pubKeyHex));//*$pubenc*/);\r\n\t\t//$pubkey = $this->privateKey->getPublic(true);\r\n\t\t//$pubenc = hex2bin($pubkey->encode(\"hex\", true));\r\n\t\t//echo \"public : \".$this->b58->encode(\"\\x00\".$pubhash.$this->checkSum(\"\\x00\".$pubhash)).\"\\n\";\r\n\r\n\t\t$script = \"\\x00\".\"\\x14\".$pubhash;\r\n\t\t$scriptHash = $this->hash160($script);\r\n\t\t$checksum = $this->checkSum($this->ap.$scriptHash);\r\n\t\t//$address = $this->b58->encode(\"\\x4B\".$scripHash.$checksum);\r\n\t\t$address = $this->b58->encode($this->ap.$scriptHash.$checksum);\r\n\t\t//echo \"address : {$address}\\n\";\r\n\t\treturn $address;\r\n\t}", "title": "" }, { "docid": "554e519437b8e8399cc4f8968efabcbf", "score": "0.68429375", "text": "public function pubKeyToAddress($pubkey)\n {\n try {\n $address = \"0x\" . substr(Keccak::hash(substr(hex2bin($pubkey->encode(\"hex\")), 1), 256), 24);\n } catch (\\Exception $e) {\n $this->handleError(\n $e->getMessage(),\n 'address_extraction_failure'\n );\n }\n\n return $address;\n }", "title": "" }, { "docid": "1c0a919128f6b620df9bf4574f7d7819", "score": "0.64711267", "text": "function generate()\n {\n $privateKey = openssl_pkey_new(array(\n \"digest_alg\" => \"sha512\",\n 'private_key_bits' => 2048, // Size of Key.\n 'private_key_type' => OPENSSL_KEYTYPE_RSA,\n ));\n openssl_pkey_export_to_file($privateKey, 'codigniter_private.key');\n\n $a_key = openssl_pkey_get_details($privateKey);\n file_put_contents('codigniter_public.pem', $a_key['key']);\n\n openssl_free_key($privateKey);\n\n\n }", "title": "" }, { "docid": "dbc8566e546567492f2f7b00f7921cdb", "score": "0.634242", "text": "public function getPublicKey();", "title": "" }, { "docid": "dbc8566e546567492f2f7b00f7921cdb", "score": "0.634242", "text": "public function getPublicKey();", "title": "" }, { "docid": "1490b9f22c64251d9415c8683f44b37d", "score": "0.625431", "text": "function generate_private($public=\"\") {\n if ($public==\"\")\n $public=$this->public_key;\n return substr(md5($this->key.$public),16-$this->long/2,$this->long);\n }", "title": "" }, { "docid": "4a907644292a62a17e61259989815114", "score": "0.6209914", "text": "public function testGetAddressFromPublicKey()\n {\n $this->assertEquals(\n self::VALID_ADDRESS,\n MinterWallet::getAddressFromPublicKey(self::VALID_PUBLIC_KEY)\n );\n }", "title": "" }, { "docid": "3b36d942f07e07aa14ce7367cb451bfb", "score": "0.62021875", "text": "public static function public2account(string $public_key): string\n {\n if (strlen($public_key) != 64 || !hex2bin($public_key)) {\n throw new BananoToolException(\"Invalid public key: $public_key\");\n }\n\n if (!extension_loaded('blake2')) {\n $key = \\MikeRow\\BananoPHP\\Util\\Uint::fromHex($public_key);\n $checksum;\n $hash = new SplFixedArray(64);\n \n $b2b = new Blake2b();\n $ctx = $b2b->init(null, 5);\n $b2b->update($ctx, $key->toUint8(), 32);\n $b2b->finish($ctx, $hash);\n $hash = \\MikeRow\\BananoPHP\\Util\\Uint::fromUint8Array(array_slice($hash->toArray(), 0, 5))->reverse();\n $checksum = $hash->toString();\n } else {\n $key = \\MikeRow\\BananoPHP\\Util\\Uint::fromHex($public_key)->toUint8();\n $key = \\MikeRow\\BananoPHP\\Util\\Bin::arr2bin((array) $key);\n \n $hash = blake2($key, 5, null, true);\n $hash = \\MikeRow\\BananoPHP\\Util\\Bin::bin2arr(strrev($hash));\n $checksum = \\MikeRow\\BananoPHP\\Util\\Uint::fromUint8Array($hash)->toString();\n }\n \n $c_account = \\MikeRow\\BananoPHP\\Util\\Uint::fromHex('0' . $public_key)->toString();\n \n return 'ban_' . $c_account . $checksum;\n }", "title": "" }, { "docid": "66a3eb5d0f24175f70cb4017e44de958", "score": "0.6167906", "text": "private static function getPublicKey($generateNew = false)\n {\n if (self::$PublicKey == null or $generateNew)\n self::$PublicKey = sha1(rand() . time());\n return self::$PublicKey;\n }", "title": "" }, { "docid": "a686c50819edcdc5e0bfb6d75459e928", "score": "0.6044239", "text": "public function getPubkey(): string\n {\n return $this->pubkey;\n }", "title": "" }, { "docid": "5c0de37b7a3ed5219f850b362492ca41", "score": "0.60020083", "text": "public static function createPaymentAddress() {\n $url = self::$username.':'.self::$password.'@'.self::$address.':'.self::$port.'/';\n self::$rpcClient = new jsonRPCClient($url, self::$debug);\n \n self::$emercoin_info = self::$rpcClient->getinfo();\n \n if(!is_callable(self::$get_order_id)) {\n throw new Exception('Property self::$get_order_id must be callable');\n }\n $account = self::$account_prefix.'_'.call_user_func(self::$get_order_id);\n return self::$rpcClient->getaccountaddress($account);\n }", "title": "" }, { "docid": "6745a14ec2078968f01e2426d5a977dd", "score": "0.59953165", "text": "abstract public function generateKey():string;", "title": "" }, { "docid": "b2d2386c68638ba56fe13b7ca5f0ebab", "score": "0.5961484", "text": "private function buildPublicId(): string\n {\n return sprintf(\"%s%s\", $this->prefix, $this->publicId);\n }", "title": "" }, { "docid": "e4d1f64fe4b0fc3968837c35c1752eb9", "score": "0.59376603", "text": "private function generatePublicId(): string\n {\n return (string) mt_rand(10000000, 99999999);\n }", "title": "" }, { "docid": "dfcfc826198d5f04854fbea5e5c7d8a3", "score": "0.59330773", "text": "public function generateLicenseKey() {\n return sprintf( '%04x%04x',mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )); \n }", "title": "" }, { "docid": "8a9a0a649259e15f116e1135a917e7d2", "score": "0.5910018", "text": "public function getPublicKey() {\n return PublicKey::fromString($this->export());\n }", "title": "" }, { "docid": "41b53234eb503d0791ed7d183b2efefe", "score": "0.59084123", "text": "public function exportPublicKey()\n {\n if( !$this->_keypair )\n throw new OSS_Crypt_Exception( 'To export public key, you need to generate key pair first.' );\n \n return openssl_pkey_get_details( $this->_keypair )[ 'key' ];\n }", "title": "" }, { "docid": "afcc76a1ba430d3bbec1b2327ea39ef2", "score": "0.5905031", "text": "public function getPublicKey(): string\n {\n return $this->publicKey;\n }", "title": "" }, { "docid": "25153e075910506e600139584621ec48", "score": "0.58859354", "text": "function generate_license_key() {\n\n\t\t\treturn sprintf(\n\t\t\t\t\t\t\t'%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n\t\t\t\t\t\t\tmt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),\n\t\t\t\t\t\t\tmt_rand( 0, 0x0fff ) | 0x4000,\n\t\t\t\t\t\t\tmt_rand( 0, 0x3fff ) | 0x8000,\n\t\t\t\t\t\t\tmt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )\n\t\t\t);\n\n\t\t}", "title": "" }, { "docid": "015c7cba203f68f8b4959b2b5c892c59", "score": "0.58828944", "text": "public static function generateKey()\n {\n $config = array(\n \"digest_alg\" => \"sha512\",\n \"private_key_bits\" => 4096,\n \"private_key_type\" => OPENSSL_KEYTYPE_RSA,\n );\n\n //Create a private key\n $res = openssl_pkey_new($config);\n\n //Extract the private part of the key\n openssl_pkey_export($res, $private_key);\n\n //Shorten it up for use in an API\n return md5($private_key);\n }", "title": "" }, { "docid": "e71f984bda576e00d0ddcf48a468f244", "score": "0.5811353", "text": "public static function generateKey(){\n\t\t$ip=$_SERVER['REMOTE_ADDR'];\n\t\t$digitz=explode('.',$ip);\n\t\t$s='';\n\t\tforeach($digitz as $i=>$dig){\n\t\t\t$s.=MathXtra::toBase(intval($dig),32,2);\n\t\t}\n\t\treturn MathXtra::toBase(time(),32,7).$s;\n\t}", "title": "" }, { "docid": "ae92e2010091f76e32eaf468c20ca812", "score": "0.57841575", "text": "public function getPublicKey()\n {\n return $this->publicKey;\n }", "title": "" }, { "docid": "378c395c9302948a4f8ed0f7756aaaad", "score": "0.5697947", "text": "protected function regeneratePublicKey()\n {\n $key = tempnam(storage_path('app/'), 'sshkey');\n file_put_contents($key, $this->private_key);\n\n $process = new Process('tools.RegeneratePublicSSHKey', [\n 'key_file' => $key,\n ]);\n $process->run();\n\n if (!$process->isSuccessful()) {\n throw new \\RuntimeException($process->getErrorOutput());\n }\n\n $this->attributes['public_key'] = file_get_contents($key . '.pub');\n\n unlink($key);\n unlink($key . '.pub');\n }", "title": "" }, { "docid": "1ace121bd32c0cdddeb02cf7763e17da", "score": "0.5673603", "text": "public function newPublicId(): string\n {\n do {\n $newPublicId = $this->generatePublicId();\n } while (!$this->publicIdIsUnique($newPublicId));\n\n return $newPublicId;\n }", "title": "" }, { "docid": "7708b501f97d112deff2b522d7c6651d", "score": "0.5661806", "text": "function generateUniqueWalletAddress($id = \"\") {\n //$id = 2 meaning withdrawal wallet\n\n $bc = getBlockchain($id);\n $wallet_address = $bc->Wallet->getNewAddress();\n \n if ($wallet_address)\n return $wallet_address->address;\n \n return null;\n}", "title": "" }, { "docid": "c9bd080037b3bc828501f8380a81a929", "score": "0.56480104", "text": "public static function generateKey(): string\n {\n return (string) self::$prefix . \\bin2hex(\\random_bytes(10));\n }", "title": "" }, { "docid": "5b19c2a7fef4539be575c48a97ba89ad", "score": "0.5644742", "text": "public function generateKey()\n {\n\n $random = new \\Phalcon\\Security\\Random();\n\n $public = $random->base64(16);\n $private = $random->base64(25);\n\n $key = new ApiKeys();\n $key->users_id = $this->id;\n $key->company_id = $this->companies[0]->getId();\n $key->site = $this->companies[0]->name;\n $key->public = $public;\n $key->private = $private;\n $key->added_date = date('Y-m-d H:i:s');\n $key->updated_date = date('Y-m-d H:i:s');\n\n if (!$key->save()) {\n throw new Exception(current($key->getMessages()));\n }\n }", "title": "" }, { "docid": "993fc0c691bde75eee791b371ab0c562", "score": "0.56347084", "text": "function generateDepositAddress($account) {\n $this->checkRequired($account,'You must specify an Account ID');\n\n $result = $this->query( $this->pair . '/money/bitcoin/get_address', array(\n 'account' => $account\n ));\n\n return $result;\n }", "title": "" }, { "docid": "0821306089239f831c5238e730c97e83", "score": "0.56084037", "text": "function GenerateKey()\n\t{\n\t\t// create a hash using a unique id based on the servers system time and the sha1 hashing algorithm\n\t\t$hash = strtoupper(hash(\"sha1\", uniqid()));\n\t\t// extract the desired number of digits out of the hash to generate the key\n\t\treturn substr($hash, 0, 4) . \"-\" . substr($hash, 4, 4) . \"-\" . substr($hash, 8, 4) . \"-\" . substr($hash, 12, 4);\n\t\t//return substr($hash, 0, 2) . \"-\" . substr($hash, 2, 2) . \"-\" . substr($hash, 4, 2) . \"-\" . substr($hash, 6, 2);\n\t}", "title": "" }, { "docid": "fd717d82baf05bc89ac2de9cbe569030", "score": "0.55938864", "text": "public function getPublickey(){\n $config = Mage::getStoreConfig('payment/mercadopago/config_public_key');\n return $config;\n }", "title": "" }, { "docid": "52f2e2dfbc6245174af6130f51efb7d9", "score": "0.55661035", "text": "public static function private2public(string $private_key): string\n {\n if (strlen($private_key) != 64 || !hex2bin($private_key)) {\n throw new BananoToolException(\"Invalid private key: $private_key\");\n }\n \n $salt = NanoSalt::instance();\n $private_key = \\MikeRow\\BananoPHP\\Util\\Uint::fromHex($private_key)->toUint8();\n $public_key = $salt::crypto_sign_public_from_secret_key($private_key);\n \n return \\MikeRow\\BananoPHP\\Util\\Uint::fromUint8Array($public_key)->toHexString();\n }", "title": "" }, { "docid": "819417d644221c2360a14669beffb832", "score": "0.5545937", "text": "function openssl_pkey_get_public($certificate)\n{\n}", "title": "" }, { "docid": "4810ce4dca2ac662091ffe2cbe4d8518", "score": "0.5533395", "text": "public function getPublicKey(): PublicKey\n\t{\n\t\treturn new PublicKey( $this );\n\t}", "title": "" }, { "docid": "45a97dcf2277791aadf5456fcecced07", "score": "0.5529492", "text": "public function getPublicKey()\n {\n return $this->public_key;\n }", "title": "" }, { "docid": "b3cb6496555e1a31a7339ed7ba4dcdc4", "score": "0.5517365", "text": "private function generateActivationKey() {\n\t\treturn md5 ( uniqid ( rand (), true ) );\n\t}", "title": "" }, { "docid": "5bd0f6510b02e18e98b9df07aecefec6", "score": "0.5507179", "text": "public function getPubKey()\n {\n return $this->pub_key;\n }", "title": "" }, { "docid": "5bd0f6510b02e18e98b9df07aecefec6", "score": "0.5507179", "text": "public function getPubKey()\n {\n return $this->pub_key;\n }", "title": "" }, { "docid": "3fc1447b3bcc2ce065e73f6e9620827c", "score": "0.5507085", "text": "public function getPubKey()\n {\n $pubKey = $this->getPubKeyPoints();\n\n if(gmp_strval(gmp_mod(gmp_init($pubKey['y'], 16), gmp_init(2, 10))) == 0)\n $pubKey \t= '02' . $pubKey['x'];\t//if $pubKey['y'] is even\n else\n $pubKey \t= '03' . $pubKey['x'];\t//if $pubKey['y'] is odd\n\n return $pubKey;\n }", "title": "" }, { "docid": "de1f7550c37aa0d658ed8e01ca964df1", "score": "0.5495617", "text": "public function generate_key($params=array(), $options=array()){\n if (!isset($params['account_id'])){\n $params['account_id'] = $this->user;\n } \n $options = $this->_merge($options, $params);\n return $this->_call('account/generate_api_key', $options);\n }", "title": "" }, { "docid": "34a66a1a554fdc8cd585d8ae18300a63", "score": "0.5480851", "text": "public function getPublicKey()\n {\n return Arr::get($this->keys, 'public');\n }", "title": "" }, { "docid": "e1ed18160c0fed04912ddfac3797c205", "score": "0.5479096", "text": "private function setupPubKey()\n {\n if (is_resource($this->_pubKey)) {\n return true;\n }\n $pem = chunk_split($this->publicKey, 64, \"\\n\");\n $pem = \"-----BEGIN PUBLIC KEY-----\\n\" . $pem . \"-----END PUBLIC KEY-----\\n\";\n $this->_pubKey = openssl_pkey_get_public($pem);\n return true;\n }", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.54785895", "text": "public function getAddress();", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.54785895", "text": "public function getAddress();", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.54785895", "text": "public function getAddress();", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.54785895", "text": "public function getAddress();", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.54785895", "text": "public function getAddress();", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.54785895", "text": "public function getAddress();", "title": "" }, { "docid": "31e817b20b1fd90f3df2df2b5cb2f8b3", "score": "0.5463597", "text": "public static function publicKeyEncrypt()\n {\n\n }", "title": "" }, { "docid": "b91dd71b367dc517a97b7082792c37fe", "score": "0.545622", "text": "public function getAddressIdentifier();", "title": "" }, { "docid": "10de62000df7c1779478c1db3fa389f0", "score": "0.5452218", "text": "function generateKey(){\n return sha1(rand().time());\n}", "title": "" }, { "docid": "75b9e2f638cec97538e46a9d1d8742ec", "score": "0.54463744", "text": "public function getPublicKey()\n {\n return $this->publicKey;\n }", "title": "" }, { "docid": "75b9e2f638cec97538e46a9d1d8742ec", "score": "0.54463744", "text": "public function getPublicKey()\n {\n return $this->publicKey;\n }", "title": "" }, { "docid": "179f3a3c91c182468bef84b856d80317", "score": "0.54454404", "text": "public function generateKey()\n {\n $bit_length = 256;\n if ($this->encrypt_then_authenticate) {\n $bit_length += 256;\n }\n return \\bin2hex(Random::bytes($bit_length / 8));\n }", "title": "" }, { "docid": "15bf2d9b359f4bd067bd922618adc693", "score": "0.5422753", "text": "function GenerateKey($p){\n global $key; \n\n $key=md5($p.$_SERVER['REQUEST_URI'].$_SERVER['SERVER_NAME']);\n}", "title": "" }, { "docid": "cd919bc55db564d26eee7621c0026c2e", "score": "0.54198074", "text": "public function getPublicKey() {\n return $this->getConfig('publicKey');\n }", "title": "" }, { "docid": "f26ea6f52c97ecba75d3049e5f33d46d", "score": "0.5404713", "text": "public static function account2public(string $account, bool $get_public_key = true)\n {\n if ((strpos($account, 'ban_1') === 0 || \n strpos($account, 'ban_3') === 0) &&\n strlen($account) == 64\n ) {\n $crop = explode('_', $account);\n $crop = $crop[1];\n \n if (preg_match('/^[13456789abcdefghijkmnopqrstuwxyz]+$/', $crop)) {\n $aux = \\MikeRow\\BananoPHP\\Util\\Uint::fromString(substr($crop, 0, 52))->toUint4()->toArray();\n array_shift($aux);\n $key_uint4 = $aux;\n $hash_uint8 = \\MikeRow\\BananoPHP\\Util\\Uint::fromString(substr($crop, 52, 60))->toUint8()->toArray();\n $key_uint8 = \\MikeRow\\BananoPHP\\Util\\Uint::fromUint4Array($key_uint4)->toUint8();\n \n if (!extension_loaded('blake2')) {\n $key_hash = new SplFixedArray(64);\n $b2b = new Blake2b();\n $ctx = $b2b->init(null, 5);\n $b2b->update($ctx, $key_uint8, 32);\n $b2b->finish($ctx, $key_hash);\n $key_hash = array_reverse(array_slice($key_hash->toArray(), 0, 5));\n } else {\n $key_uint8 = \\MikeRow\\BananoPHP\\Util\\Bin::arr2bin((array) $key_uint8);\n $key_hash = blake2($key_uint8, 5, null, true);\n $key_hash = \\MikeRow\\BananoPHP\\Util\\Bin::bin2arr(strrev($key_hash));\n }\n \n if ($hash_uint8 == $key_hash) {\n if ($get_public_key) {\n return \\MikeRow\\BananoPHP\\Util\\Uint::fromUint4Array($key_uint4)->toHexString();\n } else {\n return true;\n }\n }\n }\n }\n \n return false;\n }", "title": "" }, { "docid": "b76e2c782760830e1ad1118789aec2c3", "score": "0.5396012", "text": "function openssl_get_publickey($certificate)\n{\n}", "title": "" }, { "docid": "1330396ca003ccd1f2563e74e556e8d9", "score": "0.5348284", "text": "protected function create_hash() {\n module_load_include('inc', 'onesignin_client');\n $args = array(\n $this->secret_key,\n );\n\n $extra_args = func_get_args();\n $args = array_merge($args, $extra_args);\n\n return onesignin_client_hash($args);\n }", "title": "" }, { "docid": "fdc8773f64e883a1fb798ee77f5170ab", "score": "0.5347011", "text": "function generate_key_format() {\n \n }", "title": "" }, { "docid": "d779872cb2f7d56b9d3acda3b7a7a606", "score": "0.53461856", "text": "public function getFromAddress()\r\n {\r\n $from = $this->offsetGet('from');\r\n\r\n if ($from) {\r\n return $from;\r\n }\r\n if (!isset($this->privateKey) || !($this->privateKey instanceof KeyPair)) {\r\n // recover from hash\r\n $r = $this->offsetGet('r');\r\n $s = $this->offsetGet('s');\r\n $v = $this->offsetGet('v');\r\n $chainId = $this->offsetGet('chainId');\r\n\r\n if (!$r || !$s) {\r\n throw new RuntimeException('Invalid signature r and s.');\r\n }\r\n $txHash = $this->hash(false);\r\n\r\n if ($chainId && $chainId > 0) {\r\n $v -= ($chainId * 2);\r\n }\r\n $v -= 35;\r\n $publicKey = $this->secp256k1->recoverPubKey($txHash, [\r\n 'r' => $r,\r\n 's' => $s\r\n ], $v);\r\n $publicKey = $publicKey->encode('hex');\r\n } else {\r\n $publicKey = $this->privateKey->getPublic(false, 'hex');\r\n }\r\n $from = '0x' . substr($this->util->sha3(substr(hex2bin($publicKey), 1)), 24);\r\n\r\n $this->offsetSet('from', $from);\r\n return $from;\r\n }", "title": "" }, { "docid": "ba4de0d82d8ff3641ee1f805b6220cdd", "score": "0.5345929", "text": "function generate_key($email, $name, $role)\n{\n\tif (checkEmailAvailability($email))\n\t{\n\t\t//array with alphabet + numbers\n\t\t$numbers = range(chr(48),chr(57));\n\t\t$letters = range(chr(65),chr(90));\n\t\t$characters = array_merge($numbers, $letters);\n\t\t\n\t\t$i = 0;\n\t\t$generatedkey = \"\";\n\t\t\n\t\t//Generate an random character 6 times and merge that to one variable code\n\t\twhile ($i < 6)\n\t\t{\n\t\t\t$generatedkey = $generatedkey . $characters[mt_rand(0, 35)];\n\t\t\t$i++;\n\t\t}\n\t\t\t\t\t\t\n\t\t//Make url\n\t\t$url = \"http://localhost/BW-Ventures/main/pages/createAccount.php\"; //Put the url in here \n\t\t$link = $url . \"?key=\" . $generatedkey;\n\t\t\n\t\t//Time + 31 days YYYY-MM-DD HH:MI:SS\n\t\t$activetime = date(\"Y-m-d\",strtotime(date(\"Y-m-d\").\" +31 days\"));\n\t\t\n\t\t//Insert the code in the db\n\t\tif (createCode($email, $name, $generatedkey, $activetime, $role))\n\t\t{\t\n\t\t\treturn true;\n\t\t}\n\t}\n\telse\n\t{\n\t\techo \"Email is not available!\";\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "6f8e535a014bb94ec423800889cc70b3", "score": "0.5344563", "text": "public function generateKeyPair($name, $email, $passphrase);", "title": "" }, { "docid": "ccf37d26c7fe4a81339785ad9255070a", "score": "0.5343047", "text": "public function address() { }", "title": "" }, { "docid": "e7e754532773ffec3f5621ff1ad6f05c", "score": "0.5334344", "text": "public function getBillingAddressId();", "title": "" }, { "docid": "4671b802d668cd5c313a0fcd655d3c6d", "score": "0.53301126", "text": "protected function generateKey($key)\n {\n return sprintf('%s.%s', self::SERVICE_BAG_BASE_KEY, $key);\n }", "title": "" }, { "docid": "28cfec9394f829bf95b6e88fd2543530", "score": "0.5322533", "text": "public function publicKey(): string\n {\n return $this->publicKey;\n }", "title": "" }, { "docid": "bf9d65c41b5343332c45348095004245", "score": "0.53195757", "text": "public function generate_key(){\n\t\t$key = $this->generateRandomString(12);\n\t\t$query = $this->link->query(\"SELECT * FROM `auth` WHERE `key` = '$key'\");\n\t\t//Check if key exist in database\n\t\tif($query->rowCount() == 0){\n\t\t\treturn $key;\n\t\t}else{\n\t\t\t$this->generate_key();\n\t\t}\n\t}", "title": "" }, { "docid": "1747b1d19a987a80974920b1a6cc4c3b", "score": "0.5305372", "text": "public function genpkeyGenerateKey($algorithm) {\n\t\t\n\t\t$url = $this->hsmAddress . \"/genpkey\";\n\t\t \n\t\t//The JSON data.\n\t\t$jsonData = array(\n\t\t\t'algorithm' => $algorithm\n\t\t);\n\t\t\n\t\t$result = $this->send($url, $jsonData);\n\n\t\tif(!array_key_exists(\"privateKey\", $result)) throw new WebSSLException('Missing Key in JSON Response.');\n\t\tif(!array_key_exists(\"publicKey\", $result)) throw new WebSSLException('Missing Key in JSON Response.');\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "9fcdf215db2232928d0014ab14a1b028", "score": "0.5302365", "text": "function generate_key() {\n\t\t$key = strtolower( wp_generate_password( 32, false ) );\n\n\t\treturn $key;\n\t}", "title": "" }, { "docid": "82db949f5b1fcf202894d15c489be154", "score": "0.52945685", "text": "function new_private_id()\n\t{\n\t\t# and number 0 to avoid confusion.\n\t\t$characters =\tarray('A','B','C','D','E','F','G','H','J','K','M','N','P','Q','R','S','T','U','V',\n\t\t\t\t\t\t 'W','X','Y','Z','2','3','4','5','6','7','8','9');\n\t\t\n\t\t$priv_id = \"\";\n\t\tfor($i = 0; $i < 9; $i++)\n\t\t{\n\t\t\t$priv_id .= $characters[array_rand($characters)];\n\t\t}\n\n\t\treturn $priv_id;\n\t}", "title": "" }, { "docid": "299f3cf2f1e2c42f1fd7a7ad58ce9bf8", "score": "0.52902913", "text": "protected function generateKey(): string\n {\n return 'BS64:'.base64_encode(\n KeyGenerator::generateSystemKey(32)\n );\n }", "title": "" }, { "docid": "9a5fb03df25bbd277c438ba0da051705", "score": "0.52784723", "text": "private function generateKey()\n {\n $key = '';\n $chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n $cx = strlen($chars) - 1;\n while (strlen($key) < 24) {\n $key .= $chars{mt_rand(0, $cx)};\n }\n return $key;\n }", "title": "" }, { "docid": "a8c94027216f862aadf729c2558fd527", "score": "0.52618206", "text": "public function homeAddress();", "title": "" }, { "docid": "e59c16741cc20b93a0fa7ebf1df1f8c6", "score": "0.52587885", "text": "public static function GenerateKey()\n\t{\n\t\t$key_size = 32; // 256 bits\n\t\treturn openssl_random_pseudo_bytes($key_size, $strong);\n\t}", "title": "" }, { "docid": "1eeec2b4daa1c76beeb6fe1fa58f9c4b", "score": "0.5249911", "text": "public function generateSecureKey();", "title": "" }, { "docid": "b4c8da3fd91cfa706e93320593d96b5c", "score": "0.52471864", "text": "private function generateApiKey(){\n return md5(uniqid(rand(), true));\n }", "title": "" }, { "docid": "108bc4d0aa7d17f3a480a5bb4f53c375", "score": "0.5235429", "text": "public static function generate()\n {\n $key = new static;\n\n $key->key = str_random(40);\n\n return $key;\n }", "title": "" }, { "docid": "a6da0e777d4e1e420019470abc4c1695", "score": "0.5234647", "text": "public function getPseudoRandomKey(): string;", "title": "" }, { "docid": "94622d85888ff24b2aec63869bebd801", "score": "0.52229625", "text": "public function postalCode();", "title": "" }, { "docid": "905962a23963e9d396329e7da3d022d2", "score": "0.52223563", "text": "function make_apikey($key, $pass){\n\t\treturn $key.md5($pass.$key);\n\t}", "title": "" }, { "docid": "8b66a459d1445607ed6fe4bc772ebfd9", "score": "0.521143", "text": "function generate_keys($config=PUBLIC_KEY_CONFIG) {\n $keys = array('private' => \"\",\n\t\t'public' => \"\");\n $resource = openssl_pkey_new($config);\n openssl_pkey_export($resource, $private_key);\n \n $key_details = openssl_pkey_get_details($resource);\n $public_key = $key_details['key'];\n\n $keys['private'] = $private_key;\n $keys['public'] = $public_key;\n\n return $keys;\n}", "title": "" }, { "docid": "d043123238ceb9d8b950c9da7261cb07", "score": "0.521072", "text": "public function getAddress(): string;", "title": "" }, { "docid": "c21a95f4ecf194a5a24e9c8e06f9d895", "score": "0.52093214", "text": "public function getFromAddress();", "title": "" }, { "docid": "ae37ae84fe9e6c3b0da7a6c2e8f12024", "score": "0.5208431", "text": "public function generateKey()\n {\n $chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n $len = strlen( $chars );\n\n $result = '';\n\n for ( $i = 0; $i < 8; $i ++ )\n $result .= $chars[ mt_rand( 0, $len - 1 ) ];\n\n return $result;\n }", "title": "" }, { "docid": "f54c2ad67af80220d071e94cfc5e1913", "score": "0.5207503", "text": "protected static function generateKey() {\n $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\"$&/()=[]{}0123456789';\n $key = '';\n $chars_length = strlen($chars);\n for ($i = 0; $i < 16; $i++) $key .= $chars[mt_rand(0, $chars_length-1)];\n return base64_encode($key);\n }", "title": "" }, { "docid": "eb567193fac9015ac058bf33400e88c8", "score": "0.520747", "text": "public function getBillingAddress();", "title": "" }, { "docid": "eb567193fac9015ac058bf33400e88c8", "score": "0.520747", "text": "public function getBillingAddress();", "title": "" }, { "docid": "d63a3b1f1995cd199174bbd51391a215", "score": "0.52054363", "text": "public function getPublicKey()\n {\n return new DPublicKey(openssl_csr_get_public_key(\n $this->resource\n ));\n }", "title": "" }, { "docid": "b47a044f168de2fb97133b92d5d2902c", "score": "0.52028793", "text": "function createPin($len = 10)\n {\n $maxNbrStr = str_repeat('9', $len);\n $maxNbr = intval($maxNbrStr);\n $n = mt_rand(0, $maxNbr);\n $pin = str_pad($n, $len, \"0\", STR_PAD_LEFT);\n return $pin;\n }", "title": "" }, { "docid": "bc9025caf28b92a414d571d997b16d43", "score": "0.52022654", "text": "function createKey($length = 32)\n {\n return str_random($length);\n }", "title": "" }, { "docid": "333a013c809a5a7959342f858520046f", "score": "0.51951706", "text": "public function getPublicKeyPath(): string\n {\n return $this->publicKeyPath;\n }", "title": "" }, { "docid": "ec48806c502434da521acda2a9176fc1", "score": "0.5194546", "text": "private function generateApiKey() {\n\n return md5(uniqid(rand(), true));\n\n }", "title": "" }, { "docid": "0ae45e1c989b37202de06784e0de2251", "score": "0.5181549", "text": "public function generateAuthKey()\n {\n $this->authkey = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "8fe9fcf3cf71cfc02ae364aeb94ba822", "score": "0.51747084", "text": "public function getAddress1();", "title": "" }, { "docid": "8fe9fcf3cf71cfc02ae364aeb94ba822", "score": "0.51747084", "text": "public function getAddress1();", "title": "" }, { "docid": "a26728a16ecbdb00dbec958f2b2bbc21", "score": "0.51737875", "text": "private function generateApiKey() {\r\n return md5(uniqid(rand(), true));\r\n }", "title": "" }, { "docid": "a26728a16ecbdb00dbec958f2b2bbc21", "score": "0.51737875", "text": "private function generateApiKey() {\r\n return md5(uniqid(rand(), true));\r\n }", "title": "" }, { "docid": "a26728a16ecbdb00dbec958f2b2bbc21", "score": "0.51737875", "text": "private function generateApiKey() {\r\n return md5(uniqid(rand(), true));\r\n }", "title": "" }, { "docid": "4f02e249f8be8badf4c69a0f510f89cc", "score": "0.51725847", "text": "public function deposit_address( $currency = \"BTC\" );", "title": "" }, { "docid": "f65831b4258a78743cdb0d833fd93bcb", "score": "0.5169351", "text": "public function publicKey(): self\n {\n return $this->state([\n 'id' => fn () => CredentialType::PUBLIC_KEY->value.'-'.Str::orderedUuid(),\n 'type' => CredentialType::PUBLIC_KEY,\n 'secret' => '{\"id\":\"mMihuIx9LukswxBOMjMHDf6EAONOy7qdWhaQQ7dOtViR2cVB\\/MNbZxURi2cvgSvKSILb3mISe9lPNG9sYgojuY5iNinYOg6hRVxmm0VssuNG2pm1+RIuTF9DUtEJZEEK\",\"publicKey\":\"pQECAyYgASFYIBw\\/HArIcANWNOBOxq3hH8lrHo9a17nQDxlqwybjDpHEIlggu3QUKIbALqsGuHfJI3LTKJSNmk0YCFb5oz1hjJidRMk=\",\"signCount\":0,\"userHandle\":\"1\",\"transports\":[]}',\n ]);\n }", "title": "" } ]
232fcaac128cda6d0099cd7bf101a820
$timestamp = '', $date_format = 'l, d F Y | H:i', $suffix = 'WIB'
[ { "docid": "bf48ffe4c8f06cb071cae268bfb8e887", "score": "0.5508561", "text": "function indonesian_date ($timestamp = '', $date_format = 'd F Y ', $suffix = '') {\n if (trim ($timestamp) == '')\n {\n $timestamp = time ();\n }\n elseif (!ctype_digit ($timestamp))\n {\n $timestamp = strtotime ($timestamp);\n }\n # remove S (st,nd,rd,th) there are no such things in indonesia :p\n $date_format = preg_replace (\"/S/\", \"\", $date_format);\n $pattern = array (\n '/Mon[^day]/','/Tue[^sday]/','/Wed[^nesday]/','/Thu[^rsday]/',\n '/Fri[^day]/','/Sat[^urday]/','/Sun[^day]/','/Monday/','/Tuesday/',\n '/Wednesday/','/Thursday/','/Friday/','/Saturday/','/Sunday/',\n '/Jan[^uary]/','/Feb[^ruary]/','/Mar[^ch]/','/Apr[^il]/','/May/',\n '/Jun[^e]/','/Jul[^y]/','/Aug[^ust]/','/Sep[^tember]/','/Oct[^ober]/',\n '/Nov[^ember]/','/Dec[^ember]/','/January/','/February/','/March/',\n '/April/','/June/','/July/','/August/','/September/','/October/',\n '/November/','/December/',\n );\n $replace = array ( 'Sen','Sel','Rab','Kam','Jum','Sab','Min',\n 'Senin','Selasa','Rabu','Kamis','Jumat','Sabtu','Minggu',\n 'Jan','Feb','Mar','Apr','Mei','Jun','Jul','Ags','Sep','Okt','Nov','Des',\n 'Januari','Februari','Maret','April','Juni','Juli','Agustus','Sepember',\n 'Oktober','November','Desember',\n );\n $date = date ($date_format, $timestamp);\n $date = preg_replace ($pattern, $replace, $date);\n $date = \"{$date} {$suffix}\";\n return $date;\n }", "title": "" } ]
[ { "docid": "814d899c164d803b17574da366e06481", "score": "0.65411174", "text": "function get_swiss_datetime_format($i_timestamp = '') {\n\tif ($i_timestamp == '') {\n\t\t$i_timestamp = mktime();\n\t}\n\treturn date('d-m-Y H:i:s', $i_timestamp);\n}", "title": "" }, { "docid": "7c4339954cfaea644c0f18c0c0b25146", "score": "0.6293399", "text": "function time_format ($format, $timestamp)\n{\n return strftime($format, $timestamp);\n}", "title": "" }, { "docid": "4409ea4bb1bc82330340a84754e45c8f", "score": "0.6249182", "text": "function formatdate($timestamp, $format = \"Y M j, g\\:i a\") {\r\n\r\n global $ttf; // pull through to get the user's time zone\r\n global $ttf_dst; // pull through to get the dst transitions\r\n\r\n $longago = time() - $timestamp;\r\n $minute = 60;\r\n $hour = 60 * $minute;\r\n $day = 24 * $hour;\r\n $week = 7 * $day;\r\n $year = 365.25 * $day;\r\n $month = (1 / 12) * $year;\r\n\r\n if ($timestamp == 0) {\r\n\r\n $relative = \"never\";\r\n\r\n } else if ($longago == 0) {\r\n\r\n $relative = \"now\";\r\n\r\n } else if ($longago < $minute) {\r\n\r\n $relative = floor($longago);\r\n if ($relative != 1) $relative .= \" seconds ago\";\r\n else $relative .= \" second ago\";\r\n\r\n } else if ($longago < $hour) {\r\n\r\n $relative = floor($longago / $minute);\r\n if ($relative != 1) $relative .= \" minutes ago\";\r\n else $relative .= \" minute ago\";\r\n\r\n } else if ($longago < $day) {\r\n\r\n $relative = floor($longago / $hour);\r\n if ($relative != 1) $relative .= \" hours ago\";\r\n else $relative .= \" hour ago\";\r\n\r\n } else if ($longago < $week) {\r\n\r\n $relative = floor($longago / $day);\r\n if ($relative != 1) $relative .= \" days ago\";\r\n else $relative .= \" day ago\";\r\n\r\n } else if ($longago < $month) {\r\n\r\n $relative = floor($longago / $week);\r\n if ($relative != 1) $relative .= \" weeks ago\";\r\n else $relative .= \" week ago\";\r\n\r\n } else if ($longago < $year) {\r\n\r\n $relative = floor($longago / $month);\r\n if ($relative != 1) $relative .= \" months ago\";\r\n else $relative .= \" month ago\";\r\n\r\n } else {\r\n\r\n $relative = floor($longago / $year);\r\n if ($relative != 1) $relative .= \" years ago\";\r\n else $relative .= \" year ago\";\r\n\r\n };\r\n\r\n if (!empty($ttf[\"dst_scheme\"])) {\r\n\r\n $y = gmdate('Y', $timestamp);\r\n\r\n if (isset($ttf_dst[$ttf['dst_scheme']][$y])) {\r\n\r\n if ( $timestamp >= $ttf_dst[$ttf['dst_scheme']][$y]['begin']\r\n && $timestamp < $ttf_dst[$ttf['dst_scheme']][$y]['end']) {\r\n\r\n $timestamp = $timestamp + $ttf_dst[$ttf['dst_scheme']][$y]['adj'];\r\n };\r\n\r\n };\r\n\r\n };\r\n\r\n $timestamp = $timestamp + 3600*$ttf[\"time_zone\"];\r\n $absolute = strtolower(gmdate($format, $timestamp));\r\n return array($relative, $absolute);\r\n\r\n}", "title": "" }, { "docid": "03aa49b3b2afdccfc03c707747809620", "score": "0.6210906", "text": "function longdate2($timestamp){\n $temp= date(\"l M jS Y\", $timestamp);\n return \"the date is $temp\";\n }", "title": "" }, { "docid": "a9d5fd30f466d38de8319f63e9ae1ab2", "score": "0.6196824", "text": "function ttw($t){\r\n\treturn date(\"F jS\", strtotime($t)).\" \".substr($t, 11);\r\n}", "title": "" }, { "docid": "c5c98baa730da2d811ce5bc3042b12f2", "score": "0.61896604", "text": "function cambiaf($stamp)\n{\n\t//formato en el que llega aaaa-mm-dd o al reves\n\t$fdia = explode(\"-\",$stamp);\n\t$fecha = $fdia[2].\"-\".$fdia[1].\"-\".$fdia[0];\n\tif($fecha == \"--\")\n\t$fecha = \"0000-00-00\";\n\treturn $fecha;\n}", "title": "" }, { "docid": "c08e640980cc2b17480c3faa2803ca00", "score": "0.61171716", "text": "protected function getSuffix() {\r\n\t\treturn '?'.time();\r\n\t}", "title": "" }, { "docid": "2617b3c544978fb743ca8076920315f7", "score": "0.6107207", "text": "function formatTimestamp ( $timestamp = '' ) {\n\t// DD/MM/YYYY às HH:MM:SS\t: 'd/m/Y \\à\\s H:i:s'\n\t// DD/MM/YYYY - HH:MM\t\t: 'd/m/Y - H:i'\n\treturn empty( $timestamp ) ? date( 'd/m/Y - H:i' ) : date( 'd/m/Y - H:i', strtotime( $timestamp ) );\n}", "title": "" }, { "docid": "10528be6a31d06bdd0f575e71eea8b84", "score": "0.6089204", "text": "function ew_FormatDateTime($ts, $namedformat) {\r\n\t$DefDateFormat = str_replace(\"yyyy\", \"%Y\", EW_DEFAULT_DATE_FORMAT);\r\n\t$DefDateFormat = str_replace(\"mm\", \"%m\", $DefDateFormat);\r\n\t$DefDateFormat = str_replace(\"dd\", \"%d\", $DefDateFormat);\r\n\tif (is_numeric($ts)) // timestamp\r\n\t{\r\n\t\tswitch (strlen($ts)) {\r\n\t\t\tcase 14:\r\n\t\t\t\t$patt = '/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 12:\r\n\t\t\t\t$patt = '/(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 10:\r\n\t\t\t\t$patt = '/(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8:\r\n\t\t\t\t$patt = '/(\\d{4})(\\d{2})(\\d{2})/';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\t$patt = '/(\\d{2})(\\d{2})(\\d{2})/';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\t$patt = '/(\\d{2})(\\d{2})/';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\t$patt = '/(\\d{2})/';\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\treturn $ts;\r\n\t\t}\r\n\t\tif ((isset($patt))&&(preg_match($patt, $ts, $matches)))\r\n\t\t{\r\n\t\t\t$year = $matches[1];\r\n\t\t\t$month = @$matches[2];\r\n\t\t\t$day = @$matches[3];\r\n\t\t\t$hour = @$matches[4];\r\n\t\t\t$min = @$matches[5];\r\n\t\t\t$sec = @$matches[6];\r\n\t\t}\r\n\t\tif (($namedformat==0)&&(strlen($ts)<10)) $namedformat = 2;\r\n\t}\r\n\telseif (is_string($ts))\r\n\t{\r\n\t\tif (preg_match('/(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})/', $ts, $matches)) // datetime\r\n\t\t{\r\n\t\t\t$year = $matches[1];\r\n\t\t\t$month = $matches[2];\r\n\t\t\t$day = $matches[3];\r\n\t\t\t$hour = $matches[4];\r\n\t\t\t$min = $matches[5];\r\n\t\t\t$sec = $matches[6];\r\n\t\t}\r\n\t\telseif (preg_match('/(\\d{4})-(\\d{2})-(\\d{2})/', $ts, $matches)) // date\r\n\t\t{\r\n\t\t\t$year = $matches[1];\r\n\t\t\t$month = $matches[2];\r\n\t\t\t$day = $matches[3];\r\n\t\t\tif ($namedformat==0) $namedformat = 2;\r\n\t\t}\r\n\t\telseif (preg_match('/(^|\\s)(\\d{2}):(\\d{2}):(\\d{2})/', $ts, $matches)) // time\r\n\t\t{\r\n\t\t\t$hour = $matches[2];\r\n\t\t\t$min = $matches[3];\r\n\t\t\t$sec = $matches[4];\r\n\t\t\tif (($namedformat==0)||($namedformat==1)) $namedformat = 3;\r\n\t\t\tif ($namedformat==2) $namedformat = 4;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $ts;\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn $ts;\r\n\t}\r\n\tif (!isset($year)) $year = 0; // dummy value for times\r\n\tif (!isset($month)) $month = 1;\r\n\tif (!isset($day)) $day = 1;\r\n\tif (!isset($hour)) $hour = 0;\r\n\tif (!isset($min)) $min = 0;\r\n\tif (!isset($sec)) $sec = 0;\r\n\t$uts = @mktime($hour, $min, $sec, $month, $day, $year);\r\n\tif ($uts < 0 || $uts == FALSE || // failed to convert\r\n\t\t(intval($year) == 0 && intval($month) == 0 && intval($day) == 0)) {\r\n\t\t$year = substr_replace(\"0000\", $year, -1 * strlen($year));\r\n\t\t$month = substr_replace(\"00\", $month, -1 * strlen($month));\r\n\t\t$day = substr_replace(\"00\", $day, -1 * strlen($day));\r\n\t\t$hour = substr_replace(\"00\", $hour, -1 * strlen($hour));\r\n\t\t$min = substr_replace(\"00\", $min, -1 * strlen($min));\r\n\t\t$sec = substr_replace(\"00\", $sec, -1 * strlen($sec));\r\n\t\t$DefDateFormat = str_replace(\"yyyy\", $year, EW_DEFAULT_DATE_FORMAT);\r\n\t\t$DefDateFormat = str_replace(\"mm\", $month, $DefDateFormat);\r\n\t\t$DefDateFormat = str_replace(\"dd\", $day, $DefDateFormat);\r\n\t\tswitch ($namedformat) {\r\n\t\t\tcase 0:\r\n\t\t\t\treturn $DefDateFormat.\" $hour:$min:$sec\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1://unsupported, return general date\r\n\t\t\t\treturn $DefDateFormat.\" $hour:$min:$sec\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\treturn $DefDateFormat;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tif (intval($hour)==0)\r\n\t\t\t\t\treturn \"12:$min:$sec AM\";\r\n\t\t\t\telseif (intval($hour)>0 && intval($hour)<12)\r\n\t\t\t\t\treturn \"$hour:$min:$sec AM\";\r\n\t\t\t\telseif (intval($hour)==12)\r\n\t\t\t\t\treturn \"$hour:$min:$sec PM\";\r\n\t\t\t\telseif (intval($hour)>12 && intval($hour)<=23)\r\n\t\t\t\t\treturn (intval($hour)-12).\":$min:$sec PM\";\r\n\t\t\t\telse\r\n\t\t\t\t\treturn \"$hour:$min:$sec\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\treturn \"$hour:$min:$sec\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t\treturn \"$year\". EW_DATE_SEPARATOR . \"$month\" . EW_DATE_SEPARATOR . \"$day\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\treturn \"$month\". EW_DATE_SEPARATOR .\"$day\" . EW_DATE_SEPARATOR . \"$year\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7:\r\n\t\t\t\treturn \"$day\" . EW_DATE_SEPARATOR .\"$month\" . EW_DATE_SEPARATOR . \"$year\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8:\r\n\t\t\t\treturn $DefDateFormat . (($hour == 0 && $min == 0 && $sec == 0) ? \"\" : \" $hour:$min:$sec\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase 9:\r\n\t\t\t\treturn \"$year\". EW_DATE_SEPARATOR . \"$month\" . EW_DATE_SEPARATOR . \"$day $hour:$min:$sec\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 10:\r\n\t\t\t\treturn \"$month\". EW_DATE_SEPARATOR .\"$day\" . EW_DATE_SEPARATOR . \"$year $hour:$min:$sec\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 11:\r\n\t\t\t\treturn \"$day\" . EW_DATE_SEPARATOR .\"$month\" . EW_DATE_SEPARATOR . \"$year $hour:$min:$sec\";\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t} else {\r\n\t\tswitch ($namedformat) {\r\n\t\t\tcase 0:\r\n\t\t\t\treturn strftime($DefDateFormat.\" %H:%M:%S\", $uts);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\treturn strftime(\"%A, %B %d, %Y\", $uts);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\treturn strftime($DefDateFormat, $uts);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\treturn strftime(\"%I:%M:%S %p\", $uts);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\treturn strftime(\"%H:%M:%S\", $uts);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t\treturn strftime(\"%Y\" . EW_DATE_SEPARATOR . \"%m\" . EW_DATE_SEPARATOR . \"%d\", $uts);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\treturn strftime(\"%m\" . EW_DATE_SEPARATOR . \"%d\" . EW_DATE_SEPARATOR . \"%Y\", $uts);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7:\r\n\t\t\t\treturn strftime(\"%d\" . EW_DATE_SEPARATOR . \"%m\" . EW_DATE_SEPARATOR . \"%Y\", $uts);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8:\r\n\t\t\t\treturn strftime($DefDateFormat . (($hour == 0 && $min == 0 && $sec == 0) ? \"\" : \" %H:%M:%S\"), $uts);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 9:\r\n\t\t\t\treturn strftime(\"%Y\" . EW_DATE_SEPARATOR . \"%m\" . EW_DATE_SEPARATOR . \"%d %H:%M:%S\", $uts);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 10:\r\n\t\t\t\treturn strftime(\"%m\" . EW_DATE_SEPARATOR . \"%d\" . EW_DATE_SEPARATOR . \"%Y %H:%M:%S\", $uts);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 11:\r\n\t\t\t\treturn strftime(\"%d\" . EW_DATE_SEPARATOR . \"%m\" . EW_DATE_SEPARATOR . \"%Y %H:%M:%S\", $uts);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "eb6a26d798d9a167e9e8c66534a9b34e", "score": "0.6058913", "text": "function strftime ($format, $timestamp = null) {}", "title": "" }, { "docid": "919acc1147eccd97b3e728ab184c66d4", "score": "0.6010755", "text": "function logdate() {return date(\"y.m.d H:i:s: \");}", "title": "" }, { "docid": "cebeb66047a86d8e2bfd29d5cfb52d6c", "score": "0.60098755", "text": "function Product_Cost_Breakdown_snippet61(&$params)\r\n{\necho date('F jS Y h:i:s A');\n\r\n;\r\n}", "title": "" }, { "docid": "0bd7f711ea5108fc123830658aedd3b6", "score": "0.59991163", "text": "function date ($format, $timestamp = null) {}", "title": "" }, { "docid": "695d6bc925bf501b09cdf3bf96e9d805", "score": "0.5998633", "text": "public function freshTimestampString();", "title": "" }, { "docid": "3b9b67321ba95d66c8b1d4a1c41d02ff", "score": "0.59884393", "text": "function cambiaf($stamp)\n{\n\t$fdia = explode(\"-\",$stamp);\n\t$fecha = $fdia[2].\"-\".$fdia[1].\"-\".$fdia[0];\n\treturn $fecha;\n}", "title": "" }, { "docid": "b13f9d229bf1d9d12ca6d87a4346742c", "score": "0.5983807", "text": "function timeFormat($timeStamp) {\n\treturn strftime('%e %B %Y %R', $timeStamp);\n}", "title": "" }, { "docid": "992e3f1dee66436eccd7ed73ad61897b", "score": "0.5939253", "text": "function getWeek($timestamp){\r\n $timestamp=date('w',$timestamp);\r\n $str='';\r\n switch($timestamp){\r\n case '0': $str.='Sun'; break;\r\n case '1': $str.='Mon'; break;\r\n case '2': $str.='Tue'; break;\r\n case '3': $str.='Wed'; break;\r\n case '4': $str.='Thr'; break;\r\n case '5': $str.='Fri'; break;\r\n case '6': $str.='Sat'; break;\r\n }\r\n return $str;\r\n}", "title": "" }, { "docid": "07ac2c38874029fe1f681aee798aae5f", "score": "0.5907673", "text": "function time_part ($format, $timestamp = null)\n{\n return idate($format, $timestamp);\n}", "title": "" }, { "docid": "5eaa37074215fb1c2f5702abac741007", "score": "0.5874228", "text": "function diaMes($stamp)\n{\n\t$fdia = explode(\"-\",$stamp);\n\t$fecha = $fdia[2].\"-\".$fdia[1];\n\treturn $fecha;\n}", "title": "" }, { "docid": "78786c267b22b927fbcfab6044ee0b7a", "score": "0.5865465", "text": "function nice_date( $timestamp ){\n\t$date = new DateTime( $timestamp );\n\treturn $date->format('F j, Y');\n}", "title": "" }, { "docid": "ddc0c6625b357654cb7ba68b56b8c24d", "score": "0.58350194", "text": "function timestampDate($timestamp)\r\n{\r\n $s = (string)$timestamp;\r\n return $s[6].$s[7].\".\".$s[4].$s[5].\".\".$s[0].$s[1].$s[2].$s[3];\r\n}", "title": "" }, { "docid": "32219f924aed5130c249136ae8b29c68", "score": "0.5819109", "text": "function wcaDate ( $format='r', $timestamp=false ) {\n date_default_timezone_set( 'Europe/Berlin' );\n return date( $format, $timestamp ? $timestamp : time() );\n}", "title": "" }, { "docid": "529eb3ebf8d93b2c6f4cf4266a289411", "score": "0.5809046", "text": "function utility_prepareDate($timestamp,$format=\"\") {\n\t$returnvalue = \"\";\n\tif($format==\"\") {\n\t\t## let's format it to the standard\n\t\t$returnvalue = date(DEFAULT_DATE,$timestamp);\n\t} else {\n\t\t$returnvalue = date($format,$timestamp);\n\t}\n\treturn $returnvalue;\n}", "title": "" }, { "docid": "910fd9815b4378ee86f6e064816b4cdd", "score": "0.58033425", "text": "function get_suffix(){\n\t$suffix = '';\n\tif ( function_exists( 'is_wpe' ) ) {\n\t\t$suffix = is_wpe() ? '.min' : '';\n\t}\n\treturn $suffix;\n}", "title": "" }, { "docid": "80769c4f74820bf2da6caa429e91c03d", "score": "0.5791512", "text": "function timestampTime($timestamp)\r\n{\r\n $s = (string)$timestamp;\r\n return $s[8].$s[9].\":\".$s[10].$s[11];\r\n}", "title": "" }, { "docid": "605bc0425725bb4c3da106088f4d375c", "score": "0.5769601", "text": "function cambiab( $stamp )\n{\n\t//formato en el que llega aaaa-mm-dd o al reves\n\t$fdia = explode(\"-\",$stamp);\n\tif($fdia[2]=='') { $fdia[2]='%'; }\n\tif($fdia[1]=='') { $fdia[1]='%'; }\n\t$fecha = $fdia[2].\"-\".$fdia[1].\"-\".$fdia[0];\n\treturn $fecha;\n}", "title": "" }, { "docid": "74779ac7f6f3b53ee46d878e7aa4dcfb", "score": "0.57650584", "text": "function idate ($format, $timestamp = null) {}", "title": "" }, { "docid": "3a7b6d0f8f11b80f7e84abef8fd62e85", "score": "0.5763826", "text": "function longdate($timestamp){\n return date(\"l M jS Y\", $timestamp); //F=full month, M=short Month, Y=year,suffix for the day \n }", "title": "" }, { "docid": "969bf973aaffa89bf416a117c5a5c724", "score": "0.5747034", "text": "function Product_Cost_Breakdown_snippet6(&$params)\r\n{\r\n// Put your code here.\necho date('F jS Y h:i:s A');\n\r\n;\r\n}", "title": "" }, { "docid": "e801bfefc080f8662df3f6d92ee29443", "score": "0.5729461", "text": "function display_date_time($timestamp)\n{\n\tif (get_settings('date_format') != '' && get_settings('time_format') != '')\n\t{\n\t\treturn date(get_settings('date_format').' '.get_settings('time_format'), $timestamp);\n\t}\n\telse if (get_settings('date_format') != '' && get_settings('time_format') == '')\n\t{\n\t\treturn date(get_settings('date_format').' h:i A', $timestamp);\n\t}\n\telse if (get_settings('date_format') == '' && get_settings('time_format') != '')\n\t{\n\t\treturn date('d-m-Y '.get_settings('time_format'), $timestamp);\n\t}\n\telse\n\t{\n\t\treturn date('d-m-Y h:i A', $timestamp);\n\t}\n}", "title": "" }, { "docid": "92032bc6b55d229d49ec982181855d67", "score": "0.57194376", "text": "function jdmonthname ($julianday, $mode) {}", "title": "" }, { "docid": "3fdd80b9fd5e65fc6ab326b1b73d1ebf", "score": "0.57134336", "text": "function strftime2($format, $timestamp = NULL) {\n\tif (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')\n\t\t$format = preg_replace('#(?<!%)((?:%%)*)%e#', '\\1%#d', $format);\n\treturn strftime($format, $timestamp != NULL ? $timestamp : time());\n}", "title": "" }, { "docid": "fa7174071cbe7ff6c2f09c127f8b24c2", "score": "0.5703279", "text": "function yourls_get_time_format( $format ) {\n return yourls_apply_filter( 'get_time_format', (string)$format );\n}", "title": "" }, { "docid": "6fb95649475717bca8188ca6b81682b1", "score": "0.5701641", "text": "private function _getFormattedTimestamp()\r\n {\r\n return gmdate(\"Y-m-d\\TH:i:s.\\\\0\\\\0\\\\0\\\\Z\", time());\r\n }", "title": "" }, { "docid": "5f9c1716abea34caf9bd6b3af4984135", "score": "0.5698189", "text": "function formatVersion($timestamp)\n{\n return sprintf('%s-%s-%s %s:%s',\n substr($timestamp, 0, 4),\n substr($timestamp, 4, 2),\n substr($timestamp, 6, 2),\n substr($timestamp, 8, 2),\n substr($timestamp, 10, 2)\n );\n}", "title": "" }, { "docid": "287b2cc0b78bdeb8d802d5cffa5179fe", "score": "0.56926984", "text": "function reportStamp($type)\r\n\t{\r\n\t\t# returns the logstamp that is prefixed to files and screen additions.\r\n\t\treturn(\"[\" . $type . \": \" . date(\"d-m-Y H:i:s\") . \"]\");\r\n\t}", "title": "" }, { "docid": "4cdf691228d8101cbc07aad3f23eff0f", "score": "0.5690501", "text": "function gmstrftime ($format, $timestamp = null) {}", "title": "" }, { "docid": "b42db9fa6f43a3ba36468d8bce1bfbfa", "score": "0.5678623", "text": "function format_time($timestamp)\n{\n return date('d/m/Y H:m', $timestamp);\n}", "title": "" }, { "docid": "99eec45fda1e0f058ca0aa1f616bc728", "score": "0.565976", "text": "function getTimestampField($field,$format) // CHECKME for all database types\n {\n $newfield = '';\n if ($format == 'year') {\n $newfield = \"UNIXTIME_BY_YEAR($field)\";\n } elseif ($format == 'month') {\n $newfield = \"UNIXTIME_BY_MONTH($field)\";\n } elseif ($format == 'day') {\n $newfield = \"UNIXTIME_BY_DAY($field)\";\n }\n return $newfield;\n }", "title": "" }, { "docid": "12dea783f9a77060b579bb59cec377a7", "score": "0.56586105", "text": "function GetDateTimeInFormat($datestamp, $format)\n {\n switch($format)\n {\n // Swatch Internet Time\n case null:\n case 1:\n return date_format(date_create($datestamp), 'jS F, Y') . ' @' . date(\"B\", human_to_unix($datestamp)) . ' .beats';\n // Unix time\n case 2:\n return human_to_unix($datestamp);\n // Time since\n case 3:\n return timespan(human_to_unix($datestamp), time()) . ' ago';\n // Database\n case 4:\n return $datestamp;\n // English\n case 5:\n return date_format(date_create($datestamp), 'jS F, Y, g:i a');\n // American\n case 6:\n return date_format(date_create($datestamp), 'F jS, Y, g:i a');\n \n }\n }", "title": "" }, { "docid": "b6963017c847105b80dd9dbfbb9682ba", "score": "0.5651051", "text": "function day_name($daynumber)\r\n\r\n{\r\n\r\n\treturn utf8_strftime(\"%A\", mktime(0,0,0,1,2+$daynumber,2000));\r\n\r\n}", "title": "" }, { "docid": "c56822c5072fa10b6780b7275d19da80", "score": "0.56457907", "text": "function sbx_time_format() {\n\treturn apply_filters( 'sealedbox_time_format', get_option( 'time_format' ) );\n}", "title": "" }, { "docid": "9ce56fd0e7d15fb88e9db06c0692e192", "score": "0.5638948", "text": "private function _getFormattedTimestamp()\n {\n return gmdate(\"Y-m-d\\TH:i:s.\\\\0\\\\0\\\\0\\\\Z\", time());\n }", "title": "" }, { "docid": "9ce56fd0e7d15fb88e9db06c0692e192", "score": "0.5638948", "text": "private function _getFormattedTimestamp()\n {\n return gmdate(\"Y-m-d\\TH:i:s.\\\\0\\\\0\\\\0\\\\Z\", time());\n }", "title": "" }, { "docid": "74e98f7d8821820041c3cf21bd4df5bd", "score": "0.5637691", "text": "function convert_date($jahr,$monat,$tag) {\n\treturn $jahr.'-'.str_pad($monat,2, '0', STR_PAD_LEFT).'-'.str_pad($tag,2, '0', STR_PAD_LEFT);\n}", "title": "" }, { "docid": "522adabdb22754cae174f75a212dbe07", "score": "0.5634511", "text": "protected function getDatePrefix() : string\n {\n return date('Y_m_d_His');\n }", "title": "" }, { "docid": "46310a895c4b87bd2ddb76cb5a2238c6", "score": "0.561514", "text": "function get_sql_datetime_format($i_timestamp = '') {\n\tif ($i_timestamp == '') {\n\t\t$i_timestamp = mktime();\n\t}\n\treturn date('Y-m-d H:i:s', $i_timestamp);\n}", "title": "" }, { "docid": "dad5e847012e84eecd2fc6f7c23f679a", "score": "0.5613249", "text": "function timestamp_para_humano($ts){ \n @$d=getdate($ts); \n $yr=$d[\"year\"]; \n $mo=$d[\"mon\"]; \n $da=$d[\"mday\"]; \n $hr=$d[\"hours\"]; \n $mi=$d[\"minutes\"]; \n $se=$d[\"seconds\"]; \n return date(\"d/m/Y H:i\", mktime($hr,$mi,$se,$mo,$da,$yr)); \n}", "title": "" }, { "docid": "c564e86978c0b75dc7f4e579c85926a6", "score": "0.56093144", "text": "public function getTimestampString(): string {\n\t\t$dtConfig = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'discussiontools' );\n\t\t$switchTime = new DateTimeImmutable(\n\t\t\t$dtConfig->get( 'DiscussionToolsTimestampFormatSwitchTime' )\n\t\t);\n\t\t$timestamp = $this->getTimestamp();\n\t\tif ( $timestamp < $switchTime ) {\n\t\t\treturn $timestamp->format( 'Y-m-d\\TH:i:s.v\\Z' );\n\t\t} else {\n\t\t\treturn $timestamp->format( 'YmdHis' );\n\t\t}\n\t}", "title": "" }, { "docid": "ed77a2228c6f4148817644d56cfcb6a0", "score": "0.5598262", "text": "function wz_date( $str, $format = null)\n\t{\n\t\tif($format){\n\t\t\t$timestamp = strtotime($str);\n\t\t\t$str = gmdate($format, $timestamp );\n\t\t}\n\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "f0c23fe5398d10676a789b2eef3eae83", "score": "0.5597485", "text": "protected function getDatePrefix(): string\n {\n return date('Y_m_d_His');\n }", "title": "" }, { "docid": "b060c764bdd308a8188077c146be0291", "score": "0.5590071", "text": "public function dateTimeFormat();", "title": "" }, { "docid": "4a1bb120fbbc6b2e3d782f9afc61c331", "score": "0.55790883", "text": "public function toString($format= 'r') {\n static $daynames= array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');\n static $monthnames= array(NULL, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');\n static $suffix= array('th', 'st', 'nd', 'rd', 'th');\n\n // Use builtin?\n if (1971 < $this->year && $this->year < 2038) return date($format, $this->_utime);\n \n $return= '';\n $gmt= self::_getGMTOffset();\n for ($i= 0, $s= strlen($format); $i < $s; $i++) {\n switch ($format{$i}) {\n case 'a': $return.= $this->hours > 12 ? 'pm' : 'am'; break;\n case 'A': $return.= $this->hours > 12 ? 'PM' : 'AM'; break;\n case 'B': $return.= date('B', mktime($this->hours, $this->minutes, $this->seconds)); break;\n case 'c': $return.= sprintf(\n '%04d-%02d-%02dT%02d:%02d:%02d%s%2d:%2d', \n $this->year,\n $this->mon,\n $this->mday,\n $this->hours,\n $this->minutes,\n $this->seconds,\n $gmt < 0 ? '+' : '-',\n abs($gmt) / 36,\n abs($gmt) / 18\n );\n break;\n case 'd': $return.= sprintf('%02d', $this->mday); break;\n case 'D': $return.= $daynames[$this->wday]; break;\n case 'F': $return.= $this->month; break;\n case 'g': $return.= $this->hours == 0 ? 12 : ($this->hours > 12 ? $this->hours - 12 : $this->hours); break;\n case 'G': $return.= $this->hours; break;\n case 'h': $return.= sprintf('%02d', $this->hours == 0 ? 12 : ($this->hours > 12 ? $this->hours - 12 : $this->hours)); break;\n case 'H': $return.= sprintf('%02d', $this->hours); break;\n case 'i': $return.= sprintf('%02d', $this->minutes); break;\n case 'I': $return.= '???IS_DST???'; break; // FIXME\n case 'j': $return.= $this->mday; break;\n case 'l': $return.= $this->weekday; break;\n case 'L': $return.= (int)$this->leap; break;\n case 'm': $return.= sprintf('%02d', $this->mon); break;\n case 'M': $return.= $monthnames[$this->mon]; break;\n case 'n': $return.= $this->mon; break;\n case 'O': $return.= sprintf('%s%04d', $gmt < 0 ? '+' : '-', abs($gmt) / 36); break;\n case 'r': $return.= sprintf(\n '%3s, %02d %3s %04s %02d:%02d:%02d %s%04d',\n $daynames[$this->wday],\n $this->mday,\n $monthnames[$this->mon],\n $this->year,\n $this->hours,\n $this->minutes,\n $this->seconds,\n $gmt < 0 ? '+' : '-',\n abs($gmt) / 36\n );\n break;\n case 's': $return.= sprintf('%02d', $this->seconds); break;\n case 'S': $return.= $suffix[max($this->mday % 10, 4)]; break;\n case 't': $return.= $this->ndays; break;\n case 'T': $return.= date('T'); break;\n case 'U': $return.= $this->_utime; break;\n case 'w': $return.= $this->wday; break;\n case 'W': $return.= sprintf('%d', ($this->yday + 7 - ($this->wday ? $this->wday - 1 : 6)) / 7); break;\n case 'Y': $return.= sprintf('%04d', $this->year); break;\n case 'y': $return.= sprintf('%02d', $this->year % 100); break;\n case 'z': $return.= $this->yday; break;\n case 'Z': $return.= $gmt * 86400; break;\n case '\\\\': if ($i++ >= $s) break;\n default: $return.= $format{$i}; break;\n }\n }\n return $return;\n }", "title": "" }, { "docid": "ea8938759df7fed00f8b69864d383370", "score": "0.55754733", "text": "function AT_date($lang = 'en', $format='%Y-%M-%d', $timestamp = '', $format_type=AT_MYSQL_DATETIME)\n{\t\n\tglobal $day_name_con, $day_name_ext, $month_name_con, $month_name_ext;\n\n\tif ($timestamp == '') {\n\t\t$timestamp = time();\n\t\t$format_type = AT_UNIX_TIMESTAMP;\n\t}\n\n\t/* 1. convert the date to a Unix timestamp before we do anything with it */\n\tif ($format_type == AT_MYSQL_DATETIME) {\n\t\t$year\t= substr($timestamp,0,4);\n\t\t$month\t= substr($timestamp,5,2);\n\t\t$day\t= substr($timestamp,8,2);\n\t\t$hour\t= substr($timestamp,11,2);\n\t\t$min\t= substr($timestamp,14,2);\n\t\t$sec\t= substr($timestamp,17,2);\n\t $timestamp\t= mktime($hour, $min, $sec, $month, $day, $year);\n\n\t} else if ($format_type == AT_MYSQL_TIMESTAMP_14) {\n\t $hour\t\t= substr($timestamp,8,2);\n\t $minute\t\t= substr($timestamp,10,2);\n\t $second\t\t= substr($timestamp,12,2);\n\t $month\t\t= substr($timestamp,4,2);\n\t $day\t\t= substr($timestamp,6,2);\n\t $year\t\t= substr($timestamp,0,4);\n\t $timestamp\t= mktime($hour, $minute, $second, $month, $day, $year); \n\t}\n\n\t/* pull out all the %X items from $format */\n\t$first_token = strpos($format, '%');\n\tif ($first_token === false) {\n\t\t/* no tokens found */\n\t\treturn $timestamp;\n\t} else {\n\t\t$tokened_format = substr($format, $first_token);\n\t}\n\t$tokens = explode('%', $tokened_format);\n\tarray_shift($tokens);\n\t$num_tokens = count($tokens);\n\n\t$output = $format;\n\tfor ($i=0; $i<$num_tokens; $i++) {\n\t\t$tokens[$i] = substr($tokens[$i],0,1);\n\n\t\tif ($tokens[$i] == 'D') {\n\t\t\t$output = str_replace('%D', $day_name_con[$lang][date('w', $timestamp)],$output);\n\t\t\n\t\t} else if ($tokens[$i] == 'l') {\n\t\t\t$output = str_replace('%l', $day_name_ext[$lang][date('w', $timestamp)],$output);\n\t\t\n\t\t} else if ($tokens[$i] == 'F') {\n\t\t\t$output = str_replace('%F', $month_name_ext[$lang][date('n', $timestamp)-1],$output);\t\t\n\t\t\n\t\t} else if ($tokens[$i] == 'M') {\n\t\t\t$output = str_replace('%M', $month_name_con[$lang][date('n', $timestamp)-1],$output);\n\n\t\t} else {\n\n\t\t\t/* this token doesn't need translating */\n\t\t\t$value = date($tokens[$i], $timestamp);\n\t\t\tif ($value != $tokens[$i]) {\n\t\t\t\t$output = str_replace('%'.$tokens[$i], $value, $output);\n\t\t\t} /* else: this token isn't valid. so don't replace it. Eg. try %q */\n\t\t}\n\t}\n\treturn $output;\n}", "title": "" }, { "docid": "660634165f075d3a157968cb3d2e5124", "score": "0.556646", "text": "function formatter($val, $name){\r\n\t\tif($name == 'time'){\r\n\t\t\treturn @date(\"d.m.Y H:i:s\", $val);\r\n\t\t}\r\n\t\treturn $val;\r\n\t}", "title": "" }, { "docid": "e7907947fab84a6ded5dfcd834da274b", "score": "0.5558622", "text": "function convert_timestamp($timestamp){ \n $limit=date(\"U\"); \n $limiting=$timestamp-$limit; \n return date (\"Ymd\", mktime (0,0,$limiting)); \n}", "title": "" }, { "docid": "7ecc4c4246d32608fa62a9909974a82a", "score": "0.5537387", "text": "function longdate($timestamp)\n {\n return date(\"l F jS Y\", $timestamp);\n }", "title": "" }, { "docid": "bf7598cc5d80bd3b5f93c7dee755e7eb", "score": "0.5509148", "text": "static public function dateFormat($timestamp)\n {\n static $df, $tf;\n\n if ($df === null) {\n $df = $GLOBALS['prefs']->getValue('date_format');\n $tf = $GLOBALS['prefs']->getValue('twentyFour');\n }\n\n if (is_string($timestamp)) {\n $timestamp = strtotime($timestamp);\n }\n\n return strftime($df, $timestamp)\n . ' '\n . (date($tf ? 'G:i' : 'g:ia', $timestamp));\n }", "title": "" }, { "docid": "6a3952bb6f5c4747b9dabd3d369f5bfb", "score": "0.55062133", "text": "function get_this_week($format = 'Mj') {\n return strtolower(date($format, strtotime('last sunday')));\n}", "title": "" }, { "docid": "8b03e64e20308a49334c09ad0a51e1b6", "score": "0.5502053", "text": "function upcomingevents_date_format($date) {\n return date('l\\s \\a\\t g a', strtotime($date));\n}", "title": "" }, { "docid": "3045f10aad8f047cfa569f4874fbbb46", "score": "0.5494898", "text": "function message_date($in_date) {\n\n\t$year\t= substr($in_date,0,4);\n\t$month\t= substr($in_date,5,2);\n\t$day\t= substr($in_date,8,2);\n\t$hour\t= substr($in_date,11,2);\n\t$min\t= substr($in_date,14,2);\n\t$sec\t= substr($in_date,17,2);\n\t$date\t= date('D, M j - H:i', mktime($hour,$min,$sec,$month,$day,$year));\t\n\n\treturn $date;\n}", "title": "" }, { "docid": "f1360d83d7fd4d16c690d9f2debc69a1", "score": "0.5491594", "text": "function formatDateTime($timestamp,$strFormat=\"Y-m-d\",$strLang=\"th\") \n{\n\tif (!empty($timestamp)) \n\t{\n\t\t$arrDate = splitTimeStamp($timestamp,$strLang) ;\n\t\tfor($i=0;$i<strlen($strFormat);$i++)\n\t\t{\n\t\t $strChar = substr($strFormat,$i, 1); \n\t\t\t$strDateResult .= getDateValue($arrDate,$strChar) ;\n\t\t}\n\t\tReturn $strDateResult ;\n\t} \n\telse \n\t{\n\t\tReturn False;\n\t}\n}", "title": "" }, { "docid": "abad1a4648b58083338a6029cbc6d804", "score": "0.54889095", "text": "function hook_baseline_info_date_formats() {\n return array(\n // Monday 29/03/1980\n array(\n 'format' => 'l d/m/Y',\n ),\n // Monday 29/03/1980 20:50\n array(\n 'format' => 'l d/m/Y - G:i',\n )\n );\n}", "title": "" }, { "docid": "36e0e3c7386d000c3e60789ce31dba68", "score": "0.5487929", "text": "protected function getDatePrefix()\n {\n return date('Y_m_d_His');\n }", "title": "" }, { "docid": "36e0e3c7386d000c3e60789ce31dba68", "score": "0.5487929", "text": "protected function getDatePrefix()\n {\n return date('Y_m_d_His');\n }", "title": "" }, { "docid": "36e0e3c7386d000c3e60789ce31dba68", "score": "0.5487929", "text": "protected function getDatePrefix()\n {\n return date('Y_m_d_His');\n }", "title": "" }, { "docid": "d6cbe780bdbb6c1e2573b76d3aa7f962", "score": "0.54810315", "text": "function getTimeFormat()\n{\n $date_time_format_full = \"H:i:s\";\n return $date_time_format_full;\n}", "title": "" }, { "docid": "5f45b1bfabc3fe3d56083a67cedd1997", "score": "0.5465928", "text": "private function getSuffixFilename()\n {\n if ($suffix = config('mediamanager.suffix')) {\n return Carbon::now()->formatLocalized($suffix);\n }\n\n return null;\n }", "title": "" }, { "docid": "27270fbeac2b8d118b46d5c1c3f8e2c1", "score": "0.5459368", "text": "function standard_timestamp ($timestamp = false) {\n if ($timestamp) {\n return date(\"Y-m-d\" ,strtotime($timestamp));\n }\n return date(\"Y-m-d\");\n}", "title": "" }, { "docid": "deec0dd1938ecfbfa2a5b0285c513b74", "score": "0.5451612", "text": "function vpb_time_sent( $timestamp )\n{\n if( !is_numeric( $timestamp ) ) {\n $timestamp = strtotime( $timestamp );\n if( !is_numeric( $timestamp ) )\n\t\t{\n return \"\";\n }\n }\n $difference = time() - $timestamp;\n $periods = array( \"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"years\", \"decade\" );\n $lengths = array( \"60\",\"60\",\"24\",\"7\",\"4.35\",\"12\",\"10\");\n if ($difference > 0) {\n\t\t// this was in the past\n $ending = \"ago\";\n }\n\telse {\n\t\t// this was in the future\n $difference = -$difference;\n $ending = \"to go\";\n }\n for( $j=0; $difference>=$lengths[$j] and $j < 7; $j++ )\n $difference /= $lengths[$j];\n $difference = round($difference);\n if( $difference != 1 ) {\n // Also change this if needed for an other language\n $periods[$j].= \"s\";\n }\n $vpb_Text = \"$difference $periods[$j] $ending\";\n return $vpb_Text;\n}", "title": "" }, { "docid": "bbf8d946bd82d2e3a852e42bfe6b8187", "score": "0.5446398", "text": "private function timestamp()\n {\n $time = explode(' ', microtime(false));\n\n return $time[1] . substr($time[0], 2, 5);\n }", "title": "" }, { "docid": "be5a3d74c6b029405d2c76e2ef1b3958", "score": "0.5444745", "text": "function smarty_modifier_format_datetime( $ts ) {\n\n\treturn date( 'H:i \\o\\n jS F, Y', $ts );\n\n}", "title": "" }, { "docid": "f2468dc4145e7b36ecb0c8eaabb427ee", "score": "0.5444179", "text": "function yourls_get_datetime_format( $format ) {\n return yourls_apply_filter( 'get_datetime_format', (string)$format );\n}", "title": "" }, { "docid": "6a96ac4b5ace3fb116d7edceb742a8d0", "score": "0.5432217", "text": "function osf_time_from_timestamp($utimestamp) {\n global $osf_starttime;\n if (strpos($utimestamp, ':') != false) {\n $pause = explode(':', $utimestamp);\n $osf_starttime = $osf_starttime + $pause[1] - $pause[0];\n }\n $duration = $utimestamp - $osf_starttime;\n $sec = $duration % 60;\n if ($sec < 10) {\n $sec = '0' . $sec;\n }\n $min = $duration / 60 % 60;\n if ($min < 10) {\n $min = '0' . $min;\n }\n $hour = $duration / 3600 % 24;\n if ($hour < 10) {\n $hour = '0' . $hour;\n }\n return \"\\n\" . $hour . ':' . $min . ':' . $sec;\n}", "title": "" }, { "docid": "681cb3d3c7c4742382b65e8bf4aba82f", "score": "0.543013", "text": "function time_utc_format ($format, $timestamp = null)\n{\n return gmstrftime($format, $timestamp);\n}", "title": "" }, { "docid": "d7471510a2a54c17bf104cc6c87680d3", "score": "0.542018", "text": "public function format_date($timestamp, $format='long')\n {\n if('long' == $format)\n {\n $dateFormat = $this->dateFormatLong;\n $timeFormat = $this->timeFormatLong;\n } else {\n $dateFormat = $this->dateFormatShort;\n $timeFormat = $this->timeFormatShort;\n }\n\n $date = date($dateFormat, $timestamp);\n $time = date($timeFormat, $timestamp);\n\n if($this->dateReplaceWords)\n {\n if($date == date($dateFormat)) $date = 'Сегодня';\n elseif($date == date($dateFormat, time()-86400)) $date = 'Вчера';\n }\n\n return $date .' в '. $time;\n }", "title": "" }, { "docid": "8b09b831103cb084c9d637f656854b78", "score": "0.54147846", "text": "final public static function timestamp() {}", "title": "" }, { "docid": "9e4c7fd4472f2e33991850d6c9e3e626", "score": "0.5409394", "text": "function friendlyDate($data){\n $convert = strtotime($data);\n $niceDate = '<time datetime=\"'.date('c').'\">'.date('D, F j, Y, ', $convert). 'Week '.date('W', $convert).'</time>';\n return $niceDate;\n}", "title": "" }, { "docid": "41620c32980be57acae502183d49d743", "score": "0.5404286", "text": "public function asString(): string\n {\n return $this->formatStart('Y-\\WW');\n }", "title": "" }, { "docid": "b97f75c75fbb44ffe0b9049350957da1", "score": "0.5402886", "text": "protected function filename()\n {\n return 'subscriber_' . date('YmdHis');\n }", "title": "" }, { "docid": "d576ea51b30173b3bf7a62155b643fcc", "score": "0.538507", "text": "function format_date_iso8601($timestamp=false) {\n\tif (!$timestamp) $timestamp = time();\n\tif (!is_int($timestamp)) $timestamp = strtotime($timestamp);\n\treturn date(\"Y-m-d\", $timestamp) . \"T\" . date(\"H:i:s\", $timestamp) . \"-07:00\";\n}", "title": "" }, { "docid": "e514bd4d5e91ed78fc256edcbad8375b", "score": "0.53833306", "text": "function generate_timestamped_cache_filename($src, $width, $height, $quality, $timestamp) {\n\t\t$timestamped = wpws_ImageUtils::generate_cache_filename($src, $width, $height, $quality) . WPWS_RESIZE_IMAGE_ESCAPESIGN . $timestamp;\n\t\treturn $timestamped;\n\t}", "title": "" }, { "docid": "75ba128e0bdb2e57bde1d88696a71b80", "score": "0.5382087", "text": "public function time_in_words($timestamp, $format = '%b. %d, %G')\n\t{\n\t\treturn strftime($format, (int)$timestamp);\n\t}", "title": "" }, { "docid": "a9ff4667d9d519d8d565b7c4e163c9af", "score": "0.53807133", "text": "protected function getFileBaseName()\n {\n try {\n $date = new \\DateTime();\n } catch (\\Exception $e) {\n error_log($e->getMessage());\n return '00000000T000000 - ' . $this->title;\n }\n $base_iso_date_format = 'Ymd\\THis';\n return $date->format($base_iso_date_format) . ' - ' . $this->title;\n }", "title": "" }, { "docid": "4fff2554a5bc22cfaf1f0ae943c6fc15", "score": "0.5377772", "text": "function date_pl($format, $timestamp = null) {\n $to_convert = array(\n 'l'=>array('dat'=>'N','str'=>array('Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota','Niedziela')),\n 'F'=>array('dat'=>'n','str'=>array('styczeń','luty','marzec','kwiecień','maj','czerwiec','lipiec','sierpień','wrzesień','październik','listopad','grudzień')),\n 'f'=>array('dat'=>'n','str'=>array('stycznia','lutego','marca','kwietnia','maja','czerwca','lipca','sierpnia','września','października','listopada','grudnia'))\n );\n if ($pieces = preg_split('#[:/.\\-, ]#', $format, -1, PREG_SPLIT_NO_EMPTY)) {\n if ($timestamp === null) {\n $timestamp = time();\n }\n foreach ($pieces as $datepart) {\n if (array_key_exists($datepart, $to_convert)) {\n $replace[] = $to_convert[$datepart]['str'][(date($to_convert[$datepart]['dat'],$timestamp)-1)];\n } else {\n $replace[] = date($datepart, $timestamp);\n }\n }\n $result = strtr($format, array_combine($pieces, $replace));\n return $result;\n }\n}", "title": "" }, { "docid": "f1db05d5bda86bf54e5aeb1206300650", "score": "0.53754354", "text": "function sb_formatTime( $year, $month, $day, $hour, $minute, $second, $ampm ) {\n\n $formattedHour = $hour;\n if( $ampm != NULL ) {\n if( strcmp( $ampm, \"pm\" ) == 0) {\n $formattedHour += 12;\n }\n }\n if( $formattedHour < 10 ) {\n $formattedHour = \"0$formattedHour\";\n }\n \n $formattedMinute = $minute;\n if( $formattedMinute < 10 ) {\n $formattedMinute = \"0$formattedMinute\";\n }\n\n $formattedSecond = $second;\n if( $formattedSecond < 10 ) {\n $formattedSecond = \"0$formattedSecond\";\n }\n\n $formattedDay = $day;\n if( $formattedDay < 10 ) {\n $formattedDay = \"0$formattedDay\";\n }\n\n $formattedMonth = $month;\n if( $formattedMonth < 10 ) {\n $formattedMonth = \"0$formattedMonth\";\n }\n \n \n return \"$year-$formattedMonth-$formattedDay \" .\n \"$formattedHour:$formattedMinute:$formattedSecond\";\n }", "title": "" }, { "docid": "159e22ed70f22c212e21fff087cc5656", "score": "0.53481656", "text": "function display_date($format, $timestamp, $session_available = true) {\r\n global $config;\r\n\r\n $timezone = (($session_available) ? $_SESSION[\"config\"][PREF_TIMEZONE] : $config[PREF_TIMEZONE]);\r\n $daylight = (($session_available) ? $_SESSION[\"config\"][PREF_DAYLIGHT_SAVINGS] : $config[PREF_DAYLIGHT_SAVINGS]);\r\n $timestamp = ($timestamp + ($timezone * 3600));\r\n\r\n return gmdate($format, ((($daylight == \"yes\") && (date(\"I\", $timestamp))) ? ($timestamp + 3600) : $timestamp));\r\n}", "title": "" }, { "docid": "980489ded4b481ef0e19a93a0899c38a", "score": "0.53479177", "text": "function formatDateString($datestamp, $format, $offsetTime = 0) {\n $year = intval(mb_substr($datestamp, 0, 4));\n $month = intval(mb_substr($datestamp, 5, 2));\n $day = intval(mb_substr($datestamp, 8, 2));\n\n $hours = intval(mb_substr($datestamp, 11, 2));\n $minutes = intval(mb_substr($datestamp, 14, 2));\n $seconds = intval(mb_substr($datestamp, 17, 2));\n\n $unixTimestamp = mktime($hours, $minutes, $seconds, $month, $day, $year);\n $unixTimestamp += $offsetTime;\n\n return date($format, $unixTimestamp);\n }", "title": "" }, { "docid": "d2cb1563f662b37097166b35ef1620ea", "score": "0.5344674", "text": "private function formatDatestamp($datestamp) {\n return date(\"Y-m-d\\TH:i:s\\Z\",strtotime($datestamp));\n }", "title": "" }, { "docid": "2bb5259c633fba49a0d1f262d5460b3f", "score": "0.53394234", "text": "public function getTimestamp(): string;", "title": "" }, { "docid": "54bdf08cad39856c46408dc2ad7cf063", "score": "0.53329796", "text": "private function _getStreamSuffix() {\n \n # Are we using a single file, a monthly file or a daily file for each stream?\n $streamSuffix = null;\n switch ($this->_conf['storageMode']) {\n \n # If the monthly option is required, suffix with i.e. -jun-2013\n case \"monthly\":\n $streamSuffix = \"-\" . strtolower(date(\"M\")) . \"-\" . date(\"Y\");\n break;\n \n # If the daily option is required, suffix with i.e. -1-jun-2013\n case \"daily\":\n $streamSuffix = \"-\" . date(\"j\") . \"-\" . strtolower(date(\"M\")) . \"-\" . date(\"Y\");\n break;\n\n # Single file mode doesn't need any suffix\n default:\n $streamSuffix = \"\";\n break;\n }\n \n return $streamSuffix;\n }", "title": "" }, { "docid": "eb730bfc2806daf61704df50436fb4cd", "score": "0.5328721", "text": "function d($format, $timestamp = null)\n{\n return app('translator')->date($format, $timestamp);\n}", "title": "" }, { "docid": "0b1dcc1f6028d882659bbe742673f039", "score": "0.5319699", "text": "function aerospace_data_last_updated()\n {\n $time_string = '%1$s';\n $time_string = sprintf(\n $time_string,\n esc_attr(get_the_modified_date('c'))\n );\n echo $time_string; // WPCS: XSS OK.\n }", "title": "" }, { "docid": "1fea5247d5b6337a3ffe35c7af9614bc", "score": "0.53194976", "text": "function tstring( $stamp ) {\n\tif ( empty( $stamp ) ) {\n\t\treturn null;\n\t}\n\t\n\tif ( \\is_numeric( $stamp ) ) {\n\t\treturn ( int ) $stamp;\n\t}\n\t\n\t$st = \\ltrim( \n\t\t\\preg_replace( '/[^0-9\\/]+/', '', $stamp ), \n\t\t'/' \n\t);\n\t\n\treturn \\strtotime( empty( $st ) ? 'now' : $st );\n}", "title": "" }, { "docid": "f4bdd082ff6fe4d1f06d5f26e1240e30", "score": "0.5317772", "text": "function gmdate ($format, $timestamp = null) {}", "title": "" }, { "docid": "e94d01771a9dede513eddc27d79df152", "score": "0.5317152", "text": "function smarty_modifier_amember_date_format($string, $format=null)\n{\n if ($string == MAX_SQL_DATE)\n return _COMMON_LIFETIME;\n if ($string == RECURRING_SQL_DATE)\n return _COMMON_RECURRING;\n if ($format == null)\n $format = $GLOBALS['config']['date_format']; \n if ($string != '') {\n return strftime($format, smarty_make_timestamp($string));\n } \n}", "title": "" }, { "docid": "9a2f48eee51bfc0c6e9c487cd7280213", "score": "0.5313952", "text": "public function getTimestampFormatter();", "title": "" }, { "docid": "1586ad93bb6970386a769f2ebbc440fa", "score": "0.5311787", "text": "static function getNiceDateFormatShort($dateTimeUnix) {\n //PS: I have made a function in function.php file (inc folder) which prints the current datetime\n //in database freindly format(ISO format) \n return date('d M', $dateTimeUnix);\n }", "title": "" }, { "docid": "e4ea487a6e031b89eadc9499e425ae8a", "score": "0.5306787", "text": "function NiceTime($UnixTimestamp)\n\t{\n\t\treturn isc_date('jS F Y H:i:s', $UnixTimestamp);\n\t}", "title": "" }, { "docid": "abb1f146fca64146d9a973b2d8694cfd", "score": "0.5304257", "text": "static function getNiceDateTimeFormatShort($dateTimeUnix) {\n //PS: I have made a function in function.php file (inc folder) which prints the current datetime\n //in database freindly format(ISO format) \n return date('d M, H:i', $dateTimeUnix);\n }", "title": "" } ]
6e8cb64735ee773741f6fd10355e9fbf
Compare deux points entre eux et retourne si ils sont identiques
[ { "docid": "a4d2b4ea31109a2d31f0f655a2b6f561", "score": "0.0", "text": "public static function areTwoPointsIdentical(Point $point1,Point $point2):bool\n {\n if($point1->latitude() === $point2->latitude() && $point1->longitude() === $point2->longitude()){\n return true;\n }\n return false;\n }", "title": "" } ]
[ { "docid": "4f82e87e1fd37bc34f0fefcc384e8c8d", "score": "0.59624", "text": "function cmp($a, $b)\n{ \n if ($a->points == $b->points) {\n return 0;\n }\n return ($a->points < $b->points) ? 1 : -1;\n}", "title": "" }, { "docid": "5626a77827f49973fad2b62b5b39d55a", "score": "0.5566717", "text": "function calcola_inversione($new_x1,$new_x2,$new_y1,$new_y2,\n &$x1,&$x2,&$y1,&$y2,&$inv){ \n $inv = 1;\n \n $x1 = $new_x1;\n $x2 = $new_x2;\n $y1 = $new_y1;\n $y2 = $new_y2;\n\n if(($x1 < $x2) and ($y1 < $y2)){\n $inv = -1; \n }\n if(($x1 == $x2) and ($y1 > $y2)){\n $inv = -1; \n }\n if(($x1 < $x2) and ($y1 > $y2)){\n $inv = -1; \n }\n if(($x1 < $x2) and ($y1 == $y2)){\n $inv = -1; \n }\n }", "title": "" }, { "docid": "8d1d63cbe91605bc1602e5f87b459df3", "score": "0.5564713", "text": "public function calcRefereePoints($referees,$events)\n {\n $divPointsCR = array\n (\n 4 => 1, 5 => 1, 6 => 1, // U08\n 7 => 2, 8 => 2, 9 => 2, // U10\n 10 => 2, 11 => 2, 12 => 2, // U12\n 13 => 3, 14 => 3, 15 => 3, // U14\n 16 => 4, 17 => 4, 18 => 4, // U16\n 19 => 4, 20 => 4, 21 => 4, // U19\n );\n $divPointsAR = array\n (\n 4 => 0, 5 => 0, 6 => 0, // U08\n 7 => 1, 8 => 1, 9 => 1, // U10\n 10 => 1, 11 => 1, 12 => 1, // U12\n 13 => 1, 14 => 1, 15 => 1, // U14\n 16 => 2, 17 => 2, 18 => 2, // U16\n 19 => 2, 20 => 2, 21 => 2, // U19\n );\n $divPoints4th = array\n (\n 16 => 1, 17 => 1, 18 => 1, // U16\n 19 => 1, 20 => 1, 21 => 1, // U19\n );\n\n foreach($events as $event)\n {\n foreach($event->referees as $eventReferee)\n {\n $refereeId = $eventReferee->id;\n if (isset($referees[$refereeId]))\n {\n $referee = $referees[$refereeId];\n $referee->incGameCnt();\n\n $points = 0;\n\n // Get the points array\n switch($eventReferee->positionId)\n {\n case 10: $divPoints = $divPointsCR; break;\n case 11: case 12: $divPoints = $divPointsAR; break;\n case 13: $divPoints = $divPoints4th; break;\n default: $divPoints = array();\n }\n $divId = $event->divId;\n\n if (isset($divPoints[$divId]))\n {\n $points = $divPoints[$divId];\n if (($points) &&\n ($referee->isYouth) &&\n ($divId >= 7) &&\n ($eventReferee->positionId != 13)) $points++;\n }\n\n // Madison home games only\n if ($event->unitHomeId != 4) $points = 0;\n\n // Apply the points\n if ($points)\n {\n if ($event->point2 == 1) $referee->points->pending += $points;\n if ($event->point2 == 3) $referee->points->processed += $points;\n\n $referee->points->left = $referee->points->processed;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "15fe99782c6df54eac1ea2b2260801ea", "score": "0.5552906", "text": "public function hasPoint(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "2415a4f762546bd85f27028fefb6313c", "score": "0.5516393", "text": "function calcolateHandlePoint($estrazione){\r\n\r\n if($estrazione[0] == $estrazione[1] && $estrazione[1] == $estrazione[2]){\r\n $_SESSION[\"punteggio\"] = $_SESSION[\"punteggio\"]+3;\r\n $_SESSION[\"nPartiteSenzaPunti\"]=0;\r\n }\r\n if($estrazione[0] == $estrazione[1] || $estrazione[0] == $estrazione[2] || $estrazione[1] == $estrazione[2]){\r\n $_SESSION[\"punteggio\"] = $_SESSION[\"punteggio\"]+2;\r\n $_SESSION[\"nPartiteSenzaPunti\"]=0;\r\n }\r\n if($estrazione[0] != $estrazione[1] && $estrazione[1] != $estrazione[2] && $estrazione[0] != $estrazione[2]){\r\n $_SESSION[\"nPartiteSenzaPunti\"]=$_SESSION[\"nPartiteSenzaPunti\"]+1;\r\n }\r\n\r\n }", "title": "" }, { "docid": "c89ff2f6f34c3a263035c6a89154d5d3", "score": "0.5485013", "text": "static function isCrossing( $pointA, $pointB, $pointC, $pointD ) {\n $isCrossing = false;\n \n if(\n $pointA == $pointC && $pointB == $pointD ||\n $pointA == $pointD && $pointB == $pointC ) {\n // All identical points\n $isCrossing = true;\n }elseif(\n $pointA != $pointC && $pointB != $pointD &&\n $pointA != $pointD && $pointB != $pointC\n ) {\n // If only one point id identical => not crossing\n \n \n \n // Division by zero protection\n $v1 = ($pointA->x == $pointB->x);\n $v2 = ($pointC->x == $pointD->x);\n \n if( ! ($v1 && $v2) ) {\n if( $v1 ) {\n // AB is vertical\n $aCD = ($pointD->y - $pointC->y) / ($pointD->x - $pointC->x);\n $bCD = $pointC->y - $aCD * $pointC->x;\n \n $commonY= $aCD * $pointA->x + $bCD;\n \n $isCrossing =\n $commonY > min( $pointA->y, $pointB->y ) &&\n $commonY < max( $pointA->y, $pointB->y ) &&\n $commonY > min( $pointC->y, $pointD->y ) &&\n $commonY < max( $pointC->y, $pointD->y );\n }elseif( $v2 ) {\n // CD is vertical\n $aAB = ($pointB->y - $pointA->y) / ($pointB->x - $pointA->x);\n $bAB = $pointA->y - $aAB * $pointA->x;\n\n $commonY= $aAB * $pointC->x + $bAB;\n \n $isCrossing =\n $commonY > min( $pointA->y, $pointB->y ) &&\n $commonY < max( $pointA->y, $pointB->y ) &&\n $commonY > min( $pointC->y, $pointD->y ) &&\n $commonY < max( $pointC->y, $pointD->y );\n }else {\n // a : directional coefficient / b : origin oodonnée\n $aAB = ($pointB->y - $pointA->y) / ($pointB->x - $pointA->x);\n $aCD = ($pointD->y - $pointC->y) / ($pointD->x - $pointC->x);\n \n // AB and CD are not parallel\n if( $aAB != $aCD ) {\n $bAB = $pointA->y - $aAB * $pointA->x;\n $bCD = $pointC->y - $aCD * $pointC->x;\n // X coordinate of the extended line crossing\n $commonX = ( $bCD - $bAB ) / ( $aAB - $aCD );\n \n // Lines are crossing between the given points\n $isCrossing =\n $commonX > min( $pointA->x, $pointB->x ) &&\n $commonX < max( $pointA->x, $pointB->x ) &&\n $commonX > min( $pointC->x, $pointD->x ) &&\n $commonX < max( $pointC->x, $pointD->x );\n }\n }\n }\n }\n //var_dump( $isCrossing );\n //if( $isCrossing ) var_dump( \"isCrossing\", $pointA->guid, $pointB->guid, $pointC->guid, $pointD->guid );\n return $isCrossing;\n }", "title": "" }, { "docid": "521959abc0e2fc696e98dbf79fd0f79c", "score": "0.5456128", "text": "function compareElevation($apexElevation, $parsedElevation) \r\n {\r\n //check if parsed elevation higher or lower or equal to apex\r\n if ($parsedElevation > $apexElevation)\r\n {\r\n return Self::elevationHigher;\r\n }\r\n else if ($parsedElevation < $apexElevation)\r\n {\r\n return Self::elevationLower;\r\n }\r\n //if equal\r\n return Self::elevationHigher;\r\n }", "title": "" }, { "docid": "d7105d39a969f52476fcea2d02e472fa", "score": "0.5427189", "text": "function _draggableviews_compare_nodes($node1, $node2) {\r\n // The first difference will be significant. If they equal in each level we\r\n\r\n // \"survive\" the loop and end up with return 0.\r\n\r\n for ($i = 0; $i < count($node1['order']); $i++) {\r\n if (isset($node1['order'][$i]) && isset($node2['order'][$i])) {\r\n if ($node1['order'][$i] < $node2['order'][$i]) {\r\n return -1;\r\n }\r\n if ($node1['order'][$i] > $node2['order'][$i]) {\r\n return 1;\r\n }\r\n }\r\n }\r\n return 0;\r\n}", "title": "" }, { "docid": "59a94891358387df34a27cddcf83e620", "score": "0.5387394", "text": "function pos_p_tr($con,$tr1,$tr2,$i){\r\n $min=99999999;\r\n $tramo1 = mysqli_query($con, \"select p.latitud,p.longitud from parada p, tiene t where t.idparada like p.idparada and t.idtramo like '\".$tr1.\"' \") or die(\"Error en la consulta sql: \". mysqli_error($con));\r\n $x=0;\r\n $y=0;\r\n while ($reg1 = mysqli_fetch_array($tramo1)) {\r\n $tramo2 = mysqli_query($con, \"select p.latitud,p.longitud from parada p, tiene t where t.idparada like p.idparada and t.idtramo like '\".$tr2.\"' \") or die(\"Error en la consulta sql: \". mysqli_error($con));\r\n while ($reg2 = mysqli_fetch_array($tramo2)) {\r\n $d=getDistance($reg1['latitud'],$reg1['longitud'],$reg2['latitud'],$reg2['longitud']);\r\n if($d<$min){\r\n $min=$d;\r\n $a=$x;\r\n $b=$y;\r\n }\r\n $y++;\r\n }\r\n $x++;\r\n }\r\n \r\n if($i==1)\r\n return $a;\r\n else\r\n return $b;\r\n \r\n \r\n }", "title": "" }, { "docid": "c37b0b7b0629d97bcacb016e3d86c011", "score": "0.53778833", "text": "public function containsWinnerSnapshot() {\n //return $this->positions[1] == 1 || $this->positions[2] == 1 || $this->positions[3] == 1;\n return 0;\n\n // if it is an vertical triplet\n\n // if it is a diagonal triplet\n \n }", "title": "" }, { "docid": "ede02828e8b5d604e458cc39435fd0f1", "score": "0.5374246", "text": "private function tied()\n {\n return $this->player1->points == $this->player2->points;\n }", "title": "" }, { "docid": "3eef73161279582df10a2b11e53d0b95", "score": "0.5370301", "text": "public function compare();", "title": "" }, { "docid": "0659c50013025d319e99c3856a17773f", "score": "0.5367433", "text": "public function\n\tcmp_Position_by_Point($pos1, $pos2) {\n\n\t\t//REF http://www.php.net/manual/en/function.floatval.php\n\t\t$point_1 = floatval($pos1['Position']['point']);\n\t\t$point_2 = floatval($pos2['Position']['point']);\n\t\t\n\t\t//REF http://stackoverflow.com/questions/481466/php-string-to-float answered Jan 26 '09 at 21:35\n// \t\t$point_1 = (float) $pos1['Position']['point'];\n// \t\t$point_2 = (float) $pos2['Position']['point'];\n\t\t\n\t\treturn $point_1 > $point_2;\n// \t\treturn $point_1 < $point_2;\n\t\t\n\t}", "title": "" }, { "docid": "0659c50013025d319e99c3856a17773f", "score": "0.5367433", "text": "public function\n\tcmp_Position_by_Point($pos1, $pos2) {\n\n\t\t//REF http://www.php.net/manual/en/function.floatval.php\n\t\t$point_1 = floatval($pos1['Position']['point']);\n\t\t$point_2 = floatval($pos2['Position']['point']);\n\t\t\n\t\t//REF http://stackoverflow.com/questions/481466/php-string-to-float answered Jan 26 '09 at 21:35\n// \t\t$point_1 = (float) $pos1['Position']['point'];\n// \t\t$point_2 = (float) $pos2['Position']['point'];\n\t\t\n\t\treturn $point_1 > $point_2;\n// \t\treturn $point_1 < $point_2;\n\t\t\n\t}", "title": "" }, { "docid": "4b07aa2db92a8e0ed998f839931789a2", "score": "0.53195983", "text": "public function calculatePoints()\n {\n $hasAssignedValues = false;\n //ordinamento del vettore delle soglie\n $this->gainedPoints=0;\n foreach($this->getOrderedThresholds() as $threshold) {\n foreach($this->getSessions() as $session) {\n if($session->getTotal() >= $threshold->getThresholdInPoints()) {\n $this->gainedPoints += $threshold->getValue();\n $hasAssignedValues = true;\n }\n }\n\n if($hasAssignedValues) {\n return $this->gainedPoints;\n }\n }\n\n return $this->gainedPoints;\n }", "title": "" }, { "docid": "0dda6ace3b7290ac353591735e684c71", "score": "0.527347", "text": "function isInside($meshFaces, $testPoints){\n $meshFacesArr = [];\n $meshFacesArrNo = []; //Storing the quantity of that face appears\n for($testI = 0;$testI<count($testPoints);$testI++){\n //Comparing Area\n $inside = false;\n for($meshFaceIter = 0;$meshFaceIter < count($meshFaces);$meshFaceIter++){\n //1.Finding other triangle to become a rectangle\n //2.Inside that rectangle??\n\n //Finding other triangle\n //2Points matching\n $triMatch = [];\n $triMatchNo = [];\n for($i = 0;$i<count($meshFaces);$i++){\n if($i != $meshFaceIter){\n $noMatch = 0; //Number of matching\n for($j = 0;$j<3;$j++){\n for($k = 0;$k<3;$k++){\n if(pointsEqual([$meshFaces[$meshFaceIter][$j], $meshFaces[$i][$k]])){\n $noMatch++;\n }\n }\n }\n if($noMatch == 2){\n $triMatch.push($meshFaces[$i]);\n $triMatchNo.push($i);\n }\n }\n }\n //normal Matching\n $count = 0;\n $otherTri;\n $otherTriNo;\n for($i = 0;$i<count($triMatch);$i++){\n $negNormal = faceNormal($triMatch[$i]);\n for($j = 0;$j<3;$j++){\n $negNormal[$i] *= -1.0;\n }\n if(pointsEqual([faceNormal($triMatch[$i]), faceNormal($meshFaces[$meshFaceIter])])){\n $otherTri = $triMatch[$i];\n $otherTriNo = $triMatchNo[$i];\n $count++;\n }\n }\n\n if($otherTri){\n //Combine into a rectangle\n $rect = [$otherTri[0], $otherTri[1], $otherTri[2]];\n $pInsert;\n for($i = 0;$i<3;$i++){\n $exist = false;\n for($j = 0;$j<3;$j++){\n if(pointsEqual([$rect[$j], $meshFaces[$meshFaceIter][$i]])) $exist = true;\n }\n if(!$exist){\n $pInsert = $meshFaces[$meshFaceIter][$i];\n break;\n }\n }\n //To confirm the correctness of ordering\n //1.Find the point in triangle is the farthest\n //2.insert to index: +2&mod3\n $maxDis = 0.0;\n $maxI = 0;\n for($i = 0;$i<3;$i++){\n $tmpMag = magnitude([$pInsert, $rect[$i]]);\n if($maxDis < $tmpMag){\n $maxDis = $tmpMag;\n $maxI = $i;\n }\n }\n $rect.splice(($maxI + 2) % 3, 0, $pInsert);\n\n //Calculating if inside\n $sumArea = 0.0;\n $originalArea = areaOfRectangle($rect);\n for($i = 0;$i<4;$i++){\n $sumArea += areaOfTriangle([$rect[$i], $testPoints[$testI], $rect[($i+1)%4]]);\n }\n\n if(abs($sumArea - $originalArea) < 0.0000001){\n $inside = true;\n if ($meshFacesArr.indexOf($meshFaceIter) == -1){\n $meshFacesArr.push($meshFaceIter);\n $meshFacesArrNo.push(1);\n }else{\n $meshFacesArrNo[$meshFacesArr.indexOf($meshFaceIter)]++;\n }\n if($meshFacesArr.indexOf($otherTriNo) == -1){\n $meshFacesArr.push($otherTriNo);\n $meshFacesArrNo.push(1);\n }else{\n $meshFacesArrNo[$meshFacesArr.indexOf($otherTriNo)]++;\n }\n }\n }\n }\n if(!$inside){\n return false;\n }\n }\n $indices = [];\n for($i = 0;$i<count($meshFacesArrNo);$i++){\n if($meshFacesArrNo[$i] >= 6){\n $indices.push($meshFacesArr[$i]);\n }\n }\n return $indices;\n }", "title": "" }, { "docid": "685274bc4ad935ad1563a4e735510d48", "score": "0.52443826", "text": "function lenght_boat($coordonate_Y_start,$coordonate_X_start,$coordonate_Y_end,$coordonate_X_end,&$list_boat){\n //check the lenght of the boat\n if ($coordonate_X_start<$coordonate_X_end && $coordonate_Y_start==$coordonate_Y_end){\n $lenght_boat=$coordonate_X_end-$coordonate_X_start+1;\n\n $list_boat = array_diff($list_boat, [$lenght_boat]);\n }\n else if ($coordonate_Y_start<$coordonate_Y_end && $coordonate_X_start==$coordonate_X_end){\n $lenght_boat=$coordonate_Y_end-$coordonate_Y_start+1; \n \n $list_boat = array_diff($list_boat, [$lenght_boat]);\n }\n \n else{\n print \"Les bateaux de 1 n'existent pas\\n\";\n }\n if ($lenght_boat>6){\n print \"Ne place pas un bateau de plus de 6\\n\";\n return \"\\n\";\n }\n foreach ($list_boat as $value){\n print $value . \"\\n\";\n }\n}", "title": "" }, { "docid": "a8ffb3cdae5fe00568db6e6024344859", "score": "0.52162665", "text": "private function sort_by_points($a, $b){\n\t\t\t$params1 = $this->pdh->post_process_preset($this->vpre[2], array('%member_id%' => $a, '%dkp_id%' => $this->mdkpid, '%with_twink%' => !intval($this->config->get('pk_show_twinks'))));\n\t\t\t$params2 = $this->pdh->post_process_preset($this->vpre[2], array('%member_id%' => $b, '%dkp_id%' => $this->mdkpid, '%with_twink%' => !intval($this->config->get('pk_show_twinks'))));\n\n\t\t\treturn $this->pdh->comp($this->vpre[0], $this->vpre[1], $this->sort_direction, $params1, $params2);\n\t\t}", "title": "" }, { "docid": "29a3183e7aa8638f43fa145ea1b5b862", "score": "0.51795465", "text": "public function compare_results() {\n\t\t$identical = false;\n\n\t\t$this->filter_irrelevant_nbe();\n\t\t$this->filter_unchanged_nbe();\n\n\t\t$identical = $this->check_for_identity($this->from->nbe, $this->to->nbe);\n\n\t\tif ($identical) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Changed hosts mean that the host existed in the 'from'\n\t\t// NBE, but the specific NBE line is either new or different\n\t\t$this->find_changed_hosts($this->to->nbe, $this->from->hosts);\n\t\t\n\t\t$this->from->parse_nbe();\n\t\t$this->to->parse_nbe();\n\n\t\t#$this->gather_fixed(\"holes\");\n\t\t#$this->gather_unchanged(\"holes\");\n\t}", "title": "" }, { "docid": "d155e34d9c66b531c04b9b00294c4704", "score": "0.5173033", "text": "static function pvect(Point $va, Point $vb): float { return $va->x()*$vb->y() - $va->y()*$vb->x(); }", "title": "" }, { "docid": "9452a372250820fe22bc8360164c0535", "score": "0.5154823", "text": "function periferyPoints($periferia){\n\t\tif ($periferia == \"Nucleo\"){\n\t\t\treturn 5;\n\t\t}\n\t\telse if ($periferia == \"Primera\"){\n\t\t\treturn 4;\n\t\t}\n\t\telse if ($periferia == \"Segunda\"){\n\t\t\treturn 3;\n\t\t}\n\t\telse if ($periferia == \"Tercera\"){\n\t\t\treturn 2;\n\t\t}\n\t\telse if ($periferia == \"Cuarta\"){\n\t\t\treturn 1;\n\t\t}\n\t\telse if ($periferia == \"0\"){\n\t\t return 0;\n\t\t}\n\t\t\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "2f835c9eac00afb33d10c31de6edab32", "score": "0.5122305", "text": "function otherLocationComparision( $data ) {\n\t\t\n\t\treturn trim(current($data)) == trim($this->data['CustomerInactiveVehicleLog']['vc_other_road_orign']) ? false : true; \n\t\n\t}", "title": "" }, { "docid": "a241c3d3c94ce8db2678b064e14b0a1c", "score": "0.51008415", "text": "function gestione_angoli($x1,$x2,$y1,$y2,&$seno,&$coseno){\n $mod = 0;\n $lato1 = ($x2 - $x1);\n $lato2 = ($y2 - $y1);\n \n if((($lato1 < 0) and ($lato2 < 0)) or \n (($lato1 > 0) and ($lato2 > 0))){\n $mod = 1; \n }\n \n $lato1 = abs($lato1);\n $lato2 = abs($lato2); \n\n if($lato2 != 0){ $angolo1 = atan($lato1/$lato2); }\n else{ $angolo1 = deg2rad(90); }\n if($lato1 != 0){ $angolo2 = atan($lato2/$lato1); }\n else{ $angolo2 = deg2rad(90); }\n if($mod == 0){\n $seno = sin($angolo1);\n $coseno = cos($angolo1);\n }\n else{\n $seno = sin(deg2rad(180) - $angolo1);\n $coseno = cos(deg2rad(180) - $angolo1);\n }\n }", "title": "" }, { "docid": "f79d622d582dfcfd116e077b97a59c1c", "score": "0.50935036", "text": "function _getPointID($x)\n {\n return false;\n }", "title": "" }, { "docid": "976aa44e96fbb9b2f01223dbbb3cce57", "score": "0.5090851", "text": "function triageDureeCroissant($a, $b){\n\t\t\t\n\t\t\t$dureeA = explode(\":\",$a->getDuree());\n\t\t\t$dureeB = explode(\":\",$b->getDuree());\n\t\t\t$tmpsSecondesA = 0;\n\t\t\t$tmpsSecondesB = 0;\n\t\t\t\n\t\t\t$tmpsSecondesA += $dureeA[0]*60;\n\t\t\t$tmpsSecondesA += $dureeA[1];\n\t\t\t$tmpsSecondesB += $dureeB[0]*60;\n\t\t\t$tmpsSecondesB += $dureeB[1];\n\t\t\t\n\t\t\tif($tmpsSecondesA == $tmpsSecondesB)\n\t\t\t\treturn 0;\n\t\t\treturn ($tmpsSecondesA > $tmpsSecondesB) ? 1 : -1;\n\t\t}", "title": "" }, { "docid": "371a9c28a796bd5126d8c3d3b3974a66", "score": "0.50844264", "text": "function locationComparision( $data ) {\n\t\t\n\t\treturn trim(current($data)) == trim($this->data['CustomerInactiveVehicleLog']['vc_orign']) ? false : true; \n\t\n\t}", "title": "" }, { "docid": "9d3072dc75e7666e5e0f81be3633e920", "score": "0.5083517", "text": "protected abstract function getPoints();", "title": "" }, { "docid": "87bbff380952a1165c3f82fa72fc4e5b", "score": "0.50765496", "text": "private function hasDeuce()\n {\n return $this->player1->points + $this->player2->points >= 6 && $this->tied();\n }", "title": "" }, { "docid": "e9fbe32da9b41a2c73843b6081f4a795", "score": "0.5051967", "text": "public function anyPoints() {\n return max(\n $this->total_hidden_non_extra_credit,\n $this->total_non_hidden_non_extra_credit,\n $this->total_hidden_extra_credit,\n $this->total_non_hidden_extra_credit\n ) > 0;\n }", "title": "" }, { "docid": "f8c3f643783cdb32df003621aecef8b4", "score": "0.5022069", "text": "function verifPointeur($destinataire = '', $cible = '') {\n $IDCAN[DEST] = $destinataire;\n $IDCAN[COMM] = 0x00;\n $IDCAN[CIBL] = $cible;\n $IDCAN[PARA] = 0x12;\n $donnees = array();\n $this->CAN(0x60, $IDCAN, $donnees);\n $this->checksum();\n $this->conversion();\n $this->envoiTrame();\n }", "title": "" }, { "docid": "029d802cd6d1eb0dc22d333a00e4763d", "score": "0.5006745", "text": "function getPosition($lineup,$lineup_type,$min,$max){\n\t\t\t\t\t\t\t\t\t$tmp = array_values(array_filter(array_map(function($val) use($lineup_type,$min,$max){\n\t\t\t\t\t\t\t\t\t\t\tif($val->lineup_typeFK == $lineup_type && $val->pos >= $min && $val->pos <= $max){\n\t\t\t\t\t\t\t\t\t\t\t\treturn $val;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t},array_values($lineup))));\n\t\t\t\t\t\t\t\t\treturn $tmp ;\n\t\t\t\t\t\t\t\t}", "title": "" }, { "docid": "1062c233ce2b0102540cce6abafc1fd7", "score": "0.5004424", "text": "function sacPeutContenir($poids=0, $poidsSupprime=0){\r\n\t\t\treturn ( ( $this->getPlaceSacMax() - ($this->getPlaceSacUtilisee() -$poidsSupprime)) >= $poids);\r\n\t\t}", "title": "" }, { "docid": "544174d4c1a310456e065f6edb6f0aae", "score": "0.49971467", "text": "function sortByOrder($a, $b) {\n return $b['points'] - $a['points'];\n }", "title": "" }, { "docid": "ce52faf9e97e930d61e0ab149f24b1c1", "score": "0.49933684", "text": "private function validatePoints() {\r\n\t\t$this->points = $this->extractForm('points');\r\n\t}", "title": "" }, { "docid": "1b142e7185e3185b6d50cc222ac295e3", "score": "0.49891132", "text": "public function getPoints(){\n return $this->teamInfo['points_actuels'];\n }", "title": "" }, { "docid": "81582cbc9ad0872cf3b4ec27d3bde741", "score": "0.4971967", "text": "public function isSurplusPoint($uid,$point){\n\n\t\t$boolen = false;\n\n\t\t$oUserInfo = $this->getUserInfo($uid);\n\t\tif ($oUserInfo && !empty($oUserInfo)) {\n\t\t\tif((int) $oUserInfo['point'] >= $point){\n\t\t\t\t$boolen = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $boolen;\n\t}", "title": "" }, { "docid": "ec808632a202c83e46360a7612e1134d", "score": "0.4965753", "text": "public function getPriceDifferences(): void\n {\n $product_price = $this->products[0]->pris * ($this->products[0]->momssats / 100 + 1);\n $this->stats['price_lowest'] = $product_price;\n $this->stats['price_lowest_not_zero'] = $product_price;\n $this->stats['price_highest'] = $product_price;\n for ($i = 1; $i < $this->product_count; $i++) {\n $product_price = $this->products[$i]->pris * ($this->products[$i]->momssats / 100 + 1);\n $this->stats['price_lowest'] = $product_price < $this->stats['price_lowest'] ? $product_price : $this->stats['price_lowest'];\n $this->stats['price_lowest_not_zero'] = $product_price < $this->stats['price_lowest_not_zero'] && $product_price > 0 ? $product_price : $this->stats['price_lowest_not_zero'];\n $this->stats['price_highest'] = $product_price > $this->stats['price_highest'] ? $product_price : $this->stats['price_highest'];\n }\n }", "title": "" }, { "docid": "9c0edd23a8de9181a886c42d532cc1be", "score": "0.49600965", "text": "function geo_pertinente($dept_naiss)\n{\n\t// pour que les requetes affichage_carte.php (jointure individu, g__geolieu repondent)\n\t// Il faudrait tester la jointure commune, mais c'est trop couteux (plusieurs dizaines de milliers de lignes). \n\t// Implication : dans affich carte, il faut gérer l'exception où toutes les communes d'une population sont inconnues dans un dept connu. Ca arrive...\n\tglobal $pool;\n\n\t$query = 'SELECT code_dept FROM g__geodept';\n\t$result = sql_exec($query,2);\n\twhile ($row = @mysqli_fetch_row($result))\n\t{\t$code_dept[] = $row[0];\n\t}\n\n\t$final = FALSE;\n\tfor ($ii=0; $ii < count($dept_naiss); $ii++)\n\t{\tif (@array_search ($dept_naiss[$ii], $code_dept) )\n\t\t{\t$final = TRUE;\n\t\t}\n\t}\n\treturn $final;\n}", "title": "" }, { "docid": "a7503224dd760baf85461a25adef6f38", "score": "0.49521562", "text": "function get_comparison($dbconn, $user, & $errors)\n{\n // select random 2 restaurants, which the user hasn't voted on, and which have among the smallest score difference\n $query = \"\n SELECT rid1, rname1, rid2, rname2\n FROM (\n -- sort top 100 closest-score pairs by score difference\n SELECT r1.rid rid1, r1.rname rname1, r2.rid rid2, r2.rname rname2\n FROM restaurant r1\n INNER JOIN restaurant r2 ON (r1.rid < r2.rid)\n AND NOT EXISTS (\n -- select pairs r1, r2 which the user has voted on\n SELECT *\n FROM vote v\n WHERE v.uid = $1\n AND v.rid1 = r1.rid\n AND v.rid2 = r2.rid\n )\n ORDER BY ABS(r1.score - r2.score) ASC\n LIMIT 100\n ) pairs\n ORDER BY RANDOM()\n LIMIT 1;\";\n\n if (!pg_prepare($dbconn, \"\", $query)) {\n $errors[] = \"Get comparison error (pg_prepare): \" . pg_last_error();\n return false;\n }\n\n if (!($result = pg_execute($dbconn, \"\", array($user)))) {\n $errors[] = \"Get comparison error (pg_execute): \" . pg_last_error();\n return false;\n }\n\n if (!($row = pg_fetch_array($result, NULL, PGSQL_ASSOC))) {\n $errors[] = \"No comparisons remaining (???): \" . pg_last_error();\n return false;\n }\n\n $r1 = new Restaurant($row['rid1'], $row['rname1']);\n $r2 = new Restaurant($row['rid2'], $row['rname2']);\n\n return array($r1, $r2);\n}", "title": "" }, { "docid": "2411d11d6a6da74121e8728136fa2805", "score": "0.4951721", "text": "function compararPrecios($producto1, $producto2) {\n $mayorPrecio1 = $producto1['precioProd'] * $producto1['cantProd'];\n $mayorPrecio2 = $producto2['precioProd'] * $producto2['cantProd'];\n $retorno = 0;\n\n if ($mayorPrecio1 != $mayorPrecio2) {\n $retorno = ($mayorPrecio1 > $mayorPrecio2) ? -1 : 1;\n }\n\n return $retorno;\n}", "title": "" }, { "docid": "1027f56629f087d61131585963e6362f", "score": "0.49483043", "text": "function Attaquer($IdAgresseur,$IdVictime,$Bdd)\n{\n\n $Agresseur = new Entite($IdAgresseur, $Bdd);\n $Victime = new Entite($IdVictime, $Bdd);\n\n\n $ReductionDegats = $Agresseur->getAttaque() * (($Victime->getDefense() * 80 / 200) / 100);\n $DegatsAgresseur = $Agresseur->getAttaque() - $ReductionDegats;\n $VictimePdv = $Victime->getPdv() - $DegatsAgresseur;\n // Si les points de vie sont supérieure à 0 alors on set les nouveaux pdv en base\n if ($VictimePdv > 0) {\n $Victime->setPdv($VictimePdv);\n $Bdd->query(\"UPDATE `entite` SET `pdv` = \" . $VictimePdv . \" WHERE `entite`.`id_entite` = \" . $Victime->getId() . \"\");\n // Sinon on les set à 0 et on change l'état à 0 soit mort\n } else {\n $VictimePdv = 0;\n $Victime->setPdv($VictimePdv);\n $Bdd->query(\"UPDATE `entite` SET `pdv` = \" . $VictimePdv . \", `etat` = '0' WHERE `entite`.`id_entite` = \" . $Victime->getId() . \"\");\n }\n echo \"<div> pdv du dragon : \".$Victime->getPdv().\" </div>\";\n}", "title": "" }, { "docid": "92cdd8405ba3b78dfa6317c24e310b90", "score": "0.49431264", "text": "function vues($jeu, $i, $j, $trait) {\n\t// Fonction utile pour retrouver ce que voit un joueur $trait dans la partie $jeu \n\t$info = info_case($jeu, $i, $j, $trait);\n\t// Si la case existe alors on regarde si elle est alliée ou ennemi, et on renvoie\n\t// alors les coord et la pièce si elle est ennemi\n\t// les coordonnées si la case existe\n\t// false sinon\n\tif ($info[0]) {\n\t \t\tif ($info[1] == 'ennemi') { \n\t\t\treturn '['.$i.','.$j.',\"'.$jeu[$i][$j][0].'\"],'; \n\t\t} else {\n\t\t\treturn '['.$i.','.$j.'],';\n\t\t} \n\t} else {return false;} \n}", "title": "" }, { "docid": "482aa5f12d7d583f1400759b419dcbcb", "score": "0.4901617", "text": "public function getValue(){\r\n\t\t$refiller = $this->determineRefiller();\r\n\t\treturn (isset($refiller[''.$this->name.'_x']) || isset($refiller[''.$this->name.'_y']));\r\n\t}", "title": "" }, { "docid": "ac011646ff99fc3c96f0e05b761cf2b9", "score": "0.48946214", "text": "private function encontrar_columna_pivote()\n {\n $b = $this->tableau[$this->iteracion][$this->num_restricciones][0];\n $pivote = 0;\n for($i=0; $i<($this->num_restricciones+$this->num_variables+2);$i++)\n {\n if($this->tableau[$this->iteracion][$this->num_restricciones][$i] < $b)\n {\n $b = $this->tableau[$this->iteracion][$this->num_restricciones][$i];\n $pivote = $i;\n }\n }\n\n // echo \"columna: \".$pivote.\"<br>\";\n\n return $pivote;\n }", "title": "" }, { "docid": "ac62771c048ff1522e277a20d78d03c9", "score": "0.48943168", "text": "function nietMeerOpGrid($wz, $x, $y) {\n // stel x,y = 0, 100 fout als breedte 99 is \n if ($x < 0){ \n return true;\n }\n if($x >= count($wz)) {\n return true;\n }\n if ($y < 0){\n return true;\n }\n if($y >= count($wz[0])){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "f1fac674b2d663fa5f60c82fcba4b329", "score": "0.4875497", "text": "function comparadiferencias($tierexistentes, $tiernuevos)\n{\n \n $tierauxiliar=array();\n foreach($tierexistentes as $tierexistente)\n {\n $tierexiste=false; \n $tierpricerepetido=false;\n foreach($tiernuevos as $tiernuevo)\n {\n if($tierexistente['price_qty']==$tiernuevo['price_qty'])\n {\n if($tierexistente['price']==$tiernuevo['price'])\n {\n $tierpricerepetido=true; \n }\n $tierexiste= true;\n break;\n }\n }\n if($tierpricerepetido)\n {\n \n }\n if(!$tierexiste)\n {\n $tierauxiliar[] =\n array(\n 'website_id' => 0,\n 'all_groups' => 0,\n 'cust_group' => 1,\n 'price_qty' => $tierexistente['price_qty'],\n 'price' => $tierexistente['price']\n );\n } \n }\n if(count($tierexistentes)==count($tierauxiliar))\n {\n return array(false,$tiernuevos);\n }\n else\n {\n return array(true, array_merge($tierauxiliar,$tiernuevos));\n }\n \n}", "title": "" }, { "docid": "791dce8a7cd35920564a429606309883", "score": "0.48673493", "text": "function _getPointData($x)\n {\n return false;\n }", "title": "" }, { "docid": "19741ed584afef526f6a96c1dad59ff3", "score": "0.4861867", "text": "function Ordrecroissant($chiffre1,$chiffre2){\n $min=null;\n $max=null;\n if($chiffre1<$chiffre2){\n $min=$chiffre1;\n $max=$chiffre2;\n }\n \n if($chiffre2<=$chiffre1){\n $min=$chiffre2;\n $max=$chiffre1;\n }\n \n echo \"Ordre croissant donne $min,$max\";\n }", "title": "" }, { "docid": "9ab83c937b08e6f8377e9f1b2b3727f7", "score": "0.48582444", "text": "public function testLineStringFromArraysGetLastPoint()\n {\n $expected = static::createPointE();\n $lineString = $this->createStraightLineString();\n $actual = $lineString->getPoint(-1);\n\n static::assertEquals($expected, $actual);\n }", "title": "" }, { "docid": "5c5c21a33d28b908b7414d7c76db33c1", "score": "0.4846384", "text": "function magnitude($points){\n if($points[0][0] == $points[1][0] && $points[0][1] == $points[1][1] && $points[0][2] == $points[1][2]) return 0;\n return(sqrt(pow($points[0][0] - $points[1][0], 2) + pow($points[0][1] - $points[1][1], 2) + pow($points[0][2] - $points[1][2], 2)));\n }", "title": "" }, { "docid": "9b4905086834825e0e380ca9a8be6a6a", "score": "0.48303798", "text": "function zone(&$tab, $dimension_1, $dimension_2, $x1, $x2, $nb)\n {\n $compteur = 0;\n for ($i = 0; $i < $dimension_1; $i++) \n { \n for ($j = 0; $j < $dimension_2; $j++)\n {\n if ( tab($tab, $dimension_1, $dimension_2, $x1, $x2, $i, $j) )\n { \n for ( $k = $i; $k < $i+$x1; $k++ )\n {\n for ( $d = $j; $d < $j+$x2; $d++ )\n {\n $tab[$k][$d] = $nb;\n $compteur++;\n }\n if ($compteur == $x1*$x2) return TRUE; \n }\n }\n }\n }\n return FALSE;\n }", "title": "" }, { "docid": "80b465a05a794cbe73a78c62d8158b8a", "score": "0.4817173", "text": "public function isLeadingByOne()\n {\n return abs($this->player1->points - $this->player2->points) == 1;\n }", "title": "" }, { "docid": "ad04eeca30d54221b7b48b9565aa722a", "score": "0.4817043", "text": "private function setsPointsWin(){\n $stmt = $this->pdo->prepare(\"SELECT SUM(s.score_home) as 'points_sets_realises', SUM(s.score_visiteur) as 'points_sets_encaisses'\n FROM matchs m\n INNER JOIN equipes e1 ON m.id_equipe_home = e1.id_equipe\n INNER JOIN sets s ON s.id_match = m.id_match\n WHERE m.id_equipe_home LIKE :id_team\n UNION ALL \n SELECT SUM(s.score_visiteur) as 'points_sets_realises', SUM(s.score_home) as 'points_sets_encaisses'\n FROM matchs m\n INNER JOIN equipes e2 ON m.id_equipe_visiteur = e2.id_equipe\n INNER JOIN sets s ON s.id_match = m.id_match\n WHERE m.id_equipe_visiteur LIKE :id_team\");\n\n $stmt->bindParam(\":id_team\", $this->teamInfo['id_equipe'], PDO::PARAM_INT);\n\n if ($stmt->execute()){\n $res = $stmt->fetchAll(PDO::FETCH_ASSOC);\n if($res){\n $this->teamInfo['points_sets_realises'] = $res[0]['points_sets_realises'] + $res[1]['points_sets_realises'];\n $this->teamInfo['points_sets_encaisses'] = $res[0]['points_sets_encaisses'] + $res[1]['points_sets_encaisses'];\n }\n\n }\n }", "title": "" }, { "docid": "0b0723c7a4c8bb0891294a2b07b34640", "score": "0.48040116", "text": "function validate_points(array $safe_input, array &$form, array $params): bool\n{\n if ($users = App\\App::$db->getRowsWhere('users', ['email' => $_SESSION['email'] ?? ''])) {\n $current_user_id = array_key_first($users);\n $current_user = $users[$current_user_id];\n\n if ($current_user['points'] >= $params['points']) {\n //Removing points from user\n $current_user['points'] -= $params['points'];\n App\\App::$db->updateRow('users', $current_user_id, $current_user);\n\n return true;\n } else {\n $form['error'] = 'Neturi pakankamai tasku, kad isigytum ar pakeistum pixeli!';\n\n return false;\n }\n }\n}", "title": "" }, { "docid": "79ec12320480d3638b6f51c557c84591", "score": "0.47989133", "text": "public function hasVitPoint(){\n return $this->_has(8);\n }", "title": "" }, { "docid": "4e6c59bb2b834659fa7b22a383c20e21", "score": "0.47822013", "text": "abstract public function fetchComprisedPositions();", "title": "" }, { "docid": "ffd4cb75f255e54a5284ca13f82dd5c8", "score": "0.47753888", "text": "public function get_points()\n {\n return $this->points;\n }", "title": "" }, { "docid": "bb7ae5136447474606efb9cb9af67a53", "score": "0.47630754", "text": "public function compare_series() {\n\t\n\t\t$this->get_expected_count();\n\t\tif ($this->expected == $this->series_count) \n\t\t{\n\t\t\t$this->series_count_same();\n\t\t\t//$this->transfer_series();\n\t\t} \n\t\telse\n\t\t{\n\t\t\t$this->series_count_different();\n\t\t\t//Logging goes here.\n\t\t\texit;\n\t\t} \n\t}", "title": "" }, { "docid": "6d53ad5d081ff087ea12819d854874b2", "score": "0.47590107", "text": "function setReachedPoints($active_id, $points, $pass = -1)\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\tif (($points > 0) && ($points <= $this->getPoints()))\n\t\t{\n\t\t\tif ($pass<0)\n\t\t\t{\n\t\t\t\t$pass = $this->getSolutionMaxPass($active_id);\n\t\t\t}\n\t\t\t$affectedRows = $ilDB->manipulateF(\"UPDATE tst_test_result SET points = %s WHERE active_fi = %s AND question_fi = %s AND pass = %s\",\n\t\t\t\tarray('float','integer','integer','integer'),\n\t\t\t\tarray($points, $active_id, $this->getId(), $pass)\n\t\t\t);\n\t\t\tself::_updateTestPassResults($active_id, $pass);\n\t\t\treturn TRUE;\n\t\t}\n\t\t\telse\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t}", "title": "" }, { "docid": "fd3ef1527389866a95ad9595ad0aa7f6", "score": "0.47529426", "text": "public function saisie()\r\n\t{\r\n\t\techo \"Nombre de chevaux : \".$this->CV.\"<br> Nombre de kilométre parcouru : \".$this->DISTANCE.\"<br>\"; \r\n\t}", "title": "" }, { "docid": "a52401358aee60095b3b2b4005bcbb35", "score": "0.475237", "text": "public function hasEnoughPointsToBeWon()\n {\n return max([$this->player1->points, $this->player2->points]) >= 4;\n }", "title": "" }, { "docid": "92551377c14919faa7a0139e0b883120", "score": "0.47386682", "text": "public function hasLukPoint(){\n return $this->_has(9);\n }", "title": "" }, { "docid": "96eed53e867f5fec08d07e72c24121dc", "score": "0.47352892", "text": "public function eligible_check($insert)\n {\n $this->db->select('SUM(reward_points) AS reward_points FROM referral'); \n $this->db->where('agent_id', $this->session->userdata('sid'));\n $this->db->where('referee_status', '1');\n $this->db->where('reward_expiry_date >=', date('Y-m-d'));\n $query = $this->db->get()->result();\n foreach ($query as $key => $value) {\n }\n if ($insert['claimed_points'] < $value->reward_points) {\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "d54095d3764f8501452fe0aedfc2cc0f", "score": "0.47342142", "text": "private function addPoints($user, $points, $dare, $manager)\n {\n if (($user->getPoints() >= $points) && ($points >= 0)) {\n $reward = new Reward();\n $reward->setUser($user);\n $reward->setOffer($dare);\n $reward->setPoints($points);\n $manager->persist($reward);\n\n $userPoints = $user->getPoints();\n $userPoints -= $points;\n $user->setPoints($userPoints);\n $manager->persist($user);\n $manager->flush();\n $pointsMsg = 1;\n } else {\n $pointsMsg = 2;\n }\n return $pointsMsg;\n }", "title": "" }, { "docid": "9acb962f41ec649bf6e27e6b7b871492", "score": "0.47283524", "text": "function m_calPoints(){ \n $this->m_GetImageSize(); \n if ($this->range['RIGHT'] > $this->m_imageSize[0] or $this->range['LEFT'] < 0){ \n die('error 2'); \n } \n if ($this->range['BOTTOM'] > $this->m_imageSize[1] or $this->range['TOP'] < 0){ \n die('error 3'); \n } \n $point['LEFT'] = ($this->range['RIGHT'] - $this->range['LEFT']) / (COORD_RIGHT - COORD_LEFT) * ($this->m_coord_lon - COORD_LEFT) + $this->range['LEFT']; \n $point['TOP'] = ($this->range['BOTTOM'] - $this->range['TOP']) / (COORD_TOP - COORD_BOTTOM) * (COORD_TOP - $this->m_coord_lat) + ($this->range['TOP'] - 4); \n return $point; \n }", "title": "" }, { "docid": "415e33742a6714cdaa17359b5b9675c4", "score": "0.4723761", "text": "public function mayor(){\n echo \"&nbsp\".$this->a.\"&nbsp\".$this->b.\"&nbsp\".$this->c.\"<br>\";\n if(($this->a>$this->b)&&($this->a>$this->c))\n echo \"&nbsp <b>\".$this->a.\"</b>&nbsp\".$this->b.\"&nbsp\".$this->c;\n if(($this->b>$this->a)&&($this->b>$this->c))\n echo \"&nbsp\".$this->a.\"&nbsp<b>\".$this->b.\"</b>&nbsp\".$this->c;\n if(($this->c>$this->a)&&($this->c>$this->b))\n echo \"&nbsp\".$this->a.\"&nbsp\".$this->b.\"&nbsp<b>\".$this->c.\"</b>\";\n \n }", "title": "" }, { "docid": "6d28d6c2802ea0111a2b939a3a0ebc45", "score": "0.47200203", "text": "public function testPoints()\r\n {\r\n $card = new Card();\r\n $card->setPoints('100');\r\n $this->assertSame(100, $card->getPoints());\r\n\r\n $card->addPoints('50');\r\n $this->assertSame(150, $card->getPoints());\r\n }", "title": "" }, { "docid": "5b4c0622c8fb39286e6ae9b11df37fa6", "score": "0.4713282", "text": "function cmp($a,$b) {\n if ($a->grootboekrekening == $b->grootboekrekening) return 0;\n return ($a->grootboekrekening > $b->grootboekrekening) ? +1 : -1;\n }", "title": "" }, { "docid": "57a3d9545f231d8a43eebb1639baa945", "score": "0.47128832", "text": "public function hasUsedPoint(){\n return $this->_has(11);\n }", "title": "" }, { "docid": "515718c5e6419c3d87c999e99f4b0a10", "score": "0.46922153", "text": "public function testShouldCompareAdverts()\n\t {\n\t\t$advert = new SimpleXMLElement(file_get_contents(__DIR__ . \"/datasets/adverts/comparing/1.xml\"));\n\t\t$comparing = new Comparing($advert);\n\n\t\t$testdata = [];\n\n\t\t$expected = [\n\t\t \"2\" => true,\n\t\t \"3\" => false,\n\t\t \"4\" => true,\n\t\t \"5\" => false,\n\t\t];\n\n\t\tfor ($i = 2; $i <= 5; $i++)\n\t\t {\n\t\t\t$testdata[] = array(\n\t\t\t\t \"advert\" => new Advert(new SimpleXMLElement(file_get_contents(__DIR__ . \"/datasets/adverts/comparing/\" . $i . \".xml\"))),\n\t\t\t\t \"expected\" => $expected[$i],\n\t\t\t\t );\n\t\t } //end for\n\n\t\tforeach ($testdata as $data)\n\t\t {\n\t\t\t$this->assertEquals($data[\"expected\"], $comparing->compare($data[\"advert\"]));\n\t\t } //end foreach\n\n\t }", "title": "" }, { "docid": "69c12fe5d27b26198fd296e1bf92202f", "score": "0.46801382", "text": "function cmp($a, $b)\n{\n return $a->position - $b->position;\n}", "title": "" }, { "docid": "c044e476345c5cd6ef5fbe5cbd5bd02b", "score": "0.46782014", "text": "public function getPoints() {\n\t\treturn (int)$this->points;\n\t}", "title": "" }, { "docid": "2fca134009f6e9a5676843577945ed0f", "score": "0.46774113", "text": "function method1($a, $b) // TODO: remove\n {\n return ($a[1][\"count_view\"] <= $b[1][\"count_view\"]) ? -1 : 1;\n }", "title": "" }, { "docid": "5296e3f8a68c141f05d4ead2a236f51f", "score": "0.4674397", "text": "function compareOrder($a, $b)\n\t\t{\n\t\t return $b->age - $a->age;\n\t\t}", "title": "" }, { "docid": "c967fc975cd1393d88e6e56c78102002", "score": "0.46646258", "text": "public function isEqual()\n {\n if (0 === $this->comparisonArray['y'] &&\n 0 === $this->comparisonArray['m'] &&\n 0 === $this->comparisonArray['d'] &&\n 0 === $this->comparisonArray['h'] &&\n 0 === $this->comparisonArray['i'] &&\n 0 === $this->comparisonArray['s']) {\n return 1;\n }\n\n return 0;\n }", "title": "" }, { "docid": "c82ba2ca26658bcae6ada9ce8ab91904", "score": "0.4661346", "text": "public function testViajePlus() {\r\n $tiempo4 = new TiempoSimulado();\r\n $colectivo = new Colectivo(\"134\", \"mixta\", 30);\r\n $tarjeta = new Tarjeta($tiempo4);\r\n $tarjeta->recargar(10);\r\n\r\n //como la tarjeta solo tiene $10 de carga, cada vez que se invoque a la funcion pagarCon se debe incrementar en 1 la cantidad de viajes plus\r\n $colectivo->pagarCon($tarjeta);\r\n $this->assertEquals($tarjeta->getUltimoViaje()->getTipo(), TipoViaje::VIAJE_PLUS);\r\n $colectivo->pagarCon($tarjeta);\r\n $this->assertEquals($tarjeta->getUltimoViaje()->getTipo(), TipoViaje::VIAJE_PLUS);\r\n\r\n $this->assertFalse($colectivo->pagarCon($tarjeta));\r\n\r\n //si los viajes plus funcionan correctamente, cuando querramos usar mas de 2 viajes plus la funcion pagarCon() debe retornar FALSE. En caso de que se retorne el FALSE, se verifica que solamente se pueden usar 2 viajes plus //\r\n\r\n }", "title": "" }, { "docid": "4c87a576fecbb8d37ed07e94a586ab57", "score": "0.46569723", "text": "public function hasAgiPoint(){\n return $this->_has(6);\n }", "title": "" }, { "docid": "509ead761ed5bd3d54e3fd83f286ab01", "score": "0.4655143", "text": "public function isLeadingByTwo()\n {\n //it dose'nt matter if player 2 is great because of abs method 2-4 = -2 but with abs we have 2\n return abs($this->player1->points - $this->player2->points) >= 2;\n }", "title": "" }, { "docid": "4dcb09bbb94508bc2dc51a8ac3892d8c", "score": "0.46535403", "text": "function compara_valores($id_restauro)\n{\n global $db,$msg_dest;\n \n $sql_fixo=\"SELECT a.material_tecnica as mat,a.dim_parte_altura as alt,a.dim_parte_largura as larg,a.dim_aimp_altura as imp_alt,a.dim_aimp_largura as imp_larg \n\t\t\tFROM parte AS a, restauro AS b WHERE a.parte=b.parte AND b.restauro='$id_restauro'\";\n $db->query($sql_fixo);\n $res=$db->dados();\n $conteudo1=array($res['mat'],$res['alt'],$res['larg'],$res['imp_alt'],$res['imp_larg']);\n $conteudo2=array($_REQUEST['tecnica'],formata_valor(trim($_REQUEST['altura_obra'])),formata_valor(trim($_REQUEST['largura_obra'])),formata_valor(trim($_REQUEST['altura_imagem'])),formata_valor(trim($_REQUEST['largura_imagem'])));\n ///\n $sql_usu=\"SELECT responsavel, tecnico from colecao where nome = '$_REQUEST[colecao]'\";\n $db->query($sql_usu);\n $usu_destino=$db->dados(); \n $usu_responsavel=$usu_destino['responsavel'];\n $usu_tecnico=$usu_destino['tecnico'];\n ///\n reset($conteudo1);\n reset($conteudo2);\n $msg=array();\n reset($msg);\n $msg_dest='';\n if($conteudo1[0]!=$conteudo2[0]){\n $msg[]='Técnica original:'.$conteudo1[0].' - Técnica atual:'.$conteudo2[0]. '\\n';}\n if($conteudo1[1]!=$conteudo2[1]){\n $msg[]='Altura original:'.$conteudo1[1].'cm - Altura atual:'.$conteudo2[1].' cm \\n';}\n if($conteudo1[2]!=$conteudo2[2]){\n $msg[]='Largura original:'.$conteudo1[2].' cm - Largura atual:'.$conteudo2[2].' cm \\n';}\n if($conteudo1[3]!=$conteudo2[3]){\n $msg[]='Altura da Imagem original:'.$conteudo1[3].' cm - Altura da Imagem atual:'.$conteudo2[3].' cm \\n';}\n if($conteudo1[4]!=$conteudo2[4]){\n $msg[]='Largura da Imagem original:'.$conteudo1[4].' cm - Largura da Imagem atual:'.$conteudo2[4].' cm \\n ';}\n\nif(count($msg)>0) // Se houver mudanças......\n{\n for($i=0;$i<count($msg);$i++){ \n $msg_dest.=$msg[$i];}\n}\n\nif ($usu_responsavel!='') {\n\n\tif($msg_dest!='')\n\t{\n \t\t$texto.='Modificações de catalogação na Ficha de Restauro\\n';\n \t\t$texto.='Nº DE REGISTRO:'.$_REQUEST['tombo']. '- Sequencial:'.$_REQUEST['seq_restauro'].'\\n';\n \t\t$texto.='TÍTULO:'.$_REQUEST['titulo'].'\\n';\n \t\t$texto.='ALTERAÇÕES:\\n';\n \t\t$texto.=$msg_dest;\n \t\t$dataInc= date(\"Y-m-d\");\n \t\t$assunto='Ficha de Restauro-Nº de registro:'.$_REQUEST['tombo'].'';\n \t\t$sql= \"INSERT INTO agenda(assunto,texto,data_aviso,eh_lida,data_inclusao,usuario_origem,usuario) \n \t\tvalues('$assunto','$texto',now(),'0','$dataInc','$_SESSION[susuario]','$usu_responsavel')\";\n \t\t$db->query($sql);\n\t\tif ($usu_responsavel <> $usu_tecnico) {\n\t \t\t$sql= \"INSERT INTO agenda(assunto,texto,data_aviso,eh_lida,data_inclusao,usuario_origem,usuario) \n \t\tvalues('$assunto','$texto',now(),'0','$dataInc','$_SESSION[susuario]','$usu_tecnico')\";\n\t \t\t$db->query($sql);\n\t\t}\n \t}\n} \n}", "title": "" }, { "docid": "b4244d03cd9a80f96308b7230f7ba2ab", "score": "0.46477467", "text": "public function TestFunctionSetNegativePointsGeneratedReturnsGivenPoints(){\r\n\t\tglobal $wgOut;\r\n\t\t$Point = new Point();\r\n\t\t$result = $Point->setPointsGenerated(-1);\r\n\t\t// displays the result\r\n\t\t$wgOut->addHTML($result);\r\n\t}", "title": "" }, { "docid": "108d87295d0599cb96761402ae431883", "score": "0.46471816", "text": "static protected function minDistanceBetween($p1, $points) {\n\t\t$min = null;\n\t\tforeach ($points as $p) {\n\t\t\t$e = 0;\n\t\t\tforeach ([24,16,8,0] as $k){\n\t\t\t\t$dk = ($p1>>$k & 255)-($p>>$k & 255);\n\t\t\t\tif ($dk<0){\n\t\t\t\t\t$dk *= -1;\n\t\t\t\t}\n\t\t\t\t$e += $dk;\n\t\t\t}\n\t\t\tif (is_null($min) or $e < $min) {\n\t\t\t\t$min = $e;\n\t\t\t}\n\t\t}\n\t\treturn $e / 4;\n\t}", "title": "" }, { "docid": "f46ee6eb79787b5b170b77673bedbc94", "score": "0.46469453", "text": "function compareCard($keyStep,$valueStep,$card){\n $coincides=false;\n if($keyStep == \"startPrice\"){\n if($valueStep <= $card->getPrice_car()){\n $coincides=true;\n }\n }\n if($keyStep == \"endPrice\"){\n if($valueStep >= $card->getPrice_car()){\n $coincides=true;\n }\n }\n if($keyStep == \"car-model\"){\n if($valueStep == $card->getName_car()){\n $coincides = true;\n }\n }\n if($keyStep == \"used\"){\n if($valueStep == $card->getState_car()){\n $coincides = true;\n }\n }\n if($keyStep == \"car-year\"){\n if($valueStep == $card->getYear_car()){\n $coincides = true;\n }\n }\n return $coincides;\n}", "title": "" }, { "docid": "01019d951eb0b27064cb21a090bd1f27", "score": "0.46399182", "text": "function libraryFine($d1, $m1, $y1, $d2, $m2, $y2) {\n if($y1 < $y2 || $y1 == $y2){\n if($m1 == $m2 || $m1 < $m2){\n if($d1 == $d2 || $d1 < $d2){\n return 0;\n }else {\n return ($d1-$d2)*15;\n }\n }else {\n return ($m1-$m2)*500;\n }\n }else {\n return 1000;\n } \n}", "title": "" }, { "docid": "cb7fd5d3175fb8415e37fd312e4f2860", "score": "0.4639668", "text": "function diffTests($diff) {\n\t\t// performs various tests to determine if the strokes are \"close\" enough\n\t\t\n\t\t$maxTest = $this->test2($diff);\n\t\t$avgTest = $this->test1($diff);\n\t\t\n\t\t$success = $maxTest && $avgTest;\n\t\t\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "43c8a5f08a389e2077f8a3bc9f1ab9bb", "score": "0.46387264", "text": "public function hasIntPoint(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "fff739de69b3406ca5cd4fd9b4dc706e", "score": "0.46370602", "text": "function potitionPoints($arreglo, $busqueda, $lugar){\n\t\t$perif = isInPerifery($arreglo, $busqueda);\n\t\t//echo $perif;\n\t\t\n\t\tif(($lugar == 0 or $lugar == 1 or $lugar == 2) and $perif == \"Nucleo\"){\n\t\t\t//echo \"entre\";\n\t\t\treturn 5;\n\t\t}\n\t\telse if($lugar == 3 and $perif == \"Nucleo\"){\n\t\t\t//echo \"entre1\";\n\t\t\treturn 4;\n\t\t}\n\t\telse if($lugar == 4 and $perif == \"Nucleo\"){\n\t\t\t//echo \"entre2\";\n\t\t\treturn 3;\n\t\t}\n\t\t\n\t\telse if(($lugar == 1 or $lugar == 2) and $perif == \"Primera\"){\n\t\t\t//echo \"entre3\";\n\t\t\treturn 5;\n\t\t}\n\t\telse if(($lugar == 0 or $lugar == 3)and $perif == \"Primera\"){\n\t\t\t//echo \"entre4\";\n\t\t\treturn 4;\n\t\t}\n\t\telse if($lugar == 4 and $perif == \"Primera\"){\n\t\t\t//echo \"entre5\";\n\t\t\treturn 3;\n\t\t}\n\t\t\n\t\telse if($lugar == 2 and $perif == \"Segunda\"){\n\t\t\t//echo \"entre6\";\n\t\t\treturn 5;\n\t\t}\n\t\telse if(($lugar == 1 or $lugar == 3) and $perif == \"Segunda\"){\n\t\t\t//echo \"entre7\";\n\t\t\treturn 4;\n\t\t}\n\t\telse if(($lugar == 0 or $lugar == 4) and $perif == \"Segunda\"){\n\t\t\t//echo \"entre8\";\n\t\t\treturn 3;\n\t\t}\n\t\t\n\t\telse if($lugar == 3 and $perif == \"Tercera\"){\n\t\t\t//echo \"entre9\";\n\t\t\treturn 5;\n\t\t}\n\t\telse if(($lugar == 2 or $lugar == 4) and $perif == \"Tercera\"){\n\t\t\t//echo \"entre10\";\n\t\t\treturn 4;\n\t\t}\n\t\telse if($lugar == 1 and $perif == \"Tercera\"){\n\t\t\t//echo \"entre11\";\n\t\t\treturn 3;\n\t\t}\n\t\telse if($lugar == 0 and $perif == \"Tercera\"){\n\t\t\t//echo \"entre11\";\n\t\t\treturn 2;\n\t\t}\n\t\t\n\t\telse if($lugar == 4 and $perif == \"Cuarta\"){\n\t\t\t//echo \"entre12\";\n\t\t\treturn 5;\n\t\t}\n\t\telse if($lugar == 3 and $perif == \"Cuarta\"){\n\t\t\t//echo \"entre13\";\n\t\t\treturn 4;\n\t\t}\n\t\telse if($lugar == 2 and $perif == \"Cuarta\"){\n\t\t\t//echo \"entre14\";\n\t\t\treturn 3;\n\t\t}\n\t\telse if($lugar == 1 and $perif == \"Cuarta\"){\n\t\t\t//echo \"entre15\";\n\t\t\treturn 2;\n\t\t}\n\t\telse if($lugar == 0 and $perif == \"Cuarta\"){\n\t\t\t//echo \"entre16\";\n\t\t\treturn 1;\n\t\t}\n\t\telse if ($perif == null){\n\t\t\t//echo \"entre17\";\n\t\t\treturn 0;\n\t\t}\n\t\telse{\n\t\t\techo \"entre18\";\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "f61cf7af66cba0e8ccc639125e017178", "score": "0.46366537", "text": "function ScoreCompare($a,$b)\n{\n\tif ($a[4] == $b[4]) // Score\n\t{\n\t\tif ($a[5] == $b[5]) // Tiebreak 1\n\t\t{\n\t\t\tif ($a[6] == $b[6]) // Tiebreak 2\n\t\t\t{\n\t\t\t\tif ($a[7] == $b[7]) // Tiebreak 3\n\t\t\t\t{\n\t\t\t\t\tif ($a[8] == $b[8]) // Tiebreak 4\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($a[9] == $b[9]) // Tiebreak 5\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn ($a[9] < $b[9]) ? 1 : -1;\n\t\t\t\t\t}\n\t\t\t\t\treturn ($a[8] < $b[8]) ? 1 : -1;\n\t\t\t\t}\n\t\t\t\treturn ($a[7] < $b[7]) ? 1 : -1;\n\t\t\t}\n\t\t\treturn ($a[6] < $b[6]) ? 1 : -1;\n\t\t}\n\t\treturn ($a[5] < $b[5]) ? 1 : -1;\n\t}\n\treturn ($a[4] < $b[4]) ? 1 : -1;\n}", "title": "" }, { "docid": "cdbdf9018bf291cd0e4a72b6588a5269", "score": "0.4636482", "text": "public function test_two_non_exact_matches() {\r\n $question = clone $this->question;\r\n $answers = array();\r\n $answers[] = (object)array('id' => 1, 'answer' => 'a data template', 'fraction' => 0.78);\r\n $answers[] = (object)array('id' => 2, 'answer' => 'a data a a', 'fraction' => 1.0);\r\n $question->answers = $answers;\r\n $state = $question->grade_response(array('answer' => 'a data'));\r\n $this->assertEquals($state[0],0.78);\r\n }", "title": "" }, { "docid": "fe4789da958c606c64e57cbbc7ddbdf3", "score": "0.4635594", "text": "function insertionPoint($leaderboard, $aliceScore) {\n $leaderboardLength = count($leaderboard);\n $start = 0;\n $end = $leaderboardLength-1;\n $point = floor(($end-$start)/2)+$start; \n if ($aliceScore < $leaderboard[$end]) {\n $point = $leaderboardLength;\n } else {\n while ($start < $end) {\n $rankedScore = $leaderboard[$point];\n if ($aliceScore == $rankedScore) {\n break;\n } else if ($aliceScore < $rankedScore) {\n $start = $point+1;\n } else {\n $end = $point;\n }\n $point = floor(($end-$start)/2)+$start;\n }\n }\n return $point;\n}", "title": "" }, { "docid": "070fdebeb934f6c910a9b4fd5a089088", "score": "0.46329197", "text": "static private function isMeteoBest($meteo1, $meteo2) {\n $valueMeteo1=NbHoureMeteo::valueMeteo($meteo1);\n $valueMeteo2=NbHoureMeteo::valueMeteo($meteo2);\n return $valueMeteo1 < $valueMeteo2;\n }", "title": "" }, { "docid": "b188a734818a93d62bf06b7eeb6f2aa5", "score": "0.46316683", "text": "function compare_values( $v1, $v2 )\n {\n $epsilon = 0.00001;\n \n return ( ( $v1 > ( $v2 - $epsilon ) ) && ( $v1 < ( $v2 + $epsilon ) ) );\n }", "title": "" }, { "docid": "6741b7fc369851b5aa96a6d8f5e8a5dd", "score": "0.46308252", "text": "function compareAbs($x, $y){\n$cmp = abs($x)-abs($y);\nif ($cmp != 0)\n return $cmp;\nelse\n return $x - $y;\n}", "title": "" }, { "docid": "84cad1cef580ef17924d5ea2bf77769e", "score": "0.46270326", "text": "function compareTriplets($a, $b)\n{\n $temp = array('a' => 0, 'b' => 0);\n for ($i = 0; $i < count($a); $i++) {\n if ($a[$i] == $b[$i]) {\n $temp['a'] += 0;\n $temp['b'] += 0;\n } else if ($a[$i] > $b[$i]) {\n $temp['a'] += 1;\n $temp['b'] += 0;\n } else if ($a[$i] < $b[$i]) {\n $temp['a'] += 0;\n $temp['b'] += 1;\n }\n }\n return $temp;\n}", "title": "" }, { "docid": "8745fb813084a2673aaa40d760666f33", "score": "0.46251094", "text": "function insertPoints($points, $id) {\n\t\tif (is_array($points)) {\n\t\t\t$sql = \"INSERT INTO CalculatedEvent values\";\n\t\t\tforeach ($points as $i => $item) {\n\n\t\t\t\t//split the time to enter in the database\n\t\t\t\t$time = explode('.', $item -> time);\n\t\t\t\tif (strpos($item -> time, '.') !== false) {\n\t\t\t\t\t$msec = $time[1] . ' ';\n\t\t\t\t} else {\n\t\t\t\t\t$msec = '00';\n\t\t\t\t}\n\t\t\t\t$min = date('i', $time[0]);\n\t\t\t\t$sec = date('s', $time[0]);\n\n\t\t\t\tif (count($points) != $i + 1) {\n\t\t\t\t\t$subsql = \"(0, \" . $id . \", \" . $item -> trackedPointX . \", \" . $item -> trackedPointY . \", \" . $min . \", \" . $sec . \", \" . $msec . \", \" . $item -> type_id . \", \" . $item -> team_id . \", null, null),\";\n\t\t\t\t} else {\n\t\t\t\t\t$subsql = \"(0, \" . $id . \", \" . $item -> trackedPointX . \", \" . $item -> trackedPointY . \", \" . $min . \", \" . $sec . \", \" . $msec . \", \" . $item -> type_id . \", \" . $item -> team_id . \", null, null)\";\n\t\t\t\t}\n\t\t\t\t$sql = $sql . $subsql;\n\t\t\t}\n\n\t\t\t$stmt = $this -> DB -> prepare($sql);\n\t\t\tif ($stmt -> execute()) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tprint_r($stmt -> errorInfo());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "e0f01d2856b199b3bea7d25d64e2d21a", "score": "0.4624921", "text": "public function possibleMove($x,$y,$id){\n \n $result=true;\n $query=$this->find();\n $list=$query->toArray();\n \n \n foreach($list as $n=>$fighter){\n if($fighter->coordinate_y==$y && $fighter->coordinate_x==$x ){\n \n //l'adversaire\n $o=$this->get($fighter->id);\n //moi\n $my=$this->get($id);\n \n $event = new EventsTable();\n \n //Algorithme d'attaque \n if(rand(1,20)>(10+$o->level-$my->level)){\n //j'enleve de la vie à l'adversaire, le nombre de ma force\n $o->current_health-=$my->skill_strength;\n //je gagne 1 point xp pour la reuissite de l'attaque\n $my->xp++;\n \n $event->putInfo($my->name.\" attacked \".$o->name. \" and touched him\",\n $my->coordinate_x,$my->coordinate_y);\n \n // si je tue mon adversaire\n if($o->current_health<=0){\n \n $event->putInfo($my->name.\" attacked \".$o->name. \" and killed him\",$my->coordinate_x,$my->coordinate_y);\n \n // je recupere en xp le level de mon adversaire \n $my->xp+=$o->level;\n //JE TRICHE// 20 est la case poubelle pour deplacer les morts\n $o->coordinate_x=20;\n $o->coordinate_y=20;\n }\n $this->save($o);\n $this->save($my); \n }\n \n else $event->putInfo($my->name.\" tried to attack \".$o->name. \", but missed him\",$my->coordinate_x,$my->coordinate_y);\n $result=false;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "471c73b17a3de816479a2da151f18144", "score": "0.46248147", "text": "public function testCompare() {\n\t\t$this->assertEquals(0, $this->object->compare('titon'));\n\t\t$this->assertEquals(-10, $this->object->compare('titon framework'));\n\t\t$this->assertEquals(2, $this->object->compare('tit'));\n\t}", "title": "" }, { "docid": "d96d3581acd25593b5e9ef39f62537e3", "score": "0.46235955", "text": "public function isplata($iznos){\nif($iznos<=$this->stanje){\n\n $this->stanje-=$iznos;\n}else{\n echo \"<h3>Nemate dovoljno sredstava na racunu</h3>\";\n}\n\n}", "title": "" }, { "docid": "e59455b5353ae5081ef5051ad327a66b", "score": "0.46227613", "text": "private function find_point_of_insertion($inorout, $rightorleft, $left, $right)\n {\n $rightorleft = strtolower ($rightorleft);\n $inorout = strtolower ($inorout);\n\n switch($rightorleft) {\n case \"right\":\n $point_of_insertion = $right;\n\n switch($inorout) {\n case \"out\":\n $point_of_insertion++;\n break;\n\n case \"in\":\n break;\n\n default:\n $msg = xarMLS::translate('Valid values: IN or OUT');\n throw new BadParameterException(null, $msg);\n }\n break;\n case \"left\":\n $point_of_insertion = $left;\n switch($inorout) {\n case \"out\":\n break;\n\n case \"in\":\n $point_of_insertion++;\n break;\n\n default:\n $msg = xarMLS::translate('Valid values: IN or OUT');\n throw new BadParameterException(null, $msg);\n }\n break;\n default:\n $msg = xarMLS::translate('Valid values: RIGHT or LEFT');\n throw new BadParameterException(null, $msg);\n }\n return $point_of_insertion;\n }", "title": "" }, { "docid": "58ba5ad746f1e1bc4c10215b040585e5", "score": "0.46155334", "text": "private function comparePerfiles($p1, $p2){\n if ( $p1->getOrden() > $p2->getOrden() ){\n return 1;\n }else{\n return -1;\n }\n }", "title": "" }, { "docid": "e35bd08eb684a4b2f9ee0f0292998be4", "score": "0.46154946", "text": "function getScoreVoley($data1, $data2) {\n $puntos = array(0,0);\n\n if ( $data1 == '' ) {\n $puntos[0] = 0; \n }\n\n if ( $data2 == '' ) {\n $puntos[1] = 0; \n } \n \n if ( $data1 != '' && $data2 != '' ) {\n $data1 = explode(',', $data1);\n $data2 = explode(',', $data2);\n\n $recorrido = count($data1);\n if (count($data1) < count($data2)) {\n $recorrido = count($data2);\n }\n \n for ($i = 0; $i < $recorrido; $i++) {\n \n if ( ! isset($data1[$i]) ){\n $data1[$i] = 0;\n }\n if ( ! isset($data2[$i]) ){\n $data2[$i] = 0;\n }\n\n if ( (int)$data1[$i] < (int)$data2[$i] ) {\n $puntos[1]++;\n }\n if ( (int)$data1[$i] > (int)$data2[$i] ) {\n $puntos[0]++;\n }\n \n }\n }\n\n return $puntos;\n}", "title": "" }, { "docid": "a1ef31768273d20e217ab304802c0eda", "score": "0.4614491", "text": "public function NoPointResults(){\n foreach ($this->testResults as $res) {\n if (!empty($res->points))\n return false;\n }\n\n return true;\n }", "title": "" } ]